Compare commits
9 Commits
64273570bd
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b7962df7c | |||
| 793b9a7489 | |||
| 45cffb541b | |||
| 5ea4aed9fb | |||
| a56db71c1a | |||
| bba77ae6b4 | |||
| 26fb36ca19 | |||
| 1d508656c1 | |||
| 377c937728 |
@@ -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 @@
|
|||||||
# push-take-until
|
# @push-stream-std/push-take-until
|
||||||
|
|
||||||
Take values from a source stream until a signal stream emits or ends.
|
Take values from a source stream until a signal stream emits or ends.
|
||||||
|
|
||||||
@@ -28,8 +28,7 @@ npm config set -- //hub.kl1.tenere.ai/api/packages/push-stream-std/npm/:_authTok
|
|||||||
npm install @push-stream-std/push-take-until
|
npm install @push-stream-std/push-take-until
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Why
|
||||||
|
|
||||||
A push-stream through that passes through values from the source until the provided signal stream ends. When the signal stream ends (either normally or via abort), the take-until stream immediately ends the upstream source and downstream sink, closing the pipeline. This is useful for implementing cancellation patterns — for example, taking values from an event stream until a "stop" button is clicked.
|
A push-stream through that passes through values from the source until the provided signal stream ends. When the signal stream ends (either normally or via abort), the take-until stream immediately ends the upstream source and downstream sink, closing the pipeline. This is useful for implementing cancellation patterns — for example, taking values from an event stream until a "stop" button is clicked.
|
||||||
|
|
||||||
## API
|
## API
|
||||||
@@ -51,8 +50,5 @@ Tests cover passthrough before signal ends, stopping after signal end, normal en
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
Node.js 18 or later. ESM only.
|
Node.js 22 or later. ESM only.
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT
|
|
||||||
|
|||||||
Generated
+16
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "@push-stream-std/push-take-until",
|
||||||
|
"version": "0.0.8",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "@push-stream-std/push-take-until",
|
||||||
|
"version": "0.0.8",
|
||||||
|
"license": "SEE LICENSE IN LICENSE",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=22.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push-stream-std/push-take-until",
|
"name": "@push-stream-std/push-take-until",
|
||||||
"version": "0.0.2",
|
"version": "0.0.10",
|
||||||
"description": "Take elements until signal stream emits",
|
"description": "Take elements until signal stream emits",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
@@ -32,5 +32,10 @@
|
|||||||
],
|
],
|
||||||
"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/push-take-until.git"
|
||||||
|
},
|
||||||
|
"dependencies": {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user