@poe-platform/safe-bash 0.1.787 → 0.1.789

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.
Files changed (199) hide show
  1. package/README.md +1 -1
  2. package/dist/safe-bash/chunks/{chunk-WHURJBET.js → chunk-2MUJ7RLZ.js} +1 -1
  3. package/dist/safe-bash/chunks/{chunk-PYTLIUST.js → chunk-CTUHLNJM.js} +2 -2
  4. package/dist/safe-bash/chunks/{chunk-Z3HX3ZBA.js → chunk-D4PHJK4T.js} +1 -1
  5. package/dist/safe-bash/chunks/{chunk-O6356Z27.js → chunk-H7MMJS26.js} +2 -2
  6. package/dist/safe-bash/chunks/{chunk-Q3E6C3DX.js → chunk-KHJGUF2W.js} +14 -0
  7. package/dist/safe-bash/chunks/{chunk-FJZNUUOQ.js → chunk-VUVKC6HV.js} +1 -1
  8. package/dist/safe-bash/chunks/{chunk-ZMYVCRAF.js → chunk-X5ZCECM6.js} +2 -2
  9. package/dist/safe-bash/chunks/{git-UFNPAOYZ.js → git-HO7WDPHZ.js} +2 -2
  10. package/dist/safe-bash/command-chunks/{chunk-PFBJR2PY.js → chunk-2KRKKW5S.js} +2 -2
  11. package/dist/safe-bash/command-chunks/{chunk-4DSJDVBM.js → chunk-32F3RBUW.js} +10 -749
  12. package/dist/safe-bash/command-chunks/{chunk-WVWWRMFD.js → chunk-3KROFHBT.js} +1 -1
  13. package/dist/safe-bash/command-chunks/{chunk-L3MLMXL4.js → chunk-3ZK5F23O.js} +1 -1
  14. package/dist/safe-bash/command-chunks/{chunk-4QX6XCDD.js → chunk-4RNIZ3RT.js} +79 -0
  15. package/dist/safe-bash/command-chunks/{chunk-IFUNAM4D.js → chunk-5L62A5RO.js} +1 -1
  16. package/dist/safe-bash/command-chunks/{chunk-D7TADAYG.js → chunk-64LG3EVJ.js} +17 -0
  17. package/dist/safe-bash/command-chunks/{chunk-JUDOV5MJ.js → chunk-6F7QJMJ3.js} +1 -1
  18. package/dist/safe-bash/command-chunks/{chunk-IJ3FXP4Q.js → chunk-A3ZX6SCY.js} +1 -1
  19. package/dist/safe-bash/command-chunks/{chunk-DREUDEQG.js → chunk-AT6ZSOE6.js} +3 -3
  20. package/dist/safe-bash/command-chunks/{chunk-BUKYQBXO.js → chunk-BJ6DGYJA.js} +12 -12
  21. package/dist/safe-bash/command-chunks/{chunk-KSIGF4AG.js → chunk-BK4CMEE6.js} +1 -1
  22. package/dist/safe-bash/command-chunks/{chunk-NSEUBSOD.js → chunk-CXMOCPPH.js} +2 -2
  23. package/dist/safe-bash/command-chunks/{chunk-XGMWWUHV.js → chunk-CZ5DAK4K.js} +1 -1
  24. package/dist/safe-bash/command-chunks/{chunk-Z57TV6TC.js → chunk-EZ2DTOLI.js} +4 -2
  25. package/dist/safe-bash/command-chunks/{chunk-ADCGH6A7.js → chunk-FH3D75FC.js} +1 -1
  26. package/dist/safe-bash/command-chunks/{chunk-WYJTWJZ5.js → chunk-G3G6W5ZE.js} +1 -1
  27. package/dist/safe-bash/command-chunks/{chunk-3HDIDEUJ.js → chunk-GF54KE2M.js} +1 -1
  28. package/dist/safe-bash/command-chunks/{chunk-3JS4FOLB.js → chunk-HETU7MYN.js} +1 -1
  29. package/dist/safe-bash/command-chunks/{chunk-Z7TYZG3A.js → chunk-IHHTTQX6.js} +5 -3
  30. package/dist/safe-bash/command-chunks/{chunk-INDIFLBW.js → chunk-JTAGNROA.js} +4 -0
  31. package/dist/safe-bash/command-chunks/{chunk-Z47EO74H.js → chunk-MYKK3Q5G.js} +1 -1
  32. package/dist/safe-bash/command-chunks/{chunk-GZOUGVVV.js → chunk-OYZ534IK.js} +1 -1
  33. package/dist/safe-bash/command-chunks/chunk-PGEYORBZ.js +25 -0
  34. package/dist/safe-bash/command-chunks/chunk-QM4UZF3C.js +753 -0
  35. package/dist/safe-bash/command-chunks/{chunk-TOSM3T3A.js → chunk-UJOO6DKY.js} +20 -9
  36. package/dist/safe-bash/command-chunks/{chunk-TFZEYNMX.js → chunk-VQLFJCG7.js} +1 -1
  37. package/dist/safe-bash/command-chunks/{chunk-BIXN77VL.js → chunk-VUG324ER.js} +10 -0
  38. package/dist/safe-bash/command-chunks/{chunk-2LP3VMPA.js → chunk-WFDW4XXD.js} +1 -17
  39. package/dist/safe-bash/command-chunks/chunk-WR37IS4O.js +318 -0
  40. package/dist/safe-bash/command-chunks/{chunk-Y5IHIAY3.js → chunk-XNHSCU6I.js} +7 -3
  41. package/dist/safe-bash/commands/basic.js +148 -48
  42. package/dist/safe-bash/commands/bytes/compression/index.js +5 -6
  43. package/dist/safe-bash/commands/cmp.d.ts +2 -3
  44. package/dist/safe-bash/commands/cmp.js +2 -689
  45. package/dist/safe-bash/commands/docx/index.browser.js +3 -46
  46. package/dist/safe-bash/commands/docx/index.d.ts +2 -24
  47. package/dist/safe-bash/commands/docx/index.js +2 -41
  48. package/dist/safe-bash/commands/docx/io.d.ts +1 -14
  49. package/dist/safe-bash/commands/docx/io.js +1 -15
  50. package/dist/safe-bash/commands/llm/index.browser.js +3 -3
  51. package/dist/safe-bash/commands/network/index.browser.js +3 -3
  52. package/dist/safe-bash/commands/node/index.browser.js +3 -3
  53. package/dist/safe-bash/commands/pptx/index.d.ts +2 -28
  54. package/dist/safe-bash/commands/pptx/index.js +2 -152
  55. package/dist/safe-bash/commands/printf-float.d.ts +1 -0
  56. package/dist/safe-bash/commands/printf-float.js +48 -38
  57. package/dist/safe-bash/commands/printf-format.js +9 -6
  58. package/dist/safe-bash/commands/printf-quote.d.ts +3 -0
  59. package/dist/safe-bash/commands/printf-quote.js +62 -0
  60. package/dist/safe-bash/commands/printf-wide.d.ts +5 -0
  61. package/dist/safe-bash/commands/printf-wide.js +41 -0
  62. package/dist/safe-bash/commands/python/index.browser.js +2 -2
  63. package/dist/safe-bash/commands/truncate.d.ts +2 -3
  64. package/dist/safe-bash/commands/truncate.js +2 -686
  65. package/dist/safe-bash/contracts/diagnostics.d.ts +2 -0
  66. package/dist/safe-bash/contracts/diagnostics.js +2 -0
  67. package/dist/safe-bash/contracts/runtime-control.d.ts +2 -0
  68. package/dist/safe-bash/contracts/runtime-control.js +2 -0
  69. package/dist/safe-bash/core.browser.d.ts +1 -1
  70. package/dist/safe-bash/core.browser.js +2651 -4871
  71. package/dist/safe-bash/core.d.ts +10 -0
  72. package/dist/safe-bash/opt-in/commands/cmp/index.d.ts +6 -2
  73. package/dist/safe-bash/opt-in/commands/cmp/index.js +776 -79
  74. package/dist/safe-bash/opt-in/commands/cmp/options.d.ts +0 -12
  75. package/dist/safe-bash/opt-in/commands/cmp/options.js +0 -153
  76. package/dist/safe-bash/opt-in/commands/truncate/index.d.ts +8 -3
  77. package/dist/safe-bash/opt-in/commands/truncate/index.js +790 -272
  78. package/dist/safe-bash/opt-in/commands/truncate/sync.d.ts +1 -0
  79. package/dist/safe-bash/opt-in/commands/truncate/sync.js +60 -0
  80. package/dist/safe-bash/optional-host.browser.js +9 -1
  81. package/dist/safe-bash/optional-host.d.ts +3 -1
  82. package/dist/safe-bash/optional-host.js +3 -1
  83. package/dist/safe-bash/shell/runtime.js +10 -6
  84. package/dist/safe-bash-checksum-engine/index.d.ts +1 -1
  85. package/dist/safe-bash-checksum-engine/index.js +14 -2
  86. package/dist/safe-bash-command-bzip2/index.js +2 -1
  87. package/dist/safe-bash-command-cmp/index.d.ts +10 -0
  88. package/dist/safe-bash-command-cmp/index.js +796 -0
  89. package/dist/safe-bash-command-cmp/options.d.ts +12 -0
  90. package/dist/safe-bash-command-cmp/options.js +42 -0
  91. package/dist/safe-bash-command-csvcut/index.js +11 -8
  92. package/dist/safe-bash-command-csvgrep/index.js +35 -7
  93. package/dist/safe-bash-command-csvkit/codecs/python.js +4 -3
  94. package/dist/safe-bash-command-csvkit/codecs/utf8.js +3 -2
  95. package/dist/safe-bash-command-csvkit/index.js +80 -324
  96. package/dist/safe-bash-command-csvkit/python-regex.d.ts +5 -0
  97. package/dist/safe-bash-command-csvkit/python-regex.js +14 -0
  98. package/dist/safe-bash-command-csvkit/runtime.d.ts +1 -0
  99. package/dist/safe-bash-command-csvkit/sync-support.js +4 -2
  100. package/dist/safe-bash-command-diff3/index.js +3 -0
  101. package/dist/safe-bash-command-docx/LICENSE +21 -0
  102. package/dist/safe-bash-command-docx/index.d.ts +30 -0
  103. package/dist/safe-bash-command-docx/index.js +67 -0
  104. package/dist/safe-bash-command-docx/io.d.ts +14 -0
  105. package/dist/safe-bash-command-docx/io.js +26 -0
  106. package/dist/safe-bash-command-envsubst/index.js +34 -3
  107. package/dist/safe-bash-command-exiftool/index.js +3 -0
  108. package/dist/safe-bash-command-ffmpeg/index.js +1102 -1088
  109. package/dist/safe-bash-command-fold/family.js +1 -1
  110. package/dist/safe-bash-command-fold/index.js +1 -1
  111. package/dist/safe-bash-command-htmlq/index.js +5 -0
  112. package/dist/safe-bash-command-imagemagick/index.d.ts +25 -21
  113. package/dist/safe-bash-command-imagemagick/index.js +669 -271
  114. package/dist/safe-bash-command-mmdc/index.js +48 -10
  115. package/dist/safe-bash-command-mmdc/svg.d.ts +1 -0
  116. package/dist/safe-bash-command-op/index.js +19 -14
  117. package/dist/safe-bash-command-pandoc/command.js +1 -1
  118. package/dist/safe-bash-command-pandoc/index.js +1 -1
  119. package/dist/safe-bash-command-pdfimages/index.d.ts +7 -1
  120. package/dist/safe-bash-command-pdfimages/index.js +63 -33
  121. package/dist/safe-bash-command-pdfinfo/index.d.ts +24 -20
  122. package/dist/safe-bash-command-pdfinfo/index.js +370 -161
  123. package/dist/safe-bash-command-pdftk/index.d.ts +7 -3
  124. package/dist/safe-bash-command-pdftk/index.js +114 -45
  125. package/dist/safe-bash-command-pdftoppm/index.d.ts +15 -7
  126. package/dist/safe-bash-command-pdftoppm/index.js +179 -109
  127. package/dist/safe-bash-command-pdftotext/index.d.ts +9 -5
  128. package/dist/safe-bash-command-pdftotext/index.js +90 -27
  129. package/dist/safe-bash-command-pptx/LICENSE +21 -0
  130. package/dist/safe-bash-command-pptx/index.d.ts +33 -0
  131. package/dist/safe-bash-command-pptx/index.js +168 -0
  132. package/dist/safe-bash-command-qpdf/index.d.ts +9 -3
  133. package/dist/safe-bash-command-qpdf/index.js +80 -29
  134. package/dist/safe-bash-command-sha512sum/index.js +12 -475
  135. package/dist/safe-bash-command-sips/index.d.ts +9 -5
  136. package/dist/safe-bash-command-sips/index.js +63 -44
  137. package/dist/safe-bash-command-soffice/index.d.ts +9 -3
  138. package/dist/safe-bash-command-soffice/index.js +65 -24
  139. package/dist/safe-bash-command-sqlite3/engine.d.ts +9 -0
  140. package/dist/safe-bash-command-sqlite3/index.d.ts +1 -0
  141. package/dist/safe-bash-command-sqlite3/index.js +851 -352
  142. package/dist/safe-bash-command-ssconvert/formats/xls.js +3 -3
  143. package/dist/safe-bash-command-timeout/index.js +3 -3
  144. package/dist/safe-bash-command-truncate/index.d.ts +8 -3
  145. package/dist/safe-bash-command-truncate/index.js +790 -272
  146. package/dist/safe-bash-command-truncate/sync.d.ts +1 -0
  147. package/dist/safe-bash-command-truncate/sync.js +60 -0
  148. package/dist/safe-bash-command-wkhtmltopdf/index.js +92 -38
  149. package/dist/safe-bash-command-wkhtmltopdf/pdf-renderer.d.ts +1 -1
  150. package/dist/safe-bash-command-xxd/index.js +78 -20
  151. package/dist/safe-bash-command-xz/command.d.ts +4 -0
  152. package/dist/safe-bash-command-xz/index.d.ts +1 -1
  153. package/dist/safe-bash-command-xz/index.js +1 -1
  154. package/dist/safe-bash-compression-engine/bounded-codec.js +3 -3
  155. package/dist/safe-bash-compression-engine/codec-loader.js +2 -2
  156. package/dist/safe-bash-compression-engine/files.js +6 -6
  157. package/dist/safe-bash-compression-engine/index.js +5 -5
  158. package/dist/safe-bash-compression-engine/operand.js +6 -6
  159. package/dist/safe-bash-compression-engine/stream.js +5 -5
  160. package/dist/safe-bash-compression-engine/zstd-decode.js +4 -4
  161. package/dist/safe-bash-contracts/command.js +3 -3
  162. package/dist/safe-bash-contracts/diagnostics.js +3 -3
  163. package/dist/safe-bash-contracts/escaping.js +9 -9
  164. package/dist/safe-bash-contracts/filesystem-descriptor.js +3 -3
  165. package/dist/safe-bash-contracts/filesystem-output.js +8 -8
  166. package/dist/safe-bash-contracts/index.js +21 -19
  167. package/dist/safe-bash-contracts/io.d.ts +12 -0
  168. package/dist/safe-bash-contracts/io.js +4 -1
  169. package/dist/safe-bash-contracts/output.js +3 -2
  170. package/dist/safe-bash-contracts/runtime-control.js +2 -2
  171. package/dist/safe-bash-contracts/signals.js +1 -1
  172. package/dist/safe-bash-contracts/yield.d.ts +1 -0
  173. package/dist/safe-bash-contracts/yield.js +3 -1
  174. package/dist/safe-bash-csv-engine/index.d.ts +10 -1
  175. package/dist/safe-bash-csv-engine/index.js +78 -6
  176. package/dist/safe-bash-io-engine/commands/search/requirements.js +3 -3
  177. package/dist/safe-bash-io-engine/commands/text-programs/shared.js +3 -3
  178. package/dist/safe-bash-io-engine/gnu-information.js +1 -1
  179. package/dist/safe-bash-io-engine/internal.d.ts +1 -1
  180. package/dist/safe-bash-io-engine/internal.js +2 -2
  181. package/dist/safe-bash-mcp/index.browser.d.ts +875 -0
  182. package/dist/safe-bash-mcp/index.browser.js +8740 -0
  183. package/dist/safe-bash-mcp/index.js +32 -31
  184. package/dist/safe-bash-query-engine/capture.js +3 -3
  185. package/dist/safe-bash-query-engine/delpaths.js +3 -3
  186. package/dist/safe-bash-query-engine/formats.js +2 -2
  187. package/dist/safe-bash-query-engine/index.js +12 -12
  188. package/dist/safe-bash-query-engine/indices.js +3 -3
  189. package/dist/safe-bash-query-engine/input.js +1 -1
  190. package/dist/safe-bash-query-engine/interpreter.js +10 -10
  191. package/dist/safe-bash-query-engine/query-core.js +12 -12
  192. package/dist/safe-bash-query-engine/regex.js +3 -3
  193. package/dist/safe-bash-query-engine/splits.js +4 -4
  194. package/dist/safe-bash-query-engine/values.js +2 -2
  195. package/package.json +9 -3
  196. package/dist/safe-bash/opt-in/commands/cmp/compare.js +0 -95
  197. package/dist/safe-bash/opt-in/commands/cmp/io.js +0 -218
  198. package/dist/safe-bash/command-chunks/{chunk-FXYWQ6S4.js → chunk-2VTMZTV3.js} +0 -0
  199. package/dist/safe-bash/command-chunks/{chunk-DEH3CMGL.js → chunk-QJ3ONEBI.js} +3 -3
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  describe
3
- } from "./chunk-IFUNAM4D.js";
3
+ } from "./chunk-5L62A5RO.js";
4
4
  import {
5
5
  JqError,
6
6
  JqLimitError,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-6NTY42E5.js";
4
4
  import {
5
5
  boundedCodec
6
- } from "./chunk-ADCGH6A7.js";
6
+ } from "./chunk-FH3D75FC.js";
7
7
  import {
8
8
  init_buffer
9
9
  } from "./chunk-HX3SHTCE.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ yieldTurn
