just-bash 2.13.1 → 2.15.0-executor.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 +2 -0
- package/dist/AGENTS.md +2 -0
- package/dist/Bash.d.ts +86 -0
- package/dist/bin/chunks/{chunk-OQV5J23L.js → chunk-7G3MC56B.js} +1 -1
- package/dist/bin/chunks/{chunk-YX7OOTPO.js → chunk-AZ3RUDR2.js} +1 -1
- package/dist/bin/chunks/{chunk-UPUMZYZE.js → chunk-CM4532DS.js} +18 -18
- package/dist/bin/{shell/chunks/chunk-R2LDP472.js → chunks/chunk-EPPBDXOG.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-LGF54XJQ.js → chunks/chunk-L2JBII6Z.js} +1 -1
- package/dist/bin/chunks/chunk-MNMRGJJM.js +11 -0
- package/dist/bin/{shell/chunks/chunk-SYL34GE7.js → chunks/chunk-NAX7MTAR.js} +1 -1
- package/dist/bin/chunks/{chunk-EZS766DD.js → chunk-NLBRLRWD.js} +1 -1
- package/dist/bin/chunks/chunk-RLNOQILG.js +2 -0
- package/dist/bin/chunks/{chunk-VVFGRIJZ.js → chunk-RMQC3GS7.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-GR23MPTT.js → chunks/chunk-VHUYNUT7.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-FBJJY4ZV.js → chunks/chunk-WXMBDX4P.js} +1 -1
- package/dist/bin/chunks/expr-4CJYC4LY.js +2 -0
- package/dist/bin/{shell/chunks/flag-coverage-A4G6STMS.js → chunks/flag-coverage-LBMWMYOO.js} +1 -1
- package/dist/bin/{shell/chunks/jq-V7FYGIKO.js → chunks/jq-FIV5Q5T4.js} +1 -1
- package/dist/bin/chunks/{js-exec-JORCTVUT.js → js-exec-6UJKEL4G.js} +9 -9
- package/dist/bin/chunks/js-exec-worker.js +233 -1
- package/dist/bin/chunks/{ln-VAOSD4HK.js → ln-EGC4HRXZ.js} +1 -1
- package/dist/bin/{shell/chunks/mkdir-CH7JGW4N.js → chunks/mkdir-Z47OISSR.js} +1 -1
- package/dist/bin/chunks/python3-QOJU2POC.js +12 -0
- package/dist/bin/chunks/{rm-GWYJO4W7.js → rm-L3NZOLLG.js} +1 -1
- package/dist/bin/chunks/{sed-3C6IBX5L.js → sed-HALRQZKY.js} +1 -1
- package/dist/bin/chunks/{sqlite3-TZEE4O7U.js → sqlite3-CVNFMP3Z.js} +1 -1
- package/dist/bin/chunks/time-5R4QWCYF.js +2 -0
- package/dist/bin/{shell/chunks/tr-LZF57GYP.js → chunks/tr-4FPGAEVB.js} +1 -1
- package/dist/bin/chunks/worker.js +34 -8
- package/dist/bin/chunks/{yq-JJLSDDST.js → yq-Q47JUWL6.js} +1 -1
- package/dist/bin/just-bash.js +245 -245
- package/dist/bin/shell/chunks/{chunk-OQV5J23L.js → chunk-7G3MC56B.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-YX7OOTPO.js → chunk-AZ3RUDR2.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-UPUMZYZE.js → chunk-CM4532DS.js} +18 -18
- package/dist/bin/{chunks/chunk-R2LDP472.js → shell/chunks/chunk-EPPBDXOG.js} +1 -1
- package/dist/bin/{chunks/chunk-LGF54XJQ.js → shell/chunks/chunk-L2JBII6Z.js} +1 -1
- package/dist/bin/shell/chunks/chunk-MNMRGJJM.js +11 -0
- package/dist/bin/{chunks/chunk-SYL34GE7.js → shell/chunks/chunk-NAX7MTAR.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-EZS766DD.js → chunk-NLBRLRWD.js} +1 -1
- package/dist/bin/shell/chunks/chunk-RLNOQILG.js +2 -0
- package/dist/bin/shell/chunks/{chunk-VVFGRIJZ.js → chunk-RMQC3GS7.js} +1 -1
- package/dist/bin/{chunks/chunk-GR23MPTT.js → shell/chunks/chunk-VHUYNUT7.js} +1 -1
- package/dist/bin/{chunks/chunk-FBJJY4ZV.js → shell/chunks/chunk-WXMBDX4P.js} +1 -1
- package/dist/bin/shell/chunks/expr-4CJYC4LY.js +2 -0
- package/dist/bin/{chunks/flag-coverage-A4G6STMS.js → shell/chunks/flag-coverage-LBMWMYOO.js} +1 -1
- package/dist/bin/{chunks/jq-V7FYGIKO.js → shell/chunks/jq-FIV5Q5T4.js} +1 -1
- package/dist/bin/shell/chunks/{js-exec-B6QNYHUL.js → js-exec-H26D5H6V.js} +9 -9
- package/dist/bin/shell/chunks/{ln-VAOSD4HK.js → ln-EGC4HRXZ.js} +1 -1
- package/dist/bin/{chunks/mkdir-CH7JGW4N.js → shell/chunks/mkdir-Z47OISSR.js} +1 -1
- package/dist/bin/shell/chunks/python3-O4VTP6TD.js +12 -0
- package/dist/bin/shell/chunks/{rm-GWYJO4W7.js → rm-L3NZOLLG.js} +1 -1
- package/dist/bin/shell/chunks/{sed-3C6IBX5L.js → sed-HALRQZKY.js} +1 -1
- package/dist/bin/shell/chunks/{sqlite3-TZEE4O7U.js → sqlite3-CVNFMP3Z.js} +1 -1
- package/dist/bin/shell/chunks/time-5R4QWCYF.js +2 -0
- package/dist/bin/{chunks/tr-LZF57GYP.js → shell/chunks/tr-4FPGAEVB.js} +1 -1
- package/dist/bin/shell/chunks/{yq-JJLSDDST.js → yq-Q47JUWL6.js} +1 -1
- package/dist/bin/shell/shell.js +127 -127
- package/dist/bundle/browser.js +250 -250
- package/dist/bundle/chunks/chunk-3THT3N7L.js +1 -0
- package/dist/bundle/chunks/{chunk-XXZ46GOX.js → chunk-62RKD26F.js} +1 -1
- package/dist/bundle/chunks/chunk-B6O2PIY4.js +10 -0
- package/dist/bundle/chunks/{chunk-IUWCBQII.js → chunk-HWBSOZZR.js} +18 -18
- package/dist/bundle/chunks/{chunk-64CW2LGZ.js → chunk-MDDMCKUK.js} +1 -1
- package/dist/bundle/chunks/{chunk-IP7G3BNA.js → chunk-MIZPJHVH.js} +1 -1
- package/dist/bundle/chunks/{chunk-V3IEYMEA.js → chunk-OL3S66CO.js} +1 -1
- package/dist/bundle/chunks/{chunk-FGALERPA.js → chunk-PBXLG62G.js} +1 -1
- package/dist/bundle/chunks/{chunk-O2DBFL6Z.js → chunk-XORM457F.js} +1 -1
- package/dist/bundle/chunks/{chunk-RUF7WQ7U.js → chunk-YCFVLTST.js} +1 -1
- package/dist/bundle/chunks/{chunk-RVT3MU3A.js → chunk-YFG2CMIF.js} +1 -1
- package/dist/bundle/chunks/{chunk-F5CMUULS.js → chunk-Z6LRHWXI.js} +1 -1
- package/dist/bundle/chunks/expr-5T3UU5KE.js +1 -0
- package/dist/bundle/chunks/{flag-coverage-G2R7PMYU.js → flag-coverage-LMTH7T5F.js} +1 -1
- package/dist/bundle/chunks/{jq-DIRZBOTX.js → jq-ODXZBPLY.js} +1 -1
- package/dist/bundle/chunks/{js-exec-YJSMH5AG.js → js-exec-OOPTBRNB.js} +9 -9
- package/dist/bundle/chunks/js-exec-worker.js +233 -1
- package/dist/bundle/chunks/{ln-UJ6YJVBK.js → ln-4TRFBYAT.js} +1 -1
- package/dist/bundle/chunks/{mkdir-F6XHPXZC.js → mkdir-TDEMSB6C.js} +1 -1
- package/dist/bundle/chunks/python3-5F2XPEW4.js +11 -0
- package/dist/bundle/chunks/{rm-FYNVTQIU.js → rm-RTZG23RL.js} +1 -1
- package/dist/bundle/chunks/{sed-DISNI47D.js → sed-VFTTATXJ.js} +1 -1
- package/dist/bundle/chunks/{sqlite3-7F22DOIP.js → sqlite3-56UMWEY3.js} +1 -1
- package/dist/bundle/chunks/time-DEUO3QV2.js +1 -0
- package/dist/bundle/chunks/{tr-GVTWMRZB.js → tr-2HXZRDSW.js} +1 -1
- package/dist/bundle/chunks/worker.js +34 -8
- package/dist/bundle/chunks/{yq-XMVSIL6Z.js → yq-MJMAR36V.js} +1 -1
- package/dist/bundle/index.cjs +745 -745
- package/dist/bundle/index.js +159 -159
- package/dist/commands/js-exec/executor-adapter.d.ts +66 -0
- package/dist/commands/js-exec/js-exec.d.ts +19 -1
- package/dist/commands/js-exec/worker.d.ts +8 -0
- package/dist/commands/worker-bridge/bridge-handler.d.ts +3 -1
- package/dist/commands/worker-bridge/protocol.d.ts +1 -0
- package/dist/commands/worker-bridge/sync-backend.d.ts +5 -0
- package/dist/executor-init.d.ts +10 -0
- package/dist/fs/sanitize-error.d.ts +9 -6
- package/dist/interpreter/interpreter.d.ts +2 -0
- package/dist/interpreter/types.d.ts +5 -0
- package/dist/network/allow-list.d.ts +3 -2
- package/dist/network/types.d.ts +3 -0
- package/dist/types.d.ts +6 -0
- package/package.json +37 -34
- package/vendor/cpython-emscripten/python.wasm +0 -0
- package/vendor/executor/executor-sdk-bundle.d.mts +18 -0
- package/vendor/executor/executor-sdk-bundle.mjs +972 -0
- package/dist/bin/chunks/chunk-SYG3IW7P.js +0 -2
- package/dist/bin/chunks/chunk-TKTKRRAL.js +0 -11
- package/dist/bin/chunks/expr-VEFRBJT4.js +0 -2
- package/dist/bin/chunks/python3-PF7AHNQM.js +0 -12
- package/dist/bin/chunks/time-DDS6JJ23.js +0 -2
- package/dist/bin/shell/chunks/chunk-SYG3IW7P.js +0 -2
- package/dist/bin/shell/chunks/chunk-TKTKRRAL.js +0 -11
- package/dist/bin/shell/chunks/expr-VEFRBJT4.js +0 -2
- package/dist/bin/shell/chunks/python3-J7DP4JBQ.js +0 -12
- package/dist/bin/shell/chunks/time-DDS6JJ23.js +0 -2
- package/dist/bundle/chunks/chunk-CCNMISUL.js +0 -1
- package/dist/bundle/chunks/chunk-H2WXJGD7.js +0 -10
- package/dist/bundle/chunks/expr-74QHYJL5.js +0 -1
- package/dist/bundle/chunks/python3-6HF56IYI.js +0 -11
- package/dist/bundle/chunks/time-YG5BMRIQ.js +0 -1
package/README.md
CHANGED
|
@@ -192,6 +192,8 @@ const env = new Bash({ fs: rwfs });
|
|
|
192
192
|
await env.exec('echo "hello" > file.txt'); // writes to real filesystem
|
|
193
193
|
```
|
|
194
194
|
|
|
195
|
+
Keep `ReadWriteFs` pointed at a workspace directory, not at the installed `just-bash` package or any other trusted runtime code. Guest-writable roots should stay separate from trusted code.
|
|
196
|
+
|
|
195
197
|
**MountableFs** - Mount multiple filesystems at different paths. Combines read-only and read-write filesystems into a unified namespace:
|
|
196
198
|
|
|
197
199
|
```typescript
|
package/dist/AGENTS.md
CHANGED
|
@@ -62,6 +62,8 @@ const result = await bash.exec("cat input.txt | grep pattern");
|
|
|
62
62
|
|
|
63
63
|
4. **No binaries/WASM**: Only built-in commands work. You cannot run node, python, or other binaries.
|
|
64
64
|
|
|
65
|
+
5. **ReadWriteFs root separation**: If you use `ReadWriteFs`, point it at a workspace directory, not at the installed `just-bash` package or other trusted runtime code.
|
|
66
|
+
|
|
65
67
|
## Available Commands
|
|
66
68
|
|
|
67
69
|
**Text processing**: `awk`, `cat`, `column`, `comm`, `cut`, `egrep`, `expand`, `fgrep`, `fold`, `grep`, `head`, `join`, `nl`, `paste`, `rev`, `rg`, `sed`, `sort`, `strings`, `tac`, `tail`, `tr`, `unexpand`, `uniq`, `wc`, `xargs`
|
package/dist/Bash.d.ts
CHANGED
|
@@ -31,6 +31,74 @@ export interface JavaScriptConfig {
|
|
|
31
31
|
/** Bootstrap JavaScript code to run before user scripts */
|
|
32
32
|
bootstrap?: string;
|
|
33
33
|
}
|
|
34
|
+
/** Tool definition for the executor integration */
|
|
35
|
+
export interface ExecutorToolDef {
|
|
36
|
+
description?: string;
|
|
37
|
+
execute: (...args: any[]) => unknown;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Executor SDK instance type (from @executor/sdk).
|
|
41
|
+
* Kept as an opaque type to avoid requiring the SDK at import time.
|
|
42
|
+
*/
|
|
43
|
+
export interface ExecutorSDKHandle {
|
|
44
|
+
execute: (code: string) => Promise<{
|
|
45
|
+
result: unknown;
|
|
46
|
+
error?: string;
|
|
47
|
+
logs?: string[];
|
|
48
|
+
}>;
|
|
49
|
+
sources: {
|
|
50
|
+
add: (input: Record<string, unknown>, options?: Record<string, unknown>) => Promise<unknown>;
|
|
51
|
+
list: () => Promise<unknown[]>;
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
close: () => Promise<void>;
|
|
55
|
+
[key: string]: unknown;
|
|
56
|
+
}
|
|
57
|
+
/** Executor configuration for js-exec tool invocation */
|
|
58
|
+
export interface ExecutorConfig {
|
|
59
|
+
/** Tool map: keys are dot-separated paths (e.g. "math.add"), values are tool definitions */
|
|
60
|
+
tools?: Record<string, ExecutorToolDef>;
|
|
61
|
+
/**
|
|
62
|
+
* Async setup function that receives the @executor/sdk instance.
|
|
63
|
+
* Use this to add OpenAPI, GraphQL, or MCP sources that auto-discover tools.
|
|
64
|
+
* When provided, js-exec delegates execution to the SDK pipeline
|
|
65
|
+
* (which handles tool approval, auth flows, and interaction loops).
|
|
66
|
+
*
|
|
67
|
+
* Requires @executor/sdk as a dependency.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const bash = new Bash({
|
|
72
|
+
* executor: {
|
|
73
|
+
* setup: async (sdk) => {
|
|
74
|
+
* await sdk.sources.add({ kind: "openapi", endpoint: "https://api.example.com", specUrl: "https://api.example.com/openapi.json", name: "myapi" });
|
|
75
|
+
* await sdk.sources.add({ kind: "mcp", endpoint: "https://mcp.example.com/sse", name: "tools" });
|
|
76
|
+
* },
|
|
77
|
+
* },
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
setup?: (sdk: ExecutorSDKHandle) => Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Tool approval callback for the @executor/sdk pipeline.
|
|
84
|
+
* Called when a tool invocation requires approval.
|
|
85
|
+
* Defaults to "allow-all" when not provided.
|
|
86
|
+
*/
|
|
87
|
+
onToolApproval?: "allow-all" | "deny-all" | ((request: {
|
|
88
|
+
toolPath: string;
|
|
89
|
+
sourceId: string;
|
|
90
|
+
sourceName: string;
|
|
91
|
+
operationKind: "read" | "write" | "delete" | "execute" | "unknown";
|
|
92
|
+
args: unknown;
|
|
93
|
+
reason: string;
|
|
94
|
+
approvalLabel: string | null;
|
|
95
|
+
}) => Promise<{
|
|
96
|
+
approved: true;
|
|
97
|
+
} | {
|
|
98
|
+
approved: false;
|
|
99
|
+
reason?: string;
|
|
100
|
+
}>);
|
|
101
|
+
}
|
|
34
102
|
export interface BashOptions {
|
|
35
103
|
files?: InitialFiles;
|
|
36
104
|
env?: Record<string, string>;
|
|
@@ -76,6 +144,13 @@ export interface BashOptions {
|
|
|
76
144
|
* Disabled by default. Can be a boolean or a config object with bootstrap code.
|
|
77
145
|
*/
|
|
78
146
|
javascript?: boolean | JavaScriptConfig;
|
|
147
|
+
/**
|
|
148
|
+
* Executor configuration for tool invocation in js-exec.
|
|
149
|
+
* When provided, code running in js-exec has access to a `tools` proxy
|
|
150
|
+
* (e.g. `tools.math.add({ a: 1, b: 2 })`).
|
|
151
|
+
* Implicitly enables JavaScript if not already enabled.
|
|
152
|
+
*/
|
|
153
|
+
executor?: ExecutorConfig;
|
|
79
154
|
/**
|
|
80
155
|
* Optional list of command names to register.
|
|
81
156
|
* If not provided, all built-in commands are available.
|
|
@@ -214,11 +289,22 @@ export declare class Bash {
|
|
|
214
289
|
private defenseInDepthConfig?;
|
|
215
290
|
private coverageWriter?;
|
|
216
291
|
private jsBootstrapCode?;
|
|
292
|
+
private executorInvokeTool?;
|
|
293
|
+
private executorSetup?;
|
|
294
|
+
private executorApproval?;
|
|
295
|
+
private executorSDK?;
|
|
296
|
+
private executorInitPromise?;
|
|
217
297
|
private transformPlugins;
|
|
218
298
|
private state;
|
|
219
299
|
constructor(options?: BashOptions);
|
|
220
300
|
registerCommand(command: Command): void;
|
|
221
301
|
private logResult;
|
|
302
|
+
/**
|
|
303
|
+
* Lazily initialize the @executor/sdk when setup is configured.
|
|
304
|
+
* Creates the SDK instance, runs the user's setup function, and wires
|
|
305
|
+
* the SDK's tool invocation into the executorInvokeTool callback.
|
|
306
|
+
*/
|
|
307
|
+
private ensureExecutorReady;
|
|
222
308
|
exec(commandLine: string, options?: ExecOptions): Promise<BashExecResult>;
|
|
223
309
|
readFile(path: string): Promise<string>;
|
|
224
310
|
writeFile(path: string, content: string): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as f}from"./chunk-
|
|
2
|
+
import{a as f}from"./chunk-RLNOQILG.js";import{a as d}from"./chunk-JBABAK44.js";import{a as l}from"./chunk-4VDEBYW7.js";var p={recursive:{short:"p",long:"parents",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},b={name:"mkdir",async execute(m,t){let e=d("mkdir",m,p);if(!e.ok)return e.error;let u=e.result.flags.recursive,g=e.result.flags.verbose,n=e.result.positional;if(n.length===0)return{stdout:"",stderr:`mkdir: missing operand
|
|
3
3
|
`,exitCode:1};let a="",o="",c=0;for(let r of n)try{let i=t.fs.resolvePath(t.cwd,r);await t.fs.mkdir(i,{recursive:u}),g&&(a+=`mkdir: created directory '${r}'
|
|
4
4
|
`)}catch(i){let s=l(i);s.includes("ENOENT")||s.includes("no such file")?o+=`mkdir: cannot create directory '${r}': No such file or directory
|
|
5
5
|
`:s.includes("EEXIST")||s.includes("already exists")?o+=`mkdir: cannot create directory '${r}': File exists
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as p}from"./chunk-
|
|
2
|
+
import{a as p}from"./chunk-RLNOQILG.js";import{a as m,b as g,c as h}from"./chunk-GTNBSMZR.js";var y={name:"ln",summary:"make links between files",usage:"ln [OPTIONS] TARGET LINK_NAME",options:["-s create a symbolic link instead of a hard link","-f remove existing destination files","-n treat LINK_NAME as a normal file if it is a symbolic link to a directory","-v print name of each linked file"," --help display this help and exit"]},v={name:"ln",async execute(n,s){if(g(n))return m(y);let r=!1,a=!1,f=!1,t=0;for(;t<n.length&&n[t].startsWith("-");){let e=n[t];if(e==="-s"||e==="--symbolic")r=!0,t++;else if(e==="-f"||e==="--force")a=!0,t++;else if(e==="-v"||e==="--verbose")f=!0,t++;else if(e==="-n"||e==="--no-dereference")t++;else if(/^-[sfvn]+$/.test(e))e.includes("s")&&(r=!0),e.includes("f")&&(a=!0),e.includes("v")&&(f=!0),t++;else if(e==="--"){t++;break}else return h("ln",e)}let d=n.slice(t);if(d.length<2)return{stdout:"",stderr:`ln: missing file operand
|
|
3
3
|
`,exitCode:1};let i=d[0],l=d[1],o=s.fs.resolvePath(s.cwd,l);if(await s.fs.exists(o))if(a)try{await s.fs.rm(o,{force:!0})}catch{return{stdout:"",stderr:`ln: cannot remove '${l}': Permission denied
|
|
4
4
|
`,exitCode:1}}else return{stdout:"",stderr:`ln: failed to create ${r?"symbolic ":""}link '${l}': File exists
|
|
5
5
|
`,exitCode:1};try{if(r)await s.fs.symlink(i,o);else{let e=s.fs.resolvePath(s.cwd,i);if(!await s.fs.exists(e))return{stdout:"",stderr:`ln: failed to access '${i}': No such file or directory
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as
|
|
2
|
+
import{a as q,b as w}from"./chunk-OOJCYVYF.js";import{c as b}from"./chunk-MO4RPBN2.js";import{b as j}from"./chunk-YU6OGPZR.js";import{a as E,b as g}from"./chunk-RLNOQILG.js";import{a as C,b as M}from"./chunk-GTNBSMZR.js";import{randomBytes as z}from"node:crypto";import{existsSync as T}from"node:fs";import{dirname as X,join as x}from"node:path";import{fileURLToPath as Y}from"node:url";import{Worker as G}from"node:worker_threads";import K from"sql.js";function A(e,t,r){switch(r.mode){case"list":return O(e,t,r);case"csv":return P(e,t,r);case"json":return N(e,t);case"line":return R(e,t,r);case"column":return F(e,t,r);case"table":return Q(e,t,r);case"markdown":return U(e,t,r);case"tabs":return W(e,t,r);case"box":return D(e,t,r);case"quote":return H(e,t,r);case"html":return J(e,t,r);case"ascii":return _(e,t,r)}}function f(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function O(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function P(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(L).join(","));for(let a of t)n.push(a.map(o=>L(f(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`:""}function L(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
|
|
5
|
-
`)?`"${e.replace(/"/g,'""')}"`:e}function
|
|
5
|
+
`)?`"${e.replace(/"/g,'""')}"`:e}function B(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function I(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):B(e):JSON.stringify(e)}function N(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,i)=>`${JSON.stringify(o)}:${I(n[i])}`).join(",")}}`).join(`,
|
|
6
6
|
`)}]
|
|
7
|
-
`}function
|
|
7
|
+
`}function R(e,t,r){if(e.length===0||t.length===0)return"";let n=Math.max(5,...e.map(o=>o.length)),a=[];for(let o of t)for(let i=0;i<e.length;i++){let s=e[i].padStart(n);a.push(`${s} = ${f(o[i],r.nullValue)}`)}return`${a.join(`
|
|
8
8
|
`)}
|
|
9
|
-
`}function
|
|
9
|
+
`}function F(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];r.header&&(a.push(e.map((o,i)=>o.padEnd(n[i])).join(" ")),a.push(n.map(o=>"-".repeat(o)).join(" ")));for(let o of t)a.push(o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" "));return a.length>0?`${a.join(`
|
|
10
10
|
`)}
|
|
11
|
-
`:""}function
|
|
11
|
+
`:""}function Q(e,t,r){if(e.length===0)return"";let n=e.map(i=>i.length);for(let i of t)for(let s=0;s<i.length;s++){let m=f(i[s],r.nullValue).length;m>n[s]&&(n[s]=m)}let a=[],o=`+${n.map(i=>"-".repeat(i+2)).join("+")}+`;a.push(o),r.header&&(a.push(`| ${e.map((i,s)=>i.padEnd(n[s])).join(" | ")} |`),a.push(o));for(let i of t)a.push(`| ${i.map((s,m)=>f(s,r.nullValue).padEnd(n[m])).join(" | ")} |`);return a.push(o),`${a.join(`
|
|
12
12
|
`)}
|
|
13
|
-
`}function
|
|
13
|
+
`}function U(e,t,r){if(e.length===0)return"";let n=[];r.header&&(n.push(`| ${e.join(" | ")} |`),n.push(`|${e.map(()=>"---").join("|")}|`));for(let a of t)n.push(`| ${a.map(o=>f(o,r.nullValue)).join(" | ")} |`);return n.length>0?`${n.join(`
|
|
14
14
|
`)}
|
|
15
|
-
`:""}function
|
|
15
|
+
`:""}function W(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(" "));for(let a of t)n.push(a.map(o=>f(o,r.nullValue)).join(" "));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function D(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let i=0;i<o.length;i++){let s=f(o[i],r.nullValue).length;s>n[i]&&(n[i]=s)}let a=[];a.push(`\u250C${n.map(o=>"\u2500".repeat(o+2)).join("\u252C")}\u2510`),a.push(`\u2502 ${e.map((o,i)=>o.padEnd(n[i])).join(" \u2502 ")} \u2502`),a.push(`\u251C${n.map(o=>"\u2500".repeat(o+2)).join("\u253C")}\u2524`);for(let o of t)a.push(`\u2502 ${o.map((i,s)=>f(i,r.nullValue).padEnd(n[s])).join(" \u2502 ")} \u2502`);return a.push(`\u2514${n.map(o=>"\u2500".repeat(o+2)).join("\u2534")}\u2518`),`${a.join(`
|
|
16
16
|
`)}
|
|
17
|
-
`}function
|
|
17
|
+
`}function H(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(a=>`'${a}'`).join(","));for(let a of t)n.push(a.map(o=>o==null?"NULL":typeof o=="number"?Number.isInteger(o)?String(o):B(o):`'${String(o)}'`).join(","));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function J(e,t,r){let n=[];r.header&&e.length>0&&(n.push(`<TR>${e.map(a=>`<TH>${V(a)}</TH>`).join("")}`),n.push("</TR>"));for(let a of t)n.push(`<TR>${a.map(o=>`<TD>${V(f(o,r.nullValue))}</TD>`).join("")}`),n.push("</TR>");return n.length>0?`${n.join(`
|
|
18
18
|
`)}
|
|
19
|
-
`:""}function
|
|
19
|
+
`:""}function V(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function _(e,t,r){let o=[];r.header&&e.length>0&&o.push(e.join(""));for(let i of t)o.push(i.map(s=>f(s,r.nullValue)).join(""));return o.length>0?o.join("")+"":""}var Z=5e3,v={name:"sqlite3",summary:"SQLite database CLI",usage:"sqlite3 [OPTIONS] DATABASE [SQL]",options:["-list output in list mode (default)","-csv output in CSV mode","-json output in JSON mode","-line output in line mode","-column output in column mode","-table output as ASCII table","-markdown output as markdown table","-tabs output in tab-separated mode","-box output in Unicode box mode","-quote output in SQL quote mode","-html output as HTML table","-ascii output in ASCII mode (control chars)","-header show column headers","-noheader hide column headers","-separator SEP field separator for list mode (default: |)","-newline SEP row separator (default: \\n)","-nullvalue TEXT text for NULL values (default: empty)","-readonly open database read-only (no writeback)","-bail stop on first error","-echo print SQL before execution","-cmd COMMAND run SQL command before main SQL","-version show SQLite version","-- end of options","--help show this help"],examples:['sqlite3 :memory: "CREATE TABLE t(x); INSERT INTO t VALUES(1); SELECT * FROM t"','sqlite3 -json data.db "SELECT * FROM users"','sqlite3 -csv -header data.db "SELECT id, name FROM products"','sqlite3 -box data.db "SELECT * FROM users"']};function ee(e){let t={mode:"list",header:!1,separator:"|",newline:`
|
|
20
20
|
`,nullValue:"",readonly:!1,bail:!1,echo:!1,cmd:null},r=null,n=null,a=!1,o=!1;for(let i=0;i<e.length;i++){let s=e[i];if(o){r===null?r=s:n===null&&(n=s);continue}if(s==="--")o=!0;else if(s==="-version")a=!0;else if(s==="-list")t.mode="list";else if(s==="-csv")t.mode="csv";else if(s==="-json")t.mode="json";else if(s==="-line")t.mode="line";else if(s==="-column")t.mode="column";else if(s==="-table")t.mode="table";else if(s==="-markdown")t.mode="markdown";else if(s==="-tabs")t.mode="tabs";else if(s==="-box")t.mode="box";else if(s==="-quote")t.mode="quote";else if(s==="-html")t.mode="html";else if(s==="-ascii")t.mode="ascii";else if(s==="-header")t.header=!0;else if(s==="-noheader")t.header=!1;else if(s==="-readonly")t.readonly=!0;else if(s==="-bail")t.bail=!0;else if(s==="-echo")t.echo=!0;else if(s==="-separator"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -separator
|
|
21
21
|
`,exitCode:1};t.separator=e[++i]}else if(s==="-newline"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -newline
|
|
22
22
|
`,exitCode:1};t.newline=e[++i]}else if(s==="-nullvalue"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -nullvalue
|
|
23
23
|
`,exitCode:1};t.nullValue=e[++i]}else if(s==="-cmd"){if(i+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -cmd
|
|
24
24
|
`,exitCode:1};t.cmd=e[++i]}else{if(s.startsWith("-"))return{stdout:"",stderr:`sqlite3: Error: unknown option: ${s.startsWith("--")?s.slice(1):s}
|
|
25
25
|
Use -help for a list of options.
|
|
26
|
-
`,exitCode:1};r===null?r=s:n===null&&(n=s)}}return{options:t,database:r,sql:n,showVersion:a}}async function
|
|
26
|
+
`,exitCode:1};r===null?r=s:n===null&&(n=s)}}return{options:t,database:r,sql:n,showVersion:a}}async function re(){let e=await j.runTrustedAsync(()=>K()),t=new e.Database;try{let r=t.exec("SELECT sqlite_version()");return r.length>0&&r[0].values.length>0?String(r[0].values[0][0]):"unknown"}finally{t.close()}}function te(){let e=X(Y(import.meta.url)),t=x(e,"../../commands/sqlite3/worker.js");if(T(t))return t;let r=x(e,"worker.js");if(T(r))return r;let n=x(e,"../../../dist/commands/sqlite3/worker.js");if(T(n))return n;throw new Error("sqlite3 worker not found. Run 'pnpm build' to compile the worker.")}var ne={createWorker(e,t){return new G(e,{workerData:t})}};function oe(){return z(16).toString("hex")}function se(e,t){if(!e||typeof e!="object")return{success:!1,error:"Malformed worker response"};let r=e;return typeof r.protocolToken!="string"||r.protocolToken!==t?{success:!1,error:"Malformed worker response: invalid protocol token"}:r.type==="security-violation"?{success:!1,error:`Security violation: ${typeof r.violation?.type=="string"?r.violation.type:"unknown"}`}:typeof r.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:r.success?Array.isArray(r.results)?typeof r.hasModifications!="boolean"?{success:!1,error:"Malformed worker response: missing hasModifications flag"}:r.dbBuffer!==null&&r.dbBuffer!==void 0&&!(r.dbBuffer instanceof Uint8Array)?{success:!1,error:"Malformed worker response: invalid dbBuffer"}:{success:!0,results:r.results,hasModifications:r.hasModifications,dbBuffer:r.dbBuffer===void 0?null:r.dbBuffer,defenseStats:r.defenseStats}:{success:!1,error:"Malformed worker response: missing results array"}:{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}async function ie(e,t,r){try{let n=te();return await new Promise((a,o)=>{let i=j.runTrusted(()=>ne.createWorker(n,e)),s=b(r,"sqlite3","worker timeout callback",()=>{i.terminate(),a({success:!1,error:`Query timeout: execution exceeded ${t}ms limit`})}),c=q(()=>{try{s()}catch(u){let l=u instanceof Error?u.message:String(u);a({success:!1,error:g(l)})}},t),S=b(r,"sqlite3","worker message callback",u=>{w(c),a(se(u,e.protocolToken))}),$=b(r,"sqlite3","worker error callback",u=>{w(c),o(u)}),y=b(r,"sqlite3","worker exit callback",u=>{w(c),u!==0&&a({success:!1,error:`Worker exited with code ${u}`})}),p=u=>{try{S(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:g(d)})}},k=u=>{try{$(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);o(new Error(g(d)))}},h=u=>{try{y(u)}catch(l){w(c);let d=l instanceof Error?l.message:String(l);a({success:!1,error:g(d)})}};i.on("message",p),i.on("error",k),i.on("exit",h)})}catch(n){let a=g(n.message);throw new Error(`sqlite3 worker failed to load: ${a}`)}}var $e={name:"sqlite3",async execute(e,t){if(M(e)||e.includes("-help"))return C(v);let r=ee(e);if("exitCode"in r)return r;let{options:n,database:a,sql:o,showVersion:i}=r;if(i)return{stdout:`${await re()}
|
|
27
27
|
`,stderr:"",exitCode:0};if(!a)return{stdout:"",stderr:`sqlite3: missing database argument
|
|
28
28
|
`,exitCode:1};let s=o||t.stdin.trim();if(n.cmd&&(s=n.cmd+(s?`; ${s}`:"")),!s)return{stdout:"",stderr:`sqlite3: no SQL provided
|
|
29
|
-
`,exitCode:1};let
|
|
30
|
-
`,exitCode:1}}let $=t.limits?.maxSqliteTimeoutMs??
|
|
31
|
-
`,exitCode:1}}if(!
|
|
32
|
-
`,exitCode:1};let k={mode:n.mode,header:n.header,separator:n.separator,newline:n.newline,nullValue:n.nullValue},
|
|
33
|
-
`);let u=!1;for(let l of
|
|
34
|
-
`,exitCode:1};
|
|
35
|
-
`,u=!0}else l.columns&&l.rows&&(l.rows.length>0||n.header)&&(
|
|
36
|
-
`,exitCode:1}}return{stdout:
|
|
29
|
+
`,exitCode:1};let m=a===":memory:",c="",S=null;try{m||(c=t.fs.resolvePath(t.cwd,a),await t.fs.exists(c)&&(S=await t.fs.readFileBuffer(c)))}catch(l){let d=E(l.message);return{stdout:"",stderr:`sqlite3: unable to open database "${a}": ${d}
|
|
30
|
+
`,exitCode:1}}let $=t.limits?.maxSqliteTimeoutMs??Z,y={protocolToken:oe(),dbBuffer:S,sql:s,options:{bail:n.bail,echo:n.echo}},p;try{p=await ie(y,$,t.requireDefenseContext)}catch(l){return{stdout:"",stderr:`sqlite3: worker error: ${g(l.message)}
|
|
31
|
+
`,exitCode:1}}if(!p.success)return{stdout:"",stderr:`sqlite3: ${g(p.error)}
|
|
32
|
+
`,exitCode:1};let k={mode:n.mode,header:n.header,separator:n.separator,newline:n.newline,nullValue:n.nullValue},h="";n.echo&&(h+=`${s}
|
|
33
|
+
`);let u=!1;for(let l of p.results)if(l.type==="error"){if(n.bail)return{stdout:h,stderr:`Error: ${l.error}
|
|
34
|
+
`,exitCode:1};h+=`Error: ${l.error}
|
|
35
|
+
`,u=!0}else l.columns&&l.rows&&(l.rows.length>0||n.header)&&(h+=A(l.columns,l.rows,k));if(p.hasModifications&&!n.readonly&&!m&&c&&p.dbBuffer)try{await t.fs.writeFile(c,p.dbBuffer)}catch(l){let d=E(l.message);return{stdout:h,stderr:`sqlite3: failed to write database: ${d}
|
|
36
|
+
`,exitCode:1}}return{stdout:h,stderr:"",exitCode:u&&n.bail?1:0}}},ye={name:"sqlite3",flags:[],needsArgs:!0};export{ne as a,$e as b,ye as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as p}from"./chunk-
|
|
2
|
+
import{a as p}from"./chunk-RLNOQILG.js";import{a as m}from"./chunk-JBABAK44.js";import{a as u}from"./chunk-4VDEBYW7.js";var v={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},E={name:"rm",async execute(g,s){let e=m("rm",g,v);if(!e.ok)return e.error;let i=e.result.flags.recursive||e.result.flags.recursiveUpper,a=e.result.flags.force,d=e.result.flags.verbose,c=e.result.positional;if(c.length===0)return a?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:`rm: missing operand
|
|
3
3
|
`,exitCode:1};let f="",t="",l=0;for(let r of c)try{let n=s.fs.resolvePath(s.cwd,r);if((await s.fs.stat(n)).isDirectory&&!i){t+=`rm: cannot remove '${r}': Is a directory
|
|
4
4
|
`,l=1;continue}await s.fs.rm(n,{recursive:i,force:a}),d&&(f+=`removed '${r}'
|
|
5
5
|
`)}catch(n){if(!a){let o=u(n);o.includes("ENOENT")||o.includes("no such file")?t+=`rm: cannot remove '${r}': No such file or directory
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as Qa}from"./chunk-QSDVMMYI.js";import{a as Pe,b as Li}from"./chunk-ZO5PSLKR.js";import{d as R}from"./chunk-V7ZOPVQS.js";import{a as Ii,b as Ci}from"./chunk-MO4RPBN2.js";import{a as Os}from"./chunk-YU6OGPZR.js";import{k as ks}from"./chunk-6KZRLMG3.js";import{a as qs}from"./chunk-
|
|
2
|
+
import{a as Qa}from"./chunk-QSDVMMYI.js";import{a as Pe,b as Li}from"./chunk-ZO5PSLKR.js";import{d as R}from"./chunk-V7ZOPVQS.js";import{a as Ii,b as Ci}from"./chunk-MO4RPBN2.js";import{a as Os}from"./chunk-YU6OGPZR.js";import{k as ks}from"./chunk-6KZRLMG3.js";import{a as qs}from"./chunk-RLNOQILG.js";import{a as ki,b as qi,c as le}from"./chunk-GTNBSMZR.js";import{a as wt,c as b,e as Ts}from"./chunk-KGOUQS5A.js";var Xi=b((fp,Gi)=>{var{hasOwnProperty:_s}=Object.prototype,xs=(s,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
|
|
3
3
|
`:`
|
|
4
4
|
`,n=e.whitespace?" = ":"=",i=[],r=e.sort?Object.keys(s).sort():Object.keys(s),o=0;e.align&&(o=X(r.filter(c=>s[c]===null||Array.isArray(s[c])||typeof s[c]!="object").map(c=>Array.isArray(s[c])?`${c}[]`:c).concat([""]).reduce((c,u)=>X(c).length>=X(u).length?c:u)).length);let a="",l=e.bracketedArray?"[]":"";for(let c of r){let u=s[c];if(u&&Array.isArray(u))for(let f of u)a+=X(`${c}${l}`).padEnd(o," ")+n+X(f)+t;else u&&typeof u=="object"?i.push(c):a+=X(c).padEnd(o," ")+n+X(u)+t}e.section&&a.length&&(a="["+X(e.section)+"]"+(e.newline?t+t:t)+a);for(let c of i){let u=Ji(c,".").join("\\."),f=(e.section?e.section+".":"")+u,d=xs(s[c],{...e,section:f});a.length&&d.length&&(a+=t),a+=d}return a};function Ji(s,e){var t=0,n=0,i=0,r=[];do if(i=s.indexOf(e,t),i!==-1){if(t=i+e.length,i>0&&s[i-1]==="\\")continue;r.push(s.slice(n,i)),n=i+e.length}while(i!==-1);return r.push(s.slice(n)),r}var Ui=(s,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let t=Object.create(null),n=t,i=null,r=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=s.split(/[\r\n]+/g),a={};for(let c of o){if(!c||c.match(/^\s*[;#]/)||c.match(/^\s*$/))continue;let u=c.match(r);if(!u)continue;if(u[1]!==void 0){if(i=Et(u[1]),i==="__proto__"){n=Object.create(null);continue}n=t[i]=t[i]||Object.create(null);continue}let f=Et(u[2]),d;e.bracketedArray?d=f.length>2&&f.slice(-2)==="[]":(a[f]=(a?.[f]||0)+1,d=a[f]>1);let p=d&&f.endsWith("[]")?f.slice(0,-2):f;if(p==="__proto__")continue;let g=u[3]?Et(u[4]):!0,h=g==="true"||g==="false"||g==="null"?JSON.parse(g):g;d&&(_s.call(n,p)?Array.isArray(n[p])||(n[p]=[n[p]]):n[p]=[]),Array.isArray(n[p])?n[p].push(h):n[p]=h}let l=[];for(let c of Object.keys(t)){if(!_s.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let u=Ji(c,".");n=t;let f=u.pop(),d=f.replace(/\\\./g,".");for(let p of u)p!=="__proto__"&&((!_s.call(n,p)||typeof n[p]!="object")&&(n[p]=Object.create(null)),n=n[p]);n===t&&d===f||(n[d]=t[c],l.push(c))}for(let c of l)delete t[c];return t},Wi=s=>s.startsWith('"')&&s.endsWith('"')||s.startsWith("'")&&s.endsWith("'"),X=s=>typeof s!="string"||s.match(/[=\r\n]/)||s.match(/^\[/)||s.length>1&&Wi(s)||s!==s.trim()?JSON.stringify(s):s.split(";").join("\\;").split("#").join("\\#"),Et=s=>{if(s=(s||"").trim(),Wi(s)){s.charAt(0)==="'"&&(s=s.slice(1,-1));try{s=JSON.parse(s)}catch{}}else{let e=!1,t="";for(let n=0,i=s.length;n<i;n++){let r=s.charAt(n);if(e)"\\;#".indexOf(r)!==-1?t+=r:t+="\\"+r,e=!1;else{if(";#".indexOf(r)!==-1)break;r==="\\"?e=!0:t+=r}}return e&&(t+="\\"),t.trim()}return s};Gi.exports={parse:Ui,decode:Ui,stringify:xs,encode:xs,safe:X,unsafe:Et}});var O=b($=>{"use strict";var Ks=Symbol.for("yaml.alias"),sr=Symbol.for("yaml.document"),qt=Symbol.for("yaml.map"),nr=Symbol.for("yaml.pair"),Rs=Symbol.for("yaml.scalar"),It=Symbol.for("yaml.seq"),D=Symbol.for("yaml.node.type"),Zl=s=>!!s&&typeof s=="object"&&s[D]===Ks,ec=s=>!!s&&typeof s=="object"&&s[D]===sr,tc=s=>!!s&&typeof s=="object"&&s[D]===qt,sc=s=>!!s&&typeof s=="object"&&s[D]===nr,ir=s=>!!s&&typeof s=="object"&&s[D]===Rs,nc=s=>!!s&&typeof s=="object"&&s[D]===It;function rr(s){if(s&&typeof s=="object")switch(s[D]){case qt:case It:return!0}return!1}function ic(s){if(s&&typeof s=="object")switch(s[D]){case Ks:case qt:case Rs:case It:return!0}return!1}var rc=s=>(ir(s)||rr(s))&&!!s.anchor;$.ALIAS=Ks;$.DOC=sr;$.MAP=qt;$.NODE_TYPE=D;$.PAIR=nr;$.SCALAR=Rs;$.SEQ=It;$.hasAnchor=rc;$.isAlias=Zl;$.isCollection=rr;$.isDocument=ec;$.isMap=tc;$.isNode=ic;$.isPair=sc;$.isScalar=ir;$.isSeq=nc});var Ke=b(Ys=>{"use strict";var M=O(),F=Symbol("break visit"),or=Symbol("skip children"),W=Symbol("remove node");function Ct(s,e){let t=ar(e);M.isDocument(s)?Ne(null,s.contents,t,Object.freeze([s]))===W&&(s.contents=null):Ne(null,s,t,Object.freeze([]))}Ct.BREAK=F;Ct.SKIP=or;Ct.REMOVE=W;function Ne(s,e,t,n){let i=lr(s,e,t,n);if(M.isNode(i)||M.isPair(i))return cr(s,n,i),Ne(s,i,t,n);if(typeof i!="symbol"){if(M.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=Ne(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===F)return F;o===W&&(e.items.splice(r,1),r-=1)}}}else if(M.isPair(e)){n=Object.freeze(n.concat(e));let r=Ne("key",e.key,t,n);if(r===F)return F;r===W&&(e.key=null);let o=Ne("value",e.value,t,n);if(o===F)return F;o===W&&(e.value=null)}}return i}async function Lt(s,e){let t=ar(e);M.isDocument(s)?await Ee(null,s.contents,t,Object.freeze([s]))===W&&(s.contents=null):await Ee(null,s,t,Object.freeze([]))}Lt.BREAK=F;Lt.SKIP=or;Lt.REMOVE=W;async function Ee(s,e,t,n){let i=await lr(s,e,t,n);if(M.isNode(i)||M.isPair(i))return cr(s,n,i),Ee(s,i,t,n);if(typeof i!="symbol"){if(M.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await Ee(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===F)return F;o===W&&(e.items.splice(r,1),r-=1)}}}else if(M.isPair(e)){n=Object.freeze(n.concat(e));let r=await Ee("key",e.key,t,n);if(r===F)return F;r===W&&(e.key=null);let o=await Ee("value",e.value,t,n);if(o===F)return F;o===W&&(e.value=null)}}return i}function ar(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function lr(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(M.isMap(e))return t.Map?.(s,e,n);if(M.isSeq(e))return t.Seq?.(s,e,n);if(M.isPair(e))return t.Pair?.(s,e,n);if(M.isScalar(e))return t.Scalar?.(s,e,n);if(M.isAlias(e))return t.Alias?.(s,e,n)}function cr(s,e,t){let n=e[e.length-1];if(M.isCollection(n))n.items[s]=t;else if(M.isPair(n))s==="key"?n.key=t:n.value=t;else if(M.isDocument(n))n.contents=t;else{let i=M.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}Ys.visit=Ct;Ys.visitAsync=Lt});var Us=b(ur=>{"use strict";var fr=O(),oc=Ke(),ac={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},lc=s=>s.replace(/[!,[\]{}]/g,e=>ac[e]),Re=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+lc(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&fr.isNode(e.contents)){let r={};oc.visit(e.contents,(o,a)=>{fr.isNode(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
5
5
|
`)}};Re.defaultYaml={explicit:!1,version:"1.2"};Re.defaultTags={"!!":"tag:yaml.org,2002:"};ur.Directives=Re});var Pt=b(Ye=>{"use strict";var dr=O(),cc=Ke();function fc(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function hr(s){let e=new Set;return cc.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function pr(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function uc(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=hr(s));let o=pr(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(dr.isScalar(o.node)||dr.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:n}}Ye.anchorIsValid=fc;Ye.anchorNames=hr;Ye.createNodeAnchors=uc;Ye.findNewAnchor=pr});var Js=b(mr=>{"use strict";function Ue(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],a=Ue(s,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=Ue(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=Ue(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=Ue(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}mr.applyReviver=Ue});var z=b(yr=>{"use strict";var dc=O();function gr(s,e,t){if(Array.isArray(s))return s.map((n,i)=>gr(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!dc.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}yr.toJS=gr});var Mt=b(wr=>{"use strict";var hc=Js(),br=O(),pc=z(),Ws=class{constructor(e){Object.defineProperty(this,br.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!br.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=pc.toJS(this,"",o);if(typeof i=="function")for(let{count:l,res:c}of o.anchors.values())i(c,l);return typeof r=="function"?hc.applyReviver(r,{"":a},"",a):a}};wr.NodeBase=Ws});var Je=b(Sr=>{"use strict";var mc=Pt(),gc=Ke(),ve=O(),yc=Mt(),bc=z(),Gs=class extends yc.NodeBase{constructor(e){super(ve.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],gc.visit(e,{Node:(r,o)=>{(ve.isAlias(o)||ve.hasAnchor(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=n.get(o);if(a||(bc.toJS(o,null,t),a=n.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=$t(i,o,n)),a.count*a.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(mc.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function $t(s,e,t){if(ve.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(ve.isCollection(e)){let n=0;for(let i of e.items){let r=$t(s,i,t);r>n&&(n=r)}return n}else if(ve.isPair(e)){let n=$t(s,e.key,t),i=$t(s,e.value,t);return Math.max(n,i)}return 1}Sr.Alias=Gs});var C=b(Xs=>{"use strict";var wc=O(),Sc=Mt(),Nc=z(),Ec=s=>!s||typeof s!="function"&&typeof s!="object",Z=class extends Sc.NodeBase{constructor(e){super(wc.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:Nc.toJS(this.value,e,t)}toString(){return String(this.value)}};Z.BLOCK_FOLDED="BLOCK_FOLDED";Z.BLOCK_LITERAL="BLOCK_LITERAL";Z.PLAIN="PLAIN";Z.QUOTE_DOUBLE="QUOTE_DOUBLE";Z.QUOTE_SINGLE="QUOTE_SINGLE";Xs.Scalar=Z;Xs.isScalarValue=Ec});var We=b(Er=>{"use strict";var vc=Je(),ue=O(),Nr=C(),Ac="tag:yaml.org,2002:";function Tc(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function Oc(s,e,t){if(ue.isDocument(s)&&(s=s.contents),ue.isNode(s))return s;if(ue.isPair(s)){let f=t.schema[ue.MAP].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=t,l;if(n&&s&&typeof s=="object"){if(l=a.get(s),l)return l.anchor??(l.anchor=i(s)),new vc.Alias(l.anchor);l={anchor:null,node:null},a.set(s,l)}e?.startsWith("!!")&&(e=Ac+e.slice(2));let c=Tc(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new Nr.Scalar(s);return l&&(l.node=f),f}c=s instanceof Map?o[ue.MAP]:Symbol.iterator in Object(s)?o[ue.SEQ]:o[ue.MAP]}r&&(r(c),delete t.onTagObj);let u=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new Nr.Scalar(s);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}Er.createNode=Oc});var xt=b(_t=>{"use strict";var kc=We(),G=O(),qc=Mt();function Ds(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return kc.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var vr=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,Qs=class extends qc.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>G.isNode(n)||G.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(vr(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(G.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,Ds(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(G.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&G.isScalar(r)?r.value:r:G.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!G.isPair(t))return!1;let n=t.value;return n==null||e&&G.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return G.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(G.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,Ds(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};_t.Collection=Qs;_t.collectionFromPath=Ds;_t.isEmptyPath=vr});var Ge=b(Bt=>{"use strict";var Ic=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function Hs(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var Cc=(s,e,t)=>s.endsWith(`
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as F}from"./chunk-4OALHZXB.js";import{a as w,b as h}from"./chunk-LIYVQA3X.js";import{a as T,b as g}from"./chunk-OOJCYVYF.js";import{a as m}from"./chunk-RLNOQILG.js";var n={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300,INVOKE_TOOL:400},r={PENDING:0,READY:1,SUCCESS:2,ERROR:3},l={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},o={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},p={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:1048576,TOTAL:1052704},S={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},u={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function _(){return new w(p.TOTAL)}var R=class{int32View;uint8View;dataView;constructor(t){this.int32View=new Int32Array(t),this.uint8View=new Uint8Array(t),this.dataView=new DataView(t)}getOpCode(){return h.load(this.int32View,o.OP_CODE/4)}setOpCode(t){h.store(this.int32View,o.OP_CODE/4,t)}getStatus(){return h.load(this.int32View,o.STATUS/4)}setStatus(t){h.store(this.int32View,o.STATUS/4,t)}getPathLength(){return h.load(this.int32View,o.PATH_LENGTH/4)}setPathLength(t){h.store(this.int32View,o.PATH_LENGTH/4,t)}getDataLength(){return h.load(this.int32View,o.DATA_LENGTH/4)}setDataLength(t){h.store(this.int32View,o.DATA_LENGTH/4,t)}getResultLength(){return h.load(this.int32View,o.RESULT_LENGTH/4)}setResultLength(t){h.store(this.int32View,o.RESULT_LENGTH/4,t)}getErrorCode(){return h.load(this.int32View,o.ERROR_CODE/4)}setErrorCode(t){h.store(this.int32View,o.ERROR_CODE/4,t)}getFlags(){return h.load(this.int32View,o.FLAGS/4)}setFlags(t){h.store(this.int32View,o.FLAGS/4,t)}getMode(){return h.load(this.int32View,o.MODE/4)}setMode(t){h.store(this.int32View,o.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(o.PATH_BUFFER,o.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>p.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${p.PATH_BUFFER}`);this.uint8View.set(e,o.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setData(t){if(t.length>p.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setDataLength(t.length)}getDataAsString(){let t=this.getData();return new TextDecoder().decode(t)}setDataFromString(t){let e=new TextEncoder().encode(t);this.setData(e)}getResult(){let t=this.getResultLength();return this.uint8View.slice(o.DATA_BUFFER,o.DATA_BUFFER+t)}setResult(t){if(t.length>p.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${p.DATA_BUFFER}`);this.uint8View.set(t,o.DATA_BUFFER),this.setResultLength(t.length)}getResultAsString(){let t=this.getResult();return new TextDecoder().decode(t)}setResultFromString(t){let e=new TextEncoder().encode(t);this.setResult(e)}encodeStat(t){this.uint8View[o.DATA_BUFFER+u.IS_FILE]=t.isFile?1:0,this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(o.DATA_BUFFER+u.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(o.DATA_BUFFER+u.SIZE,e,!0),this.dataView.setFloat64(o.DATA_BUFFER+u.MTIME,t.mtime.getTime(),!0),this.setResultLength(u.TOTAL)}decodeStat(){return{isFile:this.uint8View[o.DATA_BUFFER+u.IS_FILE]===1,isDirectory:this.uint8View[o.DATA_BUFFER+u.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[o.DATA_BUFFER+u.IS_SYMLINK]===1,mode:this.dataView.getInt32(o.DATA_BUFFER+u.MODE,!0),size:this.dataView.getFloat64(o.DATA_BUFFER+u.SIZE,!0),mtime:new Date(this.dataView.getFloat64(o.DATA_BUFFER+u.MTIME,!0))}}waitForReady(t){return h.wait(this.int32View,o.STATUS/4,r.PENDING,t)}waitForReadyAsync(t){return h.waitAsync(this.int32View,o.STATUS/4,r.PENDING,t)}async waitUntilReady(t){let e=Date.now();for(;;){let a=this.getStatus();if(a===r.READY)return!0;let s=Date.now()-e;if(s>=t)return!1;let i=t-s,c=h.waitAsync(this.int32View,o.STATUS/4,a,i);if(c.async&&await c.value==="timed-out")return!1}}waitForResult(t){return h.wait(this.int32View,o.STATUS/4,r.READY,t)}notify(){return h.notify(this.int32View,o.STATUS/4)}reset(){this.setOpCode(n.NOOP),this.setStatus(r.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(l.NONE),this.setFlags(S.NONE),this.setMode(0)}};var O=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;invokeTool;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(t,e,a,s,i=void 0,c=0,d=void 0,E=void 0){this.fs=e,this.cwd=a,this.commandName=s,this.secureFetch=i,this.maxOutputSize=c,this.exec=d,this.invokeTool=E,this.protocol=new R(t)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(t){let e=this.remainingMs();if(e<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
|
|
3
|
+
${this.commandName}: execution timeout exceeded
|
|
4
|
+
`,Promise.reject(new Error("Operation timed out"));let a=t();return new Promise((s,i)=>{let c=T(()=>{this.running=!1,this.output.exitCode=124,this.output.stderr+=`
|
|
5
|
+
${this.commandName}: execution timeout exceeded
|
|
6
|
+
`,i(new Error("Operation timed out"))},e);a.then(d=>{g(c),s(d)},d=>{g(c),i(d)})})}async run(t){for(this.running=!0,this.startTime=Date.now(),this.timeoutMs=t;this.running;){if(Date.now()-this.startTime>=t){this.output.stderr+=`
|
|
7
|
+
${this.commandName}: execution timeout exceeded
|
|
8
|
+
`,this.output.exitCode=124;break}let a=this.remainingMs();if(!await this.protocol.waitUntilReady(a)){this.output.stderr+=`
|
|
9
|
+
${this.commandName}: execution timeout exceeded
|
|
10
|
+
`,this.output.exitCode=124;break}let i=this.protocol.getOpCode();await this.handleOperation(i),this.protocol.notify()}return this.output}stop(){this.running=!1}async handleOperation(t){try{switch(t){case n.READ_FILE:await this.handleReadFile();break;case n.WRITE_FILE:await this.handleWriteFile();break;case n.STAT:await this.handleStat();break;case n.LSTAT:await this.handleLstat();break;case n.READDIR:await this.handleReaddir();break;case n.MKDIR:await this.handleMkdir();break;case n.RM:await this.handleRm();break;case n.EXISTS:await this.handleExists();break;case n.APPEND_FILE:await this.handleAppendFile();break;case n.SYMLINK:await this.handleSymlink();break;case n.READLINK:await this.handleReadlink();break;case n.CHMOD:await this.handleChmod();break;case n.REALPATH:await this.handleRealpath();break;case n.RENAME:await this.handleRename();break;case n.COPY_FILE:await this.handleCopyFile();break;case n.WRITE_STDOUT:this.handleWriteStdout();break;case n.WRITE_STDERR:this.handleWriteStderr();break;case n.EXIT:this.handleExit();break;case n.HTTP_REQUEST:await this.handleHttpRequest();break;case n.EXEC_COMMAND:await this.handleExecCommand();break;case n.INVOKE_TOOL:await this.handleInvokeTool();break;default:this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setStatus(r.ERROR)}}catch(e){this.setErrorFromException(e)}}resolvePath(t){return this.fs.resolvePath(this.cwd,t)}async handleReadFile(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readFileBuffer(t);this.protocol.setResult(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleWriteFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.writeFile(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleStat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.stat(t);this.protocol.encodeStat(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleLstat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.lstat(t);this.protocol.encodeStat(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReaddir(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readdir(t);this.protocol.setResultFromString(JSON.stringify(e)),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleMkdir(){let t=this.resolvePath(this.protocol.getPath()),a=(this.protocol.getFlags()&S.MKDIR_RECURSIVE)!==0;try{await this.fs.mkdir(t,{recursive:a}),this.protocol.setStatus(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleRm(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getFlags(),a=(e&S.RECURSIVE)!==0,s=(e&S.FORCE)!==0;try{await this.fs.rm(t,{recursive:a,force:s}),this.protocol.setStatus(r.SUCCESS)}catch(i){this.setErrorFromException(i)}}async handleExists(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.exists(t);this.protocol.setResult(new Uint8Array([e?1:0])),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleAppendFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.appendFile(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleSymlink(){let t=this.protocol.getPath(),e=this.protocol.getDataAsString(),a=this.resolvePath(t);try{await this.fs.symlink(e,a),this.protocol.setStatus(r.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleReadlink(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readlink(t);this.protocol.setResultFromString(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleChmod(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getMode();try{await this.fs.chmod(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleRealpath(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.realpath(t);this.protocol.setResultFromString(e),this.protocol.setStatus(r.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRename(){let t=this.resolvePath(this.protocol.getPath()),e=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.mv(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}async handleCopyFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.cp(t,e),this.protocol.setStatus(r.SUCCESS)}catch(a){this.setErrorFromException(a)}}handleWriteStdout(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stdout",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setStatus(r.ERROR);return}this.protocol.setStatus(r.SUCCESS)}handleWriteStderr(){let t=this.protocol.getDataAsString();if(!this.tryAppendOutput("stderr",t)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Output size limit exceeded"),this.protocol.setStatus(r.ERROR);return}this.protocol.setStatus(r.SUCCESS)}handleExit(){let t=this.protocol.getFlags();this.outputLimitExceeded?this.output.exitCode===0&&(this.output.exitCode=1):this.output.exitCode=t,this.protocol.setStatus(r.SUCCESS),this.running=!1}tryAppendOutput(t,e){return this.outputLimitExceeded?!1:this.maxOutputSize<=0?(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0):this.output.stdout.length+this.output.stderr.length+e.length>this.maxOutputSize?!1:(t==="stdout"?this.output.stdout+=e:this.output.stderr+=e,!0)}appendOutputLimitError(){if(this.maxOutputSize<=0)return;let t=`${this.commandName}: total output size exceeded (>${this.maxOutputSize} bytes), increase executionLimits.maxOutputSize
|
|
11
|
+
`,e=t.length>this.maxOutputSize?t.slice(0,this.maxOutputSize):t;if(this.output.stderr.includes("total output size exceeded"))return;let s=this.output.stdout.length+this.output.stderr.length+e.length-this.maxOutputSize;if(s>0)if(this.output.stdout.length>=s)this.output.stdout=this.output.stdout.slice(0,this.output.stdout.length-s);else{let i=s-this.output.stdout.length;this.output.stdout="",i>=this.output.stderr.length?this.output.stderr="":this.output.stderr=this.output.stderr.slice(0,this.output.stderr.length-i)}this.output.stderr+=e}async handleHttpRequest(){let t=this.secureFetch;if(!t){this.protocol.setErrorCode(l.NETWORK_NOT_CONFIGURED),this.protocol.setResultFromString("Network access not configured. Enable network in Bash options."),this.protocol.setStatus(r.ERROR);return}let e=this.protocol.getPath(),a=this.protocol.getDataAsString();try{let s=a?JSON.parse(a):{},i=this.remainingMs(),c=await this.raceDeadline(()=>t(e,{method:s.method,headers:s.headers,body:s.body,timeoutMs:i})),d=JSON.stringify({status:c.status,statusText:c.statusText,headers:c.headers,body:c.body,url:c.url});this.protocol.setResultFromString(d),this.protocol.setStatus(r.SUCCESS)}catch(s){let i=m(s instanceof Error?s.message:String(s));this.protocol.setErrorCode(l.NETWORK_ERROR),this.protocol.setResultFromString(i),this.protocol.setStatus(r.ERROR)}}async handleExecCommand(){let t=this.exec;if(!t){this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Command execution not available in this context."),this.protocol.setStatus(r.ERROR);return}let e=this.protocol.getPath(),a=this.protocol.getDataAsString(),s=new AbortController;try{let i={cwd:this.cwd,signal:s.signal};if(a){let E=JSON.parse(a);E.stdin&&(i.stdin=E.stdin),E.args&&Array.isArray(E.args)&&(i.args=E.args.map(D=>String(D)),e=F([e]))}let c=await this.raceDeadline(()=>t(e,i)),d=JSON.stringify({stdout:c.stdout,stderr:c.stderr,exitCode:c.exitCode});this.protocol.setResultFromString(d),this.protocol.setStatus(r.SUCCESS)}catch(i){s.abort();let c=i instanceof Error?i.message:String(i);this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(c),this.protocol.setStatus(r.ERROR)}}async handleInvokeTool(){let t=this.invokeTool;if(!t){this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("Tool invocation not available in this context."),this.protocol.setStatus(r.ERROR);return}let e=this.protocol.getPath(),a=this.protocol.getDataAsString();try{let s=await this.raceDeadline(()=>t(e,a));this.protocol.setResultFromString(s),this.protocol.setStatus(r.SUCCESS)}catch(s){let i=s instanceof Error?s.message:String(s);this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(i),this.protocol.setStatus(r.ERROR)}}setErrorFromException(t){let e=t instanceof Error?t.message:String(t),a=m(e),s=l.IO_ERROR,i=e.toLowerCase();i.includes("no such file")||i.includes("not found")||i.includes("enoent")?s=l.NOT_FOUND:i.includes("is a directory")||i.includes("eisdir")?s=l.IS_DIRECTORY:i.includes("not a directory")||i.includes("enotdir")?s=l.NOT_DIRECTORY:i.includes("already exists")||i.includes("eexist")?s=l.EXISTS:(i.includes("permission")||i.includes("eperm")||i.includes("eacces"))&&(s=l.PERMISSION_DENIED),this.protocol.setErrorCode(s),this.protocol.setResultFromString(a),this.protocol.setStatus(r.ERROR)}};export{_ as a,O as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as y}from"./chunk-
|
|
2
|
+
import{a as y}from"./chunk-RLNOQILG.js";import{a as C}from"./chunk-JBABAK44.js";import{a as u,b as m}from"./chunk-GTNBSMZR.js";var x={name:"tr",summary:"translate or delete characters",usage:"tr [OPTION]... SET1 [SET2]",options:["-c, -C, --complement use the complement of SET1","-d, --delete delete characters in SET1","-s, --squeeze-repeats squeeze repeated characters"," --help display this help and exit"],description:`SET syntax:
|
|
3
3
|
a-z character range
|
|
4
4
|
[:alnum:] all letters and digits
|
|
5
5
|
[:alpha:] all letters
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a}from"./chunk-SE4C7FJY.js";import{a as d}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-SE4C7FJY.js";import{a as d}from"./chunk-RLNOQILG.js";var S={name:"expr",async execute(s,r){if(s.length===0)return{stdout:"",stderr:`expr: missing operand
|
|
3
3
|
`,exitCode:2};try{let c=x(s),h=c==="0"||c===""?1:0;return{stdout:`${c}
|
|
4
4
|
`,stderr:"",exitCode:h}}catch(c){return{stdout:"",stderr:`expr: ${d(c.message)}
|
|
5
5
|
`,exitCode:2}}}};function x(s){if(s.length===1)return s[0];let r=0;function c(){let e=h();for(;r<s.length&&s[r]==="|";){r++;let t=h();if(e!=="0"&&e!=="")return e;e=t}return e}function h(){let e=m();for(;r<s.length&&s[r]==="&";){r++;let t=m();(e==="0"||e===""||t==="0"||t==="")&&(e="0")}return e}function m(){let e=g();for(;r<s.length;){let t=s[r];if(["=","!=","<",">","<=",">="].includes(t)){r++;let o=g(),n=parseInt(e,10),i=parseInt(o,10),f=!Number.isNaN(n)&&!Number.isNaN(i),l;t==="="?l=f?n===i:e===o:t==="!="?l=f?n!==i:e!==o:t==="<"?l=f?n<i:e<o:t===">"?l=f?n>i:e>o:t==="<="?l=f?n<=i:e<=o:l=f?n>=i:e>=o,e=l?"1":"0"}else break}return e}function g(){let e=p();for(;r<s.length;){let t=s[r];if(t==="+"||t==="-"){r++;let o=p(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");e=String(t==="+"?n+i:n-i)}else break}return e}function p(){let e=N();for(;r<s.length;){let t=s[r];if(t==="*"||t==="/"||t==="%"){r++;let o=N(),n=parseInt(e,10),i=parseInt(o,10);if(Number.isNaN(n)||Number.isNaN(i))throw new Error("non-integer argument");if((t==="/"||t==="%")&&i===0)throw new Error("division by zero");t==="*"?e=String(n*i):t==="/"?e=String(Math.trunc(n/i)):e=String(n%i)}else break}return e}function N(){let e=u();for(;r<s.length&&s[r]===":";){r++;let t=u(),n=a(`^${t}`).match(e);n?e=n[1]!==void 0?n[1]:String(n[0].length):e="0"}return e}function u(){if(r>=s.length)throw new Error("syntax error");let e=s[r];if(e==="match"){r++;let t=u(),o=u(),i=a(o).match(t);return i?i[1]!==void 0?i[1]:String(i[0].length):"0"}if(e==="substr"){r++;let t=u(),o=parseInt(u(),10),n=parseInt(u(),10);if(Number.isNaN(o)||Number.isNaN(n))throw new Error("non-integer argument");return t.substring(o-1,o-1+n)}if(e==="index"){r++;let t=u(),o=u();for(let n=0;n<t.length;n++)if(o.includes(t[n]))return String(n+1);return"0"}if(e==="length"){r++;let t=u();return String(t.length)}if(e==="("){r++;let t=c();if(r>=s.length||s[r]!==")")throw new Error("syntax error");return r++,t}return r++,e}return c()}var E={name:"expr",flags:[],needsArgs:!0};export{S as a,E as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
function a(r,s,t){if(!r)return r;let e=r.replace(/\n\s+at\s.*/g,"");return t&&(e=e.replace(/\bfile:\/\/\/?[^\s'",)}\]:]+/g,"<path>")),e=e.replace(s?/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap|workspace|root|srv|mnt|app))\b[^\s'",)}\]:]*/g:/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap))\b[^\s'",)}\]:]*/g,"<path>"),e=e.replace(/node:internal\/[^\s'",)}\]:]+/g,"<internal>"),e=e.replace(/[A-Z]:\\[^\s'",)}\]:]+/g,"<path>"),t&&(e=e.replace(/\\\\[^\s\\]+\\[^\s'",)}\]:]+/g,"<path>")),e}function n(r){return a(r,!1,!1)}function i(r){return a(r,!0,!0)}export{n as a,i as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as W,b as U}from"./chunk-MO4RPBN2.js";import{a as I}from"./chunk-YU6OGPZR.js";import{a as A}from"./chunk-SE4C7FJY.js";import{k}from"./chunk-6KZRLMG3.js";import{a as L}from"./chunk-
|
|
2
|
+
import{a as W,b as U}from"./chunk-MO4RPBN2.js";import{a as I}from"./chunk-YU6OGPZR.js";import{a as A}from"./chunk-SE4C7FJY.js";import{k}from"./chunk-6KZRLMG3.js";import{a as L}from"./chunk-RLNOQILG.js";import{a as ee,b as te,c as P}from"./chunk-GTNBSMZR.js";var z=new Map([["alnum","a-zA-Z0-9"],["alpha","a-zA-Z"],["ascii","\\x00-\\x7F"],["blank"," \\t"],["cntrl","\\x00-\\x1F\\x7F"],["digit","0-9"],["graph","!-~"],["lower","a-z"],["print"," -~"],["punct","!-/:-@\\[-`{-~"],["space"," \\t\\n\\r\\f\\v"],["upper","A-Z"],["word","a-zA-Z0-9_"],["xdigit","0-9A-Fa-f"]]);function H(i){let e="",t=0,n=!1;for(;t<i.length;){if(i[t]==="["&&!n){if(i[t+1]==="["&&i[t+2]===":"){let s=i.indexOf(":]]",t+3);if(s!==-1){let a=i.slice(t+3,s),r=z.get(a);if(r){e+=`[${r}]`,t=s+3;continue}}}if(i[t+1]==="^"&&i[t+2]==="["&&i[t+3]===":"){let s=i.indexOf(":]]",t+4);if(s!==-1){let a=i.slice(t+4,s),r=z.get(a);if(r){e+=`[^${r}]`,t=s+3;continue}}}e+="[",t++,n=!0,t<i.length&&i[t]==="^"&&(e+="^",t++),t<i.length&&i[t]==="]"&&(e+="\\]",t++);continue}if(n){if(i[t]==="]"){e+="]",t++,n=!1;continue}if(i[t]==="["&&i[t+1]===":"){let s=i.indexOf(":]",t+2);if(s!==-1){let a=i.slice(t+2,s),r=z.get(a);if(r){e+=r,t=s+2;continue}}}if(i[t]==="\\"&&t+1<i.length){e+=i[t]+i[t+1],t+=2;continue}e+=i[t],t++;continue}if(i[t]==="\\"&&t+1<i.length){let s=i[t+1];if(s==="+"||s==="?"||s==="|"){e+=s,t+=2;continue}if(s==="("||s===")"){e+=s,t+=2;continue}if(s==="{"||s==="}"){e+=s,t+=2;continue}if(s==="t"){e+=" ",t+=2;continue}if(s==="n"){e+=`
|
|
3
3
|
`,t+=2;continue}if(s==="r"){e+="\r",t+=2;continue}e+=i[t]+s,t+=2;continue}if(i[t]==="+"||i[t]==="?"||i[t]==="|"||i[t]==="("||i[t]===")"){e+=`\\${i[t]}`,t++;continue}if(i[t]==="^"&&!(e===""||e.endsWith("("))){e+="\\^",t++;continue}if(i[t]==="$"){let s=t===i.length-1,a=t+2<i.length&&i[t+1]==="\\"&&i[t+2]===")";if(!s&&!a){e+="\\$",t++;continue}}e+=i[t],t++}return e}function V(i){let e="",t=!1;for(let n=0;n<i.length;n++)i[n]==="["&&!t?(t=!0,e+="[",n++,n<i.length&&i[n]==="^"&&(e+="^",n++),n<i.length&&i[n]==="]"&&(e+="]",n++),n--):i[n]==="]"&&t?(t=!1,e+="]"):!t&&i[n]==="{"&&i[n+1]===","?(e+="{0,",n++):e+=i[n];return e}function ne(i){let e="";for(let t=0;t<i.length;t++){let n=i[t],s=n.charCodeAt(0);n==="\\"?e+="\\\\":n===" "?e+="\\t":n===`
|
|
4
4
|
`?e+=`$
|
|
5
5
|
`:n==="\r"?e+="\\r":n==="\x07"?e+="\\a":n==="\b"?e+="\\b":n==="\f"?e+="\\f":n==="\v"?e+="\\v":s<32||s>=127?e+=`\\${s.toString(8).padStart(3,"0")}`:e+=n}return`${e}$`}var de=1e4;function se(i,e,t){return{patternSpace:"",holdSpace:"",lineNumber:0,totalLines:i,deleted:!1,printed:!1,quit:!1,quitSilent:!1,exitCode:void 0,errorMessage:void 0,appendBuffer:[],substitutionMade:!1,lineNumberOutput:[],nCommandOutput:[],restartCycle:!1,inDRestartedCycle:!1,currentFilename:e,pendingFileReads:[],pendingFileWrites:[],rangeStates:t||new Map,linesConsumedInCycle:0}}function pe(i){return typeof i=="object"&&"first"in i&&"step"in i}function me(i){return typeof i=="object"&&"offset"in i}function N(i,e,t,n,s){if(i==="$")return e===t;if(typeof i=="number")return e===i;if(pe(i)){let{first:a,step:r}=i;return r===0?e===a:(e-a)%r===0&&e>=a}if(typeof i=="object"&&"pattern"in i)try{let a=i.pattern;a===""&&s?.lastPattern?a=s.lastPattern:a!==""&&s&&(s.lastPattern=a);let r=V(H(a));return A(r).test(n)}catch{return!1}return!1}function X(i){let e=t=>t===void 0?"undefined":t==="$"?"$":typeof t=="number"?String(t):"pattern"in t?`/${t.pattern}/`:"first"in t?`${t.first}~${t.step}`:"unknown";return`${e(i.start)},${e(i.end)}`}function ge(i,e,t,n,s,a){if(!i||!i.start&&!i.end)return!0;let r=i.start,l=i.end;if(r!==void 0&&l===void 0)return N(r,e,t,n,a);if(r!==void 0&&l!==void 0){let c=typeof r=="object"&&"pattern"in r,f=typeof l=="object"&&"pattern"in l,p=me(l);if(p&&s){let g=X(i),d=s.get(g);if(d||(d={active:!1},s.set(g,d)),d.active){let E=d.startLine||e;return e>=E+l.offset&&(d.active=!1,s.set(g,d)),!0}else return N(r,e,t,n,a)?(d.active=!0,d.startLine=e,s.set(g,d),l.offset===0&&(d.active=!1,s.set(g,d)),!0):!1}if(!c&&!f&&!p){let g=typeof r=="number"?r:r==="$"?t:1,d=typeof l=="number"?l:t;if(g<=d)return e>=g&&e<=d;if(s){let E=X(i),u=s.get(E);return u||(u={active:!1},s.set(E,u)),!u.completed&&e>=g?(u.completed=!0,s.set(E,u),!0):!1}return!1}if(s){let g=X(i),d=s.get(g);if(d||(d={active:!1},s.set(g,d)),d.active)return N(l,e,t,n,a)&&(d.active=!1,typeof r=="number"&&(d.completed=!0),s.set(g,d)),!0;{if(d.completed)return!1;let E=!1;return typeof r=="number"?E=e>=r:E=N(r,e,t,n,a),E?(d.active=!0,d.startLine=e,s.set(g,d),N(l,e,t,n,a)&&(d.active=!1,typeof r=="number"&&(d.completed=!0),s.set(g,d)),!0):!1}}return N(r,e,t,n,a)}return!0}function w(i,e,t,n,s,a){let r=ge(i,e,t,n,s,a);return i?.negated?!r:r}function be(i,e,t,n){let s="",a=0,r=!1;for(;a<=i.length;){e.lastIndex=a;let l=e.exec(i);if(!l){s+=i.slice(a);break}if(l.index!==a){s+=i.slice(a,l.index),a=l.index,r=!1;continue}let c=l[0],f=l.slice(1);if(r&&c.length===0){if(a<i.length)s+=i[a],a++;else break;r=!1;continue}if(s+=n(c,f),r=!1,c.length===0)if(a<i.length)s+=i[a],a++;else break;else a+=c.length,r=!0}return s}function G(i,e,t){let n="",s=0;for(;s<i.length;){if(i[s]==="\\"&&s+1<i.length){let a=i[s+1];if(a==="&"){n+="&",s+=2;continue}if(a==="n"){n+=`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as C,b as L}from"./chunk-ZO5PSLKR.js";import{d as b}from"./chunk-V7ZOPVQS.js";import{a as F,b as z}from"./chunk-MO4RPBN2.js";import{a as J}from"./chunk-YU6OGPZR.js";import{a as D}from"./chunk-5WFYIUU2.js";import{k as $}from"./chunk-6KZRLMG3.js";import{a as E}from"./chunk-
|
|
2
|
+
import{a as C,b as L}from"./chunk-ZO5PSLKR.js";import{d as b}from"./chunk-V7ZOPVQS.js";import{a as F,b as z}from"./chunk-MO4RPBN2.js";import{a as J}from"./chunk-YU6OGPZR.js";import{a as D}from"./chunk-5WFYIUU2.js";import{k as $}from"./chunk-6KZRLMG3.js";import{a as E}from"./chunk-RLNOQILG.js";import{a as I,b as k,c as O}from"./chunk-GTNBSMZR.js";function A(s){let r=[],t=0,l=s.length;for(;t<l;){for(;t<l&&/\s/.test(s[t]);)t++;if(t>=l)break;let u=t,n=s[t];if(n==="{"||n==="["){let i=n,a=n==="{"?"}":"]",c=1,p=!1,d=!1;for(t++;t<l&&c>0;){let h=s[t];d?d=!1:h==="\\"?d=!0:h==='"'?p=!p:p||(h===i?c++:h===a&&c--),t++}if(c!==0)throw new Error(`Unexpected end of JSON input at position ${t} (unclosed ${i})`);r.push(b(JSON.parse(s.slice(u,t))))}else if(n==='"'){let i=!1;for(t++;t<l;){let a=s[t];if(i)i=!1;else if(a==="\\")i=!0;else if(a==='"'){t++;break}t++}r.push(b(JSON.parse(s.slice(u,t))))}else if(n==="-"||n>="0"&&n<="9"){for(;t<l&&/[\d.eE+-]/.test(s[t]);)t++;r.push(b(JSON.parse(s.slice(u,t))))}else if(s.slice(t,t+4)==="true")r.push(!0),t+=4;else if(s.slice(t,t+5)==="false")r.push(!1),t+=5;else if(s.slice(t,t+4)==="null")r.push(null),t+=4;else{let i=s.slice(t,t+10);throw new Error(`Invalid JSON at position ${u}: unexpected '${i.split(/\s/)[0]}'`)}}return r}var W={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE]",options:["-r, --raw-output output strings without quotes","-c, --compact compact output (no pretty printing)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --help display this help and exit"]};function j(s,r,t,l,u,n=0){if(s===null||s===void 0)return"null";if(typeof s=="boolean")return String(s);if(typeof s=="number")return Number.isFinite(s)?String(s):"null";if(typeof s=="string")return t?s:JSON.stringify(s);let i=u?" ":" ";if(Array.isArray(s))return s.length===0?"[]":r?`[${s.map(c=>j(c,!0,!1,l,u)).join(",")}]`:`[
|
|
3
3
|
${s.map(c=>i.repeat(n+1)+j(c,!1,!1,l,u,n+1)).join(`,
|
|
4
4
|
`)}
|
|
5
5
|
${i.repeat(n)}]`;if(typeof s=="object"){let a=Object.keys(s);return l&&(a=a.sort()),a.length===0?"{}":r?`{${a.map(p=>`${JSON.stringify(p)}:${j(s[p],!0,!1,l,u)}`).join(",")}}`:`{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as g}from"./chunk-4OALHZXB.js";import{c as u}from"./chunk-LIYVQA3X.js";import{a as h}from"./chunk-4PRVMER6.js";import{a as f}from"./chunk-
|
|
2
|
+
import{a as g}from"./chunk-4OALHZXB.js";import{c as u}from"./chunk-LIYVQA3X.js";import{a as h}from"./chunk-4PRVMER6.js";import{a as f}from"./chunk-RLNOQILG.js";var v={name:"time",async execute(r,s){let a="%e %M",o=null,p=!1,c=!1,t=0;for(;t<r.length;){let e=r[t];if(e==="-f"||e==="--format"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-f'
|
|
3
3
|
`,exitCode:1};a=r[t],t++}else if(e==="-o"||e==="--output"){if(t++,t>=r.length)return{stdout:"",stderr:`time: missing argument to '-o'
|
|
4
4
|
`,exitCode:1};o=r[t],t++}else if(e==="-a"||e==="--append")p=!0,t++;else if(e==="-v"||e==="--verbose")a=`Command being timed: %C
|
|
5
5
|
Elapsed (wall clock) time: %e seconds
|
package/dist/bin/{shell/chunks/flag-coverage-A4G6STMS.js → chunks/flag-coverage-LBMWMYOO.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{b as yr}from"./chunk-WS6P4H4S.js";import{b as Ar}from"./chunk-
|
|
2
|
+
import{b as yr}from"./chunk-WS6P4H4S.js";import{b as Ar}from"./chunk-L2JBII6Z.js";import{b as $r}from"./chunk-B3RU2PUI.js";import"./chunk-GZHFXDDO.js";import"./chunk-QSDVMMYI.js";import{c as Sr}from"./chunk-CM4532DS.js";import{b as wr}from"./chunk-XKPFI566.js";import{b as xr}from"./chunk-ORUYSLP4.js";import{b as vr}from"./chunk-IDGH4PGU.js";import{b as kr}from"./chunk-F3LGZXLQ.js";import{b as qr}from"./chunk-BYDV4VEF.js";import{b as Cr}from"./chunk-JLX6YWGA.js";import{b as br}from"./chunk-FLPVVSN5.js";import{d as Ir,e as Mr,f as jr}from"./chunk-54G6AE72.js";import{b as tr}from"./chunk-DOXYBGNA.js";import{b as lr}from"./chunk-WXMBDX4P.js";import{b as ur}from"./chunk-THALLNXT.js";import{b as pr}from"./chunk-NLBRLRWD.js";import{b as er}from"./chunk-3Y32LPNT.js";import{b as dr}from"./chunk-7BORMNPQ.js";import{b as cr}from"./chunk-N43DJTSI.js";import"./chunk-OBI37ZY4.js";import{b as hr}from"./chunk-N5OTVT4F.js";import{c as or,d as ar}from"./chunk-MAVV76T4.js";import{b as sr}from"./chunk-JTF74J6E.js";import{c as ir,d as gr}from"./chunk-GO6FXSC4.js";import{b as mr}from"./chunk-VHUYNUT7.js";import"./chunk-ZO5PSLKR.js";import{b as Fr}from"./chunk-GOJZHH3L.js";import{b as zr}from"./chunk-P6GNZPVW.js";import{b as fr}from"./chunk-LOJMXC4F.js";import{b as nr}from"./chunk-AXWFPG37.js";import"./chunk-YTIURC67.js";import{b as R}from"./chunk-PQNTKMH3.js";import{b as U}from"./chunk-PPBQJBC2.js";import{b as V}from"./chunk-NSUMEERA.js";import{b as W}from"./chunk-XY5HGZW5.js";import{c as X,d as Y}from"./chunk-AAW7UMPO.js";import{c as Z,d as _}from"./chunk-3MBAUIBB.js";import{b as N}from"./chunk-RT7TRQVZ.js";import{b as rr}from"./chunk-CQG2HEAL.js";import{b as G}from"./chunk-RJSAGJQJ.js";import{b as H}from"./chunk-YEKSVVRC.js";import{b as J}from"./chunk-26NO42TF.js";import{b as K}from"./chunk-LGJM5YFT.js";import{b as L}from"./chunk-LMK6G2HH.js";import{b as O}from"./chunk-ZKC5HQYO.js";import{b as P}from"./chunk-ROJPSS6N.js";import{b as Q}from"./chunk-THNL3XFF.js";import{b as y}from"./chunk-CGE2EHYP.js";import{b as A}from"./chunk-ZA4HUKJ3.js";import{b as $}from"./chunk-WWZVR5NN.js";import{b as S}from"./chunk-JQBC3FXE.js";import{b as T}from"./chunk-NAX7MTAR.js";import{b as B}from"./chunk-5G2VOPPJ.js";import{b as D}from"./chunk-SGA7Y45Z.js";import{b as E}from"./chunk-EUXCM6C4.js";import{b as w}from"./chunk-YLE2OYY6.js";import{b as x}from"./chunk-S7OHMN3F.js";import{b as v}from"./chunk-YWZOGBFE.js";import"./chunk-YMMJLYIX.js";import{d as k,e as q,f as C}from"./chunk-YFPDB4PH.js";import"./chunk-SXB55JOI.js";import{b}from"./chunk-HJEHIH4P.js";import"./chunk-V7ZOPVQS.js";import"./chunk-4OALHZXB.js";import"./chunk-G43H2WGH.js";import{b as I}from"./chunk-RMQC3GS7.js";import{b as M}from"./chunk-SDLWFYVT.js";import{b as j}from"./chunk-FA2CHD73.js";import{b as t}from"./chunk-EPPBDXOG.js";import{b as l}from"./chunk-PS4LOXE5.js";import{b as u}from"./chunk-VNER2XXL.js";import{b as p}from"./chunk-AZ3RUDR2.js";import{b as e}from"./chunk-7ADG3DNO.js";import{b as d}from"./chunk-TEFXEYX3.js";import{b as c}from"./chunk-ZSVBYEY4.js";import{b as h}from"./chunk-SXRVLCZ4.js";import"./chunk-FSZWFMB4.js";import"./chunk-LIYVQA3X.js";import"./chunk-OOJCYVYF.js";import"./chunk-4PRVMER6.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-SE4C7FJY.js";import{b as i}from"./chunk-LJKIWB5F.js";import{b as g}from"./chunk-MRP4ZCD7.js";import"./chunk-5WFYIUU2.js";import{b as m}from"./chunk-ND23BJUM.js";import"./chunk-D5WP4CKS.js";import"./chunk-6KZRLMG3.js";import{b as F}from"./chunk-MXVNCVD6.js";import"./chunk-OBH7XN5N.js";import{b as z}from"./chunk-7G3MC56B.js";import"./chunk-RLNOQILG.js";import{b as f}from"./chunk-EJQKHROT.js";import"./chunk-JBABAK44.js";import{b as n}from"./chunk-ITA43A73.js";import"./chunk-4VDEBYW7.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";var Er=[i,g,m,F,z,f,n,t,l,u,p,e,d,c,h,w,x,v,k,q,C,b,I,M,j,y,A,$,S,T,B,D,E,G,H,J,K,L,O,P,Q,R,U,V,W,X,Y,Z,_,N,rr,or,ar,sr,ir,gr,mr,Fr,zr,fr,nr,tr,lr,ur,pr,er,dr,cr,hr,wr,xr,vr,kr,qr,Cr,br,Ir,Mr,jr,yr,Ar,$r,Sr];function Tr(){return Er}var Br=new Map;for(let r of Tr())Br.set(r.name,new Set(r.flags.map(o=>o.flag)));function Fa(r,o,Dr){let a=Br.get(o);if(!(!a||a.size===0))for(let s of Dr)a.has(s)&&r.hit(`cmd:flag:${o}:${s}`)}export{Fa as emitFlagCoverage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-VHUYNUT7.js";import"./chunk-ZO5PSLKR.js";import"./chunk-V7ZOPVQS.js";import"./chunk-4PRVMER6.js";import"./chunk-MO4RPBN2.js";import"./chunk-YU6OGPZR.js";import"./chunk-SE4C7FJY.js";import"./chunk-5WFYIUU2.js";import"./chunk-6KZRLMG3.js";import"./chunk-OBH7XN5N.js";import"./chunk-RLNOQILG.js";import"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";export{b as flagsForFuzzing,a as jqCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as F,b as
|
|
2
|
+
import{a as F,b as P}from"./chunk-MNMRGJJM.js";import"./chunk-4OALHZXB.js";import"./chunk-MY5PY2PL.js";import"./chunk-LIYVQA3X.js";import{a as v,b as T}from"./chunk-OOJCYVYF.js";import{a as M}from"./chunk-4PRVMER6.js";import{b as B}from"./chunk-YU6OGPZR.js";import{a as O,b as S}from"./chunk-RLNOQILG.js";import{a as E}from"./chunk-4VDEBYW7.js";import{b as L}from"./chunk-GTNBSMZR.js";import"./chunk-KGOUQS5A.js";import{AsyncLocalStorage as N}from"node:async_hooks";import{randomBytes as q}from"node:crypto";import{fileURLToPath as D}from"node:url";import{Worker as z}from"node:worker_threads";var _=1e4,I=6e4,W=new N,J=`js-exec - Sandboxed JavaScript/TypeScript runtime with Node.js-compatible APIs
|
|
3
3
|
|
|
4
4
|
Usage: js-exec [OPTIONS] [-c CODE | FILE] [ARGS...]
|
|
5
5
|
|
|
@@ -84,14 +84,14 @@ Limits:
|
|
|
84
84
|
Memory: 64 MB per execution
|
|
85
85
|
Timeout: 10 s (60 s with network; configurable via maxJsTimeoutMs)
|
|
86
86
|
Engine: QuickJS (compiled to WebAssembly)
|
|
87
|
-
`;function
|
|
87
|
+
`;function $(t){let e={code:null,scriptFile:null,showVersion:!1,scriptArgs:[],isModule:!1,stripTypes:!1};if(t.length===0)return e;for(let r=0;r<t.length;r++){let s=t[r];if(s==="-m"||s==="--module"){e.isModule=!0;continue}if(s==="--strip-types"){e.stripTypes=!0;continue}if(s==="-c")return r+1>=t.length?{stdout:"",stderr:`js-exec: option requires an argument -- 'c'
|
|
88
88
|
`,exitCode:2}:(e.code=t[r+1],e.scriptArgs=t.slice(r+2),e);if(s==="--version"||s==="-V")return e.showVersion=!0,e;if(s.startsWith("-")&&s!=="-"&&s!=="--")return{stdout:"",stderr:`js-exec: unrecognized option '${s}'
|
|
89
|
-
`,exitCode:2};if(s==="--")return r+1<t.length&&(e.scriptFile=t[r+1],e.scriptArgs=t.slice(r+2)),e;if(!s.startsWith("-"))return e.scriptFile=s,e.scriptArgs=t.slice(r+1),e}return e}var i=null,
|
|
90
|
-
`,exitCode:1}:
|
|
91
|
-
`,exitCode:
|
|
92
|
-
`,stderr:"",exitCode:0};let s,n;if(r.code!==null)s=r.code,n="-c";else if(r.scriptFile!==null){let
|
|
93
|
-
`,exitCode:2};try{s=await e.fs.readFile(
|
|
89
|
+
`,exitCode:2};if(s==="--")return r+1<t.length&&(e.scriptFile=t[r+1],e.scriptArgs=t.slice(r+2)),e;if(!s.startsWith("-"))return e.scriptFile=s,e.scriptArgs=t.slice(r+1),e}return e}var i=null,j=null,l=[],o=null,V=D(new URL("./worker.js",import.meta.url));function h(){for(;l.length>0&&l[0].canceled;)l.shift();if(o||l.length===0)return;let t=l.shift();if(!t)return;o=t,G().postMessage(o.input)}function Q(t,e){if(!t||typeof t!="object")return{success:!1,error:"Malformed worker response"};let r=t;return typeof r.protocolToken!="string"||r.protocolToken!==e?{success:!1,error:"Malformed worker response: invalid protocol token"}:typeof r.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:r.success?{success:!0}:{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}function G(){if(j&&(T(j),j=null),i)return i;let t=B.runTrusted(()=>new z(V));return i=t,t.on("message",e=>{if(i===t){if(o){let r=Q(e,o.input.protocolToken);o.resolve(r),o=null}l.length>0?h():K()}}),t.on("error",e=>{if(i===t){if(o){let r=S(E(e));o.resolve({success:!1,error:r}),o=null}for(let r of l)r.resolve({success:!1,error:"Worker crashed"});l.length=0,i=null}}),t.on("exit",()=>{i===t&&(i=null,o&&(o.resolve({success:!1,error:"Worker exited unexpectedly"}),o=null),l.length>0&&h())}),t}function K(){j=v(()=>{i&&!o&&l.length===0&&(i.terminate(),i=null)},5e3)}async function X(t,e,r,s=[],n,u,a){return W.getStore()?{stdout:"",stderr:`js-exec: recursive invocation is not supported
|
|
90
|
+
`,exitCode:1}:Y(t,e,r,s,n,u,a)}async function Y(t,e,r,s=[],n,u,a){let y=F(),p=e.exec,x=p?(d,R)=>W.run(!0,()=>p(d,R)):void 0,b=new P(y,e.fs,e.cwd,"js-exec",e.fetch,e.limits?.maxOutputSize??0,x,e.executorInvokeTool),m=e.limits?.maxJsTimeoutMs??_,w=e.fetch?Math.max(m,I):m,c={protocolToken:q(16).toString("hex"),sharedBuffer:y,jsCode:t,cwd:e.cwd,env:M(e.env),args:s,scriptPath:r,bootstrapCode:n,isModule:u,stripTypes:a,timeoutMs:w,hasExecutorTools:e.executorInvokeTool!==void 0},A,U=new Promise(d=>{A=d}),g={input:c,resolve:()=>{}},H=v(()=>{if(o===g){let d=i;d&&(i=null,d.terminate()),o=null,h()}else g.canceled=!0,o||h();g.resolve({success:!1,error:`Execution timeout: exceeded ${w}ms limit`})},w);g.resolve=d=>{T(H),A(d)},l.push(g),h();let[k,C]=await Promise.all([b.run(w),U.catch(d=>({success:!1,error:S(E(d))}))]);return!C.success&&C.error?{stdout:k.stdout,stderr:`${k.stderr}js-exec: ${S(C.error)}
|
|
91
|
+
`,exitCode:k.exitCode||1}:k}async function de(t,e,r){if(W.getStore())return{result:null,error:"js-exec: recursive invocation is not supported"};let s=F(),n=new P(s,e.fs,e.cwd,"js-exec",e.fetch,e.limits?.maxOutputSize??0,void 0,r),u=e.limits?.maxJsTimeoutMs??_,a=e.fetch?Math.max(u,I):u,p={protocolToken:q(16).toString("hex"),sharedBuffer:s,jsCode:t,cwd:e.cwd,env:M(e.env),args:[],executorMode:!0,timeoutMs:a},x,b=new Promise(c=>{x=c}),m={input:p,resolve:()=>{}},w=v(()=>{if(o===m){let c=i;c&&(i=null,c.terminate()),o=null,h()}else m.canceled=!0,o||h();m.resolve({success:!1,error:`Execution timeout: exceeded ${a}ms limit`})},a);m.resolve=c=>{T(w),x(c)},l.push(m),h();let[,f]=await Promise.all([n.run(a),b.catch(c=>({success:!1,error:S(E(c))}))]);if("executorResult"in f&&f.executorResult!==void 0){let c;try{c=JSON.parse(f.executorResult)}catch{c=f.executorResult}return{result:c,logs:f.executorLogs}}return{result:null,error:f.error||"Unknown execution error",logs:"executorLogs"in f?f.executorLogs:void 0}}var fe={name:"js-exec",async execute(t,e){if(L(t))return{stdout:J,stderr:"",exitCode:0};let r=$(t);if("exitCode"in r)return r;if(r.showVersion)return{stdout:`QuickJS (quickjs-emscripten)
|
|
92
|
+
`,stderr:"",exitCode:0};let s,n;if(r.code!==null)s=r.code,n="-c";else if(r.scriptFile!==null){let p=e.fs.resolvePath(e.cwd,r.scriptFile);if(!await e.fs.exists(p))return{stdout:"",stderr:`js-exec: can't open file '${r.scriptFile}': No such file or directory
|
|
93
|
+
`,exitCode:2};try{s=await e.fs.readFile(p),n=p}catch(x){return{stdout:"",stderr:`js-exec: can't open file '${r.scriptFile}': ${O(x.message)}
|
|
94
94
|
`,exitCode:2}}}else if(e.stdin.trim())s=e.stdin,n="<stdin>";else return{stdout:"",stderr:`js-exec: no input provided (use -c CODE or provide a script file)
|
|
95
|
-
`,exitCode:2};let u=r.isModule,a=r.stripTypes;n&&n!=="-c"&&n!=="<stdin>"&&((n.endsWith(".mjs")||n.endsWith(".mts")||n.endsWith(".ts"))&&(u=!0),(n.endsWith(".ts")||n.endsWith(".mts"))&&(a=!0)),!u&&/\bawait\s+[\w([`]/.test(s)&&(u=!0);let
|
|
95
|
+
`,exitCode:2};let u=r.isModule,a=r.stripTypes;n&&n!=="-c"&&n!=="<stdin>"&&((n.endsWith(".mjs")||n.endsWith(".mts")||n.endsWith(".ts"))&&(u=!0),(n.endsWith(".ts")||n.endsWith(".mts"))&&(a=!0)),!u&&/\bawait\s+[\w([`]/.test(s)&&(u=!0);let y=e.jsBootstrapCode;return X(s,e,n,r.scriptArgs,y,u,a)}},pe={name:"node",async execute(){return{stdout:"",stderr:`node: this sandbox uses js-exec instead of node
|
|
96
96
|
|
|
97
|
-
${
|
|
97
|
+
${J}`,exitCode:1}}};export{de as executeForExecutor,fe as jsExecCommand,pe as nodeStubCommand};
|