@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writeDiagnostic } from "../escaping.js";
|
|
2
|
-
import {
|
|
3
|
-
import { define, escapeBytes, options, output, requireOperands, UsageError
|
|
2
|
+
import { FsError, getCommandArguments } from "../contracts/index.js";
|
|
3
|
+
import { define, escapeBytes, options, output, requireOperands, UsageError } from "./internal.js";
|
|
4
4
|
import { assertCommandRequirements } from "../contracts/command-requirements.js";
|
|
5
5
|
import { pwdRequirements } from "./portable-requirements.js";
|
|
6
6
|
import { printfInteger } from "./printf-integer.js";
|
|
@@ -8,6 +8,8 @@ import { printfHex } from "./printf-hex.js";
|
|
|
8
8
|
import { parsePrintfFloat } from "./printf-float.js";
|
|
9
9
|
import { printfDecimal } from "./printf-decimal.js";
|
|
10
10
|
import { parsePrintfDirective } from "./printf-format.js";
|
|
11
|
+
import { quotePrintf } from "./printf-quote.js";
|
|
12
|
+
import { widePrintf } from "./printf-wide.js";
|
|
11
13
|
const utf8Encoder = new TextEncoder();
|
|
12
14
|
export const defaultEchoExecutors = new WeakSet();
|
|
13
15
|
export function basicCommands() {
|
|
@@ -16,10 +18,12 @@ export function basicCommands() {
|
|
|
16
18
|
define("false", () => ({ exitCode: 1 })),
|
|
17
19
|
define("echo", async (context) => {
|
|
18
20
|
const arguments_ = getCommandArguments(context);
|
|
21
|
+
const external = context.externalInvocation === true;
|
|
22
|
+
const posix = external && context.env.POSIXLY_CORRECT !== undefined;
|
|
19
23
|
let newline = true;
|
|
20
24
|
let escapes = false;
|
|
21
25
|
let offset = 0;
|
|
22
|
-
while (/^-[neE]+$/u.test(arguments_.args[offset] ?? "")) {
|
|
26
|
+
while ((!posix || arguments_.args[0] === "-n") && /^-[neE]+$/u.test(arguments_.args[offset] ?? "")) {
|
|
23
27
|
for (const flag of arguments_.args[offset].slice(1)) {
|
|
24
28
|
if (flag === "n")
|
|
25
29
|
newline = false;
|
|
@@ -28,10 +32,16 @@ export function basicCommands() {
|
|
|
28
32
|
}
|
|
29
33
|
offset++;
|
|
30
34
|
}
|
|
35
|
+
if (posix)
|
|
36
|
+
escapes = true;
|
|
31
37
|
const joined = arguments_.slice(offset).join(" ");
|
|
32
38
|
const text = typeof joined === "string" ? joined : arguments_.withValues([joined]).bytes(0);
|
|
33
39
|
if (escapes) {
|
|
34
|
-
const
|
|
40
|
+
const locale = context.env.LC_ALL || context.env.LC_CTYPE || context.env.LANG || "C.UTF-8";
|
|
41
|
+
const escaped = escapeBytes(text, true, external, external ? undefined : {
|
|
42
|
+
utf8: locale !== "C" && locale !== "POSIX",
|
|
43
|
+
missingDigit() { },
|
|
44
|
+
});
|
|
35
45
|
if (escaped.stop)
|
|
36
46
|
newline = false;
|
|
37
47
|
if (newline) {
|
|
@@ -59,10 +69,21 @@ export function basicCommands() {
|
|
|
59
69
|
return { exitCode: 0 };
|
|
60
70
|
}),
|
|
61
71
|
define("pwd", async (context) => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
const external = context.externalInvocation === true;
|
|
73
|
+
let mode = external && context.env.POSIXLY_CORRECT === undefined ? "physical" : "logical";
|
|
74
|
+
let ignored = false;
|
|
75
|
+
for (let index = 0; index < context.args.length; index++) {
|
|
76
|
+
const arg = context.args[index];
|
|
77
|
+
if (arg === "--") {
|
|
78
|
+
ignored ||= index + 1 < context.args.length;
|
|
65
79
|
break;
|
|
80
|
+
}
|
|
81
|
+
if (!arg.startsWith("-") || arg === "-") {
|
|
82
|
+
ignored = true;
|
|
83
|
+
if (!external || context.env.POSIXLY_CORRECT !== undefined)
|
|
84
|
+
break;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
66
87
|
if (arg === "--logical") {
|
|
67
88
|
mode = "logical";
|
|
68
89
|
continue;
|
|
@@ -72,39 +93,102 @@ export function basicCommands() {
|
|
|
72
93
|
continue;
|
|
73
94
|
}
|
|
74
95
|
for (const flag of arg.slice(1)) {
|
|
75
|
-
if (flag !== "L" && flag !== "P")
|
|
76
|
-
|
|
96
|
+
if (flag !== "L" && flag !== "P") {
|
|
97
|
+
if (!external)
|
|
98
|
+
throw new UsageError(`invalid option '${flag}'`);
|
|
99
|
+
await writeDiagnostic(context.stderr, `pwd: invalid option '${flag}'\n`, context.signal);
|
|
100
|
+
return { exitCode: 1 };
|
|
101
|
+
}
|
|
77
102
|
mode = flag === "P" ? "physical" : "logical";
|
|
78
103
|
}
|
|
79
104
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
105
|
+
if (external && ignored)
|
|
106
|
+
await writeDiagnostic(context.stderr, "pwd: ignoring non-option arguments\n", context.signal);
|
|
107
|
+
const requiredMode = external ? "physical" : mode;
|
|
108
|
+
assertCommandRequirements(context, pwdRequirements, [requiredMode]);
|
|
109
|
+
if (requiredMode === "physical" && context.fs.capabilitiesFor)
|
|
110
|
+
assertCommandRequirements(context, pwdRequirements, [requiredMode], await context.fs.capabilitiesFor(context.cwd, { signal: context.signal }));
|
|
111
|
+
let directory = requiredMode === "physical" ? await context.fs.realpath(context.cwd, { signal: context.signal }) : context.cwd;
|
|
112
|
+
context.signal.throwIfAborted();
|
|
113
|
+
if (external && mode === "logical") {
|
|
114
|
+
const logical = context.env.PWD;
|
|
115
|
+
if (logical?.startsWith("/") && !logical.split("/").some(component => component === "." || component === "..")) {
|
|
116
|
+
try {
|
|
117
|
+
if (await context.fs.realpath(logical, { signal: context.signal }) === directory)
|
|
118
|
+
directory = logical;
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
context.signal.throwIfAborted();
|
|
122
|
+
if (!(error instanceof FsError) || !["ENOENT", "ENOTDIR", "EACCES", "ELOOP"].includes(error.code))
|
|
123
|
+
throw error;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
await output(context, `${directory}\n`);
|
|
84
128
|
return { exitCode: 0 };
|
|
85
129
|
}),
|
|
86
130
|
define("basename", async (context) => {
|
|
87
|
-
const
|
|
131
|
+
const arguments_ = getCommandArguments(context);
|
|
132
|
+
const operands = [];
|
|
133
|
+
let suffix;
|
|
134
|
+
const parsed = options(arguments_.args, "as:z", { multiple: "a", suffix: "s", zero: "z" }, true, index => { operands.push(index); }, (_key, index, offset) => { suffix = arguments_.bytes(index).subarray(offset); });
|
|
88
135
|
const multiple = parsed.flags.has("a") || parsed.flags.has("s");
|
|
89
136
|
requireOperands(parsed.operands, 1, multiple ? Infinity : 2);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
137
|
+
if (!multiple && operands.length === 2)
|
|
138
|
+
suffix = arguments_.bytes(operands[1]);
|
|
139
|
+
for (const index of multiple ? operands : operands.slice(0, 1)) {
|
|
140
|
+
const operand = arguments_.bytes(index);
|
|
141
|
+
let end = operand.length;
|
|
142
|
+
while (end > 0 && operand[end - 1] === 47)
|
|
143
|
+
end--;
|
|
144
|
+
let start = end;
|
|
145
|
+
while (start > 0 && operand[start - 1] !== 47)
|
|
146
|
+
start--;
|
|
147
|
+
if (end === 0 && operand.length > 0)
|
|
148
|
+
end = 1;
|
|
149
|
+
if (suffix?.length && suffix.length < end - start) {
|
|
150
|
+
let matches = true;
|
|
151
|
+
for (let offset = 0; offset < suffix.length; offset++) {
|
|
152
|
+
if (operand[end - suffix.length + offset] !== suffix[offset]) {
|
|
153
|
+
matches = false;
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (matches)
|
|
158
|
+
end -= suffix.length;
|
|
159
|
+
}
|
|
160
|
+
const result = new Uint8Array(end - start + 1);
|
|
161
|
+
result.set(operand.subarray(start, end));
|
|
162
|
+
result[result.length - 1] = parsed.flags.has("z") ? 0 : 10;
|
|
163
|
+
await output(context, result);
|
|
96
164
|
}
|
|
97
165
|
return { exitCode: 0 };
|
|
98
166
|
}, 1, 1),
|
|
99
167
|
define("dirname", async (context) => {
|
|
100
|
-
const
|
|
168
|
+
const arguments_ = getCommandArguments(context);
|
|
169
|
+
const operands = [];
|
|
170
|
+
const parsed = options(arguments_.args, "z", { zero: "z" }, context.env.POSIXLY_CORRECT !== undefined, index => { operands.push(index); });
|
|
101
171
|
requireOperands(parsed.operands);
|
|
102
|
-
for (const
|
|
103
|
-
const
|
|
104
|
-
let end =
|
|
105
|
-
while (end >
|
|
172
|
+
for (const index of operands) {
|
|
173
|
+
const operand = arguments_.bytes(index);
|
|
174
|
+
let end = operand.length;
|
|
175
|
+
while (end > 0 && operand[end - 1] === 47)
|
|
106
176
|
end--;
|
|
107
|
-
|
|
177
|
+
if (end === 0 && operand.length > 0)
|
|
178
|
+
end = 1;
|
|
179
|
+
else {
|
|
180
|
+
while (end > 0 && operand[end - 1] !== 47)
|
|
181
|
+
end--;
|
|
182
|
+
while (end > 1 && operand[end - 1] === 47)
|
|
183
|
+
end--;
|
|
184
|
+
}
|
|
185
|
+
const result = new Uint8Array((end || 1) + 1);
|
|
186
|
+
if (end)
|
|
187
|
+
result.set(operand.subarray(0, end));
|
|
188
|
+
else
|
|
189
|
+
result[0] = 46;
|
|
190
|
+
result[result.length - 1] = parsed.flags.has("z") ? 0 : 10;
|
|
191
|
+
await output(context, result);
|
|
108
192
|
}
|
|
109
193
|
return { exitCode: 0 };
|
|
110
194
|
}, 1, 1),
|
|
@@ -155,7 +239,7 @@ export async function formatPrintf(context) {
|
|
|
155
239
|
const end = rawFormat ? rawFormat.indexOf(37, offset) : format.indexOf("%", offset);
|
|
156
240
|
const limit = end < 0 ? formatLength : end;
|
|
157
241
|
const literal = rawFormat ? rawFormat.subarray(offset, limit) : format.slice(offset, limit);
|
|
158
|
-
const escaped = escapeBytes(literal, false, false, unicode);
|
|
242
|
+
const escaped = escapeBytes(literal, false, false, unicode, true);
|
|
159
243
|
for (const escape of escapeErrors.splice(0))
|
|
160
244
|
await writeDiagnostic(context.stderr, `printf: missing ${escape === "x" ? "hex" : "unicode"} digit for \\${escape}\n`, context.signal);
|
|
161
245
|
await output(context, escaped.bytes);
|
|
@@ -200,6 +284,19 @@ export async function formatPrintf(context) {
|
|
|
200
284
|
const supplied = args[suppliedIndex] ?? "";
|
|
201
285
|
let text;
|
|
202
286
|
let specialFloat;
|
|
287
|
+
if (specifier === "S" || specifier === "C") {
|
|
288
|
+
const suppliedBytes = arguments_.bytes(suppliedIndex) ?? new Uint8Array();
|
|
289
|
+
const wide = unicode.utf8 ? await widePrintf(suppliedBytes, specifier === "C", precision, context.signal)
|
|
290
|
+
: specifier === "C" ? { bytes: suppliedBytes.length ? suppliedBytes.subarray(0, 1) : Uint8Array.of(0), characters: 1 }
|
|
291
|
+
: { bytes: suppliedBytes.subarray(0, precision), characters: Math.min(suppliedBytes.length, precision ?? suppliedBytes.length) };
|
|
292
|
+
const padding = " ".repeat(Math.max(0, width - wide.characters));
|
|
293
|
+
if (!flags.includes("-"))
|
|
294
|
+
await output(context, padding);
|
|
295
|
+
await output(context, wide.bytes);
|
|
296
|
+
if (flags.includes("-"))
|
|
297
|
+
await output(context, padding);
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
203
300
|
if (specifier === "b" || specifier === "s") {
|
|
204
301
|
const suppliedValue = arguments_.values[suppliedIndex] ?? "";
|
|
205
302
|
const raw = specifier === "b" && typeof suppliedValue === "string" ? suppliedValue : arguments_.bytes(suppliedIndex) ?? new Uint8Array();
|
|
@@ -226,25 +323,17 @@ export async function formatPrintf(context) {
|
|
|
226
323
|
await output(context, padding);
|
|
227
324
|
continue;
|
|
228
325
|
}
|
|
229
|
-
if (specifier === "q") {
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
text += `\\${String.fromCharCode(byte)}`;
|
|
241
|
-
else
|
|
242
|
-
text += String.fromCharCode(byte);
|
|
243
|
-
}
|
|
244
|
-
text += "'";
|
|
245
|
-
}
|
|
246
|
-
else
|
|
247
|
-
text = supplied === "" ? "''" : supplied.replace(/[^a-zA-Z0-9_./-]/gu, character => `\\${character}`);
|
|
326
|
+
if (specifier === "q" || specifier === "Q") {
|
|
327
|
+
const suppliedBytes = arguments_.bytes(suppliedIndex) ?? new Uint8Array();
|
|
328
|
+
const quoted = await quotePrintf(specifier === "Q" ? suppliedBytes.subarray(0, precision) : suppliedBytes, unicode.utf8, context.signal, flags.includes("#"));
|
|
329
|
+
const bytes = specifier === "Q" ? quoted : quoted.subarray(0, precision);
|
|
330
|
+
const padding = " ".repeat(Math.max(0, width - bytes.length));
|
|
331
|
+
if (!flags.includes("-"))
|
|
332
|
+
await output(context, padding);
|
|
333
|
+
await output(context, bytes);
|
|
334
|
+
if (flags.includes("-"))
|
|
335
|
+
await output(context, padding);
|
|
336
|
+
continue;
|
|
248
337
|
}
|
|
249
338
|
else {
|
|
250
339
|
let number = supplied === "" ? 0 : /^["']/u.test(supplied) ? quotedNumber(suppliedIndex) : Number(supplied);
|
|
@@ -261,6 +350,10 @@ export async function formatPrintf(context) {
|
|
|
261
350
|
const parsed = parsePrintfFloat(supplied);
|
|
262
351
|
number = parsed?.value ?? NaN;
|
|
263
352
|
specialFloat = parsed?.special;
|
|
353
|
+
if (parsed?.error) {
|
|
354
|
+
await writeDiagnostic(context.stderr, `printf: '${supplied}': ${parsed.error}\n`, context.signal);
|
|
355
|
+
exitCode = 1;
|
|
356
|
+
}
|
|
264
357
|
}
|
|
265
358
|
if ("fFeEgGaA".includes(specifier) && (!Number.isFinite(number) && specialFloat === undefined || supplied === "" && suppliedIndex < args.length)) {
|
|
266
359
|
await writeDiagnostic(context.stderr, `printf: '${supplied}': invalid number\n`, context.signal);
|
|
@@ -342,6 +435,9 @@ export function tryFastEcho(args) {
|
|
|
342
435
|
if (!escapes) {
|
|
343
436
|
return newline ? `${text}\n` : text;
|
|
344
437
|
}
|
|
438
|
+
// Unicode escapes depend on the command environment, which this path lacks.
|
|
439
|
+
if (text.includes("\\u") || text.includes("\\U"))
|
|
440
|
+
return undefined;
|
|
345
441
|
const escaped = escapeBytes(text, true);
|
|
346
442
|
for (let i = 0; i < escaped.bytes.byteLength; i++) {
|
|
347
443
|
const b = escaped.bytes[i];
|
|
@@ -576,7 +672,9 @@ export function tryFastPrintf(args, allowNull = false) {
|
|
|
576
672
|
}
|
|
577
673
|
if (conv === 100 || conv === 105) {
|
|
578
674
|
const rawVal = args[argument++] ?? "0";
|
|
579
|
-
|
|
675
|
+
if (rawVal.length === 0)
|
|
676
|
+
return undefined;
|
|
677
|
+
const val = rawVal;
|
|
580
678
|
if (val.length > 15)
|
|
581
679
|
return undefined;
|
|
582
680
|
const first = val.charCodeAt(0);
|
|
@@ -628,7 +726,9 @@ export function tryFastPrintf(args, allowNull = false) {
|
|
|
628
726
|
}
|
|
629
727
|
if (conv === 120 || conv === 88 || conv === 111 || conv === 117) {
|
|
630
728
|
const rawVal = args[argument++] ?? "0";
|
|
631
|
-
|
|
729
|
+
if (rawVal.length === 0)
|
|
730
|
+
return undefined;
|
|
731
|
+
const val = rawVal;
|
|
632
732
|
if (val.length > 15)
|
|
633
733
|
return undefined;
|
|
634
734
|
if (val.length > 1 && val.charCodeAt(0) === 48)
|
|
@@ -12,16 +12,16 @@ const parseSyncCompressionOptions = createOptionsParser([
|
|
|
12
12
|
{ ...formats.xz, format: "xz", names: ["xz", "unxz", "xzcat"] },
|
|
13
13
|
{ ...formats.xz, suffix: ".lzma", format: "xz", names: ["lzma", "unlzma", "lzcat"] },
|
|
14
14
|
]);
|
|
15
|
+
import { createBzip2Commands } from "../../../../safe-bash-command-bzip2/index.js";
|
|
15
16
|
import { createXzCommands } from "../../../../safe-bash-command-xz/index.js";
|
|
16
17
|
import { runOperand } from "../../../../safe-bash-compression-engine/operand.js";
|
|
17
18
|
import { DecodedBudget } from "./stream.js";
|
|
18
|
-
import { CompressedDataError } from "./errors.js";
|
|
19
19
|
export function createCompressionCommands(config = {}) {
|
|
20
20
|
const maxDecodedBytes = config.maxDecodedBytes;
|
|
21
21
|
if (maxDecodedBytes !== undefined && maxDecodedBytes !== Infinity && (!Number.isSafeInteger(maxDecodedBytes) || maxDecodedBytes < 0)) {
|
|
22
22
|
throw new RangeError("maxDecodedBytes must be a nonnegative safe integer or Infinity");
|
|
23
23
|
}
|
|
24
|
-
const commands = profiles.flatMap(profile => profile.
|
|
24
|
+
const commands = profiles.flatMap(profile => profile.format === "bzip2" ? createBzip2Commands(config) : profile.names.map((name) => define(name, async (context) => {
|
|
25
25
|
const options = parseOptions(name, context.args);
|
|
26
26
|
if (options.help) {
|
|
27
27
|
await output(context, `Usage: ${name} [OPTION]... [FILE]...\n-c, --stdout, --to-stdout\n-d, --decompress, --uncompress\n-k, --keep\n-f, --force\n-t, --test\n${options.format === "zstd" ? "-1..-9, --best\nHigher levels and --fast[=NUM] are unsupported by the bounded codec.\n" : "-1..-9, --fast, --best\n"}${options.format === "zstd" ? "-q, --quiet (repeat to suppress errors)\n" : ""}${options.format === "gzip" ? "-q, --quiet (suppress warnings)\n-r, --recursive (traverse directories without following symlinks)\n-n, --no-name (always enabled)\n" : `Default compression level: ${options.level}.\n`}-h, --help\nNo FILE or FILE '-' uses stdin; file output uses private VFS staging.\n`);
|
|
@@ -73,17 +73,16 @@ export function createCompressionCommands(config = {}) {
|
|
|
73
73
|
context.signal.throwIfAborted();
|
|
74
74
|
if (options.quiet < 2)
|
|
75
75
|
await diagnostic(context, error);
|
|
76
|
-
|
|
77
|
-
exitCode = options.format === "bzip2" ? Math.max(exitCode, failureCode) : failureCode;
|
|
76
|
+
exitCode = 1;
|
|
78
77
|
if (decodedBudget.exceeded)
|
|
79
78
|
break;
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
return { exitCode };
|
|
83
|
-
}));
|
|
82
|
+
})));
|
|
84
83
|
const xzCmds = createXzCommands(config);
|
|
85
84
|
if (maxDecodedBytes === undefined || maxDecodedBytes === Infinity) {
|
|
86
|
-
for (const c of xzCmds)
|
|
85
|
+
for (const c of [...commands, ...xzCmds])
|
|
87
86
|
builtInDirectContextExecutors.add(c.execute);
|
|
88
87
|
}
|
|
89
88
|
return [...commands.slice(0, 6), ...xzCmds, ...commands.slice(6)];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export declare function evalSyncCmp(inBytes: Uint8Array | undefined, opArgs: readonly string[], readFileSync?: (path: string) => Uint8Array | undefined): string | undefined;
|
|
1
|
+
export * from "../../safe-bash-command-cmp/index.js";
|
|
2
|
+
export { createCmpCommand, createCmpCommands, cmpCommands, cmpCommand, evalSyncCmp } from "../../safe-bash-command-cmp/index.js";
|
|
4
3
|
//# sourceMappingURL=cmp.d.ts.map
|