@statewalker/webrun-streams 0.2.2 → 0.2.3
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/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/emulate-mux.ts +2 -2
- package/src/normalize.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -188,8 +188,8 @@ const TYPE_CLOSE = 6;
|
|
|
188
188
|
const DEFAULT_MAX_STREAMS = 256;
|
|
189
189
|
const DEFAULT_MTU = 65536;
|
|
190
190
|
const DEFAULT_MAX_STREAM_BUFFER = 8388608;
|
|
191
|
-
const textEncoder = new TextEncoder();
|
|
192
|
-
const textDecoder = new TextDecoder();
|
|
191
|
+
const textEncoder = /* @__PURE__ */ new TextEncoder();
|
|
192
|
+
const textDecoder = /* @__PURE__ */ new TextDecoder();
|
|
193
193
|
function emulateMux(channel, opts = {}) {
|
|
194
194
|
const maxStreams = opts.maxStreams ?? DEFAULT_MAX_STREAMS;
|
|
195
195
|
const mtu = opts.mtu ?? DEFAULT_MTU;
|
|
@@ -736,7 +736,7 @@ async function* newAsyncGenerator(init, skipValues = false) {
|
|
|
736
736
|
}
|
|
737
737
|
//#endregion
|
|
738
738
|
//#region src/normalize.ts
|
|
739
|
-
const utf8 = new TextEncoder();
|
|
739
|
+
const utf8 = /* @__PURE__ */ new TextEncoder();
|
|
740
740
|
/**
|
|
741
741
|
* Coerce common byte-like inputs into a `Uint8Array`. Strings encode as UTF-8.
|
|
742
742
|
* Blobs return a `Promise<Uint8Array>`; every other input returns synchronously.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statewalker/webrun-streams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Async-iterator / ReadableStream primitives: collect, text/jsonl codecs, lines, backpressure generators, serialisable errors.",
|
package/src/emulate-mux.ts
CHANGED
|
@@ -33,8 +33,8 @@ const DEFAULT_MAX_STREAMS = 256;
|
|
|
33
33
|
const DEFAULT_MTU = 64 * 1024;
|
|
34
34
|
const DEFAULT_MAX_STREAM_BUFFER = 8 * 1024 * 1024;
|
|
35
35
|
|
|
36
|
-
const textEncoder = new TextEncoder();
|
|
37
|
-
const textDecoder = new TextDecoder();
|
|
36
|
+
const textEncoder = /* @__PURE__ */ new TextEncoder();
|
|
37
|
+
const textDecoder = /* @__PURE__ */ new TextDecoder();
|
|
38
38
|
|
|
39
39
|
interface Stream {
|
|
40
40
|
id: number;
|
package/src/normalize.ts
CHANGED