@poe-platform/safe-bash 0.1.809 → 0.1.811

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 (316) hide show
  1. package/dist/audio-ast/flac-source.d.ts +13 -0
  2. package/dist/audio-ast/index.d.ts +2 -1
  3. package/dist/audio-ast/index.js +254 -179
  4. package/dist/audio-ast/wav-source.d.ts +7 -1
  5. package/dist/image-ast/index.js +1 -1
  6. package/dist/json-ast/backed-json-parser.d.ts +12 -1
  7. package/dist/json-ast/index.d.ts +1 -1
  8. package/dist/office-xml/index.d.ts +1 -0
  9. package/dist/office-xml/retained-xml-edits.d.ts +22 -0
  10. package/dist/pdf-ast/cos/mutable-object-store.d.ts +3 -0
  11. package/dist/pdf-ast/cos/qpdf-json-document.d.ts +43 -0
  12. package/dist/pdf-ast/cos/qpdf-json-values.d.ts +7 -0
  13. package/dist/pdf-ast/index.d.ts +1 -0
  14. package/dist/pdf-ast/index.js +653 -87
  15. package/dist/pdf-ast/retained-document.d.ts +5 -1
  16. package/dist/safe-bash/audio-ast.browser.js +2 -1
  17. package/dist/safe-bash/chunks/{chunk-RQCK77SC.js → chunk-BUYRKFW2.js} +9 -36
  18. package/dist/safe-bash/chunks/{chunk-SOFBGDXG.js → chunk-HHSOUC3Z.js} +32 -0
  19. package/dist/safe-bash/chunks/{chunk-WAZEELYB.js → chunk-TPG55BAQ.js} +10 -7
  20. package/dist/safe-bash/command-chunks/biff-3EFLKBAH-NYWZOYQS.js +4942 -0
  21. package/dist/safe-bash/command-chunks/{chunk-HEHGHIE2.js → chunk-22MOB45U.js} +6 -6
  22. package/dist/safe-bash/command-chunks/{chunk-6DEWZMOL.js → chunk-2CORNDGF.js} +2 -2
  23. package/dist/safe-bash/command-chunks/{chunk-62ZAHKFS.js → chunk-2VCKUNDZ.js} +130 -14
  24. package/dist/safe-bash/command-chunks/{chunk-6UHGIWFX.js → chunk-2ZFLMWOX.js} +1 -1
  25. package/dist/safe-bash/command-chunks/{chunk-HONWGFDA.js → chunk-33YCKZZX.js} +6 -6
  26. package/dist/safe-bash/command-chunks/{chunk-AXWPJRY6.js → chunk-36XGIPOG.js} +1 -1
  27. package/dist/safe-bash/command-chunks/{chunk-32ADKP5E.js → chunk-456PHA3L.js} +1 -1
  28. package/dist/safe-bash/command-chunks/{chunk-UJXP3T6R.js → chunk-4CKFNXRN.js} +1 -1
  29. package/dist/safe-bash/command-chunks/{chunk-5L6GHFRW.js → chunk-554Z6IKP.js} +2 -2
  30. package/dist/safe-bash/command-chunks/{chunk-ORZRWT62.js → chunk-56NYSX65.js} +9 -9
  31. package/dist/safe-bash/command-chunks/{chunk-53JP3S6H.js → chunk-5HPU7D36.js} +4 -4
  32. package/dist/safe-bash/command-chunks/{chunk-NB7JO7FE.js → chunk-5LI2DLNZ.js} +26 -26
  33. package/dist/safe-bash/command-chunks/{chunk-YJJBGN7U.js → chunk-5MB64DWR.js} +9 -9
  34. package/dist/safe-bash/command-chunks/{chunk-3ZWBBS6U.js → chunk-5OO2P27R.js} +340 -34
  35. package/dist/safe-bash/command-chunks/{chunk-IC5GJI7E.js → chunk-5Q22ZLNC.js} +6 -6
  36. package/dist/safe-bash/command-chunks/{chunk-YO3V5RLY.js → chunk-6CCQI6XZ.js} +12 -12
  37. package/dist/safe-bash/command-chunks/{chunk-EO2IVGV7.js → chunk-6M6TM5Z5.js} +3 -3
  38. package/dist/safe-bash/command-chunks/{chunk-Z54Z3KRN.js → chunk-6QBMND4A.js} +1 -1
  39. package/dist/safe-bash/command-chunks/{chunk-INX4JMQ6.js → chunk-6VPQ3CDZ.js} +5 -5
  40. package/dist/safe-bash/command-chunks/chunk-72C3TZ2U.js +826 -0
  41. package/dist/safe-bash/command-chunks/{chunk-VGXVN3BX.js → chunk-7GKKMNL6.js} +8 -8
  42. package/dist/safe-bash/command-chunks/{chunk-TZJC67W3.js → chunk-7PVHO47B.js} +6 -6
  43. package/dist/safe-bash/command-chunks/{chunk-CM3C7AXJ.js → chunk-A2CLZMQZ.js} +1 -1
  44. package/dist/safe-bash/command-chunks/{chunk-ASR27KHW.js → chunk-A5FZBR7X.js} +4 -4
  45. package/dist/safe-bash/command-chunks/{chunk-DMDHE5KC.js → chunk-AHA6IWAJ.js} +6 -6
  46. package/dist/safe-bash/command-chunks/{chunk-PTZ55XXN.js → chunk-APEWTWCC.js} +6 -6
  47. package/dist/safe-bash/command-chunks/{chunk-YUVH6CE4.js → chunk-ATTWQVR2.js} +17 -17
  48. package/dist/safe-bash/command-chunks/{chunk-JON5DB3Z.js → chunk-B5LDP7AA.js} +2 -2
  49. package/dist/safe-bash/command-chunks/{chunk-CHJL6JMU.js → chunk-COKYZUBW.js} +1 -1
  50. package/dist/safe-bash/command-chunks/{chunk-KCTV4NVX.js → chunk-CRV2Q3PB.js} +1 -1
  51. package/dist/safe-bash/command-chunks/{chunk-V3WXPCKN.js → chunk-CV7M2QJU.js} +7 -7
  52. package/dist/safe-bash/command-chunks/{chunk-D7XBUF76.js → chunk-D2ASPM7R.js} +109 -23
  53. package/dist/safe-bash/command-chunks/{chunk-VPDSQPSN.js → chunk-DM2CPMB4.js} +2 -2
  54. package/dist/safe-bash/command-chunks/{chunk-3DTDMEOP.js → chunk-EAGIJ4VW.js} +1 -1
  55. package/dist/safe-bash/command-chunks/{chunk-WFDG3N5R.js → chunk-ECDEPKKW.js} +1 -1
  56. package/dist/safe-bash/command-chunks/{chunk-JW6CMBF2.js → chunk-EHSM5ZQS.js} +8 -8
  57. package/dist/safe-bash/command-chunks/{chunk-WIOH7ZQN.js → chunk-ENT3IV2G.js} +12 -12
  58. package/dist/safe-bash/command-chunks/{chunk-5IE4LJGB.js → chunk-EUT24Y5Z.js} +8 -8
  59. package/dist/safe-bash/command-chunks/{chunk-COKZFXHG.js → chunk-FIIAYCWS.js} +2 -2
  60. package/dist/safe-bash/command-chunks/{chunk-MWVFP2HY.js → chunk-GEM47B2P.js} +7 -7
  61. package/dist/safe-bash/command-chunks/{chunk-OQCJGUI6.js → chunk-HARUYHH7.js} +10 -10
  62. package/dist/safe-bash/command-chunks/{chunk-EHL6B34L.js → chunk-HDJVJTCK.js} +9 -9
  63. package/dist/safe-bash/command-chunks/{chunk-JMM3MNAY.js → chunk-HKATEVAP.js} +6 -6
  64. package/dist/safe-bash/command-chunks/{chunk-NVBUC644.js → chunk-HKGNBH7Z.js} +2 -2
  65. package/dist/safe-bash/command-chunks/{chunk-VWY3EAVQ.js → chunk-HTVIYLVB.js} +4 -4
  66. package/dist/safe-bash/command-chunks/{chunk-Z4QJMDK3.js → chunk-IT7TAC3F.js} +16 -16
  67. package/dist/safe-bash/command-chunks/{chunk-EWS4KYJE.js → chunk-JFYWVQ4V.js} +8 -8
  68. package/dist/safe-bash/command-chunks/{chunk-ZCX63QWA.js → chunk-JOCFI7TG.js} +1 -1
  69. package/dist/safe-bash/command-chunks/{chunk-F5WTH4O4.js → chunk-JQVHUSDD.js} +5 -5
  70. package/dist/safe-bash/command-chunks/{chunk-O4VJEGL6.js → chunk-K5GB2YMN.js} +10 -10
  71. package/dist/safe-bash/command-chunks/{chunk-27C3NT5V.js → chunk-KB7DUBVL.js} +5 -5
  72. package/dist/safe-bash/command-chunks/{chunk-4DZ32PI7.js → chunk-KCOJA7EM.js} +7 -7
  73. package/dist/safe-bash/command-chunks/{chunk-6OKH4X67.js → chunk-KJ4XXZIL.js} +273 -10
  74. package/dist/safe-bash/command-chunks/{chunk-GLVD3JJG.js → chunk-KL3OIBKB.js} +4712 -4654
  75. package/dist/safe-bash/command-chunks/{chunk-U6QHTC5J.js → chunk-L5MCW6CM.js} +4 -4
  76. package/dist/safe-bash/command-chunks/{chunk-LVL3A7YE.js → chunk-LCZDBW55.js} +5 -5
  77. package/dist/safe-bash/command-chunks/{chunk-DJVRDUCA.js → chunk-LXLLA4PM.js} +17 -17
  78. package/dist/safe-bash/command-chunks/{chunk-K7AGAS3K.js → chunk-M7QE2MN7.js} +6 -6
  79. package/dist/safe-bash/command-chunks/chunk-MGBHGZEX.js +12 -0
  80. package/dist/safe-bash/command-chunks/{chunk-SWT6ILF2.js → chunk-MPUHH2KR.js} +3 -3
  81. package/dist/safe-bash/command-chunks/{chunk-DC3OJLRB.js → chunk-NQDIT667.js} +5 -5
  82. package/dist/safe-bash/command-chunks/{chunk-LWZVDDJA.js → chunk-NUGQQDGE.js} +5 -1
  83. package/dist/safe-bash/command-chunks/{chunk-MFLQZLFR.js → chunk-OA75SGN2.js} +7 -7
  84. package/dist/safe-bash/command-chunks/{chunk-5LATYOF7.js → chunk-OEJM666F.js} +5 -5
  85. package/dist/safe-bash/command-chunks/{chunk-AF25YYIO.js → chunk-PMAM4N33.js} +9 -9
  86. package/dist/safe-bash/command-chunks/{chunk-4557HE3J.js → chunk-PMWW7KSB.js} +161 -42
  87. package/dist/safe-bash/command-chunks/{chunk-KMMAJ6H6.js → chunk-PNGDJA6M.js} +2 -2
  88. package/dist/safe-bash/command-chunks/{chunk-62BHPSKJ.js → chunk-Q6S57NOQ.js} +7 -7
  89. package/dist/safe-bash/command-chunks/{chunk-KJ3PEDI2.js → chunk-Q73EMLLZ.js} +146 -4
  90. package/dist/safe-bash/command-chunks/{chunk-FXKBM5KJ.js → chunk-QC5RMGSA.js} +3 -3
  91. package/dist/safe-bash/command-chunks/{chunk-UQ6UIZMM.js → chunk-QD7ZRDUN.js} +1 -1
  92. package/dist/safe-bash/command-chunks/{chunk-JHUYZZGV.js → chunk-QYMEASQ6.js} +4 -4
  93. package/dist/safe-bash/command-chunks/{chunk-3GY5VDIX.js → chunk-QZZ73J2O.js} +6 -6
  94. package/dist/safe-bash/command-chunks/{chunk-S2CYIGWH.js → chunk-R6EGGK5M.js} +7 -7
  95. package/dist/safe-bash/command-chunks/{chunk-7AVN3OBH.js → chunk-RHYJVTJO.js} +2 -2
  96. package/dist/safe-bash/command-chunks/{chunk-EWGDSO6U.js → chunk-RID6VYS3.js} +8 -8
  97. package/dist/safe-bash/command-chunks/{chunk-MMBRBANA.js → chunk-RNSKXOG3.js} +6 -6
  98. package/dist/safe-bash/command-chunks/{chunk-D3ZRZTY5.js → chunk-RQIQ75W5.js} +5 -5
  99. package/dist/safe-bash/command-chunks/{chunk-DWKQPLRT.js → chunk-RRL3Y562.js} +11 -11
  100. package/dist/safe-bash/command-chunks/{chunk-JW3KIZU6.js → chunk-RUXY7GN5.js} +1 -1
  101. package/dist/safe-bash/command-chunks/{chunk-NXCMXD74.js → chunk-S6R3IB36.js} +1 -1
  102. package/dist/safe-bash/command-chunks/{chunk-XUPKFHAQ.js → chunk-SDTPO2VV.js} +7 -7
  103. package/dist/safe-bash/command-chunks/{chunk-PIAGKRFW.js → chunk-SPLOIABU.js} +3 -3
  104. package/dist/safe-bash/command-chunks/{chunk-KELMIFVV.js → chunk-TI52LKLL.js} +1 -1
  105. package/dist/safe-bash/command-chunks/{chunk-WLTJDNSQ.js → chunk-TVH4JORU.js} +3 -3
  106. package/dist/safe-bash/command-chunks/{chunk-6XVMWFHD.js → chunk-TW73OXPR.js} +6 -6
  107. package/dist/safe-bash/command-chunks/{chunk-SFO43CID.js → chunk-UAXSE3XE.js} +5 -5
  108. package/dist/safe-bash/command-chunks/{chunk-K35BSUHO.js → chunk-UYWSIIUX.js} +7 -7
  109. package/dist/safe-bash/command-chunks/{chunk-JJQ72P3V.js → chunk-VCML4T5D.js} +1 -1
  110. package/dist/safe-bash/command-chunks/{chunk-DCD32BEY.js → chunk-VU3EQF7F.js} +91 -53
  111. package/dist/safe-bash/command-chunks/{chunk-2E2YEDVB.js → chunk-W5YSINXC.js} +6 -6
  112. package/dist/safe-bash/command-chunks/{chunk-EYNT4OEJ.js → chunk-WGG6G2KG.js} +7 -7
  113. package/dist/safe-bash/command-chunks/chunk-WH3TIOTS.js +326 -0
  114. package/dist/safe-bash/command-chunks/{chunk-DVQBZXMQ.js → chunk-WJCN2IXI.js} +2 -2
  115. package/dist/safe-bash/command-chunks/{chunk-45FI2IPY.js → chunk-WQ6ABTJU.js} +3 -6
  116. package/dist/safe-bash/command-chunks/{chunk-XBZ4ZWGL.js → chunk-WVMHRNXZ.js} +3 -3
  117. package/dist/safe-bash/command-chunks/{chunk-7GXUCQI4.js → chunk-WXRYDALR.js} +4 -4
  118. package/dist/safe-bash/command-chunks/{chunk-S4IIOSRA.js → chunk-X7FA7ZD5.js} +8 -8
  119. package/dist/safe-bash/command-chunks/{chunk-SFCERNHU.js → chunk-XPD636C4.js} +3 -3
  120. package/dist/safe-bash/command-chunks/{chunk-HYDWQLJ3.js → chunk-XRVKWGVQ.js} +6 -6
  121. package/dist/safe-bash/command-chunks/{chunk-3UJWHRK4.js → chunk-XVP6V5K3.js} +6 -6
  122. package/dist/safe-bash/command-chunks/{chunk-KTI3BULE.js → chunk-XZ2FWFNV.js} +6 -6
  123. package/dist/safe-bash/command-chunks/{chunk-QK3CHRGL.js → chunk-Y4EYCZFT.js} +10 -10
  124. package/dist/safe-bash/command-chunks/{chunk-GTWVMFBK.js → chunk-YORJDX4V.js} +4 -4
  125. package/dist/safe-bash/command-chunks/{chunk-H6F5SN2N.js → chunk-YSMNXMAO.js} +4 -4
  126. package/dist/safe-bash/command-chunks/{chunk-GKYCV6BU.js → chunk-YSY6R6AS.js} +493 -183
  127. package/dist/safe-bash/command-chunks/{chunk-SE5SJ4JT.js → chunk-Z2JW6M2D.js} +3 -3
  128. package/dist/safe-bash/command-chunks/{chunk-5HGEXQVD.js → chunk-ZHRGYR7B.js} +7 -7
  129. package/dist/safe-bash/command-chunks/{chunk-HQYFRQ5W.js → chunk-ZIIO6GRY.js} +7 -7
  130. package/dist/safe-bash/command-chunks/{chunk-NTRZMQZP.js → chunk-ZMHEGDU2.js} +2 -2
  131. package/dist/safe-bash/command-chunks/{chunk-EYBXHGA6.js → chunk-ZXR6LXV5.js} +2 -2
  132. package/dist/safe-bash/command-chunks/{command-engine-P5DFM4OU.js → command-engine-BEWABZ75.js} +10 -3
  133. package/dist/safe-bash/command-chunks/{engine-RU4OFLPO-CPLFYD67.js → engine-AXXFTGCL-QBQNBI6K.js} +1 -1
  134. package/dist/safe-bash/command-chunks/pdf-XHHFTOT4-UJJYOYJ2.js +573 -0
  135. package/dist/safe-bash/commands/audio/index.browser.js +2 -14
  136. package/dist/safe-bash/commands/diff-patch/index.js +0 -5
  137. package/dist/safe-bash/commands/diff3/index.js +0 -2
  138. package/dist/safe-bash/commands/ffprobe/index.browser.js +2 -5
  139. package/dist/safe-bash/commands/pandoc/index.browser.js +3 -1
  140. package/dist/safe-bash/commands/text.js +10 -1
  141. package/dist/safe-bash/core.d.ts +2 -2
  142. package/dist/safe-bash/core.js +2 -2
  143. package/dist/safe-bash/full-core.browser.js +18 -22
  144. package/dist/safe-bash/lazy-optional.d.ts +9 -0
  145. package/dist/safe-bash/lazy-optional.js +24 -0
  146. package/dist/safe-bash/plugins/index.browser.js +5 -3
  147. package/dist/safe-bash/plugins/index.js +3 -1
  148. package/dist/safe-bash/plugins/portable-commands.d.ts +1 -1
  149. package/dist/safe-bash/plugins/portable-commands.js +5 -3
  150. package/dist/safe-bash/registry-entry.browser.js +1 -1
  151. package/dist/safe-bash-command-apply-patch/apply.js +2 -2
  152. package/dist/safe-bash-command-apply-patch/index.js +2 -2
  153. package/dist/safe-bash-command-apply-patch/parser.d.ts +20 -1
  154. package/dist/safe-bash-command-apply-patch/parser.js +1 -1
  155. package/dist/safe-bash-command-diff/index.js +0 -2
  156. package/dist/safe-bash-command-diff3/index.js +830 -56
  157. package/dist/safe-bash-command-ffmpeg/index.js +1 -1
  158. package/dist/safe-bash-command-ffprobe/index.js +3 -2
  159. package/dist/safe-bash-command-ffprobe/media.js +3 -2
  160. package/dist/safe-bash-command-ffprobe/options.d.ts +15 -0
  161. package/dist/safe-bash-command-ffprobe/options.js +7 -0
  162. package/dist/safe-bash-command-html-to-markdown/index.js +75 -21
  163. package/dist/safe-bash-command-media/index.js +2 -2
  164. package/dist/safe-bash-command-media/plugin.js +1 -1
  165. package/dist/safe-bash-command-media/remote.js +2 -2
  166. package/dist/safe-bash-command-pandoc/command.js +8 -8
  167. package/dist/safe-bash-command-pandoc/execution.d.ts +2 -2
  168. package/dist/safe-bash-command-pandoc/index.d.ts +1 -1
  169. package/dist/safe-bash-command-pandoc/index.js +37 -37
  170. package/dist/safe-bash-command-pandoc/lua-filters.js +2 -2
  171. package/dist/safe-bash-command-pandoc/types.d.ts +17 -2
  172. package/dist/safe-bash-command-patch/index.js +2 -2
  173. package/dist/safe-bash-command-patch/patch-publication.d.ts +2 -2
  174. package/dist/safe-bash-command-patch/patch-publication.js +1 -1
  175. package/dist/safe-bash-command-patch/patch.js +2 -2
  176. package/dist/safe-bash-command-pdftk/index.js +616 -265
  177. package/dist/safe-bash-command-pptx/engine.js +1 -1
  178. package/dist/safe-bash-command-qpdf/index.js +115 -9
  179. package/dist/safe-bash-command-soffice/index.js +1 -1
  180. package/dist/safe-bash-command-ssconvert/index.js +2 -2
  181. package/dist/safe-bash-command-xmllint/index.js +137 -30
  182. package/dist/safe-bash-command-xq/index.js +45 -29
  183. package/dist/safe-bash-compression-engine/bounded-codec.js +2 -2
  184. package/dist/safe-bash-compression-engine/codec-loader.js +1 -1
  185. package/dist/safe-bash-compression-engine/files.js +5 -5
  186. package/dist/safe-bash-compression-engine/index.js +4 -4
  187. package/dist/safe-bash-compression-engine/operand.js +5 -5
  188. package/dist/safe-bash-compression-engine/stream.js +4 -4
  189. package/dist/safe-bash-compression-engine/zstd-decode.js +3 -3
  190. package/dist/safe-bash-media-engine/imagemagick.d.ts +2 -0
  191. package/dist/safe-bash-media-engine/index.js +162 -72
  192. package/dist/safe-bash-network-engine/body.d.ts +1 -0
  193. package/dist/safe-bash-network-engine/body.js +1 -1
  194. package/dist/safe-bash-network-engine/transfer.js +11 -3
  195. package/dist/safe-bash-presentation-engine/accessibility.js +30 -30
  196. package/dist/safe-bash-presentation-engine/animation-editing.js +15 -15
  197. package/dist/safe-bash-presentation-engine/animations.js +15 -15
  198. package/dist/safe-bash-presentation-engine/backgrounds.js +16 -16
  199. package/dist/safe-bash-presentation-engine/bytes.js +3 -3
  200. package/dist/safe-bash-presentation-engine/chart-editing.js +33 -33
  201. package/dist/safe-bash-presentation-engine/chart-object-operations.js +24 -24
  202. package/dist/safe-bash-presentation-engine/charts.js +30 -30
  203. package/dist/safe-bash-presentation-engine/command-placeholder.js +55 -54
  204. package/dist/safe-bash-presentation-engine/comments.js +16 -16
  205. package/dist/safe-bash-presentation-engine/connector-operations.js +31 -31
  206. package/dist/safe-bash-presentation-engine/connectors.js +28 -28
  207. package/dist/safe-bash-presentation-engine/content-types.js +4 -4
  208. package/dist/safe-bash-presentation-engine/creation.js +6 -6
  209. package/dist/safe-bash-presentation-engine/diff.js +31 -31
  210. package/dist/safe-bash-presentation-engine/drawing-format.js +19 -19
  211. package/dist/safe-bash-presentation-engine/drawing-operations.js +30 -30
  212. package/dist/safe-bash-presentation-engine/drawing-schema.js +20 -20
  213. package/dist/safe-bash-presentation-engine/equations.js +16 -16
  214. package/dist/safe-bash-presentation-engine/errors.js +2 -2
  215. package/dist/safe-bash-presentation-engine/fields.js +16 -16
  216. package/dist/safe-bash-presentation-engine/font-metrics.js +3 -3
  217. package/dist/safe-bash-presentation-engine/image-extraction.js +19 -19
  218. package/dist/safe-bash-presentation-engine/image-formatting.js +31 -31
  219. package/dist/safe-bash-presentation-engine/image-insertion.js +17 -17
  220. package/dist/safe-bash-presentation-engine/image-replacement.js +20 -20
  221. package/dist/safe-bash-presentation-engine/image-value.js +4 -4
  222. package/dist/safe-bash-presentation-engine/images.js +18 -18
  223. package/dist/safe-bash-presentation-engine/index.d.ts +2 -2
  224. package/dist/safe-bash-presentation-engine/index.js +100 -93
  225. package/dist/safe-bash-presentation-engine/layouts.js +15 -15
  226. package/dist/safe-bash-presentation-engine/length.js +3 -3
  227. package/dist/safe-bash-presentation-engine/links.js +15 -15
  228. package/dist/safe-bash-presentation-engine/masters.js +14 -14
  229. package/dist/safe-bash-presentation-engine/media-editing.js +23 -23
  230. package/dist/safe-bash-presentation-engine/media-extraction.js +16 -16
  231. package/dist/safe-bash-presentation-engine/media.js +15 -15
  232. package/dist/safe-bash-presentation-engine/memberships.js +14 -14
  233. package/dist/safe-bash-presentation-engine/notes.js +15 -15
  234. package/dist/safe-bash-presentation-engine/ole-enum.js +4 -4
  235. package/dist/safe-bash-presentation-engine/ole-insertion.js +19 -19
  236. package/dist/safe-bash-presentation-engine/opaque-objects.js +9 -9
  237. package/dist/safe-bash-presentation-engine/package-reader.js +5 -5
  238. package/dist/safe-bash-presentation-engine/package-tools.js +15 -15
  239. package/dist/safe-bash-presentation-engine/package-uri.js +3 -3
  240. package/dist/safe-bash-presentation-engine/package-writer.js +4 -4
  241. package/dist/safe-bash-presentation-engine/presentation-model.js +54 -53
  242. package/dist/safe-bash-presentation-engine/presentation-settings.js +13 -13
  243. package/dist/safe-bash-presentation-engine/properties.js +15 -15
  244. package/dist/safe-bash-presentation-engine/relationships.js +4 -4
  245. package/dist/safe-bash-presentation-engine/resource-limits.js +1 -1
  246. package/dist/safe-bash-presentation-engine/retained-inspection.js +12 -12
  247. package/dist/safe-bash-presentation-engine/retained-package.js +4 -4
  248. package/dist/safe-bash-presentation-engine/retained-slide-settings.d.ts +15 -0
  249. package/dist/safe-bash-presentation-engine/retained-text.js +19 -19
  250. package/dist/safe-bash-presentation-engine/retained-xml-parts.d.ts +26 -0
  251. package/dist/safe-bash-presentation-engine/sanitize.js +16 -16
  252. package/dist/safe-bash-presentation-engine/selectors.js +10 -10
  253. package/dist/safe-bash-presentation-engine/shape-groups.js +30 -30
  254. package/dist/safe-bash-presentation-engine/shape-operations.js +29 -29
  255. package/dist/safe-bash-presentation-engine/shape-path-operations.js +31 -31
  256. package/dist/safe-bash-presentation-engine/shape-paths.js +15 -15
  257. package/dist/safe-bash-presentation-engine/shape-presets.js +3 -3
  258. package/dist/safe-bash-presentation-engine/shape-selection.js +30 -30
  259. package/dist/safe-bash-presentation-engine/shape-transforms.js +17 -17
  260. package/dist/safe-bash-presentation-engine/shapes.js +26 -26
  261. package/dist/safe-bash-presentation-engine/slide-copy.js +16 -16
  262. package/dist/safe-bash-presentation-engine/slide-import.js +17 -17
  263. package/dist/safe-bash-presentation-engine/slide-merge-split.js +19 -19
  264. package/dist/safe-bash-presentation-engine/slide-model.js +42 -42
  265. package/dist/safe-bash-presentation-engine/slide-removal.js +17 -17
  266. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +9 -9
  267. package/dist/safe-bash-presentation-engine/slides.d.ts +2 -0
  268. package/dist/safe-bash-presentation-engine/slides.js +21 -16
  269. package/dist/safe-bash-presentation-engine/table-operations.js +32 -32
  270. package/dist/safe-bash-presentation-engine/table-spans.js +31 -31
  271. package/dist/safe-bash-presentation-engine/tables.js +30 -30
  272. package/dist/safe-bash-presentation-engine/tags.js +15 -15
  273. package/dist/safe-bash-presentation-engine/template-bindings.js +32 -32
  274. package/dist/safe-bash-presentation-engine/template-repeat.js +39 -39
  275. package/dist/safe-bash-presentation-engine/text-fitting.js +26 -26
  276. package/dist/safe-bash-presentation-engine/text-frames.js +26 -26
  277. package/dist/safe-bash-presentation-engine/text-paragraphs.js +26 -26
  278. package/dist/safe-bash-presentation-engine/text-reading.js +11 -11
  279. package/dist/safe-bash-presentation-engine/text-replacement.js +16 -16
  280. package/dist/safe-bash-presentation-engine/text-runs.js +19 -19
  281. package/dist/safe-bash-presentation-engine/themes.js +15 -15
  282. package/dist/safe-bash-presentation-engine/transitions.js +15 -15
  283. package/dist/safe-bash-presentation-engine/validation.js +9 -9
  284. package/dist/safe-bash-presentation-engine/xml-parts.d.ts +1 -0
  285. package/dist/safe-bash-presentation-engine/xml-parts.js +19 -13
  286. package/dist/safe-bash-presentation-engine/xml-view.js +3 -3
  287. package/dist/safe-bash-presentation-engine/xml.js +3 -3
  288. package/dist/safe-bash-xml-engine/document.js +1 -1
  289. package/dist/safe-bash-xml-engine/index.js +1 -1
  290. package/dist/safe-bash-xml-engine/json.d.ts +1 -0
  291. package/dist/safe-bash-xml-engine/json.js +203 -0
  292. package/dist/safe-bash-xml-engine/stored-json.d.ts +5 -0
  293. package/dist/spreadsheet-engine/rendering/print/bidi-runs.d.ts +5 -0
  294. package/dist/spreadsheet-engine/rendering/print/bidi-runs.js +35 -0
  295. package/dist/spreadsheet-engine/rendering/print/control-bidi.d.ts +8 -0
  296. package/dist/spreadsheet-engine/rendering/print/control-bidi.js +80 -0
  297. package/dist/spreadsheet-engine/rendering/print/tab-layout.d.ts +11 -0
  298. package/dist/spreadsheet-engine/rendering/print/tab-layout.js +15 -0
  299. package/dist/spreadsheet-engine/rendering/print/text-lines.d.ts +2 -2
  300. package/dist/spreadsheet-engine/rendering/print/text-lines.js +3 -3
  301. package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +5 -1
  302. package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +151 -57
  303. package/dist/spreadsheet-format-xls/biff-encryption.d.ts +1 -1
  304. package/dist/spreadsheet-format-xls/biff-encryption.js +8 -3
  305. package/dist/spreadsheet-format-xls/biff-property-bytes.d.ts +4 -1
  306. package/dist/spreadsheet-format-xls/biff-property-bytes.js +3 -3
  307. package/dist/spreadsheet-format-xls/biff-range.js +1 -1
  308. package/dist/spreadsheet-format-xls/biff.js +11 -3
  309. package/package.json +6 -2
  310. package/dist/safe-bash/chunks/chunk-I2A5ZCPD.js +0 -17
  311. package/dist/safe-bash/chunks/chunk-PQTT2EZP.js +0 -8
  312. package/dist/safe-bash/command-chunks/biff-DS263V2K-2GP4GZT7.js +0 -4868
  313. package/dist/safe-bash/command-chunks/chunk-6ZFYWT3U.js +0 -581
  314. package/dist/safe-bash/command-chunks/chunk-S244SWDH.js +0 -153
  315. package/dist/safe-bash/command-chunks/pdf-T7AWYZGQ-KNAYJ7YF.js +0 -552
  316. /package/dist/safe-bash/command-chunks/{chunk-EMMSXKEJ.js → chunk-4Q4R3VZU.js} +0 -0