3
+ } from "./chunk-64LG3EVJ.js";
1
4
  import {
2
5
  FsError
3
6
  } from "./chunk-U6CJOXRY.js";
@@ -866,6 +869,81 @@ function createLegacyWritable(pipe) {
866
869
  }
867
870
  };
868
871
  }
872
+ var InputByteBudget = class _InputByteBudget {
873
+ maximum;
874
+ #used = 0;
875
+ #failure;
876
+ static limit(value = Infinity) {
877
+ if (value !== Infinity && (!Number.isSafeInteger(value) || value < 0)) {
878
+ throw new RangeError("maxInputBytes must be a nonnegative safe integer or Infinity");
879
+ }
880
+ return value;
881
+ }
882
+ constructor(maximum = Infinity) {
883
+ this.maximum = maximum;
884
+ _InputByteBudget.limit(maximum);
885
+ }
886
+ assertOpen() {
887
+ if (this.#failure)
888
+ throw this.#failure;
889
+ }
890
+ charge(bytes) {
891
+ this.assertOpen();
892
+ if (!Number.isSafeInteger(bytes) || bytes < 0)
893
+ throw new RangeError("Invalid input byte charge");
894
+ if (bytes > this.maximum - this.#used) {
895
+ this.#failure = new FsError("EFBIG", { message: "command input byte limit exceeded" });
896
+ throw this.#failure;
897
+ }
898
+ this.#used += bytes;
899
+ }
900
+ async run(context, execute) {
901
+ const fs = context.fs;
902
+ const limited = {
903
+ ...context,
904
+ stdin: this.read(context.stdin, context.signal),
905
+ fs: Object.create(fs, {
906
+ readFile: { value: async (...args) => {
907
+ this.assertOpen();
908
+ const bytes = await fs.readFile(...args);
909
+ this.charge(bytes.byteLength);
910
+ return bytes;
911
+ } },
912
+ ...fs.readStream ? { readStream: { value: (...args) => {
913
+ this.assertOpen();
914
+ return this.read(fs.readStream(...args), context.signal);
915
+ } } } : {}
916
+ }),
917
+ inputBudget: {
918
+ maxBytes: Math.min(this.maximum, context.inputBudget?.maxBytes ?? Infinity),
919
+ check: (total) => {
920
+ this.assertOpen();
921
+ if (total > this.maximum)
922
+ this.charge(total);
923
+ context.inputBudget?.check(total);
924
+ }
925
+ }
926
+ };
927
+ try {
928
+ return await execute(limited);
929
+ } finally {
930
+ context.signal.throwIfAborted();
931
+ this.assertOpen();
932
+ }
933
+ }
934
+ async *read(source, signal) {
935
+ let chunks = 0;
936
+ for await (const chunk of readBytes(source, signal)) {
937
+ this.charge(chunk.byteLength);
938
+ if (++chunks % 64 === 0)
939
+ await yieldTurn(signal);
940
+ signal.throwIfAborted();
941
+ yield chunk;
942
+ }
943
+ this.assertOpen();
944
+ signal.throwIfAborted();
945
+ }
946
+ };
869
947
 
870
948
  export {
871
949
  managedSignalSymbol,
@@ -879,6 +957,7 @@ export {
879
957
  writeBytes,
880
958
  pipeBytes,
881
959
  collectText,
960
+ InputByteBudget,
882
961
  collectBytes2 as collectBytes,
883
962
  readBytes2 as readBytes,
884
963
  toByteSource
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  jsonFragments,
6
6
  renderJsonFragment
7
- } from "./chunk-BIXN77VL.js";
7
+ } from "./chunk-VUG324ER.js";
8
8
  import {
9
9
  JqError,
10
10
  JqLimitError,
@@ -417,6 +417,22 @@ function yieldTurn(signal) {
417
417
  timeoutHandle = setTimeout(finish, 0);
418
418
  });
419
419
  }
