@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.
- package/README.md +1 -1
- package/dist/image-ast/index.browser.js +147 -80
- package/dist/image-ast/index.js +147 -80
- package/dist/mp4-ast/mp4.d.ts +2 -0
- package/dist/pdf-ast/cos/parser.d.ts +1 -0
- package/dist/pdf-ast/cos/security.d.ts +2 -0
- package/dist/pdf-ast/cos/writer.d.ts +1 -0
- package/dist/pdf-ast/document.d.ts +3 -0
- package/dist/pdf-ast/edit/forms.d.ts +1 -0
- package/dist/pdf-ast/index.js +171 -82
- package/dist/safe-bash/chunks/{chunk-L5QQLNTO.js → chunk-22PI65AH.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-Q3E6C3DX.js → chunk-2TAGYMPK.js} +49 -34
- package/dist/safe-bash/chunks/{chunk-Z3HX3ZBA.js → chunk-2W4HTMEK.js} +52 -48
- package/dist/safe-bash/chunks/{chunk-FFZXP6ZC.js → chunk-3M7L7XU2.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-XNODZRVD.js → chunk-3QAO6UYS.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-YPETOVQU.js → chunk-3VKFK3NF.js} +2 -2
- package/dist/safe-bash/chunks/chunk-5OST7NOX.js +42 -0
- package/dist/safe-bash/chunks/{chunk-KEBSX2AX.js → chunk-6HLURHVU.js} +2 -2
- package/dist/safe-bash/chunks/chunk-DYEUZE6Z.js +19 -0
- package/dist/safe-bash/chunks/{chunk-T2TGCHKE.js → chunk-FM3WBSZT.js} +2 -2
- package/dist/safe-bash/chunks/chunk-GAYRKQM6.js +22 -0
- package/dist/safe-bash/chunks/{chunk-Q45QCA4J.js → chunk-I3KSESCR.js} +0 -7
- package/dist/safe-bash/chunks/{chunk-OSKDIBQS.js → chunk-JLIMK5TD.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-2AYZCT5X.js → chunk-JQ2FAJJT.js} +27 -23
- package/dist/safe-bash/chunks/{chunk-QA3NVP43.js → chunk-JRE6Z3T7.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-DC5EHLKS.js → chunk-NDIL6T7Y.js} +5 -5
- package/dist/safe-bash/chunks/{chunk-747G42FY.js → chunk-OPR4UAIT.js} +2 -2
- package/dist/safe-bash/chunks/chunk-OSMQCYSP.js +19 -0
- package/dist/safe-bash/chunks/chunk-OYB332PQ.js +17 -0
- package/dist/safe-bash/chunks/{chunk-ZMYVCRAF.js → chunk-QTIH2AFE.js} +77 -69
- package/dist/safe-bash/chunks/{chunk-PYTLIUST.js → chunk-SBESXWT2.js} +43 -44
- package/dist/safe-bash/chunks/{chunk-4FDQJUFW.js → chunk-SDEPGTOF.js} +1 -1
- package/dist/safe-bash/chunks/chunk-UZU5BIJI.js +32 -0
- package/dist/safe-bash/chunks/{chunk-BI6JV62X.js → chunk-VCCMROTL.js} +7 -10
- package/dist/safe-bash/chunks/chunk-W47GHRRF.js +13 -0
- package/dist/safe-bash/chunks/{chunk-NPMQWZUZ.js → chunk-WS7KZIUM.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-3PZYHMGM.js → chunk-YYAERCWS.js} +7 -7
- package/dist/safe-bash/chunks/{chunk-5U7JECDB.js → chunk-ZPGVEUKF.js} +8 -7
- package/dist/safe-bash/chunks/{csvkit-K55OYAQC.js → csvkit-USUJG62I.js} +65 -11
- package/dist/safe-bash/chunks/{ffmpeg-BEFTQ6DZ.js → ffmpeg-KRGG5DLH.js} +21 -10
- package/dist/safe-bash/chunks/{gh-HQWOWLWE.js → gh-UCFDUZCX.js} +16 -8
- package/dist/safe-bash/chunks/{git-UFNPAOYZ.js → git-LPAF6KDG.js} +7 -9
- package/dist/safe-bash/chunks/{imagemagick-53BMHH6D.js → imagemagick-KGREKK4G.js} +38 -7
- package/dist/safe-bash/chunks/{implementation-QUTAAYMT.js → implementation-FXDRYS5A.js} +34 -8
- package/dist/safe-bash/chunks/{pdfimages-4OYI6FLG.js → pdfimages-UADCF4G4.js} +12 -8
- package/dist/safe-bash/chunks/{pdfinfo-I7U6TQPP.js → pdfinfo-O7UWPF4W.js} +38 -13
- package/dist/safe-bash/chunks/{pdftk-SUA6FMHI.js → pdftk-AERXIJTN.js} +13 -8
- package/dist/safe-bash/chunks/{pdftoppm-4C5DGEWX.js → pdftoppm-L466JQKI.js} +17 -10
- package/dist/safe-bash/chunks/{pdftotext-Y4WI225Y.js → pdftotext-SUSI4WXS.js} +19 -9
- package/dist/safe-bash/chunks/{qpdf-IORB4RV5.js → qpdf-YL24KVRH.js} +14 -8
- package/dist/safe-bash/chunks/{sips-WHAMJFEU.js → sips-QXEQZERX.js} +14 -7
- package/dist/safe-bash/chunks/{soffice-SYEK6WJS.js → soffice-TBITRML3.js} +16 -8
- package/dist/safe-bash/chunks/{wkhtmltopdf-ZIICWJLF.js → wkhtmltopdf-NJA2THRC.js} +27 -7
- package/dist/safe-bash/command-chunks/chunk-2C5BEBPY.js +1388 -0
- package/dist/safe-bash/command-chunks/{chunk-FXYWQ6S4.js → chunk-2EXV2ZLV.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-PFBJR2PY.js → chunk-2KRKKW5S.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4DSJDVBM.js → chunk-32F3RBUW.js} +10 -749
- package/dist/safe-bash/command-chunks/{chunk-L3MLMXL4.js → chunk-3ZK5F23O.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4QX6XCDD.js → chunk-4RNIZ3RT.js} +79 -0
- package/dist/safe-bash/command-chunks/{chunk-D7TADAYG.js → chunk-64LG3EVJ.js} +17 -0
- package/dist/safe-bash/command-chunks/{chunk-TOSM3T3A.js → chunk-6EASC5EC.js} +20 -9
- package/dist/safe-bash/command-chunks/{chunk-ZF3ZVGQC.js → chunk-7JRITHKW.js} +150 -80
- package/dist/safe-bash/command-chunks/{chunk-IJ3FXP4Q.js → chunk-A3ZX6SCY.js} +1 -1
- package/dist/safe-bash/{chunks/chunk-LD76P7AG.js → command-chunks/chunk-AKDMCNX4.js} +74 -39
- package/dist/safe-bash/command-chunks/{chunk-KSIGF4AG.js → chunk-BK4CMEE6.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JUDOV5MJ.js → chunk-CBDVLMJB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XGMWWUHV.js → chunk-CZ5DAK4K.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-Z57TV6TC.js → chunk-EZ2DTOLI.js} +4 -2
- package/dist/safe-bash/command-chunks/{chunk-ADCGH6A7.js → chunk-FH3D75FC.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-WYJTWJZ5.js → chunk-G3G6W5ZE.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3HDIDEUJ.js → chunk-GF54KE2M.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-H4LWTITX.js +169 -0
- package/dist/safe-bash/command-chunks/chunk-I2MQNBGR.js +145 -0
- package/dist/safe-bash/command-chunks/{chunk-Z7TYZG3A.js → chunk-IHHTTQX6.js} +5 -3
- package/dist/safe-bash/command-chunks/{chunk-5GRLAARV.js → chunk-IOXI5ZAJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-INDIFLBW.js → chunk-JTAGNROA.js} +4 -0
- package/dist/safe-bash/command-chunks/{chunk-Y5IHIAY3.js → chunk-MDPIOQUD.js} +12 -8
- package/dist/safe-bash/command-chunks/chunk-PGEYORBZ.js +25 -0
- package/dist/safe-bash/command-chunks/chunk-QI4MGIN6.js +6 -0
- package/dist/safe-bash/command-chunks/chunk-QM4UZF3C.js +753 -0
- package/dist/safe-bash/command-chunks/chunk-QTYZAWSB.js +91 -0
- package/dist/safe-bash/command-chunks/chunk-SNK7K3XW.js +90 -0
- package/dist/safe-bash/command-chunks/chunk-T5OLGM43.js +314 -0
- package/dist/safe-bash/command-chunks/chunk-TB7IFMUZ.js +802 -0
- package/dist/safe-bash/command-chunks/{chunk-YNT4ZJHW.js → chunk-TPPBPIWL.js} +3 -3
- package/dist/safe-bash/command-chunks/chunk-VMK4XVKO.js +82 -0
- package/dist/safe-bash/command-chunks/chunk-VNSJKXDU.js +130 -0
- package/dist/safe-bash/command-chunks/{chunk-2LP3VMPA.js → chunk-WFDW4XXD.js} +1 -17
- package/dist/safe-bash/command-chunks/chunk-WR37IS4O.js +318 -0
- package/dist/safe-bash/command-chunks/chunk-YFNTMH6Z.js +6 -0
- package/dist/safe-bash/commands/basic.js +148 -48
- package/dist/safe-bash/commands/bytes/compression/index.js +5 -6
- package/dist/safe-bash/commands/cmp.d.ts +2 -3
- package/dist/safe-bash/commands/cmp.js +2 -689
- package/dist/safe-bash/commands/csplit/index.browser.js +2 -2
- package/dist/safe-bash/commands/docx/index.browser.js +4 -47
- package/dist/safe-bash/commands/docx/index.d.ts +2 -24
- package/dist/safe-bash/commands/docx/index.js +2 -41
- package/dist/safe-bash/commands/docx/io.d.ts +1 -14
- package/dist/safe-bash/commands/docx/io.js +1 -15
- package/dist/safe-bash/commands/factor/index.browser.js +2 -2
- package/dist/safe-bash/commands/getopt/index.browser.js +2 -2
- package/dist/safe-bash/commands/hexdump/index.browser.js +2 -2
- package/dist/safe-bash/commands/iconv/index.browser.js +2 -2
- package/dist/safe-bash/commands/line-endings/index.browser.js +2 -2
- package/dist/safe-bash/commands/llm/command.d.ts +1 -4
- package/dist/safe-bash/commands/llm/command.js +1 -248
- package/dist/safe-bash/commands/llm/elevenlabs-stream.d.ts +1 -2
- package/dist/safe-bash/commands/llm/elevenlabs-stream.js +1 -117
- package/dist/safe-bash/commands/llm/elevenlabs.d.ts +1 -15
- package/dist/safe-bash/commands/llm/elevenlabs.js +1 -123
- package/dist/safe-bash/commands/llm/index.browser.js +20 -15
- package/dist/safe-bash/commands/llm/index.d.ts +1 -6
- package/dist/safe-bash/commands/llm/index.js +1 -4
- package/dist/safe-bash/commands/llm/mime.d.ts +1 -2
- package/dist/safe-bash/commands/llm/mime.js +1 -136
- package/dist/safe-bash/commands/llm/openai-http.d.ts +1 -8
- package/dist/safe-bash/commands/llm/openai-http.js +1 -143
- package/dist/safe-bash/commands/llm/openai-sse.d.ts +1 -3
- package/dist/safe-bash/commands/llm/openai-sse.js +1 -78
- package/dist/safe-bash/commands/llm/openai.d.ts +1 -14
- package/dist/safe-bash/commands/llm/openai.js +1 -288
- package/dist/safe-bash/commands/llm/providers/elevenlabs.d.ts +1 -1
- package/dist/safe-bash/commands/llm/providers/elevenlabs.js +1 -1
- package/dist/safe-bash/commands/llm/providers/index.browser.js +6 -6
- package/dist/safe-bash/commands/llm/providers/index.d.ts +1 -3
- package/dist/safe-bash/commands/llm/providers/index.js +1 -2
- package/dist/safe-bash/commands/llm/providers/openai.d.ts +1 -1
- package/dist/safe-bash/commands/llm/providers/openai.js +1 -1
- package/dist/safe-bash/commands/llm/providers/shared.d.ts +1 -23
- package/dist/safe-bash/commands/llm/providers/shared.js +1 -65
- package/dist/safe-bash/commands/llm/service.d.ts +1 -37
- package/dist/safe-bash/commands/llm/service.js +1 -151
- package/dist/safe-bash/commands/llm/types.d.ts +1 -52
- package/dist/safe-bash/commands/llm/types.js +1 -1
- package/dist/safe-bash/commands/mdq/index.browser.js +3 -3
- package/dist/safe-bash/commands/media/index.browser.js +1 -1
- package/dist/safe-bash/commands/network/index.browser.js +9 -9
- package/dist/safe-bash/commands/network/types.d.ts +2 -40
- package/dist/safe-bash/commands/node/index.browser.js +6 -8
- package/dist/safe-bash/commands/op/index.browser.js +3 -3
- package/dist/safe-bash/commands/op/index.js +12 -28
- package/dist/safe-bash/commands/pptx/index.d.ts +2 -28
- package/dist/safe-bash/commands/pptx/index.js +2 -152
- package/dist/safe-bash/commands/pr/index.browser.js +2 -2
- package/dist/safe-bash/commands/printf-float.d.ts +1 -0
- package/dist/safe-bash/commands/printf-float.js +48 -38
- package/dist/safe-bash/commands/printf-format.js +9 -6
- package/dist/safe-bash/commands/printf-quote.d.ts +3 -0
- package/dist/safe-bash/commands/printf-quote.js +62 -0
- package/dist/safe-bash/commands/printf-wide.d.ts +5 -0
- package/dist/safe-bash/commands/printf-wide.js +41 -0
- package/dist/safe-bash/commands/python/index.browser.js +8 -8
- package/dist/safe-bash/commands/python/worker.browser.js +2 -2
- package/dist/safe-bash/commands/truncate.d.ts +2 -3
- package/dist/safe-bash/commands/truncate.js +2 -686
- package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
- package/dist/safe-bash/commands/xml/index.browser.js +2 -2
- package/dist/safe-bash/commands/yq/index.browser.js +3 -3
- package/dist/safe-bash/contracts/diagnostics.d.ts +2 -0
- package/dist/safe-bash/contracts/diagnostics.js +2 -0
- package/dist/safe-bash/contracts/runtime-control.d.ts +2 -0
- package/dist/safe-bash/contracts/runtime-control.js +2 -0
- package/dist/safe-bash/core.browser.d.ts +1 -1
- package/dist/safe-bash/core.browser.js +10645 -14065
- package/dist/safe-bash/core.d.ts +10 -1
- package/dist/safe-bash/core.js +0 -1
- package/dist/safe-bash/jobs.browser.js +5 -4
- package/dist/safe-bash/opt-in/commands/cmp/index.d.ts +6 -2
- package/dist/safe-bash/opt-in/commands/cmp/index.js +776 -79
- package/dist/safe-bash/opt-in/commands/cmp/options.d.ts +0 -12
- package/dist/safe-bash/opt-in/commands/cmp/options.js +0 -153
- package/dist/safe-bash/opt-in/commands/truncate/index.d.ts +8 -3
- package/dist/safe-bash/opt-in/commands/truncate/index.js +790 -272
- package/dist/safe-bash/opt-in/commands/truncate/sync.d.ts +1 -0
- package/dist/safe-bash/opt-in/commands/truncate/sync.js +60 -0
- package/dist/safe-bash/optional-host.browser.js +61 -80
- package/dist/safe-bash/optional-host.d.ts +3 -1
- package/dist/safe-bash/optional-host.js +3 -1
- package/dist/safe-bash/shell/runtime.js +44 -18
- package/dist/safe-bash/yq-browser/index.js +1 -1
- package/dist/safe-bash-checksum-engine/index.d.ts +1 -1
- package/dist/safe-bash-checksum-engine/index.js +14 -2
- package/dist/safe-bash-command-bzip2/index.js +2 -1
- package/dist/safe-bash-command-cmp/index.d.ts +10 -0
- package/dist/safe-bash-command-cmp/index.js +796 -0
- package/dist/safe-bash-command-cmp/options.d.ts +12 -0
- package/dist/safe-bash-command-cmp/options.js +42 -0
- package/dist/safe-bash-command-csvcut/index.js +11 -8
- package/dist/safe-bash-command-csvgrep/index.js +35 -7
- package/dist/safe-bash-command-csvkit/codecs/python.js +4 -3
- package/dist/safe-bash-command-csvkit/codecs/utf8.js +3 -2
- package/dist/safe-bash-command-csvkit/index.js +80 -324
- package/dist/safe-bash-command-csvkit/python-regex.d.ts +5 -0
- package/dist/safe-bash-command-csvkit/python-regex.js +14 -0
- package/dist/safe-bash-command-csvkit/runtime.d.ts +1 -0
- package/dist/safe-bash-command-csvkit/sync-support.js +4 -2
- package/dist/safe-bash-command-diff3/index.js +3 -0
- package/dist/safe-bash-command-docx/LICENSE +21 -0
- package/dist/safe-bash-command-docx/index.d.ts +30 -0
- package/dist/safe-bash-command-docx/index.js +67 -0
- package/dist/safe-bash-command-docx/io.d.ts +14 -0
- package/dist/safe-bash-command-docx/io.js +26 -0
- package/dist/safe-bash-command-envsubst/index.js +34 -3
- package/dist/safe-bash-command-exiftool/index.js +3 -0
- package/dist/safe-bash-command-ffmpeg/index.js +8073 -7940
- package/dist/safe-bash-command-fold/family.js +1 -1
- package/dist/safe-bash-command-fold/index.js +1 -1
- package/dist/safe-bash-command-git/git_rust.wasm +0 -0
- package/dist/safe-bash-command-git/wasm.generated.js +1 -1
- package/dist/safe-bash-command-htmlq/index.js +5 -0
- package/dist/safe-bash-command-imagemagick/index.d.ts +25 -21
- package/dist/safe-bash-command-imagemagick/index.js +671 -273
- package/dist/safe-bash-command-llm/LICENSE +21 -0
- package/dist/safe-bash-command-llm/command.d.ts +5 -0
- package/dist/safe-bash-command-llm/command.js +14 -0
- package/dist/safe-bash-command-llm/configuration.d.ts +18 -0
- package/dist/safe-bash-command-llm/elevenlabs-stream.d.ts +2 -0
- package/dist/safe-bash-command-llm/elevenlabs-stream.js +7 -0
- package/dist/safe-bash-command-llm/elevenlabs.d.ts +15 -0
- package/dist/safe-bash-command-llm/elevenlabs.js +10 -0
- package/dist/safe-bash-command-llm/index.d.ts +10 -0
- package/dist/safe-bash-command-llm/index.js +46 -0
- package/dist/safe-bash-command-llm/mime.d.ts +2 -0
- package/dist/safe-bash-command-llm/mime.js +9 -0
- package/dist/safe-bash-command-llm/model-options.d.ts +3 -0
- package/dist/safe-bash-command-llm/openai-http.d.ts +8 -0
- package/dist/safe-bash-command-llm/openai-http.js +17 -0
- package/dist/safe-bash-command-llm/openai-sse.d.ts +3 -0
- package/dist/safe-bash-command-llm/openai-sse.js +8 -0
- package/dist/safe-bash-command-llm/openai.d.ts +14 -0
- package/dist/safe-bash-command-llm/openai.js +12 -0
- package/dist/safe-bash-command-llm/providers/elevenlabs.d.ts +1 -0
- package/dist/safe-bash-command-llm/providers/elevenlabs.js +11 -0
- package/dist/safe-bash-command-llm/providers/index.d.ts +3 -0
- package/dist/safe-bash-command-llm/providers/index.js +24 -0
- package/dist/safe-bash-command-llm/providers/openai.d.ts +1 -0
- package/dist/safe-bash-command-llm/providers/openai.js +13 -0
- package/dist/safe-bash-command-llm/providers/shared.d.ts +23 -0
- package/dist/safe-bash-command-llm/providers/shared.js +13 -0
- package/dist/safe-bash-command-llm/schemas.d.ts +2 -0
- package/dist/safe-bash-command-llm/service.d.ts +42 -0
- package/dist/safe-bash-command-llm/service.js +9 -0
- package/dist/safe-bash-command-llm/templates.d.ts +27 -0
- package/dist/safe-bash-command-llm/types.d.ts +87 -0
- package/dist/safe-bash-command-llm/types.js +6 -0
- package/dist/safe-bash-command-mmdc/command.d.ts +4 -0
- package/dist/safe-bash-command-mmdc/index.d.ts +1 -1
- package/dist/safe-bash-command-mmdc/index.js +7134 -6699
- package/dist/safe-bash-command-mmdc/layout.d.ts +1 -0
- package/dist/safe-bash-command-mmdc/parser.d.ts +1 -0
- package/dist/safe-bash-command-mmdc/png.d.ts +3 -0
- package/dist/safe-bash-command-mmdc/raster.d.ts +1 -0
- package/dist/safe-bash-command-mmdc/svg.d.ts +1 -0
- package/dist/safe-bash-command-op/index.js +19 -14
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/index.js +3 -3
- package/dist/safe-bash-command-pdfimages/index.d.ts +7 -1
- package/dist/safe-bash-command-pdfimages/index.js +210 -113
- package/dist/safe-bash-command-pdfinfo/index.d.ts +24 -20
- package/dist/safe-bash-command-pdfinfo/index.js +517 -241
- package/dist/safe-bash-command-pdftk/index.d.ts +7 -3
- package/dist/safe-bash-command-pdftk/index.js +261 -125
- package/dist/safe-bash-command-pdftoppm/index.d.ts +15 -7
- package/dist/safe-bash-command-pdftoppm/index.js +326 -189
- package/dist/safe-bash-command-pdftotext/index.d.ts +9 -5
- package/dist/safe-bash-command-pdftotext/index.js +237 -107
- package/dist/safe-bash-command-pptx/LICENSE +21 -0
- package/dist/safe-bash-command-pptx/index.d.ts +33 -0
- package/dist/safe-bash-command-pptx/index.js +168 -0
- package/dist/safe-bash-command-qpdf/index.d.ts +9 -3
- package/dist/safe-bash-command-qpdf/index.js +254 -130
- package/dist/safe-bash-command-sha512sum/index.js +12 -475
- package/dist/safe-bash-command-sips/index.d.ts +9 -5
- package/dist/safe-bash-command-sips/index.js +65 -46
- package/dist/safe-bash-command-soffice/index.d.ts +9 -3
- package/dist/safe-bash-command-soffice/index.js +66 -25
- package/dist/safe-bash-command-sqlite3/engine.d.ts +9 -0
- package/dist/safe-bash-command-sqlite3/index.d.ts +1 -0
- package/dist/safe-bash-command-sqlite3/index.js +851 -352
- package/dist/safe-bash-command-ssconvert/formats/xls.js +3 -3
- package/dist/safe-bash-command-ssconvert/index.js +147 -80
- package/dist/safe-bash-command-timeout/index.js +3 -3
- package/dist/safe-bash-command-truncate/index.d.ts +8 -3
- package/dist/safe-bash-command-truncate/index.js +790 -272
- package/dist/safe-bash-command-truncate/sync.d.ts +1 -0
- package/dist/safe-bash-command-truncate/sync.js +60 -0
- package/dist/safe-bash-command-wkhtmltopdf/index.js +239 -118
- package/dist/safe-bash-command-wkhtmltopdf/pdf-renderer.d.ts +1 -1
- package/dist/safe-bash-command-xxd/index.js +78 -20
- package/dist/safe-bash-command-xz/command.d.ts +4 -0
- package/dist/safe-bash-command-xz/index.d.ts +1 -1
- package/dist/safe-bash-command-xz/index.js +1 -1
- package/dist/safe-bash-compression-engine/bounded-codec.js +3 -3
- package/dist/safe-bash-compression-engine/codec-loader.js +2 -2
- package/dist/safe-bash-compression-engine/files.js +6 -6
- package/dist/safe-bash-compression-engine/index.js +5 -5
- package/dist/safe-bash-compression-engine/operand.js +6 -6
- package/dist/safe-bash-compression-engine/stream.js +5 -5
- package/dist/safe-bash-compression-engine/zstd-decode.js +4 -4
- package/dist/safe-bash-contracts/command.js +3 -3
- package/dist/safe-bash-contracts/default-executor.d.ts +5 -0
- package/dist/safe-bash-contracts/default-executor.js +37 -0
- package/dist/safe-bash-contracts/diagnostics.js +3 -3
- package/dist/safe-bash-contracts/escaping.js +9 -9
- package/dist/safe-bash-contracts/filesystem-descriptor.js +3 -3
- package/dist/safe-bash-contracts/filesystem-output.js +8 -8
- package/dist/safe-bash-contracts/http.d.ts +41 -0
- package/dist/safe-bash-contracts/http.js +6 -0
- package/dist/safe-bash-contracts/index.js +21 -19
- package/dist/safe-bash-contracts/io.d.ts +12 -0
- package/dist/safe-bash-contracts/io.js +4 -1
- package/dist/safe-bash-contracts/output.js +3 -2
- package/dist/safe-bash-contracts/runtime-control.js +2 -2
- package/dist/safe-bash-contracts/signals.js +1 -1
- package/dist/safe-bash-contracts/yield.d.ts +1 -0
- package/dist/safe-bash-contracts/yield.js +3 -1
- package/dist/safe-bash-csv-engine/index.d.ts +10 -1
- package/dist/safe-bash-csv-engine/index.js +78 -6
- package/dist/safe-bash-io-engine/commands/search/requirements.js +3 -3
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +3 -3
- package/dist/safe-bash-io-engine/gnu-information.d.ts +1 -1
- package/dist/safe-bash-io-engine/gnu-information.js +1 -1
- package/dist/safe-bash-io-engine/internal.d.ts +1 -1
- package/dist/safe-bash-io-engine/internal.js +2 -2
- package/dist/safe-bash-query-engine/index.js +5 -5
- package/dist/safe-bash-query-engine/interpreter.js +3 -3
- package/dist/safe-bash-query-engine/query-core.js +5 -5
- package/package.json +2 -2
- package/dist/safe-bash/chunks/chunk-2G2T5MEM.js +0 -14
- package/dist/safe-bash/chunks/chunk-FJZNUUOQ.js +0 -81
- package/dist/safe-bash/chunks/chunk-GJWUEOT6.js +0 -14
- package/dist/safe-bash/chunks/chunk-LAPF2XE6.js +0 -14
- package/dist/safe-bash/chunks/chunk-O6356Z27.js +0 -37
- package/dist/safe-bash/chunks/chunk-S2LSZFZ6.js +0 -758
- package/dist/safe-bash/chunks/chunk-T3VDYWKZ.js +0 -21
- package/dist/safe-bash/chunks/chunk-VYW4Q6KF.js +0 -12
- package/dist/safe-bash/chunks/chunk-WHURJBET.js +0 -409
- package/dist/safe-bash/opt-in/commands/cmp/compare.js +0 -95
- package/dist/safe-bash/opt-in/commands/cmp/io.js +0 -218
- package/dist/safe-bash/command-chunks/{chunk-RTOJNFFL.js → chunk-KNI4GRXF.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DEH3CMGL.js → chunk-QJ3ONEBI.js} +3 -3
|
@@ -3,9 +3,9 @@ import type { CommandDefinition } from "../safe-bash-contracts/command.js";
|
|
|
3
3
|
import type { VirtualShellPlugin } from "../safe-bash-contracts/plugin.js";
|
|
4
4
|
import { type RendererProfile } from "./engine.js";
|
|
5
5
|
export declare const pdfAstRendererProfile: RendererProfile;
|
|
6
|
-
export declare function renderPdfAstSync(request: Parameters<StaticRenderer["open"]>[0]): Uint8Array;
|
|
7
6
|
export declare function createPdfAstRenderer(): StaticRenderer;
|
|
8
7
|
export declare const pdfAstRenderer: StaticRenderer;
|
|
9
8
|
export declare function createPdfAstWkhtmltopdfCommand(options?: Partial<WkhtmltopdfCommandOptions>): CommandDefinition;
|
|
10
9
|
export declare const pdfAstWkhtmltopdfCommand: CommandDefinition;
|
|
11
10
|
export declare function pdfAstWkhtmltopdfCommands(options?: Partial<WkhtmltopdfCommandOptions>): VirtualShellPlugin;
|
|
11
|
+
export declare function renderPdfAstSync(request: Parameters<StaticRenderer["open"]>[0]): Uint8Array;
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// packages/safe-bash-command-xxd/dist/index.js
|
|
6
6
|
init_buffer();
|
|
7
|
+
import { writeFileOutput } from "../safe-bash-contracts/filesystem-output-budget.js";
|
|
7
8
|
import { isAbsolutePath, validatePath } from "@poe-platform/safe-fs/core";
|
|
8
9
|
import { CommandArgumentIdentityError, FsError, readBytes, shellValueByteLength, writeBytes } from "../safe-bash-contracts/index.js";
|
|
9
10
|
import { PublicDiagnostic } from "../safe-bash-contracts/public-diagnostic.js";
|
|
@@ -304,7 +305,18 @@ function hexDigit(byte) {
|
|
|
304
305
|
return byte - 87;
|
|
305
306
|
return -1;
|
|
306
307
|
}
|
|
307
|
-
async function
|
|
308
|
+
async function padToAddress(context, start, address) {
|
|
309
|
+
if (!Number.isSafeInteger(address) || address < start)
|
|
310
|
+
throw new PublicDiagnostic("invalid input: cannot seek backwards on output stream");
|
|
311
|
+
while (start < address) {
|
|
312
|
+
const length = Math.min(blockSize, address - start);
|
|
313
|
+
await output(context, new Uint8Array(length));
|
|
314
|
+
start += length;
|
|
315
|
+
await yieldTurn(context.signal);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
async function reversePlain(context, files, maxInputBytes, seek) {
|
|
319
|
+
await padToAddress(context, 0, seek);
|
|
308
320
|
let high = -1;
|
|
309
321
|
for await (const chunk of sources(context, files, maxInputBytes)) {
|
|
310
322
|
const pending = [];
|
|
@@ -327,7 +339,7 @@ async function reversePlain(context, files, maxInputBytes) {
|
|
|
327
339
|
await output(context, Uint8Array.from(pending));
|
|
328
340
|
}
|
|
329
341
|
}
|
|
330
|
-
async function reverseNormal(context, files, columns, maxInputBytes) {
|
|
342
|
+
async function reverseNormal(context, files, columns, maxInputBytes, seek) {
|
|
331
343
|
let line = "";
|
|
332
344
|
let offset = 0;
|
|
333
345
|
const outBuf = new Uint8Array(8192);
|
|
@@ -342,7 +354,7 @@ async function reverseNormal(context, files, columns, maxInputBytes) {
|
|
|
342
354
|
}
|
|
343
355
|
};
|
|
344
356
|
const rowScratch = new Uint8Array(Math.max(columns, 256));
|
|
345
|
-
const parseLineBytesInto = (buf, startPos, endPos) => {
|
|
357
|
+
const parseLineBytesInto = async (buf, startPos, endPos) => {
|
|
346
358
|
let nonSpace = false;
|
|
347
359
|
for (let i = startPos; i < endPos; i++) {
|
|
348
360
|
const c = buf[i];
|
|
@@ -351,7 +363,7 @@ async function reverseNormal(context, files, columns, maxInputBytes) {
|
|
|
351
363
|
break;
|
|
352
364
|
}
|
|
353
365
|
}
|
|
354
|
-
if (!nonSpace)
|
|
366
|
+
if (!nonSpace || endPos - startPos === 1 && buf[startPos] === 42)
|
|
355
367
|
return 0;
|
|
356
368
|
const colonAbs = buf.indexOf(58, startPos);
|
|
357
369
|
const colon = colonAbs >= 0 && colonAbs < endPos ? colonAbs - startPos : -1;
|
|
@@ -364,8 +376,10 @@ async function reverseNormal(context, files, columns, maxInputBytes) {
|
|
|
364
376
|
throw new PublicDiagnostic("invalid input: expected hexadecimal address and colon");
|
|
365
377
|
address = address * 16 + digit;
|
|
366
378
|
}
|
|
367
|
-
|
|
368
|
-
|
|
379
|
+
address = addOffset(address, seek);
|
|
380
|
+
await flushOut();
|
|
381
|
+
await padToAddress(context, offset, address);
|
|
382
|
+
offset = address;
|
|
369
383
|
let count = 0;
|
|
370
384
|
let high = -1;
|
|
371
385
|
let spaces = 0;
|
|
@@ -406,7 +420,7 @@ async function reverseNormal(context, files, columns, maxInputBytes) {
|
|
|
406
420
|
}
|
|
407
421
|
let count = 0;
|
|
408
422
|
if (line.length === 0) {
|
|
409
|
-
count = parseLineBytesInto(chunk, start, nl);
|
|
423
|
+
count = await parseLineBytesInto(chunk, start, nl);
|
|
410
424
|
} else {
|
|
411
425
|
for (let i = start; i < nl; i++)
|
|
412
426
|
line += String.fromCharCode(chunk[i]);
|
|
@@ -414,7 +428,7 @@ async function reverseNormal(context, files, columns, maxInputBytes) {
|
|
|
414
428
|
for (let i = 0; i < line.length; i++)
|
|
415
429
|
lineBytes[i] = line.charCodeAt(i);
|
|
416
430
|
line = "";
|
|
417
|
-
count = parseLineBytesInto(lineBytes, 0, lineBytes.length);
|
|
431
|
+
count = await parseLineBytesInto(lineBytes, 0, lineBytes.length);
|
|
418
432
|
}
|
|
419
433
|
start = nl + 1;
|
|
420
434
|
if (count > 0) {
|
|
@@ -433,7 +447,7 @@ async function reverseNormal(context, files, columns, maxInputBytes) {
|
|
|
433
447
|
const lineBytes = new Uint8Array(line.length);
|
|
434
448
|
for (let i = 0; i < line.length; i++)
|
|
435
449
|
lineBytes[i] = line.charCodeAt(i);
|
|
436
|
-
const count = parseLineBytesInto(lineBytes, 0, lineBytes.length);
|
|
450
|
+
const count = await parseLineBytesInto(lineBytes, 0, lineBytes.length);
|
|
437
451
|
if (count > 0) {
|
|
438
452
|
if (outUsed + count > outBuf.length)
|
|
439
453
|
await flushOut();
|
|
@@ -472,7 +486,9 @@ function createXxdCommand(optionsOrMaxBytes) {
|
|
|
472
486
|
"-len": "-l",
|
|
473
487
|
"-bits": "-b",
|
|
474
488
|
"-include": "-i",
|
|
475
|
-
"-name": "-n"
|
|
489
|
+
"-name": "-n",
|
|
490
|
+
"-autoskip": "-a",
|
|
491
|
+
"-capitalize": "-C"
|
|
476
492
|
};
|
|
477
493
|
let ended = false;
|
|
478
494
|
const args = context.args.map((argument) => {
|
|
@@ -482,10 +498,17 @@ function createXxdCommand(optionsOrMaxBytes) {
|
|
|
482
498
|
ended = true;
|
|
483
499
|
return aliases[argument] ?? argument;
|
|
484
500
|
});
|
|
485
|
-
const parsed = parseOptions(args, "
|
|
501
|
+
const parsed = parseOptions(args, "aCprdubiec:g:l:s:o:n:");
|
|
486
502
|
requireOperands(parsed.operands, 0, 2);
|
|
487
503
|
if (parsed.operands[1] !== void 0 && parsed.operands[1] !== "-") {
|
|
488
|
-
|
|
504
|
+
const original = context;
|
|
505
|
+
const path = pathOf(context, parsed.operands[1]);
|
|
506
|
+
let started = false;
|
|
507
|
+
context = { ...original, stdout: { async write(bytes) {
|
|
508
|
+
await writeFileOutput(original, bytes, (data) => started ? original.fs.appendFile(path, data, { signal: original.signal }) : original.fs.writeFile(path, data, { signal: original.signal }));
|
|
509
|
+
started = true;
|
|
510
|
+
} } };
|
|
511
|
+
await writeBytes(context.stdout, new Uint8Array(), context.signal);
|
|
489
512
|
}
|
|
490
513
|
const files = parsed.operands.slice(0, 1);
|
|
491
514
|
const plain = parsed.flags.has("p");
|
|
@@ -511,21 +534,31 @@ function createXxdCommand(optionsOrMaxBytes) {
|
|
|
511
534
|
if (littleEndian && group && !Number.isInteger(Math.log2(group))) {
|
|
512
535
|
throw new UsageError("number of octets per group must be a power of 2 with -e");
|
|
513
536
|
}
|
|
514
|
-
|
|
537
|
+
let skip = validatedOption(parsed, "s", (text) => {
|
|
538
|
+
const relative = text.startsWith("+") ? text.slice(1) : text;
|
|
539
|
+
return relative.startsWith("-") ? -numeric(relative.slice(1)) : numeric(relative);
|
|
540
|
+
}, 0);
|
|
515
541
|
const count = validatedOption(parsed, "l", numeric, Infinity);
|
|
516
542
|
const displacement = validatedOption(parsed, "o", numeric, 0);
|
|
517
|
-
if (reverse && ["
|
|
543
|
+
if (reverse && ["l", "o", "d"].some((flag) => parsed.flags.has(flag))) {
|
|
518
544
|
throw new UsageError("reverse does not support seek, length, displacement, or decimal addresses");
|
|
519
545
|
}
|
|
520
546
|
if (reverse) {
|
|
521
547
|
if (plain)
|
|
522
|
-
await reversePlain(context, files, maxInputBytes);
|
|
548
|
+
await reversePlain(context, files, maxInputBytes, skip);
|
|
523
549
|
else
|
|
524
|
-
await reverseNormal(context, files, columns, maxInputBytes);
|
|
550
|
+
await reverseNormal(context, files, columns, maxInputBytes, skip);
|
|
525
551
|
return { exitCode: 0 };
|
|
526
552
|
}
|
|
553
|
+
const input = sources(context, files, maxInputBytes);
|
|
554
|
+
if (skip < 0) {
|
|
555
|
+
if (!files[0] || files[0] === "-")
|
|
556
|
+
throw new UsageError("negative seek requires an input file");
|
|
557
|
+
const size = (await context.fs.stat(pathOf(context, files[0]), { signal: context.signal })).size;
|
|
558
|
+
skip = Math.max(0, size + skip);
|
|
559
|
+
}
|
|
527
560
|
let offset = addOffset(skip, displacement);
|
|
528
|
-
const source = range(
|
|
561
|
+
const source = range(input, skip, count);
|
|
529
562
|
let any = false;
|
|
530
563
|
let includeLength = 0;
|
|
531
564
|
let includeRow = "";
|
|
@@ -539,6 +572,8 @@ function createXxdCommand(optionsOrMaxBytes) {
|
|
|
539
572
|
if (identifier[0] && identifier[0] >= "0" && identifier[0] <= "9")
|
|
540
573
|
identifier = "__" + identifier;
|
|
541
574
|
}
|
|
575
|
+
if (parsed.flags.has("C"))
|
|
576
|
+
identifier = identifier.toUpperCase();
|
|
542
577
|
const upper = parsed.flags.has("u");
|
|
543
578
|
const hexTable = upper ? HEX_UPPER : HEX_LOWER;
|
|
544
579
|
const byteTable = binary ? BIN_TABLE : hexTable;
|
|
@@ -564,6 +599,17 @@ function createXxdCommand(optionsOrMaxBytes) {
|
|
|
564
599
|
await writeOut(`unsigned char ${identifier}[] = {
|
|
565
600
|
`);
|
|
566
601
|
const rowWidth = plain && !columns ? 4096 : columns;
|
|
602
|
+
let zeroRun = 0;
|
|
603
|
+
let zeroSecond = "", zeroLast = "";
|
|
604
|
+
const finishZeros = (atEnd) => {
|
|
605
|
+
if (zeroRun >= (atEnd ? 4 : 3))
|
|
606
|
+
outBuf += "*\n" + (atEnd ? zeroLast : "");
|
|
607
|
+
else if (zeroRun === 3)
|
|
608
|
+
outBuf += zeroSecond + zeroLast;
|
|
609
|
+
else if (zeroRun === 2)
|
|
610
|
+
outBuf += zeroLast;
|
|
611
|
+
zeroRun = 0;
|
|
612
|
+
};
|
|
567
613
|
for await (const batch of rows(source, rowWidth)) {
|
|
568
614
|
any = true;
|
|
569
615
|
for (let rowStart = 0; rowStart < batch.length; rowStart += rowWidth) {
|
|
@@ -578,7 +624,7 @@ function createXxdCommand(optionsOrMaxBytes) {
|
|
|
578
624
|
await flushOut();
|
|
579
625
|
continue;
|
|
580
626
|
}
|
|
581
|
-
if (!plain && !littleEndian && !binary && columns === 16 && group === 2 && row.length === 16) {
|
|
627
|
+
if (!parsed.flags.has("a") && !plain && !littleEndian && !binary && columns === 16 && group === 2 && row.length === 16) {
|
|
582
628
|
const b0 = row[0], b1 = row[1], b2 = row[2], b3 = row[3];
|
|
583
629
|
const b4 = row[4], b5 = row[5], b6 = row[6], b7 = row[7];
|
|
584
630
|
const b8 = row[8], b9 = row[9], b10 = row[10], b11 = row[11];
|
|
@@ -615,20 +661,32 @@ function createXxdCommand(optionsOrMaxBytes) {
|
|
|
615
661
|
outBuf += data + (columns ? "\n" : "");
|
|
616
662
|
else {
|
|
617
663
|
const address = offset.toString(decimalAddress ? 10 : 16).padStart(8, "0");
|
|
618
|
-
|
|
664
|
+
const formatted = `${address}: ${data.padEnd(width)} ${ascii}
|
|
619
665
|
`;
|
|
666
|
+
if (parsed.flags.has("a") && row.length === columns && row.every((byte) => byte === 0)) {
|
|
667
|
+
if (zeroRun === 0)
|
|
668
|
+
outBuf += formatted;
|
|
669
|
+
if (zeroRun === 1)
|
|
670
|
+
zeroSecond = formatted;
|
|
671
|
+
zeroRun++;
|
|
672
|
+
zeroLast = formatted;
|
|
673
|
+
} else {
|
|
674
|
+
finishZeros(false);
|
|
675
|
+
outBuf += formatted;
|
|
676
|
+
}
|
|
620
677
|
}
|
|
621
678
|
offset = addOffset(offset, row.length);
|
|
622
679
|
if (!flushedFirst || outBuf.length >= 16384)
|
|
623
680
|
await flushOut();
|
|
624
681
|
}
|
|
625
682
|
}
|
|
683
|
+
finishZeros(true);
|
|
626
684
|
if (include) {
|
|
627
685
|
if (includeRow)
|
|
628
686
|
await writeOut(includeRow + "\n");
|
|
629
687
|
if (includeName !== void 0)
|
|
630
688
|
await writeOut(`};
|
|
631
|
-
unsigned int ${identifier}_len = ${includeLength};
|
|
689
|
+
unsigned int ${identifier}${parsed.flags.has("C") ? "_LEN" : "_len"} = ${includeLength};
|
|
632
690
|
`);
|
|
633
691
|
}
|
|
634
692
|
if (plain && !columns && any)
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { CommandDefinition } from "../safe-bash-contracts/index.js";
|
|
2
2
|
import { type CompressionCommandOptions } from "../safe-bash-compression-engine/stream.js";
|
|
3
3
|
import type { VirtualShellPlugin } from "../safe-bash-contracts/plugin.js";
|
|
4
|
+
export interface XzLimits {
|
|
5
|
+
readonly maxDecodedBytes: number;
|
|
6
|
+
}
|
|
4
7
|
export interface XzCommandsOptions extends CompressionCommandOptions {
|
|
8
|
+
readonly limits?: Partial<XzLimits>;
|
|
5
9
|
readonly replace?: boolean;
|
|
6
10
|
}
|
|
7
11
|
export declare function createXzCommand(config?: XzCommandsOptions, name?: string): CommandDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createXzCommands, createXzCommand, xzCommands, type XzCommandsOptions } from "./command.js";
|
|
1
|
+
export { createXzCommands, createXzCommand, xzCommands, type XzLimits, type XzCommandsOptions } from "./command.js";
|
|
2
2
|
export type { CompressionCommandOptions } from "../safe-bash-compression-engine/stream.js";
|
|
@@ -24,7 +24,7 @@ import { runOperand } from "../safe-bash-compression-engine/operand.js";
|
|
|
24
24
|
import { planOperands, verifyOperandDestinations } from "../safe-bash-compression-engine/files.js";
|
|
25
25
|
import { DecodedBudget } from "../safe-bash-compression-engine/stream.js";
|
|
26
26
|
function createXzCommand(config = {}, name = "xz") {
|
|
27
|
-
const maxDecodedBytes = config.maxDecodedBytes;
|
|
27
|
+
const maxDecodedBytes = config.limits?.maxDecodedBytes ?? config.maxDecodedBytes ?? Infinity;
|
|
28
28
|
if (maxDecodedBytes !== void 0 && maxDecodedBytes !== Infinity && (!Number.isSafeInteger(maxDecodedBytes) || maxDecodedBytes < 0)) {
|
|
29
29
|
throw new RangeError("maxDecodedBytes must be a nonnegative safe integer or Infinity");
|
|
30
30
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
boundedCodec
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-FH3D75FC.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-QJ3ONEBI.js";
|
|
6
5
|
import "../safe-bash/command-chunks/chunk-KHGQDFQ7.js";
|
|
7
6
|
import "../safe-bash/command-chunks/chunk-A7L65T2H.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
9
|
export {
|
|
10
10
|
boundedCodec
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCodec
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
4
|
-
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-QJ3ONEBI.js";
|
|
5
4
|
import "../safe-bash/command-chunks/chunk-KHGQDFQ7.js";
|
|
6
5
|
import "../safe-bash/command-chunks/chunk-A7L65T2H.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
8
|
export {
|
|
9
9
|
createCodec
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
unchangedSource,
|
|
5
5
|
verifyOperandDestinations,
|
|
6
6
|
writeFileOperand
|
|
7
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
7
|
+
} from "../safe-bash/command-chunks/chunk-GF54KE2M.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-LVEHHFOV.js";
|
|
9
|
-
import "../safe-bash/command-chunks/chunk-
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-2KRKKW5S.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-3ZK5F23O.js";
|
|
11
11
|
import "../safe-bash/command-chunks/chunk-6NTY42E5.js";
|
|
12
12
|
import "../safe-bash/command-chunks/chunk-2MFNTNK7.js";
|
|
13
|
-
import "../safe-bash/command-chunks/chunk-
|
|
14
|
-
import "../safe-bash/command-chunks/chunk-
|
|
15
|
-
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
13
|
+
import "../safe-bash/command-chunks/chunk-FH3D75FC.js";
|
|
14
|
+
import "../safe-bash/command-chunks/chunk-QJ3ONEBI.js";
|
|
16
15
|
import "../safe-bash/command-chunks/chunk-KHGQDFQ7.js";
|
|
17
16
|
import "../safe-bash/command-chunks/chunk-A7L65T2H.js";
|
|
17
|
+
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
18
18
|
import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
|
|
19
19
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
20
20
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DecodedBudget,
|
|
3
3
|
transform
|
|
4
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
4
|
+
} from "../safe-bash/command-chunks/chunk-2KRKKW5S.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-3ZK5F23O.js";
|
|
6
6
|
import "../safe-bash/command-chunks/chunk-6NTY42E5.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-2MFNTNK7.js";
|
|
8
8
|
import {
|
|
9
9
|
boundedCodec
|
|
10
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-
|
|
12
|
-
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
10
|
+
} from "../safe-bash/command-chunks/chunk-FH3D75FC.js";
|
|
11
|
+
import "../safe-bash/command-chunks/chunk-QJ3ONEBI.js";
|
|
13
12
|
import "../safe-bash/command-chunks/chunk-KHGQDFQ7.js";
|
|
14
13
|
import "../safe-bash/command-chunks/chunk-A7L65T2H.js";
|
|
14
|
+
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
15
15
|
import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
|
|
16
16
|
import {
|
|
17
17
|
init_buffer
|
|
@@ -2,21 +2,21 @@ import {
|
|
|
2
2
|
sourceBytes,
|
|
3
3
|
unchangedSource,
|
|
4
4
|
writeFileOperand
|
|
5
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-GF54KE2M.js";
|
|
6
6
|
import {
|
|
7
7
|
FileOperation
|
|
8
8
|
} from "../safe-bash/command-chunks/chunk-LVEHHFOV.js";
|
|
9
9
|
import {
|
|
10
10
|
transform
|
|
11
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
12
|
-
import "../safe-bash/command-chunks/chunk-
|
|
11
|
+
} from "../safe-bash/command-chunks/chunk-2KRKKW5S.js";
|
|
12
|
+
import "../safe-bash/command-chunks/chunk-3ZK5F23O.js";
|
|
13
13
|
import "../safe-bash/command-chunks/chunk-6NTY42E5.js";
|
|
14
14
|
import "../safe-bash/command-chunks/chunk-2MFNTNK7.js";
|
|
15
|
-
import "../safe-bash/command-chunks/chunk-
|
|
16
|
-
import "../safe-bash/command-chunks/chunk-
|
|
17
|
-
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
15
|
+
import "../safe-bash/command-chunks/chunk-FH3D75FC.js";
|
|
16
|
+
import "../safe-bash/command-chunks/chunk-QJ3ONEBI.js";
|
|
18
17
|
import "../safe-bash/command-chunks/chunk-KHGQDFQ7.js";
|
|
19
18
|
import "../safe-bash/command-chunks/chunk-A7L65T2H.js";
|
|
19
|
+
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
20
20
|
import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
|
|
21
21
|
import {
|
|
22
22
|
init_buffer
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
chunkBytes,
|
|
4
4
|
stagingLimit,
|
|
5
5
|
transform
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-2KRKKW5S.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-3ZK5F23O.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-6NTY42E5.js";
|
|
9
9
|
import "../safe-bash/command-chunks/chunk-2MFNTNK7.js";
|
|
10
|
-
import "../safe-bash/command-chunks/chunk-
|
|
11
|
-
import "../safe-bash/command-chunks/chunk-
|
|
12
|
-
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-FH3D75FC.js";
|
|
11
|
+
import "../safe-bash/command-chunks/chunk-QJ3ONEBI.js";
|
|
13
12
|
import "../safe-bash/command-chunks/chunk-KHGQDFQ7.js";
|
|
14
13
|
import "../safe-bash/command-chunks/chunk-A7L65T2H.js";
|
|
14
|
+
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
15
15
|
import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
|
|
16
16
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
17
17
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
zstdDecode
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-3ZK5F23O.js";
|
|
4
4
|
import "../safe-bash/command-chunks/chunk-6NTY42E5.js";
|
|
5
5
|
import "../safe-bash/command-chunks/chunk-2MFNTNK7.js";
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
8
|
-
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-FH3D75FC.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-QJ3ONEBI.js";
|
|
9
8
|
import "../safe-bash/command-chunks/chunk-KHGQDFQ7.js";
|
|
10
9
|
import "../safe-bash/command-chunks/chunk-A7L65T2H.js";
|
|
10
|
+
import "../safe-bash/command-chunks/chunk-Z6SFT6OC.js";
|
|
11
11
|
import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
|
|
12
12
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
13
13
|
export {
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
registerDefaultExecutor,
|
|
9
9
|
registerDefaultExecutors,
|
|
10
10
|
validateExitCode
|
|
11
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
11
|
+
} from "../safe-bash/command-chunks/chunk-A3ZX6SCY.js";
|
|
12
12
|
import {
|
|
13
13
|
builtInDirectContextExecutors
|
|
14
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
15
|
-
import "../safe-bash/command-chunks/chunk-D7TADAYG.js";
|
|
14
|
+
} from "../safe-bash/command-chunks/chunk-G3G6W5ZE.js";
|
|
16
15
|
import "../safe-bash/command-chunks/chunk-7QBEUGRX.js";
|
|
16
|
+
import "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
|
|
17
17
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
18
18
|
export {
|
|
19
19
|
CommandArgumentIdentityError,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CommandDefinition } from "./command.js";
|
|
2
|
+
export { builtInDirectContextExecutors } from "./runtime-control.js";
|
|
3
|
+
export declare function isDefaultCommandOptions(options?: unknown): boolean;
|
|
4
|
+
export declare function registerDefaultExecutor<T extends CommandDefinition>(def: T, options?: unknown): T;
|
|
5
|
+
export declare function registerDefaultExecutors<T extends readonly CommandDefinition[]>(defs: T, options?: unknown): T;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
builtInDirectContextExecutors
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-G3G6W5ZE.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
|
|
5
|
+
import {
|
|
6
|
+
init_buffer
|
|
7
|
+
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
|
+
|
|
9
|
+
// packages/safe-bash-contracts/dist/default-executor.js
|
|
10
|
+
init_buffer();
|
|
11
|
+
function isDefaultCommandOptions(options) {
|
|
12
|
+
if (!options || typeof options !== "object")
|
|
13
|
+
return true;
|
|
14
|
+
for (const [k, v] of Object.entries(options)) {
|
|
15
|
+
if (k !== "replace" && v !== void 0)
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
function registerDefaultExecutor(def, options) {
|
|
21
|
+
if (isDefaultCommandOptions(options))
|
|
22
|
+
builtInDirectContextExecutors.add(def.execute);
|
|
23
|
+
return def;
|
|
24
|
+
}
|
|
25
|
+
function registerDefaultExecutors(defs, options) {
|
|
26
|
+
if (isDefaultCommandOptions(options)) {
|
|
27
|
+
for (let i = 0; i < defs.length; i++)
|
|
28
|
+
builtInDirectContextExecutors.add(defs[i].execute);
|
|
29
|
+
}
|
|
30
|
+
return defs;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
builtInDirectContextExecutors,
|
|
34
|
+
isDefaultCommandOptions,
|
|
35
|
+
registerDefaultExecutor,
|
|
36
|
+
registerDefaultExecutors
|
|
37
|
+
};
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "../safe-bash/command-chunks/chunk-WCVGFWMI.js";
|
|
4
4
|
import {
|
|
5
5
|
CommandArgumentIdentityError
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-
|
|
8
|
-
import "../safe-bash/command-chunks/chunk-D7TADAYG.js";
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-A3ZX6SCY.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-G3G6W5ZE.js";
|
|
9
8
|
import "../safe-bash/command-chunks/chunk-7QBEUGRX.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
|
|
10
10
|
import {
|
|
11
11
|
FsError
|
|
12
12
|
} from "../safe-bash/command-chunks/chunk-U6CJOXRY.js";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import "../safe-bash/command-chunks/chunk-UWNBM24V.js";
|
|
2
|
-
import "../safe-bash/command-chunks/chunk-
|
|
2
|
+
import "../safe-bash/command-chunks/chunk-JCDHBLWM.js";
|
|
3
|
+
import "../safe-bash/command-chunks/chunk-6LBBB4KL.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-CZ5DAK4K.js";
|
|
3
5
|
import "../safe-bash/command-chunks/chunk-3IC3LNJH.js";
|
|
4
6
|
import "../safe-bash/command-chunks/chunk-PTLDMI4O.js";
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
7
|
-
import "../safe-bash/command-chunks/chunk-WYJTWJZ5.js";
|
|
8
|
-
import {
|
|
9
|
-
yieldTurn
|
|
10
|
-
} from "../safe-bash/command-chunks/chunk-D7TADAYG.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-A3ZX6SCY.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-G3G6W5ZE.js";
|
|
11
9
|
import {
|
|
12
10
|
shellValueByteLength
|
|
13
11
|
} from "../safe-bash/command-chunks/chunk-7QBEUGRX.js";
|
|
14
12
|
import "../safe-bash/command-chunks/chunk-FCHHRTWP.js";
|
|
15
13
|
import {
|
|
16
14
|
writeBytes
|
|
17
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
15
|
+
} from "../safe-bash/command-chunks/chunk-4RNIZ3RT.js";
|
|
16
|
+
import {
|
|
17
|
+
yieldTurn
|
|
18
|
+
} from "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
|
|
18
19
|
import "../safe-bash/command-chunks/chunk-CRIWRVFY.js";
|
|
19
20
|
import "../safe-bash/command-chunks/chunk-U6CJOXRY.js";
|
|
20
|
-
import "../safe-bash/command-chunks/chunk-6LBBB4KL.js";
|
|
21
21
|
import {
|
|
22
22
|
init_buffer
|
|
23
23
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCommandFile
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-BK4CMEE6.js";
|
|
4
4
|
import "../safe-bash/command-chunks/chunk-PTLDMI4O.js";
|
|
5
|
-
import "../safe-bash/command-chunks/chunk-
|
|
6
|
-
import "../safe-bash/command-chunks/chunk-
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-G3G6W5ZE.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
|
|
7
7
|
import "../safe-bash/command-chunks/chunk-U6CJOXRY.js";
|
|
8
8
|
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
9
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCommandFile
|
|
3
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-BK4CMEE6.js";
|
|
4
4
|
import {
|
|
5
5
|
createOutputOperation
|
|
6
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
6
|
+
} from "../safe-bash/command-chunks/chunk-CZ5DAK4K.js";
|
|
7
7
|
import {
|
|
8
8
|
assertCountedFileOutput,
|
|
9
9
|
bindFileOutputBudget,
|
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
writeFileOutput,
|
|
12
12
|
writeFileOutputCounted
|
|
13
13
|
} from "../safe-bash/command-chunks/chunk-PTLDMI4O.js";
|
|
14
|
-
import "../safe-bash/command-chunks/chunk-
|
|
14
|
+
import "../safe-bash/command-chunks/chunk-G3G6W5ZE.js";
|
|
15
|
+
import {
|
|
16
|
+
createBytePipe,
|
|
17
|
+
outputFailure
|
|
18
|
+
} from "../safe-bash/command-chunks/chunk-4RNIZ3RT.js";
|
|
15
19
|
import {
|
|
16
20
|
abortManagedController,
|
|
17
21
|
addAbortSignalWaiter,
|
|
18
22
|
isManagedAbortSignal,
|
|
19
23
|
registerManagedAbortSignal,
|
|
20
24
|
removeAbortSignalWaiter
|
|
21
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
22
|
-
import {
|
|
23
|
-
createBytePipe,
|
|
24
|
-
outputFailure
|
|
25
|
-
} from "../safe-bash/command-chunks/chunk-4QX6XCDD.js";
|
|
25
|
+
} from "../safe-bash/command-chunks/chunk-64LG3EVJ.js";
|
|
26
26
|
import {
|
|
27
27
|
FsError
|
|
28
28
|
} from "../safe-bash/command-chunks/chunk-U6CJOXRY.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ByteSource } from "./io.js";
|
|
2
|
+
import type { InvocationCleanup } from "./command.js";
|
|
3
|
+
export type HttpHeaders = readonly (readonly [string, string])[];
|
|
4
|
+
export interface HttpRequest {
|
|
5
|
+
/** Explicit VFS PEM trust for this request; replaces transport-default CAs. */
|
|
6
|
+
readonly ca?: Uint8Array;
|
|
7
|
+
readonly httpVersion?: "1.0" | "1.1";
|
|
8
|
+
/** Read until EOF rather than using Content-Length; host transport must opt in. */
|
|
9
|
+
readonly ignoreContentLength?: true;
|
|
10
|
+
/** Validated HTTP(S) origin with curl request-target spelling; transports must preserve it. */
|
|
11
|
+
readonly url: string;
|
|
12
|
+
readonly method: string;
|
|
13
|
+
readonly headers: HttpHeaders;
|
|
14
|
+
readonly body?: ByteSource;
|
|
15
|
+
/** Consumer body intent, independent of method. Omitted means "read".
|
|
16
|
+
* "omit" permits an empty body; "omit-on-http-error" permits it only for
|
|
17
|
+
* status >= 400. Neither changes the HTTP request or response status/headers. */
|
|
18
|
+
readonly responseBodyMode?: "omit" | "omit-on-http-error" | "read";
|
|
19
|
+
readonly signal: AbortSignal;
|
|
20
|
+
/** Deadline for DNS, TCP and TLS setup only; absent means no separate connection deadline. */
|
|
21
|
+
readonly connectTimeoutMs?: number;
|
|
22
|
+
readonly registerCleanup?: (cleanup: InvocationCleanup) => void;
|
|
23
|
+
readonly denyPrivateNetworks?: true;
|
|
24
|
+
}
|
|
25
|
+
export interface HttpResponse {
|
|
26
|
+
readonly status: number;
|
|
27
|
+
readonly statusText: string;
|
|
28
|
+
readonly headers: HttpHeaders;
|
|
29
|
+
readonly httpVersion?: string;
|
|
30
|
+
readonly body: ByteSource;
|
|
31
|
+
/** True when the host already decoded Content-Encoding; encoded length is then unavailable. */
|
|
32
|
+
readonly contentDecoded?: boolean;
|
|
33
|
+
dispose(): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export type HttpTransport = ((request: HttpRequest) => Promise<HttpResponse>) & {
|
|
36
|
+
readonly supportsRequestCa?: true;
|
|
37
|
+
readonly supportedHttpVersions?: readonly ("1.0" | "1.1")[];
|
|
38
|
+
readonly supportsIgnoreContentLength?: true;
|
|
39
|
+
readonly supportsPrivateNetworkDeny?: true;
|
|
40
|
+
readonly supportsConnectTimeout?: true;
|
|
41
|
+
};
|