@yume-chan/stream-extra 0.0.18 → 0.0.20
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.json +27 -0
- package/CHANGELOG.md +16 -1
- package/README.md +1 -1
- package/esm/buffered-transform.d.ts +10 -10
- package/esm/buffered-transform.d.ts.map +1 -1
- package/esm/buffered-transform.js +56 -55
- package/esm/buffered-transform.js.map +1 -1
- package/esm/buffered.d.ts +24 -27
- package/esm/buffered.d.ts.map +1 -1
- package/esm/buffered.js +132 -123
- package/esm/buffered.js.map +1 -1
- package/esm/consumable.d.ts +52 -0
- package/esm/consumable.d.ts.map +1 -0
- package/esm/consumable.js +178 -0
- package/esm/consumable.js.map +1 -0
- package/esm/decode-utf8.d.ts +4 -4
- package/esm/decode-utf8.js +11 -11
- package/esm/distribution.d.ts +21 -0
- package/esm/distribution.d.ts.map +1 -0
- package/esm/distribution.js +99 -0
- package/esm/distribution.js.map +1 -0
- package/esm/duplex.d.ts +44 -47
- package/esm/duplex.d.ts.map +1 -1
- package/esm/duplex.js +92 -92
- package/esm/duplex.js.map +1 -1
- package/esm/gather-string.d.ts +6 -6
- package/esm/gather-string.d.ts.map +1 -1
- package/esm/gather-string.js +15 -13
- package/esm/gather-string.js.map +1 -1
- package/esm/index.d.ts +16 -15
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +16 -15
- package/esm/index.js.map +1 -1
- package/esm/inspect.d.ts +4 -4
- package/esm/inspect.js +11 -11
- package/esm/pipe-from.d.ts +12 -11
- package/esm/pipe-from.d.ts.map +1 -1
- package/esm/pipe-from.js +23 -25
- package/esm/pipe-from.js.map +1 -1
- package/esm/push-readable.d.ts +19 -18
- package/esm/push-readable.d.ts.map +1 -1
- package/esm/push-readable.js +66 -61
- package/esm/push-readable.js.map +1 -1
- package/esm/split-string.d.ts +4 -4
- package/esm/split-string.d.ts.map +1 -1
- package/esm/split-string.js +24 -24
- package/esm/split-string.js.map +1 -1
- package/esm/stream.d.ts +25 -24
- package/esm/stream.d.ts.map +1 -1
- package/esm/stream.js +26 -26
- package/esm/stream.js.map +1 -1
- package/esm/struct-deserialize.d.ts +6 -6
- package/esm/struct-deserialize.d.ts.map +1 -1
- package/esm/struct-deserialize.js +8 -8
- package/esm/struct-serialize.d.ts +5 -5
- package/esm/struct-serialize.js +10 -10
- package/esm/wrap-readable.d.ts +21 -20
- package/esm/wrap-readable.d.ts.map +1 -1
- package/esm/wrap-readable.js +56 -56
- package/esm/wrap-readable.js.map +1 -1
- package/esm/wrap-writable.d.ts +14 -12
- package/esm/wrap-writable.d.ts.map +1 -1
- package/esm/wrap-writable.js +62 -52
- package/esm/wrap-writable.js.map +1 -1
- package/package.json +9 -8
- package/src/buffered-transform.ts +15 -22
- package/src/buffered.ts +41 -33
- package/src/consumable.ts +281 -0
- package/src/distribution.ts +113 -0
- package/src/duplex.ts +35 -34
- package/src/gather-string.ts +6 -4
- package/src/index.ts +16 -15
- package/src/inspect.ts +1 -1
- package/src/pipe-from.ts +8 -6
- package/src/push-readable.ts +12 -12
- package/src/split-string.ts +5 -2
- package/src/stream.ts +1 -1
- package/src/struct-deserialize.ts +1 -1
- package/src/wrap-readable.ts +9 -9
- package/src/wrap-writable.ts +21 -9
- package/tsconfig.build.json +6 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/esm/chunk.d.ts +0 -5
- package/esm/chunk.d.ts.map +0 -1
- package/esm/chunk.js +0 -15
- package/esm/chunk.js.map +0 -1
- package/esm/trace.d.ts +0 -16
- package/esm/trace.d.ts.map +0 -1
- package/esm/trace.js +0 -131
- package/esm/trace.js.map +0 -1
- package/src/chunk.ts +0 -15
package/esm/duplex.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duplex.js","sourceRoot":"","sources":["../src/duplex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"duplex.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A,UAAU,CAAC,KAAK,EAAE,CAAC;aACtB;YAAC,MAAM;gBACJ,SAAS;aACZ;SACJ;QAED,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC;IACpC,CAAC;CACJ"}
|
package/esm/gather-string.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { WritableStream } from "./stream.js";
|
|
2
|
-
export declare class GatherStringStream extends WritableStream<string> {
|
|
3
|
-
private
|
|
4
|
-
get result(): string;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
1
|
+
import { WritableStream } from "./stream.js";
|
|
2
|
+
export declare class GatherStringStream extends WritableStream<string> {
|
|
3
|
+
#private;
|
|
4
|
+
get result(): string;
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=gather-string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gather-string.d.ts","sourceRoot":"","sources":["../src/gather-string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,qBAAa,kBAAmB,SAAQ,cAAc,CAAC,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"gather-string.d.ts","sourceRoot":"","sources":["../src/gather-string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,qBAAa,kBAAmB,SAAQ,cAAc,CAAC,MAAM,CAAC;;IAG1D,IAAW,MAAM,WAEhB;;CASJ"}
|
package/esm/gather-string.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { WritableStream } from "./stream.js";
|
|
2
|
-
export class GatherStringStream extends WritableStream {
|
|
3
|
-
// PERF: rope (concat strings) is faster than `[].join('')`
|
|
4
|
-
|
|
5
|
-
get result() {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
1
|
+
import { WritableStream } from "./stream.js";
|
|
2
|
+
export class GatherStringStream extends WritableStream {
|
|
3
|
+
// PERF: rope (concat strings) is faster than `[].join('')`
|
|
4
|
+
#result = "";
|
|
5
|
+
get result() {
|
|
6
|
+
return this.#result;
|
|
7
|
+
}
|
|
8
|
+
constructor() {
|
|
9
|
+
super({
|
|
10
|
+
write: (chunk) => {
|
|
11
|
+
this.#result += chunk;
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
14
16
|
//# sourceMappingURL=gather-string.js.map
|
package/esm/gather-string.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gather-string.js","sourceRoot":"","sources":["../src/gather-string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,OAAO,kBAAmB,SAAQ,cAAsB;IAC1D,2DAA2D;
|
|
1
|
+
{"version":3,"file":"gather-string.js","sourceRoot":"","sources":["../src/gather-string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,OAAO,kBAAmB,SAAQ,cAAsB;IAC1D,2DAA2D;IAC3D,OAAO,GAAG,EAAE,CAAC;IACb,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;QACI,KAAK,CAAC;YACF,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACb,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC;YAC1B,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
|
package/esm/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
1
|
+
export * from "./buffered-transform.js";
|
|
2
|
+
export * from "./buffered.js";
|
|
3
|
+
export * from "./consumable.js";
|
|
4
|
+
export * from "./decode-utf8.js";
|
|
5
|
+
export * from "./distribution.js";
|
|
6
|
+
export * from "./duplex.js";
|
|
7
|
+
export * from "./gather-string.js";
|
|
8
|
+
export * from "./inspect.js";
|
|
9
|
+
export * from "./pipe-from.js";
|
|
10
|
+
export * from "./push-readable.js";
|
|
11
|
+
export * from "./split-string.js";
|
|
12
|
+
export * from "./stream.js";
|
|
13
|
+
export * from "./struct-deserialize.js";
|
|
14
|
+
export * from "./struct-serialize.js";
|
|
15
|
+
export * from "./wrap-readable.js";
|
|
16
|
+
export * from "./wrap-writable.js";
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
package/esm/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
1
|
+
export * from "./buffered-transform.js";
|
|
2
|
+
export * from "./buffered.js";
|
|
3
|
+
export * from "./consumable.js";
|
|
4
|
+
export * from "./decode-utf8.js";
|
|
5
|
+
export * from "./distribution.js";
|
|
6
|
+
export * from "./duplex.js";
|
|
7
|
+
export * from "./gather-string.js";
|
|
8
|
+
export * from "./inspect.js";
|
|
9
|
+
export * from "./pipe-from.js";
|
|
10
|
+
export * from "./push-readable.js";
|
|
11
|
+
export * from "./split-string.js";
|
|
12
|
+
export * from "./stream.js";
|
|
13
|
+
export * from "./struct-deserialize.js";
|
|
14
|
+
export * from "./struct-serialize.js";
|
|
15
|
+
export * from "./wrap-readable.js";
|
|
16
|
+
export * from "./wrap-writable.js";
|
|
16
17
|
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
package/esm/inspect.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TransformStream } from "./stream.js";
|
|
2
|
-
export declare class InspectStream<T> extends TransformStream<T, T> {
|
|
3
|
-
constructor(callback: (value: T) => void);
|
|
4
|
-
}
|
|
1
|
+
import { TransformStream } from "./stream.js";
|
|
2
|
+
export declare class InspectStream<T> extends TransformStream<T, T> {
|
|
3
|
+
constructor(callback: (value: T) => void);
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=inspect.d.ts.map
|
package/esm/inspect.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { TransformStream } from "./stream.js";
|
|
2
|
-
export class InspectStream extends TransformStream {
|
|
3
|
-
constructor(callback) {
|
|
4
|
-
super({
|
|
5
|
-
transform(chunk, controller) {
|
|
6
|
-
callback(chunk);
|
|
7
|
-
controller.enqueue(chunk);
|
|
8
|
-
}
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
import { TransformStream } from "./stream.js";
|
|
2
|
+
export class InspectStream extends TransformStream {
|
|
3
|
+
constructor(callback) {
|
|
4
|
+
super({
|
|
5
|
+
transform(chunk, controller) {
|
|
6
|
+
callback(chunk);
|
|
7
|
+
controller.enqueue(chunk);
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
12
|
//# sourceMappingURL=inspect.js.map
|
package/esm/pipe-from.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @param
|
|
9
|
-
* @
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import type { ReadableWritablePair } from "./stream.js";
|
|
2
|
+
import { WritableStream } from "./stream.js";
|
|
3
|
+
/**
|
|
4
|
+
* Pipe `pair.readable` to `writable`, then returns `pair.writable`.
|
|
5
|
+
*
|
|
6
|
+
* This is the opposite of `ReadableStream#pipeThrough()`.
|
|
7
|
+
*
|
|
8
|
+
* @param writable The `WritableStream` to write to.
|
|
9
|
+
* @param pair A `TransformStream` that converts chunks.
|
|
10
|
+
* @returns `pair`'s `writable` stream.
|
|
11
|
+
*/
|
|
12
|
+
export declare function pipeFrom<W, T>(writable: WritableStream<W>, pair: ReadableWritablePair<W, T>): import("web-streams-polyfill").WritableStream<T>;
|
|
12
13
|
//# sourceMappingURL=pipe-from.d.ts.map
|
package/esm/pipe-from.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe-from.d.ts","sourceRoot":"","sources":["../src/pipe-from.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"pipe-from.d.ts","sourceRoot":"","sources":["../src/pipe-from.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EACzB,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,EAC3B,IAAI,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,oDAanC"}
|
package/esm/pipe-from.js
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import { WritableStream } from "./stream.js";
|
|
2
|
-
/**
|
|
3
|
-
* Pipe `pair.readable` to `writable`, then returns `pair.writable`.
|
|
4
|
-
*
|
|
5
|
-
* This is the opposite of `ReadableStream#pipeThrough()`.
|
|
6
|
-
*
|
|
7
|
-
* @param writable The `WritableStream` to write to.
|
|
8
|
-
* @param pair A `TransformStream` that converts chunks.
|
|
9
|
-
* @returns `pair`'s `writable` stream.
|
|
10
|
-
*/
|
|
11
|
-
export function pipeFrom(writable, pair) {
|
|
12
|
-
const writer = pair.writable.getWriter();
|
|
13
|
-
const pipe = pair.readable
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
}
|
|
1
|
+
import { WritableStream } from "./stream.js";
|
|
2
|
+
/**
|
|
3
|
+
* Pipe `pair.readable` to `writable`, then returns `pair.writable`.
|
|
4
|
+
*
|
|
5
|
+
* This is the opposite of `ReadableStream#pipeThrough()`.
|
|
6
|
+
*
|
|
7
|
+
* @param writable The `WritableStream` to write to.
|
|
8
|
+
* @param pair A `TransformStream` that converts chunks.
|
|
9
|
+
* @returns `pair`'s `writable` stream.
|
|
10
|
+
*/
|
|
11
|
+
export function pipeFrom(writable, pair) {
|
|
12
|
+
const writer = pair.writable.getWriter();
|
|
13
|
+
const pipe = pair.readable.pipeTo(writable);
|
|
14
|
+
return new WritableStream({
|
|
15
|
+
async write(chunk) {
|
|
16
|
+
await writer.write(chunk);
|
|
17
|
+
},
|
|
18
|
+
async close() {
|
|
19
|
+
await writer.close();
|
|
20
|
+
await pipe;
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
26
24
|
//# sourceMappingURL=pipe-from.js.map
|
package/esm/pipe-from.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe-from.js","sourceRoot":"","sources":["../src/pipe-from.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pipe-from.js","sourceRoot":"","sources":["../src/pipe-from.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CACpB,QAA2B,EAC3B,IAAgC;IAEhC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,IAAI,cAAc,CAAI;QACzB,KAAK,CAAC,KAAK,CAAC,KAAK;YACb,MAAM,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;QACD,KAAK,CAAC,KAAK;YACP,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;YACrB,MAAM,IAAI,CAAC;QACf,CAAC;KACJ,CAAC,CAAC;AACP,CAAC"}
|
package/esm/push-readable.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import type { AbortSignal, QueuingStrategy } from "./stream.js";
|
|
2
|
+
import { ReadableStream } from "./stream.js";
|
|
3
|
+
export interface PushReadableStreamController<T> {
|
|
4
|
+
abortSignal: AbortSignal;
|
|
5
|
+
enqueue(chunk: T): Promise<void>;
|
|
6
|
+
close(): void;
|
|
7
|
+
error(e?: unknown): void;
|
|
8
|
+
}
|
|
9
|
+
export type PushReadableStreamSource<T> = (controller: PushReadableStreamController<T>) => void | Promise<void>;
|
|
10
|
+
export declare class PushReadableStream<T> extends ReadableStream<T> {
|
|
11
|
+
/**
|
|
12
|
+
* Create a new `PushReadableStream` from a source.
|
|
13
|
+
*
|
|
14
|
+
* @param source If `source` returns a `Promise`, the stream will be closed
|
|
15
|
+
* when the `Promise` is resolved, and be errored when the `Promise` is rejected.
|
|
16
|
+
* @param strategy
|
|
17
|
+
*/
|
|
18
|
+
constructor(source: PushReadableStreamSource<T>, strategy?: QueuingStrategy<T>);
|
|
19
|
+
}
|
|
19
20
|
//# sourceMappingURL=push-readable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-readable.d.ts","sourceRoot":"","sources":["../src/push-readable.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"push-readable.d.ts","sourceRoot":"","sources":["../src/push-readable.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAmB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,4BAA4B,CAAC,CAAC;IAC3C,WAAW,EAAE,WAAW,CAAC;IAEzB,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC,KAAK,IAAI,IAAI,CAAC;IAEd,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI,CACtC,UAAU,EAAE,4BAA4B,CAAC,CAAC,CAAC,KAC1C,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE1B,qBAAa,kBAAkB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IACxD;;;;;;OAMG;gBAEC,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,EACnC,QAAQ,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;CAmEpC"}
|
package/esm/push-readable.js
CHANGED
|
@@ -1,62 +1,67 @@
|
|
|
1
|
-
import { PromiseResolver } from "@yume-chan/async";
|
|
2
|
-
import { AbortController, ReadableStream
|
|
3
|
-
export class PushReadableStream extends ReadableStream {
|
|
4
|
-
/**
|
|
5
|
-
* Create a new `PushReadableStream` from a source.
|
|
6
|
-
*
|
|
7
|
-
* @param source If `source` returns a `Promise`, the stream will be closed
|
|
8
|
-
* when the `Promise` is resolved, and be errored when the `Promise` is rejected.
|
|
9
|
-
* @param strategy
|
|
10
|
-
*/
|
|
11
|
-
constructor(source, strategy) {
|
|
12
|
-
let waterMarkLow;
|
|
13
|
-
const
|
|
14
|
-
super({
|
|
15
|
-
start: (controller) => {
|
|
16
|
-
const result = source({
|
|
17
|
-
abortSignal:
|
|
18
|
-
async enqueue(chunk) {
|
|
19
|
-
if (
|
|
20
|
-
// If the stream is already cancelled,
|
|
21
|
-
// throw immediately.
|
|
22
|
-
throw (
|
|
23
|
-
new Error("Aborted"));
|
|
24
|
-
}
|
|
25
|
-
// Only when the stream is errored, `desiredSize` will be `null`.
|
|
26
|
-
// But since `null <= 0` is `true`
|
|
27
|
-
// (`null <= 0` is evaluated as `!(null > 0)` => `!false` => `true`),
|
|
28
|
-
// not handling it will cause a deadlock.
|
|
29
|
-
if ((controller.desiredSize ?? 1) <= 0) {
|
|
30
|
-
waterMarkLow = new PromiseResolver();
|
|
31
|
-
await waterMarkLow.promise;
|
|
32
|
-
}
|
|
33
|
-
// `controller.enqueue` will throw error for us
|
|
34
|
-
// if the stream is already errored.
|
|
35
|
-
controller.enqueue(chunk);
|
|
36
|
-
},
|
|
37
|
-
close() {
|
|
38
|
-
controller.close();
|
|
39
|
-
},
|
|
40
|
-
error(e) {
|
|
41
|
-
controller.error(e);
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
if (result && "then" in result) {
|
|
45
|
-
result.then(() => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
1
|
+
import { PromiseResolver } from "@yume-chan/async";
|
|
2
|
+
import { AbortController, ReadableStream } from "./stream.js";
|
|
3
|
+
export class PushReadableStream extends ReadableStream {
|
|
4
|
+
/**
|
|
5
|
+
* Create a new `PushReadableStream` from a source.
|
|
6
|
+
*
|
|
7
|
+
* @param source If `source` returns a `Promise`, the stream will be closed
|
|
8
|
+
* when the `Promise` is resolved, and be errored when the `Promise` is rejected.
|
|
9
|
+
* @param strategy
|
|
10
|
+
*/
|
|
11
|
+
constructor(source, strategy) {
|
|
12
|
+
let waterMarkLow;
|
|
13
|
+
const abortController = new AbortController();
|
|
14
|
+
super({
|
|
15
|
+
start: (controller) => {
|
|
16
|
+
const result = source({
|
|
17
|
+
abortSignal: abortController.signal,
|
|
18
|
+
async enqueue(chunk) {
|
|
19
|
+
if (abortController.signal.aborted) {
|
|
20
|
+
// If the stream is already cancelled,
|
|
21
|
+
// throw immediately.
|
|
22
|
+
throw (abortController.signal.reason ??
|
|
23
|
+
new Error("Aborted"));
|
|
24
|
+
}
|
|
25
|
+
// Only when the stream is errored, `desiredSize` will be `null`.
|
|
26
|
+
// But since `null <= 0` is `true`
|
|
27
|
+
// (`null <= 0` is evaluated as `!(null > 0)` => `!false` => `true`),
|
|
28
|
+
// not handling it will cause a deadlock.
|
|
29
|
+
if ((controller.desiredSize ?? 1) <= 0) {
|
|
30
|
+
waterMarkLow = new PromiseResolver();
|
|
31
|
+
await waterMarkLow.promise;
|
|
32
|
+
}
|
|
33
|
+
// `controller.enqueue` will throw error for us
|
|
34
|
+
// if the stream is already errored.
|
|
35
|
+
controller.enqueue(chunk);
|
|
36
|
+
},
|
|
37
|
+
close() {
|
|
38
|
+
controller.close();
|
|
39
|
+
},
|
|
40
|
+
error(e) {
|
|
41
|
+
controller.error(e);
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
if (result && "then" in result) {
|
|
45
|
+
result.then(() => {
|
|
46
|
+
try {
|
|
47
|
+
controller.close();
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
// controller already closed
|
|
51
|
+
}
|
|
52
|
+
}, (e) => {
|
|
53
|
+
controller.error(e);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
pull: () => {
|
|
58
|
+
waterMarkLow?.resolve();
|
|
59
|
+
},
|
|
60
|
+
cancel: (reason) => {
|
|
61
|
+
abortController.abort(reason);
|
|
62
|
+
waterMarkLow?.reject(reason);
|
|
63
|
+
},
|
|
64
|
+
}, strategy);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
62
67
|
//# sourceMappingURL=push-readable.js.map
|
package/esm/push-readable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-readable.js","sourceRoot":"","sources":["../src/push-readable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"push-readable.js","sourceRoot":"","sources":["../src/push-readable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAgB9D,MAAM,OAAO,kBAAsB,SAAQ,cAAiB;IACxD;;;;;;OAMG;IACH,YACI,MAAmC,EACnC,QAA6B;QAE7B,IAAI,YAA+C,CAAC;QACpD,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;QAE9C,KAAK,CACD;YACI,KAAK,EAAE,CAAC,UAAU,EAAE,EAAE;gBAClB,MAAM,MAAM,GAAG,MAAM,CAAC;oBAClB,WAAW,EAAE,eAAe,CAAC,MAAM;oBACnC,KAAK,CAAC,OAAO,CAAC,KAAK;wBACf,IAAI,eAAe,CAAC,MAAM,CAAC,OAAO,EAAE;4BAChC,sCAAsC;4BACtC,qBAAqB;4BACrB,MAAM,CACF,eAAe,CAAC,MAAM,CA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"./stream.js";
|
|
2
|
-
export declare class SplitStringStream extends TransformStream<string, string> {
|
|
3
|
-
constructor(separator: string);
|
|
4
|
-
}
|
|
1
|
+
import { TransformStream } from "./stream.js";
|
|
2
|
+
export declare class SplitStringStream extends TransformStream<string, string> {
|
|
3
|
+
constructor(separator: string);
|
|
4
|
+
}
|
|
5
5
|
//# sourceMappingURL=split-string.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-string.d.ts","sourceRoot":"","sources":["../src/split-string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"split-string.d.ts","sourceRoot":"","sources":["../src/split-string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAqB9C,qBAAa,iBAAkB,SAAQ,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC;gBAC/C,SAAS,EAAE,MAAM;CASvC"}
|
package/esm/split-string.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { TransformStream } from "./stream.js";
|
|
2
|
-
function* split(input, separator) {
|
|
3
|
-
let start = 0;
|
|
4
|
-
while (true) {
|
|
5
|
-
const index = input.indexOf(separator, start);
|
|
6
|
-
if (index === -1) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
const part = input.substring(start, index);
|
|
10
|
-
yield part;
|
|
11
|
-
start = index + 1;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export class SplitStringStream extends TransformStream {
|
|
15
|
-
constructor(separator) {
|
|
16
|
-
super({
|
|
17
|
-
transform(chunk, controller) {
|
|
18
|
-
for (const part of split(chunk, separator)) {
|
|
19
|
-
controller.enqueue(part);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
import { TransformStream } from "./stream.js";
|
|
2
|
+
function* split(input, separator) {
|
|
3
|
+
let start = 0;
|
|
4
|
+
while (true) {
|
|
5
|
+
const index = input.indexOf(separator, start);
|
|
6
|
+
if (index === -1) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const part = input.substring(start, index);
|
|
10
|
+
yield part;
|
|
11
|
+
start = index + 1;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class SplitStringStream extends TransformStream {
|
|
15
|
+
constructor(separator) {
|
|
16
|
+
super({
|
|
17
|
+
transform(chunk, controller) {
|
|
18
|
+
for (const part of split(chunk, separator)) {
|
|
19
|
+
controller.enqueue(part);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
25
|
//# sourceMappingURL=split-string.js.map
|
package/esm/split-string.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-string.js","sourceRoot":"","sources":["../src/split-string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,QAAQ,CAAC,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"split-string.js","sourceRoot":"","sources":["../src/split-string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,QAAQ,CAAC,CAAC,KAAK,CACX,KAAa,EACb,SAAiB;IAEjB,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,OAAO,IAAI,EAAE;QACT,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC9C,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YACd,OAAO;SACV;QAED,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC3C,MAAM,IAAI,CAAC;QAEX,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;KACrB;AACL,CAAC;AAED,MAAM,OAAO,iBAAkB,SAAQ,eAA+B;IAClE,YAAmB,SAAiB;QAChC,KAAK,CAAC;YACF,SAAS,CAAC,KAAK,EAAE,UAAU;gBACvB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;oBACxC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iBAC5B;YACL,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
|
package/esm/stream.d.ts
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
1
|
+
import type { AbortSignal } from "web-streams-polyfill";
|
|
2
|
+
import { ReadableStream as ReadableStreamPolyfill, TransformStream as TransformStreamPolyfill, WritableStream as WritableStreamPolyfill } from "web-streams-polyfill";
|
|
3
|
+
export * from "web-streams-polyfill";
|
|
4
|
+
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
|
|
5
|
+
export interface AbortController {
|
|
6
|
+
/**
|
|
7
|
+
* Returns the AbortSignal object associated with this object.
|
|
8
|
+
*/
|
|
9
|
+
readonly signal: AbortSignal;
|
|
10
|
+
/**
|
|
11
|
+
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
|
|
12
|
+
*/
|
|
13
|
+
abort(reason?: any): void;
|
|
14
|
+
}
|
|
15
|
+
interface AbortControllerConstructor {
|
|
16
|
+
prototype: AbortController;
|
|
17
|
+
new (): AbortController;
|
|
18
|
+
}
|
|
19
|
+
export declare const AbortController: AbortControllerConstructor;
|
|
20
|
+
export type ReadableStream<R = any> = ReadableStreamPolyfill<R>;
|
|
21
|
+
export declare let ReadableStream: typeof ReadableStreamPolyfill;
|
|
22
|
+
export type WritableStream<W = any> = WritableStreamPolyfill<W>;
|
|
23
|
+
export declare let WritableStream: typeof WritableStreamPolyfill;
|
|
24
|
+
export type TransformStream<I = any, O = any> = TransformStreamPolyfill<I, O>;
|
|
25
|
+
export declare let TransformStream: typeof TransformStreamPolyfill;
|
|
25
26
|
//# sourceMappingURL=stream.d.ts.map
|
package/esm/stream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,IAAI,sBAAsB,EACxC,eAAe,IAAI,uBAAuB,EAC1C,cAAc,IAAI,sBAAsB,
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACH,cAAc,IAAI,sBAAsB,EACxC,eAAe,IAAI,uBAAuB,EAC1C,cAAc,IAAI,sBAAsB,EAC3C,MAAM,sBAAsB,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AAErC,iGAAiG;AACjG,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAE7B;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;CAC7B;AAED,UAAU,0BAA0B;IAChC,SAAS,EAAE,eAAe,CAAC;IAC3B,QAAQ,eAAe,CAAC;CAC3B;AAWD,eAAO,MAAM,eAAe,4BAAyB,CAAC;AAEtD,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,GAAG,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAChE,eAAO,IAAI,cAAc,+BAAyB,CAAC;AAEnD,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,GAAG,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAChE,eAAO,IAAI,cAAc,+BAAyB,CAAC;AAEnD,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9E,eAAO,IAAI,eAAe,gCAA0B,CAAC"}
|