@poe-platform/safe-bash 0.1.0
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/LICENSE +21 -0
- package/README.md +300 -0
- package/dist/safe-bash/browser.d.ts +13 -0
- package/dist/safe-bash/browser.d.ts.map +1 -0
- package/dist/safe-bash/browser.js +14478 -0
- package/dist/safe-bash/browser.js.map +7 -0
- package/dist/safe-bash/commands/apply-patch/apply.d.ts +6 -0
- package/dist/safe-bash/commands/apply-patch/apply.d.ts.map +1 -0
- package/dist/safe-bash/commands/apply-patch/apply.js +273 -0
- package/dist/safe-bash/commands/apply-patch/apply.js.map +1 -0
- package/dist/safe-bash/commands/apply-patch/index.d.ts +7 -0
- package/dist/safe-bash/commands/apply-patch/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/apply-patch/index.js +23 -0
- package/dist/safe-bash/commands/apply-patch/index.js.map +1 -0
- package/dist/safe-bash/commands/apply-patch/matcher.d.ts +4 -0
- package/dist/safe-bash/commands/apply-patch/matcher.d.ts.map +1 -0
- package/dist/safe-bash/commands/apply-patch/matcher.js +164 -0
- package/dist/safe-bash/commands/apply-patch/matcher.js.map +1 -0
- package/dist/safe-bash/commands/apply-patch/options.d.ts +22 -0
- package/dist/safe-bash/commands/apply-patch/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/apply-patch/options.js +34 -0
- package/dist/safe-bash/commands/apply-patch/options.js.map +1 -0
- package/dist/safe-bash/commands/apply-patch/parser.d.ts +22 -0
- package/dist/safe-bash/commands/apply-patch/parser.d.ts.map +1 -0
- package/dist/safe-bash/commands/apply-patch/parser.js +164 -0
- package/dist/safe-bash/commands/apply-patch/parser.js.map +1 -0
- package/dist/safe-bash/commands/apply-patch/shared.d.ts +40 -0
- package/dist/safe-bash/commands/apply-patch/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/apply-patch/shared.js +248 -0
- package/dist/safe-bash/commands/apply-patch/shared.js.map +1 -0
- package/dist/safe-bash/commands/archive/create.d.ts +17 -0
- package/dist/safe-bash/commands/archive/create.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/create.js +168 -0
- package/dist/safe-bash/commands/archive/create.js.map +1 -0
- package/dist/safe-bash/commands/archive/extract.d.ts +5 -0
- package/dist/safe-bash/commands/archive/extract.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/extract.js +343 -0
- package/dist/safe-bash/commands/archive/extract.js.map +1 -0
- package/dist/safe-bash/commands/archive/format.d.ts +33 -0
- package/dist/safe-bash/commands/archive/format.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/format.js +225 -0
- package/dist/safe-bash/commands/archive/format.js.map +1 -0
- package/dist/safe-bash/commands/archive/index.d.ts +8 -0
- package/dist/safe-bash/commands/archive/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/index.js +70 -0
- package/dist/safe-bash/commands/archive/index.js.map +1 -0
- package/dist/safe-bash/commands/archive/internal.d.ts +48 -0
- package/dist/safe-bash/commands/archive/internal.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/internal.js +183 -0
- package/dist/safe-bash/commands/archive/internal.js.map +1 -0
- package/dist/safe-bash/commands/archive/options.d.ts +26 -0
- package/dist/safe-bash/commands/archive/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/options.js +265 -0
- package/dist/safe-bash/commands/archive/options.js.map +1 -0
- package/dist/safe-bash/commands/archive/stream.d.ts +18 -0
- package/dist/safe-bash/commands/archive/stream.d.ts.map +1 -0
- package/dist/safe-bash/commands/archive/stream.js +108 -0
- package/dist/safe-bash/commands/archive/stream.js.map +1 -0
- package/dist/safe-bash/commands/basic.d.ts +3 -0
- package/dist/safe-bash/commands/basic.d.ts.map +1 -0
- package/dist/safe-bash/commands/basic.js +208 -0
- package/dist/safe-bash/commands/basic.js.map +1 -0
- package/dist/safe-bash/commands/bytes/checksums/index.d.ts +3 -0
- package/dist/safe-bash/commands/bytes/checksums/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/checksums/index.js +334 -0
- package/dist/safe-bash/commands/bytes/checksums/index.js.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/files.d.ts +13 -0
- package/dist/safe-bash/commands/bytes/compression/files.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/files.js +213 -0
- package/dist/safe-bash/commands/bytes/compression/files.js.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/gunzip.d.ts +3 -0
- package/dist/safe-bash/commands/bytes/compression/gunzip.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/gunzip.js +191 -0
- package/dist/safe-bash/commands/bytes/compression/gunzip.js.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/index.d.ts +3 -0
- package/dist/safe-bash/commands/bytes/compression/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/index.js +46 -0
- package/dist/safe-bash/commands/bytes/compression/index.js.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/options.d.ts +12 -0
- package/dist/safe-bash/commands/bytes/compression/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/options.js +58 -0
- package/dist/safe-bash/commands/bytes/compression/options.js.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/stream.d.ts +6 -0
- package/dist/safe-bash/commands/bytes/compression/stream.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/compression/stream.js +94 -0
- package/dist/safe-bash/commands/bytes/compression/stream.js.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/base.d.ts +3 -0
- package/dist/safe-bash/commands/bytes/encoding/base.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/base.js +120 -0
- package/dist/safe-bash/commands/bytes/encoding/base.js.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/index.d.ts +3 -0
- package/dist/safe-bash/commands/bytes/encoding/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/index.js +7 -0
- package/dist/safe-bash/commands/bytes/encoding/index.js.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/od.d.ts +3 -0
- package/dist/safe-bash/commands/bytes/encoding/od.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/od.js +135 -0
- package/dist/safe-bash/commands/bytes/encoding/od.js.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/shared.d.ts +10 -0
- package/dist/safe-bash/commands/bytes/encoding/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/shared.js +107 -0
- package/dist/safe-bash/commands/bytes/encoding/shared.js.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/xxd.d.ts +3 -0
- package/dist/safe-bash/commands/bytes/encoding/xxd.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/encoding/xxd.js +153 -0
- package/dist/safe-bash/commands/bytes/encoding/xxd.js.map +1 -0
- package/dist/safe-bash/commands/bytes/index.d.ts +7 -0
- package/dist/safe-bash/commands/bytes/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/bytes/index.js +22 -0
- package/dist/safe-bash/commands/bytes/index.js.map +1 -0
- package/dist/safe-bash/commands/column/column.d.ts +4 -0
- package/dist/safe-bash/commands/column/column.d.ts.map +1 -0
- package/dist/safe-bash/commands/column/column.js +141 -0
- package/dist/safe-bash/commands/column/column.js.map +1 -0
- package/dist/safe-bash/commands/column/display.d.ts +11 -0
- package/dist/safe-bash/commands/column/display.d.ts.map +1 -0
- package/dist/safe-bash/commands/column/display.js +74 -0
- package/dist/safe-bash/commands/column/display.js.map +1 -0
- package/dist/safe-bash/commands/column/index.d.ts +7 -0
- package/dist/safe-bash/commands/column/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/column/index.js +18 -0
- package/dist/safe-bash/commands/column/index.js.map +1 -0
- package/dist/safe-bash/commands/column/internal.d.ts +35 -0
- package/dist/safe-bash/commands/column/internal.d.ts.map +1 -0
- package/dist/safe-bash/commands/column/internal.js +193 -0
- package/dist/safe-bash/commands/column/internal.js.map +1 -0
- package/dist/safe-bash/commands/column/options.d.ts +34 -0
- package/dist/safe-bash/commands/column/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/column/options.js +141 -0
- package/dist/safe-bash/commands/column/options.js.map +1 -0
- package/dist/safe-bash/commands/column/table.d.ts +4 -0
- package/dist/safe-bash/commands/column/table.d.ts.map +1 -0
- package/dist/safe-bash/commands/column/table.js +87 -0
- package/dist/safe-bash/commands/column/table.js.map +1 -0
- package/dist/safe-bash/commands/copy-identity.d.ts +4 -0
- package/dist/safe-bash/commands/copy-identity.d.ts.map +1 -0
- package/dist/safe-bash/commands/copy-identity.js +46 -0
- package/dist/safe-bash/commands/copy-identity.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/diff-format.d.ts +9 -0
- package/dist/safe-bash/commands/diff-patch/diff-format.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/diff-format.js +155 -0
- package/dist/safe-bash/commands/diff-patch/diff-format.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/diff.d.ts +3 -0
- package/dist/safe-bash/commands/diff-patch/diff.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/diff.js +291 -0
- package/dist/safe-bash/commands/diff-patch/diff.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/index.d.ts +6 -0
- package/dist/safe-bash/commands/diff-patch/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/index.js +21 -0
- package/dist/safe-bash/commands/diff-patch/index.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-envelope.d.ts +3 -0
- package/dist/safe-bash/commands/diff-patch/patch-envelope.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-envelope.js +56 -0
- package/dist/safe-bash/commands/diff-patch/patch-envelope.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-formats.d.ts +8 -0
- package/dist/safe-bash/commands/diff-patch/patch-formats.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-formats.js +247 -0
- package/dist/safe-bash/commands/diff-patch/patch-formats.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.d.ts +34 -0
- package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.js +215 -0
- package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.d.ts +4 -0
- package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.js +89 -0
- package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-path.d.ts +4 -0
- package/dist/safe-bash/commands/diff-patch/patch-path.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch-path.js +95 -0
- package/dist/safe-bash/commands/diff-patch/patch-path.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch.d.ts +3 -0
- package/dist/safe-bash/commands/diff-patch/patch.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/patch.js +389 -0
- package/dist/safe-bash/commands/diff-patch/patch.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/shared.d.ts +42 -0
- package/dist/safe-bash/commands/diff-patch/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/shared.js +177 -0
- package/dist/safe-bash/commands/diff-patch/shared.js.map +1 -0
- package/dist/safe-bash/commands/diff-patch/unified.d.ts +50 -0
- package/dist/safe-bash/commands/diff-patch/unified.d.ts.map +1 -0
- package/dist/safe-bash/commands/diff-patch/unified.js +263 -0
- package/dist/safe-bash/commands/diff-patch/unified.js.map +1 -0
- package/dist/safe-bash/commands/du/arguments.d.ts +17 -0
- package/dist/safe-bash/commands/du/arguments.d.ts.map +1 -0
- package/dist/safe-bash/commands/du/arguments.js +164 -0
- package/dist/safe-bash/commands/du/arguments.js.map +1 -0
- package/dist/safe-bash/commands/du/budget.d.ts +37 -0
- package/dist/safe-bash/commands/du/budget.d.ts.map +1 -0
- package/dist/safe-bash/commands/du/budget.js +127 -0
- package/dist/safe-bash/commands/du/budget.js.map +1 -0
- package/dist/safe-bash/commands/du/du.d.ts +4 -0
- package/dist/safe-bash/commands/du/du.d.ts.map +1 -0
- package/dist/safe-bash/commands/du/du.js +205 -0
- package/dist/safe-bash/commands/du/du.js.map +1 -0
- package/dist/safe-bash/commands/du/format.d.ts +10 -0
- package/dist/safe-bash/commands/du/format.d.ts.map +1 -0
- package/dist/safe-bash/commands/du/format.js +54 -0
- package/dist/safe-bash/commands/du/format.js.map +1 -0
- package/dist/safe-bash/commands/du/index.d.ts +7 -0
- package/dist/safe-bash/commands/du/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/du/index.js +19 -0
- package/dist/safe-bash/commands/du/index.js.map +1 -0
- package/dist/safe-bash/commands/du/options.d.ts +17 -0
- package/dist/safe-bash/commands/du/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/du/options.js +14 -0
- package/dist/safe-bash/commands/du/options.js.map +1 -0
- package/dist/safe-bash/commands/env-split.d.ts +8 -0
- package/dist/safe-bash/commands/env-split.d.ts.map +1 -0
- package/dist/safe-bash/commands/env-split.js +343 -0
- package/dist/safe-bash/commands/env-split.js.map +1 -0
- package/dist/safe-bash/commands/execution.d.ts +4 -0
- package/dist/safe-bash/commands/execution.d.ts.map +1 -0
- package/dist/safe-bash/commands/execution.js +230 -0
- package/dist/safe-bash/commands/execution.js.map +1 -0
- package/dist/safe-bash/commands/expr/bre-worker.d.ts +3 -0
- package/dist/safe-bash/commands/expr/bre-worker.d.ts.map +1 -0
- package/dist/safe-bash/commands/expr/bre-worker.js +445 -0
- package/dist/safe-bash/commands/expr/bre-worker.js.map +1 -0
- package/dist/safe-bash/commands/expr/evaluate.d.ts +15 -0
- package/dist/safe-bash/commands/expr/evaluate.d.ts.map +1 -0
- package/dist/safe-bash/commands/expr/evaluate.js +150 -0
- package/dist/safe-bash/commands/expr/evaluate.js.map +1 -0
- package/dist/safe-bash/commands/expr/index.d.ts +7 -0
- package/dist/safe-bash/commands/expr/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/expr/index.js +86 -0
- package/dist/safe-bash/commands/expr/index.js.map +1 -0
- package/dist/safe-bash/commands/expr/internal.d.ts +45 -0
- package/dist/safe-bash/commands/expr/internal.d.ts.map +1 -0
- package/dist/safe-bash/commands/expr/internal.js +145 -0
- package/dist/safe-bash/commands/expr/internal.js.map +1 -0
- package/dist/safe-bash/commands/expr/syntax.d.ts +4 -0
- package/dist/safe-bash/commands/expr/syntax.d.ts.map +1 -0
- package/dist/safe-bash/commands/expr/syntax.js +120 -0
- package/dist/safe-bash/commands/expr/syntax.js.map +1 -0
- package/dist/safe-bash/commands/file/classify.d.ts +8 -0
- package/dist/safe-bash/commands/file/classify.d.ts.map +1 -0
- package/dist/safe-bash/commands/file/classify.js +125 -0
- package/dist/safe-bash/commands/file/classify.js.map +1 -0
- package/dist/safe-bash/commands/file/index.d.ts +7 -0
- package/dist/safe-bash/commands/file/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/file/index.js +257 -0
- package/dist/safe-bash/commands/file/index.js.map +1 -0
- package/dist/safe-bash/commands/file/shared.d.ts +48 -0
- package/dist/safe-bash/commands/file/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/file/shared.js +166 -0
- package/dist/safe-bash/commands/file/shared.js.map +1 -0
- package/dist/safe-bash/commands/filesystem.d.ts +3 -0
- package/dist/safe-bash/commands/filesystem.d.ts.map +1 -0
- package/dist/safe-bash/commands/filesystem.js +427 -0
- package/dist/safe-bash/commands/filesystem.js.map +1 -0
- package/dist/safe-bash/commands/find.d.ts +3 -0
- package/dist/safe-bash/commands/find.d.ts.map +1 -0
- package/dist/safe-bash/commands/find.js +238 -0
- package/dist/safe-bash/commands/find.js.map +1 -0
- package/dist/safe-bash/commands/git/arguments.d.ts +17 -0
- package/dist/safe-bash/commands/git/arguments.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/arguments.js +150 -0
- package/dist/safe-bash/commands/git/arguments.js.map +1 -0
- package/dist/safe-bash/commands/git/codec.d.ts +8 -0
- package/dist/safe-bash/commands/git/codec.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/codec.js +225 -0
- package/dist/safe-bash/commands/git/codec.js.map +1 -0
- package/dist/safe-bash/commands/git/config.d.ts +8 -0
- package/dist/safe-bash/commands/git/config.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/config.js +100 -0
- package/dist/safe-bash/commands/git/config.js.map +1 -0
- package/dist/safe-bash/commands/git/crc.d.ts +3 -0
- package/dist/safe-bash/commands/git/crc.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/crc.js +14 -0
- package/dist/safe-bash/commands/git/crc.js.map +1 -0
- package/dist/safe-bash/commands/git/delta.d.ts +4 -0
- package/dist/safe-bash/commands/git/delta.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/delta.js +62 -0
- package/dist/safe-bash/commands/git/delta.js.map +1 -0
- package/dist/safe-bash/commands/git/diff.d.ts +9 -0
- package/dist/safe-bash/commands/git/diff.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/diff.js +131 -0
- package/dist/safe-bash/commands/git/diff.js.map +1 -0
- package/dist/safe-bash/commands/git/ignore.d.ts +22 -0
- package/dist/safe-bash/commands/git/ignore.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/ignore.js +153 -0
- package/dist/safe-bash/commands/git/ignore.js.map +1 -0
- package/dist/safe-bash/commands/git/index.d.ts +7 -0
- package/dist/safe-bash/commands/git/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/index.js +66 -0
- package/dist/safe-bash/commands/git/index.js.map +1 -0
- package/dist/safe-bash/commands/git/io.d.ts +46 -0
- package/dist/safe-bash/commands/git/io.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/io.js +388 -0
- package/dist/safe-bash/commands/git/io.js.map +1 -0
- package/dist/safe-bash/commands/git/limits.d.ts +39 -0
- package/dist/safe-bash/commands/git/limits.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/limits.js +43 -0
- package/dist/safe-bash/commands/git/limits.js.map +1 -0
- package/dist/safe-bash/commands/git/pack.d.ts +14 -0
- package/dist/safe-bash/commands/git/pack.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/pack.js +273 -0
- package/dist/safe-bash/commands/git/pack.js.map +1 -0
- package/dist/safe-bash/commands/git/queries.d.ts +6 -0
- package/dist/safe-bash/commands/git/queries.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/queries.js +292 -0
- package/dist/safe-bash/commands/git/queries.js.map +1 -0
- package/dist/safe-bash/commands/git/repository.d.ts +49 -0
- package/dist/safe-bash/commands/git/repository.d.ts.map +1 -0
- package/dist/safe-bash/commands/git/repository.js +473 -0
- package/dist/safe-bash/commands/git/repository.js.map +1 -0
- package/dist/safe-bash/commands/grep-aliases/index.d.ts +11 -0
- package/dist/safe-bash/commands/grep-aliases/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/grep-aliases/index.js +52 -0
- package/dist/safe-bash/commands/grep-aliases/index.js.map +1 -0
- package/dist/safe-bash/commands/grep.d.ts +4 -0
- package/dist/safe-bash/commands/grep.d.ts.map +1 -0
- package/dist/safe-bash/commands/grep.js +112 -0
- package/dist/safe-bash/commands/grep.js.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/budget.d.ts +34 -0
- package/dist/safe-bash/commands/html-to-markdown/budget.d.ts.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/budget.js +94 -0
- package/dist/safe-bash/commands/html-to-markdown/budget.js.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/entities.d.ts +5 -0
- package/dist/safe-bash/commands/html-to-markdown/entities.d.ts.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/entities.js +126 -0
- package/dist/safe-bash/commands/html-to-markdown/entities.js.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/index.d.ts +7 -0
- package/dist/safe-bash/commands/html-to-markdown/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/index.js +91 -0
- package/dist/safe-bash/commands/html-to-markdown/index.js.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/input.d.ts +18 -0
- package/dist/safe-bash/commands/html-to-markdown/input.d.ts.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/input.js +118 -0
- package/dist/safe-bash/commands/html-to-markdown/input.js.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/options.d.ts +28 -0
- package/dist/safe-bash/commands/html-to-markdown/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/options.js +56 -0
- package/dist/safe-bash/commands/html-to-markdown/options.js.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/parser.d.ts +31 -0
- package/dist/safe-bash/commands/html-to-markdown/parser.d.ts.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/parser.js +293 -0
- package/dist/safe-bash/commands/html-to-markdown/parser.js.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/render.d.ts +25 -0
- package/dist/safe-bash/commands/html-to-markdown/render.d.ts.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/render.js +445 -0
- package/dist/safe-bash/commands/html-to-markdown/render.js.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/text.d.ts +5 -0
- package/dist/safe-bash/commands/html-to-markdown/text.d.ts.map +1 -0
- package/dist/safe-bash/commands/html-to-markdown/text.js +51 -0
- package/dist/safe-bash/commands/html-to-markdown/text.js.map +1 -0
- package/dist/safe-bash/commands/index.d.ts +10 -0
- package/dist/safe-bash/commands/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/index.js +45 -0
- package/dist/safe-bash/commands/index.js.map +1 -0
- package/dist/safe-bash/commands/internal.d.ts +38 -0
- package/dist/safe-bash/commands/internal.d.ts.map +1 -0
- package/dist/safe-bash/commands/internal.js +328 -0
- package/dist/safe-bash/commands/internal.js.map +1 -0
- package/dist/safe-bash/commands/metadata/chmod.d.ts +3 -0
- package/dist/safe-bash/commands/metadata/chmod.d.ts.map +1 -0
- package/dist/safe-bash/commands/metadata/chmod.js +144 -0
- package/dist/safe-bash/commands/metadata/chmod.js.map +1 -0
- package/dist/safe-bash/commands/metadata/index.d.ts +6 -0
- package/dist/safe-bash/commands/metadata/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/metadata/index.js +20 -0
- package/dist/safe-bash/commands/metadata/index.js.map +1 -0
- package/dist/safe-bash/commands/metadata/internal.d.ts +29 -0
- package/dist/safe-bash/commands/metadata/internal.d.ts.map +1 -0
- package/dist/safe-bash/commands/metadata/internal.js +67 -0
- package/dist/safe-bash/commands/metadata/internal.js.map +1 -0
- package/dist/safe-bash/commands/metadata/mktemp.d.ts +3 -0
- package/dist/safe-bash/commands/metadata/mktemp.d.ts.map +1 -0
- package/dist/safe-bash/commands/metadata/mktemp.js +142 -0
- package/dist/safe-bash/commands/metadata/mktemp.js.map +1 -0
- package/dist/safe-bash/commands/metadata/stat.d.ts +3 -0
- package/dist/safe-bash/commands/metadata/stat.d.ts.map +1 -0
- package/dist/safe-bash/commands/metadata/stat.js +245 -0
- package/dist/safe-bash/commands/metadata/stat.js.map +1 -0
- package/dist/safe-bash/commands/move.d.ts +10 -0
- package/dist/safe-bash/commands/move.d.ts.map +1 -0
- package/dist/safe-bash/commands/move.js +161 -0
- package/dist/safe-bash/commands/move.js.map +1 -0
- package/dist/safe-bash/commands/network/args.d.ts +37 -0
- package/dist/safe-bash/commands/network/args.d.ts.map +1 -0
- package/dist/safe-bash/commands/network/args.js +228 -0
- package/dist/safe-bash/commands/network/args.js.map +1 -0
- package/dist/safe-bash/commands/network/body.d.ts +10 -0
- package/dist/safe-bash/commands/network/body.d.ts.map +1 -0
- package/dist/safe-bash/commands/network/body.js +188 -0
- package/dist/safe-bash/commands/network/body.js.map +1 -0
- package/dist/safe-bash/commands/network/curl.d.ts +4 -0
- package/dist/safe-bash/commands/network/curl.d.ts.map +1 -0
- package/dist/safe-bash/commands/network/curl.js +404 -0
- package/dist/safe-bash/commands/network/curl.js.map +1 -0
- package/dist/safe-bash/commands/network/index.d.ts +10 -0
- package/dist/safe-bash/commands/network/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/network/index.js +22 -0
- package/dist/safe-bash/commands/network/index.js.map +1 -0
- package/dist/safe-bash/commands/network/output.d.ts +7 -0
- package/dist/safe-bash/commands/network/output.d.ts.map +1 -0
- package/dist/safe-bash/commands/network/output.js +93 -0
- package/dist/safe-bash/commands/network/output.js.map +1 -0
- package/dist/safe-bash/commands/network/shared.d.ts +10 -0
- package/dist/safe-bash/commands/network/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/network/shared.js +52 -0
- package/dist/safe-bash/commands/network/shared.js.map +1 -0
- package/dist/safe-bash/commands/network/transport.d.ts +7 -0
- package/dist/safe-bash/commands/network/transport.d.ts.map +1 -0
- package/dist/safe-bash/commands/network/transport.js +81 -0
- package/dist/safe-bash/commands/network/transport.js.map +1 -0
- package/dist/safe-bash/commands/network/types.d.ts +49 -0
- package/dist/safe-bash/commands/network/types.d.ts.map +1 -0
- package/dist/safe-bash/commands/network/types.js +19 -0
- package/dist/safe-bash/commands/network/types.js.map +1 -0
- package/dist/safe-bash/commands/node/admission.d.ts +8 -0
- package/dist/safe-bash/commands/node/admission.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/admission.js +557 -0
- package/dist/safe-bash/commands/node/admission.js.map +1 -0
- package/dist/safe-bash/commands/node/channel.d.ts +31 -0
- package/dist/safe-bash/commands/node/channel.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/channel.js +58 -0
- package/dist/safe-bash/commands/node/channel.js.map +1 -0
- package/dist/safe-bash/commands/node/cli.d.ts +9 -0
- package/dist/safe-bash/commands/node/cli.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/cli.js +55 -0
- package/dist/safe-bash/commands/node/cli.js.map +1 -0
- package/dist/safe-bash/commands/node/diagnostics.d.ts +8 -0
- package/dist/safe-bash/commands/node/diagnostics.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/diagnostics.js +48 -0
- package/dist/safe-bash/commands/node/diagnostics.js.map +1 -0
- package/dist/safe-bash/commands/node/host.d.ts +30 -0
- package/dist/safe-bash/commands/node/host.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/host.js +411 -0
- package/dist/safe-bash/commands/node/host.js.map +1 -0
- package/dist/safe-bash/commands/node/index.d.ts +15 -0
- package/dist/safe-bash/commands/node/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/index.js +212 -0
- package/dist/safe-bash/commands/node/index.js.map +1 -0
- package/dist/safe-bash/commands/node/lifecycle.d.ts +29 -0
- package/dist/safe-bash/commands/node/lifecycle.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/lifecycle.js +205 -0
- package/dist/safe-bash/commands/node/lifecycle.js.map +1 -0
- package/dist/safe-bash/commands/node/lower.d.ts +3 -0
- package/dist/safe-bash/commands/node/lower.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/lower.js +407 -0
- package/dist/safe-bash/commands/node/lower.js.map +1 -0
- package/dist/safe-bash/commands/node/program.d.ts +3 -0
- package/dist/safe-bash/commands/node/program.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/program.js +216 -0
- package/dist/safe-bash/commands/node/program.js.map +1 -0
- package/dist/safe-bash/commands/node/rules.d.ts +2 -0
- package/dist/safe-bash/commands/node/rules.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/rules.js +134 -0
- package/dist/safe-bash/commands/node/rules.js.map +1 -0
- package/dist/safe-bash/commands/node/safejs.d.ts +4 -0
- package/dist/safe-bash/commands/node/safejs.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/safejs.js +79 -0
- package/dist/safe-bash/commands/node/safejs.js.map +1 -0
- package/dist/safe-bash/commands/node/types.d.ts +143 -0
- package/dist/safe-bash/commands/node/types.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/types.js +16 -0
- package/dist/safe-bash/commands/node/types.js.map +1 -0
- package/dist/safe-bash/commands/node/values.d.ts +13 -0
- package/dist/safe-bash/commands/node/values.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/values.js +128 -0
- package/dist/safe-bash/commands/node/values.js.map +1 -0
- package/dist/safe-bash/commands/node/worker-main.d.ts +2 -0
- package/dist/safe-bash/commands/node/worker-main.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/worker-main.js +179 -0
- package/dist/safe-bash/commands/node/worker-main.js.map +1 -0
- package/dist/safe-bash/commands/node/worker-provider.d.ts +4 -0
- package/dist/safe-bash/commands/node/worker-provider.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/worker-provider.js +355 -0
- package/dist/safe-bash/commands/node/worker-provider.js.map +1 -0
- package/dist/safe-bash/commands/node/worker-types.d.ts +30 -0
- package/dist/safe-bash/commands/node/worker-types.d.ts.map +1 -0
- package/dist/safe-bash/commands/node/worker-types.js +2 -0
- package/dist/safe-bash/commands/node/worker-types.js.map +1 -0
- package/dist/safe-bash/commands/predicates.d.ts +3 -0
- package/dist/safe-bash/commands/predicates.d.ts.map +1 -0
- package/dist/safe-bash/commands/predicates.js +151 -0
- package/dist/safe-bash/commands/predicates.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/client.d.ts +70 -0
- package/dist/safe-bash/commands/regex-execution/client.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/client.js +385 -0
- package/dist/safe-bash/commands/regex-execution/client.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/errors.d.ts +22 -0
- package/dist/safe-bash/commands/regex-execution/ere/errors.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/errors.js +37 -0
- package/dist/safe-bash/commands/regex-execution/ere/errors.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/limits.d.ts +14 -0
- package/dist/safe-bash/commands/regex-execution/ere/limits.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/limits.js +87 -0
- package/dist/safe-bash/commands/regex-execution/ere/limits.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/matcher.d.ts +4 -0
- package/dist/safe-bash/commands/regex-execution/ere/matcher.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/matcher.js +202 -0
- package/dist/safe-bash/commands/regex-execution/ere/matcher.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/syntax.d.ts +6 -0
- package/dist/safe-bash/commands/regex-execution/ere/syntax.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/syntax.js +291 -0
- package/dist/safe-bash/commands/regex-execution/ere/syntax.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/accounting.d.ts +54 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/accounting.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/accounting.js +175 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/accounting.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/owner.d.ts +15 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/owner.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/owner.js +253 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/owner.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/protocol.d.ts +68 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/protocol.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/protocol.js +35 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/protocol.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/root.d.ts +15 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/root.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/root.js +372 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/root.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/validation.d.ts +22 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/validation.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/validation.js +286 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/validation.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/wire-engine.d.ts +3 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/wire-engine.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/wire-engine.js +47 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/wire-engine.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/worker-entry.d.ts +2 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/worker-entry.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/worker-entry.js +32 -0
- package/dist/safe-bash/commands/regex-execution/ere/transport/worker-entry.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/types.d.ts +56 -0
- package/dist/safe-bash/commands/regex-execution/ere/types.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/ere/types.js +2 -0
- package/dist/safe-bash/commands/regex-execution/ere/types.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/matching.d.ts +3 -0
- package/dist/safe-bash/commands/regex-execution/matching.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/matching.js +321 -0
- package/dist/safe-bash/commands/regex-execution/matching.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/protocol.d.ts +116 -0
- package/dist/safe-bash/commands/regex-execution/protocol.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/protocol.js +159 -0
- package/dist/safe-bash/commands/regex-execution/protocol.js.map +1 -0
- package/dist/safe-bash/commands/regex-execution/worker.d.ts +2 -0
- package/dist/safe-bash/commands/regex-execution/worker.d.ts.map +1 -0
- package/dist/safe-bash/commands/regex-execution/worker.js +52 -0
- package/dist/safe-bash/commands/regex-execution/worker.js.map +1 -0
- package/dist/safe-bash/commands/safejs/index.d.ts +18 -0
- package/dist/safe-bash/commands/safejs/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/safejs/index.js +184 -0
- package/dist/safe-bash/commands/safejs/index.js.map +1 -0
- package/dist/safe-bash/commands/safejs/io.d.ts +36 -0
- package/dist/safe-bash/commands/safejs/io.d.ts.map +1 -0
- package/dist/safe-bash/commands/safejs/io.js +127 -0
- package/dist/safe-bash/commands/safejs/io.js.map +1 -0
- package/dist/safe-bash/commands/safejs/options.d.ts +12 -0
- package/dist/safe-bash/commands/safejs/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/safejs/options.js +46 -0
- package/dist/safe-bash/commands/safejs/options.js.map +1 -0
- package/dist/safe-bash/commands/safejs/render.d.ts +2 -0
- package/dist/safe-bash/commands/safejs/render.d.ts.map +1 -0
- package/dist/safe-bash/commands/safejs/render.js +100 -0
- package/dist/safe-bash/commands/safejs/render.js.map +1 -0
- package/dist/safe-bash/commands/safejs/types.d.ts +64 -0
- package/dist/safe-bash/commands/safejs/types.d.ts.map +1 -0
- package/dist/safe-bash/commands/safejs/types.js +10 -0
- package/dist/safe-bash/commands/safejs/types.js.map +1 -0
- package/dist/safe-bash/commands/search/glob.d.ts +21 -0
- package/dist/safe-bash/commands/search/glob.d.ts.map +1 -0
- package/dist/safe-bash/commands/search/glob.js +79 -0
- package/dist/safe-bash/commands/search/glob.js.map +1 -0
- package/dist/safe-bash/commands/search/index.d.ts +6 -0
- package/dist/safe-bash/commands/search/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/search/index.js +20 -0
- package/dist/safe-bash/commands/search/index.js.map +1 -0
- package/dist/safe-bash/commands/search/matcher.d.ts +12 -0
- package/dist/safe-bash/commands/search/matcher.d.ts.map +1 -0
- package/dist/safe-bash/commands/search/matcher.js +24 -0
- package/dist/safe-bash/commands/search/matcher.js.map +1 -0
- package/dist/safe-bash/commands/search/options.d.ts +56 -0
- package/dist/safe-bash/commands/search/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/search/options.js +307 -0
- package/dist/safe-bash/commands/search/options.js.map +1 -0
- package/dist/safe-bash/commands/search/output.d.ts +37 -0
- package/dist/safe-bash/commands/search/output.d.ts.map +1 -0
- package/dist/safe-bash/commands/search/output.js +63 -0
- package/dist/safe-bash/commands/search/output.js.map +1 -0
- package/dist/safe-bash/commands/search/rg.d.ts +4 -0
- package/dist/safe-bash/commands/search/rg.d.ts.map +1 -0
- package/dist/safe-bash/commands/search/rg.js +219 -0
- package/dist/safe-bash/commands/search/rg.js.map +1 -0
- package/dist/safe-bash/commands/search/shared.d.ts +37 -0
- package/dist/safe-bash/commands/search/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/search/shared.js +111 -0
- package/dist/safe-bash/commands/search/shared.js.map +1 -0
- package/dist/safe-bash/commands/search/walk.d.ts +28 -0
- package/dist/safe-bash/commands/search/walk.d.ts.map +1 -0
- package/dist/safe-bash/commands/search/walk.js +201 -0
- package/dist/safe-bash/commands/search/walk.js.map +1 -0
- package/dist/safe-bash/commands/split/index.d.ts +6 -0
- package/dist/safe-bash/commands/split/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/split/index.js +18 -0
- package/dist/safe-bash/commands/split/index.js.map +1 -0
- package/dist/safe-bash/commands/split/io.d.ts +28 -0
- package/dist/safe-bash/commands/split/io.d.ts.map +1 -0
- package/dist/safe-bash/commands/split/io.js +101 -0
- package/dist/safe-bash/commands/split/io.js.map +1 -0
- package/dist/safe-bash/commands/split/names.d.ts +11 -0
- package/dist/safe-bash/commands/split/names.d.ts.map +1 -0
- package/dist/safe-bash/commands/split/names.js +42 -0
- package/dist/safe-bash/commands/split/names.js.map +1 -0
- package/dist/safe-bash/commands/split/options.d.ts +28 -0
- package/dist/safe-bash/commands/split/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/split/options.js +130 -0
- package/dist/safe-bash/commands/split/options.js.map +1 -0
- package/dist/safe-bash/commands/split/outputs.d.ts +19 -0
- package/dist/safe-bash/commands/split/outputs.d.ts.map +1 -0
- package/dist/safe-bash/commands/split/outputs.js +105 -0
- package/dist/safe-bash/commands/split/outputs.js.map +1 -0
- package/dist/safe-bash/commands/split/split.d.ts +4 -0
- package/dist/safe-bash/commands/split/split.d.ts.map +1 -0
- package/dist/safe-bash/commands/split/split.js +146 -0
- package/dist/safe-bash/commands/split/split.js.map +1 -0
- package/dist/safe-bash/commands/stream-format/index.d.ts +6 -0
- package/dist/safe-bash/commands/stream-format/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-format/index.js +22 -0
- package/dist/safe-bash/commands/stream-format/index.js.map +1 -0
- package/dist/safe-bash/commands/stream-format/nl.d.ts +4 -0
- package/dist/safe-bash/commands/stream-format/nl.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-format/nl.js +96 -0
- package/dist/safe-bash/commands/stream-format/nl.js.map +1 -0
- package/dist/safe-bash/commands/stream-format/rev.d.ts +4 -0
- package/dist/safe-bash/commands/stream-format/rev.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-format/rev.js +65 -0
- package/dist/safe-bash/commands/stream-format/rev.js.map +1 -0
- package/dist/safe-bash/commands/stream-format/seq.d.ts +4 -0
- package/dist/safe-bash/commands/stream-format/seq.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-format/seq.js +249 -0
- package/dist/safe-bash/commands/stream-format/seq.js.map +1 -0
- package/dist/safe-bash/commands/stream-format/shared.d.ts +49 -0
- package/dist/safe-bash/commands/stream-format/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-format/shared.js +209 -0
- package/dist/safe-bash/commands/stream-format/shared.js.map +1 -0
- package/dist/safe-bash/commands/stream-format/unexpand.d.ts +4 -0
- package/dist/safe-bash/commands/stream-format/unexpand.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-format/unexpand.js +130 -0
- package/dist/safe-bash/commands/stream-format/unexpand.js.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/expand.d.ts +4 -0
- package/dist/safe-bash/commands/stream-inspection/expand.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/expand.js +100 -0
- package/dist/safe-bash/commands/stream-inspection/expand.js.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/fold.d.ts +4 -0
- package/dist/safe-bash/commands/stream-inspection/fold.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/fold.js +55 -0
- package/dist/safe-bash/commands/stream-inspection/fold.js.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/index.d.ts +6 -0
- package/dist/safe-bash/commands/stream-inspection/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/index.js +22 -0
- package/dist/safe-bash/commands/stream-inspection/index.js.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/numeric-options.d.ts +5 -0
- package/dist/safe-bash/commands/stream-inspection/numeric-options.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/numeric-options.js +53 -0
- package/dist/safe-bash/commands/stream-inspection/numeric-options.js.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/shared.d.ts +55 -0
- package/dist/safe-bash/commands/stream-inspection/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/shared.js +202 -0
- package/dist/safe-bash/commands/stream-inspection/shared.js.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/strings.d.ts +4 -0
- package/dist/safe-bash/commands/stream-inspection/strings.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/strings.js +54 -0
- package/dist/safe-bash/commands/stream-inspection/strings.js.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/tac.d.ts +4 -0
- package/dist/safe-bash/commands/stream-inspection/tac.d.ts.map +1 -0
- package/dist/safe-bash/commands/stream-inspection/tac.js +54 -0
- package/dist/safe-bash/commands/stream-inspection/tac.js.map +1 -0
- package/dist/safe-bash/commands/streams.d.ts +3 -0
- package/dist/safe-bash/commands/streams.d.ts.map +1 -0
- package/dist/safe-bash/commands/streams.js +477 -0
- package/dist/safe-bash/commands/streams.js.map +1 -0
- package/dist/safe-bash/commands/structured/index.d.ts +7 -0
- package/dist/safe-bash/commands/structured/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/index.js +21 -0
- package/dist/safe-bash/commands/structured/index.js.map +1 -0
- package/dist/safe-bash/commands/structured/input.d.ts +18 -0
- package/dist/safe-bash/commands/structured/input.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/input.js +438 -0
- package/dist/safe-bash/commands/structured/input.js.map +1 -0
- package/dist/safe-bash/commands/structured/interpreter.d.ts +21 -0
- package/dist/safe-bash/commands/structured/interpreter.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/interpreter.js +644 -0
- package/dist/safe-bash/commands/structured/interpreter.js.map +1 -0
- package/dist/safe-bash/commands/structured/jq.d.ts +4 -0
- package/dist/safe-bash/commands/structured/jq.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/jq.js +278 -0
- package/dist/safe-bash/commands/structured/jq.js.map +1 -0
- package/dist/safe-bash/commands/structured/limits.d.ts +61 -0
- package/dist/safe-bash/commands/structured/limits.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/limits.js +162 -0
- package/dist/safe-bash/commands/structured/limits.js.map +1 -0
- package/dist/safe-bash/commands/structured/numbers.d.ts +17 -0
- package/dist/safe-bash/commands/structured/numbers.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/numbers.js +143 -0
- package/dist/safe-bash/commands/structured/numbers.js.map +1 -0
- package/dist/safe-bash/commands/structured/parser.d.ts +54 -0
- package/dist/safe-bash/commands/structured/parser.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/parser.js +320 -0
- package/dist/safe-bash/commands/structured/parser.js.map +1 -0
- package/dist/safe-bash/commands/structured/split.d.ts +3 -0
- package/dist/safe-bash/commands/structured/split.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/split.js +65 -0
- package/dist/safe-bash/commands/structured/split.js.map +1 -0
- package/dist/safe-bash/commands/structured/values.d.ts +12 -0
- package/dist/safe-bash/commands/structured/values.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/values.js +213 -0
- package/dist/safe-bash/commands/structured/values.js.map +1 -0
- package/dist/safe-bash/commands/table-text/comm.d.ts +4 -0
- package/dist/safe-bash/commands/table-text/comm.d.ts.map +1 -0
- package/dist/safe-bash/commands/table-text/comm.js +101 -0
- package/dist/safe-bash/commands/table-text/comm.js.map +1 -0
- package/dist/safe-bash/commands/table-text/index.d.ts +6 -0
- package/dist/safe-bash/commands/table-text/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/table-text/index.js +21 -0
- package/dist/safe-bash/commands/table-text/index.js.map +1 -0
- package/dist/safe-bash/commands/table-text/internal.d.ts +73 -0
- package/dist/safe-bash/commands/table-text/internal.d.ts.map +1 -0
- package/dist/safe-bash/commands/table-text/internal.js +223 -0
- package/dist/safe-bash/commands/table-text/internal.js.map +1 -0
- package/dist/safe-bash/commands/table-text/join.d.ts +4 -0
- package/dist/safe-bash/commands/table-text/join.d.ts.map +1 -0
- package/dist/safe-bash/commands/table-text/join.js +252 -0
- package/dist/safe-bash/commands/table-text/join.js.map +1 -0
- package/dist/safe-bash/commands/table-text/paste.d.ts +4 -0
- package/dist/safe-bash/commands/table-text/paste.d.ts.map +1 -0
- package/dist/safe-bash/commands/table-text/paste.js +125 -0
- package/dist/safe-bash/commands/table-text/paste.js.map +1 -0
- package/dist/safe-bash/commands/text-programs/awk-runtime.d.ts +45 -0
- package/dist/safe-bash/commands/text-programs/awk-runtime.d.ts.map +1 -0
- package/dist/safe-bash/commands/text-programs/awk-runtime.js +679 -0
- package/dist/safe-bash/commands/text-programs/awk-runtime.js.map +1 -0
- package/dist/safe-bash/commands/text-programs/awk-syntax.d.ts +141 -0
- package/dist/safe-bash/commands/text-programs/awk-syntax.d.ts.map +1 -0
- package/dist/safe-bash/commands/text-programs/awk-syntax.js +495 -0
- package/dist/safe-bash/commands/text-programs/awk-syntax.js.map +1 -0
- package/dist/safe-bash/commands/text-programs/awk-values.d.ts +29 -0
- package/dist/safe-bash/commands/text-programs/awk-values.d.ts.map +1 -0
- package/dist/safe-bash/commands/text-programs/awk-values.js +155 -0
- package/dist/safe-bash/commands/text-programs/awk-values.js.map +1 -0
- package/dist/safe-bash/commands/text-programs/awk.d.ts +4 -0
- package/dist/safe-bash/commands/text-programs/awk.d.ts.map +1 -0
- package/dist/safe-bash/commands/text-programs/awk.js +45 -0
- package/dist/safe-bash/commands/text-programs/awk.js.map +1 -0
- package/dist/safe-bash/commands/text-programs/index.d.ts +6 -0
- package/dist/safe-bash/commands/text-programs/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/text-programs/index.js +21 -0
- package/dist/safe-bash/commands/text-programs/index.js.map +1 -0
- package/dist/safe-bash/commands/text-programs/regex.d.ts +19 -0
- package/dist/safe-bash/commands/text-programs/regex.d.ts.map +1 -0
- package/dist/safe-bash/commands/text-programs/regex.js +387 -0
- package/dist/safe-bash/commands/text-programs/regex.js.map +1 -0
- package/dist/safe-bash/commands/text-programs/sed.d.ts +4 -0
- package/dist/safe-bash/commands/text-programs/sed.d.ts.map +1 -0
- package/dist/safe-bash/commands/text-programs/sed.js +602 -0
- package/dist/safe-bash/commands/text-programs/sed.js.map +1 -0
- package/dist/safe-bash/commands/text-programs/shared.d.ts +33 -0
- package/dist/safe-bash/commands/text-programs/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/text-programs/shared.js +102 -0
- package/dist/safe-bash/commands/text-programs/shared.js.map +1 -0
- package/dist/safe-bash/commands/text.d.ts +3 -0
- package/dist/safe-bash/commands/text.d.ts.map +1 -0
- package/dist/safe-bash/commands/text.js +428 -0
- package/dist/safe-bash/commands/text.js.map +1 -0
- package/dist/safe-bash/commands/time-env/calendar.d.ts +30 -0
- package/dist/safe-bash/commands/time-env/calendar.d.ts.map +1 -0
- package/dist/safe-bash/commands/time-env/calendar.js +184 -0
- package/dist/safe-bash/commands/time-env/calendar.js.map +1 -0
- package/dist/safe-bash/commands/time-env/date.d.ts +3 -0
- package/dist/safe-bash/commands/time-env/date.d.ts.map +1 -0
- package/dist/safe-bash/commands/time-env/date.js +149 -0
- package/dist/safe-bash/commands/time-env/date.js.map +1 -0
- package/dist/safe-bash/commands/time-env/format.d.ts +4 -0
- package/dist/safe-bash/commands/time-env/format.d.ts.map +1 -0
- package/dist/safe-bash/commands/time-env/format.js +247 -0
- package/dist/safe-bash/commands/time-env/format.js.map +1 -0
- package/dist/safe-bash/commands/time-env/index.d.ts +6 -0
- package/dist/safe-bash/commands/time-env/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/time-env/index.js +21 -0
- package/dist/safe-bash/commands/time-env/index.js.map +1 -0
- package/dist/safe-bash/commands/time-env/printenv.d.ts +3 -0
- package/dist/safe-bash/commands/time-env/printenv.d.ts.map +1 -0
- package/dist/safe-bash/commands/time-env/printenv.js +59 -0
- package/dist/safe-bash/commands/time-env/printenv.js.map +1 -0
- package/dist/safe-bash/commands/time-env/shared.d.ts +38 -0
- package/dist/safe-bash/commands/time-env/shared.d.ts.map +1 -0
- package/dist/safe-bash/commands/time-env/shared.js +68 -0
- package/dist/safe-bash/commands/time-env/shared.js.map +1 -0
- package/dist/safe-bash/commands/time-env/sleep.d.ts +3 -0
- package/dist/safe-bash/commands/time-env/sleep.d.ts.map +1 -0
- package/dist/safe-bash/commands/time-env/sleep.js +150 -0
- package/dist/safe-bash/commands/time-env/sleep.js.map +1 -0
- package/dist/safe-bash/commands/timeout/duration.d.ts +10 -0
- package/dist/safe-bash/commands/timeout/duration.d.ts.map +1 -0
- package/dist/safe-bash/commands/timeout/duration.js +82 -0
- package/dist/safe-bash/commands/timeout/duration.js.map +1 -0
- package/dist/safe-bash/commands/timeout/index.d.ts +18 -0
- package/dist/safe-bash/commands/timeout/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/timeout/index.js +218 -0
- package/dist/safe-bash/commands/timeout/index.js.map +1 -0
- package/dist/safe-bash/commands/timeout/scheduler.d.ts +17 -0
- package/dist/safe-bash/commands/timeout/scheduler.d.ts.map +1 -0
- package/dist/safe-bash/commands/timeout/scheduler.js +110 -0
- package/dist/safe-bash/commands/timeout/scheduler.js.map +1 -0
- package/dist/safe-bash/commands/tree/arguments.d.ts +24 -0
- package/dist/safe-bash/commands/tree/arguments.d.ts.map +1 -0
- package/dist/safe-bash/commands/tree/arguments.js +125 -0
- package/dist/safe-bash/commands/tree/arguments.js.map +1 -0
- package/dist/safe-bash/commands/tree/charset.d.ts +5 -0
- package/dist/safe-bash/commands/tree/charset.d.ts.map +1 -0
- package/dist/safe-bash/commands/tree/charset.js +36 -0
- package/dist/safe-bash/commands/tree/charset.js.map +1 -0
- package/dist/safe-bash/commands/tree/index.d.ts +7 -0
- package/dist/safe-bash/commands/tree/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/tree/index.js +19 -0
- package/dist/safe-bash/commands/tree/index.js.map +1 -0
- package/dist/safe-bash/commands/tree/io.d.ts +28 -0
- package/dist/safe-bash/commands/tree/io.d.ts.map +1 -0
- package/dist/safe-bash/commands/tree/io.js +95 -0
- package/dist/safe-bash/commands/tree/io.js.map +1 -0
- package/dist/safe-bash/commands/tree/options.d.ts +17 -0
- package/dist/safe-bash/commands/tree/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/tree/options.js +14 -0
- package/dist/safe-bash/commands/tree/options.js.map +1 -0
- package/dist/safe-bash/commands/tree/pattern.d.ts +10 -0
- package/dist/safe-bash/commands/tree/pattern.d.ts.map +1 -0
- package/dist/safe-bash/commands/tree/pattern.js +90 -0
- package/dist/safe-bash/commands/tree/pattern.js.map +1 -0
- package/dist/safe-bash/commands/tree/tree.d.ts +4 -0
- package/dist/safe-bash/commands/tree/tree.d.ts.map +1 -0
- package/dist/safe-bash/commands/tree/tree.js +242 -0
- package/dist/safe-bash/commands/tree/tree.js.map +1 -0
- package/dist/safe-bash/commands/which/index.d.ts +7 -0
- package/dist/safe-bash/commands/which/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/which/index.js +22 -0
- package/dist/safe-bash/commands/which/index.js.map +1 -0
- package/dist/safe-bash/commands/which/options.d.ts +15 -0
- package/dist/safe-bash/commands/which/options.d.ts.map +1 -0
- package/dist/safe-bash/commands/which/options.js +24 -0
- package/dist/safe-bash/commands/which/options.js.map +1 -0
- package/dist/safe-bash/commands/which/which.d.ts +4 -0
- package/dist/safe-bash/commands/which/which.d.ts.map +1 -0
- package/dist/safe-bash/commands/which/which.js +284 -0
- package/dist/safe-bash/commands/which/which.js.map +1 -0
- package/dist/safe-bash/contracts/command.d.ts +67 -0
- package/dist/safe-bash/contracts/command.d.ts.map +1 -0
- package/dist/safe-bash/contracts/command.js +209 -0
- package/dist/safe-bash/contracts/command.js.map +1 -0
- package/dist/safe-bash/contracts/errors.d.ts +3 -0
- package/dist/safe-bash/contracts/errors.d.ts.map +1 -0
- package/dist/safe-bash/contracts/errors.js +2 -0
- package/dist/safe-bash/contracts/errors.js.map +1 -0
- package/dist/safe-bash/contracts/filesystem.d.ts +3 -0
- package/dist/safe-bash/contracts/filesystem.d.ts.map +1 -0
- package/dist/safe-bash/contracts/filesystem.js +2 -0
- package/dist/safe-bash/contracts/filesystem.js.map +1 -0
- package/dist/safe-bash/contracts/index.d.ts +8 -0
- package/dist/safe-bash/contracts/index.d.ts.map +1 -0
- package/dist/safe-bash/contracts/index.js +8 -0
- package/dist/safe-bash/contracts/index.js.map +1 -0
- package/dist/safe-bash/contracts/io.d.ts +26 -0
- package/dist/safe-bash/contracts/io.d.ts.map +1 -0
- package/dist/safe-bash/contracts/io.js +154 -0
- package/dist/safe-bash/contracts/io.js.map +1 -0
- package/dist/safe-bash/contracts/output.d.ts +12 -0
- package/dist/safe-bash/contracts/output.d.ts.map +1 -0
- package/dist/safe-bash/contracts/output.js +126 -0
- package/dist/safe-bash/contracts/output.js.map +1 -0
- package/dist/safe-bash/contracts/path.d.ts +2 -0
- package/dist/safe-bash/contracts/path.d.ts.map +1 -0
- package/dist/safe-bash/contracts/path.js +2 -0
- package/dist/safe-bash/contracts/path.js.map +1 -0
- package/dist/safe-bash/contracts/plugin.d.ts +16 -0
- package/dist/safe-bash/contracts/plugin.d.ts.map +1 -0
- package/dist/safe-bash/contracts/plugin.js +47 -0
- package/dist/safe-bash/contracts/plugin.js.map +1 -0
- package/dist/safe-bash/contracts/value.d.ts +21 -0
- package/dist/safe-bash/contracts/value.d.ts.map +1 -0
- package/dist/safe-bash/contracts/value.js +203 -0
- package/dist/safe-bash/contracts/value.js.map +1 -0
- package/dist/safe-bash/fs/memory/index.d.ts +2 -0
- package/dist/safe-bash/fs/memory/index.d.ts.map +1 -0
- package/dist/safe-bash/fs/memory/index.js +2 -0
- package/dist/safe-bash/fs/memory/index.js.map +1 -0
- package/dist/safe-bash/fs/mount/index.d.ts +3 -0
- package/dist/safe-bash/fs/mount/index.d.ts.map +1 -0
- package/dist/safe-bash/fs/mount/index.js +2 -0
- package/dist/safe-bash/fs/mount/index.js.map +1 -0
- package/dist/safe-bash/fs/overlay/index.d.ts +3 -0
- package/dist/safe-bash/fs/overlay/index.d.ts.map +1 -0
- package/dist/safe-bash/fs/overlay/index.js +2 -0
- package/dist/safe-bash/fs/overlay/index.js.map +1 -0
- package/dist/safe-bash/fs/readonly/index.d.ts +2 -0
- package/dist/safe-bash/fs/readonly/index.d.ts.map +1 -0
- package/dist/safe-bash/fs/readonly/index.js +2 -0
- package/dist/safe-bash/fs/readonly/index.js.map +1 -0
- package/dist/safe-bash/fs/real/index.d.ts +3 -0
- package/dist/safe-bash/fs/real/index.d.ts.map +1 -0
- package/dist/safe-bash/fs/real/index.js +2 -0
- package/dist/safe-bash/fs/real/index.js.map +1 -0
- package/dist/safe-bash/fs/s3/http/index.d.ts +3 -0
- package/dist/safe-bash/fs/s3/http/index.d.ts.map +1 -0
- package/dist/safe-bash/fs/s3/http/index.js +2 -0
- package/dist/safe-bash/fs/s3/http/index.js.map +1 -0
- package/dist/safe-bash/fs/s3/index.d.ts +3 -0
- package/dist/safe-bash/fs/s3/index.d.ts.map +1 -0
- package/dist/safe-bash/fs/s3/index.js +2 -0
- package/dist/safe-bash/fs/s3/index.js.map +1 -0
- package/dist/safe-bash/fs/webdav/index.d.ts +3 -0
- package/dist/safe-bash/fs/webdav/index.d.ts.map +1 -0
- package/dist/safe-bash/fs/webdav/index.js +2 -0
- package/dist/safe-bash/fs/webdav/index.js.map +1 -0
- package/dist/safe-bash/index.d.ts +40 -0
- package/dist/safe-bash/index.d.ts.map +1 -0
- package/dist/safe-bash/index.js +39 -0
- package/dist/safe-bash/index.js.map +1 -0
- package/dist/safe-bash/integrations/safejs/filesystem.d.ts +7 -0
- package/dist/safe-bash/integrations/safejs/filesystem.d.ts.map +1 -0
- package/dist/safe-bash/integrations/safejs/filesystem.js +5 -0
- package/dist/safe-bash/integrations/safejs/filesystem.js.map +1 -0
- package/dist/safe-bash/integrations/safejs/index.d.ts +5 -0
- package/dist/safe-bash/integrations/safejs/index.d.ts.map +1 -0
- package/dist/safe-bash/integrations/safejs/index.js +3 -0
- package/dist/safe-bash/integrations/safejs/index.js.map +1 -0
- package/dist/safe-bash/integrations/safejs/shell.d.ts +31 -0
- package/dist/safe-bash/integrations/safejs/shell.d.ts.map +1 -0
- package/dist/safe-bash/integrations/safejs/shell.js +53 -0
- package/dist/safe-bash/integrations/safejs/shell.js.map +1 -0
- package/dist/safe-bash/integrations/safejs/values.d.ts +8 -0
- package/dist/safe-bash/integrations/safejs/values.d.ts.map +1 -0
- package/dist/safe-bash/integrations/safejs/values.js +71 -0
- package/dist/safe-bash/integrations/safejs/values.js.map +1 -0
- package/dist/safe-bash/plugins/index.d.ts +50 -0
- package/dist/safe-bash/plugins/index.d.ts.map +1 -0
- package/dist/safe-bash/plugins/index.js +63 -0
- package/dist/safe-bash/plugins/index.js.map +1 -0
- package/dist/safe-bash/shell/arithmetic-parameters.d.ts +14 -0
- package/dist/safe-bash/shell/arithmetic-parameters.d.ts.map +1 -0
- package/dist/safe-bash/shell/arithmetic-parameters.js +156 -0
- package/dist/safe-bash/shell/arithmetic-parameters.js.map +1 -0
- package/dist/safe-bash/shell/arithmetic.d.ts +35 -0
- package/dist/safe-bash/shell/arithmetic.d.ts.map +1 -0
- package/dist/safe-bash/shell/arithmetic.js +265 -0
- package/dist/safe-bash/shell/arithmetic.js.map +1 -0
- package/dist/safe-bash/shell/arrays/bindings.d.ts +83 -0
- package/dist/safe-bash/shell/arrays/bindings.d.ts.map +1 -0
- package/dist/safe-bash/shell/arrays/bindings.js +284 -0
- package/dist/safe-bash/shell/arrays/bindings.js.map +1 -0
- package/dist/safe-bash/shell/arrays/ledger.d.ts +73 -0
- package/dist/safe-bash/shell/arrays/ledger.d.ts.map +1 -0
- package/dist/safe-bash/shell/arrays/ledger.js +270 -0
- package/dist/safe-bash/shell/arrays/ledger.js.map +1 -0
- package/dist/safe-bash/shell/arrays/state.d.ts +75 -0
- package/dist/safe-bash/shell/arrays/state.d.ts.map +1 -0
- package/dist/safe-bash/shell/arrays/state.js +444 -0
- package/dist/safe-bash/shell/arrays/state.js.map +1 -0
- package/dist/safe-bash/shell/arrays/syntax.d.ts +47 -0
- package/dist/safe-bash/shell/arrays/syntax.d.ts.map +1 -0
- package/dist/safe-bash/shell/arrays/syntax.js +122 -0
- package/dist/safe-bash/shell/arrays/syntax.js.map +1 -0
- package/dist/safe-bash/shell/cancellation.d.ts +129 -0
- package/dist/safe-bash/shell/cancellation.d.ts.map +1 -0
- package/dist/safe-bash/shell/cancellation.js +703 -0
- package/dist/safe-bash/shell/cancellation.js.map +1 -0
- package/dist/safe-bash/shell/cleanup.d.ts +19 -0
- package/dist/safe-bash/shell/cleanup.d.ts.map +1 -0
- package/dist/safe-bash/shell/cleanup.js +83 -0
- package/dist/safe-bash/shell/cleanup.js.map +1 -0
- package/dist/safe-bash/shell/conditional.d.ts +48 -0
- package/dist/safe-bash/shell/conditional.d.ts.map +1 -0
- package/dist/safe-bash/shell/conditional.js +218 -0
- package/dist/safe-bash/shell/conditional.js.map +1 -0
- package/dist/safe-bash/shell/display.d.ts +3 -0
- package/dist/safe-bash/shell/display.d.ts.map +1 -0
- package/dist/safe-bash/shell/display.js +57 -0
- package/dist/safe-bash/shell/display.js.map +1 -0
- package/dist/safe-bash/shell/getopts.d.ts +46 -0
- package/dist/safe-bash/shell/getopts.d.ts.map +1 -0
- package/dist/safe-bash/shell/getopts.js +215 -0
- package/dist/safe-bash/shell/getopts.js.map +1 -0
- package/dist/safe-bash/shell/index.d.ts +5 -0
- package/dist/safe-bash/shell/index.d.ts.map +1 -0
- package/dist/safe-bash/shell/index.js +4 -0
- package/dist/safe-bash/shell/index.js.map +1 -0
- package/dist/safe-bash/shell/input.d.ts +26 -0
- package/dist/safe-bash/shell/input.d.ts.map +1 -0
- package/dist/safe-bash/shell/input.js +323 -0
- package/dist/safe-bash/shell/input.js.map +1 -0
- package/dist/safe-bash/shell/locale.d.ts +2 -0
- package/dist/safe-bash/shell/locale.d.ts.map +1 -0
- package/dist/safe-bash/shell/locale.js +5 -0
- package/dist/safe-bash/shell/locale.js.map +1 -0
- package/dist/safe-bash/shell/parser.d.ts +149 -0
- package/dist/safe-bash/shell/parser.d.ts.map +1 -0
- package/dist/safe-bash/shell/parser.js +1023 -0
- package/dist/safe-bash/shell/parser.js.map +1 -0
- package/dist/safe-bash/shell/pattern.d.ts +9 -0
- package/dist/safe-bash/shell/pattern.d.ts.map +1 -0
- package/dist/safe-bash/shell/pattern.js +134 -0
- package/dist/safe-bash/shell/pattern.js.map +1 -0
- package/dist/safe-bash/shell/pipestatus.d.ts +6 -0
- package/dist/safe-bash/shell/pipestatus.d.ts.map +1 -0
- package/dist/safe-bash/shell/pipestatus.js +82 -0
- package/dist/safe-bash/shell/pipestatus.js.map +1 -0
- package/dist/safe-bash/shell/runtime.d.ts +282 -0
- package/dist/safe-bash/shell/runtime.d.ts.map +1 -0
- package/dist/safe-bash/shell/runtime.js +5400 -0
- package/dist/safe-bash/shell/runtime.js.map +1 -0
- package/dist/safe-bash/shell/shell.d.ts +15 -0
- package/dist/safe-bash/shell/shell.d.ts.map +1 -0
- package/dist/safe-bash/shell/shell.js +355 -0
- package/dist/safe-bash/shell/shell.js.map +1 -0
- package/dist/safe-bash/shell/types.d.ts +76 -0
- package/dist/safe-bash/shell/types.d.ts.map +1 -0
- package/dist/safe-bash/shell/types.js +25 -0
- package/dist/safe-bash/shell/types.js.map +1 -0
- package/dist/safe-bash/shell/value-state.d.ts +57 -0
- package/dist/safe-bash/shell/value-state.d.ts.map +1 -0
- package/dist/safe-bash/shell/value-state.js +275 -0
- package/dist/safe-bash/shell/value-state.js.map +1 -0
- package/package.json +143 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { FsError, resolvePath } from "../../contracts/index.js";
|
|
2
|
+
import { compareObservedEntries } from "../copy-identity.js";
|
|
3
|
+
import { parse, help } from "./arguments.js";
|
|
4
|
+
import { escaped, message, TreeLimitError, UsageError, WalkBudget } from "./io.js";
|
|
5
|
+
import { settings } from "./options.js";
|
|
6
|
+
import { matches } from "./pattern.js";
|
|
7
|
+
function directory(entry) { return (entry.followed ?? entry.stat)?.type === "directory"; }
|
|
8
|
+
function serialized(value, budget) {
|
|
9
|
+
let size = 2;
|
|
10
|
+
const add = (count) => { budget.checkOutput(size += count); };
|
|
11
|
+
const string = (text) => {
|
|
12
|
+
budget.outputText(text);
|
|
13
|
+
add(2);
|
|
14
|
+
for (const character of text) {
|
|
15
|
+
const point = character.codePointAt(0);
|
|
16
|
+
if (point === 34 || point === 92 || point === 8 || point === 9 || point === 10 || point === 12 || point === 13)
|
|
17
|
+
add(2);
|
|
18
|
+
else if (point < 32 || (point >= 0xd800 && point <= 0xdfff) || /[\u007f-\u009f\u2028\u2029\p{Cf}]/u.test(character))
|
|
19
|
+
add(6 * character.length);
|
|
20
|
+
else
|
|
21
|
+
add(point < 0x80 ? 1 : point < 0x800 ? 2 : point < 0x10000 ? 3 : 4);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
let first = true;
|
|
25
|
+
for (const [key, field] of Object.entries(value)) {
|
|
26
|
+
if (!first)
|
|
27
|
+
add(1);
|
|
28
|
+
first = false;
|
|
29
|
+
string(key);
|
|
30
|
+
add(1);
|
|
31
|
+
if (typeof field === "string")
|
|
32
|
+
string(field);
|
|
33
|
+
else if (typeof field === "number")
|
|
34
|
+
add(String(field).length);
|
|
35
|
+
else
|
|
36
|
+
throw new TypeError("tree JSON fields must be strings or numbers");
|
|
37
|
+
}
|
|
38
|
+
return JSON.stringify(value).replace(/[\u007f-\u009f\u2028\u2029\p{Cf}]/gu, character => character.split("").map(unit => `\\u${unit.charCodeAt(0).toString(16).padStart(4, "0")}`).join(""));
|
|
39
|
+
}
|
|
40
|
+
class Walker {
|
|
41
|
+
budget;
|
|
42
|
+
args;
|
|
43
|
+
directories = 0;
|
|
44
|
+
files = 0;
|
|
45
|
+
failed = false;
|
|
46
|
+
constructor(budget, args) {
|
|
47
|
+
this.budget = budget;
|
|
48
|
+
this.args = args;
|
|
49
|
+
}
|
|
50
|
+
async inspect(path, display, name) {
|
|
51
|
+
const { context } = this.budget;
|
|
52
|
+
const options = { signal: context.signal };
|
|
53
|
+
const entry = { path, display, name };
|
|
54
|
+
this.budget.text(path);
|
|
55
|
+
this.budget.text(display);
|
|
56
|
+
try {
|
|
57
|
+
entry.stat = await this.budget.fs(() => context.fs.lstat(path, options));
|
|
58
|
+
if (entry.stat.type === "symlink") {
|
|
59
|
+
if (!context.fs.readlink)
|
|
60
|
+
throw new FsError("ENOTSUP", { path, syscall: "readlink" });
|
|
61
|
+
entry.target = await this.budget.fs(() => context.fs.readlink(path, options));
|
|
62
|
+
try {
|
|
63
|
+
entry.followed = await this.budget.fs(() => context.fs.stat(path, options));
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
context.signal.throwIfAborted();
|
|
67
|
+
if (!(error instanceof FsError) || (error.code !== "ENOENT" && error.code !== "ENOTDIR"))
|
|
68
|
+
throw error;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
context.signal.throwIfAborted();
|
|
74
|
+
if (error instanceof TreeLimitError)
|
|
75
|
+
throw error;
|
|
76
|
+
entry.error = message(error, this.budget);
|
|
77
|
+
}
|
|
78
|
+
if (entry.target !== undefined)
|
|
79
|
+
this.budget.text(entry.target);
|
|
80
|
+
return entry;
|
|
81
|
+
}
|
|
82
|
+
async children(entry, ancestors, depth) {
|
|
83
|
+
const { context, limits } = this.budget;
|
|
84
|
+
if (entry.error || !directory(entry) || (entry.stat?.type === "symlink" && !this.args.follow))
|
|
85
|
+
return [];
|
|
86
|
+
if (depth === this.args.level)
|
|
87
|
+
return [];
|
|
88
|
+
this.budget.check(depth + 1, limits.maxDepth, "depth");
|
|
89
|
+
let listing;
|
|
90
|
+
try {
|
|
91
|
+
for (const ancestor of ancestors) {
|
|
92
|
+
const same = await this.budget.fs(() => compareObservedEntries(context.fs, entry.path, (entry.followed ?? entry.stat), context.fs, ancestor.path, (ancestor.followed ?? ancestor.stat), { signal: context.signal }));
|
|
93
|
+
if (same === "same") {
|
|
94
|
+
entry.cycle = true;
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
listing = await this.budget.fs(() => context.fs.readdir(entry.path, { signal: context.signal }));
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
context.signal.throwIfAborted();
|
|
102
|
+
if (error instanceof TreeLimitError)
|
|
103
|
+
throw error;
|
|
104
|
+
entry.error = message(error, this.budget);
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
this.budget.check(listing.length, limits.maxDirectoryEntries, "directory entry");
|
|
108
|
+
this.budget.entry(listing.length);
|
|
109
|
+
const names = new Set();
|
|
110
|
+
const candidates = [];
|
|
111
|
+
for (const item of listing) {
|
|
112
|
+
this.budget.step();
|
|
113
|
+
this.budget.text(item.name);
|
|
114
|
+
if (item.name === "." || item.name === "..")
|
|
115
|
+
continue;
|
|
116
|
+
if (!item.name || item.name.includes("/") || item.name.includes("\0") || /[\ud800-\udfff]/u.test(item.name) || names.has(item.name)) {
|
|
117
|
+
entry.error = "invalid or duplicate directory entry";
|
|
118
|
+
return [];
|
|
119
|
+
}
|
|
120
|
+
names.add(item.name);
|
|
121
|
+
if (!this.args.all && item.name.startsWith("."))
|
|
122
|
+
continue;
|
|
123
|
+
const bytes = new TextEncoder().encode(item.name);
|
|
124
|
+
if (this.args.exclude.some(pattern => matches(pattern, bytes, this.budget)))
|
|
125
|
+
continue;
|
|
126
|
+
candidates.push({ name: item.name, bytes });
|
|
127
|
+
}
|
|
128
|
+
candidates.sort((left, right) => {
|
|
129
|
+
this.budget.step(1 + left.bytes.length + right.bytes.length);
|
|
130
|
+
return Buffer.compare(left.bytes, right.bytes) * (this.args.reverse ? -1 : 1);
|
|
131
|
+
});
|
|
132
|
+
const children = [];
|
|
133
|
+
for (const item of candidates) {
|
|
134
|
+
const child = await this.inspect(resolvePath(entry.path, item.name), `${entry.display.replace(/\/$/u, "")}/${item.name}`, item.name);
|
|
135
|
+
if (!child.error) {
|
|
136
|
+
if (this.args.directories && !directory(child))
|
|
137
|
+
continue;
|
|
138
|
+
const includeDirectory = child.stat?.type === "directory" || (this.args.follow && directory(child));
|
|
139
|
+
if (!includeDirectory && this.args.include.length && !this.args.include.some(pattern => matches(pattern, item.bytes, this.budget)))
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
children.push(child);
|
|
143
|
+
}
|
|
144
|
+
if (this.args.dirsFirst)
|
|
145
|
+
children.sort((left, right) => {
|
|
146
|
+
this.budget.step();
|
|
147
|
+
return Number(directory(right)) - Number(directory(left));
|
|
148
|
+
});
|
|
149
|
+
return children;
|
|
150
|
+
}
|
|
151
|
+
async visit(entry, ancestors, prefix, last, depth) {
|
|
152
|
+
const children = await this.children(entry, ancestors, depth);
|
|
153
|
+
if (directory(entry)) {
|
|
154
|
+
if (depth > 0 || children.length)
|
|
155
|
+
this.directories++;
|
|
156
|
+
}
|
|
157
|
+
else if (entry.stat)
|
|
158
|
+
this.files++;
|
|
159
|
+
if (entry.error) {
|
|
160
|
+
this.budget.text(entry.error);
|
|
161
|
+
this.failed = true;
|
|
162
|
+
await this.budget.emit(this.budget.context.stderr, `tree: ${escaped(entry.display, this.budget)}: ${escaped(entry.error, this.budget)}\n`);
|
|
163
|
+
}
|
|
164
|
+
const name = depth === 0 || this.args.full ? entry.display : entry.name;
|
|
165
|
+
const annotation = entry.error ?? (entry.cycle ? "recursive, not followed" : undefined);
|
|
166
|
+
if (this.args.json) {
|
|
167
|
+
const fields = { type: entry.stat?.type === "symlink" ? "link" : entry.stat?.type ?? "unknown", name,
|
|
168
|
+
...(entry.target === undefined ? {} : { target: entry.target }), ...(annotation === undefined ? {} : { error: annotation }) };
|
|
169
|
+
await this.write(`${this.padding(depth + 1)}${serialized(fields, this.budget).slice(0, -1)}`);
|
|
170
|
+
if (children.length) {
|
|
171
|
+
await this.write(`,"contents":[${this.newline()}`);
|
|
172
|
+
for (let index = 0; index < children.length; index++) {
|
|
173
|
+
if (index)
|
|
174
|
+
await this.write(`,${this.newline()}`);
|
|
175
|
+
await this.visit(children[index], [...ancestors, entry], "", index === children.length - 1, depth + 1);
|
|
176
|
+
}
|
|
177
|
+
await this.write(`${this.newline()}${this.padding(depth + 1)}]`);
|
|
178
|
+
}
|
|
179
|
+
await this.write("}");
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
const utf8 = this.args.charset === "UTF-8";
|
|
183
|
+
const branch = this.args.indent && depth > 0 ? prefix + (last ? (utf8 ? "└── " : "`-- ") : (utf8 ? "├── " : "|-- ")) : "";
|
|
184
|
+
await this.write(`${branch}${escaped(name, this.budget)}${entry.target === undefined ? "" : ` -> ${escaped(entry.target, this.budget)}`}${annotation === undefined ? "" : ` [${escaped(annotation, this.budget)}]`}\n`);
|
|
185
|
+
const childPrefix = depth === 0 ? "" : prefix + (last ? " " : utf8 ? "│ " : "| ");
|
|
186
|
+
for (let index = 0; index < children.length; index++) {
|
|
187
|
+
await this.visit(children[index], [...ancestors, entry], childPrefix, index === children.length - 1, depth + 1);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
newline() { return this.args.indent ? "\n" : ""; }
|
|
192
|
+
padding(depth) { return this.args.indent ? " ".repeat(depth) : ""; }
|
|
193
|
+
write(value) { return this.budget.emit(this.budget.context.stdout, value); }
|
|
194
|
+
async run() {
|
|
195
|
+
this.budget.text(this.budget.context.cwd);
|
|
196
|
+
if (this.args.json)
|
|
197
|
+
await this.write(`[${this.newline()}`);
|
|
198
|
+
for (let index = 0; index < this.args.operands.length; index++) {
|
|
199
|
+
const operand = this.args.operands[index];
|
|
200
|
+
this.budget.text(operand);
|
|
201
|
+
this.budget.entry();
|
|
202
|
+
if (this.args.json && index)
|
|
203
|
+
await this.write(`,${this.newline()}`);
|
|
204
|
+
const entry = await this.inspect(resolvePath(this.budget.context.cwd, operand), operand, operand);
|
|
205
|
+
await this.visit(entry, [], "", true, 0);
|
|
206
|
+
}
|
|
207
|
+
if (this.args.report) {
|
|
208
|
+
if (this.args.json) {
|
|
209
|
+
await this.write(`,${this.newline()}${this.padding(1)}${serialized({ type: "report", directories: this.directories,
|
|
210
|
+
...(this.args.directories ? {} : { files: this.files }) }, this.budget)}`);
|
|
211
|
+
}
|
|
212
|
+
else
|
|
213
|
+
await this.write(`\n${this.directories} ${this.directories === 1 ? "directory" : "directories"}${this.args.directories ? "" : `, ${this.files} ${this.files === 1 ? "file" : "files"}`}\n`);
|
|
214
|
+
}
|
|
215
|
+
if (this.args.json)
|
|
216
|
+
await this.write(`${this.newline()}]\n`);
|
|
217
|
+
return this.failed ? 1 : 0;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
export function createTreeCommand(options = {}) {
|
|
221
|
+
const limits = settings(options);
|
|
222
|
+
return { name: "tree", description: "List a bounded virtual directory tree", async execute(context) {
|
|
223
|
+
const budget = new WalkBudget(context, limits);
|
|
224
|
+
let args;
|
|
225
|
+
try {
|
|
226
|
+
args = parse(context.args, budget);
|
|
227
|
+
}
|
|
228
|
+
catch (error) {
|
|
229
|
+
context.signal.throwIfAborted();
|
|
230
|
+
if (!(error instanceof UsageError))
|
|
231
|
+
throw error;
|
|
232
|
+
await budget.emit(context.stderr, `tree: ${escaped(error.message, budget)}\n`);
|
|
233
|
+
return { exitCode: 2 };
|
|
234
|
+
}
|
|
235
|
+
if (args.help || args.version) {
|
|
236
|
+
await budget.emit(context.stdout, args.help ? help : "tree (virtual-bash bounded profile) 1\n");
|
|
237
|
+
return { exitCode: 0 };
|
|
238
|
+
}
|
|
239
|
+
return { exitCode: await new Walker(budget, args).run() };
|
|
240
|
+
} };
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../src/commands/tree/tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAyC,MAAM,0BAA0B,CAAC;AACvG,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAkB,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAAE,QAAQ,EAA4B,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAavC,SAAS,SAAS,CAAC,KAAY,IAAa,OAAO,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;AAE1G,SAAS,UAAU,CAAC,KAAgD,EAAE,MAAkB;IACtF,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,MAAM,GAAG,GAAG,CAAC,KAAa,EAAQ,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,MAAM,GAAG,CAAC,IAA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AAC;YACD,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC;QAC5D,CAAC,EAAE,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CommandDefinition, VirtualShellPlugin } from "../../contracts/index.js";
|
|
2
|
+
import type { WhichCommandsOptions } from "./options.js";
|
|
3
|
+
export { createWhichCommand } from "./which.js";
|
|
4
|
+
export type { WhichCommandsOptions, WhichLimits } from "./options.js";
|
|
5
|
+
export declare function createWhichCommands(options?: WhichCommandsOptions): readonly CommandDefinition[];
|
|
6
|
+
export declare function whichCommands(options?: WhichCommandsOptions): VirtualShellPlugin;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/which/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtE,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,oBAAyB,GAAG,SAAS,iBAAiB,EAAE,CAEpG;AAED,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,kBAAkB,CAYpF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createWhichCommand } from "./which.js";
|
|
2
|
+
export { createWhichCommand } from "./which.js";
|
|
3
|
+
export function createWhichCommands(options = {}) {
|
|
4
|
+
return Object.freeze([createWhichCommand(options)]);
|
|
5
|
+
}
|
|
6
|
+
export function whichCommands(options = {}) {
|
|
7
|
+
const commands = createWhichCommands(options);
|
|
8
|
+
const replace = options.replace ?? false;
|
|
9
|
+
return {
|
|
10
|
+
name: "which-commands",
|
|
11
|
+
setup(host) {
|
|
12
|
+
if (!replace)
|
|
13
|
+
for (const command of commands) {
|
|
14
|
+
if (host.commands.has(command.name))
|
|
15
|
+
throw new Error(`Command already registered: ${command.name}`);
|
|
16
|
+
}
|
|
17
|
+
for (const command of commands)
|
|
18
|
+
host.commands.register(command, { replace });
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/which/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGhD,MAAM,UAAU,mBAAmB,CAAC,UAAgC,EAAE;IACpE,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,UAAgC,EAAE;IAC9D,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC;IACzC,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,KAAK,CAAC,IAAI;YACR,IAAI,CAAC,OAAO;gBAAE,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;oBAC7C,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;wBAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;gBACtG,CAAC;YACD,KAAK,MAAM,OAAO,IAAI,QAAQ;gBAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QAC/E,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface WhichLimits {
|
|
2
|
+
readonly maxArguments: number;
|
|
3
|
+
readonly maxArgumentBytes: number;
|
|
4
|
+
readonly maxPathEnvBytes: number;
|
|
5
|
+
readonly maxPathComponents: number;
|
|
6
|
+
readonly maxPathBytes: number;
|
|
7
|
+
readonly maxProbes: number;
|
|
8
|
+
readonly maxOutputBytes: number;
|
|
9
|
+
}
|
|
10
|
+
export interface WhichCommandsOptions {
|
|
11
|
+
readonly replace?: boolean;
|
|
12
|
+
readonly limits?: Partial<WhichLimits>;
|
|
13
|
+
}
|
|
14
|
+
export declare function settings(options: WhichCommandsOptions): WhichLimits;
|
|
15
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/commands/which/options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CACxC;AAYD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,oBAAoB,GAAG,WAAW,CAYnE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const DEFAULT_LIMITS = Object.freeze({
|
|
2
|
+
maxArguments: 4096,
|
|
3
|
+
maxArgumentBytes: 65536,
|
|
4
|
+
maxPathEnvBytes: 65536,
|
|
5
|
+
maxPathComponents: 4096,
|
|
6
|
+
maxPathBytes: 16384,
|
|
7
|
+
maxProbes: 65536,
|
|
8
|
+
maxOutputBytes: 8388608,
|
|
9
|
+
});
|
|
10
|
+
export function settings(options) {
|
|
11
|
+
for (const key of Reflect.ownKeys(options.limits ?? {})) {
|
|
12
|
+
if (!Object.hasOwn(DEFAULT_LIMITS, key))
|
|
13
|
+
throw new RangeError(`Unknown which limit: ${String(key)}`);
|
|
14
|
+
}
|
|
15
|
+
const limits = { ...DEFAULT_LIMITS, ...options.limits };
|
|
16
|
+
for (const [key, value] of Object.entries(limits)) {
|
|
17
|
+
if (!Number.isSafeInteger(value) || value < 1
|
|
18
|
+
|| (key === "maxPathBytes" && value > Number.MAX_SAFE_INTEGER - 256)) {
|
|
19
|
+
throw new RangeError(`Invalid which limit: ${key}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return Object.freeze(limits);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/commands/which/options.ts"],"names":[],"mappings":"AAeA,MAAM,cAAc,GAAgB,MAAM,CAAC,MAAM,CAAC;IAChD,YAAY,EAAE,IAAI;IAClB,gBAAgB,EAAE,KAAK;IACvB,eAAe,EAAE,KAAK;IACtB,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE,KAAK;IAChB,cAAc,EAAE,OAAO;CACxB,CAAC,CAAC;AAEH,MAAM,UAAU,QAAQ,CAAC,OAA6B;IACpD,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC;YAAE,MAAM,IAAI,UAAU,CAAC,wBAAwB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACvG,CAAC;IACD,MAAM,MAAM,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IACxD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;eACxC,CAAC,GAAG,KAAK,cAAc,IAAI,KAAK,GAAG,MAAM,CAAC,gBAAgB,GAAG,GAAG,CAAC,EAAE,CAAC;YACvE,MAAM,IAAI,UAAU,CAAC,wBAAwB,GAAG,EAAE,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"which.d.ts","sourceRoot":"","sources":["../../../src/commands/which/which.ts"],"names":[],"mappings":"AAAA,OAAO,EAE+B,KAAK,iBAAiB,EAC3D,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAY,KAAK,oBAAoB,EAAoB,MAAM,cAAc,CAAC;AA8PrF,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,oBAAyB,GAAG,iBAAiB,CAMxF"}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { ACCESS_MODES, isAbsolutePath, isFsError, validatePath, writeBytes, } from "../../contracts/index.js";
|
|
2
|
+
import { settings } from "./options.js";
|
|
3
|
+
const USAGE = "usage: which [-as] program ...\n";
|
|
4
|
+
const encoder = new TextEncoder();
|
|
5
|
+
const descriptions = {
|
|
6
|
+
EACCES: "permission denied",
|
|
7
|
+
EAGAIN: "resource temporarily unavailable",
|
|
8
|
+
EBADF: "bad file descriptor",
|
|
9
|
+
EBUSY: "resource busy or locked",
|
|
10
|
+
ECANCELED: "operation canceled",
|
|
11
|
+
EEXIST: "file already exists",
|
|
12
|
+
EFBIG: "file too large",
|
|
13
|
+
EINTR: "interrupted system call",
|
|
14
|
+
EINVAL: "invalid argument",
|
|
15
|
+
EIO: "input/output error",
|
|
16
|
+
EISDIR: "illegal operation on a directory",
|
|
17
|
+
ELOOP: "too many symbolic links encountered",
|
|
18
|
+
EMFILE: "too many open files",
|
|
19
|
+
ENAMETOOLONG: "name too long",
|
|
20
|
+
ENFILE: "file table overflow",
|
|
21
|
+
ENOENT: "no such file or directory",
|
|
22
|
+
ENOMEM: "not enough memory",
|
|
23
|
+
ENOSPC: "no space left on device",
|
|
24
|
+
ENOSYS: "function not implemented",
|
|
25
|
+
ENOTDIR: "not a directory",
|
|
26
|
+
ENOTEMPTY: "directory not empty",
|
|
27
|
+
ENOTSUP: "operation not supported",
|
|
28
|
+
EOPNOTSUPP: "operation not supported",
|
|
29
|
+
EPERM: "operation not permitted",
|
|
30
|
+
EPIPE: "broken pipe",
|
|
31
|
+
EROFS: "read-only file system",
|
|
32
|
+
ETIMEDOUT: "operation timed out",
|
|
33
|
+
EXDEV: "cross-device link not permitted",
|
|
34
|
+
};
|
|
35
|
+
const misses = new Set([
|
|
36
|
+
"ENOENT", "ENOTDIR", "EACCES", "EPERM", "ELOOP", "ENAMETOOLONG",
|
|
37
|
+
]);
|
|
38
|
+
class Diagnostic extends Error {
|
|
39
|
+
}
|
|
40
|
+
class Invocation {
|
|
41
|
+
context;
|
|
42
|
+
limits;
|
|
43
|
+
hasNul = false;
|
|
44
|
+
probes = 0;
|
|
45
|
+
outputBytes = 0;
|
|
46
|
+
all = false;
|
|
47
|
+
quiet = false;
|
|
48
|
+
cwd = "";
|
|
49
|
+
cwdBytes = 0;
|
|
50
|
+
constructor(context, limits) {
|
|
51
|
+
this.context = context;
|
|
52
|
+
this.limits = limits;
|
|
53
|
+
}
|
|
54
|
+
check() {
|
|
55
|
+
this.context.signal.throwIfAborted();
|
|
56
|
+
}
|
|
57
|
+
limit(key) {
|
|
58
|
+
throw new Diagnostic(`which: ${key} limit exceeded\n`);
|
|
59
|
+
}
|
|
60
|
+
add(current, increment, maximum, key) {
|
|
61
|
+
if (increment > maximum - current)
|
|
62
|
+
this.limit(key);
|
|
63
|
+
return current + increment;
|
|
64
|
+
}
|
|
65
|
+
bytes(text, maximum, key, start = 0, end = text.length) {
|
|
66
|
+
this.check();
|
|
67
|
+
if (end - start > maximum)
|
|
68
|
+
this.limit(key);
|
|
69
|
+
let count = 0;
|
|
70
|
+
let checkpoint = start;
|
|
71
|
+
for (let cursor = start; cursor < end; cursor++) {
|
|
72
|
+
if (cursor >= checkpoint) {
|
|
73
|
+
this.check();
|
|
74
|
+
checkpoint = cursor + 4096;
|
|
75
|
+
}
|
|
76
|
+
const code = text.charCodeAt(cursor);
|
|
77
|
+
let width = code < 0x80 ? 1 : code < 0x800 ? 2 : 3;
|
|
78
|
+
if (code === 0)
|
|
79
|
+
this.hasNul = true;
|
|
80
|
+
if (code >= 0xd800 && code <= 0xdbff && cursor + 1 < end) {
|
|
81
|
+
const next = text.charCodeAt(cursor + 1);
|
|
82
|
+
if (next >= 0xdc00 && next <= 0xdfff) {
|
|
83
|
+
width = 4;
|
|
84
|
+
cursor++;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
count = this.add(count, width, maximum, key);
|
|
88
|
+
}
|
|
89
|
+
this.check();
|
|
90
|
+
return count;
|
|
91
|
+
}
|
|
92
|
+
parse() {
|
|
93
|
+
const args = this.context.args;
|
|
94
|
+
let operand = 0;
|
|
95
|
+
for (; operand < args.length; operand++) {
|
|
96
|
+
this.check();
|
|
97
|
+
const argument = args[operand];
|
|
98
|
+
if (argument === "--") {
|
|
99
|
+
operand++;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
if (argument === "-" || !argument.startsWith("-"))
|
|
103
|
+
break;
|
|
104
|
+
for (let cursor = 1; cursor < argument.length; cursor++) {
|
|
105
|
+
if ((cursor - 1) % 4096 === 0)
|
|
106
|
+
this.check();
|
|
107
|
+
const flag = argument.charAt(cursor);
|
|
108
|
+
if (flag === "a")
|
|
109
|
+
this.all = true;
|
|
110
|
+
else if (flag === "s")
|
|
111
|
+
this.quiet = true;
|
|
112
|
+
else
|
|
113
|
+
throw new Diagnostic(`which: illegal option -- ${String.fromCodePoint(argument.codePointAt(cursor))}\n${USAGE}`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
this.check();
|
|
117
|
+
if (operand === args.length)
|
|
118
|
+
throw new Diagnostic(USAGE);
|
|
119
|
+
return operand;
|
|
120
|
+
}
|
|
121
|
+
async write(sink, text) {
|
|
122
|
+
this.check();
|
|
123
|
+
const bytes = encoder.encode(text);
|
|
124
|
+
this.check();
|
|
125
|
+
try {
|
|
126
|
+
await writeBytes(sink, bytes, this.context.signal);
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
this.check();
|
|
130
|
+
throw error;
|
|
131
|
+
}
|
|
132
|
+
this.check();
|
|
133
|
+
}
|
|
134
|
+
async probe(name, nameBytes, path, start = 0, end = 0) {
|
|
135
|
+
this.check();
|
|
136
|
+
this.probes = this.add(this.probes, 1, this.limits.maxProbes, "maxProbes");
|
|
137
|
+
let displayBytes = nameBytes;
|
|
138
|
+
if (path !== undefined) {
|
|
139
|
+
const componentBytes = start === end ? 1 : this.bytes(path, this.limits.maxPathBytes, "maxPathBytes", start, end);
|
|
140
|
+
displayBytes = this.add(componentBytes, 1, this.limits.maxPathBytes, "maxPathBytes");
|
|
141
|
+
displayBytes = this.add(displayBytes, nameBytes, this.limits.maxPathBytes, "maxPathBytes");
|
|
142
|
+
}
|
|
143
|
+
else if (displayBytes > this.limits.maxPathBytes)
|
|
144
|
+
this.limit("maxPathBytes");
|
|
145
|
+
const absolute = path === undefined ? isAbsolutePath(name) : path.charAt(start) === "/";
|
|
146
|
+
if (!absolute) {
|
|
147
|
+
const prefixBytes = this.cwd === "/" ? 0 : this.cwdBytes;
|
|
148
|
+
const lookupPrefixBytes = this.add(prefixBytes, 1, this.limits.maxPathBytes, "maxPathBytes");
|
|
149
|
+
this.add(lookupPrefixBytes, displayBytes, this.limits.maxPathBytes, "maxPathBytes");
|
|
150
|
+
}
|
|
151
|
+
this.check();
|
|
152
|
+
const display = path === undefined ? name : `${start === end ? "." : path.slice(start, end)}/${name}`;
|
|
153
|
+
const lookup = absolute ? display : `${this.cwd === "/" ? "" : this.cwd}/${display}`;
|
|
154
|
+
validatePath(lookup);
|
|
155
|
+
this.check();
|
|
156
|
+
if (display.endsWith("/") || display.endsWith("/.") || display.endsWith("/.."))
|
|
157
|
+
return false;
|
|
158
|
+
try {
|
|
159
|
+
this.check();
|
|
160
|
+
const stat = await this.context.fs.stat(lookup, { signal: this.context.signal });
|
|
161
|
+
this.check();
|
|
162
|
+
if (stat.type !== "file")
|
|
163
|
+
return false;
|
|
164
|
+
this.check();
|
|
165
|
+
await this.context.fs.access(lookup, ACCESS_MODES.X_OK, { signal: this.context.signal });
|
|
166
|
+
this.check();
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
this.check();
|
|
170
|
+
if (isFsError(error) && misses.has(error.code))
|
|
171
|
+
return false;
|
|
172
|
+
const description = isFsError(error) ? descriptions[error.code] : "filesystem operation failed";
|
|
173
|
+
throw new Diagnostic(`which: ${display}: ${description}\n`);
|
|
174
|
+
}
|
|
175
|
+
this.check();
|
|
176
|
+
if (!this.quiet) {
|
|
177
|
+
const lineBytes = this.add(displayBytes, 1, this.limits.maxOutputBytes - this.outputBytes, "maxOutputBytes");
|
|
178
|
+
this.outputBytes += lineBytes;
|
|
179
|
+
this.check();
|
|
180
|
+
await this.write(this.context.stdout, `${display}\n`);
|
|
181
|
+
}
|
|
182
|
+
this.check();
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
async search() {
|
|
186
|
+
this.check();
|
|
187
|
+
const { args } = this.context;
|
|
188
|
+
if (args.length > this.limits.maxArguments)
|
|
189
|
+
this.limit("maxArguments");
|
|
190
|
+
const path = this.context.env.PATH;
|
|
191
|
+
this.cwd = this.context.cwd;
|
|
192
|
+
let argumentBytes = 0;
|
|
193
|
+
for (const argument of args) {
|
|
194
|
+
this.check();
|
|
195
|
+
argumentBytes += this.bytes(argument, this.limits.maxArgumentBytes - argumentBytes, "maxArgumentBytes");
|
|
196
|
+
}
|
|
197
|
+
if (path !== undefined) {
|
|
198
|
+
this.bytes(path, this.limits.maxPathEnvBytes, "maxPathEnvBytes");
|
|
199
|
+
let components = 1;
|
|
200
|
+
for (let cursor = 0; cursor < path.length; cursor++) {
|
|
201
|
+
if (cursor % 4096 === 0)
|
|
202
|
+
this.check();
|
|
203
|
+
if (path.charAt(cursor) === ":")
|
|
204
|
+
components = this.add(components, 1, this.limits.maxPathComponents, "maxPathComponents");
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
this.cwdBytes = this.bytes(this.cwd, this.limits.maxPathBytes, "maxPathBytes");
|
|
208
|
+
if (this.hasNul)
|
|
209
|
+
throw new Diagnostic("which: invalid argument: NUL byte\n");
|
|
210
|
+
const firstOperand = this.parse();
|
|
211
|
+
if (!isAbsolutePath(this.cwd))
|
|
212
|
+
throw new Diagnostic("which: cwd must be an absolute virtual path\n");
|
|
213
|
+
validatePath(this.cwd);
|
|
214
|
+
this.check();
|
|
215
|
+
if (path === undefined)
|
|
216
|
+
return { exitCode: 1 };
|
|
217
|
+
let everyFound = true;
|
|
218
|
+
for (let operand = firstOperand; operand < args.length; operand++) {
|
|
219
|
+
this.check();
|
|
220
|
+
const name = args[operand];
|
|
221
|
+
if (name === "") {
|
|
222
|
+
everyFound = false;
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
const nameBytes = this.bytes(name, this.limits.maxArgumentBytes, "maxArgumentBytes");
|
|
226
|
+
let slash = false;
|
|
227
|
+
for (let cursor = 0; cursor < name.length; cursor++) {
|
|
228
|
+
if (cursor % 4096 === 0)
|
|
229
|
+
this.check();
|
|
230
|
+
if (name.charAt(cursor) === "/") {
|
|
231
|
+
slash = true;
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
let found = false;
|
|
236
|
+
if (slash)
|
|
237
|
+
found = await this.probe(name, nameBytes);
|
|
238
|
+
else {
|
|
239
|
+
let start = 0;
|
|
240
|
+
for (let cursor = 0; cursor <= path.length; cursor++) {
|
|
241
|
+
if (cursor % 4096 === 0)
|
|
242
|
+
this.check();
|
|
243
|
+
if (cursor === path.length || path.charAt(cursor) === ":") {
|
|
244
|
+
if (await this.probe(name, nameBytes, path, start, cursor)) {
|
|
245
|
+
found = true;
|
|
246
|
+
if (!this.all)
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
start = cursor + 1;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (!found)
|
|
254
|
+
everyFound = false;
|
|
255
|
+
}
|
|
256
|
+
this.check();
|
|
257
|
+
return { exitCode: everyFound ? 0 : 1 };
|
|
258
|
+
}
|
|
259
|
+
async execute() {
|
|
260
|
+
this.check();
|
|
261
|
+
try {
|
|
262
|
+
const result = await this.search();
|
|
263
|
+
this.check();
|
|
264
|
+
return result;
|
|
265
|
+
}
|
|
266
|
+
catch (error) {
|
|
267
|
+
this.check();
|
|
268
|
+
if (!(error instanceof Diagnostic))
|
|
269
|
+
throw error;
|
|
270
|
+
this.bytes(error.message, this.limits.maxPathBytes + 256, "maxPathBytes");
|
|
271
|
+
await this.write(this.context.stderr, error.message);
|
|
272
|
+
this.check();
|
|
273
|
+
return { exitCode: 1 };
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
export function createWhichCommand(options = {}) {
|
|
278
|
+
const limits = settings(options);
|
|
279
|
+
return Object.freeze({
|
|
280
|
+
name: "which",
|
|
281
|
+
execute(context) { return new Invocation(context, limits).execute(); },
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
//# sourceMappingURL=which.js.map
|