@@ -3,16 +3,16 @@ import {
3
3
  diagramContentTypes,
4
4
  diagramRelationshipKinds,
5
5
  prepareSelectionQuery
6
- } from "./chunk-S4IIOSRA.js";
6
+ } from "./chunk-X7FA7ZD5.js";
7
7
  import {
8
8
  dialects,
9
9
  openRetainedCompatibility,
10
10
  openRetainedContentTypes,
11
11
  openRetainedRelationshipGraph
12
- } from "./chunk-FXKBM5KJ.js";
12
+ } from "./chunk-QC5RMGSA.js";
13
13
  import {
14
14
  equationOpaqueElements
15
- } from "./chunk-6UHGIWFX.js";
15
+ } from "./chunk-2ZFLMWOX.js";
16
16
  import {
17
17
  OfficeError,
18
18
  RetainedValues,
@@ -23,7 +23,7 @@ import {
23
23
  literal,
24
24
  openRetainedXmlDocument,
25
25
  resolveOfficeResources
26
- } from "./chunk-KJ3PEDI2.js";
26
+ } from "./chunk-Q73EMLLZ.js";
27
27
 
28
28
  // packages/safe-bash-presentation-engine/src/retained-inspection.ts
29
29
  import { PagedStorage as PagedStorage6 } from "@poe-platform/safe-fs/storage";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  SlideTransferBudget
