@poe-platform/safe-bash 0.1.629 → 0.1.631
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 +2 -2
- package/dist/office-package/compression.d.ts +19 -0
- package/dist/office-package/compression.js +186 -0
- package/dist/office-package/runtime.d.ts +11 -0
- package/dist/office-package/runtime.js +28 -0
- package/dist/safe-bash/chunks/{bz2-B2RXT4EX.js → bz2-ACU4EOVE.js} +2 -2
- package/dist/safe-bash/chunks/chunk-2E4KBFO6.js +239 -0
- package/dist/safe-bash/chunks/chunk-2E4KBFO6.js.map +7 -0
- package/dist/safe-bash/chunks/chunk-3E5M2WEL.js +33 -0
- package/dist/safe-bash/chunks/chunk-3E5M2WEL.js.map +7 -0
- package/dist/safe-bash/chunks/{chunk-WPEMUXV4.js → chunk-3LD67SER.js} +12 -10
- package/dist/safe-bash/chunks/{chunk-WPEMUXV4.js.map → chunk-3LD67SER.js.map} +1 -1
- package/dist/safe-bash/chunks/{chunk-6LSSEOG7.js → chunk-6HNK7Q66.js} +11 -7
- package/dist/safe-bash/chunks/{chunk-6LSSEOG7.js.map → chunk-6HNK7Q66.js.map} +1 -1
- package/dist/safe-bash/chunks/{chunk-AD7UAP5B.js → chunk-7EEWZY5S.js} +10 -8
- package/dist/safe-bash/chunks/{chunk-AD7UAP5B.js.map → chunk-7EEWZY5S.js.map} +1 -1
- package/dist/safe-bash/chunks/{chunk-RNKTWFEM.js → chunk-CDBQXRWL.js} +3 -3
- package/dist/safe-bash/chunks/{chunk-UYX72YHY.js → chunk-CHHAB5SS.js} +10 -74
- package/dist/safe-bash/chunks/{chunk-UYX72YHY.js.map → chunk-CHHAB5SS.js.map} +3 -3
- package/dist/safe-bash/chunks/{chunk-KYNRHYHP.js → chunk-EI4X5ETX.js} +15 -13
- package/dist/safe-bash/chunks/{chunk-KYNRHYHP.js.map → chunk-EI4X5ETX.js.map} +1 -1
- package/dist/safe-bash/chunks/{chunk-KZ7QCYNT.js → chunk-GIBLUW2U.js} +13 -9
- package/dist/safe-bash/chunks/{chunk-KZ7QCYNT.js.map → chunk-GIBLUW2U.js.map} +1 -1
- package/dist/safe-bash/chunks/chunk-GPV7ZFYS.js +1528 -0
- package/dist/safe-bash/chunks/chunk-GPV7ZFYS.js.map +7 -0
- package/dist/safe-bash/chunks/{chunk-N5CYTGBN.js → chunk-H3E67KTZ.js} +13 -9
- package/dist/safe-bash/chunks/{chunk-N5CYTGBN.js.map → chunk-H3E67KTZ.js.map} +1 -1
- package/dist/safe-bash/chunks/{chunk-AFH57PPL.js → chunk-IEKESMO4.js} +3 -3
- package/dist/safe-bash/chunks/{chunk-DPJWEGIX.js → chunk-JLBIUYT3.js} +2 -2
- package/dist/safe-bash/chunks/chunk-JZDO5MC3.js +77 -0
- package/dist/safe-bash/chunks/chunk-JZDO5MC3.js.map +7 -0
- package/dist/safe-bash/chunks/{chunk-GFZKQIPL.js → chunk-LA6BX562.js} +8 -6
- package/dist/safe-bash/chunks/{chunk-GFZKQIPL.js.map → chunk-LA6BX562.js.map} +1 -1
- package/dist/safe-bash/chunks/{chunk-PVJJFCGA.js → chunk-M3GPCYSP.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-FWDMJTQO.js → chunk-NDCZ3UBP.js} +13 -9
- package/dist/safe-bash/chunks/{chunk-FWDMJTQO.js.map → chunk-NDCZ3UBP.js.map} +1 -1
- package/dist/safe-bash/chunks/{chunk-2KL6W6NB.js → chunk-O2EVBRKF.js} +1 -2
- package/dist/safe-bash/chunks/chunk-OFT77XIB.js +389 -0
- package/dist/safe-bash/chunks/chunk-OFT77XIB.js.map +7 -0
- package/dist/safe-bash/chunks/{chunk-PCLOK32J.js → chunk-PC6BEIAF.js} +13 -9
- package/dist/safe-bash/chunks/{chunk-PCLOK32J.js.map → chunk-PC6BEIAF.js.map} +1 -1
- package/dist/safe-bash/chunks/{chunk-3M5F7LD5.js → chunk-QWKP7ZU7.js} +13 -9
- package/dist/safe-bash/chunks/{chunk-3M5F7LD5.js.map → chunk-QWKP7ZU7.js.map} +1 -1
- package/dist/safe-bash/chunks/chunk-THXJ6CLF.js +53 -0
- package/dist/safe-bash/chunks/chunk-THXJ6CLF.js.map +7 -0
- package/dist/safe-bash/chunks/{chunk-HHJSJWUD.js → chunk-V73A742N.js} +57 -15
- package/dist/safe-bash/chunks/chunk-V73A742N.js.map +7 -0
- package/dist/safe-bash/chunks/{chunk-4BYUV5PA.js → chunk-VN3ZGME3.js} +12 -8
- package/dist/safe-bash/chunks/{chunk-4BYUV5PA.js.map → chunk-VN3ZGME3.js.map} +1 -1
- package/dist/safe-bash/chunks/chunk-WECHUK3Y.js +4285 -0
- package/dist/safe-bash/chunks/chunk-WECHUK3Y.js.map +7 -0
- package/dist/safe-bash/chunks/{chunk-X55AMTNM.js → chunk-WIOEUR7D.js} +14 -10
- package/dist/safe-bash/chunks/{chunk-X55AMTNM.js.map → chunk-WIOEUR7D.js.map} +1 -1
- package/dist/safe-bash/chunks/chunk-WPIOO4NX.js +443 -0
- package/dist/safe-bash/chunks/chunk-WPIOO4NX.js.map +7 -0
- package/dist/safe-bash/chunks/{chunk-C7QNJ3D4.js → chunk-WYTI64IU.js} +2 -2
- package/dist/safe-bash/chunks/{xz-AVXFDXW4.js → xz-U4QDTPZL.js} +2 -2
- package/dist/safe-bash/chunks/{zstd-R6RPHJYO.js → zstd-OG5RPYXO.js} +2 -2
- package/dist/safe-bash/commands/archive/zip/crc.d.ts +2 -0
- package/dist/safe-bash/commands/archive/zip/crc.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/crc.js +7 -0
- package/dist/safe-bash/commands/archive/zip/crc.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/crypto.d.ts +4 -0
- package/dist/safe-bash/commands/archive/zip/crypto.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/crypto.js +34 -0
- package/dist/safe-bash/commands/archive/zip/crypto.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/help.d.ts +3 -0
- package/dist/safe-bash/commands/archive/zip/help.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/help.js +87 -0
- package/dist/safe-bash/commands/archive/zip/help.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/move.d.ts +12 -0
- package/dist/safe-bash/commands/archive/zip/move.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/zip/move.js +60 -0
- package/dist/safe-bash/commands/archive/zip/move.js.map +1 -0
- package/dist/safe-bash/commands/archive/zip/options.js +5 -5
- package/dist/safe-bash/commands/archive/zip/options.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip-format.d.ts +1 -1
- package/dist/safe-bash/commands/archive/zip-format.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip-format.js +14 -17
- package/dist/safe-bash/commands/archive/zip-format.js.map +1 -1
- package/dist/safe-bash/commands/archive/zip.d.ts.map +1 -1
- package/dist/safe-bash/commands/archive/zip.js +45 -15
- package/dist/safe-bash/commands/archive/zip.js.map +1 -1
- package/dist/safe-bash/commands/bytes/compression/bounded-codec.d.ts +2 -0
- package/dist/safe-bash/commands/bytes/compression/bounded-codec.d.ts.map +1 -1
- package/dist/safe-bash/commands/bytes/compression/bounded-codec.js +4 -0
- package/dist/safe-bash/commands/bytes/compression/bounded-codec.js.map +1 -1
- package/dist/safe-bash/commands/bytes/compression/codec.d.ts +4 -24
- package/dist/safe-bash/commands/bytes/compression/codec.d.ts.map +1 -1
- package/dist/safe-bash/commands/bytes/compression/codec.js +12 -168
- package/dist/safe-bash/commands/bytes/compression/codec.js.map +1 -1
- package/dist/safe-bash/commands/cmp.js +1 -1
- package/dist/safe-bash/commands/cmp.js.map +1 -1
- package/dist/safe-bash/commands/csplit/index.browser.js +10 -7
- package/dist/safe-bash/commands/docx/index.browser.js +54 -0
- package/dist/safe-bash/commands/docx/index.browser.js.map +7 -0
- package/dist/safe-bash/commands/docx/index.d.ts +25 -0
- package/dist/safe-bash/commands/docx/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/docx/index.js +42 -0
- package/dist/safe-bash/commands/docx/index.js.map +1 -0
- package/dist/safe-bash/commands/docx/io.d.ts +15 -0
- package/dist/safe-bash/commands/docx/io.d.ts.map +1 -0
- package/dist/safe-bash/commands/docx/io.js +16 -0
- package/dist/safe-bash/commands/docx/io.js.map +1 -0
- package/dist/safe-bash/commands/factor/index.browser.js +7 -5
- package/dist/safe-bash/commands/filesystem.d.ts.map +1 -1
- package/dist/safe-bash/commands/filesystem.js +9 -1
- package/dist/safe-bash/commands/filesystem.js.map +1 -1
- package/dist/safe-bash/commands/getopt/index.browser.js +7 -5
- package/dist/safe-bash/commands/hexdump/index.browser.js +8 -6
- package/dist/safe-bash/commands/iconv/index.browser.js +8 -6
- package/dist/safe-bash/commands/line-endings/index.browser.js +10 -7
- package/dist/safe-bash/commands/llm/index.browser.js +10 -8
- package/dist/safe-bash/commands/llm/providers/index.browser.js +3 -3
- package/dist/safe-bash/commands/network/index.browser.js +11 -8
- package/dist/safe-bash/commands/node/browser.d.ts +2 -0
- package/dist/safe-bash/commands/node/browser.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/browser.js +2 -0
- package/dist/safe-bash/commands/node/browser.js.map +1 -0
- package/dist/safe-bash/commands/node/index.browser.js +18 -0
- package/dist/safe-bash/commands/node/index.browser.js.map +7 -0
- package/dist/safe-bash/commands/node/safejs.d.ts +6 -0
- package/dist/safe-bash/commands/node/safejs.d.ts.map +1 -1
- package/dist/safe-bash/commands/node/safejs.js +25 -1
- package/dist/safe-bash/commands/node/safejs.js.map +1 -1
- package/dist/safe-bash/commands/op/index.browser.js +3 -3
- package/dist/safe-bash/commands/op/index.js +0 -1
- package/dist/safe-bash/commands/op/index.js.map +2 -2
- package/dist/safe-bash/commands/pptx/index.d.ts +29 -0
- package/dist/safe-bash/commands/pptx/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/pptx/index.js +153 -0
- package/dist/safe-bash/commands/pptx/index.js.map +1 -0
- package/dist/safe-bash/commands/pr/index.browser.js +8 -6
- package/dist/safe-bash/commands/predicates.js +1 -1
- package/dist/safe-bash/commands/python/execution.d.ts +3 -0
- package/dist/safe-bash/commands/python/execution.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/execution.js +193 -0
- package/dist/safe-bash/commands/python/execution.js.map +1 -0
- package/dist/safe-bash/commands/python/index.browser.js +21 -0
- package/dist/safe-bash/commands/python/index.browser.js.map +7 -0
- package/dist/safe-bash/commands/python/index.d.ts +49 -0
- package/dist/safe-bash/commands/python/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/index.js +317 -0
- package/dist/safe-bash/commands/python/index.js.map +1 -0
- package/dist/safe-bash/commands/python/installation.d.ts +9 -0
- package/dist/safe-bash/commands/python/installation.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/installation.js +80 -0
- package/dist/safe-bash/commands/python/installation.js.map +1 -0
- package/dist/safe-bash/commands/python/invocation.d.ts +10 -0
- package/dist/safe-bash/commands/python/invocation.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/invocation.js +81 -0
- package/dist/safe-bash/commands/python/invocation.js.map +1 -0
- package/dist/safe-bash/commands/python/node.d.ts +12 -0
- package/dist/safe-bash/commands/python/node.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/node.js +33 -0
- package/dist/safe-bash/commands/python/node.js.map +1 -0
- package/dist/safe-bash/commands/python/provisioning-runtime.d.ts +5 -0
- package/dist/safe-bash/commands/python/provisioning-runtime.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/provisioning-runtime.js +179 -0
- package/dist/safe-bash/commands/python/provisioning-runtime.js.map +1 -0
- package/dist/safe-bash/commands/python/provisioning.d.ts +49 -0
- package/dist/safe-bash/commands/python/provisioning.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/provisioning.js +320 -0
- package/dist/safe-bash/commands/python/provisioning.js.map +1 -0
- package/dist/safe-bash/commands/python/reply.d.ts +3 -0
- package/dist/safe-bash/commands/python/reply.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/reply.js +103 -0
- package/dist/safe-bash/commands/python/reply.js.map +1 -0
- package/dist/safe-bash/commands/python/worker.browser.js +736 -0
- package/dist/safe-bash/commands/python/worker.browser.js.map +7 -0
- package/dist/safe-bash/commands/python/worker.d.ts +47 -0
- package/dist/safe-bash/commands/python/worker.d.ts.map +1 -0
- package/dist/safe-bash/commands/python/worker.js +373 -0
- package/dist/safe-bash/commands/python/worker.js.map +1 -0
- package/dist/safe-bash/commands/safejs/index.d.ts +5 -17
- package/dist/safe-bash/commands/safejs/index.d.ts.map +1 -1
- package/dist/safe-bash/commands/safejs/index.js +3 -202
- package/dist/safe-bash/commands/safejs/index.js.map +1 -1
- package/dist/safe-bash/commands/safejs/runtime.d.ts +15 -0
- package/dist/safe-bash/commands/safejs/runtime.d.ts.map +1 -0
- package/dist/safe-bash/commands/safejs/runtime.js +190 -0
- package/dist/safe-bash/commands/safejs/runtime.js.map +1 -0
- package/dist/safe-bash/commands/tsort/index.browser.js +8 -6
- package/dist/safe-bash/commands/xml/index.browser.js +9 -7
- package/dist/safe-bash/commands/yq/index.browser.js +10 -8
- package/dist/safe-bash/commands/yq/index.d.ts.map +1 -1
- package/dist/safe-bash/commands/yq/index.js +32 -4
- package/dist/safe-bash/commands/yq/index.js.map +1 -1
- package/dist/safe-bash/commands/yq/parser.d.ts.map +1 -1
- package/dist/safe-bash/commands/yq/parser.js +21 -5
- package/dist/safe-bash/commands/yq/parser.js.map +1 -1
- package/dist/safe-bash/contracts/command.d.ts +2 -0
- package/dist/safe-bash/contracts/command.d.ts.map +1 -1
- package/dist/safe-bash/contracts/command.js +6 -2
- package/dist/safe-bash/contracts/command.js.map +1 -1
- package/dist/safe-bash/contracts/filesystem-descriptor.d.ts +13 -0
- package/dist/safe-bash/contracts/filesystem-descriptor.d.ts.map +1 -0
- package/dist/safe-bash/contracts/filesystem-descriptor.js +189 -0
- package/dist/safe-bash/contracts/filesystem-descriptor.js.map +1 -0
- package/dist/safe-bash/contracts/filesystem-output-budget.d.ts +15 -0
- package/dist/safe-bash/contracts/filesystem-output-budget.d.ts.map +1 -0
- package/dist/safe-bash/contracts/filesystem-output-budget.js +69 -0
- package/dist/safe-bash/contracts/filesystem-output-budget.js.map +1 -0
- package/dist/safe-bash/contracts/filesystem-output.d.ts +11 -5
- package/dist/safe-bash/contracts/filesystem-output.d.ts.map +1 -1
- package/dist/safe-bash/contracts/filesystem-output.js +229 -20
- package/dist/safe-bash/contracts/filesystem-output.js.map +1 -1
- package/dist/safe-bash/contracts/io.d.ts +29 -0
- package/dist/safe-bash/contracts/io.d.ts.map +1 -1
- package/dist/safe-bash/contracts/io.js +317 -37
- package/dist/safe-bash/contracts/io.js.map +1 -1
- package/dist/safe-bash/core.browser.js +5963 -6522
- package/dist/safe-bash/core.browser.js.map +4 -4
- package/dist/safe-bash/core.d.ts +2 -0
- package/dist/safe-bash/core.d.ts.map +1 -1
- package/dist/safe-bash/core.js +2 -0
- package/dist/safe-bash/core.js.map +1 -1
- package/dist/safe-bash/index.d.ts +1 -0
- package/dist/safe-bash/index.d.ts.map +1 -1
- package/dist/safe-bash/index.js +1 -0
- package/dist/safe-bash/index.js.map +1 -1
- package/dist/safe-bash/opt-in/commands/cmp/compare.js +95 -0
- package/dist/safe-bash/opt-in/commands/cmp/index.d.ts +6 -0
- package/dist/safe-bash/opt-in/commands/cmp/index.js +99 -0
- package/dist/safe-bash/opt-in/commands/cmp/io.js +218 -0
- package/dist/safe-bash/opt-in/commands/cmp/options.d.ts +24 -0
- package/dist/safe-bash/opt-in/commands/cmp/options.js +195 -0
- package/dist/safe-bash/opt-in/commands/dd/conversions.js +152 -0
- package/dist/safe-bash/opt-in/commands/dd/index.d.ts +18 -0
- package/dist/safe-bash/opt-in/commands/dd/index.js +561 -0
- package/dist/safe-bash/opt-in/commands/dd/io.d.ts +31 -0
- package/dist/safe-bash/opt-in/commands/dd/io.js +244 -0
- package/dist/safe-bash/opt-in/commands/dd/options.js +184 -0
- package/dist/safe-bash/opt-in/commands/dd/report.js +69 -0
- package/dist/safe-bash/opt-in/commands/install/arguments.js +224 -0
- package/dist/safe-bash/opt-in/commands/install/index.d.ts +6 -0
- package/dist/safe-bash/opt-in/commands/install/index.js +678 -0
- package/dist/safe-bash/opt-in/commands/install/mode.js +71 -0
- package/dist/safe-bash/opt-in/commands/install/options.d.ts +36 -0
- package/dist/safe-bash/opt-in/commands/install/options.js +27 -0
- package/dist/safe-bash/opt-in/commands/shuf/args.js +179 -0
- package/dist/safe-bash/opt-in/commands/shuf/index.d.ts +6 -0
- package/dist/safe-bash/opt-in/commands/shuf/index.js +20 -0
- package/dist/safe-bash/opt-in/commands/shuf/input.js +93 -0
- package/dist/safe-bash/opt-in/commands/shuf/options.d.ts +9 -0
- package/dist/safe-bash/opt-in/commands/shuf/options.js +8 -0
- package/dist/safe-bash/opt-in/commands/shuf/random.js +114 -0
- package/dist/safe-bash/opt-in/commands/shuf/shuf.d.ts +3 -0
- package/dist/safe-bash/opt-in/commands/shuf/shuf.js +230 -0
- package/dist/safe-bash/opt-in/commands/shuf/usage.js +24 -0
- package/dist/safe-bash/opt-in/commands/truncate/arguments.js +186 -0
- package/dist/safe-bash/opt-in/commands/truncate/index.d.ts +9 -0
- package/dist/safe-bash/opt-in/commands/truncate/index.js +244 -0
- package/dist/safe-bash/opt-in/commands/yes/index.d.ts +11 -0
- package/dist/safe-bash/opt-in/commands/yes/index.js +167 -0
- package/dist/safe-bash/opt-in/commands/yq/arguments.js +177 -0
- package/dist/safe-bash/opt-in/commands/yq/evaluate.js +564 -0
- package/dist/safe-bash/opt-in/commands/yq/expression.js +183 -0
- package/dist/safe-bash/opt-in/commands/yq/inplace.js +65 -0
- package/dist/safe-bash/opt-in/commands/yq/mike.d.ts +9 -0
- package/dist/safe-bash/opt-in/commands/yq/mike.js +192 -0
- package/dist/safe-bash/opt-in/commands/yq/native-encoder.js +165 -0
- package/dist/safe-bash/opt-in/commands/yq/native-work.d.ts +44 -0
- package/dist/safe-bash/opt-in/commands/yq/native-work.js +188 -0
- package/dist/safe-bash/opt-in/commands/yq/nodes.js +621 -0
- package/dist/safe-bash/opt-in/entrypoints/arrays.d.ts +1 -0
- package/dist/safe-bash/opt-in/entrypoints/arrays.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/cmp.d.ts +2 -0
- package/dist/safe-bash/opt-in/entrypoints/cmp.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/dd.d.ts +2 -0
- package/dist/safe-bash/opt-in/entrypoints/dd.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/devices.d.ts +2 -0
- package/dist/safe-bash/opt-in/entrypoints/devices.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/install.d.ts +2 -0
- package/dist/safe-bash/opt-in/entrypoints/install.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/jobs.d.ts +1 -0
- package/dist/safe-bash/opt-in/entrypoints/jobs.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/mapfile.d.ts +1 -0
- package/dist/safe-bash/opt-in/entrypoints/mapfile.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/read.d.ts +2 -0
- package/dist/safe-bash/opt-in/entrypoints/read.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/shuf.d.ts +2 -0
- package/dist/safe-bash/opt-in/entrypoints/shuf.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/trap.d.ts +2 -0
- package/dist/safe-bash/opt-in/entrypoints/trap.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/truncate.d.ts +2 -0
- package/dist/safe-bash/opt-in/entrypoints/truncate.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/yes.d.ts +2 -0
- package/dist/safe-bash/opt-in/entrypoints/yes.js +1 -0
- package/dist/safe-bash/opt-in/entrypoints/yq.d.ts +3 -0
- package/dist/safe-bash/opt-in/entrypoints/yq.js +1 -0
- package/dist/safe-bash/opt-in/fs/devices/index.d.ts +8 -0
- package/dist/safe-bash/opt-in/fs/devices/index.js +292 -0
- package/dist/safe-bash/opt-in/optional.d.ts +28 -0
- package/dist/safe-bash/opt-in/optional.js +14 -0
- package/dist/safe-bash/opt-in/shell/extensions/arrays/index.d.ts +2 -0
- package/dist/safe-bash/opt-in/shell/extensions/arrays/index.js +4 -0
- package/dist/safe-bash/opt-in/shell/extensions/jobs/index.d.ts +2 -0
- package/dist/safe-bash/opt-in/shell/extensions/jobs/index.js +291 -0
- package/dist/safe-bash/opt-in/shell/extensions/jobs/state.js +374 -0
- package/dist/safe-bash/opt-in/shell/extensions/mapfile/index.d.ts +24 -0
- package/dist/safe-bash/opt-in/shell/extensions/mapfile/index.js +338 -0
- package/dist/safe-bash/opt-in/shell/extensions/read/index.d.ts +5 -0
- package/dist/safe-bash/opt-in/shell/extensions/read/index.js +351 -0
- package/dist/safe-bash/opt-in/shell/extensions/trap/index.d.ts +9 -0
- package/dist/safe-bash/opt-in/shell/extensions/trap/index.js +210 -0
- package/dist/safe-bash/optional-host.d.ts +5 -0
- package/dist/safe-bash/optional-host.d.ts.map +1 -0
- package/dist/safe-bash/optional-host.js +3 -0
- package/dist/safe-bash/optional-host.js.map +1 -0
- package/dist/safe-bash/shell/arrays/bindings.d.ts +15 -5
- package/dist/safe-bash/shell/arrays/bindings.d.ts.map +1 -1
- package/dist/safe-bash/shell/arrays/bindings.js +131 -23
- package/dist/safe-bash/shell/arrays/bindings.js.map +1 -1
- package/dist/safe-bash/shell/arrays/ledger.d.ts +1 -0
- package/dist/safe-bash/shell/arrays/ledger.d.ts.map +1 -1
- package/dist/safe-bash/shell/arrays/ledger.js +19 -0
- package/dist/safe-bash/shell/arrays/ledger.js.map +1 -1
- package/dist/safe-bash/shell/arrays/state.d.ts.map +1 -1
- package/dist/safe-bash/shell/arrays/state.js +3 -1
- package/dist/safe-bash/shell/arrays/state.js.map +1 -1
- package/dist/safe-bash/shell/arrays/syntax.d.ts +4 -1
- package/dist/safe-bash/shell/arrays/syntax.d.ts.map +1 -1
- package/dist/safe-bash/shell/arrays/syntax.js +3 -3
- package/dist/safe-bash/shell/arrays/syntax.js.map +1 -1
- package/dist/safe-bash/shell/conditional.js +1 -1
- package/dist/safe-bash/shell/descriptors.d.ts +31 -0
- package/dist/safe-bash/shell/descriptors.d.ts.map +1 -0
- package/dist/safe-bash/shell/descriptors.js +234 -0
- package/dist/safe-bash/shell/descriptors.js.map +1 -0
- package/dist/safe-bash/shell/diagnostic-name-ranges.d.ts +2 -0
- package/dist/safe-bash/shell/diagnostic-name-ranges.d.ts.map +1 -0
- package/dist/safe-bash/shell/diagnostic-name-ranges.js +717 -0
- package/dist/safe-bash/shell/diagnostic-name-ranges.js.map +1 -0
- package/dist/safe-bash/shell/diagnostic-name.d.ts +3 -0
- package/dist/safe-bash/shell/diagnostic-name.d.ts.map +1 -0
- package/dist/safe-bash/shell/diagnostic-name.js +89 -0
- package/dist/safe-bash/shell/diagnostic-name.js.map +1 -0
- package/dist/safe-bash/shell/display.js +1 -1
- package/dist/safe-bash/shell/display.js.map +1 -1
- package/dist/safe-bash/shell/extensions.d.ts +188 -0
- package/dist/safe-bash/shell/extensions.d.ts.map +1 -0
- package/dist/safe-bash/shell/extensions.js +141 -0
- package/dist/safe-bash/shell/extensions.js.map +1 -0
- package/dist/safe-bash/shell/input.d.ts +66 -14
- package/dist/safe-bash/shell/input.d.ts.map +1 -1
- package/dist/safe-bash/shell/input.js +947 -173
- package/dist/safe-bash/shell/input.js.map +1 -1
- package/dist/safe-bash/shell/parser.d.ts +38 -6
- package/dist/safe-bash/shell/parser.d.ts.map +1 -1
- package/dist/safe-bash/shell/parser.js +339 -52
- package/dist/safe-bash/shell/parser.js.map +1 -1
- package/dist/safe-bash/shell/runtime.d.ts +92 -20
- package/dist/safe-bash/shell/runtime.d.ts.map +1 -1
- package/dist/safe-bash/shell/runtime.js +2547 -689
- package/dist/safe-bash/shell/runtime.js.map +1 -1
- package/dist/safe-bash/shell/shell.d.ts.map +1 -1
- package/dist/safe-bash/shell/shell.js +52 -21
- package/dist/safe-bash/shell/shell.js.map +1 -1
- package/dist/safe-bash/shell/types.d.ts +4 -0
- package/dist/safe-bash/shell/types.d.ts.map +1 -1
- package/dist/safe-bash/shell/types.js.map +1 -1
- package/package.json +99 -5
- package/dist/safe-bash/chunks/chunk-4DBWBEU7.js +0 -194
- package/dist/safe-bash/chunks/chunk-4DBWBEU7.js.map +0 -7
- package/dist/safe-bash/chunks/chunk-CXMIIXJA.js +0 -178
- package/dist/safe-bash/chunks/chunk-CXMIIXJA.js.map +0 -7
- package/dist/safe-bash/chunks/chunk-HHJSJWUD.js.map +0 -7
- /package/dist/safe-bash/chunks/{bz2-B2RXT4EX.js.map → bz2-ACU4EOVE.js.map} +0 -0
- /package/dist/safe-bash/chunks/{chunk-RNKTWFEM.js.map → chunk-CDBQXRWL.js.map} +0 -0
- /package/dist/safe-bash/chunks/{chunk-AFH57PPL.js.map → chunk-IEKESMO4.js.map} +0 -0
- /package/dist/safe-bash/chunks/{chunk-DPJWEGIX.js.map → chunk-JLBIUYT3.js.map} +0 -0
- /package/dist/safe-bash/chunks/{chunk-PVJJFCGA.js.map → chunk-M3GPCYSP.js.map} +0 -0
- /package/dist/safe-bash/chunks/{chunk-2KL6W6NB.js.map → chunk-O2EVBRKF.js.map} +0 -0
- /package/dist/safe-bash/chunks/{chunk-C7QNJ3D4.js.map → chunk-WYTI64IU.js.map} +0 -0
- /package/dist/safe-bash/chunks/{xz-AVXFDXW4.js.map → xz-U4QDTPZL.js.map} +0 -0
- /package/dist/safe-bash/chunks/{zstd-R6RPHJYO.js.map → zstd-OG5RPYXO.js.map} +0 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { getCommandArguments } from "@poe-platform/safe-bash/contracts/command";
|
|
2
|
+
import { InstallError, quote } from "./options.js";
|
|
3
|
+
export async function parseArguments(context, options, warn) {
|
|
4
|
+
const result = { files: [], directory: false, parents: false, compare: false, preserve: false, strip: false,
|
|
5
|
+
stripProgram: "strip", stripProgramSpecified: false, verbose: false, debug: false, noTarget: false, backup: "none", suffix: context.env.SIMPLE_BACKUP_SUFFIX || "~" };
|
|
6
|
+
const longOptions = { backup: "b", compare: "C", context: "Z", debug: "debug", directory: "d", group: "g", mode: "m", "no-target-directory": "T", owner: "o", "preserve-timestamps": "p", "preserve-context": "preserve-context", strip: "s", "strip-program": "strip-program", suffix: "S", "target-directory": "t", verbose: "v", help: "help", version: "version" };
|
|
7
|
+
const supplied = getCommandArguments(context), args = supplied.args;
|
|
8
|
+
let ended = false, makeBackups = false, control;
|
|
9
|
+
let preserveContext = false, setContext = false;
|
|
10
|
+
for (let index = 0; index < args.length; index++) {
|
|
11
|
+
const argument = args[index];
|
|
12
|
+
const argumentIndex = index;
|
|
13
|
+
if (ended || argument === "-" || !argument.startsWith("-")) {
|
|
14
|
+
result.files.push(argument);
|
|
15
|
+
if (Object.hasOwn(context.env, "POSIXLY_CORRECT"))
|
|
16
|
+
ended = true;
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
if (argument === "--") {
|
|
20
|
+
ended = true;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const long = argument.startsWith("--"), equals = argument.indexOf("=");
|
|
24
|
+
let name = argument.slice(2, equals < 0 ? undefined : equals), keys = argument.slice(1);
|
|
25
|
+
if (long) {
|
|
26
|
+
const matches = Object.keys(longOptions).filter(option => option.startsWith(name));
|
|
27
|
+
if (!matches.length)
|
|
28
|
+
throw new InstallError(`unrecognized option '${argument}'`, true);
|
|
29
|
+
if (!Object.hasOwn(longOptions, name) && matches.length > 1)
|
|
30
|
+
throw new InstallError(`option '${argument}' is ambiguous; possibilities: ${matches.map(option => `'--${option}'`).join(" ")}`, true);
|
|
31
|
+
name = Object.hasOwn(longOptions, name) ? name : matches[0];
|
|
32
|
+
keys = longOptions[name];
|
|
33
|
+
}
|
|
34
|
+
const tokens = long ? [keys] : Array.from(keys);
|
|
35
|
+
for (let offset = 0; offset < tokens.length; offset++) {
|
|
36
|
+
const key = tokens[offset];
|
|
37
|
+
if (!long && !"bcCsDdg:m:o:pt:TvS:Z".includes(key) || key === ":")
|
|
38
|
+
throw new InstallError(`invalid option -- '${key}'`, true);
|
|
39
|
+
const required = ["g", "m", "o", "t", "S", "strip-program"].includes(key), optional = long && (key === "b" || key === "Z");
|
|
40
|
+
if (long && equals >= 0 && !required && !optional)
|
|
41
|
+
throw new InstallError(`option '--${name}' doesn't allow an argument`, true);
|
|
42
|
+
let value;
|
|
43
|
+
if (required) {
|
|
44
|
+
value = long ? equals >= 0 ? argument.slice(equals + 1) : args[++index] : keys.slice(offset + 1) || args[++index];
|
|
45
|
+
if (value === undefined)
|
|
46
|
+
throw new InstallError(long ? `option '--${name}' requires an argument` : `option requires an argument -- '${key}'`, true);
|
|
47
|
+
}
|
|
48
|
+
else if (optional && equals >= 0)
|
|
49
|
+
value = argument.slice(equals + 1);
|
|
50
|
+
switch (key) {
|
|
51
|
+
case "help":
|
|
52
|
+
case "version":
|
|
53
|
+
result.display = key;
|
|
54
|
+
return result;
|
|
55
|
+
case "b":
|
|
56
|
+
makeBackups = true;
|
|
57
|
+
if (value !== undefined)
|
|
58
|
+
control = value;
|
|
59
|
+
break;
|
|
60
|
+
case "c": break;
|
|
61
|
+
case "C":
|
|
62
|
+
result.compare = true;
|
|
63
|
+
break;
|
|
64
|
+
case "d":
|
|
65
|
+
result.directory = true;
|
|
66
|
+
break;
|
|
67
|
+
case "D":
|
|
68
|
+
result.parents = true;
|
|
69
|
+
break;
|
|
70
|
+
case "p":
|
|
71
|
+
result.preserve = true;
|
|
72
|
+
break;
|
|
73
|
+
case "s":
|
|
74
|
+
result.strip = true;
|
|
75
|
+
break;
|
|
76
|
+
case "v":
|
|
77
|
+
result.verbose = true;
|
|
78
|
+
break;
|
|
79
|
+
case "debug":
|
|
80
|
+
result.debug = result.verbose = true;
|
|
81
|
+
break;
|
|
82
|
+
case "T":
|
|
83
|
+
result.noTarget = true;
|
|
84
|
+
break;
|
|
85
|
+
case "t":
|
|
86
|
+
if (result.target !== undefined)
|
|
87
|
+
throw new InstallError("multiple target directories specified");
|
|
88
|
+
result.target = value;
|
|
89
|
+
break;
|
|
90
|
+
case "g":
|
|
91
|
+
result.group = value;
|
|
92
|
+
break;
|
|
93
|
+
case "o":
|
|
94
|
+
result.owner = value;
|
|
95
|
+
break;
|
|
96
|
+
case "m": {
|
|
97
|
+
result.mode = value;
|
|
98
|
+
const attached = long ? equals >= 0 : keys.slice(offset + 1).length > 0;
|
|
99
|
+
const bytes = supplied.bytes(attached ? argumentIndex : index);
|
|
100
|
+
result.modeBytes = attached ? bytes.slice(long ? equals + 1 : offset + 2) : bytes;
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
case "S":
|
|
104
|
+
makeBackups = true;
|
|
105
|
+
result.suffix = value;
|
|
106
|
+
break;
|
|
107
|
+
case "strip-program":
|
|
108
|
+
result.stripProgram = value;
|
|
109
|
+
result.stripProgramSpecified = true;
|
|
110
|
+
break;
|
|
111
|
+
case "Z":
|
|
112
|
+
if (options.securityContext?.enabled === false) {
|
|
113
|
+
if (value !== undefined)
|
|
114
|
+
await warn("warning: ignoring --context; it requires an SELinux-enabled kernel");
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
setContext = true;
|
|
118
|
+
result.contextMode = value === undefined ? "default" : "explicit";
|
|
119
|
+
if (value !== undefined)
|
|
120
|
+
result.contextLabel = value;
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
case "preserve-context":
|
|
124
|
+
if (options.securityContext?.enabled === false)
|
|
125
|
+
await warn("WARNING: ignoring --preserve-context; this kernel is not SELinux-enabled");
|
|
126
|
+
else {
|
|
127
|
+
preserveContext = true;
|
|
128
|
+
result.contextMode = "preserve";
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
if (required)
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (result.directory && result.strip)
|
|
137
|
+
throw new InstallError("the strip option may not be used when installing a directory");
|
|
138
|
+
if (result.directory && result.target !== undefined)
|
|
139
|
+
throw new InstallError("target directory not allowed when installing a directory");
|
|
140
|
+
if (!result.suffix || result.suffix.includes("/"))
|
|
141
|
+
result.suffix = "~";
|
|
142
|
+
if (makeBackups) {
|
|
143
|
+
const aliases = { none: "none", off: "none", simple: "simple", never: "simple", existing: "existing", nil: "existing", numbered: "numbered", t: "numbered" };
|
|
144
|
+
const requested = control || context.env.VERSION_CONTROL || "existing";
|
|
145
|
+
const matches = Object.keys(aliases).filter(alias => alias.startsWith(requested));
|
|
146
|
+
if (Object.hasOwn(aliases, requested))
|
|
147
|
+
result.backup = aliases[requested];
|
|
148
|
+
else if (matches.length && new Set(matches.map(alias => aliases[alias])).size === 1)
|
|
149
|
+
result.backup = aliases[matches[0]];
|
|
150
|
+
else
|
|
151
|
+
throw new InstallError(`${matches.length ? "ambiguous" : "invalid"} argument ${quote(requested, true)} for 'backup type'\nValid arguments are:\n - 'none', 'off'\n - 'simple', 'never'\n - 'existing', 'nil'\n - 'numbered', 't'`, true);
|
|
152
|
+
}
|
|
153
|
+
if (preserveContext && setContext)
|
|
154
|
+
throw new InstallError("cannot set target context and preserve it");
|
|
155
|
+
if (!result.files.length)
|
|
156
|
+
throw new InstallError("missing file operand", true);
|
|
157
|
+
if (result.files.length === 1 && !result.directory && result.target === undefined)
|
|
158
|
+
throw new InstallError(`missing destination file operand after ${quote(result.files[0])}`, true);
|
|
159
|
+
if (result.noTarget && result.target !== undefined)
|
|
160
|
+
throw new InstallError("cannot combine --target-directory (-t) and --no-target-directory (-T)");
|
|
161
|
+
if (result.noTarget && result.files.length > 2)
|
|
162
|
+
throw new InstallError(`extra operand ${quote(result.files[2])}`, true);
|
|
163
|
+
return result;
|
|
164
|
+
}
|
|
165
|
+
export const helpText = `Usage: install [OPTION]... [-T] SOURCE DEST
|
|
166
|
+
or: install [OPTION]... SOURCE... DIRECTORY
|
|
167
|
+
or: install [OPTION]... -t DIRECTORY SOURCE...
|
|
168
|
+
or: install [OPTION]... -d DIRECTORY...
|
|
169
|
+
|
|
170
|
+
This install program copies files (often just compiled) into destination
|
|
171
|
+
locations you choose. If you want to download and install a ready-to-use
|
|
172
|
+
package on a GNU/Linux system, you should instead be using a package manager
|
|
173
|
+
like yum(1) or apt-get(1).
|
|
174
|
+
|
|
175
|
+
In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to
|
|
176
|
+
the existing DIRECTORY, while setting permission modes and owner/group.
|
|
177
|
+
In the 4th form, create all components of the given DIRECTORY(ies).
|
|
178
|
+
|
|
179
|
+
Mandatory arguments to long options are mandatory for short options too.
|
|
180
|
+
--backup[=CONTROL] make a backup of each existing destination file
|
|
181
|
+
-b like --backup but does not accept an argument
|
|
182
|
+
-c (ignored)
|
|
183
|
+
-C, --compare compare content of source and destination files, and
|
|
184
|
+
if no change to content, ownership, and permissions,
|
|
185
|
+
do not modify the destination at all
|
|
186
|
+
-d, --directory treat all arguments as directory names; create all
|
|
187
|
+
components of the specified directories
|
|
188
|
+
-D create all leading components of DEST except the last,
|
|
189
|
+
or all components of --target-directory,
|
|
190
|
+
then copy SOURCE to DEST
|
|
191
|
+
--debug explain how a file is copied. Implies -v
|
|
192
|
+
-g, --group=GROUP set group ownership, instead of process' current group
|
|
193
|
+
-m, --mode=MODE set permission mode (as in chmod), instead of rwxr-xr-x
|
|
194
|
+
-o, --owner=OWNER set ownership (super-user only)
|
|
195
|
+
-p, --preserve-timestamps apply access/modification times of SOURCE files
|
|
196
|
+
to corresponding destination files
|
|
197
|
+
-s, --strip strip symbol tables
|
|
198
|
+
--strip-program=PROGRAM program used to strip binaries
|
|
199
|
+
-S, --suffix=SUFFIX override the usual backup suffix
|
|
200
|
+
-t, --target-directory=DIRECTORY copy all SOURCE arguments into DIRECTORY
|
|
201
|
+
-T, --no-target-directory treat DEST as a normal file
|
|
202
|
+
-v, --verbose print the name of each created file or directory
|
|
203
|
+
--preserve-context preserve SELinux security context
|
|
204
|
+
-Z set SELinux security context of destination
|
|
205
|
+
file and each created directory to default type
|
|
206
|
+
--context[=CTX] like -Z, or if CTX is specified then set the
|
|
207
|
+
SELinux or SMACK security context to CTX
|
|
208
|
+
--help display this help and exit
|
|
209
|
+
--version output version information and exit
|
|
210
|
+
|
|
211
|
+
The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.
|
|
212
|
+
The version control method may be selected via the --backup option or through
|
|
213
|
+
the VERSION_CONTROL environment variable. Here are the values:
|
|
214
|
+
|
|
215
|
+
none, off never make backups (even if --backup is given)
|
|
216
|
+
numbered, t make numbered backups
|
|
217
|
+
existing, nil numbered if numbered backups exist, simple otherwise
|
|
218
|
+
simple, never always make simple backups
|
|
219
|
+
|
|
220
|
+
GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
|
|
221
|
+
Report any translation bugs to <https://translationproject.org/team/>
|
|
222
|
+
Full documentation <https://www.gnu.org/software/coreutils/install>
|
|
223
|
+
or available locally via: info '(coreutils) install invocation'
|
|
224
|
+
`;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type CommandDefinition, type VirtualShellPlugin } from "@poe-platform/safe-bash/contracts/index";
|
|
2
|
+
import { type InstallCommandsOptions } from "./options.js";
|
|
3
|
+
export type { InstallCommandsOptions, InstallContextRequest, InstallModeRequest } from "./options.js";
|
|
4
|
+
export declare function createInstallCommand(options?: InstallCommandsOptions): CommandDefinition;
|
|
5
|
+
export declare function createInstallCommands(options?: InstallCommandsOptions): readonly CommandDefinition[];
|
|
6
|
+
export declare function installCommands(options?: InstallCommandsOptions): VirtualShellPlugin;
|