420
+ async function drainCooperativeSteps(steps, signal) {
421
+ try {
422
+ let next = steps.next();
423
+ while (!next.done) {
424
+ try {
425
+ await yieldTurn(signal);
426
+ next = steps.next();
427
+ } catch (error) {
428
+ next = steps.throw(error);
429
+ }
430
+ }
431
+ return next.value;
432
+ } finally {
433
+ steps.return(void 0);
434
+ }
435
+ }
420
436
 
421
437
  export {
422
438
  monotonicNow,
@@ -429,6 +445,7 @@ export {
429
445
  scheduleTurn,
430
446
  cancelTurn,
431
447
  yieldTurn,
448
+ drainCooperativeSteps,
432
449
  combineManagedSignals,
433
450
  createManagedControlController,
434
451
  toNativeAbortSignal,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pathOf
3
- } from "./chunk-TOSM3T3A.js";
3
+ } from "./chunk-UJOO6DKY.js";
4
4
  import {
5
5
  inputRequirements
6
6
  } from "./chunk-YAFQG4SC.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  builtInDirectContextExecutors
3
- } from "./chunk-WYJTWJZ5.js";
3
+ } from "./chunk-G3G6W5ZE.js";
4
4
  import {
5
5
  concatShellValues,
6
6
  shellValueBytes,
@@ -1,9 +1,9 @@
1
- import {
2
- Interpreter
3
- } from "./chunk-BUKYQBXO.js";
4
1
  import {
5
2
  parse
6
3
  } from "./chunk-JUMF6JDJ.js";
4
+ import {
5
+ Interpreter
6
+ } from "./chunk-BJ6DGYJA.js";
7
7
  import {
8
8
  Budget,
9
9
  JqLimitError,
@@ -3,23 +3,27 @@ import {
3
3
  } from "./chunk-5PM5TEPM.js";
4
4
  import {
5
5
  splitRegex
6
- } from "./chunk-NSEUBSOD.js";
6
+ } from "./chunk-CXMOCPPH.js";
7
7
  import {
8
8
  scanRegex,
9
9
  substituteRegex
10
- } from "./chunk-WVWWRMFD.js";
10
+ } from "./chunk-3KROFHBT.js";
11
+ import {
12
+ fromDateIso8601,
13
+ toDateIso8601
14
+ } from "./chunk-SNXWY3KV.js";
11
15
  import {
12
16
  delpaths
13
- } from "./chunk-TFZEYNMX.js";
17
+ } from "./chunk-VQLFJCG7.js";
14
18
  import {
15
19
  formatValue
16
- } from "./chunk-3JS4FOLB.js";
20
+ } from "./chunk-HETU7MYN.js";
17
21
  import {
18
22
  indices
19
- } from "./chunk-Z47EO74H.js";
23
+ } from "./chunk-MYKK3Q5G.js";
20
24
  import {
21
25
  capture
22
- } from "./chunk-GZOUGVVV.js";
26
+ } from "./chunk-OYZ534IK.js";
23
27
  import {
24
28
  binary,
25
29
  compare,
@@ -33,7 +37,7 @@ import {
33
37
  sortedKeys,
34
38
  stableSort,
35
39
  type
36
- } from "./chunk-IFUNAM4D.js";
40
+ } from "./chunk-5L62A5RO.js";
37
41
  import {
38
42
  splitString
39
43
  } from "./chunk-NYUMOVF2.js";
