@poe-platform/safe-bash 0.1.798 → 0.1.799
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/README.md +2 -1
- package/dist/safe-bash/chunks/{chunk-XH26YVGW.js → chunk-AZAJJVFX.js} +1 -11
- package/dist/safe-bash/chunks/{chunk-CSNXID73.js → chunk-SPYL72GN.js} +1 -25
- package/dist/safe-bash/chunks/{chunk-AMTCC256.js → chunk-TRVGCN3U.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-V3VEATEA.js → chunk-WUNK5NXJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JG5W2ENK.js → chunk-43GSSUAY.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OAJUAAWH.js → chunk-464RVBGB.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-25BLI6S6.js → chunk-4Y3WVMK4.js} +1 -14
- package/dist/safe-bash/command-chunks/{chunk-SSBFTMVI.js → chunk-4ZALPDBV.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-YMQKVEIF.js → chunk-52PCQXD2.js} +2 -13
- package/dist/safe-bash/command-chunks/{chunk-ZCKDQGKY.js → chunk-5HDSFHGW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JHVZYB4R.js → chunk-5MPOQ6V3.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AUAF5YBT.js → chunk-5WPI42ZW.js} +0 -7
- package/dist/safe-bash/command-chunks/{chunk-PPOIPMY4.js → chunk-5ZSM4UFN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RECJB2BO.js → chunk-7BS66BXN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-GRWOVSFK.js → chunk-7D7JRRML.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-E6IYUYVA.js → chunk-7L24L4UO.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HBXQWTJR.js → chunk-A5ZAV6DO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LW34AKDM.js → chunk-AB4MXHVS.js} +4 -14
- package/dist/safe-bash/command-chunks/{chunk-EELNLEEP.js → chunk-AXK3H4PX.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-Y55OCH37.js → chunk-AYUTO323.js} +3 -10
- package/dist/safe-bash/command-chunks/{chunk-DY36FDDC.js → chunk-B5BKA5WH.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-YB6KVU6H.js → chunk-BDBVVZY6.js} +4 -14
- package/dist/safe-bash/command-chunks/{chunk-QAN7KKDZ.js → chunk-BZDDAPSV.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-HZCPWYWA.js → chunk-BZPAWTUL.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RT2J5ATD.js → chunk-CPPGTBZF.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JEPY4UY4.js → chunk-EIVW3X3N.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-QGVOS3EY.js → chunk-HFII3QYO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5EWTQJSC.js → chunk-HHP343KT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5UA3BEGA.js → chunk-I3K5RYU4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4MS5WZJC.js → chunk-IKS2YXZQ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-CZVBYCB5.js → chunk-IL53SJL4.js} +2 -12
- package/dist/safe-bash/command-chunks/{chunk-HLMUPSM6.js → chunk-JCNNOMBV.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-2LLZBNLL.js → chunk-JWE54GHQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QLDIP3OP.js → chunk-JZSNU2MY.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-2HOESGFJ.js → chunk-KMCZ6P4O.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-U3ONEICA.js → chunk-KVFCSLKK.js} +1 -11
- package/dist/safe-bash/command-chunks/{chunk-THS4YAKG.js → chunk-LLCXZKZ6.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-3TANKHBX.js → chunk-MRW5HD2D.js} +1 -6
- package/dist/safe-bash/command-chunks/{chunk-3WKA57FA.js → chunk-N5FGCXQJ.js} +1 -9
- package/dist/safe-bash/command-chunks/{chunk-ULZ7HIZP.js → chunk-NETECMOF.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2Q7UQ7R4.js → chunk-OPUJSTHS.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-HVI6ALJF.js → chunk-PFAADCB5.js} +2 -4
- package/dist/safe-bash/command-chunks/{chunk-JXU2N6GN.js → chunk-Q7Q5GM5S.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-Z5TFSVNU.js → chunk-QAKKSRNV.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KAHH4XOU.js → chunk-QNXI2UP6.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WYOL5JNT.js → chunk-SX2X3IH4.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-WBJKOTSP.js → chunk-UI32HWGS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AC6X7Q4I.js → chunk-VVI4Z73I.js} +1 -8
- package/dist/safe-bash/command-chunks/{chunk-JCVXAX2G.js → chunk-XWZBMJ5B.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-23XLM73P.js → chunk-YEOPI5SK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-PRCT7FKJ.js → chunk-YZ5SVZFD.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OGUMMTTD.js → chunk-ZJBR5Q5I.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-VZ64JXHC.js → chunk-ZS3QPNUL.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VKQCNX32.js → chunk-ZT4KSS2V.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-6N5V4VBN.js → chunk-ZXKW7SJ2.js} +2 -2
- package/dist/safe-bash/commands/diff-patch/shared.d.ts +0 -2
- package/dist/safe-bash/commands/diff-patch/shared.js +2 -11
- package/dist/safe-bash/commands/text.js +1 -25
- package/dist/safe-bash/full-core.browser.js +4 -4
- package/dist/safe-bash/opt-in/commands/dd/index.js +4 -13
- package/dist/safe-bash/opt-in/commands/yq/native-work.js +2 -1
- package/dist/safe-bash/opt-in/optional/commands/shuf/input.js +3 -21
- package/dist/safe-bash/opt-in/optional/commands/shuf/shuf.js +4 -27
- package/dist/safe-bash/plugins/index.browser.js +3 -3
- package/dist/safe-bash/registry-entry.browser.js +2 -2
- package/dist/safe-bash/shell-entry.browser.js +2 -2
- package/dist/safe-bash-command-dd/index.js +4 -13
- package/dist/safe-bash-command-du/budget.d.ts +0 -2
- package/dist/safe-bash-command-du/budget.js +1 -1
- package/dist/safe-bash-command-du/du.js +2 -2
- package/dist/safe-bash-command-du/index.js +2 -2
- package/dist/safe-bash-command-file/index.js +1 -1
- package/dist/safe-bash-command-file/shared.d.ts +0 -2
- package/dist/safe-bash-command-file/shared.js +1 -1
- package/dist/safe-bash-command-fmt/index.js +3 -15
- package/dist/safe-bash-command-html-to-markdown/budget.d.ts +0 -3
- package/dist/safe-bash-command-html-to-markdown/budget.js +1 -1
- package/dist/safe-bash-command-html-to-markdown/entities.js +3 -3
- package/dist/safe-bash-command-html-to-markdown/index.js +6 -6
- package/dist/safe-bash-command-html-to-markdown/input.js +5 -5
- package/dist/safe-bash-command-html-to-markdown/parser.js +4 -4
- package/dist/safe-bash-command-html-to-markdown/render.js +5 -5
- package/dist/safe-bash-command-html-to-markdown/text.js +2 -2
- package/dist/safe-bash-command-iconv/command.js +5 -5
- package/dist/safe-bash-command-iconv/index.js +5 -5
- package/dist/safe-bash-command-iconv/internal.d.ts +0 -2
- package/dist/safe-bash-command-iconv/internal.js +1 -1
- package/dist/safe-bash-command-iconv/lifecycle.js +2 -2
- package/dist/safe-bash-command-iconv/options.js +2 -2
- package/dist/safe-bash-command-iconv/reader.js +2 -2
- package/dist/safe-bash-command-numfmt/index.js +4 -18
- package/dist/safe-bash-command-pr/command.js +5 -5
- package/dist/safe-bash-command-pr/format.js +2 -2
- package/dist/safe-bash-command-pr/index.js +5 -5
- package/dist/safe-bash-command-pr/internal.d.ts +0 -2
- package/dist/safe-bash-command-pr/internal.js +1 -1
- package/dist/safe-bash-command-pr/io.js +2 -2
- package/dist/safe-bash-command-pr/options.js +2 -2
- package/dist/safe-bash-command-shuf/input.js +3 -21
- package/dist/safe-bash-command-shuf/shuf.js +4 -27
- package/dist/safe-bash-command-split/index.js +3 -3
- package/dist/safe-bash-command-split/io.d.ts +0 -2
- package/dist/safe-bash-command-split/io.js +1 -1
- package/dist/safe-bash-command-split/outputs.js +2 -2
- package/dist/safe-bash-command-split/split.js +3 -3
- package/dist/safe-bash-command-tree/arguments.js +3 -3
- package/dist/safe-bash-command-tree/charset.js +1 -1
- package/dist/safe-bash-command-tree/index.js +4 -4
- package/dist/safe-bash-command-tree/io.d.ts +0 -1
- package/dist/safe-bash-command-tree/io.js +1 -1
- package/dist/safe-bash-command-tree/pattern.js +2 -2
- package/dist/safe-bash-command-tree/tree.js +4 -4
- package/dist/safe-bash-command-tsort/command.js +4 -4
- package/dist/safe-bash-command-tsort/graph.js +2 -2
- package/dist/safe-bash-command-tsort/index.js +4 -4
- package/dist/safe-bash-command-tsort/internal.d.ts +0 -2
- package/dist/safe-bash-command-tsort/internal.js +1 -1
- package/dist/safe-bash-command-tsort/io.js +2 -2
- package/dist/safe-bash-command-yq/native-work.js +2 -1
- package/dist/safe-bash-io-engine/commands/archive/internal.d.ts +0 -1
- package/dist/safe-bash-io-engine/commands/archive/internal.js +3 -7
- package/dist/safe-bash-io-engine/shell/pattern.js +1 -1
- package/dist/safe-bash-io-engine/shell/string-operations.d.ts +0 -2
- package/dist/safe-bash-io-engine/shell/string-operations.js +1 -1
- package/dist/safe-bash-line-ending-engine/internal.d.ts +0 -2
- package/dist/safe-bash-line-ending-engine/internal.js +1 -9
- package/dist/safe-bash-query-engine/capture.js +5 -5
- package/dist/safe-bash-query-engine/dates.js +2 -2
- package/dist/safe-bash-query-engine/delpaths.js +5 -5
- package/dist/safe-bash-query-engine/formats.js +3 -3
- package/dist/safe-bash-query-engine/index.js +15 -15
- package/dist/safe-bash-query-engine/indices.js +5 -5
- package/dist/safe-bash-query-engine/input.js +2 -2
- package/dist/safe-bash-query-engine/interpreter.js +13 -13
- package/dist/safe-bash-query-engine/limits.js +1 -1
- package/dist/safe-bash-query-engine/parser.js +2 -2
- package/dist/safe-bash-query-engine/query-core.js +15 -15
- package/dist/safe-bash-query-engine/recurse.js +2 -2
- package/dist/safe-bash-query-engine/regex.js +5 -5
- package/dist/safe-bash-query-engine/split.js +2 -2
- package/dist/safe-bash-query-engine/splits.js +6 -6
- package/dist/safe-bash-query-engine/values.js +4 -4
- package/dist/safe-bash-regex-engine/ere/limits.d.ts +0 -1
- package/dist/safe-bash-regex-engine/ere/limits.js +1 -1
- package/dist/safe-bash-regex-engine/ere/matcher.js +5 -5
- package/dist/safe-bash-regex-engine/ere/syntax.js +2 -2
- package/dist/safe-bash-regex-engine/execution/bounded-provider.js +2 -4
- package/dist/safe-bash-text-stream-engine/stream-format/shared.d.ts +0 -2
- package/dist/safe-bash-text-stream-engine/stream-format/shared.js +1 -9
- package/dist/safe-bash-xml-engine/document.js +2 -2
- package/dist/safe-bash-xml-engine/index.js +3 -3
- package/dist/safe-bash-xml-engine/io.js +1 -1
- package/dist/safe-bash-xml-engine/limits.d.ts +0 -2
- package/dist/safe-bash-xml-engine/limits.js +1 -1
- package/dist/safe-bash-xml-engine/query.js +2 -2
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Formatter
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-QAKKSRNV.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-N5FGCXQJ.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
6
6
|
export {
|
|
7
7
|
Formatter
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPrCommand
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-B5BKA5WH.js";
|
|
4
4
|
import {
|
|
5
5
|
Formatter
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-QAKKSRNV.js";
|
|
7
7
|
import {
|
|
8
8
|
Lifecycle,
|
|
9
9
|
Reader
|
|
10
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
10
|
+
} from "../safe-bash/command-chunks/chunk-QNXI2UP6.js";
|
|
11
11
|
import {
|
|
12
12
|
parseOptions
|
|
13
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
13
|
+
} from "../safe-bash/command-chunks/chunk-CPPGTBZF.js";
|
|
14
14
|
import {
|
|
15
15
|
Budget,
|
|
16
16
|
settings
|
|
17
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
17
|
+
} from "../safe-bash/command-chunks/chunk-N5FGCXQJ.js";
|
|
18
18
|
import {
|
|
19
19
|
init_buffer
|
|
20
20
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
Lifecycle,
|
|
3
3
|
Reader,
|
|
4
4
|
fsDetail
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-QNXI2UP6.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-N5FGCXQJ.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
8
|
export {
|
|
9
9
|
Lifecycle,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseOptions
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-CPPGTBZF.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-N5FGCXQJ.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
6
6
|
export {
|
|
7
7
|
parseOptions
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FsError, readBytes } from "../safe-bash-contracts/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { yieldTurn } from "../safe-bash-contracts/yield.js";
|
|
3
3
|
import { Diagnostic } from "./args.js";
|
|
4
4
|
export function virtualPath(cwd, name) {
|
|
5
5
|
if (name === "")
|
|
@@ -173,8 +173,6 @@ export async function* records(source, delimiter, limit, signal) {
|
|
|
173
173
|
let pending = new Uint8Array(Math.min(256, limit));
|
|
174
174
|
let used = 0;
|
|
175
175
|
let scanned = 0;
|
|
176
|
-
let lastYield = monotonicNow();
|
|
177
|
-
let yieldChecks = 0;
|
|
178
176
|
for await (const rawChunk of source) {
|
|
179
177
|
const chunk = Uint8Array.prototype.slice.call(rawChunk);
|
|
180
178
|
let start = 0;
|
|
@@ -205,14 +203,7 @@ export async function* records(source, delimiter, limit, signal) {
|
|
|
205
203
|
}
|
|
206
204
|
}
|
|
207
205
|
if (++scanned % 8192 === 0) {
|
|
208
|
-
|
|
209
|
-
await yieldTurn(signal);
|
|
210
|
-
lastYield = monotonicNow();
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
runYieldCheckpoint(signal);
|
|
214
|
-
signal.throwIfAborted();
|
|
215
|
-
}
|
|
206
|
+
await yieldTurn(signal);
|
|
216
207
|
}
|
|
217
208
|
}
|
|
218
209
|
}
|
|
@@ -230,8 +221,6 @@ export async function readAllRecords(source, delimiter, maxBytes, maxRecords, si
|
|
|
230
221
|
let used = 0;
|
|
231
222
|
let scanned = 0;
|
|
232
223
|
let totalBytes = 0;
|
|
233
|
-
let lastYield = monotonicNow();
|
|
234
|
-
let yieldChecks = 0;
|
|
235
224
|
for await (const rawChunk of source) {
|
|
236
225
|
const chunk = Uint8Array.prototype.slice.call(rawChunk);
|
|
237
226
|
let start = 0;
|
|
@@ -271,14 +260,7 @@ export async function readAllRecords(source, delimiter, maxBytes, maxRecords, si
|
|
|
271
260
|
}
|
|
272
261
|
}
|
|
273
262
|
if (++scanned % 8192 === 0) {
|
|
274
|
-
|
|
275
|
-
if (++yieldChecks % 16 === 0 || hasYieldCheckpoint(signal) || now - lastYield >= 16) {
|
|
276
|
-
await yieldTurn(signal);
|
|
277
|
-
lastYield = monotonicNow();
|
|
278
|
-
}
|
|
279
|
-
else {
|
|
280
|
-
runYieldCheckpoint(signal);
|
|
281
|
-
}
|
|
263
|
+
await yieldTurn(signal);
|
|
282
264
|
}
|
|
283
265
|
}
|
|
284
266
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { builtInDirectContextExecutors, commandRuntimeIdentity, createBufferedOutput, getCommandArguments, isFsError, writeBytes, } from "../safe-bash-contracts/index.js";
|
|
2
2
|
import { openFileOutput } from "./filesystem-output.js";
|
|
3
|
-
import {
|
|
3
|
+
import { inheritYieldCheckpoint, yieldTurn } from "../safe-bash-contracts/yield.js";
|
|
4
4
|
import { countMax, Diagnostic, fileQuote, parse, quote, unicodeLocale } from "./args.js";
|
|
5
5
|
import { FileInput, ownedBytes, readAllRecords, records, virtualPath } from "./input.js";
|
|
6
6
|
import { settings } from "./options.js";
|
|
@@ -25,8 +25,6 @@ export function createShufCommand(options = {}) {
|
|
|
25
25
|
runtimeIdentity: commandRuntimeIdentity,
|
|
26
26
|
description: "Write a random permutation of input records",
|
|
27
27
|
async execute(context) {
|
|
28
|
-
let lastYield = monotonicNow();
|
|
29
|
-
let yieldChecks = 0;
|
|
30
28
|
let random;
|
|
31
29
|
let output;
|
|
32
30
|
let source;
|
|
@@ -152,14 +150,7 @@ export function createShufCommand(options = {}) {
|
|
|
152
150
|
}
|
|
153
151
|
seen++;
|
|
154
152
|
if (seen % 1024n === 0n) {
|
|
155
|
-
|
|
156
|
-
await yieldTurn(context.signal);
|
|
157
|
-
lastYield = monotonicNow();
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
runYieldCheckpoint(context.signal);
|
|
161
|
-
context.signal.throwIfAborted();
|
|
162
|
-
}
|
|
153
|
+
await yieldTurn(context.signal);
|
|
163
154
|
}
|
|
164
155
|
}
|
|
165
156
|
}
|
|
@@ -185,14 +176,7 @@ export function createShufCommand(options = {}) {
|
|
|
185
176
|
swaps.set(chosen, swaps.get(index) ?? index);
|
|
186
177
|
swaps.delete(index);
|
|
187
178
|
if (index % 1024n === 1023n) {
|
|
188
|
-
|
|
189
|
-
await yieldTurn(context.signal);
|
|
190
|
-
lastYield = monotonicNow();
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
runYieldCheckpoint(context.signal);
|
|
194
|
-
context.signal.throwIfAborted();
|
|
195
|
-
}
|
|
179
|
+
await yieldTurn(context.signal);
|
|
196
180
|
}
|
|
197
181
|
}
|
|
198
182
|
}
|
|
@@ -227,14 +211,7 @@ export function createShufCommand(options = {}) {
|
|
|
227
211
|
if (parsed.repeat && parsed.random !== undefined)
|
|
228
212
|
await sink.flush();
|
|
229
213
|
if (index % 256n === 255n) {
|
|
230
|
-
|
|
231
|
-
await yieldTurn(context.signal);
|
|
232
|
-
lastYield = monotonicNow();
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
runYieldCheckpoint(context.signal);
|
|
236
|
-
context.signal.throwIfAborted();
|
|
237
|
-
}
|
|
214
|
+
await yieldTurn(context.signal);
|
|
238
215
|
}
|
|
239
216
|
}
|
|
240
217
|
await sink.flush();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSplitCommand,
|
|
3
3
|
evalSyncSplit
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-JZSNU2MY.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-LODKH4CF.js";
|
|
6
6
|
import {
|
|
7
7
|
settings
|
|
8
8
|
} from "../safe-bash/command-chunks/chunk-K6WIMONJ.js";
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-AXK3H4PX.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-MRW5HD2D.js";
|
|
11
11
|
import {
|
|
12
12
|
init_buffer
|
|
13
13
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -8,8 +8,6 @@ export declare class Budget {
|
|
|
8
8
|
private outputBytes;
|
|
9
9
|
private steps;
|
|
10
10
|
private untilYield;
|
|
11
|
-
private yieldChecks;
|
|
12
|
-
private lastYield;
|
|
13
11
|
constructor(limits: SplitLimits, signal: AbortSignal);
|
|
14
12
|
check(value: number, maximum: number, label: string): void;
|
|
15
13
|
input(size: number): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Outputs
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-AXK3H4PX.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-MRW5HD2D.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
6
6
|
export {
|
|
7
7
|
Outputs
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSplitCommand,
|
|
3
3
|
evalSyncSplit
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-JZSNU2MY.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-LODKH4CF.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-K6WIMONJ.js";
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
8
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-AXK3H4PX.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-MRW5HD2D.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
10
10
|
export {
|
|
11
11
|
createSplitCommand,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
help,
|
|
3
3
|
parse
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-Q7Q5GM5S.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-BZPAWTUL.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-PFAADCB5.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
8
|
export {
|
|
9
9
|
help,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createTreeCommand
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-IKS2YXZQ.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-Q7Q5GM5S.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-EHVMZ2NP.js";
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-BZPAWTUL.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-PFAADCB5.js";
|
|
8
8
|
import {
|
|
9
9
|
compareVersions
|
|
10
10
|
} from "../safe-bash/command-chunks/chunk-N6TXEPXL.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compile,
|
|
3
3
|
matches
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-BZPAWTUL.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-PFAADCB5.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
7
7
|
export {
|
|
8
8
|
compile,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createTreeCommand
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-IKS2YXZQ.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-Q7Q5GM5S.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-EHVMZ2NP.js";
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-BZPAWTUL.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-PFAADCB5.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-N6TXEPXL.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
10
10
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createTsortCommand
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-464RVBGB.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-7BS66BXN.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-A5ZAV6DO.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-IL53SJL4.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
8
|
export {
|
|
9
9
|
createTsortCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sort
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-7BS66BXN.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-IL53SJL4.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
6
6
|
export {
|
|
7
7
|
sort
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createTsortCommand
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-464RVBGB.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-7BS66BXN.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-A5ZAV6DO.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-IL53SJL4.js";
|
|
7
7
|
import {
|
|
8
8
|
init_buffer
|
|
9
9
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Lifecycle,
|
|
3
3
|
Reader
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-A5ZAV6DO.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-IL53SJL4.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
7
7
|
export {
|
|
8
8
|
Lifecycle,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createOutputOperation } from "../safe-bash-contracts/index.js";
|
|
2
|
-
import { yieldTurn } from "../safe-bash-contracts/yield.js";
|
|
2
|
+
import { inheritYieldCheckpoint, yieldTurn } from "../safe-bash-contracts/yield.js";
|
|
3
3
|
export const mikeLimits = Object.freeze({
|
|
4
4
|
maxInputBytes: Infinity, maxDocumentBytes: Infinity,
|
|
5
5
|
maxScalarBytes: Infinity, maxNodes: Infinity, maxParserNodes: Infinity,
|
|
@@ -49,6 +49,7 @@ export class NativeWork {
|
|
|
49
49
|
constructor(context, limits) {
|
|
50
50
|
this.context = context;
|
|
51
51
|
this.limits = limits;
|
|
52
|
+
inheritYieldCheckpoint(context.signal, this.signal);
|
|
52
53
|
context.registerCleanup?.(() => this.close());
|
|
53
54
|
const abort = () => { this.#aborted = true; this.controller.abort(context.signal.reason); };
|
|
54
55
|
this.signal.addEventListener("abort", () => { this.#aborted = true; }, { once: true });
|
|
@@ -72,7 +72,6 @@ export declare class Budget {
|
|
|
72
72
|
members: number;
|
|
73
73
|
totalBytes: number;
|
|
74
74
|
textBytes: number;
|
|
75
|
-
private lastYield;
|
|
76
75
|
constructor(context: CommandContext, limits: ArchiveLimits);
|
|
77
76
|
member(size?: number): Promise<void>;
|
|
78
77
|
output(value: string | Uint8Array, stderr?: boolean): Promise<void>;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
init_buffer();
|
|
7
7
|
import { bytesFrom, utf8ByteLength } from "../../../safe-bash-byte-engine/index.js";
|
|
8
8
|
import { PublicDiagnostic } from "../../../safe-bash-contracts/diagnostics.js";
|
|
9
|
-
import {
|
|
9
|
+
import { yieldTurn } from "../../../safe-bash-contracts/yield.js";
|
|
10
10
|
import { collectBytes, readBytes, writeBytes } from "../../../safe-bash-contracts/index.js";
|
|
11
11
|
var DEFAULT_ARCHIVE_LIMITS = Object.freeze({
|
|
12
12
|
maxArchiveBytes: Infinity,
|
|
@@ -145,16 +145,14 @@ var Budget = class {
|
|
|
145
145
|
members = 0;
|
|
146
146
|
totalBytes = 0;
|
|
147
147
|
textBytes = 0;
|
|
148
|
-
lastYield = monotonicNow();
|
|
149
148
|
async member(size = 0) {
|
|
150
149
|
this.context.signal.throwIfAborted();
|
|
151
150
|
if (++this.members > this.limits.maxMembers) fail("member/header limit exceeded");
|
|
152
151
|
if (!Number.isSafeInteger(size) || size < 0 || size > this.limits.maxEntryBytes) fail("entry byte limit exceeded");
|
|
153
152
|
if (size > this.limits.maxTotalBytes - this.totalBytes) fail("total payload byte limit exceeded");
|
|
154
153
|
this.totalBytes += size;
|
|
155
|
-
if (this.members % 128 === 0
|
|
154
|
+
if (this.members % 128 === 0) {
|
|
156
155
|
await yieldTurn(this.context.signal);
|
|
157
|
-
this.lastYield = monotonicNow();
|
|
158
156
|
}
|
|
159
157
|
}
|
|
160
158
|
async output(value, stderr = false) {
|
|
@@ -167,7 +165,6 @@ var Budget = class {
|
|
|
167
165
|
async function* bounded(source, maximum, signal, chunkSize) {
|
|
168
166
|
let size = 0;
|
|
169
167
|
let turns = 0;
|
|
170
|
-
let lastYield = monotonicNow();
|
|
171
168
|
for await (const chunk of readBytes(source, signal)) {
|
|
172
169
|
if (chunk.length > maximum - size) fail("archive byte limit exceeded");
|
|
173
170
|
size += chunk.length;
|
|
@@ -180,9 +177,8 @@ async function* bounded(source, maximum, signal, chunkSize) {
|
|
|
180
177
|
yield chunk.subarray(offset, Math.min(chunk.length, offset + chunkSize));
|
|
181
178
|
}
|
|
182
179
|
}
|
|
183
|
-
if (++turns % 128 === 0
|
|
180
|
+
if (++turns % 128 === 0) {
|
|
184
181
|
await yieldTurn(signal);
|
|
185
|
-
lastYield = monotonicNow();
|
|
186
182
|
}
|
|
187
183
|
}
|
|
188
184
|
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
nextCodePointOffset,
|
|
3
3
|
previousCodePointOffset,
|
|
4
4
|
stringCheckpoint
|
|
5
|
-
} from "../../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../../safe-bash/command-chunks/chunk-52PCQXD2.js";
|
|
6
6
|
import {
|
|
7
7
|
init_buffer
|
|
8
8
|
} from "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -5,8 +5,6 @@ export interface StringWork {
|
|
|
5
5
|
exhausted(): never;
|
|
6
6
|
allocation?: ValueAllocation;
|
|
7
7
|
steps?: number;
|
|
8
|
-
lastYield?: number;
|
|
9
|
-
yieldChecks?: number;
|
|
10
8
|
}
|
|
11
9
|
export declare function stringCheckpoint(work: StringWork, units?: number): Promise<void> | undefined;
|
|
12
10
|
export declare function nextCodePointOffset(value: string, offset: number): number;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
previousCodePointOffset,
|
|
4
4
|
scanString,
|
|
5
5
|
stringCheckpoint
|
|
6
|
-
} from "../../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../../safe-bash/command-chunks/chunk-52PCQXD2.js";
|
|
7
7
|
import "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
8
|
export {
|
|
9
9
|
nextCodePointOffset,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCommandArguments } from "../safe-bash-contracts/index.js";
|
|
2
2
|
import { shellValueByteLength, shellValueBytes } from "../safe-bash-contracts/value.js";
|
|
3
|
-
import {
|
|
3
|
+
import { yieldTurn } from "../safe-bash-contracts/yield.js";
|
|
4
4
|
import { PublicDiagnostic } from "../safe-bash-contracts/diagnostics.js";
|
|
5
5
|
export function settings(options) {
|
|
6
6
|
const limits = {
|
|
@@ -29,8 +29,6 @@ export class Budget {
|
|
|
29
29
|
admission;
|
|
30
30
|
work = 0;
|
|
31
31
|
quantum = 0;
|
|
32
|
-
checkpointCount = 0;
|
|
33
|
-
lastYield = monotonicNow();
|
|
34
32
|
memory = 0;
|
|
35
33
|
input = 0;
|
|
36
34
|
output = 0;
|
|
@@ -81,13 +79,7 @@ export class Budget {
|
|
|
81
79
|
if (this.quantum < 1024)
|
|
82
80
|
return;
|
|
83
81
|
this.quantum = 0;
|
|
84
|
-
if (++this.checkpointCount > 1 && (this.checkpointCount & 255) !== 0 && !hasYieldCheckpoint(this.caller) && monotonicNow() - this.lastYield < 25) {
|
|
85
|
-
runYieldCheckpoint(this.caller);
|
|
86
|
-
this.assertOpen();
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
82
|
return yieldTurn(this.caller).then(() => {
|
|
90
|
-
this.lastYield = monotonicNow();
|
|
91
83
|
this.assertOpen();
|
|
92
84
|
});
|
|
93
85
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
capture
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-JCNNOMBV.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-YZ5SVZFD.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-UI32HWGS.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-5ZSM4UFN.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-VVI4Z73I.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-PDKXAR4Y.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-UCL3PNXL.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fromDateIso8601,
|
|
3
3
|
toDateIso8601
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-NETECMOF.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-VVI4Z73I.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-PDKXAR4Y.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-UCL3PNXL.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
delpaths
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-ZXKW7SJ2.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-YZ5SVZFD.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-UI32HWGS.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-5ZSM4UFN.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-VVI4Z73I.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-PDKXAR4Y.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-UCL3PNXL.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatValue
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-4ZALPDBV.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-5ZSM4UFN.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-VVI4Z73I.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-PDKXAR4Y.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-UCL3PNXL.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|