Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7537d7fa37 | |||
| ecc03395a3 | |||
| c2b6d11159 |
@@ -10,19 +10,33 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node: [18, 20, 22]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: 22
|
||||||
- name: Auth for Gitea npm registry
|
- name: Auth for Gitea npm registry
|
||||||
run: |
|
run: |
|
||||||
echo "@${{ github.repository_owner }}:registry=https://hub.kl1.tenere.ai/api/packages/${{ github.repository_owner }}/npm/" > .npmrc
|
echo "@push-stream-std:registry=https://hub.kl1.tenere.ai/api/packages/push-stream-std/npm/" > .npmrc
|
||||||
echo "//hub.kl1.tenere.ai/api/packages/${{ github.repository_owner }}/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
echo "//hub.kl1.tenere.ai/api/packages/push-stream-std/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
- run: npm run lint || true
|
||||||
- run: npm test
|
- run: npm test
|
||||||
- run: npm run bench
|
|
||||||
if: matrix.node == 22
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
needs: test
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
- name: Auth for Gitea npm registry
|
||||||
|
run: |
|
||||||
|
echo "@push-stream-std:registry=https://hub.kl1.tenere.ai/api/packages/push-stream-std/npm/" > .npmrc
|
||||||
|
echo "//hub.kl1.tenere.ai/api/packages/push-stream-std/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
||||||
|
- run: npm install
|
||||||
|
- run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# stream-to-push-stream
|
# @push-stream-std/stream-to-push-stream
|
||||||
|
|
||||||
Convert native Node.js streams to push-stream source, sink, and duplex interfaces.
|
Convert native Node.js streams to push-stream source, sink, and duplex interfaces.
|
||||||
|
|
||||||
@@ -41,8 +41,7 @@ npm config set -- //hub.kl1.tenere.ai/api/packages/push-stream-std/npm/:_authTok
|
|||||||
npm install @push-stream-std/stream-to-push-stream
|
npm install @push-stream-std/stream-to-push-stream
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Why
|
||||||
|
|
||||||
Utilities for bridging between the Node.js `stream` module (Readable, Writable, Duplex) and the push-stream protocol. PushSource wraps a Readable, listening to `data`/`end`/`error` events and implementing `pipe()`, `resume()`, and `abort()`. PushSink wraps a Writable, translating `write()` calls to `writable.write()` with `drain`-based backpressure and `end()` to `writable.end()`. PushDuplex wraps a Duplex stream as a combined source/sink for bidirectional push-stream pipelines.
|
Utilities for bridging between the Node.js `stream` module (Readable, Writable, Duplex) and the push-stream protocol. PushSource wraps a Readable, listening to `data`/`end`/`error` events and implementing `pipe()`, `resume()`, and `abort()`. PushSink wraps a Writable, translating `write()` calls to `writable.write()` with `drain`-based backpressure and `end()` to `writable.end()`. PushDuplex wraps a Duplex stream as a combined source/sink for bidirectional push-stream pipelines.
|
||||||
|
|
||||||
## API
|
## API
|
||||||
@@ -78,8 +77,5 @@ Tests cover readable-to-source data flow and end handling, writable-to-sink writ
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
Node.js 18 or later. ESM only.
|
Node.js 22 or later. ESM only.
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT
|
|
||||||
|
|||||||
+5
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push-stream-std/stream-to-push-stream",
|
"name": "@push-stream-std/stream-to-push-stream",
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"description": "Convert Node.js streams to push-streams",
|
"description": "Convert Node.js streams to push-streams",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
@@ -29,5 +29,9 @@
|
|||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://hub.kl1.tenere.ai/api/packages/push-stream-std/npm/"
|
"registry": "https://hub.kl1.tenere.ai/api/packages/push-stream-std/npm/"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://hub.kl1.tenere.ai/push-stream-std/stream-to-push-stream.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user