just-bash 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/chunks/awk2-4DKPX43H.js +20 -0
- package/dist/bin/chunks/chunk-NWWB2XRE.js +6 -0
- package/dist/bin/chunks/sed-LTCVBSRV.js +80 -0
- package/dist/bin/just-bash.js +72 -72
- package/dist/bin/shell/chunks/awk2-4DKPX43H.js +20 -0
- package/dist/bin/shell/chunks/chunk-NWWB2XRE.js +6 -0
- package/dist/bin/shell/chunks/sed-LTCVBSRV.js +80 -0
- package/dist/bin/shell/shell.js +97 -97
- package/dist/bundle/ai/index.js +304 -304
- package/dist/bundle/chunks/awk2-4YCQ6UCB.js +19 -0
- package/dist/bundle/chunks/chunk-CG2HXOFG.js +5 -0
- package/dist/bundle/chunks/sed-IGVS3UIY.js +79 -0
- package/dist/bundle/index.js +111 -111
- package/dist/interpreter/errors.d.ts +8 -0
- package/dist/interpreter/types.d.ts +2 -0
- package/package.json +2 -1
|
@@ -99,6 +99,14 @@ export declare class ExecutionLimitError extends ControlFlowError {
|
|
|
99
99
|
static readonly EXIT_CODE = 126;
|
|
100
100
|
constructor(message: string, limitType: "recursion" | "commands" | "iterations", stdout?: string, stderr?: string);
|
|
101
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Error thrown when break/continue is called in a subshell that was
|
|
104
|
+
* spawned from within a loop context. Causes the subshell to exit cleanly.
|
|
105
|
+
*/
|
|
106
|
+
export declare class SubshellExitError extends ControlFlowError {
|
|
107
|
+
readonly name = "SubshellExitError";
|
|
108
|
+
constructor(stdout?: string, stderr?: string);
|
|
109
|
+
}
|
|
102
110
|
/**
|
|
103
111
|
* Type guard for errors that exit the current scope (return, break, continue).
|
|
104
112
|
* These need special handling vs errexit/nounset which terminate execution.
|
|
@@ -37,6 +37,8 @@ export interface InterpreterState {
|
|
|
37
37
|
inCondition: boolean;
|
|
38
38
|
/** Current loop nesting depth (for break/continue) */
|
|
39
39
|
loopDepth: number;
|
|
40
|
+
/** True if this subshell was spawned from within a loop context (for break/continue to exit subshell) */
|
|
41
|
+
parentHasLoopContext?: boolean;
|
|
40
42
|
/** Stdin available for commands in compound commands (groups, subshells, while loops with piped input) */
|
|
41
43
|
groupStdin?: string;
|
|
42
44
|
/** Set of variable names that are readonly */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "just-bash",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A simulated bash environment with virtual filesystem",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"test:dist": "vitest run src/cli/just-bash.bundle.test.ts",
|
|
98
98
|
"test:unit": "vitest run --config vitest.unit.config.ts",
|
|
99
99
|
"test:comparison": "vitest run --config vitest.comparison.config.ts",
|
|
100
|
+
"test:comparison:record": "RECORD_FIXTURES=1 vitest run --config vitest.comparison.config.ts",
|
|
100
101
|
"shell": "npx tsx src/cli/shell.ts",
|
|
101
102
|
"dev:exec": "npx tsx src/cli/exec.ts"
|
|
102
103
|
}
|