3
- } from "./chunk-XUPKFHAQ.js";
3
+ } from "./chunk-SDTPO2VV.js";
4
4
  import {
5
5
  importSelectedSlides
6
- } from "./chunk-WIOH7ZQN.js";
6
+ } from "./chunk-ENT3IV2G.js";
7
7
  import {
8
8
  writePackageArchive
9
- } from "./chunk-VPDSQPSN.js";
9
+ } from "./chunk-DM2CPMB4.js";
10
10
  import {
11
11
  validatePresentation
12
- } from "./chunk-MMBRBANA.js";
12
+ } from "./chunk-RNSKXOG3.js";
13
13
  import {
14
14
  OfficeError
15
- } from "./chunk-KJ3PEDI2.js";
15
+ } from "./chunk-Q73EMLLZ.js";
16
16
 
17
17
  // packages/safe-bash-presentation-engine/src/slide-merge-split.ts
18
18
  function fields(value, allowed) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  inspectChart,
3
3
  readCharts
4
- } from "./chunk-XBZ4ZWGL.js";
4
+ } from "./chunk-WVMHRNXZ.js";
5
5
  import {
6
6
  XL_AXIS_CROSSES,
7
7
  XL_CATEGORY_TYPE,
@@ -13,11 +13,11 @@ import {
13
13
  XL_TICK_MARK,
14
14
  applyChartFontUpdate,
15
15
  validateChartObjectUpdates
16
- } from "./chunk-JW6CMBF2.js";
16
+ } from "./chunk-EHSM5ZQS.js";
17
17
  import {
18
18
  nodeFor,
19
19
  validateSelection
20
- } from "./chunk-6XVMWFHD.js";
20
+ } from "./chunk-TW73OXPR.js";
21
21
  import {
22
22
  FillFormat,
23
23
  LineFormat,
@@ -25,17 +25,17 @@ import {
25
25
  TextFrame,
26
26
  applyFrameFormatting,
27
27
  applyShapeUpdate
28
- } from "./chunk-Z4QJMDK3.js";
28
+ } from "./chunk-IT7TAC3F.js";
29
29
  import {
30
30
  createXmlElementView
31
- } from "./chunk-UJXP3T6R.js";
31
+ } from "./chunk-4CKFNXRN.js";
32
32
  import {
33
33
  ShapeIdAllocator
34
- } from "./chunk-7GXUCQI4.js";
34
+ } from "./chunk-WXRYDALR.js";
35
35
  import {
36
36
  applyDrawingUpdate,
37
37
  validateDrawingUpdate
38
- } from "./chunk-JHUYZZGV.js";
38
+ } from "./chunk-QYMEASQ6.js";
39
39
  import {
40
40
  attr,
41
41
  child,
@@ -44,38 +44,38 @@ import {
44
44
  nextRel,
45
45
  relPart,
46
46
  required
47
- } from "./chunk-ORZRWT62.js";
47
+ } from "./chunk-56NYSX65.js";
48
48
  import {
49
49
  writePackageArchive
50
- } from "./chunk-VPDSQPSN.js";
50
+ } from "./chunk-DM2CPMB4.js";
51
51
  import {
52
52
  SelectionError
53
- } from "./chunk-S4IIOSRA.js";
53
+ } from "./chunk-X7FA7ZD5.js";
54
54
  import {
55
55
  readPackage
56
- } from "./chunk-SFCERNHU.js";
56
+ } from "./chunk-XPD636C4.js";
57
57
  import {
58
58
  parseXmlPart
59
- } from "./chunk-5L6GHFRW.js";
59
+ } from "./chunk-554Z6IKP.js";
60
60
  import {
61
61
  parseContentTypes
62
- } from "./chunk-DVQBZXMQ.js";
62
+ } from "./chunk-WJCN2IXI.js";
63
63
  import {
64
64
  readRelationshipGraph
65
- } from "./chunk-NTRZMQZP.js";
65
+ } from "./chunk-ZMHEGDU2.js";
66
66
  import {
67
67
  relativePartReference
68
- } from "./chunk-AXWPJRY6.js";
68
+ } from "./chunk-36XGIPOG.js";
69
69
  import {
70
70
  IndexError,
71
71
  InvalidHandleError,
72
72
  PropertyAccessError,
73
73
  TypeError,
74
74
  ValueError
75
- } from "./chunk-NXCMXD74.js";
75
+ } from "./chunk-S6R3IB36.js";
76
76
  import {
77
77
  OfficeError
78
- } from "./chunk-KJ3PEDI2.js";
78
+ } from "./chunk-Q73EMLLZ.js";
79
79
  import {
80
80
  __export
81
81
  } from "./chunk-65DS4IOB.js";
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  sanitizeProperties
3
- } from "./chunk-EO2IVGV7.js";
3
+ } from "./chunk-6M6TM5Z5.js";
4
4
  import {
5
5
  attr,
6
6
  invalid,
7
7
  loadShared,
8
8
  relPart
9
- } from "./chunk-ORZRWT62.js";
9
+ } from "./chunk-56NYSX65.js";
10
10
  import {
11
11
  readPackage
12
- } from "./chunk-SFCERNHU.js";
12
+ } from "./chunk-XPD636C4.js";
13
13
  import {
14
14
  parseXmlPart
15
- } from "./chunk-5L6GHFRW.js";
15
+ } from "./chunk-554Z6IKP.js";
16
16
  import {
17
17
  parseContentTypes
18
- } from "./chunk-DVQBZXMQ.js";
18
+ } from "./chunk-WJCN2IXI.js";
19
19
  import {
20
20
  OfficeError
21
- } from "./chunk-KJ3PEDI2.js";
21
+ } from "./chunk-Q73EMLLZ.js";
22
22
 
