@poe-platform/safe-bash 0.1.797 → 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/pdf/index.d.ts +1 -1
- package/dist/pdf/model.d.ts +7 -2
- package/dist/safe-bash/chunks/{chunk-D2XB7XIC.js → chunk-AZAJJVFX.js} +7 -11
- package/dist/safe-bash/chunks/{chunk-C2NYCU7O.js → chunk-JSVX4VIA.js} +5 -1
- package/dist/safe-bash/chunks/{chunk-TCWZNUVP.js → chunk-SPYL72GN.js} +1 -25
- package/dist/safe-bash/chunks/{chunk-TGOF7VO5.js → chunk-TRVGCN3U.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-ZXKVOJNL.js → chunk-WUNK5NXJ.js} +6 -5
- 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-A7RIYQIF.js → chunk-DDLQ5YDB.js} +172 -167
- package/dist/safe-bash/command-chunks/{chunk-JEPY4UY4.js → chunk-EIVW3X3N.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-C2DUYVYZ.js → chunk-ESMCX3YV.js} +138 -36
- package/dist/safe-bash/command-chunks/chunk-EZ7D6DXC.js +6 -0
- 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-ECAK3JHR.js → chunk-QRRYN2KO.js} +21 -12
- 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-UUR2S7AD.js → chunk-Y6TUZWPS.js} +28 -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/command-chunks/{pptx-KY2OJWZW-76LBHCHD.js → pptx-GBPNWNEP-7EQEVXV5.js} +8 -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/llm/index.browser.js +9 -1
- package/dist/safe-bash/commands/llm/providers/index.browser.js +6 -2
- package/dist/safe-bash/commands/text.js +1 -25
- package/dist/safe-bash/core.browser.js +1 -1
- package/dist/safe-bash/core.d.ts +5 -1
- package/dist/safe-bash/core.js +5 -1
- package/dist/safe-bash/full-core.browser.js +134 -5
- package/dist/safe-bash/lazy-optional.d.ts +13 -0
- package/dist/safe-bash/lazy-optional.js +118 -0
- 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/env-warning.js +3 -2
- package/dist/safe-bash/shell/runtime.js +2 -2
- package/dist/safe-bash/shell-entry.browser.js +2 -2
- package/dist/safe-bash-command-csvkit/index.js +528 -498
- 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-git/git_rust.wasm +0 -0
- package/dist/safe-bash-command-git/wasm.generated.js +1 -1
- 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-llm/base64-stream.d.ts +2 -0
- package/dist/safe-bash-command-llm/chat-json.d.ts +10 -0
- package/dist/safe-bash-command-llm/index.d.ts +2 -1
- package/dist/safe-bash-command-llm/index.js +11 -2
- package/dist/safe-bash-command-llm/json-string.d.ts +2 -0
- package/dist/safe-bash-command-llm/json-value.d.ts +2 -0
- package/dist/safe-bash-command-llm/openai.d.ts +1 -0
- package/dist/safe-bash-command-llm/openai.js +4 -2
- package/dist/safe-bash-command-llm/provider-serialization.d.ts +6 -0
- package/dist/safe-bash-command-llm/providers/index.d.ts +2 -1
- package/dist/safe-bash-command-llm/providers/index.js +12 -3
- package/dist/safe-bash-command-llm/providers/openai.d.ts +1 -1
- package/dist/safe-bash-command-llm/providers/openai.js +4 -2
- package/dist/safe-bash-command-numfmt/index.js +4 -18
- package/dist/safe-bash-command-pandoc/citeproc-filters.js +1 -1
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/index.js +3 -3
- 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-ssconvert/index.js +1 -1
- 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 +5 -4
package/README.md
CHANGED
|
@@ -704,7 +704,8 @@ through `maxArguments`, `maxArgumentBytes`, and `maxOutputBytes`.
|
|
|
704
704
|
`timeEnv.maxTimerMilliseconds` and `timeout.maxTimerMilliseconds` accept `Infinity`;
|
|
705
705
|
host timer calls remain capped at 2147483647 ms and progress with frozen clocks.
|
|
706
706
|
Use the [typed options and linked family interfaces](src/plugins/index.ts) for
|
|
707
|
-
their individual limits and hooks, including clocks and schedulers.
|
|
707
|
+
their individual limits and hooks, including clocks and schedulers. Command and
|
|
708
|
+
shell work quanta yield to the host even when its clock is frozen. Family budgets
|
|
708
709
|
are separate from shell counters; `limits.commandLimits.archive` supplies
|
|
709
710
|
invocation ceilings. Per-execution family overrides merge with the shell's
|
|
710
711
|
profile, and non-Worker hosts can configure larger limits. `replace` applies
|
package/dist/pdf/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare function pdfCapabilities(): {
|
|
|
7
7
|
readonly profile: "PDF-1.7-supplied-fonts-ltr";
|
|
8
8
|
readonly reference: "Adobe PDF Reference sixth edition, November 2006";
|
|
9
9
|
readonly scripts: readonly ["Latin", "Greek", "Cyrillic"];
|
|
10
|
-
readonly fonts: readonly ["sfnt-TrueType-glyf"];
|
|
10
|
+
readonly fonts: readonly ["sfnt-TrueType-glyf", "standard-14"];
|
|
11
11
|
readonly png: "static-noninterlaced-8bit";
|
|
12
12
|
readonly jpeg: "8bit-gray-rgb-adobe-cmyk";
|
|
13
13
|
readonly images: readonly ["png", "jpeg"];
|
package/dist/pdf/model.d.ts
CHANGED
|
@@ -8,12 +8,17 @@ export interface SuppliedFont {
|
|
|
8
8
|
readonly id: string;
|
|
9
9
|
readonly bytes: Uint8Array;
|
|
10
10
|
}
|
|
11
|
+
export type StandardFontName = "Helvetica" | "Helvetica-Bold" | "Helvetica-Oblique" | "Helvetica-BoldOblique" | "Courier" | "Courier-Bold" | "Courier-Oblique" | "Courier-BoldOblique" | "Times-Roman" | "Times-Bold" | "Times-Italic" | "Times-BoldItalic" | "Symbol" | "ZapfDingbats";
|
|
12
|
+
export interface StandardFont {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly standard: StandardFontName;
|
|
15
|
+
}
|
|
11
16
|
export interface TextRun {
|
|
12
17
|
readonly text: string;
|
|
13
18
|
readonly font?: string;
|
|
14
19
|
readonly size?: number;
|
|
15
20
|
readonly link?: string;
|
|
16
|
-
/** Synthetic weight
|
|
21
|
+
/** Synthetic weight/oblique apply to supplied fonts, including Unicode fallback; standard fonts use their named face. */
|
|
17
22
|
readonly bold?: boolean;
|
|
18
23
|
readonly italic?: boolean;
|
|
19
24
|
readonly strikeout?: boolean;
|
|
@@ -67,7 +72,7 @@ export interface LayoutDocument {
|
|
|
67
72
|
readonly metadata?: PdfMetadata;
|
|
68
73
|
readonly page?: PageBox;
|
|
69
74
|
readonly lineHeight?: number;
|
|
70
|
-
readonly fonts: readonly SuppliedFont[];
|
|
75
|
+
readonly fonts: readonly (SuppliedFont | StandardFont)[];
|
|
71
76
|
readonly blocks: readonly LayoutBlock[];
|
|
72
77
|
}
|
|
73
78
|
export interface PdfLimits {
|
|
@@ -53,7 +53,6 @@ import {
|
|
|
53
53
|
dirname,
|
|
54
54
|
isPathWithin,
|
|
55
55
|
joinPath,
|
|
56
|
-
monotonicNow,
|
|
57
56
|
normalizePath,
|
|
58
57
|
relativePath,
|
|
59
58
|
resolvePath,
|
|
@@ -188,8 +187,6 @@ var Budget = class _Budget {
|
|
|
188
187
|
lines = 0;
|
|
189
188
|
work = 0;
|
|
190
189
|
nextYield = 4096;
|
|
191
|
-
yieldChecks = 0;
|
|
192
|
-
nextYieldTime = monotonicNow() + 8;
|
|
193
190
|
files = 0;
|
|
194
191
|
hunks = 0;
|
|
195
192
|
signalAborted;
|
|
@@ -211,15 +208,8 @@ var Budget = class _Budget {
|
|
|
211
208
|
checkpoint() {
|
|
212
209
|
if (this.pollSignal ? this.context.signal.aborted : this.signalAborted) this.context.signal.throwIfAborted();
|
|
213
210
|
if (this.work >= this.nextYield) {
|
|
214
|
-
const firstYield = this.nextYield === 4096;
|
|
215
211
|
this.nextYield = this.work + 4096;
|
|
216
|
-
|
|
217
|
-
if (++this.yieldChecks % 16 === 0 || firstYield || now >= this.nextYieldTime) {
|
|
218
|
-
this.nextYieldTime = now + 16;
|
|
219
|
-
return yieldTurn(this.context.signal).then(() => {
|
|
220
|
-
this.nextYieldTime = monotonicNow() + 16;
|
|
221
|
-
});
|
|
222
|
-
}
|
|
212
|
+
return yieldTurn(this.context.signal);
|
|
223
213
|
}
|
|
224
214
|
}
|
|
225
215
|
file() {
|
|
@@ -12836,6 +12826,11 @@ function createCalCommand(options2 = {}) {
|
|
|
12836
12826
|
if (isDefaultCalOptions(options2)) builtInDirectContextExecutors.add(def.execute);
|
|
12837
12827
|
return def;
|
|
12838
12828
|
}
|
|
12829
|
+
function createNcalCommand(options2 = {}) {
|
|
12830
|
+
const def = createRawNcalCommand(options2);
|
|
12831
|
+
if (isDefaultCalOptions(options2)) builtInDirectContextExecutors.add(def.execute);
|
|
12832
|
+
return def;
|
|
12833
|
+
}
|
|
12839
12834
|
function createCalCommands(options2 = {}) {
|
|
12840
12835
|
const defs = createRawCalCommands(options2);
|
|
12841
12836
|
if (isDefaultCalOptions(options2)) {
|
|
@@ -22999,6 +22994,7 @@ export {
|
|
|
22999
22994
|
envsubstCommands,
|
|
23000
22995
|
evalSyncCal,
|
|
23001
22996
|
createCalCommand,
|
|
22997
|
+
createNcalCommand,
|
|
23002
22998
|
createCalCommands,
|
|
23003
22999
|
calCommands,
|
|
23004
23000
|
createPathchkCommand,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// packages/safe-bash/src/commands/llm/index.ts
|
|
6
6
|
init_platform();
|
|
7
|
-
import { createElevenLabsProvider, createLlmCommand, createLlmCommands, createLlmConfiguration, createLlmService, createLlmTemplateStore, createOpenAiProvider, evaluateLlmTemplate, findExtractedRange, getLlmModelAliases, llmCommands, llmTemplateUsesInput, parseLlmSchemaDsl, resolveLlmSchemaInput, selectLlmModelByQuery, templateYaml, validateLlmTemplateParameters, validateModelOptions } from "../../safe-bash-command-llm/index.js";
|
|
7
|
+
import { createElevenLabsProvider, createLlmCommand, createLlmCommands, createLlmConfiguration, createLlmService, createLlmTemplateStore, createOpenAiProvider, encodeLlmBase64, evaluateLlmTemplate, findExtractedRange, getLlmModelAliases, llmCommands, llmTemplateUsesInput, parseLlmSchemaDsl, resolveLlmSchemaInput, selectLlmModelByQuery, serializeLlmJsonString, serializeLlmJsonValue, serializeOpenAiChatRequest, templateYaml, validateLlmTemplateParameters, validateModelOptions } from "../../safe-bash-command-llm/index.js";
|
|
8
8
|
|
|
9
9
|
export {
|
|
10
10
|
createElevenLabsProvider,
|
|
@@ -14,6 +14,7 @@ export {
|
|
|
14
14
|
createLlmService,
|
|
15
15
|
createLlmTemplateStore,
|
|
16
16
|
createOpenAiProvider,
|
|
17
|
+
encodeLlmBase64,
|
|
17
18
|
evaluateLlmTemplate,
|
|
18
19
|
findExtractedRange,
|
|
19
20
|
getLlmModelAliases,
|
|
@@ -22,6 +23,9 @@ export {
|
|
|
22
23
|
parseLlmSchemaDsl,
|
|
23
24
|
resolveLlmSchemaInput,
|
|
24
25
|
selectLlmModelByQuery,
|
|
26
|
+
serializeLlmJsonString,
|
|
27
|
+
serializeLlmJsonValue,
|
|
28
|
+
serializeOpenAiChatRequest,
|
|
25
29
|
templateYaml,
|
|
26
30
|
validateLlmTemplateParameters,
|
|
27
31
|
validateModelOptions
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
virtualPath,
|
|
87
87
|
wcDisplayWidth,
|
|
88
88
|
write
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-AZAJJVFX.js";
|
|
90
90
|
import {
|
|
91
91
|
createGetoptCommands
|
|
92
92
|
} from "./chunk-3L3T6LYV.js";
|
|
@@ -166,7 +166,6 @@ import {
|
|
|
166
166
|
dirname,
|
|
167
167
|
hasYieldCheckpoint,
|
|
168
168
|
monotonicNow,
|
|
169
|
-
runYieldCheckpoint,
|
|
170
169
|
yieldTurn
|
|
171
170
|
} from "./chunk-VYZTG3GV.js";
|
|
172
171
|
import {
|
|
@@ -9028,35 +9027,12 @@ var SortWork = class {
|
|
|
9028
9027
|
}
|
|
9029
9028
|
signal;
|
|
9030
9029
|
#pending = 0;
|
|
9031
|
-
#syncTurns = 0;
|
|
9032
|
-
#lastYield = monotonicNow();
|
|
9033
9030
|
charge(units = 1) {
|
|
9034
9031
|
this.#pending += units;
|
|
9035
9032
|
if (this.#pending >= 4096) {
|
|
9036
|
-
if (!hasYieldCheckpoint(this.signal)) {
|
|
9037
|
-
while (this.#pending >= 4096) {
|
|
9038
|
-
this.#pending -= 4096;
|
|
9039
|
-
runYieldCheckpoint(this.signal);
|
|
9040
|
-
this.signal.throwIfAborted();
|
|
9041
|
-
if (++this.#syncTurns % 8 === 0) {
|
|
9042
|
-
const now = monotonicNow();
|
|
9043
|
-
if (this.#syncTurns >= 256 || now - this.#lastYield >= 16) {
|
|
9044
|
-
this.#syncTurns = 0;
|
|
9045
|
-
this.#lastYield = now;
|
|
9046
|
-
return this.#checkpointOnce();
|
|
9047
|
-
}
|
|
9048
|
-
}
|
|
9049
|
-
}
|
|
9050
|
-
return void 0;
|
|
9051
|
-
}
|
|
9052
9033
|
return this.#checkpoint();
|
|
9053
9034
|
}
|
|
9054
9035
|
}
|
|
9055
|
-
async #checkpointOnce() {
|
|
9056
|
-
await yieldTurn(this.signal);
|
|
9057
|
-
this.#lastYield = monotonicNow();
|
|
9058
|
-
this.signal.throwIfAborted();
|
|
9059
|
-
}
|
|
9060
9036
|
async #checkpoint() {
|
|
9061
9037
|
while (this.#pending >= 4096) {
|
|
9062
9038
|
this.#pending -= 4096;
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
tryMatchesPatternSync,
|
|
93
93
|
variablePresence,
|
|
94
94
|
wcDisplayWidth
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-AZAJJVFX.js";
|
|
96
96
|
import {
|
|
97
97
|
evalSyncGetopt
|
|
98
98
|
} from "./chunk-3L3T6LYV.js";
|
|
@@ -4216,9 +4216,10 @@ import { createDeviceFileSystem } from "@poe-platform/safe-fs/core";
|
|
|
4216
4216
|
init_platform();
|
|
4217
4217
|
var warned = /* @__PURE__ */ new WeakSet();
|
|
4218
4218
|
function warnIfHostProcessEnv(env) {
|
|
4219
|
-
|
|
4219
|
+
const hostProcess = globalThis.process;
|
|
4220
|
+
if (!env || !hostProcess?.env) return;
|
|
4220
4221
|
if (warned.has(env)) return;
|
|
4221
|
-
if (env !==
|
|
4222
|
+
if (env !== hostProcess.env) return;
|
|
4222
4223
|
warned.add(env);
|
|
4223
4224
|
console.warn("[safe-bash] warning: the shell `env` is the host `process.env`. Scripts executed in this shell can read every value in it, including secrets; on Cloudflare Workers with nodejs_compat, process.env contains the Worker's secret bindings. Pass only the variables your scripts need. See docs/issues/safe-bash-cloudflare-security-audit.md (finding 1).");
|
|
4224
4225
|
}
|
|
@@ -35711,7 +35712,7 @@ ${prefix} line ${offset + line}: \`${source.split("\n")[line - 1] ?? ""}'
|
|
|
35711
35712
|
}
|
|
35712
35713
|
if (part.length) return String(binding?.values.size ?? (part.name === "FUNCNAME" && state.variables.FUNCNAME === void 0 ? state.functionNames?.length ?? 0 : state.variables[part.name] === void 0 ? 0 : 1));
|
|
35713
35714
|
const values = await this.arrayMembers(part.name, state, io, selector.kind === "keys" || part.keys === true, part.substring);
|
|
35714
|
-
const space = selector.kind === "keys" || part.keys === true ? Boolean(hereDocument || (selector.separator === "@" ? !part.quoted && !split || state.variables.IFS === "" : !part.quoted && split && state.variables.IFS === "")) : !split && selector.separator === "@"
|
|
35715
|
+
const space = selector.kind === "keys" || part.keys === true ? Boolean(hereDocument || (selector.separator === "@" ? !part.quoted && !split || state.variables.IFS === "" : !part.quoted && split && state.variables.IFS === "")) : !split && selector.separator === "@";
|
|
35715
35716
|
return this.arrayJoin(store.owner, values, space ? " " : this.ifsSeparator(state, io));
|
|
35716
35717
|
}
|
|
35717
35718
|
if (part.substring && (part.name === "@" || part.name === "*")) {
|
|
@@ -36277,7 +36278,7 @@ ${prefix} line ${offset + line}: \`${source.split("\n")[line - 1] ?? ""}'
|
|
|
36277
36278
|
}
|
|
36278
36279
|
const ifsVal = monitor?.values.get("IFS", rawVars.IFS ?? " ") ?? rawVars.IFS ?? " ";
|
|
36279
36280
|
if (validElemOp && typeof ifsVal === "string" && (ifsVal.length === 0 || ifsVal.charCodeAt(0) < 128)) {
|
|
36280
|
-
const sep = selector.separator === "@" && (ifsVal.length === 0 || !isKeys && part.operator === void 0
|
|
36281
|
+
const sep = selector.separator === "@" && (ifsVal.length === 0 || !isKeys && part.operator === void 0) ? " " : ifsVal.length > 0 ? ifsVal[0] : "";
|
|
36281
36282
|
const parameterLine = part.line ?? overrideDiagnosticLine;
|
|
36282
36283
|
const evalSliceInt = (w) => {
|
|
36283
36284
|
if (w.parts.length === 0) return 0;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3K5RYU4.js";
|
|
4
4
|
import {
|
|
5
5
|
Interpreter
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OPUJSTHS.js";
|
|
7
7
|
import {
|
|
8
8
|
Budget,
|
|
9
9
|
JqLimitError,
|
|
10
10
|
objectKeys,
|
|
11
11
|
wellFormed
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VVI4Z73I.js";
|
|
13
13
|
import {
|
|
14
14
|
utf8ByteLength
|
|
15
15
|
} from "./chunk-PDKXAR4Y.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sort
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7BS66BXN.js";
|
|
4
4
|
import {
|
|
5
5
|
Lifecycle,
|
|
6
6
|
Reader
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A5ZAV6DO.js";
|
|
8
8
|
import {
|
|
9
9
|
Budget,
|
|
10
10
|
TsortError,
|
|
11
11
|
quote,
|
|
12
12
|
settings
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IL53SJL4.js";
|
|
14
14
|
import {
|
|
15
15
|
init_buffer
|
|
16
16
|
} from "./chunk-HX3SHTCE.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
// packages/safe-bash-command-html-to-markdown/src/budget.ts
|
|
6
6
|
init_buffer();
|
|
7
7
|
import { utf8ByteLength, bytesFrom } from "../../safe-bash-byte-engine/index.js";
|
|
8
|
-
import {
|
|
8
|
+
import { yieldTurn } from "../../safe-bash-contracts/yield.js";
|
|
9
9
|
import { FsError, writeBytes } from "../../safe-bash-contracts/index.js";
|
|
10
10
|
function asciiOrUtf8ByteLength(text) {
|
|
11
11
|
const len = text.length;
|
|
@@ -19,7 +19,6 @@ var Budget = class {
|
|
|
19
19
|
this.context = context;
|
|
20
20
|
this.limits = limits;
|
|
21
21
|
const signal = context.signal;
|
|
22
|
-
this.hasExtYield = hasYieldCheckpoint(signal);
|
|
23
22
|
this.aborted = Boolean(signal.aborted);
|
|
24
23
|
this.pollSignal = typeof signal.addEventListener !== "function" || Object.prototype.hasOwnProperty.call(signal, "aborted");
|
|
25
24
|
if (!this.aborted && !this.pollSignal) {
|
|
@@ -37,9 +36,6 @@ var Budget = class {
|
|
|
37
36
|
cells = 0;
|
|
38
37
|
workUsed = 0;
|
|
39
38
|
sinceYield = 0;
|
|
40
|
-
checkpoints = 0;
|
|
41
|
-
lastYieldTime = monotonicNow();
|
|
42
|
-
hasExtYield;
|
|
43
39
|
aborted;
|
|
44
40
|
pollSignal;
|
|
45
41
|
check(amount, remaining, name) {
|
|
@@ -57,18 +53,9 @@ var Budget = class {
|
|
|
57
53
|
if (this.aborted || this.pollSignal && this.context.signal.aborted) this.context.signal.throwIfAborted();
|
|
58
54
|
if (this.sinceYield >= 4096) {
|
|
59
55
|
this.sinceYield = 0;
|
|
60
|
-
const count = ++this.checkpoints;
|
|
61
|
-
const now = monotonicNow();
|
|
62
|
-
if (!this.hasExtYield && count > 1 && count % 16 !== 0 && now - this.lastYieldTime < 16) {
|
|
63
|
-
runYieldCheckpoint(this.context.signal);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
this.lastYieldTime = now;
|
|
67
56
|
return yieldTurn(this.context.signal).then(() => {
|
|
68
|
-
this.lastYieldTime = monotonicNow();
|
|
69
57
|
if (this.aborted || this.pollSignal && this.context.signal.aborted) this.context.signal.throwIfAborted();
|
|
70
58
|
}, (error) => {
|
|
71
|
-
this.lastYieldTime = monotonicNow();
|
|
72
59
|
if (this.aborted || this.pollSignal && this.context.signal.aborted) this.context.signal.throwIfAborted();
|
|
73
60
|
throw error;
|
|
74
61
|
});
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// packages/safe-bash-io-engine/src/shell/string-operations.ts
|
|
6
6
|
init_buffer();
|
|
7
|
-
import {
|
|
7
|
+
import { yieldTurn } from "../../safe-bash-contracts/yield.js";
|
|
8
8
|
function stringCheckpoint(work, units = 1) {
|
|
9
9
|
work.signal.throwIfAborted();
|
|
10
10
|
work.remaining -= units;
|
|
@@ -12,18 +12,7 @@ function stringCheckpoint(work, units = 1) {
|
|
|
12
12
|
work.steps = (work.steps ?? 0) + units;
|
|
13
13
|
if (work.steps < 128) return void 0;
|
|
14
14
|
work.steps %= 128;
|
|
15
|
-
|
|
16
|
-
const firstYield = work.lastYield === void 0;
|
|
17
|
-
const lastYield = work.lastYield ??= now;
|
|
18
|
-
work.yieldChecks = (work.yieldChecks ?? 0) + 1;
|
|
19
|
-
if (work.yieldChecks % 16 === 0 || firstYield || hasYieldCheckpoint(work.signal) || now - lastYield >= 1) {
|
|
20
|
-
work.lastYield = now;
|
|
21
|
-
return yieldTurn(work.signal).then(() => {
|
|
22
|
-
work.lastYield = monotonicNow();
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
runYieldCheckpoint(work.signal);
|
|
26
|
-
return void 0;
|
|
15
|
+
return yieldTurn(work.signal);
|
|
27
16
|
}
|
|
28
17
|
function nextCodePointOffset(value, offset) {
|
|
29
18
|
if (offset >= value.length) return value.length;
|
|
@@ -168,13 +168,6 @@ var EreLedger = class _EreLedger {
|
|
|
168
168
|
const min = untilLimit < untilYield ? untilLimit : untilYield;
|
|
169
169
|
return min > 0 ? min : 0;
|
|
170
170
|
}
|
|
171
|
-
advanceSyncCheckpointIfNoExternalYield(signal) {
|
|
172
|
-
if (hasYieldCheckpoint(signal)) return false;
|
|
173
|
-
if (signal?.aborted) throw signal.reason;
|
|
174
|
-
if (this.poison) throw this.poison;
|
|
175
|
-
this.lastYield = this.uWork;
|
|
176
|
-
return true;
|
|
177
|
-
}
|
|
178
171
|
admitInput(resource, length, signal) {
|
|
179
172
|
this.check(signal);
|
|
180
173
|
integer(length);
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
init_buffer();
|
|
7
7
|
import { getCommandArguments } from "../../safe-bash-contracts/index.js";
|
|
8
8
|
import { shellValueByteLength, shellValueBytes } from "../../safe-bash-contracts/value.js";
|
|
9
|
-
import {
|
|
9
|
+
import { yieldTurn } from "../../safe-bash-contracts/yield.js";
|
|
10
10
|
import { PublicDiagnostic } from "../../safe-bash-contracts/diagnostics.js";
|
|
11
11
|
function settings(options) {
|
|
12
12
|
const limits = {
|
|
@@ -67,8 +67,6 @@ var Budget = class {
|
|
|
67
67
|
admission;
|
|
68
68
|
work = 0;
|
|
69
69
|
checkpoint = 0;
|
|
70
|
-
checkpointCount = 0;
|
|
71
|
-
lastYield = monotonicNow();
|
|
72
70
|
retained = 0;
|
|
73
71
|
input = 0;
|
|
74
72
|
output = 0;
|
|
@@ -93,17 +91,9 @@ var Budget = class {
|
|
|
93
91
|
this.assertOpen();
|
|
94
92
|
if (this.work - this.checkpoint < 4096) return;
|
|
95
93
|
this.checkpoint = this.work;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
this.lastYield = now;
|
|
100
|
-
return yieldTurn(this.callerSignal).then(() => {
|
|
101
|
-
this.lastYield = monotonicNow();
|
|
102
|
-
this.assertOpen();
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
runYieldCheckpoint(this.callerSignal);
|
|
106
|
-
this.assertOpen();
|
|
94
|
+
return yieldTurn(this.callerSignal).then(() => {
|
|
95
|
+
this.assertOpen();
|
|
96
|
+
});
|
|
107
97
|
}
|
|
108
98
|
retain(amount) {
|
|
109
99
|
this.check(this.retained + amount, this.limits.maxBufferedBytes, "buffered bytes");
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
// packages/safe-bash-command-file/src/shared.ts
|
|
6
6
|
init_buffer();
|
|
7
7
|
import { utf8ByteLength } from "../../safe-bash-byte-engine/index.js";
|
|
8
|
-
import {
|
|
8
|
+
import { inheritYieldCheckpoint, yieldTurn } from "../../safe-bash-contracts/yield.js";
|
|
9
9
|
import { writeBytes } from "../../safe-bash-contracts/index.js";
|
|
10
10
|
function settings(options) {
|
|
11
11
|
const limits = {
|
|
@@ -55,6 +55,7 @@ var SharedBudget = class {
|
|
|
55
55
|
this.context = context;
|
|
56
56
|
this.limits = limits;
|
|
57
57
|
this.signal = AbortSignal.any([context.signal, this.controller.signal]);
|
|
58
|
+
inheritYieldCheckpoint(context.signal, this.signal);
|
|
58
59
|
this.deadline = performance.now() + limits.maxDurationMs;
|
|
59
60
|
if (Number.isFinite(limits.maxDurationMs)) {
|
|
60
61
|
const expire = () => {
|
|
@@ -72,8 +73,6 @@ var SharedBudget = class {
|
|
|
72
73
|
steps = 0;
|
|
73
74
|
failureUnits = 64;
|
|
74
75
|
untilYield = 128;
|
|
75
|
-
yieldChecks = 0;
|
|
76
|
-
lastYield = monotonicNow();
|
|
77
76
|
controller = new AbortController();
|
|
78
77
|
timer;
|
|
79
78
|
deadline;
|
|
@@ -100,13 +99,7 @@ var SharedBudget = class {
|
|
|
100
99
|
this.work(count);
|
|
101
100
|
if (--this.untilYield <= 0) {
|
|
102
101
|
this.untilYield = 128;
|
|
103
|
-
|
|
104
|
-
if (++this.yieldChecks % 16 === 0 || hasYieldCheckpoint(this.signal) || now - this.lastYield >= 16) {
|
|
105
|
-
await yieldTurn(this.signal);
|
|
106
|
-
this.lastYield = monotonicNow();
|
|
107
|
-
} else {
|
|
108
|
-
runYieldCheckpoint(this.signal);
|
|
109
|
-
}
|
|
102
|
+
await yieldTurn(this.signal);
|
|
110
103
|
this.checkTime();
|
|
111
104
|
}
|
|
112
105
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Formatter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QAKKSRNV.js";
|
|
4
4
|
import {
|
|
5
5
|
Lifecycle,
|
|
6
6
|
Reader,
|
|
7
7
|
fsDetail
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QNXI2UP6.js";
|
|
9
9
|
import {
|
|
10
10
|
parseOptions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CPPGTBZF.js";
|
|
12
12
|
import {
|
|
13
13
|
Budget,
|
|
14
14
|
PrError,
|
|
15
15
|
fileQuote,
|
|
16
16
|
quote,
|
|
17
17
|
settings
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-N5FGCXQJ.js";
|
|
19
19
|
import {
|
|
20
20
|
init_buffer
|
|
21
21
|
} from "./chunk-HX3SHTCE.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
init_buffer();
|
|
10
10
|
import { utf8ByteLength } from "../../safe-bash-byte-engine/index.js";
|
|
11
11
|
import { publicDiagnosticMessage } from "../../safe-bash-contracts/diagnostics.js";
|
|
12
|
-
import {
|
|
12
|
+
import { inheritYieldCheckpoint, yieldTurn } from "../../safe-bash-contracts/yield.js";
|
|
13
13
|
import { escapeText } from "../../safe-bash-contracts/escaping.js";
|
|
14
14
|
import { FsError, writeBytes } from "../../safe-bash-contracts/index.js";
|
|
15
15
|
var utf8Encoder = new TextEncoder();
|
|
@@ -24,6 +24,7 @@ var Budget = class {
|
|
|
24
24
|
this.limits = limits;
|
|
25
25
|
this.caller = caller;
|
|
26
26
|
this.ioSignal = AbortSignal.any([caller.signal, this.cancellation.signal]);
|
|
27
|
+
inheritYieldCheckpoint(context.signal, this.ioSignal);
|
|
27
28
|
}
|
|
28
29
|
context;
|
|
29
30
|
limits;
|
|
@@ -33,7 +34,6 @@ var Budget = class {
|
|
|
33
34
|
metadata = 0;
|
|
34
35
|
output = 0;
|
|
35
36
|
operations = 0;
|
|
36
|
-
lastYield = monotonicNow();
|
|
37
37
|
closed = false;
|
|
38
38
|
completion;
|
|
39
39
|
cancellation = new AbortController();
|
|
@@ -41,7 +41,6 @@ var Budget = class {
|
|
|
41
41
|
outputSignal;
|
|
42
42
|
work = /* @__PURE__ */ new Set();
|
|
43
43
|
pending = /* @__PURE__ */ new Set();
|
|
44
|
-
timers = /* @__PURE__ */ new Set();
|
|
45
44
|
boundSignal;
|
|
46
45
|
onSignalAbort = () => {
|
|
47
46
|
const callbacks = [...this.pending];
|
|
@@ -60,8 +59,6 @@ var Budget = class {
|
|
|
60
59
|
this.boundSignal?.removeEventListener("abort", this.onSignalAbort);
|
|
61
60
|
this.boundSignal = void 0;
|
|
62
61
|
this.cancellation.abort(this.context.signal.aborted ? this.context.signal.reason : new Error("du invocation closed"));
|
|
63
|
-
for (const timer of this.timers) cancelTurn(timer);
|
|
64
|
-
this.timers.clear();
|
|
65
62
|
for (const cancel of this.pending) {
|
|
66
63
|
cancel();
|
|
67
64
|
}
|
|
@@ -127,15 +124,8 @@ var Budget = class {
|
|
|
127
124
|
}
|
|
128
125
|
async fs(operation) {
|
|
129
126
|
this.step();
|
|
130
|
-
if (++this.operations % 64 === 0
|
|
131
|
-
await this.wait(() =>
|
|
132
|
-
const timer = scheduleTurn(() => {
|
|
133
|
-
this.timers.delete(timer);
|
|
134
|
-
resolve();
|
|
135
|
-
});
|
|
136
|
-
this.timers.add(timer);
|
|
137
|
-
}));
|
|
138
|
-
this.lastYield = monotonicNow();
|
|
127
|
+
if (++this.operations % 64 === 0) {
|
|
128
|
+
await this.wait(() => yieldTurn(this.ioSignal));
|
|
139
129
|
}
|
|
140
130
|
return this.wait(operation);
|
|
141
131
|
}
|