@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,53 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type LlmOption = string | number | boolean | null;
|
|
3
|
-
export type LlmCapability = "messages" | "schema" | "embed";
|
|
4
|
-
export interface LlmResponseMetadata {
|
|
5
|
-
readonly usage?: Readonly<Record<string, unknown>>;
|
|
6
|
-
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
7
|
-
}
|
|
8
|
-
export interface LlmProvider {
|
|
9
|
-
readonly name: string;
|
|
10
|
-
readonly models: readonly LlmModel[];
|
|
11
|
-
complete(request: LlmRequest): AsyncIterable<string | Uint8Array, LlmResponseMetadata | void>;
|
|
12
|
-
embed?(request: LlmEmbeddingRequest): Promise<LlmEmbeddingResponse>;
|
|
13
|
-
}
|
|
14
|
-
export interface LlmModel {
|
|
15
|
-
readonly id: string;
|
|
16
|
-
readonly aliases?: readonly string[];
|
|
17
|
-
readonly attachmentTypes?: readonly string[];
|
|
18
|
-
readonly outputType?: string;
|
|
19
|
-
readonly capabilities?: readonly LlmCapability[];
|
|
20
|
-
}
|
|
21
|
-
export interface LlmEmbeddingRequest {
|
|
22
|
-
readonly model: string;
|
|
23
|
-
readonly inputs: readonly string[];
|
|
24
|
-
readonly options: Readonly<Record<string, LlmOption>>;
|
|
25
|
-
readonly signal: AbortSignal;
|
|
26
|
-
}
|
|
27
|
-
export interface LlmEmbeddingResponse extends LlmResponseMetadata {
|
|
28
|
-
readonly model: string;
|
|
29
|
-
readonly vectors: readonly (readonly number[])[];
|
|
30
|
-
}
|
|
31
|
-
export interface LlmRequest {
|
|
32
|
-
model: string;
|
|
33
|
-
prompt: string;
|
|
34
|
-
system?: string;
|
|
35
|
-
messages?: readonly {
|
|
36
|
-
readonly role: "system" | "user" | "assistant";
|
|
37
|
-
readonly content: string;
|
|
38
|
-
}[];
|
|
39
|
-
schema?: Readonly<Record<string, unknown>>;
|
|
40
|
-
attachments: readonly {
|
|
41
|
-
mimeType: string;
|
|
42
|
-
bytes: Uint8Array;
|
|
43
|
-
}[];
|
|
44
|
-
options: Readonly<Record<string, LlmOption>>;
|
|
45
|
-
signal: AbortSignal;
|
|
46
|
-
}
|
|
47
|
-
export interface LlmCommandsOptions {
|
|
48
|
-
readonly providers?: readonly LlmProvider[];
|
|
49
|
-
readonly service?: LlmService;
|
|
50
|
-
readonly defaultModel?: string;
|
|
51
|
-
readonly replace?: boolean;
|
|
52
|
-
}
|
|
1
|
+
export * from "../../../safe-bash-command-llm/types.js";
|
|
53
2
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "../../../safe-bash-command-llm/types.js";
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
mdqCommand,
|
|
8
8
|
mdqCommands,
|
|
9
9
|
parseMdqArguments
|
|
10
|
-
} from "../../chunks/chunk-
|
|
11
|
-
import "../../chunks/chunk-
|
|
12
|
-
import "../../chunks/chunk-
|
|
10
|
+
} from "../../chunks/chunk-YYAERCWS.js";
|
|
11
|
+
import "../../chunks/chunk-5OST7NOX.js";
|
|
12
|
+
import "../../chunks/chunk-I3KSESCR.js";
|
|
13
13
|
export {
|
|
14
14
|
MdqError,
|
|
15
15
|
createMdqCommand,
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
evalSyncCurl,
|
|
13
13
|
evalSyncWget,
|
|
14
14
|
networkCommands
|
|
15
|
-
} from "../../chunks/chunk-
|
|
16
|
-
import "../../chunks/chunk-
|
|
17
|
-
import "../../chunks/chunk-
|
|
18
|
-
import "../../chunks/chunk-
|
|
19
|
-
import "../../chunks/chunk-
|
|
20
|
-
import "../../chunks/chunk-
|
|
21
|
-
import "../../chunks/chunk-
|
|
22
|
-
import "../../chunks/chunk-
|
|
23
|
-
import "../../chunks/chunk-
|
|
15
|
+
} from "../../chunks/chunk-QTIH2AFE.js";
|
|
16
|
+
import "../../chunks/chunk-VCCMROTL.js";
|
|
17
|
+
import "../../chunks/chunk-W47GHRRF.js";
|
|
18
|
+
import "../../chunks/chunk-OYB332PQ.js";
|
|
19
|
+
import "../../chunks/chunk-DYEUZE6Z.js";
|
|
20
|
+
import "../../chunks/chunk-UZU5BIJI.js";
|
|
21
|
+
import "../../chunks/chunk-OSMQCYSP.js";
|
|
22
|
+
import "../../chunks/chunk-5OST7NOX.js";
|
|
23
|
+
import "../../chunks/chunk-I3KSESCR.js";
|
|
24
24
|
export {
|
|
25
25
|
CurlError,
|
|
26
26
|
cloudflareWorkerNetworkLimits,
|
|
@@ -1,43 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type HttpHeaders
|
|
3
|
-
export interface HttpRequest {
|
|
4
|
-
/** Explicit VFS PEM trust for this request; replaces transport-default CAs. */
|
|
5
|
-
readonly ca?: Uint8Array;
|
|
6
|
-
readonly httpVersion?: "1.0" | "1.1";
|
|
7
|
-
/** Read until EOF rather than using Content-Length; host transport must opt in. */
|
|
8
|
-
readonly ignoreContentLength?: true;
|
|
9
|
-
/** Validated HTTP(S) origin with curl request-target spelling; transports must preserve it. */
|
|
10
|
-
readonly url: string;
|
|
11
|
-
readonly method: string;
|
|
12
|
-
readonly headers: HttpHeaders;
|
|
13
|
-
readonly body?: ByteSource;
|
|
14
|
-
/** Consumer body intent, independent of method. Omitted means "read".
|
|
15
|
-
* "omit" permits an empty body; "omit-on-http-error" permits it only for
|
|
16
|
-
* status >= 400. Neither changes the HTTP request or response status/headers. */
|
|
17
|
-
readonly responseBodyMode?: "omit" | "omit-on-http-error" | "read";
|
|
18
|
-
readonly signal: AbortSignal;
|
|
19
|
-
/** Deadline for DNS, TCP and TLS setup only; absent means no separate connection deadline. */
|
|
20
|
-
readonly connectTimeoutMs?: number;
|
|
21
|
-
readonly registerCleanup?: (cleanup: InvocationCleanup) => void;
|
|
22
|
-
readonly denyPrivateNetworks?: true;
|
|
23
|
-
}
|
|
24
|
-
export interface HttpResponse {
|
|
25
|
-
readonly status: number;
|
|
26
|
-
readonly statusText: string;
|
|
27
|
-
readonly headers: HttpHeaders;
|
|
28
|
-
readonly httpVersion?: string;
|
|
29
|
-
readonly body: ByteSource;
|
|
30
|
-
/** True when the host already decoded Content-Encoding; encoded length is then unavailable. */
|
|
31
|
-
readonly contentDecoded?: boolean;
|
|
32
|
-
dispose(): Promise<void>;
|
|
33
|
-
}
|
|
34
|
-
export type HttpTransport = ((request: HttpRequest) => Promise<HttpResponse>) & {
|
|
35
|
-
readonly supportsRequestCa?: true;
|
|
36
|
-
readonly supportedHttpVersions?: readonly ("1.0" | "1.1")[];
|
|
37
|
-
readonly supportsIgnoreContentLength?: true;
|
|
38
|
-
readonly supportsPrivateNetworkDeny?: true;
|
|
39
|
-
readonly supportsConnectTimeout?: true;
|
|
40
|
-
};
|
|
1
|
+
import type { HttpTransport } from "../../../safe-bash-contracts/http.js";
|
|
2
|
+
export type { HttpHeaders, HttpRequest, HttpResponse, HttpTransport } from "../../../safe-bash-contracts/http.js";
|
|
41
3
|
export interface NetworkAuthorization {
|
|
42
4
|
/** Validated HTTP(S) origin with curl request-target spelling; transports must preserve it. */
|
|
43
5
|
readonly url: string;
|
|
@@ -2,14 +2,12 @@ import {
|
|
|
2
2
|
createSafeJsNodeCommand,
|
|
3
3
|
createSafeJsNodeCommands,
|
|
4
4
|
safeJsNodeCommands
|
|
5
|
-
} from "../../chunks/chunk-
|
|
6
|
-
import "../../chunks/chunk-
|
|
7
|
-
import "../../chunks/chunk-
|
|
8
|
-
import "../../chunks/chunk-
|
|
9
|
-
import "../../chunks/chunk-
|
|
10
|
-
import "../../chunks/chunk-
|
|
11
|
-
import "../../chunks/chunk-GJWUEOT6.js";
|
|
12
|
-
import "../../chunks/chunk-Q45QCA4J.js";
|
|
5
|
+
} from "../../chunks/chunk-SBESXWT2.js";
|
|
6
|
+
import "../../chunks/chunk-W47GHRRF.js";
|
|
7
|
+
import "../../chunks/chunk-UZU5BIJI.js";
|
|
8
|
+
import "../../chunks/chunk-OSMQCYSP.js";
|
|
9
|
+
import "../../chunks/chunk-5OST7NOX.js";
|
|
10
|
+
import "../../chunks/chunk-I3KSESCR.js";
|
|
13
11
|
export {
|
|
14
12
|
createSafeJsNodeCommand as createNodeCommand,
|
|
15
13
|
createSafeJsNodeCommands as createNodeCommands,
|
|
@@ -19,9 +19,9 @@ import {
|
|
|
19
19
|
restoreEnvironment,
|
|
20
20
|
selectOpBackendContext,
|
|
21
21
|
selectOpGlobalFlags
|
|
22
|
-
} from "../../chunks/chunk-
|
|
23
|
-
import "../../chunks/chunk-
|
|
24
|
-
import "../../chunks/chunk-
|
|
22
|
+
} from "../../chunks/chunk-ZPGVEUKF.js";
|
|
23
|
+
import "../../chunks/chunk-5OST7NOX.js";
|
|
24
|
+
import "../../chunks/chunk-I3KSESCR.js";
|
|
25
25
|
export {
|
|
26
26
|
captureEnvironment,
|
|
27
27
|
createDocumentHandlers,
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
|
|
15
1
|
// packages/safe-bash/src/commands/internal.ts
|
|
16
|
-
|
|
17
|
-
__reExport(internal_exports, internal_star);
|
|
18
|
-
import * as internal_star from "../../../safe-bash-io-engine/internal.js";
|
|
2
|
+
import { RESOLVED_EXIT_ONE, RESOLVED_EXIT_ZERO, RETURN_EXIT_ONE, RETURN_EXIT_TWO, RETURN_EXIT_ZERO, UsageError, assertInputRequirements, bufferLimit, builtInDirectContextExecutors, codeOf, collect, concatenate, decoder, define, diagnostic, eachOperand, emptyInput, encoder, escapeBytes, evalSyncCat, evalSyncCp, evalSyncHeadTail, evalSyncLn, evalSyncMkdir, evalSyncMv, evalSyncRm, evalSyncRmdir, evalSyncSleep, evalSyncTee, evalSyncTouch, evalSyncWc, input, integer, isDefaultCommandOptions, lines, options, output, outputRange, pathOf, registerDefaultExecutor, registerDefaultExecutors, replaceArgument, requireOperands, syncCommandEvaluators, value } from "../../../safe-bash-io-engine/internal.js";
|
|
19
3
|
|
|
20
4
|
// packages/safe-bash/src/commands/op/index.ts
|
|
21
5
|
import {
|
|
@@ -23,7 +7,7 @@ import {
|
|
|
23
7
|
createOpCommands as createRawOpCommands,
|
|
24
8
|
evalSyncOp
|
|
25
9
|
} from "../../../safe-bash-command-op/index.js";
|
|
26
|
-
|
|
10
|
+
import {} from "../../../safe-bash-command-op/index.js";
|
|
27
11
|
import {
|
|
28
12
|
captureEnvironment,
|
|
29
13
|
createDocumentHandlers,
|
|
@@ -42,26 +26,26 @@ import {
|
|
|
42
26
|
selectOpBackendContext,
|
|
43
27
|
selectOpGlobalFlags
|
|
44
28
|
} from "../../../safe-bash-command-op/index.js";
|
|
45
|
-
function createOpCommand(
|
|
46
|
-
const def = createRawOpCommand(
|
|
47
|
-
|
|
29
|
+
function createOpCommand(options2 = {}) {
|
|
30
|
+
const def = createRawOpCommand(options2);
|
|
31
|
+
builtInDirectContextExecutors.add(def.execute);
|
|
48
32
|
return def;
|
|
49
33
|
}
|
|
50
|
-
function createOpCommands(
|
|
51
|
-
const defs = createRawOpCommands(
|
|
52
|
-
for (let i = 0; i < defs.length; i++)
|
|
34
|
+
function createOpCommands(options2 = {}) {
|
|
35
|
+
const defs = createRawOpCommands(options2);
|
|
36
|
+
for (let i = 0; i < defs.length; i++) builtInDirectContextExecutors.add(defs[i].execute);
|
|
53
37
|
return defs;
|
|
54
38
|
}
|
|
55
|
-
function opCommands(
|
|
56
|
-
const commands = createOpCommands(
|
|
39
|
+
function opCommands(options2 = {}) {
|
|
40
|
+
const commands = createOpCommands(options2);
|
|
57
41
|
return {
|
|
58
42
|
name: "op-commands",
|
|
59
43
|
setup(host) {
|
|
60
|
-
for (const command of commands) host.commands.register(command, { replace:
|
|
44
|
+
for (const command of commands) host.commands.register(command, { replace: options2.replace ?? false });
|
|
61
45
|
}
|
|
62
46
|
};
|
|
63
47
|
}
|
|
64
|
-
|
|
48
|
+
syncCommandEvaluators.evalSyncOp = evalSyncOp;
|
|
65
49
|
export {
|
|
66
50
|
captureEnvironment,
|
|
67
51
|
createDocumentHandlers,
|
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
execute(request: {
|
|
4
|
-
readonly args: readonly Uint8Array[];
|
|
5
|
-
readonly signal: AbortSignal;
|
|
6
|
-
readonly readInput: (path: string, maxBytes: number) => Promise<Uint8Array>;
|
|
7
|
-
readonly publishOutput?: (publication: {
|
|
8
|
-
readonly inputPath?: string;
|
|
9
|
-
readonly protectedInputPaths?: readonly string[];
|
|
10
|
-
readonly outputPath: string;
|
|
11
|
-
readonly bytes: Uint8Array;
|
|
12
|
-
readonly originalBytes: Uint8Array;
|
|
13
|
-
readonly inPlace: boolean;
|
|
14
|
-
readonly force: boolean;
|
|
15
|
-
readonly dryRun: boolean;
|
|
16
|
-
}) => Promise<void>;
|
|
17
|
-
}): Promise<{
|
|
18
|
-
readonly exitCode: number;
|
|
19
|
-
readonly stdout: Uint8Array;
|
|
20
|
-
readonly stderr: Uint8Array;
|
|
21
|
-
}>;
|
|
22
|
-
}
|
|
23
|
-
export interface PptxCommandsOptions {
|
|
24
|
-
readonly engine: PptxCommandEngine;
|
|
25
|
-
readonly replace?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare function createPptxCommands(options: PptxCommandsOptions): readonly CommandDefinition[];
|
|
28
|
-
export declare function pptxCommands(options: PptxCommandsOptions): VirtualShellPlugin;
|
|
1
|
+
export * from "../../../safe-bash-command-pptx/index.js";
|
|
2
|
+
export { createPptxCommand, createPptxCommands, pptxCommands } from "../../../safe-bash-command-pptx/index.js";
|
|
29
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,153 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { compareObservedEntries } from "../copy-identity.js";
|
|
4
|
-
import { pathOf } from "../internal.js";
|
|
5
|
-
import { inputRequirements } from "../portable-requirements.js";
|
|
6
|
-
export function createPptxCommands(options) {
|
|
7
|
-
if (!options?.engine || typeof options.engine.execute !== "function")
|
|
8
|
-
throw new TypeError("An explicit pptx command engine is required.");
|
|
9
|
-
if (options.replace !== undefined && typeof options.replace !== "boolean")
|
|
10
|
-
throw new TypeError("pptx replace must be boolean");
|
|
11
|
-
const engine = options.engine;
|
|
12
|
-
return [{ name: "pptx", filesystemRequirements: inputRequirements, async execute(context) {
|
|
13
|
-
const arguments_ = getCommandArguments(context);
|
|
14
|
-
const snapshots = new Map();
|
|
15
|
-
const result = await engine.execute({
|
|
16
|
-
args: arguments_.args.map((_, index) => arguments_.bytes(index)),
|
|
17
|
-
signal: context.signal,
|
|
18
|
-
async readInput(path, maxBytes) {
|
|
19
|
-
try {
|
|
20
|
-
context.signal.throwIfAborted();
|
|
21
|
-
if (path === "-")
|
|
22
|
-
return await collectBytes(context.stdin, { maxBytes, signal: context.signal });
|
|
23
|
-
const resolved = pathOf(context, path);
|
|
24
|
-
if (!snapshots.has(resolved)) {
|
|
25
|
-
try {
|
|
26
|
-
snapshots.set(resolved, await context.fs.lstat(resolved, { signal: context.signal }));
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
context.signal.throwIfAborted();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
const capabilities = await context.fs.capabilitiesFor?.(resolved, { signal: context.signal }) ?? context.fs.capabilities;
|
|
33
|
-
context.signal.throwIfAborted();
|
|
34
|
-
if (context.fs.readStream && capabilities.streamingRead !== false) {
|
|
35
|
-
let emitted = false;
|
|
36
|
-
try {
|
|
37
|
-
const stream = context.fs.readStream(resolved, { signal: context.signal });
|
|
38
|
-
return await collectBytes((async function* () {
|
|
39
|
-
for await (const chunk of stream) {
|
|
40
|
-
if (chunk.byteLength)
|
|
41
|
-
emitted = true;
|
|
42
|
-
yield chunk;
|
|
43
|
-
}
|
|
44
|
-
})(), { maxBytes, signal: context.signal });
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
context.signal.throwIfAborted();
|
|
48
|
-
if (emitted || !(error instanceof FsError) || error.code !== "ENOTSUP")
|
|
49
|
-
throw error;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (capabilities.read === false)
|
|
53
|
-
throw new FsError("ENOTSUP");
|
|
54
|
-
const bytes = await context.fs.readFile(resolved, { maxBytes, signal: context.signal });
|
|
55
|
-
context.signal.throwIfAborted();
|
|
56
|
-
if (bytes.byteLength > maxBytes)
|
|
57
|
-
throw new FsError("EFBIG");
|
|
58
|
-
return bytes;
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
context.signal.throwIfAborted();
|
|
62
|
-
throw Object.assign(new Error("Input could not be read."), { code: error instanceof FsError && error.code === "EFBIG" ? "resource-limit" : "io-failure" });
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
async publishOutput(publication) {
|
|
66
|
-
try {
|
|
67
|
-
const { fs, signal } = context;
|
|
68
|
-
signal.throwIfAborted();
|
|
69
|
-
const input = publication.inputPath === undefined || publication.inputPath === "-" ? undefined : pathOf(context, publication.inputPath);
|
|
70
|
-
const output = pathOf(context, publication.outputPath);
|
|
71
|
-
if (publication.inPlace ? !input || input !== output : input === output)
|
|
72
|
-
throw new FsError("EINVAL");
|
|
73
|
-
const capabilities = await fs.capabilitiesFor?.(output, { signal }) ?? fs.capabilities;
|
|
74
|
-
signal.throwIfAborted();
|
|
75
|
-
if (capabilities.readOnly === true || capabilities.write === false || !capabilities.atomicFileMutation || !fs.writeFileConditional)
|
|
76
|
-
throw new FsError("ENOTSUP");
|
|
77
|
-
let destination;
|
|
78
|
-
try {
|
|
79
|
-
destination = await fs.lstat(output, { signal });
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
signal.throwIfAborted();
|
|
83
|
-
if (!(error instanceof FsError) || error.code !== "ENOENT")
|
|
84
|
-
throw error;
|
|
85
|
-
destination = null;
|
|
86
|
-
}
|
|
87
|
-
if (destination && destination.type !== "file")
|
|
88
|
-
throw new FsError("EINVAL");
|
|
89
|
-
if (destination) {
|
|
90
|
-
const protectedInputs = new Set((publication.protectedInputPaths ?? []).filter(path => path !== "-").map(path => pathOf(context, path)));
|
|
91
|
-
for (const [source, observed] of snapshots) {
|
|
92
|
-
if (source === input && !protectedInputs.has(source))
|
|
93
|
-
continue;
|
|
94
|
-
const identity = observed.type === "symlink" ? await fs.stat(source, { signal }) : observed;
|
|
95
|
-
if (source === output || await compareObservedEntries(fs, source, identity, fs, output, destination, { signal }) !== "distinct")
|
|
96
|
-
throw new FsError("EINVAL");
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (destination && !publication.inPlace) {
|
|
100
|
-
if (!publication.force)
|
|
101
|
-
throw new FsError("EEXIST");
|
|
102
|
-
if (input && await compareObservedEntries(fs, input, await fs.stat(input, { signal }), fs, output, destination, { signal }) !== "distinct")
|
|
103
|
-
throw new FsError("EINVAL");
|
|
104
|
-
}
|
|
105
|
-
const parentPath = output.slice(0, output.lastIndexOf("/")) || "/";
|
|
106
|
-
const parent = await fs.stat(parentPath, { signal });
|
|
107
|
-
if (parent.type !== "directory")
|
|
108
|
-
throw new FsError("ENOTDIR");
|
|
109
|
-
if (publication.inPlace) {
|
|
110
|
-
const original = snapshots.get(input);
|
|
111
|
-
if (!original || original.type !== "file" || !destination || original.revision === undefined
|
|
112
|
-
|| original.revision !== destination.revision || original.size !== destination.size
|
|
113
|
-
|| original.mode !== destination.mode || original.nlink !== destination.nlink
|
|
114
|
-
|| original.mtimeMs !== destination.mtimeMs || original.ctimeMs !== destination.ctimeMs
|
|
115
|
-
|| await compareObservedEntries(fs, input, original, fs, output, destination, { signal }) !== "same")
|
|
116
|
-
throw new FsError("EAGAIN");
|
|
117
|
-
const current = await fs.readFile(input, { maxBytes: publication.originalBytes.length, signal });
|
|
118
|
-
if (current.length !== publication.originalBytes.length || current.some((byte, index) => byte !== publication.originalBytes[index]))
|
|
119
|
-
throw new FsError("EAGAIN");
|
|
120
|
-
destination = original;
|
|
121
|
-
}
|
|
122
|
-
signal.throwIfAborted();
|
|
123
|
-
if (!publication.dryRun)
|
|
124
|
-
await writeFileOutput(context, publication.bytes, async (bytes) => {
|
|
125
|
-
await fs.writeFileConditional(output, bytes, { parent, expected: destination, signal });
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
catch (error) {
|
|
129
|
-
context.signal.throwIfAborted();
|
|
130
|
-
const code = error instanceof FsError && error.code === "EAGAIN" ? "stale-input"
|
|
131
|
-
: error instanceof FsError && error.code === "ENOTSUP" ? "publication-unsupported" : "io-failure";
|
|
132
|
-
throw Object.assign(new Error("Output could not be published."), { code });
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
if (result.stdout.length)
|
|
137
|
-
await writeBytes(context.stdout, result.stdout, context.signal);
|
|
138
|
-
if (result.stderr.length)
|
|
139
|
-
await writeBytes(context.stderr, result.stderr, context.signal);
|
|
140
|
-
return { exitCode: result.exitCode };
|
|
141
|
-
} }];
|
|
142
|
-
}
|
|
143
|
-
export function pptxCommands(options) {
|
|
144
|
-
const commands = createPptxCommands(options);
|
|
145
|
-
const replace = options.replace ?? false;
|
|
146
|
-
return { name: "pptx-commands", setup(host) {
|
|
147
|
-
if (!replace && host.commands.has("pptx"))
|
|
148
|
-
throw new Error("Command already registered: pptx");
|
|
149
|
-
for (const command of commands)
|
|
150
|
-
host.commands.register(command, { replace });
|
|
151
|
-
} };
|
|
152
|
-
}
|
|
1
|
+
export * from "../../../safe-bash-command-pptx/index.js";
|
|
2
|
+
export { createPptxCommand, createPptxCommands, pptxCommands } from "../../../safe-bash-command-pptx/index.js";
|
|
153
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
createPrCommands,
|
|
4
4
|
evalSyncPr,
|
|
5
5
|
prCommands
|
|
6
|
-
} from "../../chunks/chunk-
|
|
7
|
-
import "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-FM3WBSZT.js";
|
|
7
|
+
import "../../chunks/chunk-I3KSESCR.js";
|
|
8
8
|
export {
|
|
9
9
|
createPrCommand,
|
|
10
10
|
createPrCommands,
|
|
@@ -1,18 +1,36 @@
|
|
|
1
|
-
// Parse C
|
|
1
|
+
// Parse the C numeric prefix while retaining trailing-input diagnostics.
|
|
2
2
|
export function parsePrintfFloat(operand) {
|
|
3
|
-
|
|
3
|
+
let start = 0;
|
|
4
|
+
while (start < operand.length && " \t\n\r\v\f".includes(operand[start]))
|
|
5
|
+
start++;
|
|
6
|
+
let end = operand.length;
|
|
7
|
+
while (end > start && " \t\n\r\v\f".includes(operand[end - 1]))
|
|
8
|
+
end--;
|
|
9
|
+
const token = operand.slice(start, end).toLowerCase();
|
|
4
10
|
if (token.length > 4096)
|
|
5
11
|
return undefined;
|
|
6
12
|
const negative = token.startsWith("-");
|
|
7
13
|
const magnitude = token.startsWith("+") || negative ? token.slice(1) : token;
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
const converted = (value, end, special) => ({
|
|
15
|
+
value, ...(special === undefined ? {} : { special }), ...(end < magnitude.length || operand.length > start + token.length ? { error: "invalid number" } : {}),
|
|
16
|
+
});
|
|
17
|
+
if (magnitude.startsWith("inf")) {
|
|
18
|
+
return converted(negative ? -Infinity : Infinity, magnitude.startsWith("infinity") ? 8 : 3, (negative ? "-" : "") + "inf");
|
|
12
19
|
}
|
|
13
|
-
if (
|
|
14
|
-
let
|
|
15
|
-
|
|
20
|
+
if (magnitude.startsWith("nan")) {
|
|
21
|
+
let end = 3;
|
|
22
|
+
if (magnitude[end] === "(") {
|
|
23
|
+
let offset = end + 1;
|
|
24
|
+
while (offset < magnitude.length && "abcdefghijklmnopqrstuvwxyz0123456789_".includes(magnitude[offset]))
|
|
25
|
+
offset++;
|
|
26
|
+
if (magnitude[offset] === ")")
|
|
27
|
+
end = offset + 1;
|
|
28
|
+
}
|
|
29
|
+
return converted(NaN, end, (negative ? "-" : "") + "nan");
|
|
30
|
+
}
|
|
31
|
+
const hexadecimal = magnitude.startsWith("0x") && ("0123456789abcdef".includes(magnitude[2] ?? "!") || magnitude[2] === "." && "0123456789abcdef".includes(magnitude[3] ?? "!"));
|
|
32
|
+
if (!hexadecimal) {
|
|
33
|
+
let offset = 0, digits = 0;
|
|
16
34
|
while (offset < magnitude.length && "0123456789".includes(magnitude[offset])) {
|
|
17
35
|
offset++;
|
|
18
36
|
digits++;
|
|
@@ -27,64 +45,56 @@ export function parsePrintfFloat(operand) {
|
|
|
27
45
|
if (!digits)
|
|
28
46
|
return undefined;
|
|
29
47
|
if (magnitude[offset] === "e") {
|
|
30
|
-
offset++;
|
|
48
|
+
const exponentStart = offset++;
|
|
31
49
|
if (magnitude[offset] === "+" || magnitude[offset] === "-")
|
|
32
50
|
offset++;
|
|
33
|
-
const
|
|
51
|
+
const firstDigit = offset;
|
|
34
52
|
while (offset < magnitude.length && "0123456789".includes(magnitude[offset]))
|
|
35
53
|
offset++;
|
|
36
|
-
if (offset ===
|
|
37
|
-
|
|
54
|
+
if (offset === firstDigit)
|
|
55
|
+
offset = exponentStart;
|
|
38
56
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const value = Number(operand);
|
|
42
|
-
return Number.isFinite(value) ? { value } : undefined;
|
|
57
|
+
const value = Number((negative ? "-" : "") + magnitude.slice(0, offset));
|
|
58
|
+
return Number.isFinite(value) ? converted(value, offset) : undefined;
|
|
43
59
|
}
|
|
44
|
-
let offset = 2;
|
|
45
|
-
let digits = "";
|
|
46
|
-
let fractionDigits = 0;
|
|
47
|
-
let point = false;
|
|
60
|
+
let offset = 2, digits = "", fractionDigits = 0, point = false;
|
|
48
61
|
while (offset < magnitude.length) {
|
|
49
|
-
const
|
|
50
|
-
if ("0123456789abcdef".includes(
|
|
51
|
-
digits +=
|
|
62
|
+
const character = magnitude[offset];
|
|
63
|
+
if ("0123456789abcdef".includes(character)) {
|
|
64
|
+
digits += character;
|
|
52
65
|
if (point)
|
|
53
66
|
fractionDigits++;
|
|
54
67
|
}
|
|
55
|
-
else if (
|
|
68
|
+
else if (character === "." && !point)
|
|
56
69
|
point = true;
|
|
57
70
|
else
|
|
58
71
|
break;
|
|
59
72
|
offset++;
|
|
60
73
|
}
|
|
61
|
-
if (!digits)
|
|
62
|
-
return undefined;
|
|
63
74
|
let exponent = 0;
|
|
64
|
-
if (offset
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const start = offset;
|
|
75
|
+
if (magnitude[offset] === "p") {
|
|
76
|
+
const exponentStart = offset++;
|
|
77
|
+
const numberStart = offset;
|
|
68
78
|
if (magnitude[offset] === "+" || magnitude[offset] === "-")
|
|
69
79
|
offset++;
|
|
70
80
|
const firstDigit = offset;
|
|
71
81
|
while (offset < magnitude.length && "0123456789".includes(magnitude[offset]))
|
|
72
82
|
offset++;
|
|
73
|
-
if (offset === firstDigit
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
if (offset === firstDigit)
|
|
84
|
+
offset = exponentStart;
|
|
85
|
+
else
|
|
86
|
+
exponent = Number(magnitude.slice(numberStart, offset));
|
|
76
87
|
}
|
|
77
88
|
const significand = BigInt("0x" + digits);
|
|
78
89
|
if (significand === 0n)
|
|
79
|
-
return
|
|
90
|
+
return converted(negative ? -0 : 0, offset);
|
|
80
91
|
const bits = significand.toString(2).length;
|
|
81
92
|
const scale = exponent - fractionDigits * 4;
|
|
82
93
|
const top = bits - 1 + scale;
|
|
83
94
|
if (top > 1023)
|
|
84
95
|
return undefined;
|
|
85
96
|
if (top < -1075)
|
|
86
|
-
return
|
|
87
|
-
// Round once to binary64, including the fixed subnormal quantum.
|
|
97
|
+
return converted(negative ? -0 : 0, offset);
|
|
88
98
|
const shift = Math.max(bits - 53, -1074 - scale);
|
|
89
99
|
let rounded = significand;
|
|
90
100
|
if (shift > 0) {
|
|
@@ -95,6 +105,6 @@ export function parsePrintfFloat(operand) {
|
|
|
95
105
|
rounded++;
|
|
96
106
|
}
|
|
97
107
|
const value = Number(rounded) * 2 ** (scale + Math.max(0, shift)) * (negative ? -1 : 1);
|
|
98
|
-
return Number.isFinite(value) ?
|
|
108
|
+
return Number.isFinite(value) ? converted(value, offset) : undefined;
|
|
99
109
|
}
|
|
100
110
|
//# sourceMappingURL=printf-float.js.map
|
|
@@ -37,14 +37,17 @@ export async function parsePrintfDirective(format, start, signal) {
|
|
|
37
37
|
offset++;
|
|
38
38
|
precision = await field();
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
let wide = false;
|
|
41
|
+
for (let modifier = character(); modifier && "hlLjzt".includes(modifier); modifier = character()) {
|
|
42
|
+
wide ||= modifier === "l";
|
|
42
43
|
offset++;
|
|
43
|
-
if ((
|
|
44
|
-
|
|
44
|
+
if ((offset - start) % 1024 === 0)
|
|
45
|
+
await yieldTurn(signal);
|
|
45
46
|
}
|
|
46
|
-
|
|
47
|
-
if (
|
|
47
|
+
let specifier = character();
|
|
48
|
+
if (wide && (specifier === "s" || specifier === "c"))
|
|
49
|
+
specifier = specifier.toUpperCase();
|
|
50
|
+
if (!specifier || !"sbqQcCSdiouxXfFeEgGaA".includes(specifier)) {
|
|
48
51
|
const end = start + 64;
|
|
49
52
|
const preview = typeof format === "string" ? format.slice(start, end) : decoder.decode(format.subarray(start, end));
|
|
50
53
|
throw new UsageError(`invalid format near '${preview}${format.length > end ? "..." : ""}'`);
|