23
23
  // packages/safe-bash-presentation-engine/src/sanitize.ts
24
24
  var namespaces = [
@@ -0,0 +1,12 @@
1
+ // packages/safe-bash-command-ffprobe/src/options.ts
2
+ function resolveFfprobeLimits(options) {
3
+ const limits = { maxInputBytes: 32 * 1024 * 1024, maxOutputBytes: 1024 * 1024, ...options };
4
+ for (const value of [limits.maxInputBytes, limits.maxOutputBytes]) {
5
+ if (value !== void 0 && (!Number.isSafeInteger(value) || value < 1)) throw new RangeError("Invalid ffprobe limit");
6
+ }
7
+ return limits;
8
+ }
9
+
10
+ export {
11
+ resolveFfprobeLimits
12
+ };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  equationNamespaces
3
- } from "./chunk-6UHGIWFX.js";
3
+ } from "./chunk-2ZFLMWOX.js";
4
4
  import {
5
5
  parseXmlPart
6
- } from "./chunk-5L6GHFRW.js";
6
+ } from "./chunk-554Z6IKP.js";
7
7
  import {
8
8
  OfficeError
9
- } from "./chunk-KJ3PEDI2.js";
9
+ } from "./chunk-Q73EMLLZ.js";
10
10
 
11
11
  // packages/safe-bash-presentation-engine/src/slide-copy-xml.ts
