@yume-chan/stream-extra 0.0.23 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -2
- package/LICENSE +1 -1
- package/esm/buffered-transform.d.ts +3 -3
- package/esm/buffered-transform.d.ts.map +1 -1
- package/esm/buffered-transform.js.map +1 -1
- package/esm/buffered.d.ts +3 -6
- package/esm/buffered.d.ts.map +1 -1
- package/esm/buffered.js +87 -75
- package/esm/buffered.js.map +1 -1
- package/esm/concat.d.ts +4 -3
- package/esm/concat.d.ts.map +1 -1
- package/esm/concat.js +6 -4
- package/esm/concat.js.map +1 -1
- package/esm/consumable.d.ts +36 -43
- package/esm/consumable.d.ts.map +1 -1
- package/esm/consumable.js +74 -125
- package/esm/consumable.js.map +1 -1
- package/esm/distribution.d.ts +3 -2
- package/esm/distribution.d.ts.map +1 -1
- package/esm/distribution.js +22 -18
- package/esm/distribution.js.map +1 -1
- package/esm/duplex.d.ts +2 -2
- package/esm/duplex.d.ts.map +1 -1
- package/esm/duplex.js +2 -6
- package/esm/duplex.js.map +1 -1
- package/esm/encoding.d.ts +21 -0
- package/esm/encoding.d.ts.map +1 -0
- package/esm/encoding.js +4 -0
- package/esm/encoding.js.map +1 -0
- package/esm/index.d.ts +4 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +4 -1
- package/esm/index.js.map +1 -1
- package/esm/maybe-consumable-ns.d.ts +16 -0
- package/esm/maybe-consumable-ns.d.ts.map +1 -0
- package/esm/maybe-consumable-ns.js +44 -0
- package/esm/maybe-consumable-ns.js.map +1 -0
- package/esm/maybe-consumable.d.ts +4 -0
- package/esm/maybe-consumable.d.ts.map +1 -0
- package/esm/maybe-consumable.js +2 -0
- package/esm/maybe-consumable.js.map +1 -0
- package/esm/push-readable.d.ts +16 -2
- package/esm/push-readable.d.ts.map +1 -1
- package/esm/push-readable.js +176 -17
- package/esm/push-readable.js.map +1 -1
- package/esm/stream.d.ts +7 -7
- package/esm/stream.d.ts.map +1 -1
- package/esm/stream.js +54 -5
- package/esm/stream.js.map +1 -1
- package/esm/struct-deserialize.d.ts +3 -4
- package/esm/struct-deserialize.d.ts.map +1 -1
- package/esm/struct-deserialize.js.map +1 -1
- package/esm/struct-serialize.d.ts +2 -2
- package/esm/struct-serialize.d.ts.map +1 -1
- package/esm/struct-serialize.js.map +1 -1
- package/esm/task.d.ts +5 -0
- package/esm/task.d.ts.map +1 -0
- package/esm/task.js +9 -0
- package/esm/task.js.map +1 -0
- package/esm/try-close.d.ts +10 -0
- package/esm/try-close.d.ts.map +1 -0
- package/esm/try-close.js +19 -0
- package/esm/try-close.js.map +1 -0
- package/esm/types.d.ts +34 -35
- package/esm/types.d.ts.map +1 -1
- package/esm/wrap-readable.d.ts +5 -4
- package/esm/wrap-readable.d.ts.map +1 -1
- package/esm/wrap-readable.js +14 -9
- package/esm/wrap-readable.js.map +1 -1
- package/esm/wrap-writable.d.ts +2 -2
- package/esm/wrap-writable.d.ts.map +1 -1
- package/esm/wrap-writable.js +4 -6
- package/esm/wrap-writable.js.map +1 -1
- package/package.json +11 -15
- package/src/buffered-transform.ts +2 -2
- package/src/buffered.ts +107 -83
- package/src/concat.ts +6 -4
- package/src/consumable.ts +132 -213
- package/src/distribution.ts +30 -20
- package/src/duplex.ts +4 -7
- package/src/encoding.ts +39 -0
- package/src/index.ts +4 -1
- package/src/maybe-consumable-ns.ts +75 -0
- package/src/maybe-consumable.ts +5 -0
- package/src/push-readable.ts +213 -19
- package/src/stream.ts +69 -9
- package/src/struct-deserialize.ts +4 -7
- package/src/struct-serialize.ts +3 -3
- package/src/task.ts +21 -0
- package/src/try-close.ts +44 -0
- package/src/types.ts +34 -34
- package/src/wrap-readable.ts +20 -14
- package/src/wrap-writable.ts +6 -9
- package/tsconfig.build.tsbuildinfo +1 -1
- package/CHANGELOG.json +0 -86
- package/esm/decode-utf8.d.ts +0 -5
- package/esm/decode-utf8.d.ts.map +0 -1
- package/esm/decode-utf8.js +0 -12
- package/esm/decode-utf8.js.map +0 -1
- package/src/decode-utf8.ts +0 -13
package/CHANGELOG.json
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@yume-chan/stream-extra",
|
|
3
|
-
"entries": [
|
|
4
|
-
{
|
|
5
|
-
"version": "0.0.23",
|
|
6
|
-
"tag": "@yume-chan/stream-extra_v0.0.23",
|
|
7
|
-
"date": "Thu, 21 Mar 2024 03:15:10 GMT",
|
|
8
|
-
"comments": {
|
|
9
|
-
"none": [
|
|
10
|
-
{
|
|
11
|
-
"comment": "Fix `ConsumableWritableStream.write` calls `chunk.consume` twice. (doesn't cause any issue)"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"comment": "Fix `WrapWritableStream` might close the inner stream twice. (and throw an error)"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"comment": "Remove web-streams-polyfill dependency. The runtime must have global stream implementations (or you can add a polyfill yourself)."
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"version": "0.0.22",
|
|
24
|
-
"tag": "@yume-chan/stream-extra_v0.0.22",
|
|
25
|
-
"date": "Wed, 13 Dec 2023 05:57:27 GMT",
|
|
26
|
-
"comments": {}
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"version": "0.0.21",
|
|
30
|
-
"tag": "@yume-chan/stream-extra_v0.0.21",
|
|
31
|
-
"date": "Fri, 25 Aug 2023 14:05:18 GMT",
|
|
32
|
-
"comments": {
|
|
33
|
-
"none": [
|
|
34
|
-
{
|
|
35
|
-
"comment": "Replace `GatherStringStream` with `ConcatStringStream` which can be treated as a Promise"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"version": "0.0.20",
|
|
42
|
-
"tag": "@yume-chan/stream-extra_v0.0.20",
|
|
43
|
-
"date": "Mon, 05 Jun 2023 02:51:41 GMT",
|
|
44
|
-
"comments": {
|
|
45
|
-
"none": [
|
|
46
|
-
{
|
|
47
|
-
"comment": "Fix a bug where `BufferedReadableStream#release` might output duplicate data."
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"comment": "Use ECMAScript private class fields syntax (supported by Chrome 74, Firefox 90, Safari 14.1 and Node.js 12.0.0)."
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"version": "0.0.19",
|
|
57
|
-
"tag": "@yume-chan/stream-extra_v0.0.19",
|
|
58
|
-
"date": "Sun, 09 Apr 2023 05:55:33 GMT",
|
|
59
|
-
"comments": {
|
|
60
|
-
"none": [
|
|
61
|
-
{
|
|
62
|
-
"comment": "Add an option to combine small chunks into target size in `ChunkStream`, and rename it to `DistributionStream`"
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"version": "0.0.18",
|
|
69
|
-
"tag": "@yume-chan/stream-extra_v0.0.18",
|
|
70
|
-
"date": "Wed, 25 Jan 2023 21:33:49 GMT",
|
|
71
|
-
"comments": {
|
|
72
|
-
"none": [
|
|
73
|
-
{
|
|
74
|
-
"comment": "Change to load native Web Streams API implementation from `globalThis` if available"
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"version": "0.0.17",
|
|
81
|
-
"tag": "@yume-chan/stream-extra_v0.0.17",
|
|
82
|
-
"date": "Tue, 18 Oct 2022 09:32:30 GMT",
|
|
83
|
-
"comments": {}
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
}
|
package/esm/decode-utf8.d.ts
DELETED
package/esm/decode-utf8.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decode-utf8.d.ts","sourceRoot":"","sources":["../src/decode-utf8.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,qBAAa,gBAAiB,SAAQ,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC;;CAQxE"}
|
package/esm/decode-utf8.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { decodeUtf8 } from "@yume-chan/struct";
|
|
2
|
-
import { TransformStream } from "./stream.js";
|
|
3
|
-
export class DecodeUtf8Stream extends TransformStream {
|
|
4
|
-
constructor() {
|
|
5
|
-
super({
|
|
6
|
-
transform(chunk, controller) {
|
|
7
|
-
controller.enqueue(decodeUtf8(chunk));
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=decode-utf8.js.map
|
package/esm/decode-utf8.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decode-utf8.js","sourceRoot":"","sources":["../src/decode-utf8.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,OAAO,gBAAiB,SAAQ,eAAmC;IACrE;QACI,KAAK,CAAC;YACF,SAAS,CAAC,KAAK,EAAE,UAAU;gBACvB,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1C,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
|
package/src/decode-utf8.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { decodeUtf8 } from "@yume-chan/struct";
|
|
2
|
-
|
|
3
|
-
import { TransformStream } from "./stream.js";
|
|
4
|
-
|
|
5
|
-
export class DecodeUtf8Stream extends TransformStream<Uint8Array, string> {
|
|
6
|
-
constructor() {
|
|
7
|
-
super({
|
|
8
|
-
transform(chunk, controller) {
|
|
9
|
-
controller.enqueue(decodeUtf8(chunk));
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|