@poe-platform/safe-bash 0.1.788 → 0.1.790

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 (342) hide show
  1. package/README.md +1 -1
  2. package/dist/image-ast/index.browser.js +147 -80
  3. package/dist/image-ast/index.js +147 -80
  4. package/dist/mp4-ast/mp4.d.ts +2 -0
  5. package/dist/pdf-ast/cos/parser.d.ts +1 -0
  6. package/dist/pdf-ast/cos/security.d.ts +2 -0
  7. package/dist/pdf-ast/cos/writer.d.ts +1 -0
  8. package/dist/pdf-ast/document.d.ts +3 -0
  9. package/dist/pdf-ast/edit/forms.d.ts +1 -0
  10. package/dist/pdf-ast/index.js +171 -82
  11. package/dist/safe-bash/chunks/{chunk-L5QQLNTO.js → chunk-22PI65AH.js} +2 -2
  12. package/dist/safe-bash/chunks/{chunk-Q3E6C3DX.js → chunk-2TAGYMPK.js} +49 -34
  13. package/dist/safe-bash/chunks/{chunk-Z3HX3ZBA.js → chunk-2W4HTMEK.js} +52 -48
  14. package/dist/safe-bash/chunks/{chunk-FFZXP6ZC.js → chunk-3M7L7XU2.js} +2 -2
  15. package/dist/safe-bash/chunks/{chunk-XNODZRVD.js → chunk-3QAO6UYS.js} +2 -2
  16. package/dist/safe-bash/chunks/{chunk-YPETOVQU.js → chunk-3VKFK3NF.js} +2 -2
  17. package/dist/safe-bash/chunks/chunk-5OST7NOX.js +42 -0
  18. package/dist/safe-bash/chunks/{chunk-KEBSX2AX.js → chunk-6HLURHVU.js} +2 -2
  19. package/dist/safe-bash/chunks/chunk-DYEUZE6Z.js +19 -0
  20. package/dist/safe-bash/chunks/{chunk-T2TGCHKE.js → chunk-FM3WBSZT.js} +2 -2
  21. package/dist/safe-bash/chunks/chunk-GAYRKQM6.js +22 -0
  22. package/dist/safe-bash/chunks/{chunk-Q45QCA4J.js → chunk-I3KSESCR.js} +0 -7
  23. package/dist/safe-bash/chunks/{chunk-OSKDIBQS.js → chunk-JLIMK5TD.js} +1 -1
  24. package/dist/safe-bash/chunks/{chunk-2AYZCT5X.js → chunk-JQ2FAJJT.js} +27 -23
  25. package/dist/safe-bash/chunks/{chunk-QA3NVP43.js → chunk-JRE6Z3T7.js} +2 -2
  26. package/dist/safe-bash/chunks/{chunk-DC5EHLKS.js → chunk-NDIL6T7Y.js} +5 -5
  27. package/dist/safe-bash/chunks/{chunk-747G42FY.js → chunk-OPR4UAIT.js} +2 -2
  28. package/dist/safe-bash/chunks/chunk-OSMQCYSP.js +19 -0
  29. package/dist/safe-bash/chunks/chunk-OYB332PQ.js +17 -0
  30. package/dist/safe-bash/chunks/{chunk-ZMYVCRAF.js → chunk-QTIH2AFE.js} +77 -69
  31. package/dist/safe-bash/chunks/{chunk-PYTLIUST.js → chunk-SBESXWT2.js} +43 -44
  32. package/dist/safe-bash/chunks/{chunk-4FDQJUFW.js → chunk-SDEPGTOF.js} +1 -1
  33. package/dist/safe-bash/chunks/chunk-UZU5BIJI.js +32 -0
  34. package/dist/safe-bash/chunks/{chunk-BI6JV62X.js → chunk-VCCMROTL.js} +7 -10
  35. package/dist/safe-bash/chunks/chunk-W47GHRRF.js +13 -0
  36. package/dist/safe-bash/chunks/{chunk-NPMQWZUZ.js → chunk-WS7KZIUM.js} +2 -2
  37. package/dist/safe-bash/chunks/{chunk-3PZYHMGM.js → chunk-YYAERCWS.js} +7 -7
  38. package/dist/safe-bash/chunks/{chunk-5U7JECDB.js → chunk-ZPGVEUKF.js} +8 -7
  39. package/dist/safe-bash/chunks/{csvkit-K55OYAQC.js → csvkit-USUJG62I.js} +65 -11
  40. package/dist/safe-bash/chunks/{ffmpeg-BEFTQ6DZ.js → ffmpeg-KRGG5DLH.js} +21 -10
  41. package/dist/safe-bash/chunks/{gh-HQWOWLWE.js → gh-UCFDUZCX.js} +16 -8
  42. package/dist/safe-bash/chunks/{git-UFNPAOYZ.js → git-LPAF6KDG.js} +7 -9
  43. package/dist/safe-bash/chunks/{imagemagick-53BMHH6D.js → imagemagick-KGREKK4G.js} +38 -7
  44. package/dist/safe-bash/chunks/{implementation-QUTAAYMT.js → implementation-FXDRYS5A.js} +34 -8
  45. package/dist/safe-bash/chunks/{pdfimages-4OYI6FLG.js → pdfimages-UADCF4G4.js} +12 -8
  46. package/dist/safe-bash/chunks/{pdfinfo-I7U6TQPP.js → pdfinfo-O7UWPF4W.js} +38 -13
  47. package/dist/safe-bash/chunks/{pdftk-SUA6FMHI.js → pdftk-AERXIJTN.js} +13 -8
  48. package/dist/safe-bash/chunks/{pdftoppm-4C5DGEWX.js → pdftoppm-L466JQKI.js} +17 -10
  49. package/dist/safe-bash/chunks/{pdftotext-Y4WI225Y.js → pdftotext-SUSI4WXS.js} +19 -9
  50. package/dist/safe-bash/chunks/{qpdf-IORB4RV5.js → qpdf-YL24KVRH.js} +14 -8
  51. package/dist/safe-bash/chunks/{sips-WHAMJFEU.js → sips-QXEQZERX.js} +14 -7
  52. package/dist/safe-bash/chunks/{soffice-SYEK6WJS.js → soffice-TBITRML3.js} +16 -8
  53. package/dist/safe-bash/chunks/{wkhtmltopdf-ZIICWJLF.js → wkhtmltopdf-NJA2THRC.js} +27 -7
  54. package/dist/safe-bash/command-chunks/chunk-2C5BEBPY.js +1388 -0
  55. package/dist/safe-bash/command-chunks/{chunk-FXYWQ6S4.js → chunk-2EXV2ZLV.js} +2 -2
  56. package/dist/safe-bash/command-chunks/{chunk-PFBJR2PY.js → chunk-2KRKKW5S.js} +2 -2
  57. package/dist/safe-bash/command-chunks/{chunk-4DSJDVBM.js → chunk-32F3RBUW.js} +10 -749
  58. package/dist/safe-bash/command-chunks/{chunk-L3MLMXL4.js → chunk-3ZK5F23O.js} +1 -1
  59. package/dist/safe-bash/command-chunks/{chunk-4QX6XCDD.js → chunk-4RNIZ3RT.js} +79 -0
  60. package/dist/safe-bash/command-chunks/{chunk-D7TADAYG.js → chunk-64LG3EVJ.js} +17 -0
  61. package/dist/safe-bash/command-chunks/{chunk-TOSM3T3A.js → chunk-6EASC5EC.js} +20 -9
  62. package/dist/safe-bash/command-chunks/{chunk-ZF3ZVGQC.js → chunk-7JRITHKW.js} +150 -80
  63. package/dist/safe-bash/command-chunks/{chunk-IJ3FXP4Q.js → chunk-A3ZX6SCY.js} +1 -1
  64. package/dist/safe-bash/{chunks/chunk-LD76P7AG.js → command-chunks/chunk-AKDMCNX4.js} +74 -39
  65. package/dist/safe-bash/command-chunks/{chunk-KSIGF4AG.js → chunk-BK4CMEE6.js} +1 -1
  66. package/dist/safe-bash/command-chunks/{chunk-JUDOV5MJ.js → chunk-CBDVLMJB.js} +1 -1
  67. package/dist/safe-bash/command-chunks/{chunk-XGMWWUHV.js → chunk-CZ5DAK4K.js} +1 -1
  68. package/dist/safe-bash/command-chunks/{chunk-Z57TV6TC.js → chunk-EZ2DTOLI.js} +4 -2
  69. package/dist/safe-bash/command-chunks/{chunk-ADCGH6A7.js → chunk-FH3D75FC.js} +1 -1
  70. package/dist/safe-bash/command-chunks/{chunk-WYJTWJZ5.js → chunk-G3G6W5ZE.js} +1 -1
  71. package/dist/safe-bash/command-chunks/{chunk-3HDIDEUJ.js → chunk-GF54KE2M.js} +1 -1
  72. package/dist/safe-bash/command-chunks/chunk-H4LWTITX.js +169 -0
  73. package/dist/safe-bash/command-chunks/chunk-I2MQNBGR.js +145 -0
  74. package/dist/safe-bash/command-chunks/{chunk-Z7TYZG3A.js → chunk-IHHTTQX6.js} +5 -3
  75. package/dist/safe-bash/command-chunks/{chunk-5GRLAARV.js → chunk-IOXI5ZAJ.js} +1 -1
  76. package/dist/safe-bash/command-chunks/{chunk-INDIFLBW.js → chunk-JTAGNROA.js} +4 -0
  77. package/dist/safe-bash/command-chunks/{chunk-Y5IHIAY3.js → chunk-MDPIOQUD.js} +12 -8
  78. package/dist/safe-bash/command-chunks/chunk-PGEYORBZ.js +25 -0
  79. package/dist/safe-bash/command-chunks/chunk-QI4MGIN6.js +6 -0
  80. package/dist/safe-bash/command-chunks/chunk-QM4UZF3C.js +753 -0
  81. package/dist/safe-bash/command-chunks/chunk-QTYZAWSB.js +91 -0
  82. package/dist/safe-bash/command-chunks/chunk-SNK7K3XW.js +90 -0
  83. package/dist/safe-bash/command-chunks/chunk-T5OLGM43.js +314 -0
  84. package/dist/safe-bash/command-chunks/chunk-TB7IFMUZ.js +802 -0
  85. package/dist/safe-bash/command-chunks/{chunk-YNT4ZJHW.js → chunk-TPPBPIWL.js} +3 -3
  86. package/dist/safe-bash/command-chunks/chunk-VMK4XVKO.js +82 -0
  87. package/dist/safe-bash/command-chunks/chunk-VNSJKXDU.js +130 -0
  88. package/dist/safe-bash/command-chunks/{chunk-2LP3VMPA.js → chunk-WFDW4XXD.js} +1 -17
  89. package/dist/safe-bash/command-chunks/chunk-WR37IS4O.js +318 -0
  90. package/dist/safe-bash/command-chunks/chunk-YFNTMH6Z.js +6 -0
  91. package/dist/safe-bash/commands/basic.js +148 -48
  92. package/dist/safe-bash/commands/bytes/compression/index.js +5 -6
  93. package/dist/safe-bash/commands/cmp.d.ts +2 -3
  94. package/dist/safe-bash/commands/cmp.js +2 -689
  95. package/dist/safe-bash/commands/csplit/index.browser.js +2 -2
  96. package/dist/safe-bash/commands/docx/index.browser.js +4 -47
  97. package/dist/safe-bash/commands/docx/index.d.ts +2 -24
  98. package/dist/safe-bash/commands/docx/index.js +2 -41
  99. package/dist/safe-bash/commands/docx/io.d.ts +1 -14
  100. package/dist/safe-bash/commands/docx/io.js +1 -15
  101. package/dist/safe-bash/commands/factor/index.browser.js +2 -2
  102. package/dist/safe-bash/commands/getopt/index.browser.js +2 -2
  103. package/dist/safe-bash/commands/hexdump/index.browser.js +2 -2
  104. package/dist/safe-bash/commands/iconv/index.browser.js +2 -2
  105. package/dist/safe-bash/commands/line-endings/index.browser.js +2 -2
  106. package/dist/safe-bash/commands/llm/command.d.ts +1 -4
  107. package/dist/safe-bash/commands/llm/command.js +1 -248
  108. package/dist/safe-bash/commands/llm/elevenlabs-stream.d.ts +1 -2
  109. package/dist/safe-bash/commands/llm/elevenlabs-stream.js +1 -117
  110. package/dist/safe-bash/commands/llm/elevenlabs.d.ts +1 -15
  111. package/dist/safe-bash/commands/llm/elevenlabs.js +1 -123
  112. package/dist/safe-bash/commands/llm/index.browser.js +20 -15
  113. package/dist/safe-bash/commands/llm/index.d.ts +1 -6
  114. package/dist/safe-bash/commands/llm/index.js +1 -4
  115. package/dist/safe-bash/commands/llm/mime.d.ts +1 -2
  116. package/dist/safe-bash/commands/llm/mime.js +1 -136
  117. package/dist/safe-bash/commands/llm/openai-http.d.ts +1 -8
  118. package/dist/safe-bash/commands/llm/openai-http.js +1 -143
  119. package/dist/safe-bash/commands/llm/openai-sse.d.ts +1 -3
  120. package/dist/safe-bash/commands/llm/openai-sse.js +1 -78
  121. package/dist/safe-bash/commands/llm/openai.d.ts +1 -14
  122. package/dist/safe-bash/commands/llm/openai.js +1 -288
  123. package/dist/safe-bash/commands/llm/providers/elevenlabs.d.ts +1 -1
  124. package/dist/safe-bash/commands/llm/providers/elevenlabs.js +1 -1
  125. package/dist/safe-bash/commands/llm/providers/index.browser.js +6 -6
  126. package/dist/safe-bash/commands/llm/providers/index.d.ts +1 -3
  127. package/dist/safe-bash/commands/llm/providers/index.js +1 -2
  128. package/dist/safe-bash/commands/llm/providers/openai.d.ts +1 -1
  129. package/dist/safe-bash/commands/llm/providers/openai.js +1 -1
  130. package/dist/safe-bash/commands/llm/providers/shared.d.ts +1 -23
  131. package/dist/safe-bash/commands/llm/providers/shared.js +1 -65
  132. package/dist/safe-bash/commands/llm/service.d.ts +1 -37
  133. package/dist/safe-bash/commands/llm/service.js +1 -151
  134. package/dist/safe-bash/commands/llm/types.d.ts +1 -52
  135. package/dist/safe-bash/commands/llm/types.js +1 -1
  136. package/dist/safe-bash/commands/mdq/index.browser.js +3 -3
  137. package/dist/safe-bash/commands/media/index.browser.js +1 -1
  138. package/dist/safe-bash/commands/network/index.browser.js +9 -9
  139. package/dist/safe-bash/commands/network/types.d.ts +2 -40
  140. package/dist/safe-bash/commands/node/index.browser.js +6 -8
  141. package/dist/safe-bash/commands/op/index.browser.js +3 -3
  142. package/dist/safe-bash/commands/op/index.js +12 -28
  143. package/dist/safe-bash/commands/pptx/index.d.ts +2 -28
  144. package/dist/safe-bash/commands/pptx/index.js +2 -152
  145. package/dist/safe-bash/commands/pr/index.browser.js +2 -2
  146. package/dist/safe-bash/commands/printf-float.d.ts +1 -0
  147. package/dist/safe-bash/commands/printf-float.js +48 -38
  148. package/dist/safe-bash/commands/printf-format.js +9 -6
  149. package/dist/safe-bash/commands/printf-quote.d.ts +3 -0
  150. package/dist/safe-bash/commands/printf-quote.js +62 -0
  151. package/dist/safe-bash/commands/printf-wide.d.ts +5 -0
  152. package/dist/safe-bash/commands/printf-wide.js +41 -0
  153. package/dist/safe-bash/commands/python/index.browser.js +8 -8
  154. package/dist/safe-bash/commands/python/worker.browser.js +2 -2
  155. package/dist/safe-bash/commands/truncate.d.ts +2 -3
  156. package/dist/safe-bash/commands/truncate.js +2 -686
  157. package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
  158. package/dist/safe-bash/commands/xml/index.browser.js +2 -2
  159. package/dist/safe-bash/commands/yq/index.browser.js +3 -3
  160. package/dist/safe-bash/contracts/diagnostics.d.ts +2 -0
  161. package/dist/safe-bash/contracts/diagnostics.js +2 -0
  162. package/dist/safe-bash/contracts/runtime-control.d.ts +2 -0
  163. package/dist/safe-bash/contracts/runtime-control.js +2 -0
  164. package/dist/safe-bash/core.browser.d.ts +1 -1
  165. package/dist/safe-bash/core.browser.js +10645 -14065
  166. package/dist/safe-bash/core.d.ts +10 -1
  167. package/dist/safe-bash/core.js +0 -1
  168. package/dist/safe-bash/jobs.browser.js +5 -4
  169. package/dist/safe-bash/opt-in/commands/cmp/index.d.ts +6 -2
  170. package/dist/safe-bash/opt-in/commands/cmp/index.js +776 -79
  171. package/dist/safe-bash/opt-in/commands/cmp/options.d.ts +0 -12
  172. package/dist/safe-bash/opt-in/commands/cmp/options.js +0 -153
  173. package/dist/safe-bash/opt-in/commands/truncate/index.d.ts +8 -3
  174. package/dist/safe-bash/opt-in/commands/truncate/index.js +790 -272
  175. package/dist/safe-bash/opt-in/commands/truncate/sync.d.ts +1 -0
  176. package/dist/safe-bash/opt-in/commands/truncate/sync.js +60 -0
  177. package/dist/safe-bash/optional-host.browser.js +61 -80
  178. package/dist/safe-bash/optional-host.d.ts +3 -1
  179. package/dist/safe-bash/optional-host.js +3 -1
  180. package/dist/safe-bash/shell/runtime.js +44 -18
  181. package/dist/safe-bash/yq-browser/index.js +1 -1
  182. package/dist/safe-bash-checksum-engine/index.d.ts +1 -1
  183. package/dist/safe-bash-checksum-engine/index.js +14 -2
  184. package/dist/safe-bash-command-bzip2/index.js +2 -1
  185. package/dist/safe-bash-command-cmp/index.d.ts +10 -0
  186. package/dist/safe-bash-command-cmp/index.js +796 -0
  187. package/dist/safe-bash-command-cmp/options.d.ts +12 -0
  188. package/dist/safe-bash-command-cmp/options.js +42 -0
  189. package/dist/safe-bash-command-csvcut/index.js +11 -8
  190. package/dist/safe-bash-command-csvgrep/index.js +35 -7
  191. package/dist/safe-bash-command-csvkit/codecs/python.js +4 -3
  192. package/dist/safe-bash-command-csvkit/codecs/utf8.js +3 -2
  193. package/dist/safe-bash-command-csvkit/index.js +80 -324
  194. package/dist/safe-bash-command-csvkit/python-regex.d.ts +5 -0
  195. package/dist/safe-bash-command-csvkit/python-regex.js +14 -0
  196. package/dist/safe-bash-command-csvkit/runtime.d.ts +1 -0
  197. package/dist/safe-bash-command-csvkit/sync-support.js +4 -2
  198. package/dist/safe-bash-command-diff3/index.js +3 -0
  199. package/dist/safe-bash-command-docx/LICENSE +21 -0
  200. package/dist/safe-bash-command-docx/index.d.ts +30 -0
  201. package/dist/safe-bash-command-docx/index.js +67 -0
  202. package/dist/safe-bash-command-docx/io.d.ts +14 -0
  203. package/dist/safe-bash-command-docx/io.js +26 -0
  204. package/dist/safe-bash-command-envsubst/index.js +34 -3
  205. package/dist/safe-bash-command-exiftool/index.js +3 -0
  206. package/dist/safe-bash-command-ffmpeg/index.js +8073 -7940
  207. package/dist/safe-bash-command-fold/family.js +1 -1
  208. package/dist/safe-bash-command-fold/index.js +1 -1
  209. package/dist/safe-bash-command-git/git_rust.wasm +0 -0
  210. package/dist/safe-bash-command-git/wasm.generated.js +1 -1
  211. package/dist/safe-bash-command-htmlq/index.js +5 -0
  212. package/dist/safe-bash-command-imagemagick/index.d.ts +25 -21
  213. package/dist/safe-bash-command-imagemagick/index.js +671 -273
  214. package/dist/safe-bash-command-llm/LICENSE +21 -0
  215. package/dist/safe-bash-command-llm/command.d.ts +5 -0
  216. package/dist/safe-bash-command-llm/command.js +14 -0
  217. package/dist/safe-bash-command-llm/configuration.d.ts +18 -0
  218. package/dist/safe-bash-command-llm/elevenlabs-stream.d.ts +2 -0
  219. package/dist/safe-bash-command-llm/elevenlabs-stream.js +7 -0
  220. package/dist/safe-bash-command-llm/elevenlabs.d.ts +15 -0
  221. package/dist/safe-bash-command-llm/elevenlabs.js +10 -0
  222. package/dist/safe-bash-command-llm/index.d.ts +10 -0
  223. package/dist/safe-bash-command-llm/index.js +46 -0
  224. package/dist/safe-bash-command-llm/mime.d.ts +2 -0
  225. package/dist/safe-bash-command-llm/mime.js +9 -0
  226. package/dist/safe-bash-command-llm/model-options.d.ts +3 -0
  227. package/dist/safe-bash-command-llm/openai-http.d.ts +8 -0
  228. package/dist/safe-bash-command-llm/openai-http.js +17 -0
  229. package/dist/safe-bash-command-llm/openai-sse.d.ts +3 -0
  230. package/dist/safe-bash-command-llm/openai-sse.js +8 -0
  231. package/dist/safe-bash-command-llm/openai.d.ts +14 -0
  232. package/dist/safe-bash-command-llm/openai.js +12 -0
  233. package/dist/safe-bash-command-llm/providers/elevenlabs.d.ts +1 -0
  234. package/dist/safe-bash-command-llm/providers/elevenlabs.js +11 -0
  235. package/dist/safe-bash-command-llm/providers/index.d.ts +3 -0
  236. package/dist/safe-bash-command-llm/providers/index.js +24 -0
  237. package/dist/safe-bash-command-llm/providers/openai.d.ts +1 -0
  238. package/dist/safe-bash-command-llm/providers/openai.js +13 -0
  239. package/dist/safe-bash-command-llm/providers/shared.d.ts +23 -0
  240. package/dist/safe-bash-command-llm/providers/shared.js +13 -0
  241. package/dist/safe-bash-command-llm/schemas.d.ts +2 -0
  242. package/dist/safe-bash-command-llm/service.d.ts +42 -0
  243. package/dist/safe-bash-command-llm/service.js +9 -0
  244. package/dist/safe-bash-command-llm/templates.d.ts +27 -0
  245. package/dist/safe-bash-command-llm/types.d.ts +87 -0
  246. package/dist/safe-bash-command-llm/types.js +6 -0
  247. package/dist/safe-bash-command-mmdc/command.d.ts +4 -0
  248. package/dist/safe-bash-command-mmdc/index.d.ts +1 -1
  249. package/dist/safe-bash-command-mmdc/index.js +7134 -6699
  250. package/dist/safe-bash-command-mmdc/layout.d.ts +1 -0
  251. package/dist/safe-bash-command-mmdc/parser.d.ts +1 -0
  252. package/dist/safe-bash-command-mmdc/png.d.ts +3 -0
  253. package/dist/safe-bash-command-mmdc/raster.d.ts +1 -0
  254. package/dist/safe-bash-command-mmdc/svg.d.ts +1 -0
  255. package/dist/safe-bash-command-op/index.js +19 -14
  256. package/dist/safe-bash-command-pandoc/command.js +3 -3
  257. package/dist/safe-bash-command-pandoc/index.js +3 -3
  258. package/dist/safe-bash-command-pdfimages/index.d.ts +7 -1
  259. package/dist/safe-bash-command-pdfimages/index.js +210 -113
  260. package/dist/safe-bash-command-pdfinfo/index.d.ts +24 -20
  261. package/dist/safe-bash-command-pdfinfo/index.js +517 -241
  262. package/dist/safe-bash-command-pdftk/index.d.ts +7 -3
  263. package/dist/safe-bash-command-pdftk/index.js +261 -125
  264. package/dist/safe-bash-command-pdftoppm/index.d.ts +15 -7
  265. package/dist/safe-bash-command-pdftoppm/index.js +326 -189
  266. package/dist/safe-bash-command-pdftotext/index.d.ts +9 -5
  267. package/dist/safe-bash-command-pdftotext/index.js +237 -107
  268. package/dist/safe-bash-command-pptx/LICENSE +21 -0
  269. package/dist/safe-bash-command-pptx/index.d.ts +33 -0
  270. package/dist/safe-bash-command-pptx/index.js +168 -0
  271. package/dist/safe-bash-command-qpdf/index.d.ts +9 -3
  272. package/dist/safe-bash-command-qpdf/index.js +254 -130
  273. package/dist/safe-bash-command-sha512sum/index.js +12 -475
  274. package/dist/safe-bash-command-sips/index.d.ts +9 -5
  275. package/dist/safe-bash-command-sips/index.js +65 -46
  276. package/dist/safe-bash-command-soffice/index.d.ts +9 -3
  277. package/dist/safe-bash-command-soffice/index.js +66 -25
  278. package/dist/safe-bash-command-sqlite3/engine.d.ts +9 -0
  279. package/dist/safe-bash-command-sqlite3/index.d.ts +1 -0
  280. package/dist/safe-bash-command-sqlite3/index.js +851 -352
  281. package/dist/safe-bash-command-ssconvert/formats/xls.js +3 -3
  282. package/dist/safe-bash-command-ssconvert/index.js +147 -80
  283. package/dist/safe-bash-command-timeout/index.js +3 -3
  284. package/dist/safe-bash-command-truncate/index.d.ts +8 -3
  285. package/dist/safe-bash-command-truncate/index.js +790 -272
  286. package/dist/safe-bash-command-truncate/sync.d.ts +1 -0
  287. package/dist/safe-bash-command-truncate/sync.js +60 -0
  288. package/dist/safe-bash-command-wkhtmltopdf/index.js +239 -118
  289. package/dist/safe-bash-command-wkhtmltopdf/pdf-renderer.d.ts +1 -1
  290. package/dist/safe-bash-command-xxd/index.js +78 -20
  291. package/dist/safe-bash-command-xz/command.d.ts +4 -0
  292. package/dist/safe-bash-command-xz/index.d.ts +1 -1
  293. package/dist/safe-bash-command-xz/index.js +1 -1
  294. package/dist/safe-bash-compression-engine/bounded-codec.js +3 -3
  295. package/dist/safe-bash-compression-engine/codec-loader.js +2 -2
  296. package/dist/safe-bash-compression-engine/files.js +6 -6
  297. package/dist/safe-bash-compression-engine/index.js +5 -5
  298. package/dist/safe-bash-compression-engine/operand.js +6 -6
  299. package/dist/safe-bash-compression-engine/stream.js +5 -5
  300. package/dist/safe-bash-compression-engine/zstd-decode.js +4 -4
  301. package/dist/safe-bash-contracts/command.js +3 -3
  302. package/dist/safe-bash-contracts/default-executor.d.ts +5 -0
  303. package/dist/safe-bash-contracts/default-executor.js +37 -0
  304. package/dist/safe-bash-contracts/diagnostics.js +3 -3
  305. package/dist/safe-bash-contracts/escaping.js +9 -9
  306. package/dist/safe-bash-contracts/filesystem-descriptor.js +3 -3
  307. package/dist/safe-bash-contracts/filesystem-output.js +8 -8
  308. package/dist/safe-bash-contracts/http.d.ts +41 -0
  309. package/dist/safe-bash-contracts/http.js +6 -0
  310. package/dist/safe-bash-contracts/index.js +21 -19
  311. package/dist/safe-bash-contracts/io.d.ts +12 -0
  312. package/dist/safe-bash-contracts/io.js +4 -1
  313. package/dist/safe-bash-contracts/output.js +3 -2
  314. package/dist/safe-bash-contracts/runtime-control.js +2 -2
  315. package/dist/safe-bash-contracts/signals.js +1 -1
  316. package/dist/safe-bash-contracts/yield.d.ts +1 -0
  317. package/dist/safe-bash-contracts/yield.js +3 -1
  318. package/dist/safe-bash-csv-engine/index.d.ts +10 -1
  319. package/dist/safe-bash-csv-engine/index.js +78 -6
  320. package/dist/safe-bash-io-engine/commands/search/requirements.js +3 -3
  321. package/dist/safe-bash-io-engine/commands/text-programs/shared.js +3 -3
  322. package/dist/safe-bash-io-engine/gnu-information.d.ts +1 -1
  323. package/dist/safe-bash-io-engine/gnu-information.js +1 -1
  324. package/dist/safe-bash-io-engine/internal.d.ts +1 -1
  325. package/dist/safe-bash-io-engine/internal.js +2 -2
  326. package/dist/safe-bash-query-engine/index.js +5 -5
  327. package/dist/safe-bash-query-engine/interpreter.js +3 -3
  328. package/dist/safe-bash-query-engine/query-core.js +5 -5
  329. package/package.json +2 -2
  330. package/dist/safe-bash/chunks/chunk-2G2T5MEM.js +0 -14
  331. package/dist/safe-bash/chunks/chunk-FJZNUUOQ.js +0 -81
  332. package/dist/safe-bash/chunks/chunk-GJWUEOT6.js +0 -14
  333. package/dist/safe-bash/chunks/chunk-LAPF2XE6.js +0 -14
  334. package/dist/safe-bash/chunks/chunk-O6356Z27.js +0 -37
  335. package/dist/safe-bash/chunks/chunk-S2LSZFZ6.js +0 -758
  336. package/dist/safe-bash/chunks/chunk-T3VDYWKZ.js +0 -21
  337. package/dist/safe-bash/chunks/chunk-VYW4Q6KF.js +0 -12
  338. package/dist/safe-bash/chunks/chunk-WHURJBET.js +0 -409
  339. package/dist/safe-bash/opt-in/commands/cmp/compare.js +0 -95
  340. package/dist/safe-bash/opt-in/commands/cmp/io.js +0 -218
  341. package/dist/safe-bash/command-chunks/{chunk-RTOJNFFL.js → chunk-KNI4GRXF.js} +7 -7
  342. package/dist/safe-bash/command-chunks/{chunk-DEH3CMGL.js → chunk-QJ3ONEBI.js} +3 -3