12
12
  function attr(node, name, namespace = "") {
@@ -4,20 +4,20 @@ import {
4
4
  escape,
5
5
  invalid,
6
6
  loadShared
7
- } from "./chunk-ORZRWT62.js";
7
+ } from "./chunk-56NYSX65.js";
8
8
  import {
9
9
  SelectionError,
10
10
  decodeSelectionToken
11
- } from "./chunk-S4IIOSRA.js";
11
+ } from "./chunk-X7FA7ZD5.js";
12
12
  import {
13
13
  parseXmlPart
14
- } from "./chunk-5L6GHFRW.js";
14
+ } from "./chunk-554Z6IKP.js";
15
15
  import {
16
16
  partName
17
- } from "./chunk-AXWPJRY6.js";
17
+ } from "./chunk-36XGIPOG.js";
18
18
  import {
19
19
  OfficeError
20
- } from "./chunk-KJ3PEDI2.js";
20
+ } from "./chunk-Q73EMLLZ.js";
21
21
 
22
22
  // packages/safe-bash-presentation-engine/src/animation-editing.ts
23
23
  import { SaxesParser } from "saxes";
@@ -277,7 +277,7 @@ var Keys = class {
277
277
  return true;
278
278
  }
279
279
  };
280
- async function parseBackedJson(chunks, tree, index, cooperate, error, validateNumber, allowDuplicateKeys = false, checkDepth, node, reference, retained) {
280
+ async function parseBackedJson(chunks, tree, index, cooperate, onError, validateNumber, allowDuplicateKeys = false, checkDepth, node, reference, retained) {
281
281
  let depth = 0, valueAtEof = true, edgePending = false, stringUnits = 0;
282
282
  checkDepth?.(depth);
283
283
  const edge = () => {
@@ -290,6 +290,8 @@ async function parseBackedJson(chunks, tree, index, cooperate, error, validateNu
290
290
  let isKey = false, keyParent = 0, keyPosition = 0, keyOffset = 0, hash = 0;
291
291
  let escape = false, hex = 0, code = 0, keyword = "", keywordIndex = 0;
292
292
  let number = "start", numberOffset = 0;
293
+ let container;
294
+ const error = (at, message, start) => onError(at, message, start, { mode, token, number, escape, hex, container });
293
295
  const digit = (char) => char >= "0" && char <= "9";
294
296
  const flush = async () => {
295
297
  if (buffer) {
@@ -447,6 +449,7 @@ async function parseBackedJson(chunks, tree, index, cooperate, error, validateNu
447
449
  if (mode === "done") error(offset, "Unexpected trailing JSON");
448
450
  if (mode === "separator") {
449
451
  const parent = await tree.describe(position);
452
+ container = parent.kind === "array" ? "array" : "object";
450
453
  if (char === (parent.kind === "array" ? "]" : "}")) mode = await end();
451
454
  else if (char === ",") {
452
455
  mode = parent.kind === "array" ? "value" : "key";
@@ -518,6 +521,7 @@ async function parseBackedJson(chunks, tree, index, cooperate, error, validateNu
518
521
  }
519
522
  if (!token && mode === "value" && valueAtEof) node?.("scalar");
520
523
  if (token === "number") mode = await endNumber();
524
+ if (!token && mode === "separator") container = (await tree.describe(position)).kind === "array" ? "array" : "object";
521
525
  if (token || mode !== "done") error(offset, !token && mode === "separator" ? "Expected JSON comma" : "Incomplete JSON value", token ? tokenOffset : void 0);
522
526
  if (work) await cooperate(work);
523
527
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  requireLegacyCommentRemapping
3
- } from "./chunk-WLTJDNSQ.js";
3
+ } from "./chunk-TVH4JORU.js";
4
4
  import {
5
5
  attr,
6
6
  child,
@@ -9,23 +9,23 @@ import {
9
9
  loadShared,
10
10
  nextRel,
11
11
  relPart
12
- } from "./chunk-ORZRWT62.js";
12
+ } from "./chunk-56NYSX65.js";
13
13
  import {
14
14
  SelectionError,
15
15
  decodeSelectionToken
16
- } from "./chunk-S4IIOSRA.js";
16
+ } from "./chunk-X7FA7ZD5.js";
17
17
  import {
18
18
  parseXmlPart
19
- } from "./chunk-5L6GHFRW.js";
19
+ } from "./chunk-554Z6IKP.js";
20
20
  import {
21
21
  parseContentTypes
22
- } from "./chunk-DVQBZXMQ.js";
22
+ } from "./chunk-WJCN2IXI.js";
23
23
  import {
24
24
  relativePartReference
25
- } from "./chunk-AXWPJRY6.js";
25
+ } from "./chunk-36XGIPOG.js";
26
26
  import {
27
27
  OfficeError
28
- } from "./chunk-KJ3PEDI2.js";
28
+ } from "./chunk-Q73EMLLZ.js";
29
29
 
30
30
  // packages/safe-bash-presentation-engine/src/modern-comments.ts
31
31
  import { SaxesParser } from "saxes";
@@ -7,19 +7,19 @@ import {
7
7
  nextRel,
8
8
  relPart,
9
9
  required
10
- } from "./chunk-ORZRWT62.js";
10
+ } from "./chunk-56NYSX65.js";
11
11
  import {
12
12
  SelectionError
13
- } from "./chunk-S4IIOSRA.js";
13
+ } from "./chunk-X7FA7ZD5.js";
14
14
  import {
15
15
  parseXmlPart
16
- } from "./chunk-5L6GHFRW.js";
16
+ } from "./chunk-554Z6IKP.js";
17
17
  import {
18
18
  relativePartReference
19
- } from "./chunk-AXWPJRY6.js";
19
+ } from "./chunk-36XGIPOG.js";
20
20
  import {
21
21
  OfficeError
22
- } from "./chunk-KJ3PEDI2.js";
22
+ } from "./chunk-Q73EMLLZ.js";
23
23
 
