just-bash 1.0.1 → 1.2.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.
Files changed (77) hide show
  1. package/README.md +51 -11
  2. package/dist/Bash.d.ts +38 -2
  3. package/dist/ai/index.d.ts +7 -2
  4. package/dist/bin/chunks/awk2-6XCE67AX.js +20 -0
  5. package/dist/bin/chunks/awk2-DKAZ7LPG.js +20 -0
  6. package/dist/bin/chunks/awk2-GAJ72X3Z.js +20 -0
  7. package/dist/bin/chunks/awk2-HJAPWU2N.js +18 -0
  8. package/dist/bin/chunks/awk2-LVXC5OAC.js +20 -0
  9. package/dist/bin/chunks/awk2-T6HR4EYO.js +20 -0
  10. package/dist/bin/chunks/awk2-UYU2UYZ2.js +20 -0
  11. package/dist/bin/chunks/awk2-W64AZN7P.js +20 -0
  12. package/dist/bin/chunks/find-7BUNQZX4.js +11 -0
  13. package/dist/bin/chunks/find-YATLECXJ.js +11 -0
  14. package/dist/bin/chunks/grep-PHBFGJCV.js +15 -0
  15. package/dist/bin/chunks/sed-B6FXUN7R.js +80 -0
  16. package/dist/bin/chunks/sed-RHLDIXPL.js +76 -0
  17. package/dist/bin/chunks/sed-SYSATJXR.js +75 -0
  18. package/dist/bin/just-bash.js +105 -105
  19. package/dist/bin/shell/chunks/awk2-6XCE67AX.js +20 -0
  20. package/dist/bin/shell/chunks/awk2-DKAZ7LPG.js +20 -0
  21. package/dist/bin/shell/chunks/awk2-GAJ72X3Z.js +20 -0
  22. package/dist/bin/shell/chunks/awk2-HJAPWU2N.js +18 -0
  23. package/dist/bin/shell/chunks/awk2-LVXC5OAC.js +20 -0
  24. package/dist/bin/shell/chunks/awk2-T6HR4EYO.js +20 -0
  25. package/dist/bin/shell/chunks/awk2-UYU2UYZ2.js +20 -0
  26. package/dist/bin/shell/chunks/awk2-W64AZN7P.js +20 -0
  27. package/dist/bin/shell/chunks/find-7BUNQZX4.js +11 -0
  28. package/dist/bin/shell/chunks/find-YATLECXJ.js +11 -0
  29. package/dist/bin/shell/chunks/grep-PHBFGJCV.js +15 -0
  30. package/dist/bin/shell/chunks/sed-B6FXUN7R.js +80 -0
  31. package/dist/bin/shell/chunks/sed-RHLDIXPL.js +76 -0
  32. package/dist/bin/shell/chunks/sed-SYSATJXR.js +75 -0
  33. package/dist/bin/shell/shell.js +124 -128
  34. package/dist/bundle/ai/index.js +423 -386
  35. package/dist/bundle/chunks/awk2-365HINHI.js +19 -0
  36. package/dist/bundle/chunks/awk2-7YCFY7D2.js +19 -0
  37. package/dist/bundle/chunks/awk2-7YL3P4KU.js +19 -0
  38. package/dist/bundle/chunks/awk2-ETXZHQQ4.js +19 -0
  39. package/dist/bundle/chunks/awk2-FMEL7ESV.js +19 -0
  40. package/dist/bundle/chunks/awk2-LE4QUFGK.js +19 -0
  41. package/dist/bundle/chunks/awk2-MGHA6JPJ.js +17 -0
  42. package/dist/bundle/chunks/awk2-XEAK5PBN.js +19 -0
  43. package/dist/bundle/chunks/find-KP4M5DWC.js +10 -0
  44. package/dist/bundle/chunks/find-WM6ZETA7.js +10 -0
  45. package/dist/bundle/chunks/grep-CZTYKNEE.js +14 -0
  46. package/dist/bundle/chunks/sed-2WWCANZT.js +79 -0
  47. package/dist/bundle/chunks/sed-5LZHAGFR.js +74 -0
  48. package/dist/bundle/chunks/sed-V7XSBPTD.js +75 -0
  49. package/dist/bundle/index.js +91 -91
  50. package/dist/commands/awk/ast.d.ts +201 -0
  51. package/dist/commands/awk/awk2.d.ts +7 -0
  52. package/dist/commands/awk/builtins.d.ts +17 -0
  53. package/dist/commands/awk/interpreter/context.d.ts +53 -0
  54. package/dist/commands/awk/interpreter/expressions.d.ts +17 -0
  55. package/dist/commands/awk/interpreter/fields.d.ts +25 -0
  56. package/dist/commands/awk/interpreter/helpers.d.ts +29 -0
  57. package/dist/commands/awk/interpreter/index.d.ts +8 -0
  58. package/dist/commands/awk/interpreter/interpreter.d.ts +50 -0
  59. package/dist/commands/awk/interpreter/statements.d.ts +11 -0
  60. package/dist/commands/awk/interpreter/types.d.ts +13 -0
  61. package/dist/commands/awk/interpreter/variables.d.ts +35 -0
  62. package/dist/commands/awk/interpreter2.d.ts +90 -0
  63. package/dist/commands/awk/lexer.d.ts +100 -0
  64. package/dist/commands/awk/parser2.d.ts +73 -0
  65. package/dist/commands/find/matcher.d.ts +6 -2
  66. package/dist/commands/find/types.d.ts +13 -0
  67. package/dist/commands/sed/executor.d.ts +1 -1
  68. package/dist/commands/sed/lexer.d.ts +74 -0
  69. package/dist/commands/sed/parser.d.ts +4 -0
  70. package/dist/commands/sed/types.d.ts +66 -2
  71. package/dist/custom-commands.d.ts +42 -0
  72. package/dist/index.d.ts +7 -4
  73. package/dist/interpreter/interpreter.d.ts +2 -2
  74. package/dist/interpreter/types.d.ts +1 -1
  75. package/dist/sandbox/Sandbox.d.ts +1 -1
  76. package/dist/types.d.ts +1 -1
  77. package/package.json +2 -2
