just-bash 1.3.1 → 1.4.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/README.md +3 -3
- package/dist/bin/chunks/hostname-CV7CGKRN.js +3 -0
- package/dist/bin/chunks/od-TXTSFFJY.js +7 -0
- package/dist/bin/chunks/tac-F4GC3MAI.js +9 -0
- package/dist/bin/just-bash.js +78 -76
- package/dist/bin/shell/chunks/hostname-CV7CGKRN.js +3 -0
- package/dist/bin/shell/chunks/od-TXTSFFJY.js +7 -0
- package/dist/bin/shell/chunks/tac-F4GC3MAI.js +9 -0
- package/dist/bin/shell/shell.js +97 -95
- package/dist/bundle/ai/index.js +273 -258
- package/dist/bundle/chunks/hostname-K4BA3P6X.js +2 -0
- package/dist/bundle/chunks/od-SOCTFI2F.js +6 -0
- package/dist/bundle/chunks/tac-VIFKNLII.js +8 -0
- package/dist/bundle/index.js +75 -73
- package/dist/commands/hostname/hostname.d.ts +9 -0
- package/dist/commands/od/od.d.ts +10 -0
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/tac/tac.d.ts +9 -0
- package/dist/interpreter/builtins/index.d.ts +1 -0
- package/dist/interpreter/builtins/mapfile.d.ts +17 -0
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* od - dump files in octal and other formats
|
|
3
|
+
*
|
|
4
|
+
* Usage: od [OPTION]... [FILE]...
|
|
5
|
+
*
|
|
6
|
+
* Write an unambiguous representation, octal bytes by default,
|
|
7
|
+
* of FILE to standard output.
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from "../../types.js";
|
|
10
|
+
export declare const od: Command;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Command } from "../types.js";
|
|
2
2
|
/** All available built-in command names (excludes network commands like curl) */
|
|
3
|
-
export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which";
|
|
3
|
+
export type CommandName = "echo" | "cat" | "printf" | "ls" | "mkdir" | "touch" | "rm" | "cp" | "mv" | "ln" | "chmod" | "pwd" | "readlink" | "head" | "tail" | "wc" | "stat" | "grep" | "fgrep" | "egrep" | "sed" | "awk" | "sort" | "uniq" | "comm" | "cut" | "paste" | "tr" | "tee" | "find" | "basename" | "dirname" | "tree" | "du" | "env" | "printenv" | "alias" | "unalias" | "history" | "xargs" | "true" | "false" | "clear" | "bash" | "sh" | "jq" | "base64" | "diff" | "date" | "sleep" | "timeout" | "seq" | "expr" | "md5sum" | "sha1sum" | "sha256sum" | "file" | "html-to-markdown" | "help" | "which" | "tac" | "hostname" | "od";
|
|
4
4
|
/** Network command names (only available when network is configured) */
|
|
5
5
|
export type NetworkCommandName = "curl";
|
|
6
6
|
/** All command names including network commands */
|
|
@@ -28,6 +28,7 @@ export { handleExit } from "./exit.js";
|
|
|
28
28
|
export { handleExport } from "./export.js";
|
|
29
29
|
export { handleLet } from "./let.js";
|
|
30
30
|
export { handleLocal } from "./local.js";
|
|
31
|
+
export { handleMapfile } from "./mapfile.js";
|
|
31
32
|
export { handleRead } from "./read.js";
|
|
32
33
|
export { handleReturn } from "./return.js";
|
|
33
34
|
export { handleSet } from "./set.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mapfile/readarray - Read lines from stdin into an array
|
|
3
|
+
*
|
|
4
|
+
* Usage: mapfile [-d delim] [-n count] [-O origin] [-s count] [-t] [array]
|
|
5
|
+
* readarray [-d delim] [-n count] [-O origin] [-s count] [-t] [array]
|
|
6
|
+
*
|
|
7
|
+
* Options:
|
|
8
|
+
* -d delim Use delim as line delimiter (default: newline)
|
|
9
|
+
* -n count Read at most count lines (0 = all)
|
|
10
|
+
* -O origin Start assigning at index origin (default: 0)
|
|
11
|
+
* -s count Skip first count lines
|
|
12
|
+
* -t Remove trailing delimiter from each line
|
|
13
|
+
* array Array name (default: MAPFILE)
|
|
14
|
+
*/
|
|
15
|
+
import type { ExecResult } from "../../types.js";
|
|
16
|
+
import type { InterpreterContext } from "../types.js";
|
|
17
|
+
export declare function handleMapfile(ctx: InterpreterContext, args: string[], stdin: string): ExecResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "just-bash",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A simulated bash environment with virtual filesystem",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81",
|
|
84
84
|
"scripts": {
|
|
85
|
-
"build": "tsc && pnpm build:lib && pnpm build:ai && pnpm build:cli && pnpm build:shell && pnpm build:clean",
|
|
85
|
+
"build": "rm -rf dist && tsc && pnpm build:lib && pnpm build:ai && pnpm build:cli && pnpm build:shell && pnpm build:clean",
|
|
86
86
|
"build:clean": "find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete",
|
|
87
87
|
"build:lib": "esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown",
|
|
88
88
|
"build:ai": "esbuild dist/ai/index.js --bundle --platform=node --format=esm --minify --outfile=dist/bundle/ai/index.js --external:ai --external:zod --external:diff --external:minimatch --external:sprintf-js --external:turndown",
|