@@ -42,11 +46,7 @@ import {
42
46
  measureValue,
43
47
  parseJson,
44
48
  stringify
45
- } from "./chunk-BIXN77VL.js";
46
- import {
47
- fromDateIso8601,
48
- toDateIso8601
49
- } from "./chunk-SNXWY3KV.js";
49
+ } from "./chunk-VUG324ER.js";
50
50
  import {
51
51
  JqError,
52
52
  JqHalt,
@@ -6,7 +6,7 @@ import {
6
6
  addAbortSignalWaiter,
7
7
  isManagedAbortSignal,
8
8
  removeAbortSignalWaiter
9
- } from "./chunk-D7TADAYG.js";
9
+ } from "./chunk-64LG3EVJ.js";
10
10
  import {
11
11
  init_buffer
12
12
  } from "./chunk-HX3SHTCE.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  regexError
3
- } from "./chunk-WVWWRMFD.js";
3
+ } from "./chunk-3KROFHBT.js";
4
4
  import {
5
5
  describe
6
- } from "./chunk-IFUNAM4D.js";
6
+ } from "./chunk-5L62A5RO.js";
7
7
  import {
8
8
  JqError
9
9
  } from "./chunk-UPOI7O7Y.js";
@@ -5,7 +5,7 @@ import {
5
5
  outputFailure,
6
6
  removeManagedAbortWaiter,
7
7
  writeBytes
8
- } from "./chunk-4QX6XCDD.js";
8
+ } from "./chunk-4RNIZ3RT.js";
9
9
  import {
10
10
  init_buffer
11
11
  } from "./chunk-HX3SHTCE.js";
