@paradow/ledge 0.33.0 → 0.35.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/dist/cli/index.js +39003 -46
- package/dist/cli/reduceWorker.js +2037 -0
- package/dist/ledge-guide.md +26 -49
- package/package.json +5 -1
- package/dist/cli/action-QW2ZQQBN.js +0 -27
- package/dist/cli/attach-ULTYWCJ7.js +0 -74
- package/dist/cli/bridge-CSLF7EW6.js +0 -70
- package/dist/cli/chunk-3DB3VOMM.js +0 -723
- package/dist/cli/chunk-4HXJQEUN.js +0 -118
- package/dist/cli/chunk-4VNKZOC2.js +0 -160
- package/dist/cli/chunk-6IYPRUQG.js +0 -17
- package/dist/cli/chunk-ASYAWVFW.js +0 -95
- package/dist/cli/chunk-CCSUP5ZI.js +0 -45
- package/dist/cli/chunk-CPERVAPQ.js +0 -232
- package/dist/cli/chunk-CSLVBADC.js +0 -60
- package/dist/cli/chunk-E3LXONBI.js +0 -6
- package/dist/cli/chunk-GXL3X7M7.js +0 -144
- package/dist/cli/chunk-HOOHS3MX.js +0 -39
- package/dist/cli/chunk-JEGPTNWV.js +0 -270
- package/dist/cli/chunk-K7UEKSB2.js +0 -305
- package/dist/cli/chunk-NLL2EQJ2.js +0 -94
- package/dist/cli/chunk-NWIICISV.js +0 -290
- package/dist/cli/chunk-OLLQBK6N.js +0 -41
- package/dist/cli/chunk-PZ3F4QH3.js +0 -9758
- package/dist/cli/chunk-U67V476Y.js +0 -35
- package/dist/cli/chunk-WXE2NOE5.js +0 -2674
- package/dist/cli/chunk-XOZD4BP5.js +0 -85
- package/dist/cli/daemon-5GT545BB.js +0 -2322
- package/dist/cli/decide-PFHHOCFZ.js +0 -59
- package/dist/cli/handover-EMO6JT7O.js +0 -17
- package/dist/cli/hook-W2BU74H5.js +0 -523
- package/dist/cli/launch-LP7YJR5N.js +0 -36
- package/dist/cli/send-NEI4X33R.js +0 -19
- package/dist/cli/setup-K42IVMHS.js +0 -38
- package/dist/cli/status-U2HGGKHF.js +0 -28
- package/dist/cli/task-PDDCE23D.js +0 -19
- package/dist/cli/team-S3ASP22H.js +0 -205
- package/dist/cli/tui-UPMRMCPC.js +0 -19216
- package/dist/cli/uninstall-4IMMR55T.js +0 -162
- package/dist/cli/version-LUMK3Z3T.js +0 -7
- package/dist/cli/who-NM3GPAPJ.js +0 -12
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// src/transport/frames.ts
|
|
2
|
-
var MAX_FRAME = 4 * 1024 * 1024;
|
|
3
|
-
function readFrames(input, frame, fail) {
|
|
4
|
-
let buffer = "", stopped = false;
|
|
5
|
-
input.setEncoding("utf8");
|
|
6
|
-
const data = (chunk) => {
|
|
7
|
-
if (stopped) return;
|
|
8
|
-
buffer += chunk;
|
|
9
|
-
try {
|
|
10
|
-
let i;
|
|
11
|
-
while ((i = buffer.indexOf("\n")) >= 0) {
|
|
12
|
-
const line = buffer.slice(0, i);
|
|
13
|
-
buffer = buffer.slice(i + 1);
|
|
14
|
-
if (Buffer.byteLength(line) > MAX_FRAME) throw new Error("Ledge frame too large");
|
|
15
|
-
if (line.trim()) frame(JSON.parse(line));
|
|
16
|
-
}
|
|
17
|
-
if (Buffer.byteLength(buffer) > MAX_FRAME) throw new Error("Ledge frame too large");
|
|
18
|
-
} catch (e) {
|
|
19
|
-
stopped = true;
|
|
20
|
-
fail(e instanceof Error ? e : new Error(String(e)));
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const end = () => {
|
|
24
|
-
if (!stopped && buffer.trim()) {
|
|
25
|
-
stopped = true;
|
|
26
|
-
fail(new Error("Incomplete Ledge frame"));
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
input.on("data", data);
|
|
30
|
-
input.on("end", end);
|
|
31
|
-
return () => {
|
|
32
|
-
stopped = true;
|
|
33
|
-
input.off("data", data);
|
|
34
|
-
input.off("end", end);
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export {
|
|
39
|
-
MAX_FRAME,
|
|
40
|
-
readFrames
|
|
41
|
-
};
|