@@ -0,0 +1,73 @@
1
+ /**
2
+ * AWK Parser
3
+ *
4
+ * Recursive descent parser that builds an AST from tokens.
5
+ */
6
+ import type { AwkProgram } from "./ast.js";
7
+ export declare class AwkParser {
8
+ private tokens;
9
+ private pos;
10
+ parse(input: string): AwkProgram;
11
+ private current;
12
+ private advance;
13
+ private match;
14
+ private check;
15
+ private expect;
16
+ private skipNewlines;
17
+ private skipTerminators;
18
+ private parseProgram;
19
+ private parseFunction;
20
+ private parseRule;
21
+ private parseBlock;
22
+ private parseStatement;
23
+ private parseIf;
24
+ private parseWhile;
25
+ private parseDoWhile;
26
+ private parseFor;
27
+ private parsePrint;
28
+ /**
29
+ * Parse a print argument - same as ternary but treats > and >> at the TOP LEVEL
30
+ * (not inside ternary) as redirection rather than comparison operators.
31
+ */
32
+ private parsePrintArg;
33
+ /**
34
+ * Look ahead to see if there's a ternary ? operator before the next statement terminator.
35
+ * This tells us whether > is comparison (in ternary condition) or redirection.
36
+ */
37
+ private lookAheadForTernary;
38
+ private parsePrintOr;
39
+ private parsePrintAnd;
40
+ private parsePrintIn;
41
+ private parsePrintMatch;
42
+ /**
43
+ * Like parseComparison but doesn't consume > and >> (for print redirection)
44
+ */
45
+ private parsePrintComparison;
46
+ private parsePrintf;
47
+ private parseExpression;
48
+ private parseAssignment;
49
+ private parseTernary;
50
+ private parseOr;
51
+ /**
52
+ * Continue parsing a logical OR/AND expression from a given left-hand side.
53
+ * Used when we've already parsed part of an expression (e.g., a regex in pattern context).
54
+ */
55
+ private parseLogicalOrRest;
56
+ /**
57
+ * Continue parsing a logical AND expression from a given left-hand side.
58
+ */
59
+ private parseLogicalAndRest;
60
+ private parseAnd;
61
+ private parseIn;
62
+ private parseMatch;
63
+ private parseComparison;
64
+ private parseConcatenation;
65
+ private canStartExpression;
66
+ private isComparisonOrHigherOp;
67
+ private parseAddSub;
68
+ private parseMulDiv;
69
+ private parseUnary;
70
+ private parsePower;
71
+ private parsePostfix;
72
+ private parsePrimary;
73
+ }
@@ -1,3 +1,7 @@
1
- import type { EvalContext, Expression } from "./types.js";
2
- export declare function evaluateExpression(expr: Expression, ctx: EvalContext): boolean;
1
+ import type { EvalContext, EvalResult, Expression } from "./types.js";
2
+ /**
3
+ * Evaluate a find expression and return both match result and prune flag.
4
+ * The prune flag is set when -prune is evaluated and returns true.
5
+ */
6
+ export declare function evaluateExpressionWithPrune(expr: Expression, ctx: EvalContext): EvalResult;
3
7
  export declare function collectNewerRefs(expr: Expression | null): string[];