@@ -1,7 +1,9 @@
1
1
  import {
2
- CsvkitBlocked,
3
2
  PythonException
4
- } from "./chunk-2LP3VMPA.js";
3
+ } from "./chunk-PGEYORBZ.js";
4
+ import {
5
+ CsvkitBlocked
6
+ } from "./chunk-WFDW4XXD.js";
5
7
  import {
6
8
  init_buffer
7
9
  } from "./chunk-HX3SHTCE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCodec
3
- } from "./chunk-DEH3CMGL.js";
3
+ } from "./chunk-QJ3ONEBI.js";
4
4
  import {
5
5
  CompressedDataError
6
6
  } from "./chunk-Z6SFT6OC.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  addAbortSignalWaiter,
3
3
  removeAbortSignalWaiter
4
- } from "./chunk-D7TADAYG.js";
4
+ } from "./chunk-64LG3EVJ.js";
5
5
  import {
6
6
  init_buffer
7
7
  } from "./chunk-HX3SHTCE.js";
@@ -5,7 +5,7 @@ import {
5
5
  chunkBytes,
6
6
  stagingLimit,
7
7
  transform
8
- } from "./chunk-PFBJR2PY.js";
8
+ } from "./chunk-2KRKKW5S.js";
9
9
  import {
10
10
  formats
11
11
  } from "./chunk-KHGQDFQ7.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  stringify