24
24
  // packages/safe-bash-presentation-engine/src/notes.ts
25
25
  import { SaxesParser } from "saxes";
@@ -1,30 +1,30 @@
1
1
  import {
2
2
  writePackageArchive
3
- } from "./chunk-VPDSQPSN.js";
3
+ } from "./chunk-DM2CPMB4.js";
4
4
  import {
5
5
  readPackage
6
- } from "./chunk-SFCERNHU.js";
6
+ } from "./chunk-XPD636C4.js";
7
7
  import {
8
8
  readBinary
9
- } from "./chunk-KMMAJ6H6.js";
9
+ } from "./chunk-PNGDJA6M.js";
10
10
  import {
11
11
  validatePresentation
12
- } from "./chunk-MMBRBANA.js";
12
+ } from "./chunk-RNSKXOG3.js";
13
13
  import {
14
14
  parseXmlPart
15
- } from "./chunk-5L6GHFRW.js";
15
+ } from "./chunk-554Z6IKP.js";
16
16
  import {
17
17
  parseContentTypes
18
- } from "./chunk-DVQBZXMQ.js";
18
+ } from "./chunk-WJCN2IXI.js";
19
19
  import {
20
20
  readRelationshipGraph
21
- } from "./chunk-NTRZMQZP.js";
21
+ } from "./chunk-ZMHEGDU2.js";
22
22
  import {
23
23
  relativePartReference
24
- } from "./chunk-AXWPJRY6.js";
24
+ } from "./chunk-36XGIPOG.js";
25
25
  import {
26
26
  OfficeError
27
- } from "./chunk-KJ3PEDI2.js";
27
+ } from "./chunk-Q73EMLLZ.js";
28
28
 
