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
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-HFMIBJIJ.js";import"./chunk-4PRVMER6.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-C6FRS5UB.js";import"./chunk-63XSH3IT.js";import"./chunk-DHC3ILJI.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{a as awkCommand2,b as flagsForFuzzing};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as _,c as W}from"./chunk-D5WP4CKS.js";import{k as T}from"./chunk-
|
|
2
|
+
import{a as _,c as W}from"./chunk-D5WP4CKS.js";import{k as T}from"./chunk-DHC3ILJI.js";import{a as D}from"./chunk-4VDEBYW7.js";import{a as N,b as A}from"./chunk-GTNBSMZR.js";import{c as H,e as L}from"./chunk-KGOUQS5A.js";var z=H(C=>{(function(){"use strict";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(c){return e(n(c),arguments)}function r(c,i){return a.apply(null,[c].concat(i||[]))}function e(c,i){var u=1,l=c.length,o,m="",p,d,f,h,y,S,k,x;for(p=0;p<l;p++)if(typeof c[p]=="string")m+=c[p];else if(typeof c[p]=="object"){if(f=c[p],f.keys)for(o=i[u],d=0;d<f.keys.length;d++){if(o==null)throw new Error(a('[sprintf] Cannot access property "%s" of undefined value "%s"',f.keys[d],f.keys[d-1]));o=o[f.keys[d]]}else f.param_no?o=i[f.param_no]:o=i[u++];if(t.not_type.test(f.type)&&t.not_primitive.test(f.type)&&o instanceof Function&&(o=o()),t.numeric_arg.test(f.type)&&typeof o!="number"&&isNaN(o))throw new TypeError(a("[sprintf] expecting number but found %T",o));switch(t.number.test(f.type)&&(k=o>=0),f.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o=parseInt(o,10);break;case"j":o=JSON.stringify(o,null,f.width?parseInt(f.width):0);break;case"e":o=f.precision?parseFloat(o).toExponential(f.precision):parseFloat(o).toExponential();break;case"f":o=f.precision?parseFloat(o).toFixed(f.precision):parseFloat(o);break;case"g":o=f.precision?String(Number(o.toPrecision(f.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o=String(o),o=f.precision?o.substring(0,f.precision):o;break;case"t":o=String(!!o),o=f.precision?o.substring(0,f.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=f.precision?o.substring(0,f.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=f.precision?o.substring(0,f.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase();break}t.json.test(f.type)?m+=o:(t.number.test(f.type)&&(!k||f.sign)?(x=k?"+":"-",o=o.toString().replace(t.sign,"")):x="",y=f.pad_char?f.pad_char==="0"?"0":f.pad_char.charAt(1):" ",S=f.width-(x+o).length,h=f.width&&S>0?y.repeat(S):"",m+=f.align?x+o+h:y==="0"?x+h+o:h+x+o)}return m}var s=Object.create(null);function n(c){if(s[c])return s[c];for(var i=c,u,l=[],o=0;i;){if((u=t.text.exec(i))!==null)l.push(u[0]);else if((u=t.modulo.exec(i))!==null)l.push("%");else if((u=t.placeholder.exec(i))!==null){if(u[2]){o|=1;var m=[],p=u[2],d=[];if((d=t.key.exec(p))!==null)for(m.push(d[1]);(p=p.substring(d[0].length))!=="";)if((d=t.key_access.exec(p))!==null)m.push(d[1]);else if((d=t.index_access.exec(p))!==null)m.push(d[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=m}else o|=2;if(o===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");l.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");i=i.substring(u[0].length)}return s[c]=l}typeof C<"u"&&(C.sprintf=a,C.vsprintf=r),typeof window<"u"&&(window.sprintf=a,window.vsprintf=r,typeof define=="function"&&define.amd&&define(function(){return{sprintf:a,vsprintf:r}}))})()});var $=L(z(),1);function P(t,a,r){let e=new Date(a*1e3),s="",n=0;for(;n<t.length;)if(t[n]==="%"&&n+1<t.length){let c=t[n+1],i=R(e,c,r);i!==null?(s+=i,n+=2):(s+=t[n],n++)}else s+=t[n],n++;return s}function G(t,a){let r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",hour12:!1,timeZone:a};try{let s=new Intl.DateTimeFormat("en-US",r).formatToParts(t),n=u=>s.find(l=>l.type===u)?.value??"",c=new Map([["Sun",0],["Mon",1],["Tue",2],["Wed",3],["Thu",4],["Fri",5],["Sat",6]]),i=n("weekday");return{year:Number.parseInt(n("year"),10)||t.getFullYear(),month:Number.parseInt(n("month"),10)||t.getMonth()+1,day:Number.parseInt(n("day"),10)||t.getDate(),hour:Number.parseInt(n("hour"),10)||t.getHours(),minute:Number.parseInt(n("minute"),10)||t.getMinutes(),second:Number.parseInt(n("second"),10)||t.getSeconds(),weekday:c.get(i)??t.getDay()}}catch{return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),weekday:t.getDay()}}}function R(t,a,r){let e=G(t,r),s=(u,l=2)=>String(u).padStart(l,"0"),n=Z(e.year,e.month,e.day),c=j(e.year,e.month,e.day,e.weekday,0),i=j(e.year,e.month,e.day,e.weekday,1);switch(a){case"a":return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][e.weekday];case"A":return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.weekday];case"b":case"h":return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.month-1];case"B":return["January","February","March","April","May","June","July","August","September","October","November","December"][e.month-1];case"c":return`${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][e.weekday]} ${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.month-1]} ${String(e.day).padStart(2," ")} ${s(e.hour)}:${s(e.minute)}:${s(e.second)} ${e.year}`;case"C":return s(Math.floor(e.year/100));case"d":return s(e.day);case"D":return`${s(e.month)}/${s(e.day)}/${s(e.year%100)}`;case"e":return String(e.day).padStart(2," ");case"F":return`${e.year}-${s(e.month)}-${s(e.day)}`;case"g":return s(O(e.year,e.month,e.day)%100);case"G":return String(O(e.year,e.month,e.day));case"H":return s(e.hour);case"I":return s(e.hour%12||12);case"j":return String(n).padStart(3,"0");case"k":return String(e.hour).padStart(2," ");case"l":return String(e.hour%12||12).padStart(2," ");case"m":return s(e.month);case"M":return s(e.minute);case"n":return`
|
|
3
3
|
`;case"N":return"000000000";case"p":return e.hour<12?"AM":"PM";case"P":return e.hour<12?"am":"pm";case"r":return`${s(e.hour%12||12)}:${s(e.minute)}:${s(e.second)} ${e.hour<12?"AM":"PM"}`;case"R":return`${s(e.hour)}:${s(e.minute)}`;case"s":return String(Math.floor(t.getTime()/1e3));case"S":return s(e.second);case"t":return" ";case"T":return`${s(e.hour)}:${s(e.minute)}:${s(e.second)}`;case"u":return String(e.weekday===0?7:e.weekday);case"U":return s(c);case"V":return s(Q(e.year,e.month,e.day));case"w":return String(e.weekday);case"W":return s(i);case"x":return`${s(e.month)}/${s(e.day)}/${s(e.year%100)}`;case"X":return`${s(e.hour)}:${s(e.minute)}:${s(e.second)}`;case"y":return s(e.year%100);case"Y":return String(e.year);case"z":return V(t,r);case"Z":return q(t,r);case"%":return"%";default:return null}}function V(t,a){if(!a){let c=-t.getTimezoneOffset(),i=c>=0?"+":"-",u=Math.floor(Math.abs(c)/60),l=Math.abs(c)%60;return`${i}${String(u).padStart(2,"0")}${String(l).padStart(2,"0")}`}try{let u=new Intl.DateTimeFormat("en-US",{timeZone:a,timeZoneName:"longOffset"}).formatToParts(t).find(l=>l.type==="timeZoneName");if(u){let l=u.value.match(/GMT([+-])(\d{2}):(\d{2})/);if(l)return`${l[1]}${l[2]}${l[3]}`;if(u.value==="GMT"||u.value==="UTC")return"+0000"}}catch{}let r=-t.getTimezoneOffset(),e=r>=0?"+":"-",s=Math.floor(Math.abs(r)/60),n=Math.abs(r)%60;return`${e}${String(s).padStart(2,"0")}${String(n).padStart(2,"0")}`}function q(t,a){try{return new Intl.DateTimeFormat("en-US",{timeZone:a,timeZoneName:"short"}).formatToParts(t).find(n=>n.type==="timeZoneName")?.value??"UTC"}catch{return"UTC"}}function Z(t,a,r){let e=[31,28,31,30,31,30,31,31,30,31,30,31];(t%4===0&&t%100!==0||t%400===0)&&(e[1]=29);let n=r;for(let c=0;c<a-1;c++)n+=e[c];return n}function j(t,a,r,e,s){let n=Z(t,a,r),u=(new Date(t,0,1).getDay()-s+7)%7,l=(e-s+7)%7,o=n-1+u;return Math.floor((o-l+7)/7)}function Q(t,a,r){let e=new Date(t,a-1,r,12,0,0);e.setDate(e.getDate()+3-(e.getDay()+6)%7);let s=new Date(e.getFullYear(),0,4);s.setDate(s.getDate()+3-(s.getDay()+6)%7);let n=e.getTime()-s.getTime();return 1+Math.round(n/(10080*60*1e3))}function O(t,a,r){let e=new Date(t,a-1,r,12,0,0);return e.setDate(e.getDate()+3-(e.getDay()+6)%7),e.getFullYear()}function B(t){let a="",r=0;for(;r<t.length;){let e=t[r];if(e<128){a+=String.fromCharCode(e),r++;continue}if((e&224)===192){if(r+1<t.length&&(t[r+1]&192)===128&&e>=194){let s=(e&31)<<6|t[r+1]&63;a+=String.fromCharCode(s),r+=2;continue}a+=String.fromCharCode(e),r++;continue}if((e&240)===224){if(r+2<t.length&&(t[r+1]&192)===128&&(t[r+2]&192)===128){if(e===224&&t[r+1]<160){a+=String.fromCharCode(e),r++;continue}let s=(e&15)<<12|(t[r+1]&63)<<6|t[r+2]&63;if(s>=55296&&s<=57343){a+=String.fromCharCode(e),r++;continue}a+=String.fromCharCode(s),r+=3;continue}a+=String.fromCharCode(e),r++;continue}if((e&248)===240&&e<=244){if(r+3<t.length&&(t[r+1]&192)===128&&(t[r+2]&192)===128&&(t[r+3]&192)===128){if(e===240&&t[r+1]<144){a+=String.fromCharCode(e),r++;continue}let s=(e&7)<<18|(t[r+1]&63)<<12|(t[r+2]&63)<<6|t[r+3]&63;if(s>1114111){a+=String.fromCharCode(e),r++;continue}a+=String.fromCodePoint(s),r+=4;continue}a+=String.fromCharCode(e),r++;continue}a+=String.fromCharCode(e),r++}return a}var K={name:"printf",summary:"format and print data",usage:"printf [-v var] FORMAT [ARGUMENT...]",options:[" -v var assign the output to shell variable VAR rather than display it"," --help display this help and exit"],notes:["FORMAT controls the output like in C printf.","Escape sequences: \\n (newline), \\t (tab), \\\\ (backslash)","Format specifiers: %s (string), %d (integer), %f (float), %x (hex), %o (octal), %% (literal %)","Width and precision: %10s (width 10), %.2f (2 decimal places), %010d (zero-padded)","Flags: %- (left-justify), %+ (show sign), %0 (zero-pad)"]},ge={name:"printf",async execute(t,a){if(A(t))return N(K);if(t.length===0)return{stdout:"",stderr:`printf: usage: printf format [arguments]
|
|
4
4
|
`,exitCode:2};let r=null,e=0;for(;e<t.length;){let c=t[e];if(c==="--"){e++;break}if(c==="-v"){if(e+1>=t.length)return{stdout:"",stderr:`printf: -v: option requires an argument
|
|
5
5
|
`,exitCode:1};if(r=t[e+1],!/^[a-zA-Z_][a-zA-Z0-9_]*(\[[a-zA-Z0-9_@*"'$]+\])?$/.test(r))return{stdout:"",stderr:`printf: \`${r}': not a valid identifier
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as S,b as V}from"./chunk-
|
|
2
|
+
import{a as S,b as V}from"./chunk-TA5OOF5J.js";import{d as O}from"./chunk-V7ZOPVQS.js";import{a as R,b as T}from"./chunk-MO4RPBN2.js";import{a as F}from"./chunk-YU6OGPZR.js";import{a as M}from"./chunk-S7KZBLGH.js";import{a as E}from"./chunk-63XSH3IT.js";import{k as q}from"./chunk-DHC3ILJI.js";import{a as I}from"./chunk-RLNOQILG.js";import{a as A,b as L,c as J}from"./chunk-GTNBSMZR.js";function W(t){switch(t){case"\b":return"\\b";case"\f":return"\\f";case`
|
|
3
3
|
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return`\\u${t.charCodeAt(0).toString(16).padStart(4,"0")}`}}function _(t){let n="",s=!1,l=!1;for(let a=0;a<t.length;a++){let r=t[a];if(l){n+=r,l=!1;continue}if(r==="\\"){n+=r,l=!0;continue}if(r==='"'){n+=r,s=!s;continue}if(s&&r.charCodeAt(0)<=31){n+=W(r);continue}n+=r}return n}function N(t,n,s){return JSON.parse(_(t.slice(n,s)))}function B(t){let n=[],s=0,l=t.length;for(;s<l;){for(;s<l&&/\s/.test(t[s]);)s++;if(s>=l)break;let a=s,r=t[s];if(r==="{"||r==="["){let f=r,u=r==="{"?"}":"]",c=1,p=!1,h=!1;for(s++;s<l&&c>0;){let g=t[s];h?h=!1:g==="\\"?h=!0:g==='"'?p=!p:p||(g===f?c++:g===u&&c--),s++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${s} (unclosed ${f})`);n.push(O(N(t,a,s)))}else if(r==='"'){let f=!1;for(s++;s<l;){let u=t[s];if(f)f=!1;else if(u==="\\")f=!0;else if(u==='"'){s++;break}s++}n.push(O(N(t,a,s)))}else if(r==="-"||r>="0"&&r<="9"){for(;s<l&&/[\d.eE+-]/.test(t[s]);)s++;n.push(O(N(t,a,s)))}else if(t.slice(s,s+4)==="true")n.push(!0),s+=4;else if(t.slice(s,s+5)==="false")n.push(!1),s+=5;else if(t.slice(s,s+4)==="null")n.push(null),s+=4;else{let f=t.slice(s,s+10);throw new Error(`Invalid JSON at position ${a}: unexpected '${f.split(/\s/)[0]}'`)}}return n}var X={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-R, --raw-input read input as raw strings, not JSON","-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --arg name value bind $name to string value"," --tab use tabs for indentation"," --help display this help and exit"]};function x(t,n,s,l,a,r=0){if(t===null||t===void 0)return"null";if(typeof t=="boolean")return String(t);if(typeof t=="number")return Number.isFinite(t)?String(t):"null";if(typeof t=="string")return s?t:JSON.stringify(t);let f=a?" ":" ";if(Array.isArray(t))return t.length===0?"[]":n?`[${t.map(c=>x(c,!0,!1,l,a)).join(",")}]`:`[
|
|
4
4
|
${t.map(c=>f.repeat(r+1)+x(c,!1,!1,l,a,r+1)).join(`,
|
|
5
5
|
`)}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var n=class extends Error{stdout;stderr;constructor(t,s="",e=""){super(t),this.stdout=s,this.stderr=e}prependOutput(t,s){this.stdout=t+this.stdout,this.stderr=s+this.stderr}},c=class extends n{levels;name="BreakError";constructor(t=1,s="",e=""){super("break",s,e),this.levels=t}},
|
|
3
|
-
`),this.varName=t}},
|
|
4
|
-
`,this.fatal=o}},
|
|
5
|
-
`}},
|
|
2
|
+
var n=class extends Error{stdout;stderr;constructor(t,s="",e=""){super(t),this.stdout=s,this.stderr=e}prependOutput(t,s){this.stdout=t+this.stdout,this.stderr=s+this.stderr}},c=class extends n{levels;name="BreakError";constructor(t=1,s="",e=""){super("break",s,e),this.levels=t}},i=class extends n{levels;name="ContinueError";constructor(t=1,s="",e=""){super("continue",s,e),this.levels=t}},u=class extends n{exitCode;name="ReturnError";constructor(t=0,s="",e=""){super("return",s,e),this.exitCode=t}},a=class extends n{exitCode;name="ErrexitError";constructor(t,s="",e=""){super(`errexit: command exited with status ${t}`,s,e),this.exitCode=t}},d=class extends n{varName;name="NounsetError";constructor(t,s=""){super(`${t}: unbound variable`,s,`bash: ${t}: unbound variable
|
|
3
|
+
`),this.varName=t}},x=class extends n{exitCode;stdoutKind;stdoutEncoding;name="ExitError";constructor(t,s="",e="",o,v){super("exit",s,e),this.exitCode=t,this.stdoutKind=o,this.stdoutEncoding=v}},p=class extends n{name="ArithmeticError";fatal;constructor(t,s="",e="",o=!1){super(t,s,e),this.stderr=e||`bash: ${t}
|
|
4
|
+
`,this.fatal=o}},h=class extends n{name="BadSubstitutionError";constructor(t,s="",e=""){super(t,s,e),this.stderr=e||`bash: ${t}: bad substitution
|
|
5
|
+
`}},l=class extends n{name="GlobError";constructor(t,s="",e=""){super(`no match: ${t}`,s,e),this.stderr=e||`bash: no match: ${t}
|
|
6
6
|
`}},m=class extends n{name="BraceExpansionError";constructor(t,s="",e=""){super(t,s,e),this.stderr=e||`bash: ${t}
|
|
7
7
|
`}},b=class extends n{limitType;name="ExecutionLimitError";static EXIT_CODE=126;constructor(t,s,e="",o=""){super(t,e,o),this.limitType=s,this.stderr=o||`bash: ${t}
|
|
8
|
-
`}},$=class extends n{name="ExecutionAbortedError";constructor(t="",s=""){super("execution aborted",t,s)}},f=class extends n{name="SubshellExitError";constructor(t="",s=""){super("subshell exit",t,s)}};function
|
|
8
|
+
`}},$=class extends n{name="ExecutionAbortedError";constructor(t="",s=""){super("execution aborted",t,s)}},f=class extends n{name="SubshellExitError";constructor(t="",s=""){super("subshell exit",t,s)}};function E(r){return r instanceof c||r instanceof i||r instanceof u}var C=class extends n{exitCode;name="PosixFatalError";constructor(t,s="",e=""){super("posix fatal error",s,e),this.exitCode=t}};export{c as a,i as b,u as c,a as d,d as e,x as f,p as g,h,l as i,m as j,b as k,$ as l,f as m,E as n,C as o};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as Ee}from"./chunk-4PRVMER6.js";import{a as D,b as _}from"./chunk-MO4RPBN2.js";import{a as x}from"./chunk-YU6OGPZR.js";import{a as v,b as H}from"./chunk-C6FRS5UB.js";import{a as z}from"./chunk-63XSH3IT.js";import{k as P}from"./chunk-
|
|
2
|
+
import{a as Ee}from"./chunk-4PRVMER6.js";import{a as D,b as _}from"./chunk-MO4RPBN2.js";import{a as x}from"./chunk-YU6OGPZR.js";import{a as v,b as H}from"./chunk-C6FRS5UB.js";import{a as z}from"./chunk-63XSH3IT.js";import{k as P}from"./chunk-DHC3ILJI.js";import{a as fe,b as de,c as ie}from"./chunk-GTNBSMZR.js";var Be=1e4,He=100,$e=new H(/\s+/);function se(e={}){let{fieldSep:t=$e,maxIterations:n=Be,maxRecursionDepth:i=He,maxOutputSize:s=0,fs:a,cwd:o,exec:l,coverage:u,requireDefenseContext:N}=e;return{FS:" ",OFS:" ",ORS:`
|
|
3
3
|
`,OFMT:"%.6g",NR:0,NF:0,FNR:0,FILENAME:"",RSTART:0,RLENGTH:-1,SUBSEP:"",fields:[],line:"",vars:Object.create(null),arrays:Object.create(null),arrayAliases:new Map,ARGC:0,ARGV:Object.create(null),ENVIRON:Object.create(null),functions:new Map,fieldSep:t,maxIterations:n,maxRecursionDepth:i,maxOutputSize:s,currentRecursionDepth:0,exitCode:0,shouldExit:!1,shouldNext:!1,shouldNextFile:!1,loopBreak:!1,loopContinue:!1,hasReturn:!1,inEndBlock:!1,output:"",openedFiles:new Set,fs:a,cwd:o,exec:l,coverage:u,requireDefenseContext:N}}function Ne(e,t,n){switch(n){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":return t!==0?e/t:0;case"%":return t!==0?e%t:0;case"^":case"**":return e**t;default:return 0}}function M(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function k(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}async function j(e,t){if(e.type==="regex")return e.pattern;let n=k(await t.evalExpr(e));return n.startsWith("/")&&n.endsWith("/")&&(n=n.slice(1,-1)),n}async function Se(e,t){return e?e.type==="variable"?e.name:e.type==="field"?`$${Math.floor(M(await t.evalExpr(e.index)))}`:"$0":"$0"}function me(e,t){if(e==="$0")return t.line;if(e.startsWith("$")){let n=parseInt(e.slice(1),10)-1;return t.fields[n]||""}return k(t.vars[e]??"")}function we(e,t,n){if(e==="$0")n.line=t,n.fields=n.FS===" "?t.trim().split(/\s+/).filter(Boolean):n.fieldSep.split(t),n.NF=n.fields.length;else if(e.startsWith("$")){let i=parseInt(e.slice(1),10)-1;for(;n.fields.length<=i;)n.fields.push("");n.fields[i]=t,n.NF=n.fields.length,n.line=n.fields.join(n.OFS)}else n.vars[e]=t}async function We(e,t,n){return e.length===0?t.line.length:k(await n.evalExpr(e[0])).length}async function Ve(e,t,n){if(e.length<2)return"";let i=k(await n.evalExpr(e[0])),s=Math.floor(M(await n.evalExpr(e[1])))-1;if(e.length>=3){let a=Math.floor(M(await n.evalExpr(e[2])));return i.substr(Math.max(0,s),a)}return i.substr(Math.max(0,s))}async function Ke(e,t,n){if(e.length<2)return 0;let i=k(await n.evalExpr(e[0])),s=k(await n.evalExpr(e[1])),a=i.indexOf(s);return a===-1?0:a+1}async function Xe(e,t,n){if(e.length<2)return 0;let i=k(await n.evalExpr(e[0])),s=e[1];if(s.type!=="variable")return 0;let a=s.name,o=t.FS;if(e.length>=3){let u=e[2];if(u.type==="regex")o=v(u.pattern);else{let N=k(await n.evalExpr(u));o=N===" "?v("\\s+"):N}}else t.FS===" "&&(o=v("\\s+"));let l=typeof o=="string"?i.split(o):o.split(i);t.arrays[a]=Object.create(null);for(let u=0;u<l.length;u++)t.arrays[a][String(u+1)]=l[u];return l.length}async function qe(e,t,n){if(e.length<2)return 0;let i=await j(e[0],n),s=k(await n.evalExpr(e[1])),a=await Se(e[2],n),o=me(a,t);try{let u=v(i).replace(o,Re(s)),N=u!==o?1:0;return we(a,u,t),N}catch{return 0}}async function ze(e,t,n){if(e.length<2)return 0;let i=await j(e[0],n),s=k(await n.evalExpr(e[1])),a=await Se(e[2],n),o=me(a,t);try{let l=v(i,"g"),u=l.match(o),N=u?u.length:0,A=l.replace(o,Re(s));return we(a,A,t),N}catch{return 0}}function Re(e){return t=>{let n="",i=0;for(;i<e.length;)if(e[i]==="\\"&&i+1<e.length){let s=e[i+1];s==="&"?(n+="&",i+=2):s==="\\"?(n+="\\",i+=2):(n+=e[i+1],i+=2)}else e[i]==="&"?(n+=t,i++):(n+=e[i],i++);return n}}async function je(e,t,n){if(e.length<2)return t.RSTART=0,t.RLENGTH=-1,0;let i=k(await n.evalExpr(e[0])),s=await j(e[1],n);try{let o=v(s).exec(i);if(o)return t.RSTART=o.index+1,t.RLENGTH=o[0].length,t.RSTART}catch{}return t.RSTART=0,t.RLENGTH=-1,0}async function Qe(e,t,n){if(e.length<3)return"";let i=await j(e[0],n),s=k(await n.evalExpr(e[1])),a=k(await n.evalExpr(e[2])),o=e.length>=4?k(await n.evalExpr(e[3])):t.line;try{let l=a.toLowerCase()==="g",u=l?0:parseInt(a,10)||1;if(l)return v(i,"g").replace(o,(A,...C)=>ye(s,A,C.slice(0,-2)));{let N=0;return v(i,"g").replace(o,(C,...O)=>(N++,N===u?ye(s,C,O.slice(0,-2)):C))}}catch{return o}}function ye(e,t,n){let i="",s=0;for(;s<e.length;)if(e[s]==="\\"&&s+1<e.length){let a=e[s+1];if(a==="&")i+="&",s+=2;else if(a==="0")i+=t,s+=2;else if(a>="1"&&a<="9"){let o=parseInt(a,10)-1;i+=n[o]||"",s+=2}else a==="n"?(i+=`
|
|
4
4
|
`,s+=2):a==="t"?(i+=" ",s+=2):(i+=a,s+=2)}else e[s]==="&"?(i+=t,s++):(i+=e[s],s++);return i}async function Je(e,t,n){return e.length===0?"":k(await n.evalExpr(e[0])).toLowerCase()}async function Ze(e,t,n){return e.length===0?"":k(await n.evalExpr(e[0])).toUpperCase()}async function Ye(e,t,n){if(e.length===0)return"";let i=k(await n.evalExpr(e[0])),s=[];for(let a=1;a<e.length;a++)s.push(await n.evalExpr(e[a]));return Q(i,s)}async function et(e,t,n){return e.length===0?0:Math.floor(M(await n.evalExpr(e[0])))}async function tt(e,t,n){return e.length===0?0:Math.sqrt(M(await n.evalExpr(e[0])))}async function nt(e,t,n){return e.length===0?0:Math.sin(M(await n.evalExpr(e[0])))}async function rt(e,t,n){return e.length===0?0:Math.cos(M(await n.evalExpr(e[0])))}async function it(e,t,n){let i=e.length>0?M(await n.evalExpr(e[0])):0,s=e.length>1?M(await n.evalExpr(e[1])):0;return Math.atan2(i,s)}async function st(e,t,n){return e.length===0?0:Math.log(M(await n.evalExpr(e[0])))}async function at(e,t,n){return e.length===0?1:Math.exp(M(await n.evalExpr(e[0])))}function ot(e,t,n){return t.random?t.random():Math.random()}async function lt(e,t,n){let i=e.length>0?M(await n.evalExpr(e[0])):Date.now();return t.vars._srand_seed=i,i}function ut(e,t){return()=>{throw new Error(`${e}() is not supported - ${t}`)}}function ae(e){return()=>{throw new Error(`function '${e}()' is not implemented`)}}var U=1e4;function Q(e,t){let n=0,i="",s=0;for(;s<e.length;)if(e[s]==="%"&&s+1<e.length){let a=s+1,o="",l="",u="",N,A=a;for(;a<e.length&&/\d/.test(e[a]);)a++;a>A&&e[a]==="$"?(N=parseInt(e.substring(A,a),10)-1,a++):a=A;let C=()=>{if(a<e.length){if(a+1<e.length&&(e[a]==="h"&&e[a+1]==="h"||e[a]==="l"&&e[a+1]==="l")){a+=2;return}/[lzjh]/.test(e[a])&&a++}};for(;a<e.length&&/[-+ #0]/.test(e[a]);)o+=e[a++];if(e[a]==="*"){let d=t[n++],R=d!==void 0?Math.floor(Number(d)):0;R<0?(o+="-",l=String(Math.min(-R,U))):l=String(Math.min(R,U)),a++}else for(;a<e.length&&/\d/.test(e[a]);)l+=e[a++];if(l&&parseInt(l,10)>U&&(l=String(U)),e[a]==="."){if(a++,e[a]==="*"){let d=t[n++];u=String(Math.min(d!==void 0?Math.floor(Number(d)):0,U)),a++}else for(;a<e.length&&/\d/.test(e[a]);)u+=e[a++];u&&parseInt(u,10)>U&&(u=String(U))}C();let O=e[a],w=t[N!==void 0?N:n];switch(O){case"s":{let d=w!==void 0?String(w):"";if(u&&(d=d.substring(0,parseInt(u,10))),l){let R=parseInt(l,10);o.includes("-")?d=d.padEnd(R):d=d.padStart(R)}i+=d,N===void 0&&n++;break}case"d":case"i":{let d=w!==void 0?Math.floor(Number(w)):0;Number.isNaN(d)&&(d=0);let R=d<0,h=Math.abs(d).toString();if(u){let F=parseInt(u,10);h=h.padStart(F,"0")}let c="";R?c="-":o.includes("+")?c="+":o.includes(" ")&&(c=" ");let E=c+h;if(l){let F=parseInt(l,10);o.includes("-")?E=E.padEnd(F):o.includes("0")&&!u?E=c+h.padStart(F-c.length,"0"):E=E.padStart(F)}i+=E,N===void 0&&n++;break}case"f":{let d=w!==void 0?Number(w):0;Number.isNaN(d)&&(d=0);let R=u?parseInt(u,10):6,h=d.toFixed(R);if(l){let c=parseInt(l,10);o.includes("-")?h=h.padEnd(c):h=h.padStart(c)}i+=h,N===void 0&&n++;break}case"e":case"E":{let d=w!==void 0?Number(w):0;Number.isNaN(d)&&(d=0);let R=u?parseInt(u,10):6,h=d.toExponential(R);if(O==="E"&&(h=h.toUpperCase()),l){let c=parseInt(l,10);o.includes("-")?h=h.padEnd(c):h=h.padStart(c)}i+=h,N===void 0&&n++;break}case"g":case"G":{let d=w!==void 0?Number(w):0;Number.isNaN(d)&&(d=0);let R=u?parseInt(u,10):6,h=d!==0?Math.floor(Math.log10(Math.abs(d))):0,c;if(d===0?c="0":h<-4||h>=R?(c=d.toExponential(R-1),O==="G"&&(c=c.toUpperCase())):c=d.toPrecision(R),c.includes(".")&&(c=c.replace(/\.?0+$/,"").replace(/\.?0+e/,"e")),c.includes("e")&&(c=c.replace(/\.?0+e/,"e")),l){let E=parseInt(l,10);o.includes("-")?c=c.padEnd(E):c=c.padStart(E)}i+=c,N===void 0&&n++;break}case"x":case"X":{let d=w!==void 0?Math.floor(Number(w)):0;Number.isNaN(d)&&(d=0);let R=Math.abs(d).toString(16);if(O==="X"&&(R=R.toUpperCase()),u){let E=parseInt(u,10);R=R.padStart(E,"0")}let h=d<0?"-":"",c=h+R;if(l){let E=parseInt(l,10);o.includes("-")?c=c.padEnd(E):o.includes("0")&&!u?c=h+R.padStart(E-h.length,"0"):c=c.padStart(E)}i+=c,N===void 0&&n++;break}case"o":{let d=w!==void 0?Math.floor(Number(w)):0;Number.isNaN(d)&&(d=0);let R=Math.abs(d).toString(8);if(u){let E=parseInt(u,10);R=R.padStart(E,"0")}let h=d<0?"-":"",c=h+R;if(l){let E=parseInt(l,10);o.includes("-")?c=c.padEnd(E):o.includes("0")&&!u?c=h+R.padStart(E-h.length,"0"):c=c.padStart(E)}i+=c,N===void 0&&n++;break}case"c":{typeof w=="number"?i+=String.fromCharCode(w):i+=String(w??"").charAt(0)||"",N===void 0&&n++;break}case"%":i+="%";break;default:i+=e.substring(s,a+1)}s=a+1}else if(e[s]==="\\"&&s+1<e.length){let a=e[s+1];switch(a){case"n":i+=`
|
|
5
5
|
`;break;case"t":i+=" ";break;case"r":i+="\r";break;case"\\":i+="\\";break;default:i+=a}s+=2}else i+=e[s++];return i}var ge=new Map([["length",We],["substr",Ve],["index",Ke],["split",Xe],["sub",qe],["gsub",ze],["match",je],["gensub",Qe],["tolower",Je],["toupper",Ze],["sprintf",Ye],["int",et],["sqrt",tt],["sin",nt],["cos",rt],["atan2",it],["log",st],["exp",at],["rand",ot],["srand",lt],["system",ut("system","shell execution not allowed in sandboxed environment")],["close",()=>0],["fflush",()=>0],["systime",ae("systime")],["mktime",ae("mktime")],["strftime",ae("strftime")]]);function b(e){return typeof e=="number"?e!==0:!(e===""||e==="0")}function g(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function m(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}function oe(e){if(typeof e=="number")return!0;let t=String(e).trim();return t===""?!1:!Number.isNaN(Number(t))}function K(e,t){try{return v(e).test(t)}catch{return!1}}function Ae(e,t){return t===""?[]:e.FS===" "?t.trim().split(/\s+/).filter(Boolean):e.fieldSep.split(t)}function J(e,t){return t===0?e.line:t<0||t>e.fields.length?"":e.fields[t-1]??""}function le(e,t,n){if(t===0)e.line=m(n),e.fields=Ae(e,e.line),e.NF=e.fields.length;else if(t>0){for(;e.fields.length<t;)e.fields.push("");e.fields[t-1]=m(n),e.NF=e.fields.length,e.line=e.fields.join(e.OFS)}}function $(e,t){e.line=t,e.fields=Ae(e,t),e.NF=e.fields.length}function ve(e,t){if(e.FS=t,t===" ")e.fieldSep=new H(/\s+/);else try{e.fieldSep=v(t)}catch{e.fieldSep=v(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))}}function Z(e,t){switch(t){case"FS":return e.FS;case"OFS":return e.OFS;case"ORS":return e.ORS;case"OFMT":return e.OFMT;case"NR":return e.NR;case"NF":return e.NF;case"FNR":return e.FNR;case"FILENAME":return e.FILENAME;case"RSTART":return e.RSTART;case"RLENGTH":return e.RLENGTH;case"SUBSEP":return e.SUBSEP;case"ARGC":return e.ARGC}return e.vars[t]??""}function W(e,t,n){switch(t){case"FS":ve(e,m(n));return;case"OFS":e.OFS=m(n);return;case"ORS":e.ORS=m(n);return;case"OFMT":e.OFMT=m(n);return;case"NR":e.NR=Math.floor(g(n));return;case"NF":{let i=Math.floor(g(n));if(i<e.NF)e.fields=e.fields.slice(0,i),e.line=e.fields.join(e.OFS);else if(i>e.NF){for(;e.fields.length<i;)e.fields.push("");e.line=e.fields.join(e.OFS)}e.NF=i;return}case"FNR":e.FNR=Math.floor(g(n));return;case"FILENAME":e.FILENAME=m(n);return;case"RSTART":e.RSTART=Math.floor(g(n));return;case"RLENGTH":e.RLENGTH=Math.floor(g(n));return;case"SUBSEP":e.SUBSEP=m(n);return}e.vars[t]=n}function X(e,t){let n=t,i=new Set,s=e.arrayAliases.get(n);for(;s!==void 0&&!i.has(n);)i.add(n),n=s,s=e.arrayAliases.get(n);return n}function Y(e,t,n){if(t==="ARGV")return e.ARGV[n]??"";if(t==="ENVIRON")return e.ENVIRON[n]??"";let i=X(e,t);return e.arrays[i]?.[n]??""}function ue(e,t,n,i){let s=X(e,t);e.arrays[s]||(e.arrays[s]=Object.create(null)),e.arrays[s][n]=i}function Ie(e,t,n){if(t==="ARGV")return e.ARGV[n]!==void 0;if(t==="ENVIRON")return e.ENVIRON[n]!==void 0;let i=X(e,t);return e.arrays[i]?.[n]!==void 0}function ke(e,t,n){let i=X(e,t);e.arrays[i]&&delete e.arrays[i][n]}function Ce(e,t){let n=X(e,t);delete e.arrays[n]}var be=null;function Oe(e){be=e}function L(e,t){D(e.requireDefenseContext,"awk",t)}function S(e,t,n){return _(e.requireDefenseContext,"awk",t,n)}async function f(e,t){switch(L(e,"expression evaluation"),e.coverage?.hit(`awk:expr:${t.type}`),t.type){case"number":return t.value;case"string":return t.value;case"regex":return K(t.pattern,e.line)?1:0;case"field":return ct(e,t);case"variable":return Z(e,t.name);case"array_access":return ht(e,t);case"binary":return pt(e,t);case"unary":return Et(e,t);case"ternary":return b(await S(e,"ternary condition evaluation",()=>f(e,t.condition)))?await S(e,"ternary consequent evaluation",()=>f(e,t.consequent)):await S(e,"ternary alternate evaluation",()=>f(e,t.alternate));case"call":return Nt(e,t.name,t.args);case"assignment":return St(e,t);case"pre_increment":return mt(e,t.operand);case"pre_decrement":return wt(e,t.operand);case"post_increment":return Rt(e,t.operand);case"post_decrement":return gt(e,t.operand);case"in":return At(e,t.key,t.array);case"getline":return vt(e,t.variable,t.file,t.command);case"tuple":return Ct(e,t.elements);default:return""}}async function ct(e,t){L(e,"field reference evaluation");let n=Math.floor(g(await S(e,"field index evaluation",()=>f(e,t.index))));return J(e,n)}async function ht(e,t){L(e,"array access evaluation");let n=m(await S(e,"array key evaluation",()=>f(e,t.key)));return Y(e,t.array,n)}async function pt(e,t){L(e,"binary expression evaluation");let n=t.operator;if(n==="||")return b(await S(e,"logical-or left evaluation",()=>f(e,t.left)))||b(await S(e,"logical-or right evaluation",()=>f(e,t.right)))?1:0;if(n==="&&")return b(await S(e,"logical-and left evaluation",()=>f(e,t.left)))&&b(await S(e,"logical-and right evaluation",()=>f(e,t.right)))?1:0;if(n==="~"){let l=await S(e,"regex left evaluation",()=>f(e,t.left));t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let u=t.right.type==="regex"?t.right.pattern:m(await S(e,"regex right evaluation",()=>f(e,t.right)));try{return v(u).test(m(l))?1:0}catch{return 0}}if(n==="!~"){let l=await S(e,"negated-regex left evaluation",()=>f(e,t.left));t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let u=t.right.type==="regex"?t.right.pattern:m(await S(e,"negated-regex right evaluation",()=>f(e,t.right)));try{return v(u).test(m(l))?0:1}catch{return 1}}let i=await S(e,"binary left evaluation",()=>f(e,t.left)),s=await S(e,"binary right evaluation",()=>f(e,t.right));if(n===" "){let l=m(i)+m(s);if(e.maxOutputSize>0&&l.length>e.maxOutputSize)throw new P(`awk: string concatenation size limit exceeded (${e.maxOutputSize} bytes)`,"string_length",e.output);return l}if(ft(n))return dt(i,s,n);let a=g(i),o=g(s);return Ne(a,o,n)}function ft(e){return["<","<=",">",">=","==","!="].includes(e)}function dt(e,t,n){let i=oe(e),s=oe(t);if(i&&s){let l=g(e),u=g(t);switch(n){case"<":return l<u?1:0;case"<=":return l<=u?1:0;case">":return l>u?1:0;case">=":return l>=u?1:0;case"==":return l===u?1:0;case"!=":return l!==u?1:0}}let a=m(e),o=m(t);switch(n){case"<":return a<o?1:0;case"<=":return a<=o?1:0;case">":return a>o?1:0;case">=":return a>=o?1:0;case"==":return a===o?1:0;case"!=":return a!==o?1:0}return 0}async function Et(e,t){L(e,"unary expression evaluation");let n=await S(e,"unary operand evaluation",()=>f(e,t.operand));switch(t.operator){case"!":return b(n)?0:1;case"-":return-g(n);case"+":return+g(n);default:return n}}async function Nt(e,t,n){L(e,"function call evaluation");let i=ge.get(t);if(i)return i(n,e,{evalExpr:a=>f(e,a)});let s=e.functions.get(t);return s?yt(e,s,n):""}async function yt(e,t,n){if(L(e,"user function call"),e.currentRecursionDepth++,e.currentRecursionDepth>e.maxRecursionDepth)throw e.currentRecursionDepth--,new P(`awk: recursion depth exceeded maximum (${e.maxRecursionDepth})`,"recursion",e.output);let i=Object.create(null);for(let l of t.params)i[l]=e.vars[l];let s=[];for(let l=0;l<t.params.length;l++){let u=t.params[l];if(l<n.length){let N=n[l];N.type==="variable"&&(e.arrayAliases.set(u,N.name),s.push(u));let A=await S(e,"user function argument evaluation",()=>f(e,N));e.vars[u]=A}else e.vars[u]=""}e.hasReturn=!1,e.returnValue=void 0;let a=be;a&&await S(e,"user function body execution",()=>a(e,t.body.statements));let o=e.returnValue??"";for(let l of t.params)i[l]!==void 0?e.vars[l]=i[l]:delete e.vars[l];for(let l of s)e.arrayAliases.delete(l);return e.hasReturn=!1,e.returnValue=void 0,e.currentRecursionDepth--,o}async function St(e,t){L(e,"assignment evaluation");let n=await S(e,"assignment value evaluation",()=>f(e,t.value)),i=t.target,s=t.operator,a;if(s==="=")a=n;else{let o;if(i.type==="field"){let N=Math.floor(g(await S(e,"assignment field index",()=>f(e,i.index))));o=J(e,N)}else if(i.type==="variable")o=Z(e,i.name);else{let N=m(await S(e,"assignment array key",()=>f(e,i.key)));o=Y(e,i.array,N)}let l=g(o),u=g(n);switch(s){case"+=":a=l+u;break;case"-=":a=l-u;break;case"*=":a=l*u;break;case"/=":a=u!==0?l/u:0;break;case"%=":a=u!==0?l%u:0;break;case"^=":a=l**u;break;default:a=n}}if(i.type==="field"){let o=Math.floor(g(await S(e,"assignment target field index",()=>f(e,i.index))));le(e,o,a)}else if(i.type==="variable")W(e,i.name,a);else{let o=m(await S(e,"assignment target array key",()=>f(e,i.key)));ue(e,i.array,o,a)}return a}async function ee(e,t,n,i){L(e,"inc/dec evaluation");let s;if(t.type==="field"){let a=Math.floor(g(await S(e,"inc/dec field index",()=>f(e,t.index))));s=g(J(e,a)),le(e,a,s+n)}else if(t.type==="variable")s=g(Z(e,t.name)),W(e,t.name,s+n);else{let a=m(await S(e,"inc/dec array key",()=>f(e,t.key)));s=g(Y(e,t.array,a)),ue(e,t.array,a,s+n)}return i?s+n:s}async function mt(e,t){return ee(e,t,1,!0)}async function wt(e,t){return ee(e,t,-1,!0)}async function Rt(e,t){return ee(e,t,1,!1)}async function gt(e,t){return ee(e,t,-1,!1)}async function At(e,t,n){L(e,"in-expression evaluation");let i;if(t.type==="tuple"){e.coverage?.hit("awk:expr:tuple");let s=[];for(let a of t.elements)s.push(m(await S(e,"tuple key element evaluation",()=>f(e,a))));i=s.join(e.SUBSEP)}else i=m(await S(e,"in-expression key evaluation",()=>f(e,t)));return Ie(e,n,i)?1:0}async function vt(e,t,n,i){if(L(e,"getline evaluation"),i)return It(e,t,i);if(n)return kt(e,t,n);if(!e.lines||e.lineIndex===void 0)return-1;let s=e.lineIndex+1;if(s>=e.lines.length)return 0;let a=e.lines[s];return t?W(e,t,a):$(e,a),e.NR++,e.lineIndex=s,1}async function It(e,t,n){let i=e.exec;if(!i)return-1;L(e,"getline command source");let s=m(await S(e,"getline command expression",()=>f(e,n))),a=`__cmd_${s}`,o=`__cmdi_${s}`,l,u;if(e.vars[a]===void 0)try{let C=await S(e,"getline command exec",()=>i(s));l=z(C.stdout).split(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as U,b as z}from"./chunk-MO4RPBN2.js";import{a as I}from"./chunk-YU6OGPZR.js";import{a as A}from"./chunk-C6FRS5UB.js";import{a as P}from"./chunk-63XSH3IT.js";import{k}from"./chunk-
|
|
2
|
+
import{a as U,b as z}from"./chunk-MO4RPBN2.js";import{a as I}from"./chunk-YU6OGPZR.js";import{a as A}from"./chunk-C6FRS5UB.js";import{a as P}from"./chunk-63XSH3IT.js";import{k}from"./chunk-DHC3ILJI.js";import{a as L}from"./chunk-RLNOQILG.js";import{a as te,b as ne,c as W}from"./chunk-GTNBSMZR.js";var H=new Map([["alnum","a-zA-Z0-9"],["alpha","a-zA-Z"],["ascii","\\x00-\\x7F"],["blank"," \\t"],["cntrl","\\x00-\\x1F\\x7F"],["digit","0-9"],["graph","!-~"],["lower","a-z"],["print"," -~"],["punct","!-/:-@\\[-`{-~"],["space"," \\t\\n\\r\\f\\v"],["upper","A-Z"],["word","a-zA-Z0-9_"],["xdigit","0-9A-Fa-f"]]);function V(i){let e="",t=0,n=!1;for(;t<i.length;){if(i[t]==="["&&!n){if(i[t+1]==="["&&i[t+2]===":"){let s=i.indexOf(":]]",t+3);if(s!==-1){let a=i.slice(t+3,s),r=H.get(a);if(r){e+=`[${r}]`,t=s+3;continue}}}if(i[t+1]==="^"&&i[t+2]==="["&&i[t+3]===":"){let s=i.indexOf(":]]",t+4);if(s!==-1){let a=i.slice(t+4,s),r=H.get(a);if(r){e+=`[^${r}]`,t=s+3;continue}}}e+="[",t++,n=!0,t<i.length&&i[t]==="^"&&(e+="^",t++),t<i.length&&i[t]==="]"&&(e+="\\]",t++);continue}if(n){if(i[t]==="]"){e+="]",t++,n=!1;continue}if(i[t]==="["&&i[t+1]===":"){let s=i.indexOf(":]",t+2);if(s!==-1){let a=i.slice(t+2,s),r=H.get(a);if(r){e+=r,t=s+2;continue}}}if(i[t]==="\\"&&t+1<i.length){e+=i[t]+i[t+1],t+=2;continue}e+=i[t],t++;continue}if(i[t]==="\\"&&t+1<i.length){let s=i[t+1];if(s==="+"||s==="?"||s==="|"){e+=s,t+=2;continue}if(s==="("||s===")"){e+=s,t+=2;continue}if(s==="{"||s==="}"){e+=s,t+=2;continue}if(s==="t"){e+=" ",t+=2;continue}if(s==="n"){e+=`
|
|
3
3
|
`,t+=2;continue}if(s==="r"){e+="\r",t+=2;continue}e+=i[t]+s,t+=2;continue}if(i[t]==="+"||i[t]==="?"||i[t]==="|"||i[t]==="("||i[t]===")"){e+=`\\${i[t]}`,t++;continue}if(i[t]==="^"&&!(e===""||e.endsWith("("))){e+="\\^",t++;continue}if(i[t]==="$"){let s=t===i.length-1,a=t+2<i.length&&i[t+1]==="\\"&&i[t+2]===")";if(!s&&!a){e+="\\$",t++;continue}}e+=i[t],t++}return e}function X(i){let e="",t=!1;for(let n=0;n<i.length;n++)i[n]==="["&&!t?(t=!0,e+="[",n++,n<i.length&&i[n]==="^"&&(e+="^",n++),n<i.length&&i[n]==="]"&&(e+="]",n++),n--):i[n]==="]"&&t?(t=!1,e+="]"):!t&&i[n]==="{"&&i[n+1]===","?(e+="{0,",n++):e+=i[n];return e}function ie(i){let e="";for(let t=0;t<i.length;t++){let n=i[t],s=n.charCodeAt(0);n==="\\"?e+="\\\\":n===" "?e+="\\t":n===`
|
|
4
4
|
`?e+=`$
|
|
5
5
|
`:n==="\r"?e+="\\r":n==="\x07"?e+="\\a":n==="\b"?e+="\\b":n==="\f"?e+="\\f":n==="\v"?e+="\\v":s<32||s>=127?e+=`\\${s.toString(8).padStart(3,"0")}`:e+=n}return`${e}$`}var pe=1e4;function re(i,e,t){return{patternSpace:"",holdSpace:"",lineNumber:0,totalLines:i,deleted:!1,printed:!1,quit:!1,quitSilent:!1,exitCode:void 0,errorMessage:void 0,appendBuffer:[],substitutionMade:!1,lineNumberOutput:[],nCommandOutput:[],restartCycle:!1,inDRestartedCycle:!1,currentFilename:e,pendingFileReads:[],pendingFileWrites:[],rangeStates:t||new Map,linesConsumedInCycle:0}}function me(i){return typeof i=="object"&&"first"in i&&"step"in i}function ge(i){return typeof i=="object"&&"offset"in i}function N(i,e,t,n,s){if(i==="$")return e===t;if(typeof i=="number")return e===i;if(me(i)){let{first:a,step:r}=i;return r===0?e===a:(e-a)%r===0&&e>=a}if(typeof i=="object"&&"pattern"in i)try{let a=i.pattern;a===""&&s?.lastPattern?a=s.lastPattern:a!==""&&s&&(s.lastPattern=a);let r=X(V(a));return A(r).test(n)}catch{return!1}return!1}function G(i){let e=t=>t===void 0?"undefined":t==="$"?"$":typeof t=="number"?String(t):"pattern"in t?`/${t.pattern}/`:"first"in t?`${t.first}~${t.step}`:"unknown";return`${e(i.start)},${e(i.end)}`}function be(i,e,t,n,s,a){if(!i||!i.start&&!i.end)return!0;let r=i.start,l=i.end;if(r!==void 0&&l===void 0)return N(r,e,t,n,a);if(r!==void 0&&l!==void 0){let c=typeof r=="object"&&"pattern"in r,f=typeof l=="object"&&"pattern"in l,p=ge(l);if(p&&s){let g=G(i),d=s.get(g);if(d||(d={active:!1},s.set(g,d)),d.active){let E=d.startLine||e;return e>=E+l.offset&&(d.active=!1,s.set(g,d)),!0}else return N(r,e,t,n,a)?(d.active=!0,d.startLine=e,s.set(g,d),l.offset===0&&(d.active=!1,s.set(g,d)),!0):!1}if(!c&&!f&&!p){let g=typeof r=="number"?r:r==="$"?t:1,d=typeof l=="number"?l:t;if(g<=d)return e>=g&&e<=d;if(s){let E=G(i),u=s.get(E);return u||(u={active:!1},s.set(E,u)),!u.completed&&e>=g?(u.completed=!0,s.set(E,u),!0):!1}return!1}if(s){let g=G(i),d=s.get(g);if(d||(d={active:!1},s.set(g,d)),d.active)return N(l,e,t,n,a)&&(d.active=!1,typeof r=="number"&&(d.completed=!0),s.set(g,d)),!0;{if(d.completed)return!1;let E=!1;return typeof r=="number"?E=e>=r:E=N(r,e,t,n,a),E?(d.active=!0,d.startLine=e,s.set(g,d),N(l,e,t,n,a)&&(d.active=!1,typeof r=="number"&&(d.completed=!0),s.set(g,d)),!0):!1}}return N(r,e,t,n,a)}return!0}function w(i,e,t,n,s,a){let r=be(i,e,t,n,s,a);return i?.negated?!r:r}function Ee(i,e,t,n){let s="",a=0,r=!1;for(;a<=i.length;){e.lastIndex=a;let l=e.exec(i);if(!l){s+=i.slice(a);break}if(l.index!==a){s+=i.slice(a,l.index),a=l.index,r=!1;continue}let c=l[0],f=l.slice(1);if(r&&c.length===0){if(a<i.length)s+=i[a],a++;else break;r=!1;continue}if(s+=n(c,f),r=!1,c.length===0)if(a<i.length)s+=i[a],a++;else break;else a+=c.length,r=!0}return s}function j(i,e,t){let n="",s=0;for(;s<i.length;){if(i[s]==="\\"&&s+1<i.length){let a=i[s+1];if(a==="&"){n+="&",s+=2;continue}if(a==="n"){n+=`
|