@@ -1,16 +1,4 @@
1
1
  import "../safe-bash/command-chunks/chunk-UWNBM24V.js";
2
- import {
3
- createOutputOperation
4
- } from "../safe-bash/command-chunks/chunk-XGMWWUHV.js";
5
- import {
6
- createProcessSignalChannel
7
- } from "../safe-bash/command-chunks/chunk-3IC3LNJH.js";
8
- import {
9
- assertCountedFileOutput,
10
- bindFileOutputBudget,
11
- writeFileOutput,
12
- writeFileOutputCounted
13
- } from "../safe-bash/command-chunks/chunk-PTLDMI4O.js";
14
2
  import {
15
3
  assertPathWithin,
16
4
  basename,
@@ -26,6 +14,21 @@ import {
26
14
  resolvePath,
27
15
  validatePath
28
16
  } from "../safe-bash/command-chunks/chunk-JCDHBLWM.js";
17
+ import {
18
+ composeMiddleware
19
+ } from "../safe-bash/command-chunks/chunk-6LBBB4KL.js";
20
+ import {
21
+ createOutputOperation
22
+ } from "../safe-bash/command-chunks/chunk-CZ5DAK4K.js";
23
+ import {
24
+ createProcessSignalChannel
25
+ } from "../safe-bash/command-chunks/chunk-3IC3LNJH.js";
26
+ import {
27
+ assertCountedFileOutput,
28
+ bindFileOutputBudget,
29
+ writeFileOutput,
30
+ writeFileOutputCounted
31
+ } from "../safe-bash/command-chunks/chunk-PTLDMI4O.js";
29
32
  import {
30
33
  CommandArgumentIdentityError,
31
34
  CommandRegistry,
@@ -36,11 +39,10 @@ import {
36
39
  registerDefaultExecutor,
37
40
  registerDefaultExecutors,
38
41
  validateExitCode
39
- } from "../safe-bash/command-chunks/chunk-IJ3FXP4Q.js";
42
+ } from "../safe-bash/command-chunks/chunk-A3ZX6SCY.js";
40
43
  import {
41
44
  builtInDirectContextExecutors
42
- } from "../safe-bash/command-chunks/chunk-WYJTWJZ5.js";
43
- import "../safe-bash/command-chunks/chunk-D7TADAYG.js";
45
+ } from "../safe-bash/command-chunks/chunk-G3G6W5ZE.js";
44
46
  import {
45
47
  concatShellValues,
46
48
  shellValueByteLength,
@@ -53,6 +55,7 @@ import {
53
55
  ACCESS_MODES
54
56
  } from "../safe-bash/command-chunks/chunk-FCHHRTWP.js";
55
57
  import {
58
+ InputByteBudget,
56
59
  collectBytes,
57
60
  collectText,
58
61
  createBufferedOutput,
@@ -63,7 +66,8 @@ import {
63
66
  toByteSource,
64
67
  writeBytes,
65
68
  writeText
66
- } from "../safe-bash/command-chunks/chunk-4QX6XCDD.js";
69
+ } from "../safe-bash/command-chunks/chunk-4RNIZ3RT.js";
70
+ import "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
67
71
  import {
68
72
  assertCommandRequirements,
69
73
  evaluateCommandSupport
@@ -74,15 +78,13 @@ import {
74
78
  isFsError,
75
79
  toFsError
76
80
  } from "../safe-bash/command-chunks/chunk-U6CJOXRY.js";
77
- import {
78
- composeMiddleware
79
- } from "../safe-bash/command-chunks/chunk-6LBBB4KL.js";
80
81
  import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
81
82
  export {
82
83
  ACCESS_MODES,
83
84
  CommandArgumentIdentityError,
84
85
  CommandRegistry,
85
86
  FsError,
87
+ InputByteBudget,
86
88
  assertCommandRequirements,
87
89
  assertCountedFileOutput,
88
90
  assertPathWithin,
@@ -1,3 +1,4 @@
1
+ import type { CommandContext, CommandResult } from "./command.js";
1
2
  import type { ByteSource, CollectOptions } from "@poe-platform/safe-fs/core";
2
3
  export { collectBytes, readBytes, toByteSource } from "@poe-platform/safe-fs/core";
3
4
  export type { ByteSource, CollectOptions } from "@poe-platform/safe-fs/core";
@@ -60,3 +61,14 @@ export declare function writeText(sink: ByteSink, text: string): Promise<void>;
60
61
  export declare function writeBytes(sink: ByteSink, chunk: Uint8Array, signal?: AbortSignal): Promise<void>;
61
62
  export declare function pipeBytes(source: ByteSource, sink: ByteSink, signal?: AbortSignal): Promise<void>;
62
63
  export declare function collectText(source: ByteSource, options: CollectOptions): Promise<string>;
64
+ /** Cumulative command-local input accounting, including failures caught by file probes. */
65
+ export declare class InputByteBudget {
66
+ #private;
67
+ readonly maximum: number;
68
+ static limit(value?: number): number;
69
+ constructor(maximum?: number);
70
+ assertOpen(): void;
71
+ charge(bytes: number): void;
72
+ run(context: CommandContext, execute: (context: CommandContext) => Promise<CommandResult>): Promise<CommandResult>;
73
+ read(source: ByteSource, signal: AbortSignal): ByteSource;
74
+ }
@@ -1,4 +1,5 @@
1
1
  import {
2
+ InputByteBudget,
2
3
  collectBytes,
3
4
  collectText,
4
5
  createBufferedOutput,
@@ -9,10 +10,12 @@ import {
9
10
  toByteSource,
10
11
  writeBytes,
11
12
  writeText
12
- } from "../safe-bash/command-chunks/chunk-4QX6XCDD.js";
13
+ } from "../safe-bash/command-chunks/chunk-4RNIZ3RT.js";
14
+ import "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
13
15
  import "../safe-bash/command-chunks/chunk-U6CJOXRY.js";
14
16
  import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
15
17
  export {
18
+ InputByteBudget,
16
19
  collectBytes,
17
20
  collectText,
18
21
  createBufferedOutput,
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  createOutputOperation
3
- } from "../safe-bash/command-chunks/chunk-XGMWWUHV.js";
4
- import "../safe-bash/command-chunks/chunk-4QX6XCDD.js";
3
+ } from "../safe-bash/command-chunks/chunk-CZ5DAK4K.js";
4
+ import "../safe-bash/command-chunks/chunk-4RNIZ3RT.js";
5
+ import "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
5
6
  import "../safe-bash/command-chunks/chunk-U6CJOXRY.js";
6
7
  import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
7
8
  export {
@@ -6,7 +6,7 @@ import {
6
6
  interruptible,
7
7
  isSyncResolved,
8
8
  registerRuntimeBackingFileSystem
9
- } from "../safe-bash/command-chunks/chunk-WYJTWJZ5.js";
9
+ } from "../safe-bash/command-chunks/chunk-G3G6W5ZE.js";
10
10
  import {
11
11
  abortManagedController,
12
12
  addAbortSignalWaiter,
@@ -18,7 +18,7 @@ import {
18
18
  registerManagedAbortSignal,
19
19
  removeAbortSignalWaiter,
20
20
  toNativeAbortSignal
21
- } from "../safe-bash/command-chunks/chunk-D7TADAYG.js";
21
+ } from "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
22
22
  import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
23
23
  export {
24
24
  abortManagedController,
@@ -9,7 +9,7 @@ import {
9
9
  registerManagedAbortSignal,
10
10
  removeAbortSignalWaiter,
11
11
  toNativeAbortSignal
12
- } from "../safe-bash/command-chunks/chunk-D7TADAYG.js";
12
+ } from "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
13
13
  import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
14
14
  export {
15
15
  abortManagedController,
@@ -15,3 +15,4 @@ export declare function inheritYieldCheckpoint(parent: AbortSignal, child: Abort
15
15
  export declare function scheduleTurn(callback: () => void): TurnHandle;
16
16
  export declare function cancelTurn(handle: TurnHandle | undefined): void;
17
17
  export declare function yieldTurn(signal?: AbortSignal): Promise<void>;
18
+ export declare function drainCooperativeSteps<T>(steps: Generator<void, T, void>, signal?: AbortSignal): Promise<T>;
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  cancelTurn,
3
+ drainCooperativeSteps,
3
4
  hasRegisteredYieldCheckpoint,
4
5
  hasYieldCheckpoint,
5
6
  inheritYieldCheckpoint,
@@ -9,10 +10,11 @@ import {
9
10
  runYieldCheckpoint,
10
11
  scheduleTurn,
11
12
  yieldTurn
12
- } from "../safe-bash/command-chunks/chunk-D7TADAYG.js";
13
+ } from "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
13
14
  import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
14
15
  export {
15
16
  cancelTurn,
17
+ drainCooperativeSteps,
16
18
  hasRegisteredYieldCheckpoint,
17
19
  hasYieldCheckpoint,
18
20
  inheritYieldCheckpoint,
@@ -21,6 +21,7 @@ export declare const defaultCsvLimits: Readonly<CsvLimits>;
21
21
  export declare class CsvBudget {
22
22
  readonly signal: AbortSignal;
23
23
  private disposed;
24
+ private lastYieldWork;
24
25
  private aborted;
25
26
  private readonly pollSignal;
26
27
  readonly limits: Readonly<CsvLimits>;
@@ -28,6 +29,7 @@ export declare class CsvBudget {
28
29
  /** Immutable observations cannot change the invocation's quota ledger. */
29
30
  get accounting(): Readonly<typeof this.usage>;
30
31
  getUsage(key: keyof typeof this.usage): number;
32
+ checkpoint(): Promise<void>;
31
33
  remaining(key: Exclude<keyof CsvLimits, "fieldBytes">): number;
32
34
  constructor(limits: Partial<CsvLimits>, signal: AbortSignal);
33
35
  chargeWorkAndRetained(workAmount: number, retainedAmount: number): void;
@@ -47,7 +49,9 @@ export interface CsvDialect {
47
49
  doubleQuote?: boolean;
48
50
  skipInitialSpace?: boolean;
49
51
  skipLines?: number;
50
- quoting?: 0 | 3;
52
+ quoting?: 0 | 1 | 2 | 3;
53
+ encoding?: string;
54
+ fieldCharacters?: number;
51
55
  }
52
56
  export interface CsvRow {
53
57
  readonly cells: readonly string[];
@@ -57,6 +61,9 @@ export declare class CsvParser {
57
61
  private readonly dialect;
58
62
  private readonly budget;
59
63
  private readonly decoder;
64
+ private readonly encoding;
65
+ private fieldCharacters;
66
+ private quotedField;
60
67
  private readonly delimiter;
61
68
  private field;
62
69
  private row;
@@ -69,6 +76,8 @@ export declare class CsvParser {
69
76
  private ended;
70
77
  private skipped;
71
78
  constructor(dialect: CsvDialect, budget: CsvBudget);
79
+ /** Consume a borrowed producer chunk in bounded units before its next pull. */
80
+ pushAsync(bytes: Uint8Array): AsyncGenerator<CsvRow>;
72
81
  push(bytes: Uint8Array): CsvRow[];
73
82
  end(): CsvRow[];
74
83
  /** Releases parser-owned fields; returned rows remain owned by the caller. */
@@ -4,6 +4,7 @@ import {
4
4
 
5
5
  // packages/safe-bash-csv-engine/dist/index.js
6
6
  init_buffer();
7
+ import { yieldTurn } from "../safe-bash-contracts/yield.js";
7
8
  var CsvError = class extends Error {
8
9
  code;
9
10
  constructor(code, message) {
@@ -28,6 +29,7 @@ var defaultCsvLimits = Object.freeze({
28
29
  var CsvBudget = class {
29
30
  signal;
30
31
  disposed = false;
32
+ lastYieldWork = 0;
31
33
  aborted = false;
32
34
  pollSignal;
33
35
  limits;
@@ -52,6 +54,14 @@ var CsvBudget = class {
52
54
  getUsage(key) {
53
55
  return this.usage[key];
54
56
  }
57
+ async checkpoint() {
58
+ this.signal.throwIfAborted();
59
+ if (this.usage.work - this.lastYieldWork < 4096)
60
+ return;
61
+ this.lastYieldWork = this.usage.work;
62
+ await yieldTurn(this.signal);
63
+ this.signal.throwIfAborted();
64
+ }
55
65
  remaining(key) {
56
66
  return this.limits[key] - this.usage[key];
57
67
  }
@@ -135,7 +145,10 @@ var typedArrayByteLength = Object.getOwnPropertyDescriptor(Object.getPrototypeOf
135
145
  var CsvParser = class {
136
146
  dialect;
137
147
  budget;
138
- decoder = new TextDecoder("utf-8", { fatal: true });
148
+ decoder;
149
+ encoding;
150
+ fieldCharacters = 0;
151
+ quotedField = false;
139
152
  delimiter;
140
153
  field = "";
141
154
  row = [];
@@ -151,12 +164,18 @@ var CsvParser = class {
151
164
  this.dialect = dialect;
152
165
  this.budget = budget;
153
166
  this.dialect = Object.freeze({ ...dialect });
167
+ this.encoding = (dialect.encoding ?? "utf-8-sig").toLowerCase().replaceAll("_", "-");
168
+ if (!["utf-8-sig", "utf8-sig", "utf-8", "utf8", "ascii", "us-ascii", "latin1", "latin-1", "iso-8859-1"].includes(this.encoding))
169
+ throw new CsvError("UNSUPPORTED", "Unsupported CSV encoding");
170
+ this.decoder = new TextDecoder("utf-8", { fatal: true, ignoreBOM: !["utf-8-sig", "utf8-sig"].includes(this.encoding) });
171
+ if (dialect.fieldCharacters !== void 0 && (!Number.isSafeInteger(dialect.fieldCharacters) || dialect.fieldCharacters < 0))
172
+ throw new CsvError("ARGUMENT", "Field size must be a nonnegative safe integer");
154
173
  this.delimiter = dialect.tabs ? " " : dialect.delimiter ?? ",";
155
174
  budget.charge("work", 0);
156
175
  if (dialect.profile !== void 0 && dialect.profile !== "utf8-sig-permissive-v1" && dialect.profile !== "utf8-sig-strict-v1")
157
176
  throw new CsvError("UNSUPPORTED", "Unsupported CSV reader profile");
158
- if (dialect.quoting !== void 0 && dialect.quoting !== 0 && dialect.quoting !== 3)
159
- throw new CsvError("UNSUPPORTED", "Only quoting modes 0 and 3 are qualified");
177
+ if (dialect.quoting !== void 0 && ![0, 1, 2, 3].includes(dialect.quoting))
178
+ throw new CsvError("UNSUPPORTED", "Only quoting modes 0, 1, 2 and 3 are supported");
160
179
  for (const char of [
161
180
  this.delimiter,
162
181
  dialect.quote ?? '"',
@@ -169,6 +188,14 @@ var CsvParser = class {
169
188
  if (dialect.skipLines !== void 0 && (!Number.isSafeInteger(dialect.skipLines) || dialect.skipLines < 0))
170
189
  throw new CsvError("ARGUMENT", "Skip lines must be nonnegative");
171
190
  }
191
+ /** Consume a borrowed producer chunk in bounded units before its next pull. */
192
+ async *pushAsync(bytes) {
193
+ for (let offset = 0; offset < bytes.byteLength; offset += 4096) {
194
+ await yieldTurn(this.budget.signal);
195
+ this.budget.signal.throwIfAborted();
196
+ yield* this.push(bytes.subarray(offset, offset + 4096));
197
+ }
198
+ }
172
199
  push(bytes) {
173
200
  if (this.ended)
174
201
  throw new CsvError("INPUT", "CSV parser is closed");
@@ -184,8 +211,18 @@ var CsvParser = class {
184
211
  this.budget.charge("retainedBytes", byteLength * 2 + 8);
185
212
  let text;
186
213
  try {
187
- text = this.decoder.decode(bytes, { stream: true });
188
- } catch {
214
+ if (["ascii", "us-ascii", "latin1", "latin-1", "iso-8859-1"].includes(this.encoding)) {
215
+ text = "";
216
+ for (const byte of bytes) {
217
+ if ((this.encoding === "ascii" || this.encoding === "us-ascii") && byte > 127)
218
+ throw new CsvError("INPUT", "Invalid ASCII input");
219
+ text += String.fromCharCode(byte);
220
+ }
221
+ } else
222
+ text = this.decoder.decode(bytes, { stream: true });
223
+ } catch (error) {
224
+ if (error instanceof CsvError)
225
+ throw error;
189
226
  throw new CsvError("INPUT", "Invalid UTF-8 input");
190
227
  }
191
228
  this.budget.charge("decodedBytes", text.length * 2);
@@ -223,13 +260,46 @@ var CsvParser = class {
223
260
  this.active = false;
224
261
  }
225
262
  append(char) {
263
+ if (++this.fieldCharacters > (this.dialect.fieldCharacters ?? Infinity))
264
+ throw new CsvError("INPUT", "Field character limit exceeded");
226
265
  this.budget.chargeAppend(this.field.length + char.length);
227
266
  this.field += char;
228
267
  }
229
268
  finishField() {
230
269
  this.budget.charge("cells", 1);
231
270
  this.budget.charge("retainedBytes", 32);
232
- this.row.push(this.field);
271
+ let value = this.field;
272
+ if (this.dialect.quoting === 2 && !this.quotedField && value.length) {
273
+ this.budget.charge("work", value.length);
274
+ const raw = value.trim().toLowerCase();
275
+ const unsigned = raw.startsWith("+") || raw.startsWith("-") ? raw.slice(1) : raw;
276
+ const negative = raw.startsWith("-");
277
+ if (["inf", "infinity", "nan"].includes(unsigned))
278
+ value = unsigned === "nan" ? "nan" : negative ? "-inf" : "inf";
279
+ else {
280
+ const digit = (char) => char !== void 0 && char >= "0" && char <= "9";
281
+ for (let i = 0; i < raw.length; i++) {
282
+ const char = raw[i];
283
+ if (char === "_" && !(digit(raw[i - 1]) && digit(raw[i + 1])) || !digit(char) && !".+-e_".includes(char))
284
+ throw new CsvError("INPUT", "Could not convert unquoted field to float");
285
+ }
286
+ const number = Number(raw.replaceAll("_", ""));
287
+ if (!raw || Number.isNaN(number))
288
+ throw new CsvError("INPUT", "Could not convert unquoted field to float");
289
+ const absolute = Math.abs(number);
290
+ if (!Number.isFinite(number))
291
+ value = number < 0 ? "-inf" : "inf";
292
+ else if (absolute !== 0 && (absolute < 1e-4 || absolute >= 1e16)) {
293
+ const [mantissa, exponent] = number.toExponential().split("e");
294
+ value = mantissa + "e" + exponent[0] + exponent.slice(1).padStart(2, "0");
295
+ } else
296
+ value = Object.is(number, -0) ? "-0.0" : Number.isInteger(number) ? number.toFixed(1) : String(number);
297
+ }
298
+ this.budget.charge("retainedBytes", value.length * 2);
299
+ }
300
+ this.row.push(value);
301
+ this.fieldCharacters = 0;
302
+ this.quotedField = false;
233
303
  this.field = "";
234
304
  this.state = "start";
235
305
  }
@@ -296,6 +366,7 @@ var CsvParser = class {
296
366
  if (this.state === "closed" && char === quote && this.dialect.doubleQuote !== false) {
297
367
  this.append(char);
298
368
  this.state = "quoted";
369
+ this.quotedField = true;
299
370
  continue;
300
371
  }
301
372
  if (this.dialect.profile === "utf8-sig-strict-v1" && this.state === "closed" && !newline && char !== this.delimiter)
@@ -315,6 +386,7 @@ var CsvParser = class {
315
386
  continue;
316
387
  if (this.state === "start" && char === quote) {
317
388
  this.state = "quoted";
389
+ this.quotedField = true;
318
390
  continue;
319
391
  }
320
392
  if (this.dialect.profile === "utf8-sig-strict-v1" && char === quote)
@@ -5,10 +5,10 @@ import {
5
5
  requiredFileInput,
6
6
  searchRequirements,
7
7
  sedRequirements
8
- } from "../../../safe-bash/command-chunks/chunk-JUDOV5MJ.js";
9
- import "../../../safe-bash/command-chunks/chunk-TOSM3T3A.js";
8
+ } from "../../../safe-bash/command-chunks/chunk-CBDVLMJB.js";
9
+ import "../../../safe-bash/command-chunks/chunk-6EASC5EC.js";
10
10
  import "../../../safe-bash/command-chunks/chunk-OTYUNKT5.js";
11
- import "../../../safe-bash/command-chunks/chunk-Y5IHIAY3.js";
11
+ import "../../../safe-bash/command-chunks/chunk-MDPIOQUD.js";
12
12
  import "../../../safe-bash/command-chunks/chunk-YAFQG4SC.js";
13
13
  import "../../../safe-bash/command-chunks/chunk-3746OSHN.js";
14
14
  import "../../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  requiredFileInput
3
- } from "../../../safe-bash/command-chunks/chunk-JUDOV5MJ.js";
3
+ } from "../../../safe-bash/command-chunks/chunk-CBDVLMJB.js";
4
4
  import {
5
5
  RESOLVED_EXIT_ONE,
6
6
  RESOLVED_EXIT_ZERO,
7
7
  builtInDirectContextExecutors
8
- } from "../../../safe-bash/command-chunks/chunk-TOSM3T3A.js";
8
+ } from "../../../safe-bash/command-chunks/chunk-6EASC5EC.js";
9
9
  import "../../../safe-bash/command-chunks/chunk-OTYUNKT5.js";
10
- import "../../../safe-bash/command-chunks/chunk-Y5IHIAY3.js";
10
+ import "../../../safe-bash/command-chunks/chunk-MDPIOQUD.js";
11
11
  import {
12
12
  inputRequirements
13
13
  } from "../../../safe-bash/command-chunks/chunk-YAFQG4SC.js";
@@ -1,3 +1,3 @@
1
1
  import { type CommandContext, type CommandResult } from "../safe-bash-contracts/index.js";
2
- export declare function gnuInformationSync(name: string, args: readonly string[], externalInvocation?: boolean): string | undefined;
2
+ export declare function gnuInformationSync(name: string, args: readonly string[], externalInvocation?: boolean, posixlyCorrect?: boolean): string | undefined;
3
3
  export declare function gnuInformation(name: string, context: CommandContext): Promise<CommandResult | undefined> | undefined;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  gnuInformation,
3
3
  gnuInformationSync
4
- } from "../safe-bash/command-chunks/chunk-Y5IHIAY3.js";
4
+ } from "../safe-bash/command-chunks/chunk-MDPIOQUD.js";
5
5
  import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
6
6
  export {
7
7
  gnuInformation,
@@ -121,7 +121,7 @@ export declare function replaceArgument(source: string | Uint8Array, pattern: st
121
121
  export declare function escapeBytes(text: string | Uint8Array, zeroOctal?: boolean, bareOctal?: boolean, unicode?: {
122
122
  utf8: boolean;
123
123
  missingDigit: (escape: string) => void;
124
- }): {
124
+ }, literalFormat?: boolean): {
125
125
  bytes: Uint8Array;
126
126
  stop: boolean;
127
127
  };
@@ -44,9 +44,9 @@ import {
44
44
  requireOperands,
45
45
  syncCommandEvaluators,
46
46
  value
47
- } from "../safe-bash/command-chunks/chunk-TOSM3T3A.js";
47
+ } from "../safe-bash/command-chunks/chunk-6EASC5EC.js";
48
48
  import "../safe-bash/command-chunks/chunk-OTYUNKT5.js";
49
- import "../safe-bash/command-chunks/chunk-Y5IHIAY3.js";
49
+ import "../safe-bash/command-chunks/chunk-MDPIOQUD.js";
50
50
  import "../safe-bash/command-chunks/chunk-YAFQG4SC.js";
51
51
  import "../safe-bash/command-chunks/chunk-3746OSHN.js";
52
52
  import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  YqValueFailure,
3
3
  createYqQuerySession
4
- } from "../safe-bash/command-chunks/chunk-YNT4ZJHW.js";
5
- import "../safe-bash/command-chunks/chunk-RTOJNFFL.js";
4
+ } from "../safe-bash/command-chunks/chunk-TPPBPIWL.js";
5
+ import "../safe-bash/command-chunks/chunk-JUMF6JDJ.js";
6
+ import "../safe-bash/command-chunks/chunk-KNI4GRXF.js";
6
7
  import "../safe-bash/command-chunks/chunk-5PM5TEPM.js";
7
8
  import "../safe-bash/command-chunks/chunk-CXMOCPPH.js";
8
9
  import "../safe-bash/command-chunks/chunk-3KROFHBT.js";
10
+ import "../safe-bash/command-chunks/chunk-OYZ534IK.js";
11
+ import "../safe-bash/command-chunks/chunk-SNXWY3KV.js";
9
12
  import "../safe-bash/command-chunks/chunk-VQLFJCG7.js";
10
13
  import "../safe-bash/command-chunks/chunk-HETU7MYN.js";
11
14
  import "../safe-bash/command-chunks/chunk-MYKK3Q5G.js";
12
- import "../safe-bash/command-chunks/chunk-JUMF6JDJ.js";
13
- import "../safe-bash/command-chunks/chunk-OYZ534IK.js";
14
15
  import "../safe-bash/command-chunks/chunk-5L62A5RO.js";
15
16
  import "../safe-bash/command-chunks/chunk-NYUMOVF2.js";
16
17
  import "../safe-bash/command-chunks/chunk-VUG324ER.js";
17
- import "../safe-bash/command-chunks/chunk-SNXWY3KV.js";
18
18
  import "../safe-bash/command-chunks/chunk-UPOI7O7Y.js";
19
19
  import "../safe-bash/command-chunks/chunk-744EDSWN.js";
20
20
  import "../safe-bash/command-chunks/chunk-W3UCANZ3.js";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  Interpreter
3
- } from "../safe-bash/command-chunks/chunk-RTOJNFFL.js";
3
+ } from "../safe-bash/command-chunks/chunk-KNI4GRXF.js";
4
4
  import "../safe-bash/command-chunks/chunk-5PM5TEPM.js";
5
5
  import "../safe-bash/command-chunks/chunk-CXMOCPPH.js";
6
6
  import "../safe-bash/command-chunks/chunk-3KROFHBT.js";
7
+ import "../safe-bash/command-chunks/chunk-OYZ534IK.js";
8
+ import "../safe-bash/command-chunks/chunk-SNXWY3KV.js";
7
9
  import "../safe-bash/command-chunks/chunk-VQLFJCG7.js";
8
10
  import "../safe-bash/command-chunks/chunk-HETU7MYN.js";
9
11
  import "../safe-bash/command-chunks/chunk-MYKK3Q5G.js";
10
- import "../safe-bash/command-chunks/chunk-OYZ534IK.js";
11
12
  import "../safe-bash/command-chunks/chunk-5L62A5RO.js";
12
13
  import "../safe-bash/command-chunks/chunk-NYUMOVF2.js";
13
14
  import "../safe-bash/command-chunks/chunk-VUG324ER.js";
14
- import "../safe-bash/command-chunks/chunk-SNXWY3KV.js";
15
15
  import "../safe-bash/command-chunks/chunk-UPOI7O7Y.js";
16
16
  import "../safe-bash/command-chunks/chunk-744EDSWN.js";
17
17
  import "../safe-bash/command-chunks/chunk-W3UCANZ3.js";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  YqValueFailure,
3
3
  createYqQuerySession
4
- } from "../safe-bash/command-chunks/chunk-YNT4ZJHW.js";
5
- import "../safe-bash/command-chunks/chunk-RTOJNFFL.js";
4
+ } from "../safe-bash/command-chunks/chunk-TPPBPIWL.js";
5
+ import "../safe-bash/command-chunks/chunk-JUMF6JDJ.js";
6
+ import "../safe-bash/command-chunks/chunk-KNI4GRXF.js";
6
7
  import "../safe-bash/command-chunks/chunk-5PM5TEPM.js";
7
8
  import "../safe-bash/command-chunks/chunk-CXMOCPPH.js";
8
9
  import "../safe-bash/command-chunks/chunk-3KROFHBT.js";
10
+ import "../safe-bash/command-chunks/chunk-OYZ534IK.js";
11
+ import "../safe-bash/command-chunks/chunk-SNXWY3KV.js";
9
12
  import "../safe-bash/command-chunks/chunk-VQLFJCG7.js";
10
13
  import "../safe-bash/command-chunks/chunk-HETU7MYN.js";
11
14
  import "../safe-bash/command-chunks/chunk-MYKK3Q5G.js";
12
- import "../safe-bash/command-chunks/chunk-JUMF6JDJ.js";
13
- import "../safe-bash/command-chunks/chunk-OYZ534IK.js";
14
15
  import "../safe-bash/command-chunks/chunk-5L62A5RO.js";
15
16
  import "../safe-bash/command-chunks/chunk-NYUMOVF2.js";
16
17
  import "../safe-bash/command-chunks/chunk-VUG324ER.js";
17
- import "../safe-bash/command-chunks/chunk-SNXWY3KV.js";
18
18
  import "../safe-bash/command-chunks/chunk-UPOI7O7Y.js";
19
19
  import "../safe-bash/command-chunks/chunk-744EDSWN.js";
20
20
  import "../safe-bash/command-chunks/chunk-W3UCANZ3.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-bash",
3
- "version": "0.1.788",
3
+ "version": "0.1.790",
4
4
  "description": "Extensible virtual shell with pluggable filesystems and streaming commands",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -847,7 +847,7 @@
847
847
  "access": "public"
848
848
  },
849
849
  "dependencies": {
850
- "@poe-platform/safe-fs": "0.1.788",
850
+ "@poe-platform/safe-fs": "0.1.790",
851
851
  "pdf-lib": "1.17.1",
852
852
  "@noble/hashes": "2.4.0",
853
853
  "pako": "3.0.1",
@@ -1,14 +0,0 @@
1
- import {
2
- __reExport,
3
- init_platform
4
- } from "./chunk-Q45QCA4J.js";
5
-
6
- // packages/safe-bash/src/escaping.ts
7
- var escaping_exports = {};
8
- init_platform();
9
- __reExport(escaping_exports, escaping_star);
10
- import * as escaping_star from "../../safe-bash-query-engine/escaping.js";
11
-
12
- export {
13
- escaping_exports
14
- };