29
29
  // packages/safe-bash-presentation-engine/src/settings-scaling.ts
30
30
  function unsupported() {
@@ -20,9 +20,83 @@ import {
20
20
  import { readFileStream } from "../../safe-bash-contracts/filesystem.js";
21
21
  import { readBytes } from "../../safe-bash-contracts/index.js";
22
22
  import { posixPath as posix } from "../../safe-bash-contracts/path.js";
23
- import { yieldTurn } from "../../safe-bash-contracts/yield.js";
23
+ import { inheritYieldCheckpoint, yieldTurn as yieldTurn2 } from "../../safe-bash-contracts/yield.js";
24
24
  import { decodeBytes, encodeBytes } from "../../safe-bash-io-engine/byte-encoding.js";
25
25
  import { pathOf } from "../../safe-bash-io-engine/internal.js";
26
+
27
+ // packages/safe-bash-network-engine/src/replay.ts
28
+ import { FsError } from "../../safe-bash-contracts/index.js";
29
+ import { yieldTurn } from "../../safe-bash-contracts/yield.js";
30
+ function verify(actual, expected) {
31
+ const identity = expected.opaqueIdentity !== void 0 ? actual.opaqueIdentity === expected.opaqueIdentity : expected.dev !== void 0 && expected.ino !== void 0 && actual.dev === expected.dev && actual.ino === expected.ino;
32
+ if (!identity || expected.identityScope === void 0 || actual.identityScope !== expected.identityScope || actual.type !== "file" || actual.size !== expected.size || actual.revision !== expected.revision || actual.opaqueVersion !== expected.opaqueVersion || actual.mtimeMs !== expected.mtimeMs || actual.ctimeMs !== expected.ctimeMs)
33
+ throw new FsError("EBUSY", { message: "Upload replay storage changed" });
34
+ }
35
+ async function createReplay(fs, directory, signal) {
36
+ const parent = await fs.stat(directory, { signal });
37
+ const caps = await fs.capabilitiesFor?.(directory, { signal }) ?? fs.capabilities;
38
+ if (!caps.retainedStagingCleanup || !caps.retainedStagingWrite || !caps.retainedRead || !fs.createStagedFile || !fs.openReadFile)
39
+ throw new FsError("ENOTSUP", { message: "Upload replay requires retained caller storage" });
40
+ const name = Array.from(randomBytes(18), (byte) => byte.toString(16).padStart(2, "0")).join("");
41
+ const stage = await fs.createStagedFile(`${directory === "/" ? "" : directory}/.curl-replay-${name}`, "upload", { type: "file", data: new Uint8Array() }, { parent, mode: 384, retainCleanup: true, signal });
42
+ const { writer, cleanup } = stage;
43
+ if (!writer || !cleanup) {
44
+ try {
45
+ await cleanup?.remove();
46
+ } finally {
47
+ await cleanup?.close();
48
+ }
49
+ throw new FsError("EIO", { message: "Missing retained upload handles" });
50
+ }
51
+ let size = 0;
52
+ let sealed;
53
+ let reader;
54
+ let closing;
55
+ return {
56
+ async write(bytes) {
57
+ for (let offset = 0; offset < bytes.length; offset += 16384) {
58
+ const chunk = bytes.slice(offset, offset + 16384);
59
+ await writer.write(chunk, { signal });
60
+ size += chunk.length;
61
+ }
62
+ },
63
+ async *read(replaySignal) {
64
+ replaySignal.throwIfAborted();
65
+ sealed ??= await writer.finish({ signal: replaySignal });
66
+ if (sealed.size !== size) throw new FsError("EIO", { message: "Incomplete upload replay storage" });
67
+ reader ??= await fs.openReadFile(stage.file.path, { signal: replaySignal });
68
+ verify(await reader.stat({ signal: replaySignal }), sealed);
69
+ let chunks = 0;
70
+ for (let position = 0; position < size; ) {
71
+ if (++chunks % 256 === 0) await yieldTurn(replaySignal);
72
+ replaySignal.throwIfAborted();
73
+ verify(await reader.stat({ signal: replaySignal }), sealed);
74
+ const count = Math.min(16384, size - position);
75
+ const bytes = await reader.read(position, count, { signal: replaySignal });
76
+ if (!bytes.length || bytes.length > count) throw new FsError("EIO", { message: "Invalid upload replay read" });
77
+ verify(await reader.stat({ signal: replaySignal }), sealed);
78
+ position += bytes.length;
79
+ yield bytes.slice();
80
+ }
81
+ },
82
+ close() {
83
+ closing ??= (async () => {
84
+ try {
85
+ await reader?.close();
86
+ } finally {
87
+ try {
88
+ await cleanup.remove();
89
+ } finally {
90
+ await cleanup.close();
91
+ }
92
+ }
93
+ })();
94
+ return closing;
95
+ }
96
+ };
97
+ }
98
+
99
+ // packages/safe-bash-network-engine/src/body.ts
26
100
  function multipartBoundary() {
27
101
  let boundary = "virtual-bash-";
28
102
  for (const byte of randomBytes(18)) boundary += byte.toString(16).padStart(2, "0");
@@ -214,7 +288,7 @@ async function* transfer(source, encoder, signal) {
214
288
  yield encode(output);
215
289
  output = "";
216
290
  }
217
- await yieldTurn(signal);
291
+ await yieldTurn2(signal);
218
292
  }
219
293
  }
220
294
  signal.throwIfAborted();
@@ -251,8 +325,12 @@ function createBody(context, args, limits) {
251
325
  let opened = false;
252
326
  let replayComplete = false;
253
327
  let replayable = true;
254
- let cachedBytes = 0;
255
- let cache = [];
328
+ let replay;
329
+ let active = false;
330
+ let activeIterator;
331
+ const lifetime = new AbortController();
332
+ let closing;
333
+ let closed = false;
256
334
  let stdinUsed = false;
257
335
  const source = async function* (part, signal) {
258
336
  if (part.bytes !== void 0) {
@@ -303,51 +381,90 @@ function createBody(context, args, limits) {
303
381
  };
304
382
  return {
305
383
  ...contentType === void 0 ? {} : { contentType },
384
+ close() {
385
+ closed = true;
386
+ lifetime.abort();
387
+ closing ??= (async () => {
388
+ try {
389
+ await activeIterator?.return(void 0);
390
+ } finally {
391
+ await replay?.close();
392
+ }
393
+ })();
394
+ return closing;
395
+ },
306
396
  open(signal) {
307
- return (async function* () {
308
- if (hasStdin && opened) {
309
- if (!replayComplete || !replayable) throw new CurlError(65, "Cannot replay stdin upload within the host buffer limit");
310
- for (const chunk of cache) {
311
- signal.throwIfAborted();
312
- yield chunk.slice();
397
+ const combined = AbortSignal.any([signal, lifetime.signal]);
398
+ inheritYieldCheckpoint(signal, combined);
399
+ signal = combined;
400
+ async function* generate() {
401
+ signal.throwIfAborted();
402
+ if (closed || active) throw new CurlError(65, "Upload body is closed or in use");
403
+ active = true;
404
+ activeIterator = iterator;
405
+ try {
406
+ if (hasStdin && opened) {
407
+ if (!replayComplete || !replayable || !replay) throw new CurlError(65, "Cannot replay stdin upload from caller storage");
408
+ try {
409
+ yield* replay.read(signal);
410
+ } catch {
411
+ replayable = false;
412
+ signal.throwIfAborted();
413
+ throw new CurlError(65, "Failed reading stdin replay storage");
414
+ }
415
+ return;
313
416
  }
314
- return;
315
- }
316
- opened = true;
317
- let count = 0;
318
- let chunks = 0;
319
- for (const part of parts) {
320
- if (part.separator && count === 0) continue;
321
- let prefix = part.prefix;
322
- for await (const raw of transfer(source(part, signal), part.encoder, signal)) {
323
- if (++chunks % 256 === 0) await yieldTurn(signal);
324
- for (let offset = 0; offset < raw.length; offset += 16 * 1024) {
417
+ opened = true;
418
+ if (hasStdin) {
419
+ try {
420
+ replay = await createReplay(context.fs, context.cwd, signal);
421
+ } catch {
325
422
  signal.throwIfAborted();
326
- let chunk = raw.subarray(offset, offset + 16 * 1024);
327
- if (part.strip) chunk = chunk.filter((byte) => byte !== 0 && byte !== 10 && byte !== 13);
328
- if (part.urlencode) chunk = percent(chunk);
329
- count += chunk.length + (prefix?.length ?? 0);
330
- if (count > limits.maxUploadBytes) throw new CurlError(63, "Upload exceeds host byte limit");
331
- if (prefix?.length) {
332
- const prefixed = new Uint8Array(prefix.length + chunk.length);
333
- prefixed.set(prefix);
334
- prefixed.set(chunk, prefix.length);
335
- chunk = prefixed;
336
- prefix = void 0;
337
- }
338
- if (hasStdin && replayable) {
339
- cachedBytes += chunk.length;
340
- if (cachedBytes > limits.maxBufferBytes) {
341
- replayable = false;
342
- cache = [];
343
- } else cache.push(new Uint8Array(chunk));
423
+ replayable = false;
424
+ }
425
+ }
426
+ let count = 0;
427
+ let chunks = 0;
428
+ for (const part of parts) {
429
+ if (part.separator && count === 0) continue;
430
+ let prefix = part.prefix;
431
+ for await (const raw of transfer(source(part, signal), part.encoder, signal)) {
432
+ if (++chunks % 256 === 0) await yieldTurn2(signal);
433
+ for (let offset = 0; offset < raw.length; offset += 16 * 1024) {
434
+ signal.throwIfAborted();
435
+ let chunk = raw.subarray(offset, offset + 16 * 1024);
436
+ if (part.strip) chunk = chunk.filter((byte) => byte !== 0 && byte !== 10 && byte !== 13);
437
+ if (part.urlencode) chunk = percent(chunk);
438
+ count += chunk.length + (prefix?.length ?? 0);
439
+ if (count > limits.maxUploadBytes) throw new CurlError(63, "Upload exceeds host byte limit");
440
+ if (prefix?.length) {
441
+ const prefixed = new Uint8Array(prefix.length + chunk.length);
442
+ prefixed.set(prefix);
443
+ prefixed.set(chunk, prefix.length);
444
+ chunk = prefixed;
445
+ prefix = void 0;
446
+ }
447
+ if (hasStdin && replayable) {
448
+ try {
449
+ await replay.write(chunk);
450
+ } catch {
451
+ signal.throwIfAborted();
452
+ replayable = false;
453
+ await replay.close();
454
+ }
455
+ }
456
+ if (chunk.length) yield chunk;
344
457
  }
345
- if (chunk.length) yield chunk;
346
458
  }
347
459
  }
460
+ replayComplete = true;
461
+ } finally {
462
+ active = false;
463
+ activeIterator = void 0;
348
464
  }
349
- replayComplete = true;
350
- })();
465
+ }
466
+ const iterator = generate();
467
+ return iterator;
351
468
  }
352
469
  };
353
470
  }
@@ -358,6 +475,8 @@ async function queryData(body, signal, limits) {
358
475
  signal.throwIfAborted();
359
476
  if (error instanceof CurlError) throw error;
360
477
  throw new CurlError(63, "Query data exceeds host buffer limit");
478
+ } finally {
479
+ await body.close();
361
480
  }
362
481
  }
363
482
 
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  PackageNotFoundError
3
- } from "./chunk-NXCMXD74.js";
3
+ } from "./chunk-S6R3IB36.js";
4
4
  import {
5
5
  OfficeError,
6
6
  resolveOfficeResources
7
- } from "./chunk-KJ3PEDI2.js";
7
+ } from "./chunk-Q73EMLLZ.js";
8
8
 
9
9
  // packages/safe-bash-presentation-engine/src/bytes.ts
10
10
  function admitLimits(context, options, output) {