@@ -6,6 +6,10 @@ export type Expression = {
6
6
  type: "path";
7
7
  pattern: string;
8
8
  ignoreCase?: boolean;
9
+ } | {
10
+ type: "regex";
11
+ pattern: string;
12
+ ignoreCase?: boolean;
9
13
  } | {
10
14
  type: "type";
11
15
  fileType: "f" | "d";
@@ -27,6 +31,10 @@ export type Expression = {
27
31
  type: "perm";
28
32
  mode: number;
29
33
  matchType: "exact" | "all" | "any";
34
+ } | {
35
+ type: "prune";
36
+ } | {
37
+ type: "print";
30
38
  } | {
31
39
  type: "not";
32
40
  expr: Expression;
@@ -62,6 +70,11 @@ export interface EvalContext {
62
70
  mode: number;
63
71
  newerRefTimes: Map<string, number>;
64
72
  }
73
+ export interface EvalResult {
74
+ matches: boolean;
75
+ pruned: boolean;
76
+ printed: boolean;
77
+ }
65
78
  export interface ParseResult {
66
79
  expr: Expression | null;
67
80
  pathIndex: number;
@@ -1,5 +1,5 @@
1
1
  import type { SedCommand, SedExecutionLimits, SedState } from "./types.js";
2
- export declare function createInitialState(totalLines: number): SedState;
2
+ export declare function createInitialState(totalLines: number, filename?: string, rangeStates?: Map<string, import("./types.js").RangeState>): SedState;
3
3
  export interface ExecuteContext {
4
4
  lines: string[];
5
5
  currentLineIndex: number;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * SED Lexer
3
+ *
4
+ * Tokenizes sed scripts into a stream of tokens.
5
+ * Sed has context-sensitive tokenization - the meaning of characters
6
+ * depends heavily on what command is being parsed.
7
+ */
8
+ export declare enum SedTokenType {
9
+ NUMBER = "NUMBER",
10
+ DOLLAR = "DOLLAR",// $ - last line
11
+ PATTERN = "PATTERN",// /regex/
12
+ STEP = "STEP",// first~step
13
+ LBRACE = "LBRACE",// {
14
+ RBRACE = "RBRACE",// }
15
+ SEMICOLON = "SEMICOLON",// ;
16
+ NEWLINE = "NEWLINE",
17
+ COMMA = "COMMA",// , - address range separator
18
+ COMMAND = "COMMAND",// p, d, h, H, g, G, x, n, N, P, D, q, Q, z, =, l, F, v
19
+ SUBSTITUTE = "SUBSTITUTE",// s/pattern/replacement/flags
20
+ TRANSLITERATE = "TRANSLITERATE",// y/source/dest/
21
+ LABEL_DEF = "LABEL_DEF",// :name
22
+ BRANCH = "BRANCH",// b [label]
23
+ BRANCH_ON_SUBST = "BRANCH_ON_SUBST",// t [label]
24
+ BRANCH_ON_NO_SUBST = "BRANCH_ON_NO_SUBST",// T [label]
25
+ TEXT_CMD = "TEXT_CMD",// a\, i\, c\ with text
26
+ FILE_READ = "FILE_READ",// r filename
27
+ FILE_READ_LINE = "FILE_READ_LINE",// R filename
28
+ FILE_WRITE = "FILE_WRITE",// w filename
29
+ FILE_WRITE_LINE = "FILE_WRITE_LINE",// W filename
30
+ EXECUTE = "EXECUTE",// e [command]
31
+ EOF = "EOF",
32
+ ERROR = "ERROR"
33
+ }
34
+ export interface SedToken {
35
+ type: SedTokenType;
36
+ value: string | number;
37
+ pattern?: string;
38
+ replacement?: string;
39
+ flags?: string;
40
+ source?: string;
41
+ dest?: string;
42
+ text?: string;
43
+ label?: string;
44
+ filename?: string;
45
+ command?: string;
46
+ first?: number;
47
+ step?: number;
48
+ line: number;
49
+ column: number;
50
+ }
51
+ export declare class SedLexer {
52
+ private input;
53
+ private pos;
54
+ private line;
55
+ private column;
56
+ constructor(input: string);
57
+ tokenize(): SedToken[];
58
+ private makeToken;
59
+ private peek;
60
+ private advance;
61
+ private skipWhitespace;
62
+ private nextToken;
63
+ private readNumber;
64
+ private readPattern;
65
+ private readLabelDef;
66
+ private readCommand;
67
+ private readSubstitute;
68
+ private readTransliterate;
69
+ private readTextCommand;
70
+ private readBranch;
71
+ private readFileCommand;
72
+ private readExecute;
73
+ private isDigit;
74
+ }
@@ -1,4 +1,8 @@
1
1
  import type { SedCommand } from "./types.js";
2
+ /**
3
+ * Parse multiple sed scripts into a list of commands.
4
+ * This is the main entry point for parsing sed scripts.
5
+ */
2
6
  export declare function parseMultipleScripts(scripts: string[], extendedRegex?: boolean): {
3
7
  commands: SedCommand[];
4
8
  error?: string;
@@ -9,7 +9,7 @@ export interface AddressRange {
9
9
  start?: SedAddress;
10
10
  end?: SedAddress;
11
11
  }
12
- export type SedCommandType = "substitute" | "print" | "printFirstLine" | "delete" | "deleteFirstLine" | "append" | "insert" | "change" | "hold" | "holdAppend" | "get" | "getAppend" | "exchange" | "next" | "nextAppend" | "quit" | "transliterate" | "lineNumber" | "branch" | "branchOnSubst" | "branchOnNoSubst" | "label" | "zap" | "group";
12
+ export type SedCommandType = "substitute" | "print" | "printFirstLine" | "delete" | "deleteFirstLine" | "append" | "insert" | "change" | "hold" | "holdAppend" | "get" | "getAppend" | "exchange" | "next" | "nextAppend" | "quit" | "quitSilent" | "transliterate" | "lineNumber" | "branch" | "branchOnSubst" | "branchOnNoSubst" | "label" | "zap" | "group" | "list" | "printFilename" | "version" | "readFile" | "readFileLine" | "writeFile" | "writeFirstLine" | "execute";
13
13
  export interface SubstituteCommand {
14
14
  type: "substitute";
15
15
  address?: AddressRange;
@@ -71,6 +71,12 @@ export interface NextCommand {
71
71
  export interface QuitCommand {
72
72
  type: "quit";
73
73
  address?: AddressRange;
74
+ exitCode?: number;
75
+ }
76
+ export interface QuitSilentCommand {
77
+ type: "quitSilent";
78
+ address?: AddressRange;
79
+ exitCode?: number;
74
80
  }
75
81
  export interface NextAppendCommand {
76
82
  type: "nextAppend";
@@ -122,7 +128,45 @@ export interface GroupCommand {
122
128
  address?: AddressRange;
123
129
  commands: SedCommand[];
124
130
  }
125
- export type SedCommand = SubstituteCommand | PrintCommand | PrintFirstLineCommand | DeleteCommand | DeleteFirstLineCommand | AppendCommand | InsertCommand | ChangeCommand | HoldCommand | HoldAppendCommand | GetCommand | GetAppendCommand | ExchangeCommand | NextCommand | QuitCommand | NextAppendCommand | TransliterateCommand | LineNumberCommand | BranchCommand | BranchOnSubstCommand | BranchOnNoSubstCommand | LabelCommand | ZapCommand | GroupCommand;
131
+ export interface ListCommand {
132
+ type: "list";
133
+ address?: AddressRange;
134
+ }
135
+ export interface PrintFilenameCommand {
136
+ type: "printFilename";
137
+ address?: AddressRange;
138
+ }
139
+ export interface VersionCommand {
140
+ type: "version";
141
+ address?: AddressRange;
142
+ minVersion?: string;
143
+ }
144
+ export interface ReadFileCommand {
145
+ type: "readFile";
146
+ address?: AddressRange;
147
+ filename: string;
148
+ }
149
+ export interface ReadFileLineCommand {
150
+ type: "readFileLine";
151
+ address?: AddressRange;
152
+ filename: string;
153
+ }
154
+ export interface WriteFileCommand {
155
+ type: "writeFile";
156
+ address?: AddressRange;
157
+ filename: string;
158
+ }
159
+ export interface WriteFirstLineCommand {
160
+ type: "writeFirstLine";
161
+ address?: AddressRange;
162
+ filename: string;
163
+ }
164
+ export interface ExecuteCommand {
165
+ type: "execute";
166
+ address?: AddressRange;
167
+ command?: string;
168
+ }
169
+ export type SedCommand = SubstituteCommand | PrintCommand | PrintFirstLineCommand | DeleteCommand | DeleteFirstLineCommand | AppendCommand | InsertCommand | ChangeCommand | HoldCommand | HoldAppendCommand | GetCommand | GetAppendCommand | ExchangeCommand | NextCommand | QuitCommand | QuitSilentCommand | NextAppendCommand | TransliterateCommand | LineNumberCommand | BranchCommand | BranchOnSubstCommand | BranchOnNoSubstCommand | LabelCommand | ZapCommand | GroupCommand | ListCommand | PrintFilenameCommand | VersionCommand | ReadFileCommand | ReadFileLineCommand | WriteFileCommand | WriteFirstLineCommand | ExecuteCommand;
126
170
  export interface SedState {
127
171
  patternSpace: string;
128
172
  holdSpace: string;
@@ -131,10 +175,30 @@ export interface SedState {
131
175
  deleted: boolean;
132
176
  printed: boolean;
133
177
  quit: boolean;
178
+ quitSilent: boolean;
179
+ exitCode?: number;
134
180
  appendBuffer: string[];
135
181
  substitutionMade: boolean;
136
182
  lineNumberOutput: string[];
137
183
  restartCycle: boolean;
184
+ currentFilename?: string;
185
+ pendingFileReads: Array<{
186
+ filename: string;
187
+ wholeFile: boolean;
188
+ }>;
189
+ pendingFileWrites: Array<{
190
+ filename: string;
191
+ content: string;
192
+ }>;
193
+ pendingExecute?: {
194
+ command: string;
195
+ replacePattern: boolean;
196
+ };
197
+ rangeStates: Map<string, RangeState>;
198
+ }
199
+ export interface RangeState {
200
+ active: boolean;
201
+ startLine?: number;
138
202
  }
139
203
  export interface SedExecutionLimits {
140
204
  maxIterations: number;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Custom Commands API
3
+ *
4
+ * Provides types and utilities for registering user-provided TypeScript commands.
5
+ */
6
+ import type { Command, CommandContext, ExecResult } from "./types.js";
7
+ /**
8
+ * A custom command - either a Command object or a lazy loader.
9
+ */
10
+ export type CustomCommand = Command | LazyCommand;
11
+ /**
12
+ * Lazy-loaded custom command (for code-splitting).
13
+ */
14
+ export interface LazyCommand {
15
+ name: string;
16
+ load: () => Promise<Command>;
17
+ }
18
+ /**
19
+ * Type guard to check if a custom command is lazy-loaded.
20
+ */
21
+ export declare function isLazyCommand(cmd: CustomCommand): cmd is LazyCommand;
22
+ /**
23
+ * Define a TypeScript command with type inference.
24
+ * Convenience wrapper - you can also just use the Command interface directly.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const hello = defineCommand("hello", async (args, ctx) => {
29
+ * const name = args[0] || "world";
30
+ * return { stdout: `Hello, ${name}!\n`, stderr: "", exitCode: 0 };
31
+ * });
32
+ *
33
+ * const bash = new Bash({ customCommands: [hello] });
34
+ * await bash.exec("hello Alice"); // "Hello, Alice!\n"
35
+ * ```
36
+ */
37
+ export declare function defineCommand(name: string, execute: (args: string[], ctx: CommandContext) => Promise<ExecResult>): Command;
38
+ /**
39
+ * Create a lazy-loaded wrapper for a custom command.
40
+ * The command is only loaded when first executed.
41
+ */
42
+ export declare function createLazyCustomCommand(lazy: LazyCommand): Command;
package/dist/index.d.ts CHANGED
@@ -1,12 +1,15 @@
1
- export type { BashOptions, ExecOptions } from "./Bash.js";
1
+ export type { BashLogger, BashOptions, ExecOptions } from "./Bash.js";
2
2
  export { Bash } from "./Bash.js";
3
3
  export type { AllCommandName, CommandName, NetworkCommandName, } from "./commands/registry.js";
4
4
  export { getCommandNames, getNetworkCommandNames, } from "./commands/registry.js";
5
- export { VirtualFs } from "./fs.js";
6
- export type { BufferEncoding, CpOptions, DirectoryEntry, FileContent, FileEntry, FileInit, FileSystemFactory, FsEntry, FsStat, InitialFiles, MkdirOptions, RmOptions, SymlinkEntry, } from "./fs-interface.js";
5
+ export type { CustomCommand, LazyCommand } from "./custom-commands.js";
6
+ export { defineCommand } from "./custom-commands.js";
7
+ export { InMemoryFs } from "./fs/in-memory-fs/index.js";
8
+ export type { BufferEncoding, CpOptions, DirectoryEntry, FileContent, FileEntry, FileInit, FileSystemFactory, FsEntry, FsStat, InitialFiles, MkdirOptions, RmOptions, SymlinkEntry, } from "./fs/interface.js";
9
+ export { OverlayFs, type OverlayFsOptions } from "./fs/overlay-fs/index.js";
10
+ export { ReadWriteFs, type ReadWriteFsOptions, } from "./fs/read-write-fs/index.js";
7
11
  export type { NetworkConfig } from "./network/index.js";
8
12
  export { NetworkAccessDeniedError, RedirectNotAllowedError, TooManyRedirectsError, } from "./network/index.js";
9
- export { OverlayFs, type OverlayFsOptions } from "./overlay-fs/index.js";
10
13
  export type { CommandFinished as SandboxCommandFinished, OutputMessage, SandboxOptions, WriteFilesInput, } from "./sandbox/index.js";
11
14
  export { Command as SandboxCommand, Sandbox } from "./sandbox/index.js";
12
15
  export type { BashExecResult, Command, CommandContext, ExecResult, IFileSystem, } from "./types.js";
@@ -10,7 +10,7 @@
10
10
  * - Redirections (redirections.ts)
11
11
  */
12
12
  import type { ScriptNode } from "../ast/types.js";
13
- import type { IFileSystem } from "../fs-interface.js";
13
+ import type { IFileSystem } from "../fs/interface.js";
14
14
  import type { ExecutionLimits } from "../limits.js";
15
15
  import type { SecureFetch } from "../network/index.js";
16
16
  import type { CommandRegistry, ExecResult } from "../types.js";
@@ -46,7 +46,7 @@ export declare class Interpreter {
46
46
  * Resolution order:
47
47
  * 1. If command contains "/", resolve as a path
48
48
  * 2. Search PATH directories for the command file
49
- * 3. Fall back to registry lookup (for non-VirtualFs filesystems like OverlayFs)
49
+ * 3. Fall back to registry lookup (for non-InMemoryFs filesystems like OverlayFs)
50
50
  */
51
51
  private resolveCommand;
52
52
  /**
@@ -2,7 +2,7 @@
2
2
  * Interpreter Types
3
3
  */
4
4
  import type { CommandNode, FunctionDefNode, ScriptNode, StatementNode } from "../ast/types.js";
5
- import type { IFileSystem } from "../fs-interface.js";
5
+ import type { IFileSystem } from "../fs/interface.js";
6
6
  import type { ExecutionLimits } from "../limits.js";
7
7
  import type { SecureFetch } from "../network/index.js";
8
8
  import type { CommandRegistry, ExecResult } from "../types.js";
@@ -1,5 +1,5 @@
1
1
  import { Bash } from "../Bash.js";
2
- import type { IFileSystem } from "../fs-interface.js";
2
+ import type { IFileSystem } from "../fs/interface.js";
3
3
  import type { NetworkConfig } from "../network/index.js";
4
4
  import type { CommandFinished } from "./Command.js";
5
5
  import { Command } from "./Command.js";
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { IFileSystem } from "./fs-interface.js";
1
+ import type { IFileSystem } from "./fs/interface.js";
2
2
  import type { ExecutionLimits } from "./limits.js";
3
3
  import type { SecureFetch } from "./network/index.js";
4
4
  export interface ExecResult {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "just-bash",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "A simulated bash environment with virtual filesystem",
5
5
  "repository": {
6
6
  "type": "git",
@@ -87,7 +87,7 @@
87
87
  "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",
88
88
  "build:cli": "esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node'",
89
89
  "build:shell": "esbuild dist/cli/shell.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin/shell --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node'",
90
- "validate": "pnpm build && pnpm typecheck && pnpm lint && pnpm knip && pnpm test:run && pnpm test:dist",
90
+ "validate": "pnpm lint && pnpm knip && pnpm typecheck && pnpm build && pnpm test:run && pnpm test:dist",
91
91
  "typecheck": "tsc --noEmit",
92
92
  "lint": "biome check .",
93
93
  "lint:fix": "biome check --write .",