@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
package/README.md
CHANGED
|
@@ -648,11 +648,13 @@ behaviors; unsetting either variable removes its special behavior.
|
|
|
648
648
|
|
|
649
649
|
Execution quotas are unlimited by default. Set individual `limits` to opt in;
|
|
650
650
|
supplying one does not enable other quotas. Available quotas are `maxParseUnits`,
|
|
651
|
-
`maxInputBytes`, `maxOutputBytes`, `maxCommands`, `maxFileSystemOperations`,
|
|
651
|
+
`maxInputBytes`, `maxOutputBytes`, `maxPipelineBytes`, `maxCommands`, `maxFileSystemOperations`,
|
|
652
652
|
`maxPathComponents`, `maxPathnameComponents`, `maxRedirects`, `maxPipelineStages`, `maxLoopIterations`,
|
|
653
653
|
`maxSubstitutionDepth`, `maxFunctionDepth`, `maxSourceBytes`, `maxExpansionFields`, `maxExpansionBytes`,
|
|
654
654
|
`maxWallClockMs`, and `maxCpuMs`. The CPU deadline measures elapsed time including
|
|
655
|
-
waits at cooperative checkpoints. `
|
|
655
|
+
waits at cooperative checkpoints. `maxPipelineBytes` counts bytes written across
|
|
656
|
+
all pipeline edges in one invocation, including nested pipelines; terminal output
|
|
657
|
+
does not consume this quota. `pipeHighWaterMark` defaults to 64 KiB for
|
|
656
658
|
streaming backpressure and does not cap total work. `cloudflareWorkerLimits` is
|
|
657
659
|
an explicit restrictive preset. Background job quotas (`maxJobs`, `maxWaiters`,
|
|
658
660
|
`maxCleanupsPerJob`) are also unlimited unless supplied. `maxFunctionDepth` limits
|
|
@@ -58800,6 +58800,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
58800
58800
|
}
|
|
58801
58801
|
_rebuild(newCap) {
|
|
58802
58802
|
this._missKey = "";
|
|
58803
|
+
this._missSlot = -1;
|
|
58803
58804
|
const newTableLen = newCap * 2;
|
|
58804
58805
|
const newMask = newTableLen - 1;
|
|
58805
58806
|
const newTable = newCap <= 16384 ? new Int16Array(newTableLen).fill(-1) : new Int32Array(newTableLen).fill(-1);
|
|
@@ -58839,16 +58840,17 @@ var FastDirectoryEntriesMap = class {
|
|
|
58839
58840
|
this._next = writeIdx;
|
|
58840
58841
|
}
|
|
58841
58842
|
set(k, v) {
|
|
58842
|
-
|
|
58843
|
+
const missSlot = k === this._missKey ? this._missSlot : -1;
|
|
58844
|
+
this._missKey = "";
|
|
58845
|
+
this._missSlot = -1;
|
|
58846
|
+
if (missSlot >= 0 && (this._table[missSlot] === -1 || this._table[missSlot] === -2) && this._next < this._keys.length) {
|
|
58843
58847
|
const entryIdx = this._next++;
|
|
58844
|
-
this._table[
|
|
58848
|
+
this._table[missSlot] = entryIdx;
|
|
58845
58849
|
this._keys[entryIdx] = k;
|
|
58846
58850
|
this._vals[entryIdx] = v;
|
|
58847
58851
|
this.size++;
|
|
58848
|
-
this._missKey = "";
|
|
58849
58852
|
return this;
|
|
58850
58853
|
}
|
|
58851
|
-
this._missKey = "";
|
|
58852
58854
|
if (this._next >= this._keys.length) {
|
|
58853
58855
|
this._rebuild(this.size * 2 <= this._keys.length ? this._keys.length : this._keys.length * 2);
|
|
58854
58856
|
}
|
|
@@ -58880,6 +58882,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
58880
58882
|
}
|
|
58881
58883
|
delete(k) {
|
|
58882
58884
|
this._missKey = "";
|
|
58885
|
+
this._missSlot = -1;
|
|
58883
58886
|
if (this.size === 0)
|
|
58884
58887
|
return false;
|
|
58885
58888
|
let slot = this._hash(k);
|
|
@@ -58906,6 +58909,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
58906
58909
|
}
|
|
58907
58910
|
clear() {
|
|
58908
58911
|
this._missKey = "";
|
|
58912
|
+
this._missSlot = -1;
|
|
58909
58913
|
if (this._next > 0) {
|
|
58910
58914
|
this._table.fill(-1);
|
|
58911
58915
|
for (let i = 0; i < this._next; i++) {
|
|
@@ -59541,6 +59545,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59541
59545
|
if (alloc.isReleased64()) {
|
|
59542
59546
|
alloc.detachLedger(DUMMY_POOL_LEDGER);
|
|
59543
59547
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedAllocationPoolLen < SHARED_POOL_CAPACITY) {
|
|
59548
|
+
alloc.data.fill(0);
|
|
59544
59549
|
sharedAllocationPool[sharedAllocationPoolLen++] = alloc;
|
|
59545
59550
|
} else if (cache.allocations.length < 128) {
|
|
59546
59551
|
cache.allocations.push(alloc);
|
|
@@ -59548,6 +59553,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59548
59553
|
} else if (alloc.isReleased65536()) {
|
|
59549
59554
|
alloc.detachLedger(DUMMY_POOL_LEDGER);
|
|
59550
59555
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedLargeAllocationPoolLen < SHARED_LARGE_POOL_CAPACITY) {
|
|
59556
|
+
alloc.data.fill(0);
|
|
59551
59557
|
sharedLargeAllocationPool[sharedLargeAllocationPoolLen++] = alloc;
|
|
59552
59558
|
}
|
|
59553
59559
|
}
|
|
@@ -59564,6 +59570,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59564
59570
|
cache.lastFastDirNode = void 0;
|
|
59565
59571
|
}
|
|
59566
59572
|
if (node.entries.size === 0) {
|
|
59573
|
+
node.entries.clear();
|
|
59567
59574
|
if (sharedDirectoryNodePoolLen < SHARED_DIR_POOL_CAPACITY) {
|
|
59568
59575
|
sharedDirectoryNodePool[sharedDirectoryNodePoolLen++] = node;
|
|
59569
59576
|
} else if (cache.directories.length < 32) {
|
|
@@ -59579,6 +59586,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59579
59586
|
}
|
|
59580
59587
|
replaceData(node, allocation, length = allocation.data.byteLength) {
|
|
59581
59588
|
const previous = node.allocation;
|
|
59589
|
+
node.sourceRef = void 0;
|
|
59582
59590
|
this.totalBytes += length - node.byteLength;
|
|
59583
59591
|
node.byteLength = length;
|
|
59584
59592
|
node.view = length === allocation.data.byteLength ? allocation.data : void 0;
|
|
@@ -59587,11 +59595,13 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59587
59595
|
if (previous.isReleased64()) {
|
|
59588
59596
|
previous.detachLedger(DUMMY_POOL_LEDGER);
|
|
59589
59597
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedAllocationPoolLen < SHARED_POOL_CAPACITY) {
|
|
59598
|
+
previous.data.fill(0);
|
|
59590
59599
|
sharedAllocationPool[sharedAllocationPoolLen++] = previous;
|
|
59591
59600
|
}
|
|
59592
59601
|
} else if (previous.isReleased65536()) {
|
|
59593
59602
|
previous.detachLedger(DUMMY_POOL_LEDGER);
|
|
59594
59603
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedLargeAllocationPoolLen < SHARED_LARGE_POOL_CAPACITY) {
|
|
59604
|
+
previous.data.fill(0);
|
|
59595
59605
|
sharedLargeAllocationPool[sharedLargeAllocationPoolLen++] = previous;
|
|
59596
59606
|
}
|
|
59597
59607
|
}
|
|
@@ -60203,6 +60213,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
60203
60213
|
node.byteLength = length;
|
|
60204
60214
|
node.view = length === allocation.data.byteLength ? allocation.data : void 0;
|
|
60205
60215
|
}
|
|
60216
|
+
node.sourceRef = void 0;
|
|
60206
60217
|
this.changed(node, now);
|
|
60207
60218
|
}
|
|
60208
60219
|
writeMemoryFileFast(path, data, append, mode) {
|
|
@@ -60415,6 +60426,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
60415
60426
|
const entries2 = parent.entries;
|
|
60416
60427
|
const existing = nameHash !== void 0 ? entries2.getForWriteWithHash(name, nameHash) : entries2.getForWrite(name);
|
|
60417
60428
|
if (existing === void 0 && entries2._next < entries2._keys.length) {
|
|
60429
|
+
this.ledger.reserve(name.length * 2, 2, "writeFile", name);
|
|
60418
60430
|
const now = fastWriteCachedNow;
|
|
60419
60431
|
const length = data.byteLength;
|
|
60420
60432
|
const node = sharedFileNodePool[--sharedFileNodePoolLen];
|
|
@@ -60441,7 +60453,6 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
60441
60453
|
entries2._vals[entryIdx] = node;
|
|
60442
60454
|
entries2.size++;
|
|
60443
60455
|
entries2._missKey = "";
|
|
60444
|
-
this.ledger.reserve(name.length * 2, 2, "writeFile", name);
|
|
60445
60456
|
this.totalBytes += length;
|
|
60446
60457
|
this.mutationTick = this.mutationTick + 1 | 0;
|
|
60447
60458
|
parent.revision = parent.revision < 1073741823 ? parent.revision + 1 | 0 : Math.min(Number.MAX_SAFE_INTEGER + 1, parent.revision + 1);
|
package/dist/image-ast/index.js
CHANGED
|
@@ -58800,6 +58800,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
58800
58800
|
}
|
|
58801
58801
|
_rebuild(newCap) {
|
|
58802
58802
|
this._missKey = "";
|
|
58803
|
+
this._missSlot = -1;
|
|
58803
58804
|
const newTableLen = newCap * 2;
|
|
58804
58805
|
const newMask = newTableLen - 1;
|
|
58805
58806
|
const newTable = newCap <= 16384 ? new Int16Array(newTableLen).fill(-1) : new Int32Array(newTableLen).fill(-1);
|
|
@@ -58839,16 +58840,17 @@ var FastDirectoryEntriesMap = class {
|
|
|
58839
58840
|
this._next = writeIdx;
|
|
58840
58841
|
}
|
|
58841
58842
|
set(k, v) {
|
|
58842
|
-
|
|
58843
|
+
const missSlot = k === this._missKey ? this._missSlot : -1;
|
|
58844
|
+
this._missKey = "";
|
|
58845
|
+
this._missSlot = -1;
|
|
58846
|
+
if (missSlot >= 0 && (this._table[missSlot] === -1 || this._table[missSlot] === -2) && this._next < this._keys.length) {
|
|
58843
58847
|
const entryIdx = this._next++;
|
|
58844
|
-
this._table[
|
|
58848
|
+
this._table[missSlot] = entryIdx;
|
|
58845
58849
|
this._keys[entryIdx] = k;
|
|
58846
58850
|
this._vals[entryIdx] = v;
|
|
58847
58851
|
this.size++;
|
|
58848
|
-
this._missKey = "";
|
|
58849
58852
|
return this;
|
|
58850
58853
|
}
|
|
58851
|
-
this._missKey = "";
|
|
58852
58854
|
if (this._next >= this._keys.length) {
|
|
58853
58855
|
this._rebuild(this.size * 2 <= this._keys.length ? this._keys.length : this._keys.length * 2);
|
|
58854
58856
|
}
|
|
@@ -58880,6 +58882,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
58880
58882
|
}
|
|
58881
58883
|
delete(k) {
|
|
58882
58884
|
this._missKey = "";
|
|
58885
|
+
this._missSlot = -1;
|
|
58883
58886
|
if (this.size === 0)
|
|
58884
58887
|
return false;
|
|
58885
58888
|
let slot = this._hash(k);
|
|
@@ -58906,6 +58909,7 @@ var FastDirectoryEntriesMap = class {
|
|
|
58906
58909
|
}
|
|
58907
58910
|
clear() {
|
|
58908
58911
|
this._missKey = "";
|
|
58912
|
+
this._missSlot = -1;
|
|
58909
58913
|
if (this._next > 0) {
|
|
58910
58914
|
this._table.fill(-1);
|
|
58911
58915
|
for (let i = 0; i < this._next; i++) {
|
|
@@ -59541,6 +59545,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59541
59545
|
if (alloc.isReleased64()) {
|
|
59542
59546
|
alloc.detachLedger(DUMMY_POOL_LEDGER);
|
|
59543
59547
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedAllocationPoolLen < SHARED_POOL_CAPACITY) {
|
|
59548
|
+
alloc.data.fill(0);
|
|
59544
59549
|
sharedAllocationPool[sharedAllocationPoolLen++] = alloc;
|
|
59545
59550
|
} else if (cache.allocations.length < 128) {
|
|
59546
59551
|
cache.allocations.push(alloc);
|
|
@@ -59548,6 +59553,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59548
59553
|
} else if (alloc.isReleased65536()) {
|
|
59549
59554
|
alloc.detachLedger(DUMMY_POOL_LEDGER);
|
|
59550
59555
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedLargeAllocationPoolLen < SHARED_LARGE_POOL_CAPACITY) {
|
|
59556
|
+
alloc.data.fill(0);
|
|
59551
59557
|
sharedLargeAllocationPool[sharedLargeAllocationPoolLen++] = alloc;
|
|
59552
59558
|
}
|
|
59553
59559
|
}
|
|
@@ -59564,6 +59570,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59564
59570
|
cache.lastFastDirNode = void 0;
|
|
59565
59571
|
}
|
|
59566
59572
|
if (node.entries.size === 0) {
|
|
59573
|
+
node.entries.clear();
|
|
59567
59574
|
if (sharedDirectoryNodePoolLen < SHARED_DIR_POOL_CAPACITY) {
|
|
59568
59575
|
sharedDirectoryNodePool[sharedDirectoryNodePoolLen++] = node;
|
|
59569
59576
|
} else if (cache.directories.length < 32) {
|
|
@@ -59579,6 +59586,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59579
59586
|
}
|
|
59580
59587
|
replaceData(node, allocation, length = allocation.data.byteLength) {
|
|
59581
59588
|
const previous = node.allocation;
|
|
59589
|
+
node.sourceRef = void 0;
|
|
59582
59590
|
this.totalBytes += length - node.byteLength;
|
|
59583
59591
|
node.byteLength = length;
|
|
59584
59592
|
node.view = length === allocation.data.byteLength ? allocation.data : void 0;
|
|
@@ -59587,11 +59595,13 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
59587
59595
|
if (previous.isReleased64()) {
|
|
59588
59596
|
previous.detachLedger(DUMMY_POOL_LEDGER);
|
|
59589
59597
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedAllocationPoolLen < SHARED_POOL_CAPACITY) {
|
|
59598
|
+
previous.data.fill(0);
|
|
59590
59599
|
sharedAllocationPool[sharedAllocationPoolLen++] = previous;
|
|
59591
59600
|
}
|
|
59592
59601
|
} else if (previous.isReleased65536()) {
|
|
59593
59602
|
previous.detachLedger(DUMMY_POOL_LEDGER);
|
|
59594
59603
|
if (this.ledger.hasInfiniteRetained && this.ledger.hasInfiniteFileBytes && sharedLargeAllocationPoolLen < SHARED_LARGE_POOL_CAPACITY) {
|
|
59604
|
+
previous.data.fill(0);
|
|
59595
59605
|
sharedLargeAllocationPool[sharedLargeAllocationPoolLen++] = previous;
|
|
59596
59606
|
}
|
|
59597
59607
|
}
|
|
@@ -60203,6 +60213,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
60203
60213
|
node.byteLength = length;
|
|
60204
60214
|
node.view = length === allocation.data.byteLength ? allocation.data : void 0;
|
|
60205
60215
|
}
|
|
60216
|
+
node.sourceRef = void 0;
|
|
60206
60217
|
this.changed(node, now);
|
|
60207
60218
|
}
|
|
60208
60219
|
writeMemoryFileFast(path, data, append, mode) {
|
|
@@ -60415,6 +60426,7 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
60415
60426
|
const entries2 = parent.entries;
|
|
60416
60427
|
const existing = nameHash !== void 0 ? entries2.getForWriteWithHash(name, nameHash) : entries2.getForWrite(name);
|
|
60417
60428
|
if (existing === void 0 && entries2._next < entries2._keys.length) {
|
|
60429
|
+
this.ledger.reserve(name.length * 2, 2, "writeFile", name);
|
|
60418
60430
|
const now = fastWriteCachedNow;
|
|
60419
60431
|
const length = data.byteLength;
|
|
60420
60432
|
const node = sharedFileNodePool[--sharedFileNodePoolLen];
|
|
@@ -60441,7 +60453,6 @@ var MemoryFileSystem = class _MemoryFileSystem {
|
|
|
60441
60453
|
entries2._vals[entryIdx] = node;
|
|
60442
60454
|
entries2.size++;
|
|
60443
60455
|
entries2._missKey = "";
|
|
60444
|
-
this.ledger.reserve(name.length * 2, 2, "writeFile", name);
|
|
60445
60456
|
this.totalBytes += length;
|
|
60446
60457
|
this.mutationTick = this.mutationTick + 1 | 0;
|
|
60447
60458
|
parent.revision = parent.revision < 1073741823 ? parent.revision + 1 | 0 : Math.min(Number.MAX_SAFE_INTEGER + 1, parent.revision + 1);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_platform
|
|
3
|
+
} from "./chunk-B7TAL7S5.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash/src/shell/worker-limits.ts
|
|
6
|
+
init_platform();
|
|
7
|
+
var cloudflareWorkerLimits = Object.freeze({
|
|
8
|
+
maxEnvSplitBytes: 131072,
|
|
9
|
+
maxEnvSplitArguments: 1e4,
|
|
10
|
+
maxEnvSplitExpansions: 32,
|
|
11
|
+
maxEnvSplitWork: 1048576,
|
|
12
|
+
maxDirectoryStackBytes: 4194304,
|
|
13
|
+
maxDirectoryDiagnosticBytes: 65792,
|
|
14
|
+
commandLimits: Object.freeze({ archive: Object.freeze({
|
|
15
|
+
maxArchiveBytes: 4 * 1024 * 1024,
|
|
16
|
+
maxInputMemoryBytes: 8 * 1024 * 1024,
|
|
17
|
+
maxEntryBytes: 4 * 1024 * 1024,
|
|
18
|
+
maxTotalBytes: 8 * 1024 * 1024,
|
|
19
|
+
maxMembers: 1e3,
|
|
20
|
+
maxPathBytes: 4 * 1024,
|
|
21
|
+
maxDepth: 64,
|
|
22
|
+
maxPaxBytes: 64 * 1024,
|
|
23
|
+
maxFilesFromBytes: 256 * 1024,
|
|
24
|
+
maxArgumentBytes: 256 * 1024,
|
|
25
|
+
maxTextBytes: 4 * 1024 * 1024,
|
|
26
|
+
maxDiagnosticBytes: 4 * 1024,
|
|
27
|
+
maxPatternSteps: 1e6,
|
|
28
|
+
maxBufferedFileBytes: 4 * 1024 * 1024,
|
|
29
|
+
chunkSize: 16 * 1024
|
|
30
|
+
}), htmlToMarkdown: Object.freeze({
|
|
31
|
+
maxInputBytes: 4 * 1024 * 1024,
|
|
32
|
+
maxOutputBytes: 4 * 1024 * 1024,
|
|
33
|
+
maxTokenBytes: 64 * 1024,
|
|
34
|
+
maxTokens: 3e4,
|
|
35
|
+
maxNodes: 1e4,
|
|
36
|
+
maxDepth: 64,
|
|
37
|
+
maxAttributes: 64,
|
|
38
|
+
maxTableCells: 1e4,
|
|
39
|
+
maxTableCellBytes: 64 * 1024,
|
|
40
|
+
maxFiles: 64,
|
|
41
|
+
maxArgumentBytes: 256 * 1024,
|
|
42
|
+
maxDiagnosticBytes: 4 * 1024,
|
|
43
|
+
maxWorkUnits: 32 * 1024 * 1024
|
|
44
|
+
}), split: Object.freeze({ maxSuffixLength: 255 }) }),
|
|
45
|
+
maxSyntaxDepth: 64,
|
|
46
|
+
maxAdmittedHandles: 64,
|
|
47
|
+
maxDescriptorOperations: 16,
|
|
48
|
+
maxDescriptorReadBytes: 65536,
|
|
49
|
+
maxCdWork: 8388608,
|
|
50
|
+
maxCdPathBytes: 65536,
|
|
51
|
+
maxCdProbes: 4097,
|
|
52
|
+
maxCdPathComponents: 4096,
|
|
53
|
+
maxDirectoryStackEntries: 4096,
|
|
54
|
+
maxDirectoryStackOutputBytes: 65536,
|
|
55
|
+
maxGlobstarStates: 1e5,
|
|
56
|
+
maxGlobstarDepth: 128,
|
|
57
|
+
maxGlobstarEntries: 1e5,
|
|
58
|
+
maxParseUnits: 65536,
|
|
59
|
+
maxInputBytes: 4 * 1024 * 1024,
|
|
60
|
+
maxOutputBytes: 4 * 1024 * 1024,
|
|
61
|
+
maxCommands: 1e3,
|
|
62
|
+
maxFileSystemOperations: 1e4,
|
|
63
|
+
maxPathComponents: 64,
|
|
64
|
+
maxPathnameComponents: 64,
|
|
65
|
+
maxRedirects: 64,
|
|
66
|
+
maxPipelineStages: 64,
|
|
67
|
+
maxPipelineBytes: 4 * 1024 * 1024,
|
|
68
|
+
maxLoopIterations: 1e3,
|
|
69
|
+
maxSubstitutionDepth: 16,
|
|
70
|
+
maxFunctionDepth: 16,
|
|
71
|
+
maxSourceBytes: 256 * 1024,
|
|
72
|
+
maxExpansionFields: 1e3,
|
|
73
|
+
maxExpansionBytes: 4 * 1024 * 1024,
|
|
74
|
+
maxWallClockMs: 1e4,
|
|
75
|
+
maxCpuMs: 1e4,
|
|
76
|
+
pipeHighWaterMark: 16 * 1024
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// packages/safe-bash/src/shell/index.ts
|
|
80
|
+
init_platform();
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
cloudflareWorkerLimits
|
|
84
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_platform
|
|
3
|
+
} from "./chunk-B7TAL7S5.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash/src/commands/column/index.ts
|
|
6
|
+
init_platform();
|
|
7
|
+
import { columnCommands, createColumnCommand, createColumnCommands } from "../../safe-bash-command-column/index.js";
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
columnCommands,
|
|
11
|
+
createColumnCommand,
|
|
12
|
+
createColumnCommands
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_platform
|
|
3
|
+
} from "./chunk-B7TAL7S5.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash/src/commands/file/index.ts
|
|
6
|
+
init_platform();
|
|
7
|
+
import { createFileCommand, createFileCommands, evalSyncFile, fileCommands } from "../../safe-bash-command-file/index.js";
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
createFileCommand,
|
|
11
|
+
createFileCommands,
|
|
12
|
+
evalSyncFile,
|
|
13
|
+
fileCommands
|
|
14
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
builtInDirectContextExecutors
|
|
3
|
+
} from "./chunk-E7OYNDGL.js";
|
|
4
|
+
import {
|
|
5
|
+
init_platform
|
|
6
|
+
} from "./chunk-B7TAL7S5.js";
|
|
7
|
+
|
|
8
|
+
// packages/safe-bash/src/commands/table-text/index.ts
|
|
9
|
+
init_platform();
|
|
10
|
+
|
|
11
|
+
// packages/safe-bash/src/commands/table-text/paste.ts
|
|
12
|
+
init_platform();
|
|
13
|
+
import { createPasteCommand } from "../../safe-bash-command-paste/paste.js";
|
|
14
|
+
|
|
15
|
+
// packages/safe-bash/src/commands/table-text/comm.ts
|
|
16
|
+
init_platform();
|
|
17
|
+
import { createCommCommand } from "../../safe-bash-command-comm/comm.js";
|
|
18
|
+
|
|
19
|
+
// packages/safe-bash/src/commands/table-text/join.ts
|
|
20
|
+
init_platform();
|
|
21
|
+
import { createJoinCommand } from "../../safe-bash-command-join/join.js";
|
|
22
|
+
|
|
23
|
+
// packages/safe-bash/src/commands/table-text/internal.ts
|
|
24
|
+
init_platform();
|
|
25
|
+
import { Budget, Inputs, OrderCheck, RecordReader, argument, command, compare, empty, encode, fail, settings } from "../../safe-bash-table-text-engine/table-text/internal.js";
|
|
26
|
+
|
|
27
|
+
// packages/safe-bash/src/commands/table-text/index.ts
|
|
28
|
+
function createTableTextCommands(options = {}) {
|
|
29
|
+
settings(options);
|
|
30
|
+
const defs = [createPasteCommand(options), createCommCommand(options), createJoinCommand(options)];
|
|
31
|
+
for (let i = 0; i < defs.length; i++) builtInDirectContextExecutors.add(defs[i].execute);
|
|
32
|
+
return defs;
|
|
33
|
+
}
|
|
34
|
+
function tableTextCommands(options = {}) {
|
|
35
|
+
const commands = createTableTextCommands(options);
|
|
36
|
+
return { name: "table-text-commands", setup(host) {
|
|
37
|
+
if (!options.replace) for (const definition of commands) {
|
|
38
|
+
if (host.commands.has(definition.name)) throw new Error(`Command already registered: ${definition.name}`);
|
|
39
|
+
}
|
|
40
|
+
for (const definition of commands) host.commands.register(definition, { replace: options.replace ?? false });
|
|
41
|
+
} };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
createTableTextCommands,
|
|
46
|
+
tableTextCommands
|
|
47
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_platform
|
|
3
|
+
} from "./chunk-B7TAL7S5.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash/src/commands/tree/index.ts
|
|
6
|
+
init_platform();
|
|
7
|
+
import { createTreeCommand, createTreeCommands, evalSyncTree, treeCommands } from "../../safe-bash-command-tree/index.js";
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
createTreeCommand,
|
|
11
|
+
createTreeCommands,
|
|
12
|
+
evalSyncTree,
|
|
13
|
+
treeCommands
|
|
14
|
+
};
|
|
@@ -11,7 +11,6 @@ init_platform();
|
|
|
11
11
|
import { validatePath, resolvePath, normalizePath, relativePath, isPathWithin, assertPathWithin, basename, dirname, extname, joinPath, isAbsolutePath, posixPath as posixPath2 } from "@poe-platform/safe-fs/core";
|
|
12
12
|
|
|
13
13
|
export {
|
|
14
|
-
validatePath,
|
|
15
14
|
resolvePath,
|
|
16
15
|
normalizePath,
|
|
17
16
|
relativePath,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_platform
|
|
3
|
+
} from "./chunk-B7TAL7S5.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash/src/commands/split/index.ts
|
|
6
|
+
init_platform();
|
|
7
|
+
import { createSplitCommand, createSplitCommands, evalSyncSplit, splitCommands } from "../../safe-bash-command-split/index.js";
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
createSplitCommand,
|
|
11
|
+
createSplitCommands,
|
|
12
|
+
evalSyncSplit,
|
|
13
|
+
splitCommands
|
|
14
|
+
};
|