@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,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
contracts_exports
|
|
6
|
-
} from "./chunk-FJZNUUOQ.js";
|
|
7
|
-
import {
|
|
8
|
-
yield_exports
|
|
9
|
-
} from "./chunk-LAPF2XE6.js";
|
|
2
|
+
writeDiagnostic
|
|
3
|
+
} from "./chunk-W47GHRRF.js";
|
|
10
4
|
import {
|
|
11
5
|
dirname,
|
|
12
6
|
posixPath,
|
|
13
|
-
resolvePath
|
|
14
|
-
|
|
7
|
+
resolvePath,
|
|
8
|
+
yieldTurn
|
|
9
|
+
} from "./chunk-UZU5BIJI.js";
|
|
10
|
+
import {
|
|
11
|
+
readBytes,
|
|
12
|
+
toByteSource,
|
|
13
|
+
writeBytes
|
|
14
|
+
} from "./chunk-OSMQCYSP.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
UsageError,
|
|
17
|
+
pathOf
|
|
18
|
+
} from "./chunk-5OST7NOX.js";
|
|
18
19
|
import {
|
|
19
|
-
__reExport,
|
|
20
20
|
import_buffer,
|
|
21
21
|
init_platform,
|
|
22
22
|
setImmediate
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-I3KSESCR.js";
|
|
24
24
|
|
|
25
25
|
// packages/safe-bash/src/commands/node/browser.ts
|
|
26
26
|
init_platform();
|
|
@@ -577,10 +577,8 @@ function createNodePathModule(runtime, cwd) {
|
|
|
577
577
|
init_platform();
|
|
578
578
|
|
|
579
579
|
// packages/safe-bash/src/diagnostics.ts
|
|
580
|
-
var diagnostics_exports = {};
|
|
581
580
|
init_platform();
|
|
582
|
-
|
|
583
|
-
import * as diagnostics_star from "../../safe-bash-contracts/diagnostics.js";
|
|
581
|
+
import { PublicDiagnostic, UsageError as UsageError2, publicDiagnosticMessage } from "../../safe-bash-contracts/diagnostics.js";
|
|
584
582
|
|
|
585
583
|
// packages/safe-bash/src/integrations/safejs/filesystem.ts
|
|
586
584
|
init_platform();
|
|
@@ -688,7 +686,7 @@ var GuestInput = class {
|
|
|
688
686
|
this.signal = signal;
|
|
689
687
|
this.fail = fail;
|
|
690
688
|
this.resource = resource;
|
|
691
|
-
this.iterator =
|
|
689
|
+
this.iterator = readBytes(source, signal);
|
|
692
690
|
}
|
|
693
691
|
limit;
|
|
694
692
|
signal;
|
|
@@ -702,7 +700,7 @@ var GuestInput = class {
|
|
|
702
700
|
async take(size) {
|
|
703
701
|
this.signal.throwIfAborted();
|
|
704
702
|
while (!this.pending.length) {
|
|
705
|
-
if (++this.pulls % 64 === 0) await
|
|
703
|
+
if (++this.pulls % 64 === 0) await yieldTurn(this.signal);
|
|
706
704
|
const next = await this.iterator.next();
|
|
707
705
|
if (next.done) return void 0;
|
|
708
706
|
this.pending = next.value;
|
|
@@ -772,7 +770,7 @@ var GuestOutput = class {
|
|
|
772
770
|
}
|
|
773
771
|
this.produced += bytes.length;
|
|
774
772
|
const queued = this.queue.then(async () => {
|
|
775
|
-
for (let offset = 0; offset < bytes.length; offset += chunkSize) await
|
|
773
|
+
for (let offset = 0; offset < bytes.length; offset += chunkSize) await writeBytes(target, bytes.subarray(offset, offset + chunkSize), this.signal);
|
|
776
774
|
}).catch((error) => {
|
|
777
775
|
if (target === this.stderr) this.stderrFailed = true;
|
|
778
776
|
this.fail(error);
|
|
@@ -809,7 +807,7 @@ var GuestOutput = class {
|
|
|
809
807
|
};
|
|
810
808
|
|
|
811
809
|
// packages/safe-bash/src/commands/safejs/runtime.ts
|
|
812
|
-
var GuestDiagnostic = class extends
|
|
810
|
+
var GuestDiagnostic = class extends PublicDiagnostic {
|
|
813
811
|
constructor(info) {
|
|
814
812
|
super(info.message);
|
|
815
813
|
this.info = info;
|
|
@@ -858,7 +856,7 @@ function createSafeJsCommands(options, dialect) {
|
|
|
858
856
|
const diagnose = async (message) => {
|
|
859
857
|
const diagnostic = new AbortController();
|
|
860
858
|
const end = Math.max(Date.now() + 1, deadline);
|
|
861
|
-
const pending =
|
|
859
|
+
const pending = writeDiagnostic(context.stderr, `${dialect.name}: ${message}
|
|
862
860
|
`, AbortSignal.any([context.signal, diagnostic.signal]));
|
|
863
861
|
const cancel = schedule(() => diagnostic.abort(), end);
|
|
864
862
|
try {
|
|
@@ -874,7 +872,7 @@ function createSafeJsCommands(options, dialect) {
|
|
|
874
872
|
try {
|
|
875
873
|
parsed = dialect.invocation(context.args);
|
|
876
874
|
} catch (error) {
|
|
877
|
-
await diagnose(
|
|
875
|
+
await diagnose(publicDiagnosticMessage(error, context.onInternalError));
|
|
878
876
|
return { exitCode: 2 };
|
|
879
877
|
}
|
|
880
878
|
context.signal.throwIfAborted();
|
|
@@ -883,11 +881,11 @@ function createSafeJsCommands(options, dialect) {
|
|
|
883
881
|
await diagnose("SafeJS command limit exceeded: maxOutputBytes");
|
|
884
882
|
return { exitCode: 124 };
|
|
885
883
|
}
|
|
886
|
-
await
|
|
884
|
+
await writeBytes(context.stdout, import_buffer.Buffer.from(parsed.output), context.signal);
|
|
887
885
|
return { exitCode: 0 };
|
|
888
886
|
}
|
|
889
887
|
if (parsed.help) {
|
|
890
|
-
await
|
|
888
|
+
await writeBytes(context.stdout, import_buffer.Buffer.from(dialect.help), context.signal);
|
|
891
889
|
return { exitCode: 0 };
|
|
892
890
|
}
|
|
893
891
|
if (!runtime) {
|
|
@@ -916,9 +914,9 @@ function createSafeJsCommands(options, dialect) {
|
|
|
916
914
|
let source = parsed.source;
|
|
917
915
|
let filename = parsed.file;
|
|
918
916
|
if (source === void 0) {
|
|
919
|
-
if (!fromStdin) filename =
|
|
917
|
+
if (!fromStdin) filename = pathOf(context, parsed.file);
|
|
920
918
|
const capabilities = fromStdin ? void 0 : await withSignal(signal, async () => await context.fs.capabilitiesFor?.(filename, { signal }) ?? context.fs.capabilities);
|
|
921
|
-
const bytes = fromStdin ? context.stdin : context.fs.readStream && capabilities?.streamingRead !== false ? context.fs.readStream(filename, { signal, chunkSize: 65536 }) :
|
|
919
|
+
const bytes = fromStdin ? context.stdin : context.fs.readStream && capabilities?.streamingRead !== false ? context.fs.readStream(filename, { signal, chunkSize: 65536 }) : toByteSource(await withSignal(signal, () => context.fs.readFile(filename, { signal, ...Number.isFinite(limits.maxSourceBytes) ? { maxBytes: limits.maxSourceBytes } : {} })));
|
|
922
920
|
const reader = new GuestInput(bytes, limits.maxSourceBytes, signal, fail, "maxSourceBytes");
|
|
923
921
|
try {
|
|
924
922
|
source = await reader.readText();
|
|
@@ -931,7 +929,7 @@ function createSafeJsCommands(options, dialect) {
|
|
|
931
929
|
source = dialect.transformSource?.(source, { ...parsed, file: filename }) ?? source;
|
|
932
930
|
if (parsed.check) {
|
|
933
931
|
const parse = runtime.parseSourceModule;
|
|
934
|
-
if (!parse) throw new
|
|
932
|
+
if (!parse) throw new UsageError("syntax checking requires an injected runtime.parseSourceModule");
|
|
935
933
|
try {
|
|
936
934
|
await withSignal(signal, async () => {
|
|
937
935
|
await parse(source, filename);
|
|
@@ -943,7 +941,7 @@ function createSafeJsCommands(options, dialect) {
|
|
|
943
941
|
signal.throwIfAborted();
|
|
944
942
|
if (Date.now() >= deadline) throw new SafeJsCommandLimitError("timeoutMs");
|
|
945
943
|
} else {
|
|
946
|
-
input = new GuestInput(fromStdin ?
|
|
944
|
+
input = new GuestInput(fromStdin ? toByteSource("") : context.stdin, limits.maxInputBytes, signal, fail);
|
|
947
945
|
const guestInput = input;
|
|
948
946
|
const declare = runtime.declareHostOperation;
|
|
949
947
|
const stdio = {
|
|
@@ -980,7 +978,7 @@ function createSafeJsCommands(options, dialect) {
|
|
|
980
978
|
async readSource(path, maxBytes = limits.maxSourceBytes) {
|
|
981
979
|
const capabilities = await withSignal(signal, async () => await context.fs.capabilitiesFor?.(path, { signal }) ?? context.fs.capabilities);
|
|
982
980
|
const reader = new GuestInput(
|
|
983
|
-
context.fs.readStream && capabilities?.streamingRead !== false ? context.fs.readStream(path, { signal, chunkSize: 65536 }) :
|
|
981
|
+
context.fs.readStream && capabilities?.streamingRead !== false ? context.fs.readStream(path, { signal, chunkSize: 65536 }) : toByteSource(await withSignal(signal, () => context.fs.readFile(path, { signal, ...Number.isFinite(maxBytes) ? { maxBytes } : {} }))),
|
|
984
982
|
maxBytes,
|
|
985
983
|
signal,
|
|
986
984
|
fail,
|
|
@@ -1033,9 +1031,9 @@ function createSafeJsCommands(options, dialect) {
|
|
|
1033
1031
|
context.signal.throwIfAborted();
|
|
1034
1032
|
if (failed) {
|
|
1035
1033
|
const info = thrown instanceof GuestDiagnostic ? thrown.info : { name: statusField(thrown, "name"), code: statusField(thrown, "code") };
|
|
1036
|
-
const detail = thrown instanceof SafeJsCommandLimitError ? thrown.message :
|
|
1034
|
+
const detail = thrown instanceof SafeJsCommandLimitError ? thrown.message : publicDiagnosticMessage(thrown, context.onInternalError);
|
|
1037
1035
|
if (!output.stderrFailed) await diagnose(detail);
|
|
1038
|
-
return { exitCode: thrown instanceof SafeJsCommandLimitError || info.code === "budgetExceeded" ? 124 : thrown instanceof
|
|
1036
|
+
return { exitCode: thrown instanceof SafeJsCommandLimitError || info.code === "budgetExceeded" ? 124 : thrown instanceof UsageError || !parsed.check && info.name === "ParseError" ? 2 : 1 };
|
|
1039
1037
|
}
|
|
1040
1038
|
return { exitCode };
|
|
1041
1039
|
} }];
|
|
@@ -1134,7 +1132,7 @@ function invocation(args, metadata) {
|
|
|
1134
1132
|
}
|
|
1135
1133
|
if (argument === "-h" || argument === "--help") return { file: "-", args: [], print: false, help: true };
|
|
1136
1134
|
if (argument === "-v" || argument === "--version") {
|
|
1137
|
-
if (!metadata?.version) throw new
|
|
1135
|
+
if (!metadata?.version) throw new UsageError("inject runtime.node.version to report the actual runtime identity");
|
|
1138
1136
|
return { file: "-", args: [], print: false, help: false, output: metadata.version + "\n" };
|
|
1139
1137
|
}
|
|
1140
1138
|
if (argument === "--completion-bash") {
|
|
@@ -1150,18 +1148,18 @@ complete -F _node_complete node
|
|
|
1150
1148
|
const flag = equal < 0 ? argument : argument.slice(0, equal);
|
|
1151
1149
|
if (flag === "--env-file" || flag === "--env-file-if-exists") {
|
|
1152
1150
|
const path = equal < 0 ? args[++index] : argument.slice(equal + 1);
|
|
1153
|
-
if (!path) throw new
|
|
1151
|
+
if (!path) throw new UsageError(`${flag} requires a file operand`);
|
|
1154
1152
|
envFiles.push({ path, optional: flag === "--env-file-if-exists" });
|
|
1155
1153
|
continue;
|
|
1156
1154
|
}
|
|
1157
1155
|
if (Object.hasOwn(metadata?.options ?? {}, flag)) {
|
|
1158
1156
|
const kind = metadata.options[flag];
|
|
1159
1157
|
if (kind === "boolean") {
|
|
1160
|
-
if (equal >= 0) throw new
|
|
1158
|
+
if (equal >= 0) throw new UsageError(`${flag} does not accept a value`);
|
|
1161
1159
|
nodeOptions.push(flag);
|
|
1162
1160
|
} else {
|
|
1163
1161
|
const value = equal < 0 ? args[++index] : argument.slice(equal + 1);
|
|
1164
|
-
if (!value || value.startsWith("--")) throw new
|
|
1162
|
+
if (!value || value.startsWith("--")) throw new UsageError(`${flag} requires a value`);
|
|
1165
1163
|
nodeOptions.push(flag + "=" + value);
|
|
1166
1164
|
}
|
|
1167
1165
|
continue;
|
|
@@ -1172,35 +1170,35 @@ complete -F _node_complete node
|
|
|
1172
1170
|
}
|
|
1173
1171
|
if (argument === "--require" || argument.startsWith("--require=") || argument.startsWith("-r")) {
|
|
1174
1172
|
const name = argument === "--require" || argument === "-r" ? args[++index] : argument.startsWith("--require=") ? argument.slice(10) : argument.slice(2);
|
|
1175
|
-
if (!name) throw new
|
|
1173
|
+
if (!name) throw new UsageError(`${argument} requires a module operand`);
|
|
1176
1174
|
preloads.push(name);
|
|
1177
1175
|
continue;
|
|
1178
1176
|
}
|
|
1179
1177
|
if (argument === "--input-type" || argument.startsWith("--input-type=")) {
|
|
1180
1178
|
const value = argument === "--input-type" ? args[++index] : argument.slice(13);
|
|
1181
|
-
if (value !== "module" && value !== "commonjs") throw new
|
|
1179
|
+
if (value !== "module" && value !== "commonjs") throw new UsageError("SafeJS node supports --input-type=module or --input-type=commonjs");
|
|
1182
1180
|
inputType = value;
|
|
1183
1181
|
continue;
|
|
1184
1182
|
}
|
|
1185
1183
|
if (argument === "--check" || argument === "-c") {
|
|
1186
|
-
if (source !== void 0) throw new
|
|
1184
|
+
if (source !== void 0) throw new UsageError("conflicting source selectors");
|
|
1187
1185
|
check = true;
|
|
1188
1186
|
continue;
|
|
1189
1187
|
}
|
|
1190
1188
|
const mode = argument === "--eval" || argument.startsWith("--eval=") || argument.startsWith("-e") ? "eval" : argument === "--print" || argument.startsWith("--print=") || argument.startsWith("-p") ? "print" : void 0;
|
|
1191
1189
|
if (mode) {
|
|
1192
|
-
if (source !== void 0 || check) throw new
|
|
1190
|
+
if (source !== void 0 || check) throw new UsageError("conflicting source selectors");
|
|
1193
1191
|
print = mode === "print";
|
|
1194
1192
|
const equal2 = argument.indexOf("=");
|
|
1195
1193
|
source = argument.startsWith("--") ? equal2 >= 0 ? argument.slice(equal2 + 1) : args[++index] : argument.length > 2 ? argument.slice(2) : args[++index];
|
|
1196
|
-
if (source === void 0) throw new
|
|
1194
|
+
if (source === void 0) throw new UsageError(`${argument} requires JavaScript source`);
|
|
1197
1195
|
continue;
|
|
1198
1196
|
}
|
|
1199
|
-
if (argument !== "-" && argument.startsWith("-")) throw new
|
|
1197
|
+
if (argument !== "-" && argument.startsWith("-")) throw new UsageError(`unsupported node option '${argument}'`);
|
|
1200
1198
|
break;
|
|
1201
1199
|
}
|
|
1202
1200
|
if (source !== void 0) return { source, file: print ? "<node -p>" : "<node -e>", args: args.slice(index), print, help: false, preloads, sourceMaps, nodeOptions, envFiles, ...inputType ? { inputType } : {} };
|
|
1203
|
-
if (inputType === "commonjs" && args[index] !== void 0 && args[index] !== "-") throw new
|
|
1201
|
+
if (inputType === "commonjs" && args[index] !== void 0 && args[index] !== "-") throw new UsageError("--input-type can only be used with eval, print or stdin source");
|
|
1204
1202
|
return { file: args[index] ?? "-", args: args.slice(index + 1), print: false, help: false, check, preloads, sourceMaps, nodeOptions, envFiles, ...inputType ? { inputType } : {} };
|
|
1205
1203
|
}
|
|
1206
1204
|
function createSafeJsNodeCommand(options) {
|
|
@@ -1333,7 +1331,8 @@ ${source}
|
|
|
1333
1331
|
}
|
|
1334
1332
|
|
|
1335
1333
|
export {
|
|
1336
|
-
|
|
1334
|
+
PublicDiagnostic,
|
|
1335
|
+
publicDiagnosticMessage,
|
|
1337
1336
|
record,
|
|
1338
1337
|
onlyKeys,
|
|
1339
1338
|
stringValue,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_platform
|
|
3
|
+
} from "./chunk-I3KSESCR.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash/src/contracts/yield.ts
|
|
6
|
+
init_platform();
|
|
7
|
+
import { cancelTurn, drainCooperativeSteps, hasRegisteredYieldCheckpoint, hasYieldCheckpoint, inheritYieldCheckpoint, monotonicNow, registerInternalYieldCheckpoint, registerYieldCheckpoint, runYieldCheckpoint, scheduleTurn, yieldTurn } from "../../safe-bash-contracts/yield.js";
|
|
8
|
+
|
|
9
|
+
// packages/safe-bash/src/contracts/path.ts
|
|
10
|
+
init_platform();
|
|
11
|
+
import { validatePath, resolvePath, normalizePath, relativePath, isPathWithin, assertPathWithin, basename, dirname, extname, joinPath, isAbsolutePath, posixPath as posixPath2 } from "@poe-platform/safe-fs/core";
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
validatePath,
|
|
15
|
+
resolvePath,
|
|
16
|
+
normalizePath,
|
|
17
|
+
relativePath,
|
|
18
|
+
isPathWithin,
|
|
19
|
+
basename,
|
|
20
|
+
dirname,
|
|
21
|
+
joinPath,
|
|
22
|
+
posixPath2 as posixPath,
|
|
23
|
+
cancelTurn,
|
|
24
|
+
hasRegisteredYieldCheckpoint,
|
|
25
|
+
hasYieldCheckpoint,
|
|
26
|
+
inheritYieldCheckpoint,
|
|
27
|
+
monotonicNow,
|
|
28
|
+
registerInternalYieldCheckpoint,
|
|
29
|
+
runYieldCheckpoint,
|
|
30
|
+
scheduleTurn,
|
|
31
|
+
yieldTurn
|
|
32
|
+
};
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
__export,
|
|
3
|
-
__reExport,
|
|
4
2
|
init_platform
|
|
5
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3KSESCR.js";
|
|
6
4
|
|
|
7
5
|
// packages/safe-bash/src/contracts/value.ts
|
|
8
|
-
var value_exports = {};
|
|
9
|
-
__export(value_exports, {
|
|
10
|
-
shellValueByteLength: () => shellValueByteLength
|
|
11
|
-
});
|
|
12
6
|
init_platform();
|
|
13
|
-
__reExport(value_exports, value_star);
|
|
14
7
|
import { shellValueByteLength as baseShellValueByteLength } from "../../safe-bash-contracts/value.js";
|
|
15
|
-
import
|
|
8
|
+
import { concatShellValues, shellValueBytes, shellValueFromBytes, shellValueRetainedBytes, shellValueText } from "../../safe-bash-contracts/value.js";
|
|
16
9
|
function shellValueByteLength(value) {
|
|
17
10
|
if (typeof value !== "string") return baseShellValueByteLength(value);
|
|
18
11
|
let bytes = 0;
|
|
@@ -32,5 +25,9 @@ function shellValueByteLength(value) {
|
|
|
32
25
|
|
|
33
26
|
export {
|
|
34
27
|
shellValueByteLength,
|
|
35
|
-
|
|
28
|
+
concatShellValues,
|
|
29
|
+
shellValueBytes,
|
|
30
|
+
shellValueFromBytes,
|
|
31
|
+
shellValueRetainedBytes,
|
|
32
|
+
shellValueText
|
|
36
33
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_platform
|
|
3
|
+
} from "./chunk-I3KSESCR.js";
|
|
4
|
+
|
|
5
|
+
// packages/safe-bash/src/escaping.ts
|
|
6
|
+
init_platform();
|
|
7
|
+
import { escapeText, quoteShellOperand, writeDiagnostic } from "../../safe-bash-query-engine/escaping.js";
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
escapeText,
|
|
11
|
+
quoteShellOperand,
|
|
12
|
+
writeDiagnostic
|
|
13
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_platform
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3KSESCR.js";
|
|
4
4
|
|
|
5
5
|
// packages/safe-bash/src/commands/getopt/index.ts
|
|
6
6
|
init_platform();
|
|
7
|
-
|
|
7
|
+
import {} from "../../safe-bash-command-getopt/index.js";
|
|
8
8
|
import { createGetoptCommand, createGetoptCommands, getoptCommands, evalSyncGetopt } from "../../safe-bash-command-getopt/index.js";
|
|
9
9
|
|
|
10
10
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
builtInDirectContextExecutors
|
|
3
|
+
} from "./chunk-5OST7NOX.js";
|
|
4
4
|
import {
|
|
5
5
|
init_platform
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I3KSESCR.js";
|
|
7
7
|
|
|
8
8
|
// packages/safe-bash/src/commands/mdq/index.ts
|
|
9
9
|
init_platform();
|
|
@@ -16,18 +16,18 @@ import {
|
|
|
16
16
|
createMdqCommands as createRawMdqCommands,
|
|
17
17
|
mdqCommands as rawMdqCommands
|
|
18
18
|
} from "../../safe-bash-command-mdq/index.js";
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
import {} from "../../safe-bash-command-mdq/index.js";
|
|
20
|
+
builtInDirectContextExecutors.add(rawMdqCommand.execute);
|
|
21
21
|
function createMdqCommand(options = {}) {
|
|
22
22
|
const def = createRawMdqCommand(options);
|
|
23
|
-
if (options.limits === void 0)
|
|
23
|
+
if (options.limits === void 0) builtInDirectContextExecutors.add(def.execute);
|
|
24
24
|
return def;
|
|
25
25
|
}
|
|
26
26
|
var mdqCommand = createMdqCommand();
|
|
27
27
|
function createMdqCommands(options = {}) {
|
|
28
28
|
const defs = createRawMdqCommands(options);
|
|
29
29
|
if (options.limits === void 0) {
|
|
30
|
-
for (let i = 0; i < defs.length; i++)
|
|
30
|
+
for (let i = 0; i < defs.length; i++) builtInDirectContextExecutors.add(defs[i].execute);
|
|
31
31
|
}
|
|
32
32
|
return defs;
|
|
33
33
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
builtInDirectContextExecutors,
|
|
3
|
+
syncCommandEvaluators
|
|
4
|
+
} from "./chunk-5OST7NOX.js";
|
|
4
5
|
import {
|
|
5
6
|
init_platform
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-I3KSESCR.js";
|
|
7
8
|
|
|
8
9
|
// packages/safe-bash/src/commands/op/index.ts
|
|
9
10
|
init_platform();
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
createOpCommands as createRawOpCommands,
|
|
13
14
|
evalSyncOp
|
|
14
15
|
} from "../../safe-bash-command-op/index.js";
|
|
15
|
-
|
|
16
|
+
import {} from "../../safe-bash-command-op/index.js";
|
|
16
17
|
import {
|
|
17
18
|
captureEnvironment,
|
|
18
19
|
createDocumentHandlers,
|
|
@@ -33,12 +34,12 @@ import {
|
|
|
33
34
|
} from "../../safe-bash-command-op/index.js";
|
|
34
35
|
function createOpCommand(options = {}) {
|
|
35
36
|
const def = createRawOpCommand(options);
|
|
36
|
-
|
|
37
|
+
builtInDirectContextExecutors.add(def.execute);
|
|
37
38
|
return def;
|
|
38
39
|
}
|
|
39
40
|
function createOpCommands(options = {}) {
|
|
40
41
|
const defs = createRawOpCommands(options);
|
|
41
|
-
for (let i = 0; i < defs.length; i++)
|
|
42
|
+
for (let i = 0; i < defs.length; i++) builtInDirectContextExecutors.add(defs[i].execute);
|
|
42
43
|
return defs;
|
|
43
44
|
}
|
|
44
45
|
function opCommands(options = {}) {
|
|
@@ -50,7 +51,7 @@ function opCommands(options = {}) {
|
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
+
syncCommandEvaluators.evalSyncOp = evalSyncOp;
|
|
54
55
|
|
|
55
56
|
export {
|
|
56
57
|
evalSyncOp,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
inflateRaw
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SDEPGTOF.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
builtInDirectContextExecutors,
|
|
6
|
+
syncCommandEvaluators
|
|
7
|
+
} from "./chunk-5OST7NOX.js";
|
|
7
8
|
import {
|
|
8
9
|
init_platform
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-I3KSESCR.js";
|
|
10
11
|
|
|
11
12
|
// packages/safe-bash/src/commands/csvkit/index.ts
|
|
12
13
|
init_platform();
|
|
@@ -1517,42 +1518,73 @@ function evalSyncCsvjoin(inBytes, opArgs, readFileSync) {
|
|
|
1517
1518
|
|
|
1518
1519
|
// packages/safe-bash/src/commands/csvkit/index.ts
|
|
1519
1520
|
import { createCsvkitCommands as createRawCsvkitCommands } from "../../safe-bash-command-csvkit/index.js";
|
|
1520
|
-
|
|
1521
|
+
import { CsvkitBlocked, CsvkitCleanupError, CsvkitDiagnostic, Decimal as Decimal2, DecimalTrap, DictionaryWriter, LazyInput, OwnedArguments, POSSIBLE_DELIMITERS as POSSIBLE_DELIMITERS2, PythonException, Runtime, SqlTuple, WorkbookInput, Writer, castValue, columnTypeOrder, commands, compileCreateTable, createCsvkitCommand, createCsvpyInterpreter, createDatabaseProvider, createGzipCompressionProvider, createMemorySqliteFileSystem, createSqlTransportProvider, createSqliteDatabaseProvider, databaseDialects, defaultHeaders as defaultHeaders2, defaultLimits, defaultSniffStreamProfile, deriveSchema, diagnosticReport, execute, inferTable as inferTable2, matchColumnIdentifier as matchColumnIdentifier2, normalizeEncoding, parseArguments, parseColumnIdentifiers as parseColumnIdentifiers2, parseDatabaseUrl, pythonCodecs, pythonValueText as pythonValueText2, readCsv as readCsv2, readCsvStream, resolveDatabaseProvider, run, sniff as sniff2, sqlIdentifier, sqlOptions, sqlSchemaIdentifier, sqlTransportProfiles, utf8Codec, virtualPath, warningText, writeCsvRow as writeCsvRow2 } from "../../safe-bash-command-csvkit/index.js";
|
|
1521
1522
|
function isDefaultCsvkitOptions(options) {
|
|
1522
1523
|
if (!options) return true;
|
|
1523
1524
|
return options.limits === void 0 && options.codecs === void 0 && options.locale === void 0 && options.clock === void 0 && options.terminal === void 0 && options.compression === void 0 && options.databases === void 0 && options.sqlDialects === void 0 && options.interpreter === void 0 && options.openMatchFile === void 0 && options.sniffing === void 0 && options.columnWarnings === void 0 && options.probeInputOpen === void 0;
|
|
1524
1525
|
}
|
|
1525
1526
|
function createCsvkitCommands(options = {}) {
|
|
1526
1527
|
const defs = createRawCsvkitCommands(options);
|
|
1527
|
-
Object.assign(
|
|
1528
|
+
Object.assign(syncCommandEvaluators, { evalSyncCsvlook, evalSyncCsvjson, evalSyncCsvsort, evalSyncCsvformat, evalSyncCsvstat, evalSyncIn2csv, evalSyncCsvstack, evalSyncCsvjoin });
|
|
1528
1529
|
if (isDefaultCsvkitOptions(options)) {
|
|
1529
|
-
for (let i = 0; i < defs.length; i++)
|
|
1530
|
+
for (let i = 0; i < defs.length; i++) builtInDirectContextExecutors.add(defs[i].execute);
|
|
1530
1531
|
}
|
|
1531
1532
|
return defs;
|
|
1532
1533
|
}
|
|
1533
1534
|
function csvkitCommands(options = {}) {
|
|
1534
|
-
const
|
|
1535
|
+
const commands2 = createCsvkitCommands(options);
|
|
1535
1536
|
const replace = options.replace ?? false;
|
|
1536
1537
|
return {
|
|
1537
1538
|
name: "csvkit-commands",
|
|
1538
1539
|
setup(host) {
|
|
1539
1540
|
if (!replace) {
|
|
1540
|
-
for (const command of
|
|
1541
|
+
for (const command of commands2) {
|
|
1541
1542
|
const existing = host.commands.get(command.name);
|
|
1542
1543
|
if (existing && !(command.fallback && !existing.fallback)) {
|
|
1543
1544
|
throw new Error(`Command already registered: ${command.name}`);
|
|
1544
1545
|
}
|
|
1545
1546
|
}
|
|
1546
1547
|
}
|
|
1547
|
-
for (const command of
|
|
1548
|
+
for (const command of commands2) {
|
|
1548
1549
|
host.commands.register(command, { replace });
|
|
1549
1550
|
}
|
|
1550
1551
|
}
|
|
1551
1552
|
};
|
|
1552
1553
|
}
|
|
1553
1554
|
export {
|
|
1555
|
+
CsvkitBlocked,
|
|
1556
|
+
CsvkitCleanupError,
|
|
1557
|
+
CsvkitDiagnostic,
|
|
1558
|
+
Decimal2 as Decimal,
|
|
1559
|
+
DecimalTrap,
|
|
1560
|
+
DictionaryWriter,
|
|
1561
|
+
LazyInput,
|
|
1562
|
+
OwnedArguments,
|
|
1563
|
+
POSSIBLE_DELIMITERS2 as POSSIBLE_DELIMITERS,
|
|
1564
|
+
PythonException,
|
|
1565
|
+
Runtime,
|
|
1566
|
+
SqlTuple,
|
|
1567
|
+
WorkbookInput,
|
|
1568
|
+
Writer,
|
|
1569
|
+
castValue,
|
|
1570
|
+
columnTypeOrder,
|
|
1571
|
+
commands,
|
|
1572
|
+
compileCreateTable,
|
|
1573
|
+
createCsvkitCommand,
|
|
1554
1574
|
createCsvkitCommands,
|
|
1575
|
+
createCsvpyInterpreter,
|
|
1576
|
+
createDatabaseProvider,
|
|
1577
|
+
createGzipCompressionProvider,
|
|
1578
|
+
createMemorySqliteFileSystem,
|
|
1579
|
+
createSqlTransportProvider,
|
|
1580
|
+
createSqliteDatabaseProvider,
|
|
1555
1581
|
csvkitCommands,
|
|
1582
|
+
databaseDialects,
|
|
1583
|
+
defaultHeaders2 as defaultHeaders,
|
|
1584
|
+
defaultLimits,
|
|
1585
|
+
defaultSniffStreamProfile,
|
|
1586
|
+
deriveSchema,
|
|
1587
|
+
diagnosticReport,
|
|
1556
1588
|
evalSyncCsvformat,
|
|
1557
1589
|
evalSyncCsvjoin,
|
|
1558
1590
|
evalSyncCsvjson,
|
|
@@ -1560,5 +1592,27 @@ export {
|
|
|
1560
1592
|
evalSyncCsvsort,
|
|
1561
1593
|
evalSyncCsvstack,
|
|
1562
1594
|
evalSyncCsvstat,
|
|
1563
|
-
evalSyncIn2csv
|
|
1595
|
+
evalSyncIn2csv,
|
|
1596
|
+
execute,
|
|
1597
|
+
inferTable2 as inferTable,
|
|
1598
|
+
matchColumnIdentifier2 as matchColumnIdentifier,
|
|
1599
|
+
normalizeEncoding,
|
|
1600
|
+
parseArguments,
|
|
1601
|
+
parseColumnIdentifiers2 as parseColumnIdentifiers,
|
|
1602
|
+
parseDatabaseUrl,
|
|
1603
|
+
pythonCodecs,
|
|
1604
|
+
pythonValueText2 as pythonValueText,
|
|
1605
|
+
readCsv2 as readCsv,
|
|
1606
|
+
readCsvStream,
|
|
1607
|
+
resolveDatabaseProvider,
|
|
1608
|
+
run,
|
|
1609
|
+
sniff2 as sniff,
|
|
1610
|
+
sqlIdentifier,
|
|
1611
|
+
sqlOptions,
|
|
1612
|
+
sqlSchemaIdentifier,
|
|
1613
|
+
sqlTransportProfiles,
|
|
1614
|
+
utf8Codec,
|
|
1615
|
+
virtualPath,
|
|
1616
|
+
warningText,
|
|
1617
|
+
writeCsvRow2 as writeCsvRow
|
|
1564
1618
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
builtInDirectContextExecutors,
|
|
3
|
+
syncCommandEvaluators
|
|
4
|
+
} from "./chunk-5OST7NOX.js";
|
|
4
5
|
import {
|
|
5
6
|
init_platform
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-I3KSESCR.js";
|
|
7
8
|
|
|
8
9
|
// packages/safe-bash/src/commands/ffmpeg/index.ts
|
|
9
10
|
init_platform();
|
|
@@ -14,20 +15,20 @@ import {
|
|
|
14
15
|
evalSyncFfmpeg,
|
|
15
16
|
evalSyncFfprobe
|
|
16
17
|
} from "../../safe-bash-command-ffmpeg/index.js";
|
|
17
|
-
|
|
18
|
+
import { MediaBudgetTracker, MediaLimitExceededError, allMediaAsts, cloudflareWorkerLimits, dashAst, ffmetadataAst, hlsAst, parseFfmpegTimestamp, srtAst, webvttAst } from "../../safe-bash-command-ffmpeg/index.js";
|
|
18
19
|
function createFfmpegCommand(options = {}) {
|
|
19
20
|
const def = createRawFfmpegCommand(options);
|
|
20
|
-
|
|
21
|
+
builtInDirectContextExecutors.add(def.execute);
|
|
21
22
|
return def;
|
|
22
23
|
}
|
|
23
24
|
function createFfprobeCommand(options = {}) {
|
|
24
25
|
const def = createRawFfprobeCommand(options);
|
|
25
|
-
|
|
26
|
+
builtInDirectContextExecutors.add(def.execute);
|
|
26
27
|
return def;
|
|
27
28
|
}
|
|
28
29
|
function createFfmpegCommands(options = {}) {
|
|
29
30
|
const pair = createRawFfmpegCommands(options);
|
|
30
|
-
for (let i = 0; i < pair.length; i++)
|
|
31
|
+
for (let i = 0; i < pair.length; i++) builtInDirectContextExecutors.add(pair[i].execute);
|
|
31
32
|
return pair;
|
|
32
33
|
}
|
|
33
34
|
function ffmpegCommands(options = {}) {
|
|
@@ -48,13 +49,23 @@ function ffmpegCommands(options = {}) {
|
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
syncCommandEvaluators.evalSyncFfmpeg = evalSyncFfmpeg;
|
|
53
|
+
syncCommandEvaluators.evalSyncFfprobe = evalSyncFfprobe;
|
|
53
54
|
export {
|
|
55
|
+
MediaBudgetTracker,
|
|
56
|
+
MediaLimitExceededError,
|
|
57
|
+
allMediaAsts,
|
|
58
|
+
cloudflareWorkerLimits,
|
|
54
59
|
createFfmpegCommand,
|
|
55
60
|
createFfmpegCommands,
|
|
56
61
|
createFfprobeCommand,
|
|
62
|
+
dashAst,
|
|
57
63
|
evalSyncFfmpeg,
|
|
58
64
|
evalSyncFfprobe,
|
|
59
|
-
|
|
65
|
+
ffmetadataAst,
|
|
66
|
+
ffmpegCommands,
|
|
67
|
+
hlsAst,
|
|
68
|
+
parseFfmpegTimestamp,
|
|
69
|
+
srtAst,
|
|
70
|
+
webvttAst
|
|
60
71
|
};
|