just-bash-nx 3.0.3 → 3.0.5
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/dist/bin/chunks/{awk2-CKPJ75GN.js → awk2-VEM6BYZZ.js} +1 -1
- package/dist/bin/chunks/{chunk-LCDPWJBA.js → chunk-4LDNHGGB.js} +1 -1
- package/dist/bin/chunks/{chunk-RR4FBZRQ.js → chunk-6O2JCKBK.js} +1 -1
- package/dist/bin/chunks/{chunk-6KZRLMG3.js → chunk-DHC3ILJI.js} +5 -5
- package/dist/bin/{shell/chunks/chunk-YMQY74O7.js → chunks/chunk-HFMIBJIJ.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-NOGXKS2G.js → chunks/chunk-NC44GIJZ.js} +1 -1
- package/dist/bin/chunks/{chunk-P43NQKUN.js → chunk-PPE7NSB2.js} +38 -38
- package/dist/bin/chunks/{chunk-RUJLEXBJ.js → chunk-QGEUATM3.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-F75VXASN.js → chunks/chunk-TA5OOF5J.js} +1 -1
- package/dist/bin/chunks/{chunk-5EPOBKNU.js → chunk-Z7DZTJDV.js} +1 -1
- package/dist/bin/chunks/expansion-FIY4KMS5.js +2 -0
- package/dist/bin/chunks/{flag-coverage-K5GLIZKA.js → flag-coverage-Z2EIMOXJ.js} +1 -1
- package/dist/bin/{shell/chunks/jq-TUCIEKOF.js → chunks/jq-AS2FKJCV.js} +1 -1
- package/dist/bin/chunks/printf-3YAF3PBF.js +2 -0
- package/dist/bin/chunks/{sed-OKEUW2KT.js → sed-7JYCZG23.js} +1 -1
- package/dist/bin/{shell/chunks/xan-BCGRY7KM.js → chunks/xan-LKZQYS27.js} +1 -1
- package/dist/bin/{shell/chunks/yq-TKCR3BPF.js → chunks/yq-R7XLL765.js} +1 -1
- package/dist/bin/default-init.sh +59 -17
- package/dist/bin/just-bash.js +2 -2
- package/dist/bin/shell/chunks/{awk2-CKPJ75GN.js → awk2-VEM6BYZZ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-LCDPWJBA.js → chunk-4LDNHGGB.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-RR4FBZRQ.js → chunk-6O2JCKBK.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-6KZRLMG3.js → chunk-DHC3ILJI.js} +5 -5
- package/dist/bin/{chunks/chunk-YMQY74O7.js → shell/chunks/chunk-HFMIBJIJ.js} +1 -1
- package/dist/bin/{chunks/chunk-NOGXKS2G.js → shell/chunks/chunk-NC44GIJZ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-P43NQKUN.js → chunk-PPE7NSB2.js} +38 -38
- package/dist/bin/shell/chunks/{chunk-RUJLEXBJ.js → chunk-QGEUATM3.js} +1 -1
- package/dist/bin/{chunks/chunk-F75VXASN.js → shell/chunks/chunk-TA5OOF5J.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-5EPOBKNU.js → chunk-Z7DZTJDV.js} +1 -1
- package/dist/bin/shell/chunks/expansion-FIY4KMS5.js +2 -0
- package/dist/bin/shell/chunks/{flag-coverage-K5GLIZKA.js → flag-coverage-Z2EIMOXJ.js} +1 -1
- package/dist/bin/{chunks/jq-TUCIEKOF.js → shell/chunks/jq-AS2FKJCV.js} +1 -1
- package/dist/bin/shell/chunks/printf-3YAF3PBF.js +2 -0
- package/dist/bin/shell/chunks/{sed-OKEUW2KT.js → sed-7JYCZG23.js} +1 -1
- package/dist/bin/{chunks/xan-BCGRY7KM.js → shell/chunks/xan-LKZQYS27.js} +1 -1
- package/dist/bin/{chunks/yq-TKCR3BPF.js → shell/chunks/yq-R7XLL765.js} +1 -1
- package/dist/bin/shell/shell.js +2 -2
- package/dist/bundle/browser.js +424 -424
- package/dist/bundle/chunks/{awk2-RXRC54TM.js → awk2-IW7TXS45.js} +1 -1
- package/dist/bundle/chunks/{chunk-BGSUD5R5.js → chunk-4XUQHQ6I.js} +38 -38
- package/dist/bundle/chunks/{chunk-GFQRA5P5.js → chunk-57MC5FQY.js} +5 -5
- package/dist/bundle/chunks/{chunk-2CDK4MMW.js → chunk-5SBAUAOV.js} +1 -1
- package/dist/bundle/chunks/{chunk-T56QNPHK.js → chunk-62XT7UKU.js} +1 -1
- package/dist/bundle/chunks/{chunk-VQ7OTMJW.js → chunk-AKYJJLJX.js} +1 -1
- package/dist/bundle/chunks/{chunk-DFS4EHCX.js → chunk-C2QKS5PW.js} +1 -1
- package/dist/bundle/chunks/{chunk-UTKQPLMD.js → chunk-MEWOXC3H.js} +1 -1
- package/dist/bundle/chunks/{chunk-FGB5UXEW.js → chunk-WHNNDSCV.js} +1 -1
- package/dist/bundle/chunks/{chunk-XDXPYGGJ.js → chunk-X75XH2ZT.js} +1 -1
- package/dist/bundle/chunks/expansion-XT73ZVQC.js +1 -0
- package/dist/bundle/chunks/{flag-coverage-FUTMQRVN.js → flag-coverage-Z434UZKN.js} +1 -1
- package/dist/bundle/chunks/{jq-MOOFLU5X.js → jq-EQZB7JUS.js} +1 -1
- package/dist/bundle/chunks/printf-CEKOHUH5.js +1 -0
- package/dist/bundle/chunks/{sed-YRQXQDMQ.js → sed-HKXUNRIZ.js} +1 -1
- package/dist/bundle/chunks/{xan-CW6JZCU7.js → xan-X7AV7KKG.js} +1 -1
- package/dist/bundle/chunks/{yq-2NFJOC3M.js → yq-HBHRGN4X.js} +1 -1
- package/dist/bundle/index.cjs +705 -705
- package/dist/bundle/index.js +2 -2
- package/dist/commands/sqlite3/worker.js +1700 -227
- package/dist/interpreter/errors.d.ts +3 -1
- package/package.json +1 -1
- package/dist/Bash.commands.test.d.ts +0 -1
- package/dist/Bash.exec-args-forwarding.test.d.ts +0 -1
- package/dist/Bash.exec-options.test.d.ts +0 -1
- package/dist/Bash.general.test.d.ts +0 -1
- package/dist/bin/chunks/expansion-H3VFC532.js +0 -2
- package/dist/bin/chunks/printf-NA7DYZBO.js +0 -2
- package/dist/bin/shell/chunks/expansion-H3VFC532.js +0 -2
- package/dist/bin/shell/chunks/printf-NA7DYZBO.js +0 -2
- package/dist/browser.bundle.test.d.ts +0 -9
- package/dist/bundle/chunks/expansion-VBDYWVZR.js +0 -1
- package/dist/bundle/chunks/printf-CX64KX2P.js +0 -1
- package/dist/command-position-array-expansion.test.d.ts +0 -1
- package/dist/commands/alias/alias.test.d.ts +0 -1
- package/dist/commands/awk/awk.arrays.test.d.ts +0 -1
- package/dist/commands/awk/awk.binary.test.d.ts +0 -1
- package/dist/commands/awk/awk.edge-cases.test.d.ts +0 -1
- package/dist/commands/awk/awk.errors.test.d.ts +0 -1
- package/dist/commands/awk/awk.expressions.test.d.ts +0 -1
- package/dist/commands/awk/awk.fields.test.d.ts +0 -1
- package/dist/commands/awk/awk.functions.test.d.ts +0 -1
- package/dist/commands/awk/awk.getline.test.d.ts +0 -1
- package/dist/commands/awk/awk.limits.test.d.ts +0 -1
- package/dist/commands/awk/awk.math.test.d.ts +0 -1
- package/dist/commands/awk/awk.modulo.test.d.ts +0 -1
- package/dist/commands/awk/awk.nextfile.test.d.ts +0 -1
- package/dist/commands/awk/awk.operators.test.d.ts +0 -1
- package/dist/commands/awk/awk.output.test.d.ts +0 -1
- package/dist/commands/awk/awk.parsing.test.d.ts +0 -1
- package/dist/commands/awk/awk.patterns.test.d.ts +0 -1
- package/dist/commands/awk/awk.prototype-pollution.test.d.ts +0 -1
- package/dist/commands/awk/awk.range.test.d.ts +0 -1
- package/dist/commands/awk/awk.strings.test.d.ts +0 -1
- package/dist/commands/awk/awk.ternary.test.d.ts +0 -1
- package/dist/commands/awk/awk.test.d.ts +0 -1
- package/dist/commands/awk/awk.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/base64/base64.binary.test.d.ts +0 -1
- package/dist/commands/base64/base64.test.d.ts +0 -1
- package/dist/commands/base64/base64.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/basename/basename.test.d.ts +0 -1
- package/dist/commands/bash/bash.test.d.ts +0 -1
- package/dist/commands/bash/bash.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/cat/cat.binary.test.d.ts +0 -1
- package/dist/commands/cat/cat.test.d.ts +0 -1
- package/dist/commands/cat/cat.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/chmod/chmod.test.d.ts +0 -1
- package/dist/commands/clear/clear.test.d.ts +0 -1
- package/dist/commands/column/column.test.d.ts +0 -1
- package/dist/commands/column/column.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/comm/comm.test.d.ts +0 -1
- package/dist/commands/comm/comm.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/cp/cp.binary.test.d.ts +0 -1
- package/dist/commands/cp/cp.test.d.ts +0 -1
- package/dist/commands/curl/curl.prototype-pollution.test.d.ts +0 -1
- package/dist/commands/curl/tests/allowlist.test.d.ts +0 -4
- package/dist/commands/curl/tests/auth.test.d.ts +0 -4
- package/dist/commands/curl/tests/availability.test.d.ts +0 -6
- package/dist/commands/curl/tests/binary.test.d.ts +0 -4
- package/dist/commands/curl/tests/cookies.test.d.ts +0 -4
- package/dist/commands/curl/tests/errors.test.d.ts +0 -4
- package/dist/commands/curl/tests/form.test.d.ts +0 -4
- package/dist/commands/curl/tests/methods.test.d.ts +0 -7
- package/dist/commands/curl/tests/options.test.d.ts +0 -4
- package/dist/commands/curl/tests/parse.test.d.ts +0 -4
- package/dist/commands/curl/tests/timeout.test.d.ts +0 -4
- package/dist/commands/curl/tests/upload.test.d.ts +0 -4
- package/dist/commands/curl/tests/verbose.test.d.ts +0 -4
- package/dist/commands/curl/tests/writeout.test.d.ts +0 -4
- package/dist/commands/cut/cut.binary.test.d.ts +0 -1
- package/dist/commands/cut/cut.test.d.ts +0 -1
- package/dist/commands/cut/cut.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/date/date.test.d.ts +0 -1
- package/dist/commands/diff/diff.binary.test.d.ts +0 -1
- package/dist/commands/diff/diff.test.d.ts +0 -1
- package/dist/commands/diff/diff.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/dirname/dirname.test.d.ts +0 -1
- package/dist/commands/du/du.test.d.ts +0 -1
- package/dist/commands/echo/echo.binary.test.d.ts +0 -1
- package/dist/commands/echo/echo.test.d.ts +0 -1
- package/dist/commands/env/env.test.d.ts +0 -1
- package/dist/commands/env/env.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/expand/expand.test.d.ts +0 -1
- package/dist/commands/expand/expand.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/expand/unexpand.test.d.ts +0 -1
- package/dist/commands/expand/unexpand.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/file/file.test.d.ts +0 -1
- package/dist/commands/find/find.actions.test.d.ts +0 -1
- package/dist/commands/find/find.basic.test.d.ts +0 -1
- package/dist/commands/find/find.depth.test.d.ts +0 -1
- package/dist/commands/find/find.exec-command-name-quoting.test.d.ts +0 -1
- package/dist/commands/find/find.exec.test.d.ts +0 -1
- package/dist/commands/find/find.operators.test.d.ts +0 -1
- package/dist/commands/find/find.patterns.test.d.ts +0 -1
- package/dist/commands/find/find.perf.test.d.ts +0 -1
- package/dist/commands/find/find.perm.test.d.ts +0 -1
- package/dist/commands/find/find.predicates.test.d.ts +0 -1
- package/dist/commands/find/find.printf.test.d.ts +0 -1
- package/dist/commands/fold/fold.test.d.ts +0 -1
- package/dist/commands/fold/fold.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/grep/grep.advanced.test.d.ts +0 -1
- package/dist/commands/grep/grep.basic.test.d.ts +0 -1
- package/dist/commands/grep/grep.binary.test.d.ts +0 -1
- package/dist/commands/grep/grep.exclude.test.d.ts +0 -1
- package/dist/commands/grep/grep.perl.test.d.ts +0 -1
- package/dist/commands/grep/grep.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/gzip/gzip.binary.test.d.ts +0 -1
- package/dist/commands/gzip/gzip.security.test.d.ts +0 -1
- package/dist/commands/gzip/gzip.test.d.ts +0 -1
- package/dist/commands/gzip/gzip.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/head/head.binary.test.d.ts +0 -1
- package/dist/commands/head/head.test.d.ts +0 -1
- package/dist/commands/head/head.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/help/help.test.d.ts +0 -1
- package/dist/commands/history/history.test.d.ts +0 -1
- package/dist/commands/hostname/hostname.test.d.ts +0 -1
- package/dist/commands/html-to-markdown/html-to-markdown.test.d.ts +0 -1
- package/dist/commands/html-to-markdown/html-to-markdown.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/join/join.test.d.ts +0 -1
- package/dist/commands/join/join.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/jq/jq.arg.test.d.ts +0 -1
- package/dist/commands/jq/jq.basic.test.d.ts +0 -1
- package/dist/commands/jq/jq.construction.test.d.ts +0 -1
- package/dist/commands/jq/jq.dot-adjacency.test.d.ts +0 -1
- package/dist/commands/jq/jq.filters.test.d.ts +0 -1
- package/dist/commands/jq/jq.functions.test.d.ts +0 -1
- package/dist/commands/jq/jq.keyword-field-access.test.d.ts +0 -1
- package/dist/commands/jq/jq.limits.test.d.ts +0 -1
- package/dist/commands/jq/jq.operators.test.d.ts +0 -1
- package/dist/commands/jq/jq.permissive-control-chars.test.d.ts +0 -1
- package/dist/commands/jq/jq.prototype-pollution.test.d.ts +0 -1
- package/dist/commands/jq/jq.raw-input.test.d.ts +0 -1
- package/dist/commands/jq/jq.strings.test.d.ts +0 -1
- package/dist/commands/jq/jq.test.d.ts +0 -1
- package/dist/commands/jq/jq.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.esm.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.exec.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.fs.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.http.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.invoke-tool.test.d.ts +0 -9
- package/dist/commands/js-exec/js-exec.module-resolution-security.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.node-compat.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.security.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.ts-strip.test.d.ts +0 -1
- package/dist/commands/js-exec/js-exec.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/ln/ln.error-forwarding.test.d.ts +0 -1
- package/dist/commands/ln/ln.test.d.ts +0 -1
- package/dist/commands/ls/ls.human.test.d.ts +0 -1
- package/dist/commands/ls/ls.test.d.ts +0 -1
- package/dist/commands/md5sum/checksum.binary.test.d.ts +0 -1
- package/dist/commands/md5sum/md5sum.test.d.ts +0 -1
- package/dist/commands/md5sum/md5sum.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/mkdir/mkdir.test.d.ts +0 -1
- package/dist/commands/mv/mv.test.d.ts +0 -1
- package/dist/commands/nl/nl.test.d.ts +0 -1
- package/dist/commands/nl/nl.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/od/od.binary.test.d.ts +0 -1
- package/dist/commands/od/od.test.d.ts +0 -1
- package/dist/commands/od/od.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/paste/paste.test.d.ts +0 -1
- package/dist/commands/paste/paste.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/printf/escapes.test.d.ts +0 -1
- package/dist/commands/printf/printf.binary.test.d.ts +0 -1
- package/dist/commands/printf/printf.test.d.ts +0 -1
- package/dist/commands/pwd/pwd.test.d.ts +0 -1
- package/dist/commands/python3/fs-bridge-handler.output-limit.test.d.ts +0 -1
- package/dist/commands/python3/python3.advanced.test.d.ts +0 -1
- package/dist/commands/python3/python3.env.test.d.ts +0 -1
- package/dist/commands/python3/python3.files.test.d.ts +0 -1
- package/dist/commands/python3/python3.http.test.d.ts +0 -1
- package/dist/commands/python3/python3.oop.test.d.ts +0 -1
- package/dist/commands/python3/python3.optin.test.d.ts +0 -1
- package/dist/commands/python3/python3.queue-desync.runtime.test.d.ts +0 -1
- package/dist/commands/python3/python3.queue-timeout-exploit.test.d.ts +0 -1
- package/dist/commands/python3/python3.security.test.d.ts +0 -1
- package/dist/commands/python3/python3.stdlib.test.d.ts +0 -1
- package/dist/commands/python3/python3.test.d.ts +0 -1
- package/dist/commands/python3/python3.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/python3/python3.worker-protocol-abuse.test.d.ts +0 -1
- package/dist/commands/query-engine/safe-object.sanitize-parsed-data.test.d.ts +0 -1
- package/dist/commands/query-engine/safe-object.test.d.ts +0 -1
- package/dist/commands/readlink/readlink.test.d.ts +0 -1
- package/dist/commands/registry.test.d.ts +0 -1
- package/dist/commands/rev/rev.test.d.ts +0 -1
- package/dist/commands/rev/rev.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/rg/gitignore.test.d.ts +0 -1
- package/dist/commands/rg/imported-tests/binary.test.d.ts +0 -1
- package/dist/commands/rg/imported-tests/feature.test.d.ts +0 -1
- package/dist/commands/rg/imported-tests/json.test.d.ts +0 -11
- package/dist/commands/rg/imported-tests/misc.test.d.ts +0 -1
- package/dist/commands/rg/imported-tests/multiline.test.d.ts +0 -10
- package/dist/commands/rg/imported-tests/regression.test.d.ts +0 -1
- package/dist/commands/rg/rg-parser-threads.test.d.ts +0 -1
- package/dist/commands/rg/rg.basic.test.d.ts +0 -1
- package/dist/commands/rg/rg.edge-cases.test.d.ts +0 -1
- package/dist/commands/rg/rg.filtering.test.d.ts +0 -1
- package/dist/commands/rg/rg.flags.test.d.ts +0 -6
- package/dist/commands/rg/rg.max-count.test.d.ts +0 -1
- package/dist/commands/rg/rg.no-filename.test.d.ts +0 -1
- package/dist/commands/rg/rg.output.test.d.ts +0 -1
- package/dist/commands/rg/rg.patterns.test.d.ts +0 -1
- package/dist/commands/rg/rg.ripgrep-compat.test.d.ts +0 -1
- package/dist/commands/rg/rg.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/rm/rm.test.d.ts +0 -1
- package/dist/commands/search-engine/regex.test.d.ts +0 -1
- package/dist/commands/sed/sed.advanced.test.d.ts +0 -1
- package/dist/commands/sed/sed.binary.test.d.ts +0 -1
- package/dist/commands/sed/sed.commands.test.d.ts +0 -1
- package/dist/commands/sed/sed.errors.test.d.ts +0 -1
- package/dist/commands/sed/sed.limits.test.d.ts +0 -1
- package/dist/commands/sed/sed.regex.test.d.ts +0 -1
- package/dist/commands/sed/sed.security.test.d.ts +0 -6
- package/dist/commands/sed/sed.test.d.ts +0 -1
- package/dist/commands/sed/sed.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/seq/seq.test.d.ts +0 -1
- package/dist/commands/sleep/sleep.test.d.ts +0 -1
- package/dist/commands/sort/sort.advanced.test.d.ts +0 -1
- package/dist/commands/sort/sort.binary.test.d.ts +0 -1
- package/dist/commands/sort/sort.test.d.ts +0 -1
- package/dist/commands/sort/sort.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/split/split.test.d.ts +0 -1
- package/dist/commands/split/split.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.errors.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.fixtures.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.formatters.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.options.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.output-modes.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.parsing.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.worker-protocol-abuse.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.worker-resolution.test.d.ts +0 -11
- package/dist/commands/sqlite3/sqlite3.write-ops.test.d.ts +0 -1
- package/dist/commands/sqlite3/sqlite3.writeback-edge-cases.test.d.ts +0 -1
- package/dist/commands/stat/stat.test.d.ts +0 -1
- package/dist/commands/strings/strings.binary.test.d.ts +0 -1
- package/dist/commands/strings/strings.test.d.ts +0 -1
- package/dist/commands/strings/strings.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/tac/tac.test.d.ts +0 -1
- package/dist/commands/tail/tail.binary.test.d.ts +0 -1
- package/dist/commands/tail/tail.test.d.ts +0 -1
- package/dist/commands/tar/bzip2-compress.test.d.ts +0 -1
- package/dist/commands/tar/tar.binary.test.d.ts +0 -1
- package/dist/commands/tar/tar.bundle.test.d.ts +0 -1
- package/dist/commands/tar/tar.security.test.d.ts +0 -1
- package/dist/commands/tar/tar.test.d.ts +0 -1
- package/dist/commands/tar/tar.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/tee/tee.binary.test.d.ts +0 -1
- package/dist/commands/tee/tee.test.d.ts +0 -1
- package/dist/commands/tee/tee.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/test/test.test.d.ts +0 -1
- package/dist/commands/time/time.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/timeout/timeout.command-name-quoting.test.d.ts +0 -1
- package/dist/commands/timeout/timeout.nested-cancellation.test.d.ts +0 -1
- package/dist/commands/timeout/timeout.test.d.ts +0 -1
- package/dist/commands/timeout/timeout.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/touch/touch.test.d.ts +0 -1
- package/dist/commands/tr/tr.binary.test.d.ts +0 -1
- package/dist/commands/tr/tr.complement.test.d.ts +0 -1
- package/dist/commands/tr/tr.test.d.ts +0 -1
- package/dist/commands/tr/tr.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/tree/tree.test.d.ts +0 -1
- package/dist/commands/true/true.test.d.ts +0 -1
- package/dist/commands/uniq/uniq.binary.test.d.ts +0 -1
- package/dist/commands/uniq/uniq.test.d.ts +0 -1
- package/dist/commands/uniq/uniq.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/utf8-across-commands.test.d.ts +0 -1
- package/dist/commands/utf8-bytestring.test.d.ts +0 -1
- package/dist/commands/wc/wc.binary.test.d.ts +0 -1
- package/dist/commands/wc/wc.test.d.ts +0 -1
- package/dist/commands/wc/wc.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/which/which.test.d.ts +0 -1
- package/dist/commands/worker-bridge/bridge-handler.test.d.ts +0 -1
- package/dist/commands/xan/moonblade-parser.test.d.ts +0 -1
- package/dist/commands/xan/xan.agg.test.d.ts +0 -5
- package/dist/commands/xan/xan.basic.test.d.ts +0 -5
- package/dist/commands/xan/xan.columns.test.d.ts +0 -5
- package/dist/commands/xan/xan.data.test.d.ts +0 -5
- package/dist/commands/xan/xan.filter-sort.test.d.ts +0 -5
- package/dist/commands/xan/xan.frequency.test.d.ts +0 -5
- package/dist/commands/xan/xan.groupby.test.d.ts +0 -5
- package/dist/commands/xan/xan.map.test.d.ts +0 -5
- package/dist/commands/xan/xan.multifile.test.d.ts +0 -5
- package/dist/commands/xan/xan.prototype-pollution.test.d.ts +0 -1
- package/dist/commands/xan/xan.reshape.test.d.ts +0 -5
- package/dist/commands/xan/xan.select-advanced.test.d.ts +0 -5
- package/dist/commands/xan/xan.transform.test.d.ts +0 -5
- package/dist/commands/xan/xan.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/xargs/xargs.command-name-quoting.test.d.ts +0 -1
- package/dist/commands/xargs/xargs.test.d.ts +0 -1
- package/dist/commands/xargs/xargs.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/yq/yq.env.test.d.ts +0 -1
- package/dist/commands/yq/yq.fixtures.test.d.ts +0 -10
- package/dist/commands/yq/yq.format-strings.test.d.ts +0 -1
- package/dist/commands/yq/yq.navigation.test.d.ts +0 -1
- package/dist/commands/yq/yq.prototype-pollution.test.d.ts +0 -1
- package/dist/commands/yq/yq.test.d.ts +0 -1
- package/dist/commands/yq/yq.utf8-stdin.test.d.ts +0 -1
- package/dist/commands/yq/yq.yaml-security.test.d.ts +0 -11
- package/dist/custom-commands.test.d.ts +0 -1
- package/dist/encoding-pipeline.test.d.ts +0 -1
- package/dist/encoding.fs-fallback.test.d.ts +0 -1
- package/dist/fs/cross-fs-no-symlinks.test.d.ts +0 -8
- package/dist/fs/cross-fs-security.test.d.ts +0 -12
- package/dist/fs/in-memory-fs/in-memory-fs.security.test.d.ts +0 -8
- package/dist/fs/in-memory-fs/in-memory-fs.test.d.ts +0 -1
- package/dist/fs/mountable-fs/mountable-fs.security.test.d.ts +0 -8
- package/dist/fs/mountable-fs/mountable-fs.test.d.ts +0 -1
- package/dist/fs/overlay-fs/overlay-fs.e2e.test.d.ts +0 -7
- package/dist/fs/overlay-fs/overlay-fs.security.test.d.ts +0 -7
- package/dist/fs/overlay-fs/overlay-fs.test.d.ts +0 -1
- package/dist/fs/read-write-fs/read-write-fs.piping.test.d.ts +0 -1
- package/dist/fs/read-write-fs/read-write-fs.security.test.d.ts +0 -11
- package/dist/fs/read-write-fs/read-write-fs.test.d.ts +0 -1
- package/dist/fs/real-fs-utils.sanitize.test.d.ts +0 -1
- package/dist/fs/real-fs-utils.test.d.ts +0 -7
- package/dist/fs/sanitize-error.test.d.ts +0 -1
- package/dist/interpreter/arithmetic.test.d.ts +0 -1
- package/dist/interpreter/assoc-array.test.d.ts +0 -1
- package/dist/interpreter/builtins/break.test.d.ts +0 -1
- package/dist/interpreter/builtins/cd.test.d.ts +0 -1
- package/dist/interpreter/builtins/complete.test.d.ts +0 -1
- package/dist/interpreter/builtins/compopt.test.d.ts +0 -1
- package/dist/interpreter/builtins/continue.test.d.ts +0 -1
- package/dist/interpreter/builtins/eval.test.d.ts +0 -1
- package/dist/interpreter/builtins/exit.test.d.ts +0 -1
- package/dist/interpreter/builtins/export.test.d.ts +0 -1
- package/dist/interpreter/builtins/local.test.d.ts +0 -1
- package/dist/interpreter/builtins/posix-fatal.test.d.ts +0 -1
- package/dist/interpreter/builtins/read.test.d.ts +0 -1
- package/dist/interpreter/builtins/return.test.d.ts +0 -1
- package/dist/interpreter/builtins/set.test.d.ts +0 -1
- package/dist/interpreter/builtins/shift.test.d.ts +0 -1
- package/dist/interpreter/builtins/source.test.d.ts +0 -1
- package/dist/interpreter/builtins/unset.test.d.ts +0 -1
- package/dist/interpreter/control-flow.test.d.ts +0 -1
- package/dist/interpreter/expansion/prompt.test.d.ts +0 -1
- package/dist/interpreter/helpers/xtrace.test.d.ts +0 -1
- package/dist/interpreter/pipeline-execution.test.d.ts +0 -1
- package/dist/interpreter/prototype-pollution.test.d.ts +0 -1
- package/dist/interpreter/redirections.binary.test.d.ts +0 -1
- package/dist/network/allow-list/bypass.test.d.ts +0 -7
- package/dist/network/allow-list/dns-rebinding-integration.test.d.ts +0 -8
- package/dist/network/allow-list/dns-rebinding.test.d.ts +0 -7
- package/dist/network/allow-list/e2e.test.d.ts +0 -7
- package/dist/network/allow-list/firewall.test.d.ts +0 -7
- package/dist/network/allow-list/mock.test.d.ts +0 -5
- package/dist/network/allow-list/pen-test-pocs.test.d.ts +0 -1
- package/dist/network/allow-list/unit.test.d.ts +0 -1
- package/dist/network/dns-pin-fetch.test.d.ts +0 -1
- package/dist/network/dns-pin.test.d.ts +0 -1
- package/dist/readme.test.d.ts +0 -9
- package/dist/sandbox/Sandbox.security.test.d.ts +0 -1
- package/dist/sandbox/Sandbox.test.d.ts +0 -1
- package/dist/security-limits.test.d.ts +0 -4
package/dist/bundle/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as on,C as an,D as de,E as et,F as se,G as ke,H as Kt,I as ln,J as F,K as cn,L as un,M as _e,N as Us,O as Xt,P as H,a as Yr,b as Ms,c as Qr,d as qt,e as ee,f as B,g as fe,h as ne,i as xe,j as He,k as Ws,l as Gt,m as Jr,n as zs,o as en,p as Ee,q as We,r as tn,s as sn,t as Vs,u as Bs,v as Ze,w as rn,x as nn,y as Ae,z as js}from"./chunks/chunk-BGSUD5R5.js";import{a as Fe,b as Me,c as be}from"./chunks/chunk-R6VWJ2ZL.js";import{c as Fs}from"./chunks/chunk-CWQS3NFK.js";import{a as Mt,b as Wt}from"./chunks/chunk-A5O5YHGN.js";import{a as Ls}from"./chunks/chunk-IPJHKYVM.js";import{a as Ue,b as ve,c as Ct}from"./chunks/chunk-OJDRYQWQ.js";import{a as _t,b as Xr}from"./chunks/chunk-24IMIIXA.js";import{a as Ve,b as me}from"./chunks/chunk-5QMZ5MUS.js";import{a as kt}from"./chunks/chunk-B74TABJS.js";import{a as At,b as zt,c as io,d as Be,e as oo,f as Vt,g as ao,h as Bt,i as lo,j as co}from"./chunks/chunk-AH77CRWX.js";import{a as ye,b as ge,c as ue,d as we,e as Gr,f as j,g as Je,h as jt,i as Ut,j as Kr,k as J,l as Ht,m as je,n as Zt,o as Pe}from"./chunks/chunk-GFQRA5P5.js";import"./chunks/chunk-NUFRM6SI.js";import{a as Le}from"./chunks/chunk-3THT3N7L.js";import{a as Ie}from"./chunks/chunk-44UOCSGV.js";import{a as Is}from"./chunks/chunk-DXB73IDG.js";var tt=[{name:"echo",load:async()=>(await import("./chunks/echo-O45JWWI2.js")).echoCommand},{name:"cat",load:async()=>(await import("./chunks/cat-VQEWZT5O.js")).catCommand},{name:"printf",load:async()=>(await import("./chunks/printf-CX64KX2P.js")).printfCommand},{name:"ls",load:async()=>(await import("./chunks/ls-KSXFZCWH.js")).lsCommand},{name:"mkdir",load:async()=>(await import("./chunks/mkdir-TDEMSB6C.js")).mkdirCommand},{name:"rmdir",load:async()=>(await import("./chunks/rmdir-XTQXT7RK.js")).rmdirCommand},{name:"touch",load:async()=>(await import("./chunks/touch-DX2IJOQ4.js")).touchCommand},{name:"rm",load:async()=>(await import("./chunks/rm-RTZG23RL.js")).rmCommand},{name:"cp",load:async()=>(await import("./chunks/cp-XOYR4ABJ.js")).cpCommand},{name:"mv",load:async()=>(await import("./chunks/mv-Z6MORUFL.js")).mvCommand},{name:"ln",load:async()=>(await import("./chunks/ln-4TRFBYAT.js")).lnCommand},{name:"chmod",load:async()=>(await import("./chunks/chmod-SYMGL4JA.js")).chmodCommand},{name:"pwd",load:async()=>(await import("./chunks/pwd-D4OZ7N27.js")).pwdCommand},{name:"readlink",load:async()=>(await import("./chunks/readlink-MI4GCHJF.js")).readlinkCommand},{name:"head",load:async()=>(await import("./chunks/head-FG33BE3W.js")).headCommand},{name:"tail",load:async()=>(await import("./chunks/tail-EDLAF4WW.js")).tailCommand},{name:"wc",load:async()=>(await import("./chunks/wc-J6YO4AFR.js")).wcCommand},{name:"stat",load:async()=>(await import("./chunks/stat-BT5A227F.js")).statCommand},{name:"grep",load:async()=>(await import("./chunks/grep-7CE2SS3X.js")).grepCommand},{name:"fgrep",load:async()=>(await import("./chunks/grep-7CE2SS3X.js")).fgrepCommand},{name:"egrep",load:async()=>(await import("./chunks/grep-7CE2SS3X.js")).egrepCommand},{name:"rg",load:async()=>(await import("./chunks/rg-GMXITNCP.js")).rgCommand},{name:"sed",load:async()=>(await import("./chunks/sed-YRQXQDMQ.js")).sedCommand},{name:"awk",load:async()=>(await import("./chunks/awk2-RXRC54TM.js")).awkCommand2},{name:"sort",load:async()=>(await import("./chunks/sort-5KALNK6P.js")).sortCommand},{name:"uniq",load:async()=>(await import("./chunks/uniq-DCP6SV3B.js")).uniqCommand},{name:"comm",load:async()=>(await import("./chunks/comm-AXP77KC4.js")).commCommand},{name:"cut",load:async()=>(await import("./chunks/cut-RBX7IXC7.js")).cutCommand},{name:"paste",load:async()=>(await import("./chunks/paste-HIF3YKHC.js")).pasteCommand},{name:"tr",load:async()=>(await import("./chunks/tr-2QSZN4JB.js")).trCommand},{name:"rev",load:async()=>(await import("./chunks/rev-SKETTPXH.js")).rev},{name:"nl",load:async()=>(await import("./chunks/nl-LBU6FPPF.js")).nl},{name:"fold",load:async()=>(await import("./chunks/fold-V23GDLZD.js")).fold},{name:"expand",load:async()=>(await import("./chunks/expand-UMGRCDTC.js")).expand},{name:"unexpand",load:async()=>(await import("./chunks/unexpand-ZTD2RXS2.js")).unexpand},{name:"strings",load:async()=>(await import("./chunks/strings-7VYWRFIZ.js")).strings},{name:"split",load:async()=>(await import("./chunks/split-4CXZNBGE.js")).split},{name:"column",load:async()=>(await import("./chunks/column-DCCLCHUR.js")).column},{name:"join",load:async()=>(await import("./chunks/join-TLHD7S7W.js")).join},{name:"tee",load:async()=>(await import("./chunks/tee-DUMXETDQ.js")).teeCommand},{name:"find",load:async()=>(await import("./chunks/find-DH2ALKQS.js")).findCommand},{name:"basename",load:async()=>(await import("./chunks/basename-AA2KJYZQ.js")).basenameCommand},{name:"dirname",load:async()=>(await import("./chunks/dirname-LEMTZZFS.js")).dirnameCommand},{name:"tree",load:async()=>(await import("./chunks/tree-LYXBS7DC.js")).treeCommand},{name:"du",load:async()=>(await import("./chunks/du-WO2ENHXQ.js")).duCommand},{name:"env",load:async()=>(await import("./chunks/env-GBSZDQLS.js")).envCommand},{name:"printenv",load:async()=>(await import("./chunks/env-GBSZDQLS.js")).printenvCommand},{name:"alias",load:async()=>(await import("./chunks/alias-JE7RI5QX.js")).aliasCommand},{name:"unalias",load:async()=>(await import("./chunks/alias-JE7RI5QX.js")).unaliasCommand},{name:"history",load:async()=>(await import("./chunks/history-J4QRNGRO.js")).historyCommand},{name:"xargs",load:async()=>(await import("./chunks/xargs-LB2QOP6N.js")).xargsCommand},{name:"true",load:async()=>(await import("./chunks/true-WHJNXCHG.js")).trueCommand},{name:"false",load:async()=>(await import("./chunks/true-WHJNXCHG.js")).falseCommand},{name:"clear",load:async()=>(await import("./chunks/clear-5CZ5X4YR.js")).clearCommand},{name:"bash",load:async()=>(await import("./chunks/bash-4WLDO24C.js")).bashCommand},{name:"sh",load:async()=>(await import("./chunks/bash-4WLDO24C.js")).shCommand},{name:"jq",load:async()=>(await import("./chunks/jq-MOOFLU5X.js")).jqCommand},{name:"base64",load:async()=>(await import("./chunks/base64-FJOOBRMC.js")).base64Command},{name:"diff",load:async()=>(await import("./chunks/diff-AYXX5MI5.js")).diffCommand},{name:"date",load:async()=>(await import("./chunks/date-DD7FVA2V.js")).dateCommand},{name:"sleep",load:async()=>(await import("./chunks/sleep-VZFPZFWA.js")).sleepCommand},{name:"timeout",load:async()=>(await import("./chunks/timeout-PWE4AOYD.js")).timeoutCommand},{name:"time",load:async()=>(await import("./chunks/time-U22WPHDM.js")).timeCommand},{name:"seq",load:async()=>(await import("./chunks/seq-RN5ZUASB.js")).seqCommand},{name:"expr",load:async()=>(await import("./chunks/expr-YYCVMXE3.js")).exprCommand},{name:"md5sum",load:async()=>(await import("./chunks/md5sum-XMCB7L5Z.js")).md5sumCommand},{name:"sha1sum",load:async()=>(await import("./chunks/sha1sum-ZHNS7PS4.js")).sha1sumCommand},{name:"sha256sum",load:async()=>(await import("./chunks/sha256sum-YWE2HB65.js")).sha256sumCommand},{name:"file",load:async()=>(await import("./chunks/file-IGDTDPLG.js")).fileCommand},{name:"html-to-markdown",load:async()=>(await import("./chunks/html-to-markdown-AQHC3PHD.js")).htmlToMarkdownCommand},{name:"help",load:async()=>(await import("./chunks/help-VVWX7SA5.js")).helpCommand},{name:"which",load:async()=>(await import("./chunks/which-AFLRHHI7.js")).whichCommand},{name:"tac",load:async()=>(await import("./chunks/tac-74F3WHUM.js")).tac},{name:"hostname",load:async()=>(await import("./chunks/hostname-BK6HG2DE.js")).hostname},{name:"whoami",load:async()=>(await import("./chunks/whoami-DGKU3D2X.js")).whoami},{name:"od",load:async()=>(await import("./chunks/od-O6TPXWVX.js")).od},{name:"gzip",load:async()=>(await import("./chunks/gzip-EVI6YRMT.js")).gzipCommand},{name:"gunzip",load:async()=>(await import("./chunks/gzip-EVI6YRMT.js")).gunzipCommand},{name:"zcat",load:async()=>(await import("./chunks/gzip-EVI6YRMT.js")).zcatCommand}];(typeof __BROWSER__>"u"||!__BROWSER__)&&(tt.push({name:"tar",load:async()=>(await import("./chunks/tar-RKYTUGDT.js")).tarCommand}),tt.push({name:"yq",load:async()=>(await import("./chunks/yq-2NFJOC3M.js")).yqCommand}),tt.push({name:"xan",load:async()=>(await import("./chunks/xan-CW6JZCU7.js")).xanCommand}),tt.push({name:"sqlite3",load:async()=>(await import("./chunks/sqlite3-FXN2MHWU.js")).sqlite3Command}));var Yt=[];(typeof __BROWSER__>"u"||!__BROWSER__)&&(Yt.push({name:"python3",load:async()=>(await import("./chunks/python3-ZR6W2FR3.js")).python3Command}),Yt.push({name:"python",load:async()=>(await import("./chunks/python3-ZR6W2FR3.js")).pythonCommand}));var Qt=[];(typeof __BROWSER__>"u"||!__BROWSER__)&&(Qt.push({name:"js-exec",load:async()=>(await import("./chunks/js-exec-2U7NEXAP.js")).jsExecCommand}),Qt.push({name:"node",load:async()=>(await import("./chunks/js-exec-2U7NEXAP.js")).nodeStubCommand}));var dn=[{name:"curl",load:async()=>(await import("./chunks/curl-47BFPSFW.js")).curlCommand}],fn=new Map;function Jt(e){return{name:e.name,async execute(t,s){let r=fn.get(e.name);if(r||(r=await me.runTrustedAsync(()=>e.load()),fn.set(e.name,r)),s.coverage&&(typeof __BROWSER__>"u"||!__BROWSER__)){let{emitFlagCoverage:n}=await import("./chunks/flag-coverage-FUTMQRVN.js");n(s.coverage,e.name,t)}return r.execute(t,s)}}}function uo(){return tt.map(e=>e.name)}function fo(){return dn.map(e=>e.name)}function hn(e){return(e?tt.filter(s=>e.includes(s.name)):tt).map(Jt)}function pn(){return dn.map(Jt)}function ho(){return Yt.map(e=>e.name)}function mn(){return Yt.map(Jt)}function po(){return Qt.map(e=>e.name)}function yn(){return Qt.map(Jt)}function gn(e){return"load"in e&&typeof e.load=="function"}function mo(e,t){return{name:e,trusted:!0,execute:t}}function wn(e){let t=null;return{name:e.name,trusted:!0,async execute(s,r){return t||(t=await e.load()),t.execute(s,r)}}}function T(e){if(!e||e==="/")return"/";let t=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;t.startsWith("/")||(t=`/${t}`);let s=t.split("/").filter(n=>n&&n!=="."),r=[];for(let n of s)n===".."?r.pop():r.push(n);return`/${r.join("/")}`||"/"}function D(e,t){if(e.includes("\0"))throw new Error(`ENOENT: path contains null byte, ${t} '${e}'`)}function st(e){let t=T(e);if(t==="/")return"/";let s=t.lastIndexOf("/");return s===0?"/":t.slice(0,s)}function qe(e,t){if(t.startsWith("/"))return T(t);let s=e==="/"?`/${t}`:`${e}/${t}`;return T(s)}function Ge(e,t){return e==="/"?`/${t}`:`${e}/${t}`}function ct(e,t){if(t.startsWith("/"))return T(t);let s=st(e);return T(Ge(s,t))}var ut=new TextEncoder;function yo(e){return typeof e=="object"&&e!==null&&!(e instanceof Uint8Array)&&"content"in e}var ze=class{data=new Map;constructor(t){if(this.data.set("/",{type:"directory",mode:493,mtime:new Date}),t)for(let[s,r]of Object.entries(t))typeof r=="function"?this.writeFileLazy(s,r):yo(r)?this.writeFileSync(s,r.content,void 0,{mode:r.mode,mtime:r.mtime}):this.writeFileSync(s,r)}ensureParentDirs(t){let s=st(t);s!=="/"&&(this.data.has(s)||(this.ensureParentDirs(s),this.data.set(s,{type:"directory",mode:493,mtime:new Date})))}writeFileSync(t,s,r,n){D(t,"write");let i=T(t);this.ensureParentDirs(i);let o=be(r),a=Fe(s,o);this.data.set(i,{type:"file",content:a,mode:n?.mode??420,mtime:n?.mtime??new Date})}writeFileLazy(t,s,r){D(t,"write");let n=T(t);this.ensureParentDirs(n),this.data.set(n,{type:"file",lazy:s,mode:r?.mode??420,mtime:r?.mtime??new Date})}async materializeLazy(t,s){let r=await s.lazy(),i={type:"file",content:typeof r=="string"?ut.encode(r):r,mode:s.mode,mtime:s.mtime};return this.data.set(t,i),i}async readFile(t,s){let r=await this.readFileBuffer(t),n=be(s);return Me(r,n)}async readFileBytes(t){let s=await this.readFileBuffer(t);return Me(s,"binary")}async readFileBuffer(t){D(t,"open");let s=this.resolvePathWithSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, open '${t}'`);if(r.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${t}'`);if("lazy"in r){let n=await this.materializeLazy(s,r);return n.content instanceof Uint8Array?n.content:ut.encode(n.content)}return r.content instanceof Uint8Array?r.content:ut.encode(r.content)}async writeFile(t,s,r){this.writeFileSync(t,s,r)}async appendFile(t,s,r){D(t,"append");let n=T(t),i=this.data.get(n);if(i&&i.type==="directory")throw new Error(`EISDIR: illegal operation on a directory, write '${t}'`);let o=be(r),a=Fe(s,o);if(i?.type==="file"){let l=i;"lazy"in l&&(l=await this.materializeLazy(n,l));let c="content"in l&&l.content instanceof Uint8Array?l.content:ut.encode("content"in l?l.content:""),u=new Uint8Array(c.length+a.length);u.set(c),u.set(a,c.length),this.data.set(n,{type:"file",content:u,mode:l.mode,mtime:new Date})}else this.writeFileSync(t,s,r)}async exists(t){if(t.includes("\0"))return!1;try{let s=this.resolvePathWithSymlinks(t);return this.data.has(s)}catch{return!1}}async stat(t){D(t,"stat");let s=this.resolvePathWithSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, stat '${t}'`);r.type==="file"&&"lazy"in r&&(r=await this.materializeLazy(s,r));let n=0;return r.type==="file"&&"content"in r&&r.content&&(r.content instanceof Uint8Array?n=r.content.length:n=ut.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}async lstat(t){D(t,"lstat");let s=this.resolveIntermediateSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${t}'`);if(r.type==="symlink")return{isFile:!1,isDirectory:!1,isSymbolicLink:!0,mode:r.mode,size:r.target.length,mtime:r.mtime||new Date};r.type==="file"&&"lazy"in r&&(r=await this.materializeLazy(s,r));let n=0;return r.type==="file"&&"content"in r&&r.content&&(r.content instanceof Uint8Array?n=r.content.length:n=ut.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}resolveIntermediateSymlinks(t){let s=T(t);if(s==="/")return"/";let r=s.slice(1).split("/");if(r.length<=1)return s;let n="",i=new Set;for(let o=0;o<r.length-1;o++){let a=r[o];n=`${n}/${a}`;let l=this.data.get(n),c=0,u=40;for(;l&&l.type==="symlink"&&c<u;){if(i.has(n))throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`);i.add(n),n=ct(n,l.target),l=this.data.get(n),c++}if(c>=u)throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`)}return`${n}/${r[r.length-1]}`}resolvePathWithSymlinks(t){let s=T(t);if(s==="/")return"/";let r=s.slice(1).split("/"),n="",i=new Set;for(let o of r){n=`${n}/${o}`;let a=this.data.get(n),l=0,c=40;for(;a&&a.type==="symlink"&&l<c;){if(i.has(n))throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`);i.add(n),n=ct(n,a.target),a=this.data.get(n),l++}if(l>=c)throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`)}return n}async mkdir(t,s){this.mkdirSync(t,s)}mkdirSync(t,s){D(t,"mkdir");let r=T(t);if(this.data.has(r)){if(this.data.get(r)?.type==="file")throw new Error(`EEXIST: file already exists, mkdir '${t}'`);if(!s?.recursive)throw new Error(`EEXIST: directory already exists, mkdir '${t}'`);return}let n=st(r);if(n!=="/"&&!this.data.has(n))if(s?.recursive)this.mkdirSync(n,{recursive:!0});else throw new Error(`ENOENT: no such file or directory, mkdir '${t}'`);this.data.set(r,{type:"directory",mode:493,mtime:new Date})}async readdir(t){return(await this.readdirWithFileTypes(t)).map(r=>r.name)}async readdirWithFileTypes(t){D(t,"scandir");let s=T(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);let n=new Set;for(;r&&r.type==="symlink";){if(n.has(s))throw new Error(`ELOOP: too many levels of symbolic links, scandir '${t}'`);n.add(s),s=ct(s,r.target),r=this.data.get(s)}if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);if(r.type!=="directory")throw new Error(`ENOTDIR: not a directory, scandir '${t}'`);let i=s==="/"?"/":`${s}/`,o=new Map;for(let[a,l]of this.data.entries())if(a!==s&&a.startsWith(i)){let c=a.slice(i.length),u=c.split("/")[0];u&&!c.includes("/",u.length)&&!o.has(u)&&o.set(u,{name:u,isFile:l.type==="file",isDirectory:l.type==="directory",isSymbolicLink:l.type==="symlink"})}return Array.from(o.values()).sort((a,l)=>a.name<l.name?-1:a.name>l.name?1:0)}async rm(t,s){D(t,"rm");let r=T(t),n=this.data.get(r);if(!n){if(s?.force)return;throw new Error(`ENOENT: no such file or directory, rm '${t}'`)}if(n.type==="directory"){let i=await this.readdir(r);if(i.length>0){if(!s?.recursive)throw new Error(`ENOTEMPTY: directory not empty, rm '${t}'`);for(let o of i){let a=Ge(r,o);await this.rm(a,s)}}}this.data.delete(r)}async cp(t,s,r){D(t,"cp"),D(s,"cp");let n=T(t),i=T(s),o=this.data.get(n);if(!o)throw new Error(`ENOENT: no such file or directory, cp '${t}'`);if(o.type==="file")if(this.ensureParentDirs(i),"content"in o){let a=o.content instanceof Uint8Array?new Uint8Array(o.content):o.content;this.data.set(i,{...o,content:a})}else this.data.set(i,{...o});else if(o.type==="symlink")this.ensureParentDirs(i),this.data.set(i,{...o});else if(o.type==="directory"){if(!r?.recursive)throw new Error(`EISDIR: is a directory, cp '${t}'`);await this.mkdir(i,{recursive:!0});let a=await this.readdir(n);for(let l of a){let c=Ge(n,l),u=Ge(i,l);await this.cp(c,u,r)}}}async mv(t,s){await this.cp(t,s,{recursive:!0}),await this.rm(t,{recursive:!0})}getAllPaths(){return Array.from(this.data.keys())}resolvePath(t,s){return qe(t,s)}async chmod(t,s){D(t,"chmod");let r=T(t),n=this.data.get(r);if(!n)throw new Error(`ENOENT: no such file or directory, chmod '${t}'`);n.mode=s}async symlink(t,s){D(s,"symlink");let r=T(s);if(this.data.has(r))throw new Error(`EEXIST: file already exists, symlink '${s}'`);this.ensureParentDirs(r),this.data.set(r,{type:"symlink",target:t,mode:511,mtime:new Date})}async link(t,s){D(t,"link"),D(s,"link");let r=T(t),n=T(s),i=this.data.get(r);if(!i)throw new Error(`ENOENT: no such file or directory, link '${t}'`);if(i.type!=="file")throw new Error(`EPERM: operation not permitted, link '${t}'`);if(this.data.has(n))throw new Error(`EEXIST: file already exists, link '${s}'`);let o=i;"lazy"in o&&(o=await this.materializeLazy(r,o)),this.ensureParentDirs(n),this.data.set(n,{type:"file",content:o.content,mode:o.mode,mtime:o.mtime})}async readlink(t){D(t,"readlink");let s=T(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, readlink '${t}'`);if(r.type!=="symlink")throw new Error(`EINVAL: invalid argument, readlink '${t}'`);return r.target}async realpath(t){D(t,"realpath");let s=this.resolvePathWithSymlinks(t);if(!this.data.has(s))throw new Error(`ENOENT: no such file or directory, realpath '${t}'`);return s}async utimes(t,s,r){D(t,"utimes");let n=T(t),i=this.resolvePathWithSymlinks(n),o=this.data.get(i);if(!o)throw new Error(`ENOENT: no such file or directory, utimes '${t}'`);o.mtime=r}};function go(e){let t=e;return typeof t.mkdirSync=="function"&&typeof t.writeFileSync=="function"}function wo(e,t){e.mkdirSync("/bin",{recursive:!0}),e.mkdirSync("/usr/bin",{recursive:!0}),t&&(e.mkdirSync("/home/user",{recursive:!0}),e.mkdirSync("/tmp",{recursive:!0}))}function vo(e){e.mkdirSync("/dev",{recursive:!0}),e.writeFileSync("/dev/null",""),e.writeFileSync("/dev/zero",new Uint8Array(0)),e.writeFileSync("/dev/stdin",""),e.writeFileSync("/dev/stdout",""),e.writeFileSync("/dev/stderr","")}function bo(e,t){e.mkdirSync("/proc/self/fd",{recursive:!0}),e.writeFileSync("/proc/version",`${Yr}
|
|
1
|
+
import{B as on,C as an,D as de,E as et,F as se,G as ke,H as Kt,I as ln,J as F,K as cn,L as un,M as _e,N as Us,O as Xt,P as H,a as Yr,b as Ms,c as Qr,d as qt,e as ee,f as B,g as fe,h as ne,i as xe,j as He,k as Ws,l as Gt,m as Jr,n as zs,o as en,p as Ee,q as We,r as tn,s as sn,t as Vs,u as Bs,v as Ze,w as rn,x as nn,y as Ae,z as js}from"./chunks/chunk-4XUQHQ6I.js";import{a as Fe,b as Me,c as be}from"./chunks/chunk-R6VWJ2ZL.js";import{c as Fs}from"./chunks/chunk-CWQS3NFK.js";import{a as Mt,b as Wt}from"./chunks/chunk-A5O5YHGN.js";import{a as Ls}from"./chunks/chunk-IPJHKYVM.js";import{a as Ue,b as ve,c as Ct}from"./chunks/chunk-OJDRYQWQ.js";import{a as _t,b as Xr}from"./chunks/chunk-24IMIIXA.js";import{a as Ve,b as me}from"./chunks/chunk-5QMZ5MUS.js";import{a as kt}from"./chunks/chunk-B74TABJS.js";import{a as At,b as zt,c as io,d as Be,e as oo,f as Vt,g as ao,h as Bt,i as lo,j as co}from"./chunks/chunk-AH77CRWX.js";import{a as ye,b as ge,c as ue,d as we,e as Gr,f as j,g as Je,h as jt,i as Ut,j as Kr,k as J,l as Ht,m as je,n as Zt,o as Pe}from"./chunks/chunk-57MC5FQY.js";import"./chunks/chunk-NUFRM6SI.js";import{a as Le}from"./chunks/chunk-3THT3N7L.js";import{a as Ie}from"./chunks/chunk-44UOCSGV.js";import{a as Is}from"./chunks/chunk-DXB73IDG.js";var tt=[{name:"echo",load:async()=>(await import("./chunks/echo-O45JWWI2.js")).echoCommand},{name:"cat",load:async()=>(await import("./chunks/cat-VQEWZT5O.js")).catCommand},{name:"printf",load:async()=>(await import("./chunks/printf-CEKOHUH5.js")).printfCommand},{name:"ls",load:async()=>(await import("./chunks/ls-KSXFZCWH.js")).lsCommand},{name:"mkdir",load:async()=>(await import("./chunks/mkdir-TDEMSB6C.js")).mkdirCommand},{name:"rmdir",load:async()=>(await import("./chunks/rmdir-XTQXT7RK.js")).rmdirCommand},{name:"touch",load:async()=>(await import("./chunks/touch-DX2IJOQ4.js")).touchCommand},{name:"rm",load:async()=>(await import("./chunks/rm-RTZG23RL.js")).rmCommand},{name:"cp",load:async()=>(await import("./chunks/cp-XOYR4ABJ.js")).cpCommand},{name:"mv",load:async()=>(await import("./chunks/mv-Z6MORUFL.js")).mvCommand},{name:"ln",load:async()=>(await import("./chunks/ln-4TRFBYAT.js")).lnCommand},{name:"chmod",load:async()=>(await import("./chunks/chmod-SYMGL4JA.js")).chmodCommand},{name:"pwd",load:async()=>(await import("./chunks/pwd-D4OZ7N27.js")).pwdCommand},{name:"readlink",load:async()=>(await import("./chunks/readlink-MI4GCHJF.js")).readlinkCommand},{name:"head",load:async()=>(await import("./chunks/head-FG33BE3W.js")).headCommand},{name:"tail",load:async()=>(await import("./chunks/tail-EDLAF4WW.js")).tailCommand},{name:"wc",load:async()=>(await import("./chunks/wc-J6YO4AFR.js")).wcCommand},{name:"stat",load:async()=>(await import("./chunks/stat-BT5A227F.js")).statCommand},{name:"grep",load:async()=>(await import("./chunks/grep-7CE2SS3X.js")).grepCommand},{name:"fgrep",load:async()=>(await import("./chunks/grep-7CE2SS3X.js")).fgrepCommand},{name:"egrep",load:async()=>(await import("./chunks/grep-7CE2SS3X.js")).egrepCommand},{name:"rg",load:async()=>(await import("./chunks/rg-GMXITNCP.js")).rgCommand},{name:"sed",load:async()=>(await import("./chunks/sed-HKXUNRIZ.js")).sedCommand},{name:"awk",load:async()=>(await import("./chunks/awk2-IW7TXS45.js")).awkCommand2},{name:"sort",load:async()=>(await import("./chunks/sort-5KALNK6P.js")).sortCommand},{name:"uniq",load:async()=>(await import("./chunks/uniq-DCP6SV3B.js")).uniqCommand},{name:"comm",load:async()=>(await import("./chunks/comm-AXP77KC4.js")).commCommand},{name:"cut",load:async()=>(await import("./chunks/cut-RBX7IXC7.js")).cutCommand},{name:"paste",load:async()=>(await import("./chunks/paste-HIF3YKHC.js")).pasteCommand},{name:"tr",load:async()=>(await import("./chunks/tr-2QSZN4JB.js")).trCommand},{name:"rev",load:async()=>(await import("./chunks/rev-SKETTPXH.js")).rev},{name:"nl",load:async()=>(await import("./chunks/nl-LBU6FPPF.js")).nl},{name:"fold",load:async()=>(await import("./chunks/fold-V23GDLZD.js")).fold},{name:"expand",load:async()=>(await import("./chunks/expand-UMGRCDTC.js")).expand},{name:"unexpand",load:async()=>(await import("./chunks/unexpand-ZTD2RXS2.js")).unexpand},{name:"strings",load:async()=>(await import("./chunks/strings-7VYWRFIZ.js")).strings},{name:"split",load:async()=>(await import("./chunks/split-4CXZNBGE.js")).split},{name:"column",load:async()=>(await import("./chunks/column-DCCLCHUR.js")).column},{name:"join",load:async()=>(await import("./chunks/join-TLHD7S7W.js")).join},{name:"tee",load:async()=>(await import("./chunks/tee-DUMXETDQ.js")).teeCommand},{name:"find",load:async()=>(await import("./chunks/find-DH2ALKQS.js")).findCommand},{name:"basename",load:async()=>(await import("./chunks/basename-AA2KJYZQ.js")).basenameCommand},{name:"dirname",load:async()=>(await import("./chunks/dirname-LEMTZZFS.js")).dirnameCommand},{name:"tree",load:async()=>(await import("./chunks/tree-LYXBS7DC.js")).treeCommand},{name:"du",load:async()=>(await import("./chunks/du-WO2ENHXQ.js")).duCommand},{name:"env",load:async()=>(await import("./chunks/env-GBSZDQLS.js")).envCommand},{name:"printenv",load:async()=>(await import("./chunks/env-GBSZDQLS.js")).printenvCommand},{name:"alias",load:async()=>(await import("./chunks/alias-JE7RI5QX.js")).aliasCommand},{name:"unalias",load:async()=>(await import("./chunks/alias-JE7RI5QX.js")).unaliasCommand},{name:"history",load:async()=>(await import("./chunks/history-J4QRNGRO.js")).historyCommand},{name:"xargs",load:async()=>(await import("./chunks/xargs-LB2QOP6N.js")).xargsCommand},{name:"true",load:async()=>(await import("./chunks/true-WHJNXCHG.js")).trueCommand},{name:"false",load:async()=>(await import("./chunks/true-WHJNXCHG.js")).falseCommand},{name:"clear",load:async()=>(await import("./chunks/clear-5CZ5X4YR.js")).clearCommand},{name:"bash",load:async()=>(await import("./chunks/bash-4WLDO24C.js")).bashCommand},{name:"sh",load:async()=>(await import("./chunks/bash-4WLDO24C.js")).shCommand},{name:"jq",load:async()=>(await import("./chunks/jq-EQZB7JUS.js")).jqCommand},{name:"base64",load:async()=>(await import("./chunks/base64-FJOOBRMC.js")).base64Command},{name:"diff",load:async()=>(await import("./chunks/diff-AYXX5MI5.js")).diffCommand},{name:"date",load:async()=>(await import("./chunks/date-DD7FVA2V.js")).dateCommand},{name:"sleep",load:async()=>(await import("./chunks/sleep-VZFPZFWA.js")).sleepCommand},{name:"timeout",load:async()=>(await import("./chunks/timeout-PWE4AOYD.js")).timeoutCommand},{name:"time",load:async()=>(await import("./chunks/time-U22WPHDM.js")).timeCommand},{name:"seq",load:async()=>(await import("./chunks/seq-RN5ZUASB.js")).seqCommand},{name:"expr",load:async()=>(await import("./chunks/expr-YYCVMXE3.js")).exprCommand},{name:"md5sum",load:async()=>(await import("./chunks/md5sum-XMCB7L5Z.js")).md5sumCommand},{name:"sha1sum",load:async()=>(await import("./chunks/sha1sum-ZHNS7PS4.js")).sha1sumCommand},{name:"sha256sum",load:async()=>(await import("./chunks/sha256sum-YWE2HB65.js")).sha256sumCommand},{name:"file",load:async()=>(await import("./chunks/file-IGDTDPLG.js")).fileCommand},{name:"html-to-markdown",load:async()=>(await import("./chunks/html-to-markdown-AQHC3PHD.js")).htmlToMarkdownCommand},{name:"help",load:async()=>(await import("./chunks/help-VVWX7SA5.js")).helpCommand},{name:"which",load:async()=>(await import("./chunks/which-AFLRHHI7.js")).whichCommand},{name:"tac",load:async()=>(await import("./chunks/tac-74F3WHUM.js")).tac},{name:"hostname",load:async()=>(await import("./chunks/hostname-BK6HG2DE.js")).hostname},{name:"whoami",load:async()=>(await import("./chunks/whoami-DGKU3D2X.js")).whoami},{name:"od",load:async()=>(await import("./chunks/od-O6TPXWVX.js")).od},{name:"gzip",load:async()=>(await import("./chunks/gzip-EVI6YRMT.js")).gzipCommand},{name:"gunzip",load:async()=>(await import("./chunks/gzip-EVI6YRMT.js")).gunzipCommand},{name:"zcat",load:async()=>(await import("./chunks/gzip-EVI6YRMT.js")).zcatCommand}];(typeof __BROWSER__>"u"||!__BROWSER__)&&(tt.push({name:"tar",load:async()=>(await import("./chunks/tar-RKYTUGDT.js")).tarCommand}),tt.push({name:"yq",load:async()=>(await import("./chunks/yq-HBHRGN4X.js")).yqCommand}),tt.push({name:"xan",load:async()=>(await import("./chunks/xan-X7AV7KKG.js")).xanCommand}),tt.push({name:"sqlite3",load:async()=>(await import("./chunks/sqlite3-FXN2MHWU.js")).sqlite3Command}));var Yt=[];(typeof __BROWSER__>"u"||!__BROWSER__)&&(Yt.push({name:"python3",load:async()=>(await import("./chunks/python3-ZR6W2FR3.js")).python3Command}),Yt.push({name:"python",load:async()=>(await import("./chunks/python3-ZR6W2FR3.js")).pythonCommand}));var Qt=[];(typeof __BROWSER__>"u"||!__BROWSER__)&&(Qt.push({name:"js-exec",load:async()=>(await import("./chunks/js-exec-2U7NEXAP.js")).jsExecCommand}),Qt.push({name:"node",load:async()=>(await import("./chunks/js-exec-2U7NEXAP.js")).nodeStubCommand}));var dn=[{name:"curl",load:async()=>(await import("./chunks/curl-47BFPSFW.js")).curlCommand}],fn=new Map;function Jt(e){return{name:e.name,async execute(t,s){let r=fn.get(e.name);if(r||(r=await me.runTrustedAsync(()=>e.load()),fn.set(e.name,r)),s.coverage&&(typeof __BROWSER__>"u"||!__BROWSER__)){let{emitFlagCoverage:n}=await import("./chunks/flag-coverage-Z434UZKN.js");n(s.coverage,e.name,t)}return r.execute(t,s)}}}function uo(){return tt.map(e=>e.name)}function fo(){return dn.map(e=>e.name)}function hn(e){return(e?tt.filter(s=>e.includes(s.name)):tt).map(Jt)}function pn(){return dn.map(Jt)}function ho(){return Yt.map(e=>e.name)}function mn(){return Yt.map(Jt)}function po(){return Qt.map(e=>e.name)}function yn(){return Qt.map(Jt)}function gn(e){return"load"in e&&typeof e.load=="function"}function mo(e,t){return{name:e,trusted:!0,execute:t}}function wn(e){let t=null;return{name:e.name,trusted:!0,async execute(s,r){return t||(t=await e.load()),t.execute(s,r)}}}function T(e){if(!e||e==="/")return"/";let t=e.endsWith("/")&&e!=="/"?e.slice(0,-1):e;t.startsWith("/")||(t=`/${t}`);let s=t.split("/").filter(n=>n&&n!=="."),r=[];for(let n of s)n===".."?r.pop():r.push(n);return`/${r.join("/")}`||"/"}function D(e,t){if(e.includes("\0"))throw new Error(`ENOENT: path contains null byte, ${t} '${e}'`)}function st(e){let t=T(e);if(t==="/")return"/";let s=t.lastIndexOf("/");return s===0?"/":t.slice(0,s)}function qe(e,t){if(t.startsWith("/"))return T(t);let s=e==="/"?`/${t}`:`${e}/${t}`;return T(s)}function Ge(e,t){return e==="/"?`/${t}`:`${e}/${t}`}function ct(e,t){if(t.startsWith("/"))return T(t);let s=st(e);return T(Ge(s,t))}var ut=new TextEncoder;function yo(e){return typeof e=="object"&&e!==null&&!(e instanceof Uint8Array)&&"content"in e}var ze=class{data=new Map;constructor(t){if(this.data.set("/",{type:"directory",mode:493,mtime:new Date}),t)for(let[s,r]of Object.entries(t))typeof r=="function"?this.writeFileLazy(s,r):yo(r)?this.writeFileSync(s,r.content,void 0,{mode:r.mode,mtime:r.mtime}):this.writeFileSync(s,r)}ensureParentDirs(t){let s=st(t);s!=="/"&&(this.data.has(s)||(this.ensureParentDirs(s),this.data.set(s,{type:"directory",mode:493,mtime:new Date})))}writeFileSync(t,s,r,n){D(t,"write");let i=T(t);this.ensureParentDirs(i);let o=be(r),a=Fe(s,o);this.data.set(i,{type:"file",content:a,mode:n?.mode??420,mtime:n?.mtime??new Date})}writeFileLazy(t,s,r){D(t,"write");let n=T(t);this.ensureParentDirs(n),this.data.set(n,{type:"file",lazy:s,mode:r?.mode??420,mtime:r?.mtime??new Date})}async materializeLazy(t,s){let r=await s.lazy(),i={type:"file",content:typeof r=="string"?ut.encode(r):r,mode:s.mode,mtime:s.mtime};return this.data.set(t,i),i}async readFile(t,s){let r=await this.readFileBuffer(t),n=be(s);return Me(r,n)}async readFileBytes(t){let s=await this.readFileBuffer(t);return Me(s,"binary")}async readFileBuffer(t){D(t,"open");let s=this.resolvePathWithSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, open '${t}'`);if(r.type!=="file")throw new Error(`EISDIR: illegal operation on a directory, read '${t}'`);if("lazy"in r){let n=await this.materializeLazy(s,r);return n.content instanceof Uint8Array?n.content:ut.encode(n.content)}return r.content instanceof Uint8Array?r.content:ut.encode(r.content)}async writeFile(t,s,r){this.writeFileSync(t,s,r)}async appendFile(t,s,r){D(t,"append");let n=T(t),i=this.data.get(n);if(i&&i.type==="directory")throw new Error(`EISDIR: illegal operation on a directory, write '${t}'`);let o=be(r),a=Fe(s,o);if(i?.type==="file"){let l=i;"lazy"in l&&(l=await this.materializeLazy(n,l));let c="content"in l&&l.content instanceof Uint8Array?l.content:ut.encode("content"in l?l.content:""),u=new Uint8Array(c.length+a.length);u.set(c),u.set(a,c.length),this.data.set(n,{type:"file",content:u,mode:l.mode,mtime:new Date})}else this.writeFileSync(t,s,r)}async exists(t){if(t.includes("\0"))return!1;try{let s=this.resolvePathWithSymlinks(t);return this.data.has(s)}catch{return!1}}async stat(t){D(t,"stat");let s=this.resolvePathWithSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, stat '${t}'`);r.type==="file"&&"lazy"in r&&(r=await this.materializeLazy(s,r));let n=0;return r.type==="file"&&"content"in r&&r.content&&(r.content instanceof Uint8Array?n=r.content.length:n=ut.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}async lstat(t){D(t,"lstat");let s=this.resolveIntermediateSymlinks(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, lstat '${t}'`);if(r.type==="symlink")return{isFile:!1,isDirectory:!1,isSymbolicLink:!0,mode:r.mode,size:r.target.length,mtime:r.mtime||new Date};r.type==="file"&&"lazy"in r&&(r=await this.materializeLazy(s,r));let n=0;return r.type==="file"&&"content"in r&&r.content&&(r.content instanceof Uint8Array?n=r.content.length:n=ut.encode(r.content).length),{isFile:r.type==="file",isDirectory:r.type==="directory",isSymbolicLink:!1,mode:r.mode,size:n,mtime:r.mtime||new Date}}resolveIntermediateSymlinks(t){let s=T(t);if(s==="/")return"/";let r=s.slice(1).split("/");if(r.length<=1)return s;let n="",i=new Set;for(let o=0;o<r.length-1;o++){let a=r[o];n=`${n}/${a}`;let l=this.data.get(n),c=0,u=40;for(;l&&l.type==="symlink"&&c<u;){if(i.has(n))throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`);i.add(n),n=ct(n,l.target),l=this.data.get(n),c++}if(c>=u)throw new Error(`ELOOP: too many levels of symbolic links, lstat '${t}'`)}return`${n}/${r[r.length-1]}`}resolvePathWithSymlinks(t){let s=T(t);if(s==="/")return"/";let r=s.slice(1).split("/"),n="",i=new Set;for(let o of r){n=`${n}/${o}`;let a=this.data.get(n),l=0,c=40;for(;a&&a.type==="symlink"&&l<c;){if(i.has(n))throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`);i.add(n),n=ct(n,a.target),a=this.data.get(n),l++}if(l>=c)throw new Error(`ELOOP: too many levels of symbolic links, open '${t}'`)}return n}async mkdir(t,s){this.mkdirSync(t,s)}mkdirSync(t,s){D(t,"mkdir");let r=T(t);if(this.data.has(r)){if(this.data.get(r)?.type==="file")throw new Error(`EEXIST: file already exists, mkdir '${t}'`);if(!s?.recursive)throw new Error(`EEXIST: directory already exists, mkdir '${t}'`);return}let n=st(r);if(n!=="/"&&!this.data.has(n))if(s?.recursive)this.mkdirSync(n,{recursive:!0});else throw new Error(`ENOENT: no such file or directory, mkdir '${t}'`);this.data.set(r,{type:"directory",mode:493,mtime:new Date})}async readdir(t){return(await this.readdirWithFileTypes(t)).map(r=>r.name)}async readdirWithFileTypes(t){D(t,"scandir");let s=T(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);let n=new Set;for(;r&&r.type==="symlink";){if(n.has(s))throw new Error(`ELOOP: too many levels of symbolic links, scandir '${t}'`);n.add(s),s=ct(s,r.target),r=this.data.get(s)}if(!r)throw new Error(`ENOENT: no such file or directory, scandir '${t}'`);if(r.type!=="directory")throw new Error(`ENOTDIR: not a directory, scandir '${t}'`);let i=s==="/"?"/":`${s}/`,o=new Map;for(let[a,l]of this.data.entries())if(a!==s&&a.startsWith(i)){let c=a.slice(i.length),u=c.split("/")[0];u&&!c.includes("/",u.length)&&!o.has(u)&&o.set(u,{name:u,isFile:l.type==="file",isDirectory:l.type==="directory",isSymbolicLink:l.type==="symlink"})}return Array.from(o.values()).sort((a,l)=>a.name<l.name?-1:a.name>l.name?1:0)}async rm(t,s){D(t,"rm");let r=T(t),n=this.data.get(r);if(!n){if(s?.force)return;throw new Error(`ENOENT: no such file or directory, rm '${t}'`)}if(n.type==="directory"){let i=await this.readdir(r);if(i.length>0){if(!s?.recursive)throw new Error(`ENOTEMPTY: directory not empty, rm '${t}'`);for(let o of i){let a=Ge(r,o);await this.rm(a,s)}}}this.data.delete(r)}async cp(t,s,r){D(t,"cp"),D(s,"cp");let n=T(t),i=T(s),o=this.data.get(n);if(!o)throw new Error(`ENOENT: no such file or directory, cp '${t}'`);if(o.type==="file")if(this.ensureParentDirs(i),"content"in o){let a=o.content instanceof Uint8Array?new Uint8Array(o.content):o.content;this.data.set(i,{...o,content:a})}else this.data.set(i,{...o});else if(o.type==="symlink")this.ensureParentDirs(i),this.data.set(i,{...o});else if(o.type==="directory"){if(!r?.recursive)throw new Error(`EISDIR: is a directory, cp '${t}'`);await this.mkdir(i,{recursive:!0});let a=await this.readdir(n);for(let l of a){let c=Ge(n,l),u=Ge(i,l);await this.cp(c,u,r)}}}async mv(t,s){await this.cp(t,s,{recursive:!0}),await this.rm(t,{recursive:!0})}getAllPaths(){return Array.from(this.data.keys())}resolvePath(t,s){return qe(t,s)}async chmod(t,s){D(t,"chmod");let r=T(t),n=this.data.get(r);if(!n)throw new Error(`ENOENT: no such file or directory, chmod '${t}'`);n.mode=s}async symlink(t,s){D(s,"symlink");let r=T(s);if(this.data.has(r))throw new Error(`EEXIST: file already exists, symlink '${s}'`);this.ensureParentDirs(r),this.data.set(r,{type:"symlink",target:t,mode:511,mtime:new Date})}async link(t,s){D(t,"link"),D(s,"link");let r=T(t),n=T(s),i=this.data.get(r);if(!i)throw new Error(`ENOENT: no such file or directory, link '${t}'`);if(i.type!=="file")throw new Error(`EPERM: operation not permitted, link '${t}'`);if(this.data.has(n))throw new Error(`EEXIST: file already exists, link '${s}'`);let o=i;"lazy"in o&&(o=await this.materializeLazy(r,o)),this.ensureParentDirs(n),this.data.set(n,{type:"file",content:o.content,mode:o.mode,mtime:o.mtime})}async readlink(t){D(t,"readlink");let s=T(t),r=this.data.get(s);if(!r)throw new Error(`ENOENT: no such file or directory, readlink '${t}'`);if(r.type!=="symlink")throw new Error(`EINVAL: invalid argument, readlink '${t}'`);return r.target}async realpath(t){D(t,"realpath");let s=this.resolvePathWithSymlinks(t);if(!this.data.has(s))throw new Error(`ENOENT: no such file or directory, realpath '${t}'`);return s}async utimes(t,s,r){D(t,"utimes");let n=T(t),i=this.resolvePathWithSymlinks(n),o=this.data.get(i);if(!o)throw new Error(`ENOENT: no such file or directory, utimes '${t}'`);o.mtime=r}};function go(e){let t=e;return typeof t.mkdirSync=="function"&&typeof t.writeFileSync=="function"}function wo(e,t){e.mkdirSync("/bin",{recursive:!0}),e.mkdirSync("/usr/bin",{recursive:!0}),t&&(e.mkdirSync("/home/user",{recursive:!0}),e.mkdirSync("/tmp",{recursive:!0}))}function vo(e){e.mkdirSync("/dev",{recursive:!0}),e.writeFileSync("/dev/null",""),e.writeFileSync("/dev/zero",new Uint8Array(0)),e.writeFileSync("/dev/stdin",""),e.writeFileSync("/dev/stdout",""),e.writeFileSync("/dev/stderr","")}function bo(e,t){e.mkdirSync("/proc/self/fd",{recursive:!0}),e.writeFileSync("/proc/version",`${Yr}
|
|
2
2
|
`),e.writeFileSync("/proc/self/exe","/bin/bash"),e.writeFileSync("/proc/self/cmdline","bash\0"),e.writeFileSync("/proc/self/comm",`bash
|
|
3
3
|
`),e.writeFileLazy?e.writeFileLazy("/proc/self/status",()=>Ms(t)):e.writeFileSync("/proc/self/status",Ms(t)),e.writeFileSync("/proc/self/fd/0","/dev/stdin"),e.writeFileSync("/proc/self/fd/1","/dev/stdout"),e.writeFileSync("/proc/self/fd/2","/dev/stderr")}function vn(e,t,s={pid:1,ppid:0,uid:1e3,gid:1e3}){go(e)&&(wo(e,t),vo(e),bo(e,s))}var Eo=["allexport","errexit","noglob","noclobber","noexec","nounset","pipefail","posix","verbose","xtrace"],$o=["braceexpand","hashall","interactive-comments"];function Zs(e){let t=[],s=[...$o.map(r=>({name:r,enabled:!0})),...Eo.map(r=>({name:r,enabled:e[r]}))].sort((r,n)=>r.name.localeCompare(n.name));for(let r of s)r.enabled&&t.push(r.name);return t.join(":")}function dt(e){e.state.env.set("SHELLOPTS",Zs(e.state.options))}var So=["dotglob","expand_aliases","extglob","failglob","globskipdots","globstar","lastpipe","nocaseglob","nocasematch","nullglob","xpg_echo"];function qs(e){let t=[];for(let s of So)e[s]&&t.push(s);return t.join(":")}function Gs(e){e.state.env.set("BASHOPTS",qs(e.state.shoptOptions))}var Po="BASH_ALIAS_";function bn(e){return e.parts.length!==1?!1:e.parts[0].type==="Literal"}function En(e){if(e.parts.length!==1)return null;let t=e.parts[0];return t.type==="Literal"?t.value:null}function $n(e,t){return e.env.get(`${Po}${t}`)}function Ks(e,t,s){if(!t.name||!bn(t.name))return t;let r=En(t.name);if(!r)return t;let n=$n(e,r);if(!n||s.has(r))return t;try{s.add(r);let i=new B,o=n,a=n.endsWith(" ");if(!a)for(let f of t.args){let d=Pn(f);o+=` ${d}`}let l;try{l=i.parse(o)}catch(f){if(f instanceof qt)throw f;return t}if(l.statements.length!==1||l.statements[0].pipelines.length!==1||l.statements[0].pipelines[0].commands.length!==1)return Sn(t,n);let c=l.statements[0].pipelines[0].commands[0];if(c.type!=="SimpleCommand")return Sn(t,n);let u={...c,assignments:[...t.assignments,...c.assignments],redirections:[...c.redirections,...t.redirections],line:t.line};if(a&&t.args.length>0&&(u={...u,args:[...u.args,...t.args]},u.args.length>0)){let f=u.args[0];if(bn(f)){let d=En(f);if(d&&$n(e,d)){let h={type:"SimpleCommand",name:f,args:u.args.slice(1),assignments:[],redirections:[]},m=Ks(e,h,s);m!==h&&(u={...u,name:m.name,args:[...m.args]})}}}return u}catch(i){throw s.delete(r),i}}function Sn(e,t){let s=t;for(let o of e.args){let a=Pn(o);s+=` ${a}`}let r=new B,n=r.parseWordFromString("eval",!1,!1),i=r.parseWordFromString(`'${s.replace(/'/g,"'\\''")}'`,!1,!1);return{type:"SimpleCommand",name:n,args:[i],assignments:e.assignments,redirections:e.redirections,line:e.line}}function Pn(e){let t="";for(let s of e.parts)switch(s.type){case"Literal":t+=s.value.replace(/([\s"'$`\\*?[\]{}()<>|&;#!])/g,"\\$1");break;case"SingleQuoted":t+=`'${s.value}'`;break;case"DoubleQuoted":t+=`"${s.parts.map(r=>r.type==="Literal"?r.value:`$${r.type}`).join("")}"`;break;case"ParameterExpansion":t+=`\${${s.parameter}}`;break;case"CommandSubstitution":t+="$(...)";break;case"ArithmeticExpansion":t+=`$((${s.expression}))`;break;case"Glob":t+=s.pattern;break;default:break}return t}async function An(e,t){let s=t.parts.map(u=>u.type==="Literal"?u.value:"\0").join(""),r=s.match(/^([a-zA-Z_][a-zA-Z0-9_]*)=\(/);if(!r||!s.endsWith(")"))return null;let n=r[1],i=[],o=!1,a="",l=!1;for(let u of t.parts)if(u.type==="Literal"){let f=u.value;if(!o){let d=f.indexOf("=(");d!==-1&&(o=!0,f=f.slice(d+2))}if(o){f.endsWith(")")&&(f=f.slice(0,-1));let d=f.split(/(\s+)/);for(let h of d)/^\s+$/.test(h)?(a||l)&&(i.push(a),a="",l=!1):h&&(a+=h)}}else if(o)if(u.type==="BraceExpansion")if(/^\[.+\]=/.test(a))a+=Gt({type:"Word",parts:[u]});else{(a||l)&&(i.push(a),a="",l=!1);let d=await _e(e,{type:"Word",parts:[u]});i.push(...d.values)}else{(u.type==="SingleQuoted"||u.type==="DoubleQuoted"||u.type==="Escaped")&&(l=!0);let f=await F(e,{type:"Word",parts:[u]});a+=f}(a||l)&&i.push(a);let c=i.map(u=>/^\[.+\]=/.test(u)?u:u===""?"''":/[\s"'\\$`!*?[\]{}|&;<>()]/.test(u)&&!u.startsWith("'")&&!u.startsWith('"')?`'${u.replace(/'/g,"'\\''")}'`:u);return`${n}=(${c.join(" ")})`}async function kn(e,t){let s=-1,r=-1,n=!1;for(let p=0;p<t.parts.length;p++){let g=t.parts[p];if(g.type==="Literal"){let w=g.value.indexOf("+=");if(w!==-1){let v=g.value.slice(0,w);if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(v)){s=p,r=w,n=!0;break}if(/^[a-zA-Z_][a-zA-Z0-9_]*\[[^\]]+\]$/.test(v)){s=p,r=w,n=!0;break}}let y=g.value.indexOf("=");if(y!==-1&&(y===0||g.value[y-1]!=="+")){let v=g.value.slice(0,y);if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(v)||/^[a-zA-Z_][a-zA-Z0-9_]*\[[^\]]+\]$/.test(v)){s=p,r=y;break}}}}if(s===-1)return null;let i=t.parts.slice(0,s),o=t.parts[s];if(o.type!=="Literal")return null;let a=n?2:1,l=o.value.slice(0,r),c=o.value.slice(r+a),u=t.parts.slice(s+1),f="";for(let p of i)f+=await F(e,{type:"Word",parts:[p]});f+=l;let d={type:"Word",parts:c!==""?[{type:"Literal",value:c},...u]:u},h=d.parts.length>0?await F(e,d):"";return`${f}${n?"+=":"="}${h}`}var Ao=["tar","yq","xan","sqlite3","python3","python"];function _n(e){return Ao.includes(e)}var W=Object.freeze({stdout:"",stderr:"",exitCode:0});function z(e=""){return{stdout:e,stderr:"",exitCode:0}}function _(e,t=1){return{stdout:"",stderr:e,exitCode:t}}function C(e,t,s){return{stdout:e,stderr:t,exitCode:s}}function Q(e){return{stdout:"",stderr:"",exitCode:e?0:1}}function Te(e,t,s="",r=""){throw new J(e,t,s,r)}function le(e){let t=e.state.fileDescriptors;if(t&&t.size>=e.limits.maxFileDescriptors)throw new J(`too many open file descriptors (max ${e.limits.maxFileDescriptors})`,"file_descriptors")}function Xs(e,t){if(e.state.loopDepth===0){if(e.state.parentHasLoopContext)throw new je;return W}if(t.length>1)throw new j(1,"",`bash: break: too many arguments
|
|
4
4
|
`);let s=1;if(t.length>0){let r=Number.parseInt(t[0],10);if(Number.isNaN(r)||r<1)throw new j(128,"",`bash: break: ${t[0]}: numeric argument required
|
|
@@ -651,7 +651,7 @@ sys 0m0.000s
|
|
|
651
651
|
`,1)}}if(n=Math.max(...i.map(([a])=>typeof a=="number"?a:0))+1+n,n<0){let a=e.state.currentLine;return{index:0,error:C("",`bash: line ${a}: ${t}[${s}]: bad array subscript
|
|
652
652
|
`,1)}}}return{index:n}}async function Ia(e,t,s,r,n,i){let o="",a=s,l=null;if(Ee(e,s)){let f=nn(e,s,r);if(f===void 0)return{continueToNext:!1,xtraceOutput:"",error:C("",`bash: ${s}: circular name reference
|
|
653
653
|
`,1)};if(f===null)return{continueToNext:!0,xtraceOutput:""};a=f;let d=a.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);d&&(l={arrayName:d[1],subscriptExpr:d[2]},a=d[1])}if(et(e,a)){if(t.name)return o+=`bash: ${a}: readonly variable
|
|
654
|
-
`,{continueToNext:!0,xtraceOutput:o};let f=se(e,a);if(f)return{continueToNext:!1,xtraceOutput:"",error:f}}let c;if(xt(e,a))try{let f=new B;if(n){let h=`(${e.state.env.get(a)||"0"}) + (${r})`,m=ee(f,h);c=String(await H(e,m.expression))}else{let d=ee(f,r);c=String(await H(e,d.expression))}}catch{c="0"}else{let{isArray:f}=await import("./chunks/expansion-
|
|
654
|
+
`,{continueToNext:!0,xtraceOutput:o};let f=se(e,a);if(f)return{continueToNext:!1,xtraceOutput:"",error:f}}let c;if(xt(e,a))try{let f=new B;if(n){let h=`(${e.state.env.get(a)||"0"}) + (${r})`,m=ee(f,h);c=String(await H(e,m.expression))}else{let d=ee(f,r);c=String(await H(e,d.expression))}}catch{c="0"}else{let{isArray:f}=await import("./chunks/expansion-XT73ZVQC.js"),d=f(e,a)?`${a}_0`:a;c=n?(e.state.env.get(d)||"")+r:r}c=gt(e,a,c),o+=await xi(e,a,c);let u=a;if(l)u=await La(e,l);else{let{isArray:f}=await import("./chunks/expansion-XT73ZVQC.js");f(e,a)&&(u=`${a}_0`)}return t.name?(i.set(u,e.state.env.get(u)),e.state.env.set(u,c)):(e.state.env.set(u,c),e.state.options.allexport&&(e.state.exportedVars=e.state.exportedVars||new Set,e.state.exportedVars.add(a)),e.state.tempEnvBindings?.some(f=>f.has(a))&&(e.state.mutatedTempEnvVars=e.state.mutatedTempEnvVars||new Set,e.state.mutatedTempEnvVars.add(a))),{continueToNext:!1,xtraceOutput:o}}async function La(e,t){let{arrayName:s,subscriptExpr:r}=t;if(e.state.associativeArrays?.has(s))return Ri(e,s,r);let i;if(/^-?\d+$/.test(r))i=Number.parseInt(r,10);else{try{let o=new B,a=ee(o,r);i=await H(e,a.expression,!1)}catch{let o=e.state.env.get(r);i=o?Number.parseInt(o,10):0}Number.isNaN(i)&&(i=0)}if(i<0){let o=Ae(e,s);o.length>0&&(i=Math.max(...o.map(l=>l[0]))+1+i)}return`${s}_${i}`}async function Ii(e,t,s,r){let n=await Re(e,t.redirections);if(n)return n;let i=new Map(e.state.env),o=e.state.cwd,a={...e.state.options},l=new Map(e.state.functions),c=e.state.localScopes,u=e.state.localVarStack,f=e.state.localVarDepth,d=e.state.fullyUnsetLocals;if(e.state.localScopes=c.map($=>new Map($)),u){e.state.localVarStack=new Map;for(let[$,O]of u.entries())e.state.localVarStack.set($,O.map(A=>({...A})))}f&&(e.state.localVarDepth=new Map(f)),d&&(e.state.fullyUnsetLocals=new Map(d));let h=e.state.loopDepth,m=e.state.parentHasLoopContext;e.state.parentHasLoopContext=h>0,e.state.loopDepth=0;let p=e.state.lastArg,g=e.state.bashPid;e.state.bashPid=e.state.nextVirtualPid++;let w=e.state.groupStdin;s&&(e.state.groupStdin=s);let y="",v="",b=0,S=()=>{e.state.env=i,e.state.cwd=o,e.state.options=a,e.state.functions=l,e.state.localScopes=c,e.state.localVarStack=u,e.state.localVarDepth=f,e.state.fullyUnsetLocals=d,e.state.loopDepth=h,e.state.parentHasLoopContext=m,e.state.groupStdin=w,e.state.bashPid=g,e.state.lastArg=p};try{for(let $ of t.body){let O=await r($);y+=O.stdout,v+=O.stderr,b=O.exitCode}}catch($){if(S(),$ instanceof J)throw $;if($ instanceof je){y+=$.stdout,v+=$.stderr;let A=C(y,v,0);return K(e,A,t.redirections)}if($ instanceof ye||$ instanceof ge){y+=$.stdout,v+=$.stderr;let A=C(y,v,0);return K(e,A,t.redirections)}if($ instanceof j){y+=$.stdout,v+=$.stderr;let A=C(y,v,$.exitCode);return K(e,A,t.redirections)}if($ instanceof ue){y+=$.stdout,v+=$.stderr;let A=C(y,v,$.exitCode);return K(e,A,t.redirections)}if($ instanceof we){let A=C(y+$.stdout,v+$.stderr,$.exitCode);return K(e,A,t.redirections)}let O=C(y,`${v}${Ie($)}
|
|
655
655
|
`,1);return K(e,O,t.redirections)}S();let E=C(y,v,b);return K(e,E,t.redirections)}async function Li(e,t,s,r){let n="",i="",o=0,a=await ms(e,t.redirections);if(a)return a;let l=s;for(let f of t.redirections)if((f.operator==="<<"||f.operator==="<<-")&&f.target.type==="HereDoc"){let d=f.target,h=await F(e,d.content);d.stripTabs&&(h=h.split(`
|
|
656
656
|
`).map(p=>p.replace(/^\t+/,"")).join(`
|
|
657
657
|
`));let m=f.fd??0;m!==0?(e.state.fileDescriptors||(e.state.fileDescriptors=new Map),le(e),e.state.fileDescriptors.set(m,h)):l=h}else if(f.operator==="<<<"&&f.target.type==="Word")l=`${await F(e,f.target)}
|