@poe-platform/safe-bash 0.1.801 → 0.1.803
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 +4 -2
- package/dist/image-ast/index.browser.js +16 -5
- package/dist/image-ast/index.js +16 -5
- package/dist/safe-bash/chunks/chunk-2LSAMQER.js +84 -0
- package/dist/safe-bash/chunks/chunk-3HQU4OJO.js +13 -0
- package/dist/safe-bash/chunks/chunk-4BSJLKNM.js +14 -0
- package/dist/safe-bash/chunks/chunk-4D4N7IU2.js +47 -0
- package/dist/safe-bash/chunks/chunk-55YJASTN.js +14 -0
- package/dist/safe-bash/chunks/{chunk-NZQXYWA3.js → chunk-5OHX7C2V.js} +0 -1
- package/dist/safe-bash/chunks/chunk-7ZBU7KYV.js +14 -0
- package/dist/safe-bash/chunks/{chunk-7VNF5BFF.js → chunk-B7PIL77G.js} +101 -415
- package/dist/safe-bash/chunks/chunk-DQP3VHSB.js +15 -0
- package/dist/safe-bash/chunks/{chunk-VQDD3G76.js → chunk-EEEWOYEG.js} +18 -18
- package/dist/safe-bash/chunks/chunk-FZE4HW6G.js +11 -0
- package/dist/safe-bash/chunks/{chunk-45PK3NWI.js → chunk-GDYNCWRV.js} +1 -1
- package/dist/safe-bash/chunks/chunk-GEG3BWGE.js +14 -0
- package/dist/safe-bash/chunks/chunk-HBCN24ZA.js +50 -0
- package/dist/safe-bash/chunks/chunk-HZ7BWKQ3.js +13 -0
- package/dist/safe-bash/chunks/{chunk-ICFDYV64.js → chunk-HZAMGT5I.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-FNDNHAGE.js → chunk-JMMEIDPF.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-IVRQ4BXL.js → chunk-PH63PLPZ.js} +7 -7
- package/dist/safe-bash/chunks/{chunk-SZH7EJLD.js → chunk-PNBBUWSM.js} +5529 -6547
- package/dist/safe-bash/chunks/chunk-QGUV42T5.js +44 -0
- package/dist/safe-bash/chunks/chunk-R3NAKOED.js +51 -0
- package/dist/safe-bash/chunks/chunk-RRR7AQ24.js +38 -0
- package/dist/safe-bash/chunks/{chunk-PQRAK7HU.js → chunk-RYFQ3LZG.js} +281 -476
- package/dist/safe-bash/chunks/chunk-VBTDHOWC.js +55 -0
- package/dist/safe-bash/chunks/{chunk-NR3EM4LS.js → chunk-VKNVHEX3.js} +1 -6
- package/dist/safe-bash/chunks/chunk-XAQMU6OY.js +14 -0
- package/dist/safe-bash/chunks/chunk-ZVD5IS4V.js +49 -0
- package/dist/safe-bash/command-chunks/{chunk-ORYGZYKW.js → chunk-4FEVBOL5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VXSLJH7G.js → chunk-6JSIFWYT.js} +26 -6
- package/dist/safe-bash/command-chunks/chunk-A7MU7762.js +200 -0
- package/dist/safe-bash/command-chunks/{chunk-KJIMDLBB.js → chunk-BXCXRYVU.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-F4TEEZTL.js → chunk-CQHP3I66.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-PEF7K3UQ.js → chunk-EARHPPPJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-QKFSRZGQ.js → chunk-GFC2NTDG.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-GIRNFXP3.js +466 -0
- package/dist/safe-bash/command-chunks/{chunk-EFANWIHL.js → chunk-GY3BWK7K.js} +1 -0
- package/dist/safe-bash/command-chunks/{chunk-FPVUD6TH.js → chunk-HDCNKOIX.js} +9 -7
- package/dist/safe-bash/command-chunks/{chunk-MQFIPHIQ.js → chunk-ILX2NOLF.js} +18 -15
- package/dist/safe-bash/command-chunks/{chunk-5E4WAO4O.js → chunk-JD5QNRNO.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-I237SNW5.js → chunk-LFJJQQND.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-W5DNF4JH.js → chunk-LOICUCHG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7U7EXOXX.js → chunk-NASVPT6F.js} +2 -1
- package/dist/safe-bash/command-chunks/{chunk-WBNZ4PRE.js → chunk-NGG2XL56.js} +7 -4
- package/dist/safe-bash/command-chunks/{chunk-GLOZX57Y.js → chunk-NKIELG7Y.js} +45 -115
- package/dist/safe-bash/command-chunks/{chunk-WPYIOKE3.js → chunk-PICVQ6B5.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-YOFC45RK.js → chunk-QVOS4YXL.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VGG2DL5Q.js → chunk-TRR4MYWF.js} +4 -0
- package/dist/safe-bash/command-chunks/{chunk-2JRBIDAD.js → chunk-V4K2JDYU.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CZ7EN3JG.js → chunk-VT6MJBEI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-PCEFOYA3.js → chunk-WWIBP2ET.js} +41 -114
- package/dist/safe-bash/command-chunks/{chunk-F6OYH562.js → chunk-X54L3DBL.js} +4 -9
- package/dist/safe-bash/command-chunks/{chunk-TNOA7FCQ.js → chunk-YVNGTIJO.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-ZDN7MJE6.js +168 -0
- package/dist/safe-bash/commands/apply-patch/index.browser.js +14 -0
- package/dist/safe-bash/commands/archive/index.browser.js +36 -0
- package/dist/safe-bash/commands/bytes/compression/index.js +54 -51
- package/dist/safe-bash/commands/chmod/index.browser.js +14 -0
- package/dist/safe-bash/commands/chmod/index.d.ts +2 -0
- package/dist/safe-bash/commands/chmod/index.js +2 -0
- package/dist/safe-bash/commands/column/index.browser.js +12 -0
- package/dist/safe-bash/commands/du/index.browser.js +14 -0
- package/dist/safe-bash/commands/expr/index.browser.js +12 -0
- package/dist/safe-bash/commands/file/index.browser.js +14 -0
- package/dist/safe-bash/commands/filesystem.js +9 -2
- package/dist/safe-bash/commands/grep-aliases/index.browser.js +14 -0
- package/dist/safe-bash/commands/html-to-markdown/index.browser.js +16 -0
- package/dist/safe-bash/commands/metadata/chmod.d.ts +1 -7
- package/dist/safe-bash/commands/metadata/chmod.js +1 -204
- package/dist/safe-bash/commands/metadata/index.browser.js +17 -0
- package/dist/safe-bash/commands/metadata/internal.d.ts +1 -30
- package/dist/safe-bash/commands/metadata/internal.js +1 -76
- package/dist/safe-bash/commands/metadata/mktemp.d.ts +1 -3
- package/dist/safe-bash/commands/metadata/mktemp.js +1 -202
- package/dist/safe-bash/commands/metadata/stat.d.ts +1 -7
- package/dist/safe-bash/commands/metadata/stat.js +1 -530
- package/dist/safe-bash/commands/mktemp/index.browser.js +13 -0
- package/dist/safe-bash/commands/mktemp/index.d.ts +2 -0
- package/dist/safe-bash/commands/mktemp/index.js +2 -0
- package/dist/safe-bash/commands/network/index.browser.js +1 -1
- package/dist/safe-bash/commands/node/index.browser.js +4 -4
- package/dist/safe-bash/commands/portable-random.d.ts +1 -1
- package/dist/safe-bash/commands/portable-random.js +1 -12
- package/dist/safe-bash/commands/python/index.browser.js +8 -8
- package/dist/safe-bash/commands/regex-execution/public.browser.js +5 -3
- package/dist/safe-bash/commands/split/index.browser.js +14 -0
- package/dist/safe-bash/commands/stat/index.browser.js +13 -0
- package/dist/safe-bash/commands/stat/index.d.ts +2 -0
- package/dist/safe-bash/commands/stat/index.js +2 -0
- package/dist/safe-bash/commands/stream-format/index.browser.js +11 -0
- package/dist/safe-bash/commands/stream-inspection/index.browser.js +11 -0
- package/dist/safe-bash/commands/streams.js +5 -5
- package/dist/safe-bash/commands/table-text/index.browser.js +11 -0
- package/dist/safe-bash/commands/text.js +48 -143
- package/dist/safe-bash/commands/time-env/index.browser.js +15 -0
- package/dist/safe-bash/commands/tree/index.browser.js +14 -0
- package/dist/safe-bash/full-core.browser.js +256 -247
- package/dist/safe-bash/opt-in/commands/yq/native-work.js +1 -0
- package/dist/safe-bash/optional-host.browser.js +12 -12
- package/dist/safe-bash/plugins/index.browser.js +25 -11
- package/dist/safe-bash/registry-entry.browser.js +28 -14
- package/dist/safe-bash/search.browser.js +48 -0
- package/dist/safe-bash/shell/runtime.d.ts +3 -9
- package/dist/safe-bash/shell/runtime.js +63 -311
- package/dist/safe-bash/shell/shell.js +0 -23
- package/dist/safe-bash/shell/types.d.ts +2 -0
- package/dist/safe-bash/shell/worker-limits.js +1 -0
- package/dist/safe-bash/shell-entry.browser.js +19 -10
- package/dist/safe-bash/worker/host.js +1 -1
- package/dist/safe-bash-command-bc/index.js +12 -5
- package/dist/safe-bash-command-bzip2/index.js +4 -3
- package/dist/safe-bash-command-chmod/LICENSE +21 -0
- package/dist/safe-bash-command-chmod/command.d.ts +7 -0
- package/dist/safe-bash-command-chmod/command.js +11 -0
- package/dist/safe-bash-command-chmod/index.d.ts +6 -0
- package/dist/safe-bash-command-chmod/index.js +27 -0
- package/dist/safe-bash-command-exiftool/index.js +5 -5
- package/dist/safe-bash-command-find/find.js +1 -1
- package/dist/safe-bash-command-find/index.js +1 -1
- package/dist/safe-bash-command-fmt/index.js +9 -2
- package/dist/safe-bash-command-gzip/index.js +45 -42
- package/dist/safe-bash-command-imagemagick/index.js +3 -1
- package/dist/safe-bash-command-jq/index.js +1 -1
- package/dist/safe-bash-command-jq/jq.js +1 -1
- package/dist/safe-bash-command-less/index.js +12 -3
- package/dist/safe-bash-command-mktemp/LICENSE +21 -0
- package/dist/safe-bash-command-mktemp/command.d.ts +3 -0
- package/dist/safe-bash-command-mktemp/command.js +9 -0
- package/dist/safe-bash-command-mktemp/index.d.ts +6 -0
- package/dist/safe-bash-command-mktemp/index.js +25 -0
- package/dist/safe-bash-command-nl/index.js +1 -1
- package/dist/safe-bash-command-nl/nl.js +1 -1
- package/dist/safe-bash-command-od/index.js +6 -2
- package/dist/safe-bash-command-op/index.js +25 -6
- package/dist/safe-bash-command-rg/index.js +1 -1
- package/dist/safe-bash-command-rg/rg-command.d.ts +0 -1
- package/dist/safe-bash-command-rg/rg-command.js +3 -5
- package/dist/safe-bash-command-sed/index.js +1 -1
- package/dist/safe-bash-command-sed/sed.js +1 -1
- package/dist/safe-bash-command-sips/index.js +13 -5
- package/dist/safe-bash-command-sponge/index.js +10 -3
- package/dist/safe-bash-command-stat/LICENSE +21 -0
- package/dist/safe-bash-command-stat/command.d.ts +7 -0
- package/dist/safe-bash-command-stat/command.js +9 -0
- package/dist/safe-bash-command-stat/index.d.ts +6 -0
- package/dist/safe-bash-command-stat/index.js +25 -0
- package/dist/safe-bash-command-unexpand/index.js +1 -1
- package/dist/safe-bash-command-unexpand/unexpand.js +1 -1
- package/dist/safe-bash-command-unrtf/index.js +11 -1
- package/dist/safe-bash-command-xxd/index.js +6 -2
- package/dist/safe-bash-command-xz/command.d.ts +1 -1
- package/dist/safe-bash-command-xz/index.js +3 -2
- package/dist/safe-bash-command-yq/index.js +1 -0
- package/dist/safe-bash-command-yq/native-work.js +1 -0
- package/dist/safe-bash-command-yq/query.js +3 -0
- package/dist/safe-bash-compression-engine/bounded-codec.js +3 -3
- package/dist/safe-bash-compression-engine/codec-loader.js +2 -2
- package/dist/safe-bash-compression-engine/files.js +6 -6
- package/dist/safe-bash-compression-engine/index.js +5 -5
- package/dist/safe-bash-compression-engine/operand.js +6 -6
- package/dist/safe-bash-compression-engine/options.js +1 -1
- package/dist/safe-bash-compression-engine/stream.js +5 -5
- package/dist/safe-bash-compression-engine/zstd-decode.js +4 -4
- package/dist/safe-bash-contracts/escaping.js +2 -2
- package/dist/safe-bash-contracts/filesystem-output.js +2 -2
- package/dist/safe-bash-contracts/index.js +2 -2
- package/dist/safe-bash-contracts/io.d.ts +2 -0
- package/dist/safe-bash-contracts/io.js +1 -1
- package/dist/safe-bash-contracts/output.js +2 -2
- package/dist/safe-bash-io-engine/commands/search/requirements.js +1 -1
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +1 -1
- package/dist/safe-bash-mcp/index.browser.js +11 -1
- package/dist/safe-bash-mcp/index.js +38 -17
- package/dist/safe-bash-metadata-engine/LICENSE +21 -0
- package/dist/safe-bash-metadata-engine/index.d.ts +30 -0
- package/dist/safe-bash-metadata-engine/index.js +82 -0
- package/dist/safe-bash-metadata-engine/random.d.ts +1 -0
- package/dist/safe-bash-metadata-engine/random.js +21 -0
- package/dist/safe-bash-regex-engine/index.js +4 -4
- package/dist/safe-bash-regex-engine/text/budget.d.ts +0 -1
- package/dist/safe-bash-regex-engine/text/budget.js +1 -1
- package/dist/safe-bash-regex-engine/text/regex.js +4 -4
- package/dist/safe-bash-regex-engine/text/replacement-buffer.js +2 -2
- package/dist/safe-bash-regex-engine/text/rust-syntax.js +2 -2
- package/dist/safe-bash-search-engine/ergonomic-regex.js +2 -2
- package/dist/safe-bash-search-engine/glob.js +2 -2
- package/dist/safe-bash-search-engine/grep.js +2 -2
- package/dist/safe-bash-search-engine/matcher.js +2 -2
- package/dist/safe-bash-search-engine/options.d.ts +2 -0
- package/dist/safe-bash-search-engine/options.js +1 -1
- package/dist/safe-bash-search-engine/output.js +1 -1
- package/dist/safe-bash-search-engine/shared.js +2 -2
- package/dist/safe-bash-search-engine/walk.js +3 -3
- package/dist/safe-playwright-cloudflare/browser-snapshot-json.js +2 -2
- package/dist/safe-playwright-cloudflare/browser-snapshot-references.js +1 -1
- package/package.json +91 -10
|
@@ -8535,6 +8535,7 @@ function compileToolArguments(tool, options = {}) {
|
|
|
8535
8535
|
// src/commands.ts
|
|
8536
8536
|
import {
|
|
8537
8537
|
collectBytes,
|
|
8538
|
+
readBytes,
|
|
8538
8539
|
commandRuntimeIdentity,
|
|
8539
8540
|
createOutputOperation,
|
|
8540
8541
|
getCommandArguments
|
|
@@ -8741,7 +8742,15 @@ async function stdinArguments(context, args, signal, maxBytes) {
|
|
|
8741
8742
|
const inline = meaningful.length === 1 && meaningful[0] === "--raw=-";
|
|
8742
8743
|
const separated = meaningful.length === 2 && meaningful[0] === "--raw" && meaningful[1] === "-";
|
|
8743
8744
|
if (!inline && !separated) return args;
|
|
8744
|
-
const
|
|
8745
|
+
const source = (async function* () {
|
|
8746
|
+
let totalBytes = 0;
|
|
8747
|
+
for await (const chunk of readBytes(context.stdin, signal)) {
|
|
8748
|
+
totalBytes += chunk.byteLength;
|
|
8749
|
+
context.inputBudget?.check(totalBytes);
|
|
8750
|
+
yield chunk;
|
|
8751
|
+
}
|
|
8752
|
+
})();
|
|
8753
|
+
const bytes = await collectBytes(source, { signal, maxBytes });
|
|
8745
8754
|
let json;
|
|
8746
8755
|
try {
|
|
8747
8756
|
json = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
@@ -8830,6 +8839,7 @@ async function createRemoteMcpCommands(servers, options = {}) {
|
|
|
8830
8839
|
}
|
|
8831
8840
|
} catch (error) {
|
|
8832
8841
|
operation.signal.throwIfAborted();
|
|
8842
|
+
if (typeof error === "object" && error !== null && ("code" in error && error.code === "ERR_BUDGET_EXCEEDED" || "name" in error && error.name === "BudgetExceededError")) throw error;
|
|
8833
8843
|
await emit(errors, `${JSON.stringify({ error: errorDetails(error) })}
|
|
8834
8844
|
`, outputLimit);
|
|
8835
8845
|
return { exitCode: 2 };
|
|
@@ -13801,6 +13801,7 @@ function compileToolArguments(tool, options = {}) {
|
|
|
13801
13801
|
// src/commands.ts
|
|
13802
13802
|
import {
|
|
13803
13803
|
collectBytes,
|
|
13804
|
+
readBytes,
|
|
13804
13805
|
commandRuntimeIdentity,
|
|
13805
13806
|
createOutputOperation,
|
|
13806
13807
|
getCommandArguments
|
|
@@ -14007,7 +14008,15 @@ async function stdinArguments(context, args, signal, maxBytes) {
|
|
|
14007
14008
|
const inline = meaningful.length === 1 && meaningful[0] === "--raw=-";
|
|
14008
14009
|
const separated = meaningful.length === 2 && meaningful[0] === "--raw" && meaningful[1] === "-";
|
|
14009
14010
|
if (!inline && !separated) return args;
|
|
14010
|
-
const
|
|
14011
|
+
const source = (async function* () {
|
|
14012
|
+
let totalBytes = 0;
|
|
14013
|
+
for await (const chunk of readBytes(context.stdin, signal)) {
|
|
14014
|
+
totalBytes += chunk.byteLength;
|
|
14015
|
+
context.inputBudget?.check(totalBytes);
|
|
14016
|
+
yield chunk;
|
|
14017
|
+
}
|
|
14018
|
+
})();
|
|
14019
|
+
const bytes = await collectBytes(source, { signal, maxBytes });
|
|
14011
14020
|
let json;
|
|
14012
14021
|
try {
|
|
14013
14022
|
json = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
@@ -14096,6 +14105,7 @@ async function createRemoteMcpCommands(servers, options = {}) {
|
|
|
14096
14105
|
}
|
|
14097
14106
|
} catch (error) {
|
|
14098
14107
|
operation.signal.throwIfAborted();
|
|
14108
|
+
if (typeof error === "object" && error !== null && ("code" in error && error.code === "ERR_BUDGET_EXCEEDED" || "name" in error && error.name === "BudgetExceededError")) throw error;
|
|
14099
14109
|
await emit(errors, `${JSON.stringify({ error: errorDetails(error) })}
|
|
14100
14110
|
`, outputLimit);
|
|
14101
14111
|
return { exitCode: 2 };
|
|
@@ -14544,7 +14554,7 @@ async function collectBytes2(source, options) {
|
|
|
14544
14554
|
reserved += bytes;
|
|
14545
14555
|
}
|
|
14546
14556
|
options.signal?.throwIfAborted();
|
|
14547
|
-
for await (const chunk of
|
|
14557
|
+
for await (const chunk of readBytes2(source, options.signal)) {
|
|
14548
14558
|
reserved -= inputBytes;
|
|
14549
14559
|
inputBytes = 0;
|
|
14550
14560
|
if (chunk.byteLength > (options.maxBytes ?? Infinity) - size) {
|
|
@@ -14738,7 +14748,7 @@ var ReadBytesGenerator = class {
|
|
|
14738
14748
|
});
|
|
14739
14749
|
}
|
|
14740
14750
|
};
|
|
14741
|
-
function
|
|
14751
|
+
function readBytes2(source, signal) {
|
|
14742
14752
|
if (signal !== void 0 && source[readBytesSignal] === signal) {
|
|
14743
14753
|
return source;
|
|
14744
14754
|
}
|
|
@@ -16133,6 +16143,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
16133
16143
|
}
|
|
16134
16144
|
_rebuild(newCap) {
|
|
16135
16145
|
this._missKey = "";
|
|
16146
|
+
this._missSlot = -1;
|
|
16136
16147
|
const newTableLen = newCap * 2;
|
|
16137
16148
|
const newMask = newTableLen - 1;
|
|
16138
16149
|
const newTable = newCap <= 16384 ? new Int16Array(newTableLen).fill(-1) : new Int32Array(newTableLen).fill(-1);
|
|
@@ -16172,16 +16183,17 @@ var FastDirectoryEntriesMap = class {
|
|
|
16172
16183
|
this._next = writeIdx;
|
|
16173
16184
|
}
|
|
16174
16185
|
set(k, v) {
|
|
16175
|
-
|
|
16186
|
+
const missSlot = k === this._missKey ? this._missSlot : -1;
|
|
16187
|
+
this._missKey = "";
|
|
16188
|
+
this._missSlot = -1;
|
|
16189
|
+
if (missSlot >= 0 && (this._table[missSlot] === -1 || this._table[missSlot] === -2) && this._next < this._keys.length) {
|
|
16176
16190
|
const entryIdx = this._next++;
|
|
16177
|
-
this._table[
|
|
16191
|
+
this._table[missSlot] = entryIdx;
|
|
16178
16192
|
this._keys[entryIdx] = k;
|
|
16179
16193
|
this._vals[entryIdx] = v;
|
|
16180
16194
|
this.size++;
|
|
16181
|
-
this._missKey = "";
|
|
16182
16195
|
return this;
|
|
16183
16196
|
}
|
|
16184
|
-
this._missKey = "";
|
|
16185
16197
|
if (this._next >= this._keys.length) {
|
|
16186
16198
|
this._rebuild(this.size * 2 <= this._keys.length ? this._keys.length : this._keys.length * 2);
|
|
16187
16199
|
}
|
|
@@ -16213,6 +16225,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
16213
16225
|
}
|
|
16214
16226
|
delete(k) {
|
|
16215
16227
|
this._missKey = "";
|
|
16228
|
+
this._missSlot = -1;
|
|
16216
16229
|
if (this.size === 0)
|
|
16217
16230
|
return false;
|
|
16218
16231
|
let slot = this._hash(k);
|
|
@@ -16239,6 +16252,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
16239
16252
|
}
|
|
16240
16253
|
clear() {
|
|
16241
16254
|
this._missKey = "";
|
|
16255
|
+
this._missSlot = -1;
|
|
16242
16256
|
if (this._next > 0) {
|
|
16243
16257
|
this._table.fill(-1);
|
|
16244
16258
|
for (let i = 0; i < this._next; i++) {
|
|
@@ -16874,6 +16888,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16874
16888
|
if (alloc.isReleased64()) {
|
|
16875
16889
|
alloc.detachLedger(DUMMY_POOL_LEDGER);
|
|
16876
16890
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedAllocationPoolLen < SHARED_POOL_CAPACITY) {
|
|
16891
|
+
alloc.data.fill(0);
|
|
16877
16892
|
sharedAllocationPool[sharedAllocationPoolLen++] = alloc;
|
|
16878
16893
|
} else if (cache.allocations.length < 128) {
|
|
16879
16894
|
cache.allocations.push(alloc);
|
|
@@ -16881,6 +16896,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16881
16896
|
} else if (alloc.isReleased65536()) {
|
|
16882
16897
|
alloc.detachLedger(DUMMY_POOL_LEDGER);
|
|
16883
16898
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedLargeAllocationPoolLen < SHARED_LARGE_POOL_CAPACITY) {
|
|
16899
|
+
alloc.data.fill(0);
|
|
16884
16900
|
sharedLargeAllocationPool[sharedLargeAllocationPoolLen++] = alloc;
|
|
16885
16901
|
}
|
|
16886
16902
|
}
|
|
@@ -16897,6 +16913,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16897
16913
|
cache.lastFastDirNode = void 0;
|
|
16898
16914
|
}
|
|
16899
16915
|
if (node.entries.size === 0) {
|
|
16916
|
+
node.entries.clear();
|
|
16900
16917
|
if (sharedDirectoryNodePoolLen < SHARED_DIR_POOL_CAPACITY) {
|
|
16901
16918
|
sharedDirectoryNodePool[sharedDirectoryNodePoolLen++] = node;
|
|
16902
16919
|
} else if (cache.directories.length < 32) {
|
|
@@ -16912,6 +16929,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16912
16929
|
}
|
|
16913
16930
|
replaceData(node, allocation, length = allocation.data.byteLength) {
|
|
16914
16931
|
const previous = node.allocation;
|
|
16932
|
+
node.sourceRef = void 0;
|
|
16915
16933
|
this.totalBytes += length - node.byteLength;
|
|
16916
16934
|
node.byteLength = length;
|
|
16917
16935
|
node.view = length === allocation.data.byteLength ? allocation.data : void 0;
|
|
@@ -16920,11 +16938,13 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
16920
16938
|
if (previous.isReleased64()) {
|
|
16921
16939
|
previous.detachLedger(DUMMY_POOL_LEDGER);
|
|
16922
16940
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedAllocationPoolLen < SHARED_POOL_CAPACITY) {
|
|
16941
|
+
previous.data.fill(0);
|
|
16923
16942
|
sharedAllocationPool[sharedAllocationPoolLen++] = previous;
|
|
16924
16943
|
}
|
|
16925
16944
|
} else if (previous.isReleased65536()) {
|
|
16926
16945
|
previous.detachLedger(DUMMY_POOL_LEDGER);
|
|
16927
16946
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedLargeAllocationPoolLen < SHARED_LARGE_POOL_CAPACITY) {
|
|
16947
|
+
previous.data.fill(0);
|
|
16928
16948
|
sharedLargeAllocationPool[sharedLargeAllocationPoolLen++] = previous;
|
|
16929
16949
|
}
|
|
16930
16950
|
}
|
|
@@ -17536,6 +17556,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17536
17556
|
node.byteLength = length;
|
|
17537
17557
|
node.view = length === allocation.data.byteLength ? allocation.data : void 0;
|
|
17538
17558
|
}
|
|
17559
|
+
node.sourceRef = void 0;
|
|
17539
17560
|
this.changed(node, now);
|
|
17540
17561
|
}
|
|
17541
17562
|
writeMemoryFileFast(path6, data, append, mode) {
|
|
@@ -17748,6 +17769,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17748
17769
|
const entries2 = parent.entries;
|
|
17749
17770
|
const existing = nameHash !== void 0 ? entries2.getForWriteWithHash(name, nameHash) : entries2.getForWrite(name);
|
|
17750
17771
|
if (existing === void 0 && entries2._next < entries2._keys.length) {
|
|
17772
|
+
this.ledger.reserve(name.length * 2, 2, "writeFile", name);
|
|
17751
17773
|
const now = fastWriteCachedNow;
|
|
17752
17774
|
const length = data.byteLength;
|
|
17753
17775
|
const node = sharedFileNodePool[--sharedFileNodePoolLen];
|
|
@@ -17774,7 +17796,6 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
17774
17796
|
entries2._vals[entryIdx] = node;
|
|
17775
17797
|
entries2.size++;
|
|
17776
17798
|
entries2._missKey = "";
|
|
17777
|
-
this.ledger.reserve(name.length * 2, 2, "writeFile", name);
|
|
17778
17799
|
this.totalBytes += length;
|
|
17779
17800
|
this.mutationTick = this.mutationTick + 1 | 0;
|
|
17780
17801
|
parent.revision = parent.revision < 1073741823 ? parent.revision + 1 | 0 : Math.min(Number.MAX_SAFE_INTEGER + 1, parent.revision + 1);
|
|
@@ -19545,7 +19566,7 @@ var ReadOnlyFileSystem = class _ReadOnlyFileSystem {
|
|
|
19545
19566
|
if (typeof this.#filesystem.readStream !== "function") {
|
|
19546
19567
|
throw new FsError("ENOTSUP", { syscall: "readStream", path: path6 });
|
|
19547
19568
|
}
|
|
19548
|
-
for await (const chunk of
|
|
19569
|
+
for await (const chunk of readBytes2(this.#filesystem.readStream(path6, options), options?.signal)) {
|
|
19549
19570
|
yield new Uint8Array(chunk);
|
|
19550
19571
|
}
|
|
19551
19572
|
}
|
|
@@ -21308,7 +21329,7 @@ var WebDavFileSystem = class {
|
|
|
21308
21329
|
let size = prefix.byteLength;
|
|
21309
21330
|
if (prefix.byteLength)
|
|
21310
21331
|
yield prefix;
|
|
21311
|
-
for await (const chunk of
|
|
21332
|
+
for await (const chunk of readBytes2(source, signal)) {
|
|
21312
21333
|
size += chunk.byteLength;
|
|
21313
21334
|
if (size > limit)
|
|
21314
21335
|
fail("EFBIG", "writeStream", path6, "upload exceeds byte limit");
|
|
@@ -22647,7 +22668,7 @@ var S3FileSystem = class {
|
|
|
22647
22668
|
upload = (async function* () {
|
|
22648
22669
|
let count = 0;
|
|
22649
22670
|
reading = true;
|
|
22650
|
-
for await (const chunk of
|
|
22671
|
+
for await (const chunk of readBytes2(body, signal)) {
|
|
22651
22672
|
if (chunk.length > expected.ContentLength - count)
|
|
22652
22673
|
fail2("EIO", "rename", source, "source body exceeds its enumerated length");
|
|
22653
22674
|
count += chunk.length;
|
|
@@ -22828,7 +22849,7 @@ var S3FileSystem = class {
|
|
|
22828
22849
|
fail2("EIO", "readStream", path6, "response ETag differs from requested snapshot");
|
|
22829
22850
|
if (output.ContentLength !== void 0 && output.ContentLength !== expected)
|
|
22830
22851
|
fail2("EIO", "readStream", path6, "response length differs from requested snapshot");
|
|
22831
|
-
iterator =
|
|
22852
|
+
iterator = readBytes2(output.Body, signal)[Symbol.asyncIterator]();
|
|
22832
22853
|
while (true) {
|
|
22833
22854
|
const result = await iterator.next();
|
|
22834
22855
|
if (result.done)
|
|
@@ -22908,7 +22929,7 @@ var S3FileSystem = class {
|
|
|
22908
22929
|
let finished = false;
|
|
22909
22930
|
const body = (async function* () {
|
|
22910
22931
|
let total = 0;
|
|
22911
|
-
for await (const chunk of
|
|
22932
|
+
for await (const chunk of readBytes2(source, signal)) {
|
|
22912
22933
|
if (chunk.length > this.maxStreamBytes - total)
|
|
22913
22934
|
fail2("EFBIG", "writeStream", path6);
|
|
22914
22935
|
total += chunk.length;
|
|
@@ -23298,10 +23319,10 @@ async function authenticateRemoteMcpServer(value, options) {
|
|
|
23298
23319
|
binding: snapshotConfigurationBindingOptions(options.binding)
|
|
23299
23320
|
};
|
|
23300
23321
|
options.signal?.throwIfAborted();
|
|
23301
|
-
const limits = remoteLimits({ ...options, requestTimeoutMs: options.requestTimeoutMs ??
|
|
23302
|
-
|
|
23303
|
-
|
|
23304
|
-
const signal =
|
|
23322
|
+
const limits = remoteLimits({ ...options, requestTimeoutMs: options.requestTimeoutMs ?? Infinity });
|
|
23323
|
+
const signals = options.signal === void 0 ? [] : [options.signal];
|
|
23324
|
+
if (limits.requestTimeoutMs !== Infinity) signals.push(AbortSignal.timeout(limits.requestTimeoutMs));
|
|
23325
|
+
const signal = AbortSignal.any(signals);
|
|
23305
23326
|
const configuration = parseRemoteMcpConfiguration({ version: 1, servers: [value] }, options.binding);
|
|
23306
23327
|
const browser = options.binding.oauth?.browser === void 0 ? void 0 : { ...options.binding.oauth.browser };
|
|
23307
23328
|
const opener = browser?.openBrowser;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Poe Platform
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type CommandContext, type CommandDefinition, type CommandHandler, type FileType } from "../safe-bash-contracts/index.js";
|
|
2
|
+
export interface MetadataLimits {
|
|
3
|
+
readonly maxEntries: number;
|
|
4
|
+
readonly maxDepth: number;
|
|
5
|
+
readonly maxOutputBytes: number;
|
|
6
|
+
readonly maxArgumentBytes: number;
|
|
7
|
+
readonly maxAttempts: number;
|
|
8
|
+
readonly maxArguments?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface MetadataCommandsOptions {
|
|
11
|
+
readonly replace?: boolean;
|
|
12
|
+
readonly umask?: number;
|
|
13
|
+
readonly limits?: Partial<MetadataLimits>;
|
|
14
|
+
}
|
|
15
|
+
export declare function settings(options?: MetadataCommandsOptions): {
|
|
16
|
+
limits: MetadataLimits;
|
|
17
|
+
umask: number;
|
|
18
|
+
};
|
|
19
|
+
export declare class MetadataBudget {
|
|
20
|
+
readonly context: CommandContext;
|
|
21
|
+
readonly limits: MetadataLimits;
|
|
22
|
+
private entries;
|
|
23
|
+
private outputBytes;
|
|
24
|
+
get remainingEntries(): number;
|
|
25
|
+
constructor(context: CommandContext, limits: MetadataLimits);
|
|
26
|
+
step(depth?: number): Promise<void>;
|
|
27
|
+
output(text: string | Uint8Array): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export declare function metadataCommand(name: string, handler: CommandHandler): CommandDefinition;
|
|
30
|
+
export declare function permissionString(mode: number, type: FileType): string;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_buffer
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash-metadata-engine/src/index.ts
|
|
6
|
+
init_buffer();
|
|
7
|
+
import { byteLength } from "../safe-bash-io-engine/byte-encoding.js";
|
|
8
|
+
import { yieldTurn } from "../safe-bash-contracts/yield.js";
|
|
9
|
+
import { FsError, writeBytes } from "../safe-bash-contracts/index.js";
|
|
10
|
+
import { diagnostic } from "../safe-bash-io-engine/internal.js";
|
|
11
|
+
import { gnuInformation } from "../safe-bash-io-engine/gnu-information.js";
|
|
12
|
+
function settings(options = {}) {
|
|
13
|
+
const limits = { maxEntries: Infinity, maxDepth: Infinity, maxOutputBytes: Infinity, maxArgumentBytes: Infinity, maxAttempts: Infinity, maxArguments: Infinity, ...options.limits };
|
|
14
|
+
for (const [key, value] of Object.entries(limits)) {
|
|
15
|
+
if (value !== Infinity && (!Number.isSafeInteger(value) || value < (key === "maxDepth" ? 0 : 1))) throw new RangeError(`Invalid metadata limit: ${key}`);
|
|
16
|
+
}
|
|
17
|
+
const umask = options.umask ?? 18;
|
|
18
|
+
if (!Number.isInteger(umask) || umask < 0 || umask > 511) throw new RangeError("Invalid metadata umask");
|
|
19
|
+
return { limits, umask };
|
|
20
|
+
}
|
|
21
|
+
var MetadataBudget = class {
|
|
22
|
+
constructor(context, limits) {
|
|
23
|
+
this.context = context;
|
|
24
|
+
this.limits = limits;
|
|
25
|
+
if (context.args.reduce((size, argument) => size + byteLength(argument), 0) > limits.maxArgumentBytes) throw new FsError("EFBIG", { message: "metadata argument limit exceeded" });
|
|
26
|
+
}
|
|
27
|
+
context;
|
|
28
|
+
limits;
|
|
29
|
+
entries = 0;
|
|
30
|
+
outputBytes = 0;
|
|
31
|
+
get remainingEntries() {
|
|
32
|
+
return this.limits.maxEntries - this.entries;
|
|
33
|
+
}
|
|
34
|
+
async step(depth = 0) {
|
|
35
|
+
this.context.signal.throwIfAborted();
|
|
36
|
+
if (++this.entries > this.limits.maxEntries || depth > this.limits.maxDepth) throw new FsError("EFBIG", { message: "metadata traversal limit exceeded" });
|
|
37
|
+
if (this.entries % 128 === 0) await yieldTurn();
|
|
38
|
+
this.context.signal.throwIfAborted();
|
|
39
|
+
}
|
|
40
|
+
async output(text) {
|
|
41
|
+
const bytes = typeof text === "string" ? new TextEncoder().encode(text) : text;
|
|
42
|
+
if (bytes.byteLength > this.limits.maxOutputBytes - this.outputBytes) throw new FsError("EFBIG", { message: "metadata output limit exceeded" });
|
|
43
|
+
this.outputBytes += bytes.byteLength;
|
|
44
|
+
await writeBytes(this.context.stdout, bytes, this.context.signal);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
function metadataCommand(name, handler) {
|
|
48
|
+
return { name, async execute(context) {
|
|
49
|
+
context.signal.throwIfAborted();
|
|
50
|
+
try {
|
|
51
|
+
const infoPromise = gnuInformation(name, context);
|
|
52
|
+
if (infoPromise) {
|
|
53
|
+
const info = await infoPromise;
|
|
54
|
+
if (info) return info;
|
|
55
|
+
}
|
|
56
|
+
return await handler(context);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
context.signal.throwIfAborted();
|
|
59
|
+
await diagnostic(context, error);
|
|
60
|
+
return { exitCode: 1 };
|
|
61
|
+
}
|
|
62
|
+
} };
|
|
63
|
+
}
|
|
64
|
+
function permissionString(mode, type) {
|
|
65
|
+
let text = type === "directory" ? "d" : type === "symlink" ? "l" : type === "character" ? "c" : "-";
|
|
66
|
+
for (const [read, write, execute, special, lower, upper] of [
|
|
67
|
+
[256, 128, 64, 2048, "s", "S"],
|
|
68
|
+
[32, 16, 8, 1024, "s", "S"],
|
|
69
|
+
[4, 2, 1, 512, "t", "T"]
|
|
70
|
+
]) {
|
|
71
|
+
text += mode & read ? "r" : "-";
|
|
72
|
+
text += mode & write ? "w" : "-";
|
|
73
|
+
text += mode & special ? mode & execute ? lower : upper : mode & execute ? "x" : "-";
|
|
74
|
+
}
|
|
75
|
+
return text;
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
MetadataBudget,
|
|
79
|
+
metadataCommand,
|
|
80
|
+
permissionString,
|
|
81
|
+
settings
|
|
82
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function randomInteger(maximum: number): number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_buffer
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash-metadata-engine/src/random.ts
|
|
6
|
+
init_buffer();
|
|
7
|
+
function randomInteger(maximum) {
|
|
8
|
+
const range = 4294967296;
|
|
9
|
+
if (!Number.isSafeInteger(maximum) || maximum < 1 || maximum > range) {
|
|
10
|
+
throw new RangeError("Random integer maximum must be an integer from 1 to 2^32");
|
|
11
|
+
}
|
|
12
|
+
const limit = Math.floor(range / maximum) * maximum;
|
|
13
|
+
const sample = new Uint32Array(1);
|
|
14
|
+
do {
|
|
15
|
+
globalThis.crypto.getRandomValues(sample);
|
|
16
|
+
} while (sample[0] >= limit);
|
|
17
|
+
return sample[0] % maximum;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
randomInteger
|
|
21
|
+
};
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
trySubstitutePairSync,
|
|
7
7
|
trySubstitutePairToBufferSync,
|
|
8
8
|
trySubstituteSync
|
|
9
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-
|
|
9
|
+
} from "../safe-bash/command-chunks/chunk-WWIBP2ET.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-VT6MJBEI.js";
|
|
11
11
|
import {
|
|
12
12
|
RustPatternError,
|
|
13
13
|
simpleCaseFold
|
|
14
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
15
|
-
import "../safe-bash/command-chunks/chunk-
|
|
14
|
+
} from "../safe-bash/command-chunks/chunk-YVNGTIJO.js";
|
|
15
|
+
import "../safe-bash/command-chunks/chunk-X54L3DBL.js";
|
|
16
16
|
import {
|
|
17
17
|
init_buffer
|
|
18
18
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -27,7 +27,6 @@ export declare class Budget {
|
|
|
27
27
|
private unlimited;
|
|
28
28
|
private signal;
|
|
29
29
|
private checkpoints;
|
|
30
|
-
private hasExtYield;
|
|
31
30
|
private readonly yieldTimes;
|
|
32
31
|
static acquire(context: CommandContext, options: TextProgramOptions): Budget;
|
|
33
32
|
static release(budget: Budget): void;
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
trySubstitutePairSync,
|
|
7
7
|
trySubstitutePairToBufferSync,
|
|
8
8
|
trySubstituteSync
|
|
9
|
-
} from "../../safe-bash/command-chunks/chunk-
|
|
10
|
-
import "../../safe-bash/command-chunks/chunk-
|
|
11
|
-
import "../../safe-bash/command-chunks/chunk-
|
|
12
|
-
import "../../safe-bash/command-chunks/chunk-
|
|
9
|
+
} from "../../safe-bash/command-chunks/chunk-WWIBP2ET.js";
|
|
10
|
+
import "../../safe-bash/command-chunks/chunk-VT6MJBEI.js";
|
|
11
|
+
import "../../safe-bash/command-chunks/chunk-YVNGTIJO.js";
|
|
12
|
+
import "../../safe-bash/command-chunks/chunk-X54L3DBL.js";
|
|
13
13
|
import "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
14
14
|
export {
|
|
15
15
|
BytePattern,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ReplacementBuffer
|
|
3
|
-
} from "../../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../../safe-bash/command-chunks/chunk-VT6MJBEI.js";
|
|
4
|
+
import "../../safe-bash/command-chunks/chunk-X54L3DBL.js";
|
|
5
5
|
import "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
6
6
|
export {
|
|
7
7
|
ReplacementBuffer
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
RustPatternError,
|
|
3
3
|
parseRustPattern,
|
|
4
4
|
simpleCaseFold
|
|
5
|
-
} from "../../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../../safe-bash/command-chunks/chunk-YVNGTIJO.js";
|
|
6
|
+
import "../../safe-bash/command-chunks/chunk-X54L3DBL.js";
|
|
7
7
|
import "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
8
|
export {
|
|
9
9
|
RustPatternError,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ErgonomicVmMatcher,
|
|
3
3
|
prepareErgonomicRegex
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-EARHPPPJ.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-TRR4MYWF.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-AVX5VLX5.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
8
|
export {
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
Glob,
|
|
3
3
|
ignoreRules,
|
|
4
4
|
matchGlobs
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-LFJJQQND.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-TRR4MYWF.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-AVX5VLX5.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
9
|
export {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "../safe-bash/command-chunks/chunk-ZDKO22YH.js";
|
|
4
4
|
import {
|
|
5
5
|
prepareErgonomicRegex
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-EARHPPPJ.js";
|
|
7
7
|
import {
|
|
8
8
|
SearchError
|
|
9
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
9
|
+
} from "../safe-bash/command-chunks/chunk-TRR4MYWF.js";
|
|
10
10
|
import "../safe-bash/command-chunks/chunk-AVX5VLX5.js";
|
|
11
11
|
import {
|
|
12
12
|
init_buffer
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prepareErgonomicRegex
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-EARHPPPJ.js";
|
|
4
4
|
import {
|
|
5
5
|
SearchError
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-TRR4MYWF.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-AVX5VLX5.js";
|
|
8
8
|
import {
|
|
9
9
|
init_buffer
|
|
@@ -15,6 +15,7 @@ export interface SearchOptions {
|
|
|
15
15
|
export declare class SearchError extends PublicDiagnostic {
|
|
16
16
|
}
|
|
17
17
|
export interface Arguments {
|
|
18
|
+
noConfig?: boolean;
|
|
18
19
|
help?: boolean | undefined;
|
|
19
20
|
version?: "short" | "long" | undefined;
|
|
20
21
|
patterns: string[];
|
|
@@ -75,6 +76,7 @@ export interface Arguments {
|
|
|
75
76
|
}
|
|
76
77
|
export declare function count(value: string, flag: string): number;
|
|
77
78
|
export declare class ParsedArguments implements Arguments {
|
|
79
|
+
noConfig: boolean;
|
|
78
80
|
help?: boolean | undefined;
|
|
79
81
|
version?: "short" | "long" | undefined;
|
|
80
82
|
patterns: string[];
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
SearchError,
|
|
4
4
|
count,
|
|
5
5
|
parse
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-TRR4MYWF.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-AVX5VLX5.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
9
|
export {
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
pathFor,
|
|
8
8
|
sharedOutBufGeneration,
|
|
9
9
|
trySyncLineBatches
|
|
10
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-
|
|
10
|
+
} from "../safe-bash/command-chunks/chunk-4FEVBOL5.js";
|
|
11
|
+
import "../safe-bash/command-chunks/chunk-TRR4MYWF.js";
|
|
12
12
|
import "../safe-bash/command-chunks/chunk-AVX5VLX5.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
14
14
|
export {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pathFor
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-4FEVBOL5.js";
|
|
4
4
|
import {
|
|
5
5
|
Glob,
|
|
6
6
|
ignoreRules,
|
|
7
7
|
matchGlobs
|
|
8
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
8
|
+
} from "../safe-bash/command-chunks/chunk-LFJJQQND.js";
|
|
9
9
|
import {
|
|
10
10
|
SearchError
|
|
11
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
11
|
+
} from "../safe-bash/command-chunks/chunk-TRR4MYWF.js";
|
|
12
12
|
import {
|
|
13
13
|
defaultFileTypes
|
|
14
14
|
} from "../safe-bash/command-chunks/chunk-AVX5VLX5.js";
|
|
@@ -5,7 +5,7 @@ import { serializeNativeSnapshot, } from "./browser-snapshot-json-injected.js";
|
|
|
5
5
|
// failures, including timeout, still retire potentially in-flight captures.
|
|
6
6
|
export const captureBrowserSnapshotJSON = async (page, options) => {
|
|
7
7
|
const native = page;
|
|
8
|
-
const signal = options.timeoutMs === 0 ? options.signal : AbortSignal.any([
|
|
8
|
+
const signal = (options.timeoutMs === 0 || !Number.isFinite(options.timeoutMs)) ? options.signal : AbortSignal.any([
|
|
9
9
|
options.signal,
|
|
10
10
|
AbortSignal.timeout(options.timeoutMs),
|
|
11
11
|
]);
|
|
@@ -26,7 +26,7 @@ export const captureBrowserSnapshotJSON = async (page, options) => {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
async function capture(page, options) {
|
|
29
|
-
await page._snapshotForAI({ timeout: options.timeoutMs });
|
|
29
|
+
await page._snapshotForAI({ timeout: options.timeoutMs === Infinity ? 0 : options.timeoutMs });
|
|
30
30
|
options.signal.throwIfAborted();
|
|
31
31
|
const root = page._connection.toImpl(page).mainFrame();
|
|
32
32
|
const forest = [];
|
|
@@ -19,7 +19,7 @@ async function readWitness(operation, signal) {
|
|
|
19
19
|
/** Preserve native accessibility IDs, but bind immutable identities in one RPC per frame.
|
|
20
20
|
* Borrow the provider's utility handle; acquire no per-node browser resources here. */
|
|
21
21
|
export const captureBrowserSnapshotReferences = async (page, refs, options) => {
|
|
22
|
-
const signal = options.timeoutMs === 0 ? options.signal : AbortSignal.any([options.signal, AbortSignal.timeout(options.timeoutMs)]);
|
|
22
|
+
const signal = (options.timeoutMs === 0 || !Number.isFinite(options.timeoutMs)) ? options.signal : AbortSignal.any([options.signal, AbortSignal.timeout(options.timeoutMs)]);
|
|
23
23
|
signal.throwIfAborted();
|
|
24
24
|
let onAbort = () => { };
|
|
25
25
|
const aborted = new Promise((_, reject) => {
|