@jerryan/just-bash 3.6.1 → 3.7.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/CHANGELOG.md +15 -0
- package/dist/bin/chunks/chmod-G2BCCQGF.js +3 -0
- package/dist/bin/chunks/{chunk-B2GCIQI2.js → chunk-2UKTHDUM.js} +1 -1
- package/dist/bin/chunks/chunk-66UHJFN6.js +11 -0
- package/dist/bin/{shell/chunks/chunk-67XYNGRV.js → chunks/chunk-6O4Z6BQT.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-M7SIPZZZ.js → chunks/chunk-7KMOGI3N.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-6ESRNSO7.js → chunks/chunk-ADI36B7X.js} +1 -1
- package/dist/bin/chunks/chunk-CN4JKMTR.js +8 -0
- package/dist/bin/{shell/chunks/chunk-DZAFUADN.js → chunks/chunk-E26NQEH2.js} +1 -1
- package/dist/bin/chunks/chunk-E54Z6VIE.js +12 -0
- package/dist/bin/chunks/chunk-F2PYTUMR.js +9 -0
- package/dist/bin/chunks/chunk-FO7XJH3J.js +13 -0
- package/dist/bin/chunks/chunk-HWK7KFGB.js +3 -0
- package/dist/bin/chunks/{chunk-LE2XKKGQ.js → chunk-HYLF56CC.js} +1 -1
- package/dist/bin/chunks/chunk-KNTDFP7X.js +12 -0
- package/dist/bin/chunks/chunk-NBTZL3VS.js +3 -0
- package/dist/bin/chunks/chunk-OHFB3M3X.js +3 -0
- package/dist/bin/{shell/chunks/chunk-HQ63MFHG.js → chunks/chunk-PEUGMGJJ.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-JELR4642.js → chunks/chunk-R76AK3KD.js} +12 -12
- package/dist/bin/chunks/{chunk-YCOJCFGU.js → chunk-RRECHBUS.js} +1 -1
- package/dist/bin/chunks/{chunk-ZMGLTHSU.js → chunk-THFQI5LV.js} +1 -1
- package/dist/bin/chunks/{chunk-CL7IYCGG.js → chunk-U7YR5CDD.js} +1 -1
- package/dist/bin/chunks/cp-TMDR6USI.js +3 -0
- package/dist/bin/chunks/du-UKFUX7KM.js +3 -0
- package/dist/bin/chunks/find-W2RZWTOF.js +3 -0
- package/dist/bin/chunks/{flag-coverage-FYJ2V7J4.js → flag-coverage-QJ5ZQKCF.js} +1 -1
- package/dist/bin/{shell/chunks/grep-CVU5V66H.js → chunks/grep-IHDO3L72.js} +1 -1
- package/dist/bin/chunks/gzip-WUK63QLL.js +3 -0
- package/dist/bin/{shell/chunks/js-exec-5QZZCOR7.js → chunks/js-exec-BE37X4L2.js} +1 -1
- package/dist/bin/chunks/js-exec-worker.js +157 -99
- package/dist/bin/chunks/ln-XVC53673.js +3 -0
- package/dist/bin/chunks/ls-EROTXGTC.js +3 -0
- package/dist/bin/chunks/mkdir-YJ3SOVRP.js +3 -0
- package/dist/bin/chunks/mv-HDNKXPO6.js +3 -0
- package/dist/bin/{shell/chunks/python3-TMFYDQAP.js → chunks/python3-TJ6DCPIA.js} +1 -1
- package/dist/bin/chunks/readlink-ZUIECKQC.js +3 -0
- package/dist/bin/chunks/rg-ODJAYIKX.js +3 -0
- package/dist/bin/chunks/rm-B4LVIG7A.js +3 -0
- package/dist/bin/chunks/rmdir-W5NBOJ7E.js +3 -0
- package/dist/bin/chunks/split-TVJYLTIJ.js +3 -0
- package/dist/bin/chunks/sqlite3-5BGAK7VX.js +3 -0
- package/dist/bin/chunks/worker.js +120 -109
- package/dist/bin/just-bash.js +333 -328
- package/dist/bin/shell/chunks/chmod-G2BCCQGF.js +3 -0
- package/dist/bin/shell/chunks/{chunk-B2GCIQI2.js → chunk-2UKTHDUM.js} +1 -1
- package/dist/bin/shell/chunks/chunk-66UHJFN6.js +11 -0
- package/dist/bin/{chunks/chunk-67XYNGRV.js → shell/chunks/chunk-6O4Z6BQT.js} +1 -1
- package/dist/bin/{chunks/chunk-M7SIPZZZ.js → shell/chunks/chunk-7KMOGI3N.js} +1 -1
- package/dist/bin/{chunks/chunk-6ESRNSO7.js → shell/chunks/chunk-ADI36B7X.js} +1 -1
- package/dist/bin/shell/chunks/chunk-CN4JKMTR.js +8 -0
- package/dist/bin/{chunks/chunk-DZAFUADN.js → shell/chunks/chunk-E26NQEH2.js} +1 -1
- package/dist/bin/shell/chunks/chunk-E54Z6VIE.js +12 -0
- package/dist/bin/shell/chunks/chunk-F2PYTUMR.js +9 -0
- package/dist/bin/shell/chunks/chunk-FO7XJH3J.js +13 -0
- package/dist/bin/shell/chunks/chunk-HWK7KFGB.js +3 -0
- package/dist/bin/shell/chunks/{chunk-LE2XKKGQ.js → chunk-HYLF56CC.js} +1 -1
- package/dist/bin/shell/chunks/chunk-KNTDFP7X.js +12 -0
- package/dist/bin/shell/chunks/chunk-NBTZL3VS.js +3 -0
- package/dist/bin/shell/chunks/chunk-OHFB3M3X.js +3 -0
- package/dist/bin/{chunks/chunk-HQ63MFHG.js → shell/chunks/chunk-PEUGMGJJ.js} +1 -1
- package/dist/bin/{chunks/chunk-JELR4642.js → shell/chunks/chunk-R76AK3KD.js} +12 -12
- package/dist/bin/shell/chunks/{chunk-YCOJCFGU.js → chunk-RRECHBUS.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-ZMGLTHSU.js → chunk-THFQI5LV.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-CL7IYCGG.js → chunk-U7YR5CDD.js} +1 -1
- package/dist/bin/shell/chunks/cp-TMDR6USI.js +3 -0
- package/dist/bin/shell/chunks/du-UKFUX7KM.js +3 -0
- package/dist/bin/shell/chunks/find-W2RZWTOF.js +3 -0
- package/dist/bin/shell/chunks/{flag-coverage-FYJ2V7J4.js → flag-coverage-QJ5ZQKCF.js} +1 -1
- package/dist/bin/{chunks/grep-CVU5V66H.js → shell/chunks/grep-IHDO3L72.js} +1 -1
- package/dist/bin/shell/chunks/gzip-WUK63QLL.js +3 -0
- package/dist/bin/{chunks/js-exec-5QZZCOR7.js → shell/chunks/js-exec-BE37X4L2.js} +1 -1
- package/dist/bin/shell/chunks/ln-XVC53673.js +3 -0
- package/dist/bin/shell/chunks/ls-EROTXGTC.js +3 -0
- package/dist/bin/shell/chunks/mkdir-YJ3SOVRP.js +3 -0
- package/dist/bin/shell/chunks/mv-HDNKXPO6.js +3 -0
- package/dist/bin/{chunks/python3-TMFYDQAP.js → shell/chunks/python3-TJ6DCPIA.js} +1 -1
- package/dist/bin/shell/chunks/readlink-ZUIECKQC.js +3 -0
- package/dist/bin/shell/chunks/rg-ODJAYIKX.js +3 -0
- package/dist/bin/shell/chunks/rm-B4LVIG7A.js +3 -0
- package/dist/bin/shell/chunks/rmdir-W5NBOJ7E.js +3 -0
- package/dist/bin/shell/chunks/split-TVJYLTIJ.js +3 -0
- package/dist/bin/shell/chunks/sqlite3-5BGAK7VX.js +3 -0
- package/dist/bin/shell/shell.js +385 -380
- package/dist/bundle/browser.js +643 -638
- package/dist/bundle/chunks/chmod-XZNKTJHL.js +2 -0
- package/dist/bundle/chunks/{chunk-XVSR5HHH.js → chunk-2T7PBFL4.js} +1 -1
- package/dist/bundle/chunks/chunk-3BMWRGU2.js +10 -0
- package/dist/bundle/chunks/chunk-3CIDHL5V.js +11 -0
- package/dist/bundle/chunks/chunk-4CC3OZPU.js +2 -0
- package/dist/bundle/chunks/{chunk-FIMF2TLE.js → chunk-5DMO6LFU.js} +12 -12
- package/dist/bundle/chunks/chunk-A257L6QO.js +7 -0
- package/dist/bundle/chunks/{chunk-6DDRR56B.js → chunk-ACVD6PQF.js} +1 -1
- package/dist/bundle/chunks/chunk-BS6EJR2R.js +11 -0
- package/dist/bundle/chunks/chunk-D5FHVW27.js +2 -0
- package/dist/bundle/chunks/{chunk-KEMO3CBM.js → chunk-E3ABCXE4.js} +1 -1
- package/dist/bundle/chunks/{chunk-FSJ6TTCC.js → chunk-HMM3NGUJ.js} +1 -1
- package/dist/bundle/chunks/chunk-IYJLVOVE.js +12 -0
- package/dist/bundle/chunks/chunk-LRFR25IP.js +8 -0
- package/dist/bundle/chunks/{chunk-NBNI7G66.js → chunk-OPYVVD5P.js} +1 -1
- package/dist/bundle/chunks/{chunk-F6XU52K3.js → chunk-OR544SGH.js} +1 -1
- package/dist/bundle/chunks/{chunk-RPKJJFGZ.js → chunk-PMBXJ3OQ.js} +1 -1
- package/dist/bundle/chunks/{chunk-UC76ZOWM.js → chunk-SBOTR4JQ.js} +1 -1
- package/dist/bundle/chunks/chunk-T5ZEIOJ3.js +2 -0
- package/dist/bundle/chunks/{chunk-DAKEIWT3.js → chunk-YNYC232D.js} +1 -1
- package/dist/bundle/chunks/{chunk-ZXFELXJH.js → chunk-YUOBBH7P.js} +1 -1
- package/dist/bundle/chunks/cp-NWITRTH3.js +2 -0
- package/dist/bundle/chunks/du-IFLWEM6M.js +2 -0
- package/dist/bundle/chunks/find-EW6OHRPJ.js +2 -0
- package/dist/bundle/chunks/{flag-coverage-XSPWRCVG.js → flag-coverage-PIF5QRO7.js} +1 -1
- package/dist/bundle/chunks/{grep-4AYF3A5J.js → grep-QDFNKAUW.js} +1 -1
- package/dist/bundle/chunks/gzip-HBDKZBIP.js +2 -0
- package/dist/bundle/chunks/{js-exec-57QMXJG5.js → js-exec-IREGAOMH.js} +1 -1
- package/dist/bundle/chunks/js-exec-worker.js +157 -99
- package/dist/bundle/chunks/ln-CEM7GDB5.js +2 -0
- package/dist/bundle/chunks/ls-WJ7EIFVM.js +2 -0
- package/dist/bundle/chunks/mkdir-Z6MMWH3D.js +2 -0
- package/dist/bundle/chunks/mv-E2NFLGRQ.js +2 -0
- package/dist/bundle/chunks/{python3-NNONJINM.js → python3-W4UMQJAQ.js} +1 -1
- package/dist/bundle/chunks/readlink-XCFO7YD2.js +2 -0
- package/dist/bundle/chunks/rg-J7XDRV3B.js +2 -0
- package/dist/bundle/chunks/rm-IGPLE632.js +2 -0
- package/dist/bundle/chunks/rmdir-UMUDM2L2.js +2 -0
- package/dist/bundle/chunks/split-D4HPO4G5.js +2 -0
- package/dist/bundle/chunks/sqlite3-3HL2ECCQ.js +2 -0
- package/dist/bundle/chunks/worker.js +120 -109
- package/dist/bundle/index.cjs +975 -970
- package/dist/bundle/index.js +346 -341
- package/dist/commands/worker-bridge/bridge-handler.d.ts +0 -3
- package/dist/commands/worker-bridge/protocol.d.ts +57 -23
- package/dist/fs/fs-error.d.ts +43 -0
- package/dist/fs/interface.d.ts +13 -0
- package/dist/fs/mountable-fs/mountable-fs.d.ts +20 -0
- package/dist/fs/overlay-fs/apply.d.ts +2 -1
- package/dist/fs/overlay-fs/index.d.ts +0 -1
- package/dist/fs/overlay-fs/overlay-fs.d.ts +14 -0
- package/dist/fs/path-utils.d.ts +5 -0
- package/dist/fs/vfs-template.d.ts +38 -15
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/interpreter/builtin-dispatch.d.ts +10 -0
- package/dist/interpreter/builtin-manifest.d.ts +273 -0
- package/dist/interpreter/builtins/help.d.ts +6 -0
- package/dist/interpreter/builtins/shopt.d.ts +3 -0
- package/dist/interpreter/helpers/shell-constants.d.ts +0 -20
- package/package.json +1 -1
- package/dist/bin/chunks/chmod-WYYTXGVB.js +0 -3
- package/dist/bin/chunks/chunk-43E7AR6A.js +0 -3
- package/dist/bin/chunks/chunk-AI7JUA46.js +0 -13
- package/dist/bin/chunks/chunk-GQKQEK5N.js +0 -11
- package/dist/bin/chunks/chunk-JHEAT7AR.js +0 -12
- package/dist/bin/chunks/chunk-OLEQNRKX.js +0 -8
- package/dist/bin/chunks/chunk-SE7JHGP3.js +0 -9
- package/dist/bin/chunks/chunk-WEHA3JFD.js +0 -3
- package/dist/bin/chunks/chunk-YQEKKZTU.js +0 -12
- package/dist/bin/chunks/cp-OMVKM35F.js +0 -3
- package/dist/bin/chunks/du-LUFPVLNW.js +0 -3
- package/dist/bin/chunks/find-AWH2KOY7.js +0 -3
- package/dist/bin/chunks/gzip-FDPA6EKG.js +0 -3
- package/dist/bin/chunks/ln-B35EKC2Q.js +0 -3
- package/dist/bin/chunks/ls-Q6ZZ6SQ2.js +0 -3
- package/dist/bin/chunks/mkdir-74BP5NTG.js +0 -3
- package/dist/bin/chunks/mv-76LAHXFR.js +0 -3
- package/dist/bin/chunks/readlink-EHXJNW62.js +0 -3
- package/dist/bin/chunks/rg-PXNKNIMY.js +0 -3
- package/dist/bin/chunks/rm-NLG5344W.js +0 -3
- package/dist/bin/chunks/rmdir-7ZIVFZJX.js +0 -3
- package/dist/bin/chunks/split-ZNNNHKSP.js +0 -3
- package/dist/bin/chunks/sqlite3-3EUPHVEZ.js +0 -3
- package/dist/bin/shell/chunks/chmod-WYYTXGVB.js +0 -3
- package/dist/bin/shell/chunks/chunk-43E7AR6A.js +0 -3
- package/dist/bin/shell/chunks/chunk-AI7JUA46.js +0 -13
- package/dist/bin/shell/chunks/chunk-GQKQEK5N.js +0 -11
- package/dist/bin/shell/chunks/chunk-JHEAT7AR.js +0 -12
- package/dist/bin/shell/chunks/chunk-OLEQNRKX.js +0 -8
- package/dist/bin/shell/chunks/chunk-SE7JHGP3.js +0 -9
- package/dist/bin/shell/chunks/chunk-WEHA3JFD.js +0 -3
- package/dist/bin/shell/chunks/chunk-YQEKKZTU.js +0 -12
- package/dist/bin/shell/chunks/cp-OMVKM35F.js +0 -3
- package/dist/bin/shell/chunks/du-LUFPVLNW.js +0 -3
- package/dist/bin/shell/chunks/find-AWH2KOY7.js +0 -3
- package/dist/bin/shell/chunks/gzip-FDPA6EKG.js +0 -3
- package/dist/bin/shell/chunks/ln-B35EKC2Q.js +0 -3
- package/dist/bin/shell/chunks/ls-Q6ZZ6SQ2.js +0 -3
- package/dist/bin/shell/chunks/mkdir-74BP5NTG.js +0 -3
- package/dist/bin/shell/chunks/mv-76LAHXFR.js +0 -3
- package/dist/bin/shell/chunks/readlink-EHXJNW62.js +0 -3
- package/dist/bin/shell/chunks/rg-PXNKNIMY.js +0 -3
- package/dist/bin/shell/chunks/rm-NLG5344W.js +0 -3
- package/dist/bin/shell/chunks/rmdir-7ZIVFZJX.js +0 -3
- package/dist/bin/shell/chunks/split-ZNNNHKSP.js +0 -3
- package/dist/bin/shell/chunks/sqlite3-3EUPHVEZ.js +0 -3
- package/dist/bundle/chunks/chmod-WM2JFFQC.js +0 -2
- package/dist/bundle/chunks/chunk-7IJWBG4I.js +0 -2
- package/dist/bundle/chunks/chunk-G3IRZ4FN.js +0 -8
- package/dist/bundle/chunks/chunk-MLIO3BK2.js +0 -7
- package/dist/bundle/chunks/chunk-TBVD66LC.js +0 -10
- package/dist/bundle/chunks/chunk-ULXGGWAD.js +0 -11
- package/dist/bundle/chunks/chunk-W2Z6LYL6.js +0 -11
- package/dist/bundle/chunks/chunk-WN54B5NQ.js +0 -12
- package/dist/bundle/chunks/chunk-YUSFCOM7.js +0 -2
- package/dist/bundle/chunks/cp-2KZIPZJS.js +0 -2
- package/dist/bundle/chunks/du-7AZCLKR6.js +0 -2
- package/dist/bundle/chunks/find-END3EAHV.js +0 -2
- package/dist/bundle/chunks/gzip-RQOBR22H.js +0 -2
- package/dist/bundle/chunks/ln-OPY2ZVGQ.js +0 -2
- package/dist/bundle/chunks/ls-ZPXGZX63.js +0 -2
- package/dist/bundle/chunks/mkdir-WDDKK2P3.js +0 -2
- package/dist/bundle/chunks/mv-ZF6UBVRB.js +0 -2
- package/dist/bundle/chunks/readlink-U5OM5A3M.js +0 -2
- package/dist/bundle/chunks/rg-NAMXBYKS.js +0 -2
- package/dist/bundle/chunks/rm-R2ZENNSN.js +0 -2
- package/dist/bundle/chunks/rmdir-YJKPQVCK.js +0 -2
- package/dist/bundle/chunks/split-JICLAMP6.js +0 -2
- package/dist/bundle/chunks/sqlite3-M4UZPXDO.js +0 -2
- package/dist/fs/overlay-fs/merge.d.ts +0 -24
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single source of truth for shell builtins: every name `type` and
|
|
3
|
+
* `command -v` display as a builtin, classified as:
|
|
4
|
+
*
|
|
5
|
+
* - `handler`: executed by dispatchBuiltin (phase "early" handlers run
|
|
6
|
+
* before user-defined functions — special builtins functions cannot
|
|
7
|
+
* override; phase "late" handlers run after).
|
|
8
|
+
* - `registry`: executed as a registry command (echo, printf, ...) —
|
|
9
|
+
* displayed as builtins for bash parity, resolved externally.
|
|
10
|
+
* - `unimplemented`: displayed as builtins (bash implements them) but
|
|
11
|
+
* just-bash has no implementation; at runtime they fall through to
|
|
12
|
+
* external resolution and fail with exit 127. Static analysis
|
|
13
|
+
* (Bash.analyzeCommands) subtracts these structurally.
|
|
14
|
+
*
|
|
15
|
+
* This module is a LEAF: it imports nothing, so every consumer
|
|
16
|
+
* (dispatch, compgen, type, analysis) can import it without cycles.
|
|
17
|
+
* The handler functions live in builtin-dispatch.ts, keyed by a mapped
|
|
18
|
+
* type derived from this manifest — a manifest `handler` entry without
|
|
19
|
+
* a handler function (or vice versa) is a COMPILE ERROR, which makes
|
|
20
|
+
* the old display-set/dispatch dual truth unrepresentable.
|
|
21
|
+
*/
|
|
22
|
+
/** Discriminated union: a handler entry MUST carry its dispatch phase —
|
|
23
|
+
* an optional `phase?` would let a phaseless handler compile and fall
|
|
24
|
+
* silently through to external resolution (exit 127). */
|
|
25
|
+
export type BuiltinManifestEntry = {
|
|
26
|
+
kind: "handler";
|
|
27
|
+
phase: "early" | "late";
|
|
28
|
+
/** Bash special case: dispatch EARLY in POSIX mode even though
|
|
29
|
+
* functions may override in normal mode (eval). */
|
|
30
|
+
posixEarly?: boolean;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "registry";
|
|
33
|
+
} | {
|
|
34
|
+
kind: "unimplemented";
|
|
35
|
+
};
|
|
36
|
+
declare const manifest: {
|
|
37
|
+
readonly export: {
|
|
38
|
+
readonly kind: "handler";
|
|
39
|
+
readonly phase: "early";
|
|
40
|
+
};
|
|
41
|
+
readonly unset: {
|
|
42
|
+
readonly kind: "handler";
|
|
43
|
+
readonly phase: "early";
|
|
44
|
+
};
|
|
45
|
+
readonly exit: {
|
|
46
|
+
readonly kind: "handler";
|
|
47
|
+
readonly phase: "early";
|
|
48
|
+
};
|
|
49
|
+
readonly local: {
|
|
50
|
+
readonly kind: "handler";
|
|
51
|
+
readonly phase: "early";
|
|
52
|
+
};
|
|
53
|
+
readonly set: {
|
|
54
|
+
readonly kind: "handler";
|
|
55
|
+
readonly phase: "early";
|
|
56
|
+
};
|
|
57
|
+
readonly break: {
|
|
58
|
+
readonly kind: "handler";
|
|
59
|
+
readonly phase: "early";
|
|
60
|
+
};
|
|
61
|
+
readonly continue: {
|
|
62
|
+
readonly kind: "handler";
|
|
63
|
+
readonly phase: "early";
|
|
64
|
+
};
|
|
65
|
+
readonly return: {
|
|
66
|
+
readonly kind: "handler";
|
|
67
|
+
readonly phase: "early";
|
|
68
|
+
};
|
|
69
|
+
readonly shift: {
|
|
70
|
+
readonly kind: "handler";
|
|
71
|
+
readonly phase: "early";
|
|
72
|
+
};
|
|
73
|
+
readonly getopts: {
|
|
74
|
+
readonly kind: "handler";
|
|
75
|
+
readonly phase: "early";
|
|
76
|
+
};
|
|
77
|
+
readonly compgen: {
|
|
78
|
+
readonly kind: "handler";
|
|
79
|
+
readonly phase: "early";
|
|
80
|
+
};
|
|
81
|
+
readonly complete: {
|
|
82
|
+
readonly kind: "handler";
|
|
83
|
+
readonly phase: "early";
|
|
84
|
+
};
|
|
85
|
+
readonly compopt: {
|
|
86
|
+
readonly kind: "handler";
|
|
87
|
+
readonly phase: "early";
|
|
88
|
+
};
|
|
89
|
+
readonly pushd: {
|
|
90
|
+
readonly kind: "handler";
|
|
91
|
+
readonly phase: "early";
|
|
92
|
+
};
|
|
93
|
+
readonly popd: {
|
|
94
|
+
readonly kind: "handler";
|
|
95
|
+
readonly phase: "early";
|
|
96
|
+
};
|
|
97
|
+
readonly dirs: {
|
|
98
|
+
readonly kind: "handler";
|
|
99
|
+
readonly phase: "early";
|
|
100
|
+
};
|
|
101
|
+
readonly source: {
|
|
102
|
+
readonly kind: "handler";
|
|
103
|
+
readonly phase: "early";
|
|
104
|
+
};
|
|
105
|
+
readonly ".": {
|
|
106
|
+
readonly kind: "handler";
|
|
107
|
+
readonly phase: "early";
|
|
108
|
+
};
|
|
109
|
+
readonly read: {
|
|
110
|
+
readonly kind: "handler";
|
|
111
|
+
readonly phase: "early";
|
|
112
|
+
};
|
|
113
|
+
readonly mapfile: {
|
|
114
|
+
readonly kind: "handler";
|
|
115
|
+
readonly phase: "early";
|
|
116
|
+
};
|
|
117
|
+
readonly readarray: {
|
|
118
|
+
readonly kind: "handler";
|
|
119
|
+
readonly phase: "early";
|
|
120
|
+
};
|
|
121
|
+
readonly declare: {
|
|
122
|
+
readonly kind: "handler";
|
|
123
|
+
readonly phase: "early";
|
|
124
|
+
};
|
|
125
|
+
readonly typeset: {
|
|
126
|
+
readonly kind: "handler";
|
|
127
|
+
readonly phase: "early";
|
|
128
|
+
};
|
|
129
|
+
readonly readonly: {
|
|
130
|
+
readonly kind: "handler";
|
|
131
|
+
readonly phase: "early";
|
|
132
|
+
};
|
|
133
|
+
readonly eval: {
|
|
134
|
+
readonly kind: "handler";
|
|
135
|
+
readonly phase: "late";
|
|
136
|
+
readonly posixEarly: true;
|
|
137
|
+
};
|
|
138
|
+
readonly cd: {
|
|
139
|
+
readonly kind: "handler";
|
|
140
|
+
readonly phase: "late";
|
|
141
|
+
};
|
|
142
|
+
readonly ":": {
|
|
143
|
+
readonly kind: "handler";
|
|
144
|
+
readonly phase: "late";
|
|
145
|
+
};
|
|
146
|
+
readonly true: {
|
|
147
|
+
readonly kind: "handler";
|
|
148
|
+
readonly phase: "late";
|
|
149
|
+
};
|
|
150
|
+
readonly false: {
|
|
151
|
+
readonly kind: "handler";
|
|
152
|
+
readonly phase: "late";
|
|
153
|
+
};
|
|
154
|
+
readonly let: {
|
|
155
|
+
readonly kind: "handler";
|
|
156
|
+
readonly phase: "late";
|
|
157
|
+
};
|
|
158
|
+
readonly command: {
|
|
159
|
+
readonly kind: "handler";
|
|
160
|
+
readonly phase: "late";
|
|
161
|
+
};
|
|
162
|
+
readonly builtin: {
|
|
163
|
+
readonly kind: "handler";
|
|
164
|
+
readonly phase: "late";
|
|
165
|
+
};
|
|
166
|
+
readonly shopt: {
|
|
167
|
+
readonly kind: "handler";
|
|
168
|
+
readonly phase: "late";
|
|
169
|
+
};
|
|
170
|
+
readonly exec: {
|
|
171
|
+
readonly kind: "handler";
|
|
172
|
+
readonly phase: "late";
|
|
173
|
+
};
|
|
174
|
+
readonly wait: {
|
|
175
|
+
readonly kind: "handler";
|
|
176
|
+
readonly phase: "late";
|
|
177
|
+
};
|
|
178
|
+
readonly type: {
|
|
179
|
+
readonly kind: "handler";
|
|
180
|
+
readonly phase: "late";
|
|
181
|
+
};
|
|
182
|
+
readonly hash: {
|
|
183
|
+
readonly kind: "handler";
|
|
184
|
+
readonly phase: "late";
|
|
185
|
+
};
|
|
186
|
+
readonly help: {
|
|
187
|
+
readonly kind: "handler";
|
|
188
|
+
readonly phase: "late";
|
|
189
|
+
};
|
|
190
|
+
readonly "[": {
|
|
191
|
+
readonly kind: "handler";
|
|
192
|
+
readonly phase: "late";
|
|
193
|
+
};
|
|
194
|
+
readonly test: {
|
|
195
|
+
readonly kind: "handler";
|
|
196
|
+
readonly phase: "late";
|
|
197
|
+
};
|
|
198
|
+
readonly echo: {
|
|
199
|
+
readonly kind: "registry";
|
|
200
|
+
};
|
|
201
|
+
readonly printf: {
|
|
202
|
+
readonly kind: "registry";
|
|
203
|
+
};
|
|
204
|
+
readonly pwd: {
|
|
205
|
+
readonly kind: "registry";
|
|
206
|
+
};
|
|
207
|
+
readonly alias: {
|
|
208
|
+
readonly kind: "registry";
|
|
209
|
+
};
|
|
210
|
+
readonly unalias: {
|
|
211
|
+
readonly kind: "registry";
|
|
212
|
+
};
|
|
213
|
+
readonly history: {
|
|
214
|
+
readonly kind: "registry";
|
|
215
|
+
};
|
|
216
|
+
readonly bg: {
|
|
217
|
+
readonly kind: "unimplemented";
|
|
218
|
+
};
|
|
219
|
+
readonly caller: {
|
|
220
|
+
readonly kind: "unimplemented";
|
|
221
|
+
};
|
|
222
|
+
readonly disown: {
|
|
223
|
+
readonly kind: "unimplemented";
|
|
224
|
+
};
|
|
225
|
+
readonly enable: {
|
|
226
|
+
readonly kind: "unimplemented";
|
|
227
|
+
};
|
|
228
|
+
readonly fc: {
|
|
229
|
+
readonly kind: "unimplemented";
|
|
230
|
+
};
|
|
231
|
+
readonly fg: {
|
|
232
|
+
readonly kind: "unimplemented";
|
|
233
|
+
};
|
|
234
|
+
readonly jobs: {
|
|
235
|
+
readonly kind: "unimplemented";
|
|
236
|
+
};
|
|
237
|
+
readonly kill: {
|
|
238
|
+
readonly kind: "unimplemented";
|
|
239
|
+
};
|
|
240
|
+
readonly suspend: {
|
|
241
|
+
readonly kind: "unimplemented";
|
|
242
|
+
};
|
|
243
|
+
readonly times: {
|
|
244
|
+
readonly kind: "unimplemented";
|
|
245
|
+
};
|
|
246
|
+
readonly trap: {
|
|
247
|
+
readonly kind: "unimplemented";
|
|
248
|
+
};
|
|
249
|
+
readonly ulimit: {
|
|
250
|
+
readonly kind: "unimplemented";
|
|
251
|
+
};
|
|
252
|
+
readonly umask: {
|
|
253
|
+
readonly kind: "unimplemented";
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
export declare const BUILTIN_MANIFEST: typeof manifest;
|
|
257
|
+
/** Names displayed as shell builtins (type, command -v, coverage). */
|
|
258
|
+
export declare const SHELL_BUILTINS: Set<string>;
|
|
259
|
+
/** Manifest keys whose kind is "handler", as a type (for the dispatch
|
|
260
|
+
* handler map's bidirectional coverage check). */
|
|
261
|
+
export type ManifestHandlerName = {
|
|
262
|
+
[K in keyof typeof BUILTIN_MANIFEST]: (typeof BUILTIN_MANIFEST)[K] extends {
|
|
263
|
+
kind: "handler";
|
|
264
|
+
} ? K : never;
|
|
265
|
+
}[keyof typeof BUILTIN_MANIFEST];
|
|
266
|
+
/** Names with no implementation (analysis subtracts these). */
|
|
267
|
+
export declare const UNIMPLEMENTED_BUILTIN_NAMES: ReadonlySet<string>;
|
|
268
|
+
/** Dispatch order for a handler name (undefined for non-handlers). */
|
|
269
|
+
export declare function builtinPhase(name: string): "early" | "late" | undefined;
|
|
270
|
+
/** True when a handler dispatches early in POSIX mode despite a "late"
|
|
271
|
+
* phase (eval — the only such builtin). */
|
|
272
|
+
export declare function builtinPosixEarly(name: string): boolean;
|
|
273
|
+
export {};
|
|
@@ -9,4 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { ExecResult } from "../../types.js";
|
|
11
11
|
import type { InterpreterContext } from "../types.js";
|
|
12
|
+
/**
|
|
13
|
+
* Builtin help information: [synopsis, description]
|
|
14
|
+
* The synopsis is the short form shown with -s and in the list.
|
|
15
|
+
* The description is the detailed help text.
|
|
16
|
+
*/
|
|
17
|
+
export declare const BUILTIN_HELP: Map<string, [string, string]>;
|
|
12
18
|
export declare function handleHelp(_ctx: InterpreterContext, args: string[]): ExecResult;
|
|
@@ -4,4 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ExecResult } from "../../types.js";
|
|
6
6
|
import type { InterpreterContext } from "../types.js";
|
|
7
|
+
/** Every option name shopt recognizes (implemented ∪ stub) — the
|
|
8
|
+
* completion universe for `compgen -A shopt` / `complete -A shopt`. */
|
|
9
|
+
export declare const ALL_SHOPT_OPTIONS: readonly string[];
|
|
7
10
|
export declare function handleShopt(ctx: InterpreterContext, args: string[]): ExecResult;
|
|
@@ -19,23 +19,3 @@ export declare function isPosixSpecialBuiltin(name: string): boolean;
|
|
|
19
19
|
* Shell keywords (for type, command -v, etc.)
|
|
20
20
|
*/
|
|
21
21
|
export declare const SHELL_KEYWORDS: Set<string>;
|
|
22
|
-
/**
|
|
23
|
-
* Shell builtins (for type, command -v, builtin, etc.)
|
|
24
|
-
*/
|
|
25
|
-
export declare const SHELL_BUILTINS: Set<string>;
|
|
26
|
-
/**
|
|
27
|
-
* Names in the builtin display sets that have NO implementation: dispatch
|
|
28
|
-
* has no handler for them, so at runtime they fall through to external
|
|
29
|
-
* resolution and fail with "command not found" (exit 127). Real bash
|
|
30
|
-
* implements these; just-bash does not (yet).
|
|
31
|
-
*
|
|
32
|
-
* Membership in POSIX_SPECIAL_BUILTINS / SHELL_BUILTINS is about DISPLAY
|
|
33
|
-
* (type, command -v) and POSIX mode behavior — not about resolvability.
|
|
34
|
-
* Static analysis (Bash.analyzeCommands) subtracts this set so its
|
|
35
|
-
* results match dispatch. Keep this honest: the parity test in
|
|
36
|
-
* command-analysis.test.ts runs every display-set name through both
|
|
37
|
-
* runtime dispatch and analysis and fails on any divergence — both when
|
|
38
|
-
* a name here gets implemented (remove it) and when a new unimplemented
|
|
39
|
-
* name joins a display set (add it).
|
|
40
|
-
*/
|
|
41
|
-
export declare const UNIMPLEMENTED_BUILTIN_NAMES: ReadonlySet<string>;
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-67XYNGRV.js";import"./chunk-GR4ZHKXI.js";import"./chunk-HWI42GQO.js";import"./chunk-I57EACSL.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as chmodCommand,b as flagsForFuzzing};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
function o(n){if(!n||n==="/")return"/";let t=n.endsWith("/")&&n!=="/"?n.slice(0,-1):n;t.startsWith("/")||(t=`/${t}`);let r=t.split("/").filter(i=>i&&i!=="."),e=[];for(let i of r)i===".."?e.pop():e.push(i);return`/${e.join("/")}`||"/"}function l(n,t){let r=o(n),e=o(t);return e===r||r==="/"||e.startsWith(`${r}/`)}function u(n,t){if(n.includes("\0"))throw new Error(`ENOENT: path contains null byte, ${t} '${n}'`)}function s(n){let t=o(n);if(t==="/")return"/";let r=t.lastIndexOf("/");return r===0?"/":t.slice(0,r)}function f(n,t){if(t.startsWith("/"))return o(t);let r=n==="/"?`/${t}`:`${n}/${t}`;return o(r)}function c(n,t){return n==="/"?`/${t}`:`${n}/${t}`}function a(n,t){if(t.startsWith("/"))return o(t);let r=s(n);return o(c(r,t))}export{o as a,l as b,u as c,s as d,f as e,c as f,a as g};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{b as P,c as F,d as O,e as T}from"./chunk-WEHA3JFD.js";import{b as S}from"./chunk-43E7AR6A.js";import{l as v,m as w}from"./chunk-FUT3X2GJ.js";import{a as E}from"./chunk-NE4R2FVV.js";import{a as D}from"./chunk-I4IRHQDW.js";import{a as $,b as C}from"./chunk-MUFNRCMY.js";var R={name:"cp",summary:"copy files and directories",usage:"cp [OPTION]... SOURCE... DEST",options:["-r, -R, --recursive copy directories recursively","-n, --no-clobber do not overwrite an existing file","-p, --preserve preserve file attributes","-v, --verbose explain what is being done"," --help display this help and exit"]},H={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},preserve:{short:"p",long:"preserve",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},j={name:"cp",async execute(u,e){if(C(u))return $(R);let s=E("cp",u,H);if(!s.ok)return s.error;let d=s.result.flags.recursive||s.result.flags.recursiveUpper,k=s.result.flags.noClobber,A=s.result.flags.preserve,N=s.result.flags.verbose,p=s.result.positional;if(p.length<2)return{stdout:"",stderr:`cp: missing destination file operand
|
|
4
|
-
`,exitCode:1};let g=p.pop()??"",m=p,l=e.fs.resolvePath(e.cwd,g),y="",n="",i=0,h=new O({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp"}),f=!1;try{f=(await e.fs.stat(l)).isDirectory}catch{}if(m.length>1&&!f)return{stdout:"",stderr:`cp: target '${g}' is not a directory
|
|
5
|
-
`,exitCode:1};for(let t of m)try{let o=e.fs.resolvePath(e.cwd,t),a=await e.fs.stat(o),r=l;if(f){let c=t.split("/").pop()||t;r=l==="/"?`/${c}`:`${l}/${c}`}if(a.isDirectory&&!d){n+=`cp: -r not specified; omitting directory '${t}'
|
|
6
|
-
`,i=1;continue}if(a.isDirectory){let c=await F(e.fs,o,r,h);if(S(o,r)||c==="inside"){n+=`cp: cannot copy '${t}' into itself, '${r}'
|
|
7
|
-
`,i=1;continue}if(c==="unknown"){n+=`cp: cannot safely determine whether '${r}' is inside '${t}'
|
|
8
|
-
`,i=1;continue}}if(k)try{await e.fs.stat(r);continue}catch{}let b=await P(e.fs,o,r);if(b==="same"){n+=`cp: '${t}' and '${r}' are the same file
|
|
9
|
-
`,i=1;continue}if(b==="unknown"){n+=`cp: cannot safely determine whether '${t}' and '${r}' are the same file
|
|
10
|
-
`,i=1;continue}a.isDirectory&&await T({fs:e.fs,root:o,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp",symlinks:"never",budget:h},()=>{}),await e.fs.cp(o,r,{recursive:d}),N&&(y+=`'${t}' -> '${r}'
|
|
11
|
-
`)}catch(o){if(o instanceof v||o instanceof w)throw o;let a=D(o);a.includes("ENOENT")||a.includes("no such file")?n+=`cp: cannot stat '${t}': No such file or directory
|
|
12
|
-
`:n+=`cp: cannot copy '${t}': ${a}
|
|
13
|
-
`,i=1}return{stdout:y,stderr:n,exitCode:i}}},q={name:"cp",flags:[{flag:"-r",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{j as a,q as b};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{b as F,c as N,d as O,e as T}from"./chunk-WEHA3JFD.js";import{b as P}from"./chunk-43E7AR6A.js";import{l as w,m as $}from"./chunk-FUT3X2GJ.js";import{a as S}from"./chunk-NE4R2FVV.js";import{a as D}from"./chunk-I4IRHQDW.js";import{a as C,b as E}from"./chunk-MUFNRCMY.js";var A={name:"mv",summary:"move (rename) files",usage:"mv [OPTION]... SOURCE... DEST",options:["-f, --force do not prompt before overwriting","-n, --no-clobber do not overwrite an existing file","-v, --verbose explain what is being done"," --help display this help and exit"]},H={force:{short:"f",long:"force",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},U={name:"mv",async execute(p,e){if(E(p))return C(A);let r=S("mv",p,H);if(!r.ok)return r.error;let u=r.result.flags.force,v=r.result.flags.noClobber,k=r.result.flags.verbose,d=r.result.positional;if(v&&(u=!1),d.length<2)return{stdout:"",stderr:`mv: missing destination file operand
|
|
4
|
-
`,exitCode:1};let f=d.pop()??"",g=d,c=e.fs.resolvePath(e.cwd,f),h="",i="",l=0,b=new O({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"mv"}),m=!1;try{m=(await e.fs.stat(c)).isDirectory}catch{}if(g.length>1&&!m)return{stdout:"",stderr:`mv: target '${f}' is not a directory
|
|
5
|
-
`,exitCode:1};for(let t of g)try{let o=e.fs.resolvePath(e.cwd,t),a=await e.fs.stat(o),n=c;if(m){let s=t.split("/").pop()||t;n=c==="/"?`/${s}`:`${c}/${s}`}if(a.isDirectory){let s=await N(e.fs,o,n,b);if(P(o,n)||s==="inside"){i+=`mv: cannot move '${t}' into itself, '${n}'
|
|
6
|
-
`,l=1;continue}if(s==="unknown"){i+=`mv: cannot safely determine whether '${n}' is inside '${t}'
|
|
7
|
-
`,l=1;continue}}if(v)try{await e.fs.stat(n);continue}catch{}let y=await F(e.fs,o,n);if(y==="same")continue;if(y==="unknown"){i+=`mv: cannot safely determine whether '${t}' and '${n}' are the same file
|
|
8
|
-
`,l=1;continue}if(a.isDirectory&&await T({fs:e.fs,root:o,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"mv",symlinks:"never",budget:b},()=>{}),await e.fs.mv(o,n),k){let s=m?`${f}/${t.split("/").pop()||t}`:f;h+=`renamed '${t}' -> '${s}'
|
|
9
|
-
`}}catch(o){if(o instanceof w||o instanceof $)throw o;let a=D(o);a.includes("ENOENT")||a.includes("no such file")?i+=`mv: cannot stat '${t}': No such file or directory
|
|
10
|
-
`:i+=`mv: cannot move '${t}': ${a}
|
|
11
|
-
`,l=1}return{stdout:h,stderr:i,exitCode:l}}},j={name:"mv",flags:[{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{U as a,j as b};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as A}from"./chunk-3MRB66F4.js";import{b as f}from"./chunk-O2BCKSMK.js";import{a as O,b as h}from"./chunk-TW2IJRUF.js";import{d as F,e as g}from"./chunk-QKJAAJ7J.js";import{b as m}from"./chunk-HWI42GQO.js";import{a as T,b as w}from"./chunk-PBOVSFTJ.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_FILE_RANGE:17,READ_RESULT_RANGE:18,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300,INVOKE_TOOL:400},a={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,NOT_EMPTY:11},i={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},E={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:8388608,TOTAL:8392736},R={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 x(){return new O(E.TOTAL)}var S=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,i.OP_CODE/4)}setOpCode(t){h.store(this.int32View,i.OP_CODE/4,t)}getStatus(){return h.load(this.int32View,i.STATUS/4)}setStatus(t){h.store(this.int32View,i.STATUS/4,t)}getPathLength(){return h.load(this.int32View,i.PATH_LENGTH/4)}setPathLength(t){h.store(this.int32View,i.PATH_LENGTH/4,t)}getDataLength(){return h.load(this.int32View,i.DATA_LENGTH/4)}setDataLength(t){h.store(this.int32View,i.DATA_LENGTH/4,t)}getResultLength(){return h.load(this.int32View,i.RESULT_LENGTH/4)}setResultLength(t){h.store(this.int32View,i.RESULT_LENGTH/4,t)}getErrorCode(){return h.load(this.int32View,i.ERROR_CODE/4)}setErrorCode(t){h.store(this.int32View,i.ERROR_CODE/4,t)}getFlags(){return h.load(this.int32View,i.FLAGS/4)}setFlags(t){h.store(this.int32View,i.FLAGS/4,t)}getMode(){return h.load(this.int32View,i.MODE/4)}setMode(t){h.store(this.int32View,i.MODE/4,t)}getPath(){let t=this.getPathLength(),e=this.uint8View.slice(i.PATH_BUFFER,i.PATH_BUFFER+t);return new TextDecoder().decode(e)}setPath(t){let e=new TextEncoder().encode(t);if(e.length>E.PATH_BUFFER)throw new Error(`Path too long: ${e.length} > ${E.PATH_BUFFER}`);this.uint8View.set(e,i.PATH_BUFFER),this.setPathLength(e.length)}getData(){let t=this.getDataLength();return this.uint8View.slice(i.DATA_BUFFER,i.DATA_BUFFER+t)}setData(t){if(t.length>E.DATA_BUFFER)throw new Error(`Data too large: ${t.length} > ${E.DATA_BUFFER}`);this.uint8View.set(t,i.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(i.DATA_BUFFER,i.DATA_BUFFER+t)}setResult(t){if(t.length>E.DATA_BUFFER)throw new Error(`Result too large: ${t.length} > ${E.DATA_BUFFER}`);this.uint8View.set(t,i.DATA_BUFFER),this.setResultLength(t.length)}setResultPrefix(t){if(t.length>2147483647)throw new Error(`Result too large: ${t.length} exceeds int32`);let e=Math.min(t.length,E.DATA_BUFFER);this.uint8View.set(t.subarray(0,e),i.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[i.DATA_BUFFER+u.IS_FILE]=t.isFile?1:0,this.uint8View[i.DATA_BUFFER+u.IS_DIRECTORY]=t.isDirectory?1:0,this.uint8View[i.DATA_BUFFER+u.IS_SYMLINK]=t.isSymbolicLink?1:0,this.dataView.setInt32(i.DATA_BUFFER+u.MODE,t.mode,!0);let e=Math.min(t.size,Number.MAX_SAFE_INTEGER);this.dataView.setFloat64(i.DATA_BUFFER+u.SIZE,e,!0),this.dataView.setFloat64(i.DATA_BUFFER+u.MTIME,t.mtime.getTime(),!0),this.setResultLength(u.TOTAL)}decodeStat(){return{isFile:this.uint8View[i.DATA_BUFFER+u.IS_FILE]===1,isDirectory:this.uint8View[i.DATA_BUFFER+u.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[i.DATA_BUFFER+u.IS_SYMLINK]===1,mode:this.dataView.getInt32(i.DATA_BUFFER+u.MODE,!0),size:this.dataView.getFloat64(i.DATA_BUFFER+u.SIZE,!0),mtime:new Date(this.dataView.getFloat64(i.DATA_BUFFER+u.MTIME,!0))}}waitForReady(t){return h.wait(this.int32View,i.STATUS/4,a.PENDING,t)}waitForReadyAsync(t){return h.waitAsync(this.int32View,i.STATUS/4,a.PENDING,t)}async waitUntilReady(t){let e=Date.now();for(;;){let o=this.getStatus();if(o===a.READY)return!0;let s=Date.now()-e;if(s>=t)return!1;let r=t-s,c=h.waitAsync(this.int32View,i.STATUS/4,o,r);if(c.async&&await c.value==="timed-out")return!1}}waitForResult(t){return h.wait(this.int32View,i.STATUS/4,a.READY,t)}notify(){return h.notify(this.int32View,i.STATUS/4)}reset(){this.setOpCode(n.NOOP),this.setStatus(a.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(l.NONE),this.setFlags(R.NONE),this.setMode(0)}};var D=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;invokeTool;protocol;running=!1;output={stdout:"",stderr:"",exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;lastResult=null;constructor(t,e,o,s,r=void 0,c=0,d=void 0,p=void 0){this.fs=e,this.cwd=o,this.commandName=s,this.secureFetch=r,this.maxOutputSize=c,this.exec=d,this.invokeTool=p,this.protocol=new S(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+=`
|
|
4
|
-
${this.commandName}: execution timeout exceeded
|
|
5
|
-
`,Promise.reject(new Error("Operation timed out"));let o=t();return e===Number.POSITIVE_INFINITY?o:new Promise((s,r)=>{let c=F(()=>{this.running=!1,this.output.exitCode=124,this.output.stderr+=`
|
|
6
|
-
${this.commandName}: execution timeout exceeded
|
|
7
|
-
`,r(new Error("Operation timed out"))},e);o.then(d=>{g(c),s(d)},d=>{g(c),r(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+=`
|
|
8
|
-
${this.commandName}: execution timeout exceeded
|
|
9
|
-
`,this.output.exitCode=124;break}let o=this.remainingMs();if(!await this.protocol.waitUntilReady(o)){this.output.stderr+=`
|
|
10
|
-
${this.commandName}: execution timeout exceeded
|
|
11
|
-
`,this.output.exitCode=124;break}if(!this.running)break;let r=this.protocol.getOpCode();await this.handleOperation(r),this.protocol.notify()}return this.output}stop(){this.running=!1,this.lastResult=null,this.protocol.setStatus(a.READY),this.protocol.notify()}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.READ_RESULT_RANGE:this.handleReadResultRange();break;case n.WRITE_FILE_RANGE:await this.handleWriteFileRange();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(a.ERROR)}}catch(e){this.setErrorFromException(e)}}publishResult(t){let e=typeof t=="string"?new TextEncoder().encode(t):t;this.lastResult=e,this.protocol.setResultPrefix(e),this.protocol.setStatus(a.SUCCESS)}handleReadResultRange(){let t=this.protocol.getFlags(),e=this.protocol.getMode(),o=this.lastResult;if(!o||t>o.length){this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString("No retained result for range read"),this.protocol.setStatus(a.ERROR);return}this.protocol.setResult(o.subarray(t,t+e)),this.protocol.setStatus(a.SUCCESS)}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.publishResult(e)}catch(e){this.setErrorFromException(e)}}async handleWriteFileRange(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getFlags(),o=this.protocol.getData();try{if(e===0)await this.fs.writeFile(t,o);else{let s=await this.fs.stat(t);if(s.size!==e)throw new Error(`EIO: non-sequential range write to '${t}': offset ${e} != size ${s.size}`);await this.fs.appendFile(t,o)}this.protocol.setStatus(a.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleWriteFile(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getData();try{await this.fs.writeFile(t,e),this.protocol.setStatus(a.SUCCESS)}catch(o){this.setErrorFromException(o)}}async handleStat(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.stat(t);this.protocol.encodeStat(e),this.protocol.setStatus(a.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(a.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReaddir(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.readdir(t);this.publishResult(JSON.stringify(e))}catch(e){this.setErrorFromException(e)}}async handleMkdir(){let t=this.resolvePath(this.protocol.getPath()),o=(this.protocol.getFlags()&R.MKDIR_RECURSIVE)!==0;try{await this.fs.mkdir(t,{recursive:o}),this.protocol.setStatus(a.SUCCESS)}catch(s){this.setErrorFromException(s)}}async handleRm(){let t=this.resolvePath(this.protocol.getPath()),e=this.protocol.getFlags(),o=(e&R.RECURSIVE)!==0,s=(e&R.FORCE)!==0;try{await this.fs.rm(t,{recursive:o,force:s}),this.protocol.setStatus(a.SUCCESS)}catch(r){this.setErrorFromException(r)}}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(a.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(a.SUCCESS)}catch(o){this.setErrorFromException(o)}}async handleSymlink(){let t=this.protocol.getPath(),e=this.protocol.getDataAsString(),o=this.resolvePath(t);try{await this.fs.symlink(e,o),this.protocol.setStatus(a.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(a.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(a.SUCCESS)}catch(o){this.setErrorFromException(o)}}async handleRealpath(){let t=this.resolvePath(this.protocol.getPath());try{let e=await this.fs.realpath(t);this.protocol.setResultFromString(e),this.protocol.setStatus(a.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(a.SUCCESS)}catch(o){this.setErrorFromException(o)}}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(a.SUCCESS)}catch(o){this.setErrorFromException(o)}}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(a.ERROR);return}this.protocol.setStatus(a.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(a.ERROR);return}this.protocol.setStatus(a.SUCCESS)}handleExit(){let t=this.protocol.getFlags();this.outputLimitExceeded?this.output.exitCode===0&&(this.output.exitCode=1):this.output.exitCode=t,this.protocol.setStatus(a.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
|
|
12
|
-
`,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 r=s-this.output.stdout.length;this.output.stdout="",r>=this.output.stderr.length?this.output.stderr="":this.output.stderr=this.output.stderr.slice(0,this.output.stderr.length-r)}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(a.ERROR);return}let e=this.protocol.getPath(),o=this.protocol.getDataAsString();try{let s=o?JSON.parse(o):{},r=this.remainingMs(),c=await this.raceDeadline(()=>t(e,{method:s.method,headers:s.headers,body:s.body,timeoutMs:r})),d=JSON.stringify({status:c.status,statusText:c.statusText,headers:c.headers,bodyBase64:f(c.body,"base64"),url:c.url});this.publishResult(d)}catch(s){let r=T(s instanceof Error?s.message:String(s));this.protocol.setErrorCode(l.NETWORK_ERROR),this.protocol.setResultFromString(r),this.protocol.setStatus(a.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(a.ERROR);return}let e=this.protocol.getPath(),o=this.protocol.getDataAsString(),s=new AbortController;try{let r={cwd:this.cwd,signal:s.signal};if(o){let p=JSON.parse(o);p.stdin&&(r.stdin=p.stdin),p.args&&Array.isArray(p.args)&&(r.args=p.args.map(C=>String(C)),e=A([e]))}let c=await this.raceDeadline(()=>t(e,r)),d=JSON.stringify({stdout:c.stdout,stderr:c.stderr,exitCode:c.exitCode});this.publishResult(d)}catch(r){s.abort();let c=r instanceof Error?r.message:String(r);this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(c),this.protocol.setStatus(a.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(a.ERROR);return}let e=this.protocol.getPath(),o=this.protocol.getDataAsString();try{let s=await this.raceDeadline(()=>m.runTrustedAsync(()=>t(e,o)));this.publishResult(s)}catch(s){let r=w(s instanceof Error?s.message:String(s));this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(r),this.protocol.setStatus(a.ERROR)}}setErrorFromException(t){let e=t instanceof Error?t.message:String(t),o=T(e),s=l.IO_ERROR,r=e.toLowerCase();r.includes("no such file")||r.includes("not found")||r.includes("enoent")?s=l.NOT_FOUND:r.includes("is a directory")||r.includes("eisdir")?s=l.IS_DIRECTORY:r.includes("not a directory")||r.includes("enotdir")?s=l.NOT_DIRECTORY:r.includes("not empty")||r.includes("enotempty")?s=l.NOT_EMPTY:r.includes("already exists")||r.includes("eexist")?s=l.EXISTS:(r.includes("permission")||r.includes("eperm")||r.includes("eacces"))&&(s=l.PERMISSION_DENIED),this.protocol.setErrorCode(s),this.protocol.setResultFromString(o),this.protocol.setStatus(a.ERROR)}};export{x as a,D as b};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as f}from"./chunk-PBOVSFTJ.js";import{a as d}from"./chunk-NE4R2FVV.js";import{a as l}from"./chunk-I4IRHQDW.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
|
|
4
|
-
`,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}'
|
|
5
|
-
`)}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
|
|
6
|
-
`:s.includes("EEXIST")||s.includes("already exists")?o+=`mkdir: cannot create directory '${r}': File exists
|
|
7
|
-
`:o+=`mkdir: cannot create directory '${r}': ${f(s)}
|
|
8
|
-
`,c=1}return{stdout:a,stderr:o,exitCode:c}}},h={name:"mkdir",flags:[{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0};export{b as a,h as b};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as g}from"./chunk-PBOVSFTJ.js";import{a as u}from"./chunk-NE4R2FVV.js";import{a as p}from"./chunk-I4IRHQDW.js";var y={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"}},$={name:"rm",async execute(d,s){let e=u("rm",d,y);if(!e.ok)return e.error;let l=e.result.flags.recursive||e.result.flags.recursiveUpper,a=e.result.flags.force,v=e.result.flags.verbose,c=e.result.positional;if(c.length===0)return a?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:`rm: missing operand
|
|
4
|
-
`,exitCode:1};let f="",o="",i=0;for(let r of c)try{let n=s.fs.resolvePath(s.cwd,r);if((await s.fs.stat(n)).isDirectory&&!l){o+=`rm: cannot remove '${r}': Is a directory
|
|
5
|
-
`,i=1;continue}await s.fs.rm(n,{recursive:l,force:a}),v&&(f+=`removed '${r}'
|
|
6
|
-
`)}catch(n){let t=p(n),m=t.startsWith("ENOENT");if(a&&m)continue;m?o+=`rm: cannot remove '${r}': No such file or directory
|
|
7
|
-
`:t.includes("ENOTEMPTY")||t.includes("not empty")?o+=`rm: cannot remove '${r}': Directory not empty
|
|
8
|
-
`:o+=`rm: cannot remove '${r}': ${g(t)}
|
|
9
|
-
`,i=1}return{stdout:f,stderr:o,exitCode:i}}},C={name:"rm",flags:[{flag:"-r",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0};export{$ as a,C as b};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as l,b as k,d as v,f as m}from"./chunk-43E7AR6A.js";import{l as u,m as y}from"./chunk-FUT3X2GJ.js";import{a as g}from"./chunk-PBOVSFTJ.js";var w=class extends Error{operation;virtualPath;name="FileSystemPolicyError";constructor(t,r,n){super(`${t}: ${g(n)}`),this.operation=t,this.virtualPath=r}};function b(e){if(e.identity!==void 0)return`identity:${e.identity}`;if(e.dev!==void 0&&e.ino!==void 0)return`inode:${String(e.dev)}:${String(e.ino)}`}function P(e){let t=e instanceof Error?e.message:String(e);return t.includes("ENOENT")||t.includes("no such file")}async function f(e,t,r){let n=l(t),s;try{s=await e.stat(n)}catch(a){if(!P(a))return{existence:"unknown"}}if(s!==void 0){let a=b(s);try{return{existence:"existing",canonicalPath:l(await e.realpath(n)),stableIdentity:a}}catch{return a===void 0?{existence:"unknown"}:{existence:"existing",stableIdentity:a}}}let i=[],o=n;for(;;){r?.checkpoint();let a=v(o);if(a===o)return{existence:"unknown"};i.unshift(o.slice(a==="/"?1:a.length+1)),o=a;try{let c=l(await e.realpath(o));return{existence:"missing",canonicalPath:i.reduce((h,d)=>m(h,d),c)}}catch(c){if(!P(c))return{existence:"missing"}}}}async function T(e,t,r){let[n,s]=await Promise.all([f(e,t),f(e,r)]);return n.existence==="unknown"||s.existence==="unknown"?"unknown":n.existence==="missing"||s.existence==="missing"?n.existence!==s.existence?"different":n.canonicalPath!==void 0&&n.canonicalPath===s.canonicalPath?"same":"unknown":n.stableIdentity!==void 0&&s.stableIdentity!==void 0?n.stableIdentity===s.stableIdentity?"same":"different":n.canonicalPath!==void 0&&n.canonicalPath===s.canonicalPath?"same":"unknown"}async function z(e,t,r,n){let[s,i]=await Promise.all([f(e,t,n),f(e,r,n)]);return s.existence!=="existing"||s.canonicalPath===void 0||i.existence==="unknown"||i.canonicalPath===void 0?"unknown":k(s.canonicalPath,i.canonicalPath)?"inside":"outside"}var x=class{options;entries=0;discoveredEntries=1;work=0;constructor(t){this.options=t}checkpoint(t=1){if(this.options.signal?.aborted)throw new y;if(this.options.executionScope?.throwIfAborted(this.options.site),!Number.isSafeInteger(t)||t<0||t>this.options.limits.maxTraversalWork-this.work)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal work"} limit exceeded (${this.options.limits.maxTraversalWork})`,"iterations");this.work+=t,this.options.executionScope?.consumeWork(t,`${this.options.site} filesystem traversal`)}visit(t){if(this.checkpoint(),t>this.options.limits.maxTraversalDepth)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} depth limit exceeded (${this.options.limits.maxTraversalDepth})`,"recursion");if(++this.entries>this.options.limits.maxTraversalEntries)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} entry limit exceeded (${this.options.limits.maxTraversalEntries})`,"iterations")}discover(t){if(!Number.isSafeInteger(t)||t<0||t>this.options.limits.maxTraversalEntries-this.discoveredEntries)throw new u(`${this.options.site}: ${this.options.label??"filesystem traversal"} entry limit exceeded (${this.options.limits.maxTraversalEntries})`,"iterations");this.checkpoint(t),this.discoveredEntries+=t}};async function D(e,t){let r=e.budget??new x(e),n=[{kind:"enter",path:l(e.root),depth:0}],s=new Set;for(;n.length>0;){r.checkpoint(0);let i=n.pop();if(!i)break;if(i.kind==="leave"){e.includeLeave&&await t({path:i.path,depth:i.depth,stat:i.stat,isSymlink:i.isSymlink,phase:"leave"}),i.identity&&s.delete(i.identity);continue}r.visit(i.depth);let o=await e.fs.lstat(i.path),a=o.isSymbolicLink,c=a&&e.symlinks==="follow"?await e.fs.stat(i.path):o;if(await t({path:i.path,depth:i.depth,stat:c,isSymlink:a,phase:"enter"}),!c.isDirectory||a&&e.symlinks!=="follow")continue;let h=b(c)??await e.fs.realpath(i.path).then(l).catch(()=>{});if(h!==void 0){if(s.has(h))throw new w(e.site,i.path,"symbolic-link directory cycle detected");s.add(h)}n.push({kind:"leave",path:i.path,depth:i.depth,stat:c,isSymlink:a,identity:h});let d=await e.fs.readdir(i.path);r.checkpoint(),d.sort((p,$)=>p.localeCompare($));for(let p=d.length-1;p>=0;p--)n.push({kind:"enter",path:m(i.path,d[p]),depth:i.depth+1})}}export{f as a,T as b,z as c,x as d,D as e};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a as h}from"./chunk-PBOVSFTJ.js";import{a as m,b as g,c as p}from"./chunk-MUFNRCMY.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 i=!1,f=!1,d=!1,t=0;for(;t<n.length&&n[t].startsWith("-");){let e=n[t];if(e==="-s"||e==="--symbolic")i=!0,t++;else if(e==="-f"||e==="--force")f=!0,t++;else if(e==="-v"||e==="--verbose")d=!0,t++;else if(e==="-n"||e==="--no-dereference")t++;else if(/^-[sfvn]+$/.test(e))e.includes("s")&&(i=!0),e.includes("f")&&(f=!0),e.includes("v")&&(d=!0),t++;else if(e==="--"){t++;break}else return p("ln",e)}let r=n.slice(t);if(r.length<2)return{stdout:"",stderr:`ln: missing file operand
|
|
4
|
-
`,exitCode:1};if(r.length>2)return{stdout:"",stderr:`ln: extra operand '${r[2]}'
|
|
5
|
-
`,exitCode:1};let l=r[0],o=r[1],a=s.fs.resolvePath(s.cwd,o);if(await s.fs.exists(a))if(f)try{await s.fs.rm(a,{force:!0})}catch{return{stdout:"",stderr:`ln: cannot remove '${o}': Permission denied
|
|
6
|
-
`,exitCode:1}}else return{stdout:"",stderr:`ln: failed to create ${i?"symbolic ":""}link '${o}': File exists
|
|
7
|
-
`,exitCode:1};try{if(i)await s.fs.symlink(l,a);else{let e=s.fs.resolvePath(s.cwd,l);if(!await s.fs.exists(e))return{stdout:"",stderr:`ln: failed to access '${l}': No such file or directory
|
|
8
|
-
`,exitCode:1};await s.fs.link(e,a)}}catch(e){let u=e;return u.message.includes("EPERM")?{stdout:"",stderr:i?`ln: failed to create symbolic link '${o}': Operation not permitted
|
|
9
|
-
`:`ln: '${l}': hard link not allowed for directory
|
|
10
|
-
`,exitCode:1}:{stdout:"",stderr:`ln: ${h(u.message)}
|
|
11
|
-
`,exitCode:1}}let c="";return d&&(c=`'${o}' -> '${l}'
|
|
12
|
-
`),{stdout:c,stderr:"",exitCode:0}}},$={name:"ln",flags:[{flag:"-s",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{v as a,$ as b};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-AI7JUA46.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-I4IRHQDW.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as cpCommand,b as flagsForFuzzing};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-6ESRNSO7.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as duCommand,b as flagsForFuzzing};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-B2GCIQI2.js";import"./chunk-BIJXTWZ4.js";import"./chunk-QYZN33JA.js";import"./chunk-3MRB66F4.js";import"./chunk-K27FY3ES.js";import"./chunk-GA5TPRMF.js";import"./chunk-YERKK5B3.js";import"./chunk-I57EACSL.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as findCommand,b as flagsForFuzzing};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b,c,d,e,f}from"./chunk-HQ63MFHG.js";import"./chunk-QES5OSUC.js";import"./chunk-GR4ZHKXI.js";import"./chunk-HWI42GQO.js";import"./chunk-I57EACSL.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{d as flagsForFuzzing,b as gunzipCommand,e as gunzipFlagsForFuzzing,a as gzipCommand,c as zcatCommand,f as zcatFlagsForFuzzing};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-CL7IYCGG.js";import"./chunk-I57EACSL.js";import"./chunk-7JZKVC3F.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{b as flagsForFuzzing,a as lsCommand};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-OLEQNRKX.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-I4IRHQDW.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{b as flagsForFuzzing,a as mkdirCommand};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-GQKQEK5N.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-I4IRHQDW.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{b as flagsForFuzzing,a as mvCommand};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-LE2XKKGQ.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{b as flagsForFuzzing,a as readlinkCommand};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-DZAFUADN.js";import"./chunk-47IFMQYS.js";import"./chunk-3MRB66F4.js";import"./chunk-R2J5MJOM.js";import"./chunk-GA5TPRMF.js";import"./chunk-GR4ZHKXI.js";import"./chunk-HWI42GQO.js";import"./chunk-I57EACSL.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{b as flagsForFuzzing,a as rgCommand};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-SE7JHGP3.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-I4IRHQDW.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{b as flagsForFuzzing,a as rmCommand};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-ZMGLTHSU.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-NE4R2FVV.js";import"./chunk-I4IRHQDW.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{b as flagsForFuzzing,a as rmdirCommand};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-M7SIPZZZ.js";import"./chunk-GR4ZHKXI.js";import"./chunk-HWI42GQO.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{b as flagsForFuzzing,a as split};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b,c}from"./chunk-YCOJCFGU.js";import"./chunk-3DWQCLNP.js";import"./chunk-QKJAAJ7J.js";import"./chunk-42AMF6EE.js";import"./chunk-HWI42GQO.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-I4IRHQDW.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as _internals,c as flagsForFuzzing,b as sqlite3Command};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{a,b}from"./chunk-67XYNGRV.js";import"./chunk-GR4ZHKXI.js";import"./chunk-HWI42GQO.js";import"./chunk-I57EACSL.js";import"./chunk-WEHA3JFD.js";import"./chunk-43E7AR6A.js";import"./chunk-FUT3X2GJ.js";import"./chunk-CPKBPQ2C.js";import"./chunk-PBOVSFTJ.js";import"./chunk-MUFNRCMY.js";import"./chunk-DN2YCFOR.js";export{a as chmodCommand,b as flagsForFuzzing};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
function o(n){if(!n||n==="/")return"/";let t=n.endsWith("/")&&n!=="/"?n.slice(0,-1):n;t.startsWith("/")||(t=`/${t}`);let r=t.split("/").filter(i=>i&&i!=="."),e=[];for(let i of r)i===".."?e.pop():e.push(i);return`/${e.join("/")}`||"/"}function l(n,t){let r=o(n),e=o(t);return e===r||r==="/"||e.startsWith(`${r}/`)}function u(n,t){if(n.includes("\0"))throw new Error(`ENOENT: path contains null byte, ${t} '${n}'`)}function s(n){let t=o(n);if(t==="/")return"/";let r=t.lastIndexOf("/");return r===0?"/":t.slice(0,r)}function f(n,t){if(t.startsWith("/"))return o(t);let r=n==="/"?`/${t}`:`${n}/${t}`;return o(r)}function c(n,t){return n==="/"?`/${t}`:`${n}/${t}`}function a(n,t){if(t.startsWith("/"))return o(t);let r=s(n);return o(c(r,t))}export{o as a,l as b,u as c,s as d,f as e,c as f,a as g};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{b as P,c as F,d as O,e as T}from"./chunk-WEHA3JFD.js";import{b as S}from"./chunk-43E7AR6A.js";import{l as v,m as w}from"./chunk-FUT3X2GJ.js";import{a as E}from"./chunk-NE4R2FVV.js";import{a as D}from"./chunk-I4IRHQDW.js";import{a as $,b as C}from"./chunk-MUFNRCMY.js";var R={name:"cp",summary:"copy files and directories",usage:"cp [OPTION]... SOURCE... DEST",options:["-r, -R, --recursive copy directories recursively","-n, --no-clobber do not overwrite an existing file","-p, --preserve preserve file attributes","-v, --verbose explain what is being done"," --help display this help and exit"]},H={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},preserve:{short:"p",long:"preserve",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},j={name:"cp",async execute(u,e){if(C(u))return $(R);let s=E("cp",u,H);if(!s.ok)return s.error;let d=s.result.flags.recursive||s.result.flags.recursiveUpper,k=s.result.flags.noClobber,A=s.result.flags.preserve,N=s.result.flags.verbose,p=s.result.positional;if(p.length<2)return{stdout:"",stderr:`cp: missing destination file operand
|
|
4
|
-
`,exitCode:1};let g=p.pop()??"",m=p,l=e.fs.resolvePath(e.cwd,g),y="",n="",i=0,h=new O({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp"}),f=!1;try{f=(await e.fs.stat(l)).isDirectory}catch{}if(m.length>1&&!f)return{stdout:"",stderr:`cp: target '${g}' is not a directory
|
|
5
|
-
`,exitCode:1};for(let t of m)try{let o=e.fs.resolvePath(e.cwd,t),a=await e.fs.stat(o),r=l;if(f){let c=t.split("/").pop()||t;r=l==="/"?`/${c}`:`${l}/${c}`}if(a.isDirectory&&!d){n+=`cp: -r not specified; omitting directory '${t}'
|
|
6
|
-
`,i=1;continue}if(a.isDirectory){let c=await F(e.fs,o,r,h);if(S(o,r)||c==="inside"){n+=`cp: cannot copy '${t}' into itself, '${r}'
|
|
7
|
-
`,i=1;continue}if(c==="unknown"){n+=`cp: cannot safely determine whether '${r}' is inside '${t}'
|
|
8
|
-
`,i=1;continue}}if(k)try{await e.fs.stat(r);continue}catch{}let b=await P(e.fs,o,r);if(b==="same"){n+=`cp: '${t}' and '${r}' are the same file
|
|
9
|
-
`,i=1;continue}if(b==="unknown"){n+=`cp: cannot safely determine whether '${t}' and '${r}' are the same file
|
|
10
|
-
`,i=1;continue}a.isDirectory&&await T({fs:e.fs,root:o,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"cp",symlinks:"never",budget:h},()=>{}),await e.fs.cp(o,r,{recursive:d}),N&&(y+=`'${t}' -> '${r}'
|
|
11
|
-
`)}catch(o){if(o instanceof v||o instanceof w)throw o;let a=D(o);a.includes("ENOENT")||a.includes("no such file")?n+=`cp: cannot stat '${t}': No such file or directory
|
|
12
|
-
`:n+=`cp: cannot copy '${t}': ${a}
|
|
13
|
-
`,i=1}return{stdout:y,stderr:n,exitCode:i}}},q={name:"cp",flags:[{flag:"-r",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{j as a,q as b};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
3
|
-
import{b as F,c as N,d as O,e as T}from"./chunk-WEHA3JFD.js";import{b as P}from"./chunk-43E7AR6A.js";import{l as w,m as $}from"./chunk-FUT3X2GJ.js";import{a as S}from"./chunk-NE4R2FVV.js";import{a as D}from"./chunk-I4IRHQDW.js";import{a as C,b as E}from"./chunk-MUFNRCMY.js";var A={name:"mv",summary:"move (rename) files",usage:"mv [OPTION]... SOURCE... DEST",options:["-f, --force do not prompt before overwriting","-n, --no-clobber do not overwrite an existing file","-v, --verbose explain what is being done"," --help display this help and exit"]},H={force:{short:"f",long:"force",type:"boolean"},noClobber:{short:"n",long:"no-clobber",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},U={name:"mv",async execute(p,e){if(E(p))return C(A);let r=S("mv",p,H);if(!r.ok)return r.error;let u=r.result.flags.force,v=r.result.flags.noClobber,k=r.result.flags.verbose,d=r.result.positional;if(v&&(u=!1),d.length<2)return{stdout:"",stderr:`mv: missing destination file operand
|
|
4
|
-
`,exitCode:1};let f=d.pop()??"",g=d,c=e.fs.resolvePath(e.cwd,f),h="",i="",l=0,b=new O({limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"mv"}),m=!1;try{m=(await e.fs.stat(c)).isDirectory}catch{}if(g.length>1&&!m)return{stdout:"",stderr:`mv: target '${f}' is not a directory
|
|
5
|
-
`,exitCode:1};for(let t of g)try{let o=e.fs.resolvePath(e.cwd,t),a=await e.fs.stat(o),n=c;if(m){let s=t.split("/").pop()||t;n=c==="/"?`/${s}`:`${c}/${s}`}if(a.isDirectory){let s=await N(e.fs,o,n,b);if(P(o,n)||s==="inside"){i+=`mv: cannot move '${t}' into itself, '${n}'
|
|
6
|
-
`,l=1;continue}if(s==="unknown"){i+=`mv: cannot safely determine whether '${n}' is inside '${t}'
|
|
7
|
-
`,l=1;continue}}if(v)try{await e.fs.stat(n);continue}catch{}let y=await F(e.fs,o,n);if(y==="same")continue;if(y==="unknown"){i+=`mv: cannot safely determine whether '${t}' and '${n}' are the same file
|
|
8
|
-
`,l=1;continue}if(a.isDirectory&&await T({fs:e.fs,root:o,limits:e.limits,signal:e.signal,executionScope:e.executionScope,site:"mv",symlinks:"never",budget:b},()=>{}),await e.fs.mv(o,n),k){let s=m?`${f}/${t.split("/").pop()||t}`:f;h+=`renamed '${t}' -> '${s}'
|
|
9
|
-
`}}catch(o){if(o instanceof w||o instanceof $)throw o;let a=D(o);a.includes("ENOENT")||a.includes("no such file")?i+=`mv: cannot stat '${t}': No such file or directory
|
|
10
|
-
`:i+=`mv: cannot move '${t}': ${a}
|
|
11
|
-
`,l=1}return{stdout:h,stderr:i,exitCode:l}}},j={name:"mv",flags:[{flag:"-f",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0,minArgs:2};export{U as a,j as b};
|