shell-dsl 0.0.39 → 0.0.41
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 +183 -3
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/commands/exit/exit.cjs +84 -0
- package/dist/cjs/src/commands/exit/exit.cjs.map +10 -0
- package/dist/cjs/src/commands/index.cjs +18 -2
- package/dist/cjs/src/commands/index.cjs.map +3 -3
- package/dist/cjs/src/commands/sh/sh.cjs +134 -0
- package/dist/cjs/src/commands/sh/sh.cjs.map +10 -0
- package/dist/cjs/src/index.cjs +9 -1
- package/dist/cjs/src/index.cjs.map +3 -3
- package/dist/cjs/src/input-analysis.cjs +154 -0
- package/dist/cjs/src/input-analysis.cjs.map +10 -0
- package/dist/cjs/src/interpreter/context.cjs +6 -1
- package/dist/cjs/src/interpreter/context.cjs.map +3 -3
- package/dist/cjs/src/interpreter/index.cjs +2 -1
- package/dist/cjs/src/interpreter/index.cjs.map +3 -3
- package/dist/cjs/src/interpreter/interpreter.cjs +434 -82
- package/dist/cjs/src/interpreter/interpreter.cjs.map +3 -3
- package/dist/cjs/src/io/async-queue.cjs +105 -0
- package/dist/cjs/src/io/async-queue.cjs.map +10 -0
- package/dist/cjs/src/io/index.cjs +4 -1
- package/dist/cjs/src/io/index.cjs.map +3 -3
- package/dist/cjs/src/io/input-controller.cjs +113 -0
- package/dist/cjs/src/io/input-controller.cjs.map +10 -0
- package/dist/cjs/src/io/stdout.cjs +9 -6
- package/dist/cjs/src/io/stdout.cjs.map +3 -3
- package/dist/cjs/src/lexer/lexer.cjs +13 -1
- package/dist/cjs/src/lexer/lexer.cjs.map +3 -3
- package/dist/cjs/src/parser/parser.cjs +11 -1
- package/dist/cjs/src/parser/parser.cjs.map +3 -3
- package/dist/cjs/src/shell-dsl.cjs +13 -5
- package/dist/cjs/src/shell-dsl.cjs.map +3 -3
- package/dist/cjs/src/shell-session.cjs +128 -0
- package/dist/cjs/src/shell-session.cjs.map +10 -0
- package/dist/cjs/src/types.cjs.map +2 -2
- package/dist/mjs/package.json +1 -1
- package/dist/mjs/src/commands/exit/exit.mjs +44 -0
- package/dist/mjs/src/commands/exit/exit.mjs.map +10 -0
- package/dist/mjs/src/commands/index.mjs +18 -2
- package/dist/mjs/src/commands/index.mjs.map +3 -3
- package/dist/mjs/src/commands/sh/sh.mjs +94 -0
- package/dist/mjs/src/commands/sh/sh.mjs.map +10 -0
- package/dist/mjs/src/index.mjs +19 -3
- package/dist/mjs/src/index.mjs.map +3 -3
- package/dist/mjs/src/input-analysis.mjs +114 -0
- package/dist/mjs/src/input-analysis.mjs.map +10 -0
- package/dist/mjs/src/interpreter/context.mjs +6 -1
- package/dist/mjs/src/interpreter/context.mjs.map +3 -3
- package/dist/mjs/src/interpreter/index.mjs +3 -2
- package/dist/mjs/src/interpreter/index.mjs.map +2 -2
- package/dist/mjs/src/interpreter/interpreter.mjs +434 -82
- package/dist/mjs/src/interpreter/interpreter.mjs.map +3 -3
- package/dist/mjs/src/io/async-queue.mjs +64 -0
- package/dist/mjs/src/io/async-queue.mjs.map +10 -0
- package/dist/mjs/src/io/index.mjs +4 -1
- package/dist/mjs/src/io/index.mjs.map +3 -3
- package/dist/mjs/src/io/input-controller.mjs +72 -0
- package/dist/mjs/src/io/input-controller.mjs.map +10 -0
- package/dist/mjs/src/io/stdout.mjs +9 -6
- package/dist/mjs/src/io/stdout.mjs.map +3 -3
- package/dist/mjs/src/lexer/lexer.mjs +13 -1
- package/dist/mjs/src/lexer/lexer.mjs.map +3 -3
- package/dist/mjs/src/parser/parser.mjs +11 -1
- package/dist/mjs/src/parser/parser.mjs.map +3 -3
- package/dist/mjs/src/shell-dsl.mjs +13 -5
- package/dist/mjs/src/shell-dsl.mjs.map +3 -3
- package/dist/mjs/src/shell-session.mjs +88 -0
- package/dist/mjs/src/shell-session.mjs.map +10 -0
- package/dist/mjs/src/types.mjs.map +2 -2
- package/dist/types/src/commands/exit/exit.d.ts +2 -0
- package/dist/types/src/commands/index.d.ts +2 -0
- package/dist/types/src/commands/sh/sh.d.ts +5 -0
- package/dist/types/src/index.d.ts +6 -3
- package/dist/types/src/input-analysis.d.ts +14 -0
- package/dist/types/src/interpreter/context.d.ts +4 -1
- package/dist/types/src/interpreter/index.d.ts +1 -1
- package/dist/types/src/interpreter/interpreter.d.ts +36 -1
- package/dist/types/src/io/async-queue.d.ts +12 -0
- package/dist/types/src/io/index.d.ts +1 -0
- package/dist/types/src/io/input-controller.d.ts +15 -0
- package/dist/types/src/io/stdout.d.ts +4 -3
- package/dist/types/src/shell-dsl.d.ts +2 -0
- package/dist/types/src/shell-session.d.ts +23 -0
- package/dist/types/src/types.d.ts +52 -0
- package/package.json +1 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// src/shell-session.ts
|
|
2
|
+
import { Lexer } from "./lexer/lexer.mjs";
|
|
3
|
+
import { Parser } from "./parser/parser.mjs";
|
|
4
|
+
import { Interpreter } from "./interpreter/interpreter.mjs";
|
|
5
|
+
import { createStderr, createStdout } from "./io/stdout.mjs";
|
|
6
|
+
import { AsyncQueue } from "./io/async-queue.mjs";
|
|
7
|
+
|
|
8
|
+
class ShellSession {
|
|
9
|
+
interpreter;
|
|
10
|
+
constructor(options) {
|
|
11
|
+
this.interpreter = new Interpreter({
|
|
12
|
+
fs: options.fs,
|
|
13
|
+
cwd: options.cwd,
|
|
14
|
+
env: options.env,
|
|
15
|
+
commands: options.commands,
|
|
16
|
+
terminal: options.terminal ?? { isTTY: options.isTTY ?? false },
|
|
17
|
+
externalCommand: options.externalCommand
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
run(source, options = {}) {
|
|
21
|
+
try {
|
|
22
|
+
const tokens = new Lexer(source, { preserveNewlines: true }).tokenize();
|
|
23
|
+
if (tokens.every((token) => token.type === "newline" || token.type === "eof")) {
|
|
24
|
+
return this.createImmediateExecution(0, "", "");
|
|
25
|
+
}
|
|
26
|
+
const ast = new Parser(tokens).parse();
|
|
27
|
+
return this.interpreter.executeStreaming(ast, options);
|
|
28
|
+
} catch (err) {
|
|
29
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
30
|
+
return this.createImmediateExecution(2, "", `sh: ${message}
|
|
31
|
+
`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
runProgram(program, options = {}) {
|
|
35
|
+
return this.interpreter.executeStreaming(program.ast, options);
|
|
36
|
+
}
|
|
37
|
+
getCwd() {
|
|
38
|
+
return this.interpreter.getCwd();
|
|
39
|
+
}
|
|
40
|
+
getEnv() {
|
|
41
|
+
return this.interpreter.getEnv();
|
|
42
|
+
}
|
|
43
|
+
getLastExitCode() {
|
|
44
|
+
return this.interpreter.getLastExitCode();
|
|
45
|
+
}
|
|
46
|
+
async dispose() {}
|
|
47
|
+
createImmediateExecution(exitCode, stdoutText, stderrText) {
|
|
48
|
+
const stdout = createStdout();
|
|
49
|
+
const stderr = createStderr();
|
|
50
|
+
const output = new AsyncQueue;
|
|
51
|
+
const exit = (async () => {
|
|
52
|
+
if (stdoutText.length > 0) {
|
|
53
|
+
const chunk = new TextEncoder().encode(stdoutText);
|
|
54
|
+
output.push({ fd: 1, chunk });
|
|
55
|
+
await stdout.write(chunk);
|
|
56
|
+
}
|
|
57
|
+
if (stderrText.length > 0) {
|
|
58
|
+
const chunk = new TextEncoder().encode(stderrText);
|
|
59
|
+
output.push({ fd: 2, chunk });
|
|
60
|
+
await stderr.write(chunk);
|
|
61
|
+
}
|
|
62
|
+
stdout.close();
|
|
63
|
+
stderr.close();
|
|
64
|
+
output.close();
|
|
65
|
+
return {
|
|
66
|
+
stdout: await stdout.collect(),
|
|
67
|
+
stderr: await stderr.collect(),
|
|
68
|
+
exitCode
|
|
69
|
+
};
|
|
70
|
+
})();
|
|
71
|
+
return {
|
|
72
|
+
stdout: stdout.getReadableStream(),
|
|
73
|
+
stderr: stderr.getReadableStream(),
|
|
74
|
+
output,
|
|
75
|
+
exit,
|
|
76
|
+
kill: () => {}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
function createShellSession(config) {
|
|
81
|
+
return new ShellSession(config);
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
createShellSession,
|
|
85
|
+
ShellSession
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
//# debugId=C1F9D01ECC6BB46864756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/shell-session.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type {\n Command,\n ExecResult,\n ShellCommandFallback,\n ShellConfig,\n ShellExecution,\n ShellExecutionOptions,\n TerminalInfo,\n VirtualFS,\n} from \"./types.mjs\";\nimport type { Program } from \"./shell-dsl.mjs\";\nimport { Lexer } from \"./lexer/lexer.mjs\";\nimport { Parser } from \"./parser/parser.mjs\";\nimport { Interpreter } from \"./interpreter/interpreter.mjs\";\nimport { createStderr, createStdout } from \"./io/stdout.mjs\";\nimport { AsyncQueue } from \"./io/async-queue.mjs\";\nimport type { ShellOutputEvent } from \"./types.mjs\";\n\nexport interface ShellSessionOptions {\n fs: VirtualFS;\n cwd: string;\n env: Record<string, string>;\n commands: Record<string, Command>;\n isTTY?: boolean;\n terminal?: TerminalInfo;\n externalCommand?: ShellCommandFallback;\n}\n\nexport class ShellSession {\n private interpreter: Interpreter;\n\n constructor(options: ShellSessionOptions) {\n this.interpreter = new Interpreter({\n fs: options.fs,\n cwd: options.cwd,\n env: options.env,\n commands: options.commands,\n terminal: options.terminal ?? { isTTY: options.isTTY ?? false },\n externalCommand: options.externalCommand,\n });\n }\n\n run(source: string, options: ShellExecutionOptions = {}): ShellExecution {\n try {\n const tokens = new Lexer(source, { preserveNewlines: true }).tokenize();\n if (tokens.every((token) => token.type === \"newline\" || token.type === \"eof\")) {\n return this.createImmediateExecution(0, \"\", \"\");\n }\n const ast = new Parser(tokens).parse();\n return this.interpreter.executeStreaming(ast, options);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n return this.createImmediateExecution(2, \"\", `sh: ${message}\\n`);\n }\n }\n\n runProgram(program: Program, options: ShellExecutionOptions = {}): ShellExecution {\n return this.interpreter.executeStreaming(program.ast, options);\n }\n\n getCwd(): string {\n return this.interpreter.getCwd();\n }\n\n getEnv(): Record<string, string> {\n return this.interpreter.getEnv();\n }\n\n getLastExitCode(): number {\n return this.interpreter.getLastExitCode();\n }\n\n async dispose(): Promise<void> {\n // Reserved for future resources owned by a session.\n }\n\n private createImmediateExecution(exitCode: number, stdoutText: string, stderrText: string): ShellExecution {\n const stdout = createStdout();\n const stderr = createStderr();\n const output = new AsyncQueue<ShellOutputEvent>();\n\n const exit = (async (): Promise<ExecResult> => {\n if (stdoutText.length > 0) {\n const chunk = new TextEncoder().encode(stdoutText);\n output.push({ fd: 1, chunk });\n await stdout.write(chunk);\n }\n if (stderrText.length > 0) {\n const chunk = new TextEncoder().encode(stderrText);\n output.push({ fd: 2, chunk });\n await stderr.write(chunk);\n }\n stdout.close();\n stderr.close();\n output.close();\n return {\n stdout: await stdout.collect(),\n stderr: await stderr.collect(),\n exitCode,\n };\n })();\n\n return {\n stdout: stdout.getReadableStream(),\n stderr: stderr.getReadableStream(),\n output,\n exit,\n kill: () => {},\n };\n }\n}\n\nexport function createShellSession(config: ShellConfig): ShellSession {\n return new ShellSession(config);\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";AAWA;AACA;AACA;AACA;AACA;AAAA;AAaO,MAAM,aAAa;AAAA,EAChB;AAAA,EAER,WAAW,CAAC,SAA8B;AAAA,IACxC,KAAK,cAAc,IAAI,YAAY;AAAA,MACjC,IAAI,QAAQ;AAAA,MACZ,KAAK,QAAQ;AAAA,MACb,KAAK,QAAQ;AAAA,MACb,UAAU,QAAQ;AAAA,MAClB,UAAU,QAAQ,YAAY,EAAE,OAAO,QAAQ,SAAS,MAAM;AAAA,MAC9D,iBAAiB,QAAQ;AAAA,IAC3B,CAAC;AAAA;AAAA,EAGH,GAAG,CAAC,QAAgB,UAAiC,CAAC,GAAmB;AAAA,IACvE,IAAI;AAAA,MACF,MAAM,SAAS,IAAI,MAAM,QAAQ,EAAE,kBAAkB,KAAK,CAAC,EAAE,SAAS;AAAA,MACtE,IAAI,OAAO,MAAM,CAAC,UAAU,MAAM,SAAS,aAAa,MAAM,SAAS,KAAK,GAAG;AAAA,QAC7E,OAAO,KAAK,yBAAyB,GAAG,IAAI,EAAE;AAAA,MAChD;AAAA,MACA,MAAM,MAAM,IAAI,OAAO,MAAM,EAAE,MAAM;AAAA,MACrC,OAAO,KAAK,YAAY,iBAAiB,KAAK,OAAO;AAAA,MACrD,OAAO,KAAK;AAAA,MACZ,MAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MAC/D,OAAO,KAAK,yBAAyB,GAAG,IAAI,OAAO;AAAA,CAAW;AAAA;AAAA;AAAA,EAIlE,UAAU,CAAC,SAAkB,UAAiC,CAAC,GAAmB;AAAA,IAChF,OAAO,KAAK,YAAY,iBAAiB,QAAQ,KAAK,OAAO;AAAA;AAAA,EAG/D,MAAM,GAAW;AAAA,IACf,OAAO,KAAK,YAAY,OAAO;AAAA;AAAA,EAGjC,MAAM,GAA2B;AAAA,IAC/B,OAAO,KAAK,YAAY,OAAO;AAAA;AAAA,EAGjC,eAAe,GAAW;AAAA,IACxB,OAAO,KAAK,YAAY,gBAAgB;AAAA;AAAA,OAGpC,QAAO,GAAkB;AAAA,EAIvB,wBAAwB,CAAC,UAAkB,YAAoB,YAAoC;AAAA,IACzG,MAAM,SAAS,aAAa;AAAA,IAC5B,MAAM,SAAS,aAAa;AAAA,IAC5B,MAAM,SAAS,IAAI;AAAA,IAEnB,MAAM,QAAQ,YAAiC;AAAA,MAC7C,IAAI,WAAW,SAAS,GAAG;AAAA,QACzB,MAAM,QAAQ,IAAI,YAAY,EAAE,OAAO,UAAU;AAAA,QACjD,OAAO,KAAK,EAAE,IAAI,GAAG,MAAM,CAAC;AAAA,QAC5B,MAAM,OAAO,MAAM,KAAK;AAAA,MAC1B;AAAA,MACA,IAAI,WAAW,SAAS,GAAG;AAAA,QACzB,MAAM,QAAQ,IAAI,YAAY,EAAE,OAAO,UAAU;AAAA,QACjD,OAAO,KAAK,EAAE,IAAI,GAAG,MAAM,CAAC;AAAA,QAC5B,MAAM,OAAO,MAAM,KAAK;AAAA,MAC1B;AAAA,MACA,OAAO,MAAM;AAAA,MACb,OAAO,MAAM;AAAA,MACb,OAAO,MAAM;AAAA,MACb,OAAO;AAAA,QACL,QAAQ,MAAM,OAAO,QAAQ;AAAA,QAC7B,QAAQ,MAAM,OAAO,QAAQ;AAAA,QAC7B;AAAA,MACF;AAAA,OACC;AAAA,IAEH,OAAO;AAAA,MACL,QAAQ,OAAO,kBAAkB;AAAA,MACjC,QAAQ,OAAO,kBAAkB;AAAA,MACjC;AAAA,MACA;AAAA,MACA,MAAM,MAAM;AAAA,IACd;AAAA;AAEJ;AAEO,SAAS,kBAAkB,CAAC,QAAmC;AAAA,EACpE,OAAO,IAAI,aAAa,MAAM;AAAA;",
|
|
8
|
+
"debugId": "C1F9D01ECC6BB46864756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"// Virtual Filesystem Interface\nexport interface VirtualFSWritable {\n write(chunk: Uint8Array): Promise<void>;\n close(): Promise<void>;\n abort?(reason?: unknown): Promise<void>;\n}\n\nexport interface VirtualFS {\n readFile(path: string): Promise<Buffer>;\n readFile(path: string, encoding: BufferEncoding): Promise<string>;\n readStream(path: string): AsyncIterable<Uint8Array>;\n readdir(path: string): Promise<string[]>;\n stat(path: string): Promise<FileStat>;\n exists(path: string): Promise<boolean>;\n\n writeFile(path: string, data: Buffer | string): Promise<void>;\n appendFile(path: string, data: Buffer | string): Promise<void>;\n writeStream(path: string, opts?: { append?: boolean }): Promise<VirtualFSWritable>;\n mkdir(path: string, opts?: { recursive?: boolean }): Promise<void>;\n\n rm(path: string, opts?: { recursive?: boolean; force?: boolean }): Promise<void>;\n\n resolve(...paths: string[]): string;\n dirname(path: string): string;\n basename(path: string): string;\n glob(pattern: string, opts?: { cwd?: string }): Promise<string[]>;\n}\n\nexport interface FileStat {\n isFile(): boolean;\n isDirectory(): boolean;\n size: number;\n mtime: Date;\n mtimeMs: number;\n}\n\n// Command Interfaces\nexport type Command = (ctx: CommandContext) => Promise<number>;\n\nexport interface CommandContext {\n args: string[];\n stdin: Stdin;\n stdout: Stdout;\n stderr: Stderr;\n fs: VirtualFS;\n cwd: string;\n env: Record<string, string>;\n setCwd: (path: string) => void;\n exec?: (name: string, args: string[]) => Promise<ExecResult>;\n}\n\nexport interface Stdin {\n stream(): AsyncIterable<Uint8Array>;\n buffer(): Promise<Buffer>;\n text(): Promise<string>;\n lines(): AsyncIterable<string>;\n}\n\nexport interface Stdout {\n write(chunk: Uint8Array): Promise<void>;\n writeText(str: string): Promise<void>;\n isTTY: boolean;\n}\n\nexport interface Stderr {\n write(chunk: Uint8Array): Promise<void>;\n writeText(str: string): Promise<void>;\n isTTY: boolean;\n}\n\nexport interface OutputCollector extends Stdout {\n close(): void;\n collect(): Promise<Buffer>;\n getReadableStream(): AsyncIterable<Uint8Array>;\n}\n\n// Execution Result\nexport interface ExecResult {\n stdout: Buffer;\n stderr: Buffer;\n exitCode: number;\n}\n\n// Shell Configuration\nexport interface ShellConfig {\n fs: VirtualFS;\n cwd: string;\n env: Record<string, string>;\n commands: Record<string, Command>;\n isTTY?: boolean;\n}\n\n// Raw escape hatch type\nexport interface RawValue {\n raw: string;\n}\n\nexport function isRawValue(value: unknown): value is RawValue {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"raw\" in value &&\n typeof (value as RawValue).raw === \"string\"\n );\n}\n\n// JS Object Redirection types\nexport type RedirectObject = Buffer | Blob | Response | string;\n\nexport interface RedirectObjectMap {\n [marker: string]: RedirectObject;\n}\n\nexport function isRedirectObject(value: unknown): value is RedirectObject {\n return (\n Buffer.isBuffer(value) ||\n value instanceof Blob ||\n value instanceof Response ||\n typeof value === \"string\"\n );\n}\n"
|
|
5
|
+
"// Virtual Filesystem Interface\nexport interface VirtualFSWritable {\n write(chunk: Uint8Array): Promise<void>;\n close(): Promise<void>;\n abort?(reason?: unknown): Promise<void>;\n}\n\nexport interface VirtualFS {\n readFile(path: string): Promise<Buffer>;\n readFile(path: string, encoding: BufferEncoding): Promise<string>;\n readStream(path: string): AsyncIterable<Uint8Array>;\n readdir(path: string): Promise<string[]>;\n stat(path: string): Promise<FileStat>;\n exists(path: string): Promise<boolean>;\n\n writeFile(path: string, data: Buffer | string): Promise<void>;\n appendFile(path: string, data: Buffer | string): Promise<void>;\n writeStream(path: string, opts?: { append?: boolean }): Promise<VirtualFSWritable>;\n mkdir(path: string, opts?: { recursive?: boolean }): Promise<void>;\n\n rm(path: string, opts?: { recursive?: boolean; force?: boolean }): Promise<void>;\n\n resolve(...paths: string[]): string;\n dirname(path: string): string;\n basename(path: string): string;\n glob(pattern: string, opts?: { cwd?: string }): Promise<string[]>;\n}\n\nexport interface FileStat {\n isFile(): boolean;\n isDirectory(): boolean;\n size: number;\n mtime: Date;\n mtimeMs: number;\n}\n\n// Command Interfaces\nexport type Command = (ctx: CommandContext) => Promise<number>;\n\nexport interface ShellRunOptions {\n argv0?: string;\n args?: string[];\n}\n\nexport interface ShellCommandApi {\n eval(source: string): Promise<number>;\n source(path: string, args?: string[]): Promise<number>;\n runScript(path: string, args?: string[]): Promise<number>;\n runShell(source: string, options?: ShellRunOptions): Promise<number>;\n getLastExitCode(): number;\n exit(exitCode?: number): never;\n}\n\nexport interface TerminalInfo {\n isTTY: boolean;\n columns?: number;\n rows?: number;\n colorDepth?: number;\n}\n\nexport interface CommandContext {\n args: string[];\n stdin: Stdin;\n stdout: Stdout;\n stderr: Stderr;\n fs: VirtualFS;\n cwd: string;\n env: Record<string, string>;\n terminal: TerminalInfo;\n signal: AbortSignal;\n setCwd: (path: string) => void;\n exec?: (name: string, args: string[]) => Promise<ExecResult>;\n shell?: ShellCommandApi;\n}\n\nexport interface ExternalCommandContext extends CommandContext {\n name: string;\n}\n\nexport type ShellCommandFallback = (ctx: ExternalCommandContext) => Promise<number>;\n\nexport interface Stdin {\n stream(): AsyncIterable<Uint8Array>;\n buffer(): Promise<Buffer>;\n text(): Promise<string>;\n lines(): AsyncIterable<string>;\n}\n\nexport interface ShellInputController extends AsyncIterable<Uint8Array> {\n write(chunk: Uint8Array | string): Promise<void>;\n close(): void;\n abort(reason?: unknown): void;\n}\n\nexport interface Stdout {\n write(chunk: Uint8Array): Promise<void>;\n writeText(str: string): Promise<void>;\n isTTY: boolean;\n}\n\nexport interface Stderr {\n write(chunk: Uint8Array): Promise<void>;\n writeText(str: string): Promise<void>;\n isTTY: boolean;\n}\n\nexport interface OutputCollector extends Stdout {\n close(): void;\n collect(): Promise<Buffer>;\n getReadableStream(): AsyncIterable<Uint8Array>;\n}\n\n// Execution Result\nexport interface ExecResult {\n stdout: Buffer;\n stderr: Buffer;\n exitCode: number;\n}\n\nexport interface ShellOutputEvent {\n fd: 1 | 2;\n chunk: Uint8Array;\n}\n\nexport type ShellInputSource = AsyncIterable<Uint8Array> | Buffer | string | null;\n\nexport interface ShellExecutionOptions {\n stdin?: ShellInputSource;\n stdout?: Stdout;\n stderr?: Stderr;\n terminal?: TerminalInfo;\n signal?: AbortSignal;\n outputMode?: \"separate\" | \"merged\";\n}\n\nexport interface ShellExecution {\n stdout: AsyncIterable<Uint8Array>;\n stderr: AsyncIterable<Uint8Array>;\n output: AsyncIterable<ShellOutputEvent>;\n exit: Promise<ExecResult>;\n kill(reason?: unknown): void;\n}\n\n// Shell Configuration\nexport interface ShellConfig {\n fs: VirtualFS;\n cwd: string;\n env: Record<string, string>;\n commands: Record<string, Command>;\n isTTY?: boolean;\n terminal?: TerminalInfo;\n externalCommand?: ShellCommandFallback;\n}\n\n// Raw escape hatch type\nexport interface RawValue {\n raw: string;\n}\n\nexport function isRawValue(value: unknown): value is RawValue {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"raw\" in value &&\n typeof (value as RawValue).raw === \"string\"\n );\n}\n\n// JS Object Redirection types\nexport type RedirectObject = Buffer | Blob | Response | string;\n\nexport interface RedirectObjectMap {\n [marker: string]: RedirectObject;\n}\n\nexport function isRedirectObject(value: unknown): value is RedirectObject {\n return (\n Buffer.isBuffer(value) ||\n value instanceof Blob ||\n value instanceof Response ||\n typeof value === \"string\"\n );\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": ";
|
|
7
|
+
"mappings": ";AA+JO,SAAS,UAAU,CAAC,OAAmC;AAAA,EAC5D,OACE,OAAO,UAAU,YACjB,UAAU,QACV,SAAS,SACT,OAAQ,MAAmB,QAAQ;AAAA;AAWhC,SAAS,gBAAgB,CAAC,OAAyC;AAAA,EACxE,OACE,OAAO,SAAS,KAAK,KACrB,iBAAiB,QACjB,iBAAiB,YACjB,OAAO,UAAU;AAAA;",
|
|
8
8
|
"debugId": "9C8E04A91CC7802764756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -28,4 +28,6 @@ export { cd } from "./cd/cd.ts";
|
|
|
28
28
|
export { tr } from "./tr/tr.ts";
|
|
29
29
|
export { cut } from "./cut/cut.ts";
|
|
30
30
|
export { od } from "./od/od.ts";
|
|
31
|
+
export { sh, evalCmd as eval, evalCmd, source, dot } from "./sh/sh.ts";
|
|
32
|
+
export { exitCmd as exit, exitCmd } from "./exit/exit.ts";
|
|
31
33
|
export declare const builtinCommands: Record<string, Command>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ShellDSL, createShellDSL, type Program } from "./shell-dsl.ts";
|
|
2
2
|
export { ShellPromise, type ShellPromiseOptions } from "./shell-promise.ts";
|
|
3
|
-
export
|
|
3
|
+
export { ShellSession, createShellSession, type ShellSessionOptions } from "./shell-session.ts";
|
|
4
|
+
export type { VirtualFS, VirtualFSWritable, FileStat, Command, CommandContext, Stdin, Stdout, Stderr, OutputCollector, ExecResult, ShellConfig, ShellCommandApi, ShellCommandFallback, ExternalCommandContext, ShellRunOptions, TerminalInfo, ShellInputController, ShellInputSource, ShellExecutionOptions, ShellExecution, ShellOutputEvent, RawValue, } from "./types.ts";
|
|
4
5
|
export { isRawValue } from "./types.ts";
|
|
5
6
|
export { ShellError, LexError, ParseError } from "./errors.ts";
|
|
6
7
|
export { Lexer, lex, tokenToString } from "./lexer/index.ts";
|
|
@@ -8,11 +9,13 @@ export type { Token, RedirectMode } from "./lexer/index.ts";
|
|
|
8
9
|
export { Parser, parse } from "./parser/index.ts";
|
|
9
10
|
export type { ASTNode, Redirect, CommandNode, PipelineNode, AndNode, OrNode, SequenceNode, WordNode, WordPart, TextPart, VariablePart, SubstitutionPart, ArithmeticPart, IfNode, ForNode, WhileNode, UntilNode, CaseNode, CaseClause, } from "./parser/index.ts";
|
|
10
11
|
export { isWordNode, isCommandNode, isPipelineNode, isAndNode, isOrNode, isSequenceNode, isIfNode, isForNode, isWhileNode, isUntilNode, isCaseNode, } from "./parser/index.ts";
|
|
11
|
-
export { Interpreter, type InterpreterOptions, BreakException, ContinueException } from "./interpreter/index.ts";
|
|
12
|
+
export { Interpreter, type InterpreterOptions, BreakException, ContinueException, ExitException } from "./interpreter/index.ts";
|
|
12
13
|
export { createVirtualFS } from "./fs/index.ts";
|
|
13
14
|
export { FileSystem, ReadOnlyFileSystem, WebFileSystem, createWebUnderlyingFS, type PathOps, type Permission, type PermissionRules, type UnderlyingFS, } from "./fs/index.ts";
|
|
14
15
|
export { createStdin, StdinImpl } from "./io/index.ts";
|
|
15
|
-
export { createStdout, createStderr, createPipe, OutputCollectorImpl, PipeBuffer } from "./io/index.ts";
|
|
16
|
+
export { createStdout, createStderr, createPipe, createShellInput, OutputCollectorImpl, PipeBuffer, ShellInputControllerImpl, } from "./io/index.ts";
|
|
17
|
+
export { analyzeInput } from "./input-analysis.ts";
|
|
18
|
+
export type { InputAnalysis, InputIncompleteReason } from "./input-analysis.ts";
|
|
16
19
|
export { escape, escapeForInterpolation, globVirtualFS } from "./utils/index.ts";
|
|
17
20
|
export type { GlobVirtualFS, GlobOptions } from "./utils/index.ts";
|
|
18
21
|
export { VersionControlSystem } from "./vcs/index.ts";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ASTNode } from "./parser/ast.ts";
|
|
2
|
+
import { LexError, ParseError } from "./errors.ts";
|
|
3
|
+
export type InputIncompleteReason = "quote" | "heredoc" | "compound" | "pipeline";
|
|
4
|
+
export type InputAnalysis = {
|
|
5
|
+
kind: "complete";
|
|
6
|
+
ast: ASTNode;
|
|
7
|
+
} | {
|
|
8
|
+
kind: "incomplete";
|
|
9
|
+
reason: InputIncompleteReason;
|
|
10
|
+
} | {
|
|
11
|
+
kind: "invalid";
|
|
12
|
+
error: LexError | ParseError | Error;
|
|
13
|
+
};
|
|
14
|
+
export declare function analyzeInput(source: string): InputAnalysis;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommandContext, VirtualFS, Stdin, Stdout, Stderr, ExecResult } from "../types.ts";
|
|
1
|
+
import type { CommandContext, VirtualFS, Stdin, Stdout, Stderr, ExecResult, ShellCommandApi, TerminalInfo } from "../types.ts";
|
|
2
2
|
export interface ContextOptions {
|
|
3
3
|
args: string[];
|
|
4
4
|
stdin: Stdin;
|
|
@@ -7,7 +7,10 @@ export interface ContextOptions {
|
|
|
7
7
|
fs: VirtualFS;
|
|
8
8
|
cwd: string;
|
|
9
9
|
env: Record<string, string>;
|
|
10
|
+
terminal: TerminalInfo;
|
|
11
|
+
signal: AbortSignal;
|
|
10
12
|
setCwd: (path: string) => void;
|
|
11
13
|
exec?: (name: string, args: string[]) => Promise<ExecResult>;
|
|
14
|
+
shell?: ShellCommandApi;
|
|
12
15
|
}
|
|
13
16
|
export declare function createCommandContext(options: ContextOptions): CommandContext;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Interpreter, type InterpreterOptions, BreakException, ContinueException } from "./interpreter.ts";
|
|
1
|
+
export { Interpreter, type InterpreterOptions, BreakException, ContinueException, ExitException } from "./interpreter.ts";
|
|
2
2
|
export { createCommandContext, type ContextOptions } from "./context.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ASTNode } from "../parser/ast.ts";
|
|
2
|
-
import type { Command, VirtualFS, ExecResult, RedirectObjectMap } from "../types.ts";
|
|
2
|
+
import type { Command, VirtualFS, ExecResult, RedirectObjectMap, TerminalInfo, ShellExecutionOptions, ShellExecution, ShellCommandFallback } from "../types.ts";
|
|
3
3
|
export interface InterpreterOptions {
|
|
4
4
|
fs: VirtualFS;
|
|
5
5
|
cwd: string;
|
|
@@ -7,6 +7,12 @@ export interface InterpreterOptions {
|
|
|
7
7
|
commands: Record<string, Command>;
|
|
8
8
|
redirectObjects?: RedirectObjectMap;
|
|
9
9
|
isTTY?: boolean;
|
|
10
|
+
terminal?: TerminalInfo;
|
|
11
|
+
externalCommand?: ShellCommandFallback;
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
argv0?: string;
|
|
14
|
+
positionalParameters?: string[];
|
|
15
|
+
lastExitCode?: number;
|
|
10
16
|
}
|
|
11
17
|
export declare class BreakException extends Error {
|
|
12
18
|
levels: number;
|
|
@@ -16,6 +22,10 @@ export declare class ContinueException extends Error {
|
|
|
16
22
|
levels: number;
|
|
17
23
|
constructor(levels?: number);
|
|
18
24
|
}
|
|
25
|
+
export declare class ExitException extends Error {
|
|
26
|
+
exitCode: number;
|
|
27
|
+
constructor(exitCode: number);
|
|
28
|
+
}
|
|
19
29
|
export declare class Interpreter {
|
|
20
30
|
private fs;
|
|
21
31
|
private cwd;
|
|
@@ -24,11 +34,32 @@ export declare class Interpreter {
|
|
|
24
34
|
private redirectObjects;
|
|
25
35
|
private loopDepth;
|
|
26
36
|
private isTTY;
|
|
37
|
+
private terminal;
|
|
38
|
+
private activeSignal;
|
|
39
|
+
private externalCommand?;
|
|
40
|
+
private argv0;
|
|
41
|
+
private positionalParameters;
|
|
42
|
+
private lastExitCode;
|
|
27
43
|
constructor(options: InterpreterOptions);
|
|
28
44
|
getLoopDepth(): number;
|
|
29
45
|
execute(ast: ASTNode): Promise<ExecResult>;
|
|
46
|
+
executeStreaming(ast: ASTNode, options?: ShellExecutionOptions): ShellExecution;
|
|
47
|
+
private normalizeInputSource;
|
|
30
48
|
private executeNode;
|
|
49
|
+
private throwIfAborted;
|
|
31
50
|
private executeCommand;
|
|
51
|
+
private invokeCommand;
|
|
52
|
+
private invokeExternalCommand;
|
|
53
|
+
private invokeRegisteredCommand;
|
|
54
|
+
private createExec;
|
|
55
|
+
private createShellApi;
|
|
56
|
+
private executeExecutableFile;
|
|
57
|
+
private sourceFile;
|
|
58
|
+
private executeIsolatedShellSource;
|
|
59
|
+
private executeSourceInCurrentFrame;
|
|
60
|
+
private parseSource;
|
|
61
|
+
private loadScriptSource;
|
|
62
|
+
private parseShebang;
|
|
32
63
|
private handleRedirect;
|
|
33
64
|
private handleObjectRedirect;
|
|
34
65
|
private readFromObject;
|
|
@@ -47,6 +78,8 @@ export declare class Interpreter {
|
|
|
47
78
|
private expandWordScalar;
|
|
48
79
|
private expandWordFields;
|
|
49
80
|
private expandWordPart;
|
|
81
|
+
private getVariableValue;
|
|
82
|
+
private appendQuotedPositionalParameters;
|
|
50
83
|
private executeSubstitution;
|
|
51
84
|
private getIFS;
|
|
52
85
|
private splitUnquotedExpansion;
|
|
@@ -59,8 +92,10 @@ export declare class Interpreter {
|
|
|
59
92
|
private escapeLiteralGlobChars;
|
|
60
93
|
private evaluateArithmetic;
|
|
61
94
|
private parseArithmeticExpr;
|
|
95
|
+
private normalizeExitCode;
|
|
62
96
|
setCwd(cwd: string): void;
|
|
63
97
|
setEnv(vars: Record<string, string>): void;
|
|
64
98
|
getCwd(): string;
|
|
65
99
|
getEnv(): Record<string, string>;
|
|
100
|
+
getLastExitCode(): number;
|
|
66
101
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class AsyncQueue<T> implements AsyncIterable<T> {
|
|
2
|
+
private items;
|
|
3
|
+
private closed;
|
|
4
|
+
private error;
|
|
5
|
+
private waiters;
|
|
6
|
+
push(item: T): void;
|
|
7
|
+
close(): void;
|
|
8
|
+
fail(reason?: unknown): void;
|
|
9
|
+
[Symbol.asyncIterator](): AsyncIterator<T>;
|
|
10
|
+
private wake;
|
|
11
|
+
private wakeWithError;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ShellInputController } from "../types.ts";
|
|
2
|
+
export declare class ShellInputControllerImpl implements ShellInputController {
|
|
3
|
+
private chunks;
|
|
4
|
+
private closed;
|
|
5
|
+
private aborted;
|
|
6
|
+
private abortReason;
|
|
7
|
+
private waiters;
|
|
8
|
+
write(chunk: Uint8Array | string): Promise<void>;
|
|
9
|
+
close(): void;
|
|
10
|
+
abort(reason?: unknown): void;
|
|
11
|
+
[Symbol.asyncIterator](): AsyncIterator<Uint8Array>;
|
|
12
|
+
private wake;
|
|
13
|
+
private wakeWithError;
|
|
14
|
+
}
|
|
15
|
+
export declare function createShellInput(): ShellInputController;
|
|
@@ -6,7 +6,8 @@ export declare class OutputCollectorImpl implements OutputCollector {
|
|
|
6
6
|
private resolveWait;
|
|
7
7
|
private waitPromise;
|
|
8
8
|
isTTY: boolean;
|
|
9
|
-
|
|
9
|
+
private onWrite?;
|
|
10
|
+
constructor(isTTY?: boolean, onWrite?: (chunk: Uint8Array) => void | Promise<void>);
|
|
10
11
|
write(chunk: Uint8Array): Promise<void>;
|
|
11
12
|
writeText(str: string): Promise<void>;
|
|
12
13
|
close(): void;
|
|
@@ -25,8 +26,8 @@ export declare class PipeBuffer implements OutputCollector, Stdout {
|
|
|
25
26
|
collect(): Promise<Buffer>;
|
|
26
27
|
getReadableStream(): AsyncIterable<Uint8Array>;
|
|
27
28
|
}
|
|
28
|
-
export declare function createStdout(isTTY?: boolean): OutputCollector;
|
|
29
|
-
export declare function createStderr(isTTY?: boolean): OutputCollector;
|
|
29
|
+
export declare function createStdout(isTTY?: boolean, onWrite?: (chunk: Uint8Array) => void | Promise<void>): OutputCollector;
|
|
30
|
+
export declare function createStderr(isTTY?: boolean, onWrite?: (chunk: Uint8Array) => void | Promise<void>): OutputCollector;
|
|
30
31
|
export declare function createPipe(): PipeBuffer;
|
|
31
32
|
export declare class BufferTargetCollector implements OutputCollector {
|
|
32
33
|
private target;
|
|
@@ -15,6 +15,8 @@ export declare class ShellDSL {
|
|
|
15
15
|
private commands;
|
|
16
16
|
private shouldThrow;
|
|
17
17
|
private isTTY;
|
|
18
|
+
private terminal;
|
|
19
|
+
private externalCommand?;
|
|
18
20
|
constructor(config: ShellConfig);
|
|
19
21
|
tag(strings: TemplateStringsArray, ...values: unknown[]): ShellPromise;
|
|
20
22
|
private isRedirectTarget;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Command, ShellCommandFallback, ShellConfig, ShellExecution, ShellExecutionOptions, TerminalInfo, VirtualFS } from "./types.ts";
|
|
2
|
+
import type { Program } from "./shell-dsl.ts";
|
|
3
|
+
export interface ShellSessionOptions {
|
|
4
|
+
fs: VirtualFS;
|
|
5
|
+
cwd: string;
|
|
6
|
+
env: Record<string, string>;
|
|
7
|
+
commands: Record<string, Command>;
|
|
8
|
+
isTTY?: boolean;
|
|
9
|
+
terminal?: TerminalInfo;
|
|
10
|
+
externalCommand?: ShellCommandFallback;
|
|
11
|
+
}
|
|
12
|
+
export declare class ShellSession {
|
|
13
|
+
private interpreter;
|
|
14
|
+
constructor(options: ShellSessionOptions);
|
|
15
|
+
run(source: string, options?: ShellExecutionOptions): ShellExecution;
|
|
16
|
+
runProgram(program: Program, options?: ShellExecutionOptions): ShellExecution;
|
|
17
|
+
getCwd(): string;
|
|
18
|
+
getEnv(): Record<string, string>;
|
|
19
|
+
getLastExitCode(): number;
|
|
20
|
+
dispose(): Promise<void>;
|
|
21
|
+
private createImmediateExecution;
|
|
22
|
+
}
|
|
23
|
+
export declare function createShellSession(config: ShellConfig): ShellSession;
|
|
@@ -37,6 +37,24 @@ export interface FileStat {
|
|
|
37
37
|
mtimeMs: number;
|
|
38
38
|
}
|
|
39
39
|
export type Command = (ctx: CommandContext) => Promise<number>;
|
|
40
|
+
export interface ShellRunOptions {
|
|
41
|
+
argv0?: string;
|
|
42
|
+
args?: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface ShellCommandApi {
|
|
45
|
+
eval(source: string): Promise<number>;
|
|
46
|
+
source(path: string, args?: string[]): Promise<number>;
|
|
47
|
+
runScript(path: string, args?: string[]): Promise<number>;
|
|
48
|
+
runShell(source: string, options?: ShellRunOptions): Promise<number>;
|
|
49
|
+
getLastExitCode(): number;
|
|
50
|
+
exit(exitCode?: number): never;
|
|
51
|
+
}
|
|
52
|
+
export interface TerminalInfo {
|
|
53
|
+
isTTY: boolean;
|
|
54
|
+
columns?: number;
|
|
55
|
+
rows?: number;
|
|
56
|
+
colorDepth?: number;
|
|
57
|
+
}
|
|
40
58
|
export interface CommandContext {
|
|
41
59
|
args: string[];
|
|
42
60
|
stdin: Stdin;
|
|
@@ -45,15 +63,27 @@ export interface CommandContext {
|
|
|
45
63
|
fs: VirtualFS;
|
|
46
64
|
cwd: string;
|
|
47
65
|
env: Record<string, string>;
|
|
66
|
+
terminal: TerminalInfo;
|
|
67
|
+
signal: AbortSignal;
|
|
48
68
|
setCwd: (path: string) => void;
|
|
49
69
|
exec?: (name: string, args: string[]) => Promise<ExecResult>;
|
|
70
|
+
shell?: ShellCommandApi;
|
|
71
|
+
}
|
|
72
|
+
export interface ExternalCommandContext extends CommandContext {
|
|
73
|
+
name: string;
|
|
50
74
|
}
|
|
75
|
+
export type ShellCommandFallback = (ctx: ExternalCommandContext) => Promise<number>;
|
|
51
76
|
export interface Stdin {
|
|
52
77
|
stream(): AsyncIterable<Uint8Array>;
|
|
53
78
|
buffer(): Promise<Buffer>;
|
|
54
79
|
text(): Promise<string>;
|
|
55
80
|
lines(): AsyncIterable<string>;
|
|
56
81
|
}
|
|
82
|
+
export interface ShellInputController extends AsyncIterable<Uint8Array> {
|
|
83
|
+
write(chunk: Uint8Array | string): Promise<void>;
|
|
84
|
+
close(): void;
|
|
85
|
+
abort(reason?: unknown): void;
|
|
86
|
+
}
|
|
57
87
|
export interface Stdout {
|
|
58
88
|
write(chunk: Uint8Array): Promise<void>;
|
|
59
89
|
writeText(str: string): Promise<void>;
|
|
@@ -74,12 +104,34 @@ export interface ExecResult {
|
|
|
74
104
|
stderr: Buffer;
|
|
75
105
|
exitCode: number;
|
|
76
106
|
}
|
|
107
|
+
export interface ShellOutputEvent {
|
|
108
|
+
fd: 1 | 2;
|
|
109
|
+
chunk: Uint8Array;
|
|
110
|
+
}
|
|
111
|
+
export type ShellInputSource = AsyncIterable<Uint8Array> | Buffer | string | null;
|
|
112
|
+
export interface ShellExecutionOptions {
|
|
113
|
+
stdin?: ShellInputSource;
|
|
114
|
+
stdout?: Stdout;
|
|
115
|
+
stderr?: Stderr;
|
|
116
|
+
terminal?: TerminalInfo;
|
|
117
|
+
signal?: AbortSignal;
|
|
118
|
+
outputMode?: "separate" | "merged";
|
|
119
|
+
}
|
|
120
|
+
export interface ShellExecution {
|
|
121
|
+
stdout: AsyncIterable<Uint8Array>;
|
|
122
|
+
stderr: AsyncIterable<Uint8Array>;
|
|
123
|
+
output: AsyncIterable<ShellOutputEvent>;
|
|
124
|
+
exit: Promise<ExecResult>;
|
|
125
|
+
kill(reason?: unknown): void;
|
|
126
|
+
}
|
|
77
127
|
export interface ShellConfig {
|
|
78
128
|
fs: VirtualFS;
|
|
79
129
|
cwd: string;
|
|
80
130
|
env: Record<string, string>;
|
|
81
131
|
commands: Record<string, Command>;
|
|
82
132
|
isTTY?: boolean;
|
|
133
|
+
terminal?: TerminalInfo;
|
|
134
|
+
externalCommand?: ShellCommandFallback;
|
|
83
135
|
}
|
|
84
136
|
export interface RawValue {
|
|
85
137
|
raw: string;
|
package/package.json
CHANGED