3
- } from "./chunk-BIXN77VL.js";
3
+ } from "./chunk-VUG324ER.js";
4
4
  import {
5
5
  JqError
6
6
  } from "./chunk-UPOI7O7Y.js";
@@ -1,11 +1,13 @@
1
1
  import {
2
2
  decodeFrames,
3
3
  utf8Codec
4
- } from "./chunk-Z57TV6TC.js";
4
+ } from "./chunk-EZ2DTOLI.js";
5
5
  import {
6
- CsvkitBlocked,
7
6
  PythonException
8
- } from "./chunk-2LP3VMPA.js";
7
+ } from "./chunk-PGEYORBZ.js";
8
+ import {
9
+ CsvkitBlocked
10
+ } from "./chunk-WFDW4XXD.js";
9
11
  import {
10
12
  init_buffer
11
13
  } from "./chunk-HX3SHTCE.js";
@@ -911,6 +911,7 @@ function createFoldEngine(options, locale, configuration = {}, signal) {
911
911
 
912
912
  // packages/safe-bash-command-fold/dist/command.js
913
913
  init_buffer();
914
+ import { yieldTurn } from "../../safe-bash-contracts/yield.js";
914
915
  import { commandRuntimeIdentity, getCommandArguments } from "../../safe-bash-contracts/command.js";
915
916
  import { FsError } from "../../safe-bash-contracts/errors.js";
916
917
  import { readBytes, writeBytes } from "../../safe-bash-contracts/io.js";
@@ -1109,6 +1110,8 @@ async function executeFold(context, configuration, invocation) {
1109
1110
  `);
1110
1111
  };
1111
1112
  for (const file of options.files.length ? options.files : ["-"]) {
1113
+ await yieldTurn(signal);
1114
+ signal.throwIfAborted();
1112
1115
  signal.throwIfAborted();
1113
1116
  let source;
1114
1117
  let ownedInput = 0;
@@ -1191,6 +1194,7 @@ async function executeFold(context, configuration, invocation) {
1191
1194
  if (!length)
1192
1195
  await deliver(engine.push(next.value));
1193
1196
  for (let offset = 0; offset < length; offset += 4096) {
1197
+ await yieldTurn(signal);
1194
1198
  signal.throwIfAborted();
1195
1199
  const unit = new Uint8Array(byteBuffer.call(next.value), byteOffset.call(next.value) + offset, Math.min(4096, length - offset));
1196
1200
  const engIn = engine.inputBytes?.() ?? engine.accounting().inputBytes;
@@ -2,7 +2,7 @@ import {
2
2
  equal,
3
3
  indexValue,
4
4
  sliceValue
5
- } from "./chunk-IFUNAM4D.js";
5
+ } from "./chunk-5L62A5RO.js";
6
6
  import {
7
7
  JqError,
8
8
  JqLimitError,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  describe
3
- } from "./chunk-IFUNAM4D.js";
3
+ } from "./chunk-5L62A5RO.js";
4
4
  import {
5
5
  JqError,
6
6
  JqLimitError,
@@ -0,0 +1,25 @@
1
+ import {
2
+ CsvkitDiagnostic
3
+ } from "./chunk-WFDW4XXD.js";
4
+ import {
5
+ init_buffer
6
+ } from "./chunk-HX3SHTCE.js";
7
+
8
+ // packages/safe-bash-command-csvkit/dist/diagnostics/exception.js
9
+ init_buffer();
10
+ var PythonException = class extends CsvkitDiagnostic {
11
+ exceptionClass;
12
+ detail;
13
+ traceback;
14
+ constructor(exceptionClass, detail, traceback) {
15
+ super(detail);
16
+ this.exceptionClass = exceptionClass;
17
+ this.detail = detail;
18
+ this.traceback = traceback;
19
+ this.name = exceptionClass;
20
+ }
21
+ };
22
+
23
+ export {
24
+ PythonException
25
+ };