typescript-virtual-container 1.4.4 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (892) hide show
  1. package/builds/self-standalone.js +321 -272
  2. package/builds/self-standalone.js.map +4 -4
  3. package/builds/standalone-wo-sftp.js +261 -212
  4. package/builds/standalone-wo-sftp.js.map +4 -4
  5. package/builds/standalone.js +265 -216
  6. package/builds/standalone.js.map +4 -4
  7. package/builds/web-full-api.min.js +5 -5
  8. package/builds/web-full-api.min.js.map +3 -3
  9. package/builds/web.min.js +5 -5
  10. package/builds/web.min.js.map +3 -3
  11. package/bun.lock +97 -0
  12. package/dist/Honeypot/index.d.ts.map +1 -0
  13. package/dist/Honeypot/index.js +299 -0
  14. package/dist/Honeypot/index.js.map +1 -0
  15. package/dist/SSHClient/index.d.ts.map +1 -0
  16. package/dist/SSHClient/index.js +238 -0
  17. package/dist/SSHClient/index.js.map +1 -0
  18. package/dist/SSHMimic/exec.d.ts.map +1 -0
  19. package/dist/SSHMimic/exec.js +28 -0
  20. package/dist/SSHMimic/exec.js.map +1 -0
  21. package/dist/SSHMimic/executor.d.ts.map +1 -0
  22. package/dist/SSHMimic/executor.js +161 -0
  23. package/dist/SSHMimic/executor.js.map +1 -0
  24. package/dist/SSHMimic/hostKey.d.ts.map +1 -0
  25. package/dist/SSHMimic/hostKey.js +18 -0
  26. package/dist/SSHMimic/hostKey.js.map +1 -0
  27. package/dist/SSHMimic/index.d.ts.map +1 -0
  28. package/dist/SSHMimic/index.js +250 -0
  29. package/dist/SSHMimic/index.js.map +1 -0
  30. package/dist/SSHMimic/loginBanner.d.ts.map +1 -0
  31. package/dist/SSHMimic/loginBanner.js +23 -0
  32. package/dist/SSHMimic/loginBanner.js.map +1 -0
  33. package/dist/SSHMimic/loginFormat.d.ts.map +1 -0
  34. package/dist/SSHMimic/loginFormat.js +11 -0
  35. package/dist/SSHMimic/loginFormat.js.map +1 -0
  36. package/dist/SSHMimic/prompt.d.ts.map +1 -0
  37. package/dist/SSHMimic/prompt.js +10 -0
  38. package/dist/SSHMimic/prompt.js.map +1 -0
  39. package/dist/SSHMimic/sftp.d.ts.map +1 -0
  40. package/dist/SSHMimic/sftp.js +620 -0
  41. package/dist/SSHMimic/sftp.js.map +1 -0
  42. package/dist/VirtualFileSystem/binaryPack.d.ts.map +1 -0
  43. package/dist/VirtualFileSystem/binaryPack.js +217 -0
  44. package/dist/VirtualFileSystem/binaryPack.js.map +1 -0
  45. package/dist/VirtualFileSystem/index.d.ts.map +1 -0
  46. package/dist/VirtualFileSystem/index.js +690 -0
  47. package/dist/VirtualFileSystem/index.js.map +1 -0
  48. package/dist/VirtualFileSystem/internalTypes.d.ts.map +1 -0
  49. package/dist/VirtualFileSystem/internalTypes.js +1 -0
  50. package/dist/VirtualFileSystem/internalTypes.js.map +1 -0
  51. package/dist/VirtualFileSystem/path.d.ts.map +1 -0
  52. package/dist/VirtualFileSystem/path.js +50 -0
  53. package/dist/VirtualFileSystem/path.js.map +1 -0
  54. package/dist/VirtualPackageManager/index.d.ts.map +1 -0
  55. package/dist/VirtualPackageManager/index.js +854 -0
  56. package/dist/VirtualPackageManager/index.js.map +1 -0
  57. package/dist/VirtualShell/index.d.ts.map +1 -0
  58. package/dist/VirtualShell/index.js +285 -0
  59. package/dist/VirtualShell/index.js.map +1 -0
  60. package/dist/VirtualShell/shell.d.ts.map +1 -0
  61. package/dist/VirtualShell/shell.js +503 -0
  62. package/dist/VirtualShell/shell.js.map +1 -0
  63. package/dist/VirtualShell/shellParser.d.ts.map +1 -0
  64. package/dist/VirtualShell/shellParser.js +266 -0
  65. package/dist/VirtualShell/shellParser.js.map +1 -0
  66. package/dist/VirtualUserManager/index.d.ts.map +1 -0
  67. package/dist/VirtualUserManager/index.js +608 -0
  68. package/dist/VirtualUserManager/index.js.map +1 -0
  69. package/dist/commands/adduser.d.ts.map +1 -0
  70. package/dist/commands/adduser.js +90 -0
  71. package/dist/commands/adduser.js.map +1 -0
  72. package/dist/commands/alias.d.ts.map +1 -0
  73. package/dist/commands/alias.js +69 -0
  74. package/dist/commands/alias.js.map +1 -0
  75. package/dist/commands/apt.d.ts.map +1 -0
  76. package/dist/commands/apt.js +211 -0
  77. package/dist/commands/apt.js.map +1 -0
  78. package/dist/commands/awk.d.ts.map +1 -0
  79. package/dist/commands/awk.js +170 -0
  80. package/dist/commands/awk.js.map +1 -0
  81. package/dist/commands/base64.d.ts.map +1 -0
  82. package/dist/commands/base64.js +29 -0
  83. package/dist/commands/base64.js.map +1 -0
  84. package/dist/commands/cat.d.ts.map +1 -0
  85. package/dist/commands/cat.js +45 -0
  86. package/dist/commands/cat.js.map +1 -0
  87. package/dist/commands/cd.d.ts.map +1 -0
  88. package/dist/commands/cd.js +22 -0
  89. package/dist/commands/cd.js.map +1 -0
  90. package/dist/commands/chmod.d.ts.map +1 -0
  91. package/dist/commands/chmod.js +88 -0
  92. package/dist/commands/chmod.js.map +1 -0
  93. package/dist/commands/clear.d.ts.map +1 -0
  94. package/dist/commands/clear.js +14 -0
  95. package/dist/commands/clear.js.map +1 -0
  96. package/dist/commands/command-helpers.d.ts.map +1 -0
  97. package/dist/commands/command-helpers.js +222 -0
  98. package/dist/commands/command-helpers.js.map +1 -0
  99. package/dist/commands/cp.d.ts.map +1 -0
  100. package/dist/commands/cp.js +76 -0
  101. package/dist/commands/cp.js.map +1 -0
  102. package/dist/commands/curl.d.ts.map +1 -0
  103. package/dist/commands/curl.js +128 -0
  104. package/dist/commands/curl.js.map +1 -0
  105. package/dist/commands/cut.d.ts.map +1 -0
  106. package/dist/commands/cut.js +35 -0
  107. package/dist/commands/cut.js.map +1 -0
  108. package/dist/commands/date.d.ts.map +1 -0
  109. package/dist/commands/date.js +29 -0
  110. package/dist/commands/date.js.map +1 -0
  111. package/dist/commands/declare.d.ts.map +1 -0
  112. package/dist/commands/declare.js +45 -0
  113. package/dist/commands/declare.js.map +1 -0
  114. package/dist/commands/deluser.d.ts.map +1 -0
  115. package/dist/commands/deluser.js +84 -0
  116. package/dist/commands/deluser.js.map +1 -0
  117. package/dist/commands/df.d.ts.map +1 -0
  118. package/dist/commands/df.js +22 -0
  119. package/dist/commands/df.js.map +1 -0
  120. package/dist/commands/diff.d.ts.map +1 -0
  121. package/dist/commands/diff.js +46 -0
  122. package/dist/commands/diff.js.map +1 -0
  123. package/dist/commands/dpkg.d.ts.map +1 -0
  124. package/dist/commands/dpkg.js +162 -0
  125. package/dist/commands/dpkg.js.map +1 -0
  126. package/dist/commands/du.d.ts.map +1 -0
  127. package/dist/commands/du.js +51 -0
  128. package/dist/commands/du.js.map +1 -0
  129. package/dist/commands/echo.d.ts.map +1 -0
  130. package/dist/commands/echo.js +46 -0
  131. package/dist/commands/echo.js.map +1 -0
  132. package/dist/commands/env.d.ts.map +1 -0
  133. package/dist/commands/env.js +21 -0
  134. package/dist/commands/env.js.map +1 -0
  135. package/dist/commands/exit.d.ts.map +1 -0
  136. package/dist/commands/exit.js +17 -0
  137. package/dist/commands/exit.js.map +1 -0
  138. package/dist/commands/export.d.ts.map +1 -0
  139. package/dist/commands/export.js +34 -0
  140. package/dist/commands/export.js.map +1 -0
  141. package/dist/commands/find.d.ts.map +1 -0
  142. package/dist/commands/find.js +56 -0
  143. package/dist/commands/find.js.map +1 -0
  144. package/dist/commands/free.d.ts.map +1 -0
  145. package/dist/commands/free.js +44 -0
  146. package/dist/commands/free.js.map +1 -0
  147. package/dist/commands/grep.d.ts.map +1 -0
  148. package/dist/commands/grep.js +121 -0
  149. package/dist/commands/grep.js.map +1 -0
  150. package/dist/commands/groups.d.ts.map +1 -0
  151. package/dist/commands/groups.js +18 -0
  152. package/dist/commands/groups.js.map +1 -0
  153. package/dist/commands/gzip.d.ts.map +1 -0
  154. package/dist/commands/gzip.js +83 -0
  155. package/dist/commands/gzip.js.map +1 -0
  156. package/dist/commands/head.d.ts.map +1 -0
  157. package/dist/commands/head.js +47 -0
  158. package/dist/commands/head.js.map +1 -0
  159. package/dist/commands/help.d.ts.map +1 -0
  160. package/dist/commands/help.js +124 -0
  161. package/dist/commands/help.js.map +1 -0
  162. package/dist/commands/helpers.d.ts.map +1 -0
  163. package/dist/commands/helpers.js +167 -0
  164. package/dist/commands/helpers.js.map +1 -0
  165. package/dist/commands/history.d.ts.map +1 -0
  166. package/dist/commands/history.js +27 -0
  167. package/dist/commands/history.js.map +1 -0
  168. package/dist/commands/hostname.d.ts.map +1 -0
  169. package/dist/commands/hostname.js +13 -0
  170. package/dist/commands/hostname.js.map +1 -0
  171. package/dist/commands/htop.d.ts.map +1 -0
  172. package/dist/commands/htop.js +18 -0
  173. package/dist/commands/htop.js.map +1 -0
  174. package/dist/commands/id.d.ts.map +1 -0
  175. package/dist/commands/id.js +18 -0
  176. package/dist/commands/id.js.map +1 -0
  177. package/dist/commands/index.d.ts.map +1 -0
  178. package/dist/commands/index.js +3 -0
  179. package/dist/commands/index.js.map +1 -0
  180. package/dist/commands/kill.d.ts.map +1 -0
  181. package/dist/commands/kill.js +19 -0
  182. package/dist/commands/kill.js.map +1 -0
  183. package/dist/commands/ln.d.ts.map +1 -0
  184. package/dist/commands/ln.js +67 -0
  185. package/dist/commands/ln.js.map +1 -0
  186. package/dist/commands/ls.d.ts.map +1 -0
  187. package/dist/commands/ls.js +201 -0
  188. package/dist/commands/ls.js.map +1 -0
  189. package/dist/commands/lsb-release.d.ts.map +1 -0
  190. package/dist/commands/lsb-release.js +62 -0
  191. package/dist/commands/lsb-release.js.map +1 -0
  192. package/dist/commands/man.d.ts.map +1 -0
  193. package/dist/commands/man.js +50 -0
  194. package/dist/commands/man.js.map +1 -0
  195. package/dist/commands/mkdir.d.ts.map +1 -0
  196. package/dist/commands/mkdir.js +29 -0
  197. package/dist/commands/mkdir.js.map +1 -0
  198. package/dist/commands/mv.d.ts.map +1 -0
  199. package/dist/commands/mv.js +43 -0
  200. package/dist/commands/mv.js.map +1 -0
  201. package/dist/commands/nano.d.ts.map +1 -0
  202. package/dist/commands/nano.js +35 -0
  203. package/dist/commands/nano.js.map +1 -0
  204. package/dist/commands/neofetch.d.ts.map +1 -0
  205. package/dist/commands/neofetch.js +49 -0
  206. package/dist/commands/neofetch.js.map +1 -0
  207. package/dist/commands/node.d.ts.map +1 -0
  208. package/dist/commands/node.js +317 -0
  209. package/dist/commands/node.js.map +1 -0
  210. package/dist/commands/npm.d.ts.map +1 -0
  211. package/dist/commands/npm.js +110 -0
  212. package/dist/commands/npm.js.map +1 -0
  213. package/dist/commands/passwd.d.ts.map +1 -0
  214. package/dist/commands/passwd.js +45 -0
  215. package/dist/commands/passwd.js.map +1 -0
  216. package/dist/commands/ping.d.ts.map +1 -0
  217. package/dist/commands/ping.js +29 -0
  218. package/dist/commands/ping.js.map +1 -0
  219. package/dist/commands/printf.d.ts.map +1 -0
  220. package/dist/commands/printf.js +145 -0
  221. package/dist/commands/printf.js.map +1 -0
  222. package/dist/commands/ps.d.ts.map +1 -0
  223. package/dist/commands/ps.js +47 -0
  224. package/dist/commands/ps.js.map +1 -0
  225. package/dist/commands/pwd.d.ts.map +1 -0
  226. package/dist/commands/pwd.js +8 -0
  227. package/dist/commands/pwd.js.map +1 -0
  228. package/dist/commands/python.d.ts.map +1 -0
  229. package/dist/commands/python.js +2059 -0
  230. package/dist/commands/python.js.map +1 -0
  231. package/dist/commands/read.d.ts.map +1 -0
  232. package/dist/commands/read.js +40 -0
  233. package/dist/commands/read.js.map +1 -0
  234. package/dist/commands/registry.d.ts.map +1 -0
  235. package/dist/commands/registry.js +235 -0
  236. package/dist/commands/registry.js.map +1 -0
  237. package/dist/commands/rm.d.ts.map +1 -0
  238. package/dist/commands/rm.js +37 -0
  239. package/dist/commands/rm.js.map +1 -0
  240. package/dist/commands/runtime.d.ts.map +1 -0
  241. package/dist/commands/runtime.js +286 -0
  242. package/dist/commands/runtime.js.map +1 -0
  243. package/dist/commands/sed.d.ts.map +1 -0
  244. package/dist/commands/sed.js +61 -0
  245. package/dist/commands/sed.js.map +1 -0
  246. package/dist/commands/seq.d.ts.map +1 -0
  247. package/dist/commands/seq.js +51 -0
  248. package/dist/commands/seq.js.map +1 -0
  249. package/dist/commands/set.d.ts.map +1 -0
  250. package/dist/commands/set.js +27 -0
  251. package/dist/commands/set.js.map +1 -0
  252. package/dist/commands/sh.d.ts.map +1 -0
  253. package/dist/commands/sh.js +432 -0
  254. package/dist/commands/sh.js.map +1 -0
  255. package/dist/commands/shift.d.ts.map +1 -0
  256. package/dist/commands/shift.js +63 -0
  257. package/dist/commands/shift.js.map +1 -0
  258. package/dist/commands/sleep.d.ts.map +1 -0
  259. package/dist/commands/sleep.js +19 -0
  260. package/dist/commands/sleep.js.map +1 -0
  261. package/dist/commands/sort.d.ts.map +1 -0
  262. package/dist/commands/sort.js +45 -0
  263. package/dist/commands/sort.js.map +1 -0
  264. package/dist/commands/source.d.ts.map +1 -0
  265. package/dist/commands/source.js +40 -0
  266. package/dist/commands/source.js.map +1 -0
  267. package/dist/commands/stat.d.ts.map +1 -0
  268. package/dist/commands/stat.js +57 -0
  269. package/dist/commands/stat.js.map +1 -0
  270. package/dist/commands/su.d.ts.map +1 -0
  271. package/dist/commands/su.js +58 -0
  272. package/dist/commands/su.js.map +1 -0
  273. package/dist/commands/sudo.d.ts.map +1 -0
  274. package/dist/commands/sudo.js +55 -0
  275. package/dist/commands/sudo.js.map +1 -0
  276. package/dist/commands/tail.d.ts.map +1 -0
  277. package/dist/commands/tail.js +48 -0
  278. package/dist/commands/tail.js.map +1 -0
  279. package/dist/commands/tar.d.ts.map +1 -0
  280. package/dist/commands/tar.js +103 -0
  281. package/dist/commands/tar.js.map +1 -0
  282. package/dist/commands/tee.d.ts.map +1 -0
  283. package/dist/commands/tee.js +37 -0
  284. package/dist/commands/tee.js.map +1 -0
  285. package/dist/commands/test.d.ts.map +1 -0
  286. package/dist/commands/test.js +115 -0
  287. package/dist/commands/test.js.map +1 -0
  288. package/dist/commands/touch.d.ts.map +1 -0
  289. package/dist/commands/touch.js +26 -0
  290. package/dist/commands/touch.js.map +1 -0
  291. package/dist/commands/tr.d.ts.map +1 -0
  292. package/dist/commands/tr.js +62 -0
  293. package/dist/commands/tr.js.map +1 -0
  294. package/dist/commands/tree.d.ts.map +1 -0
  295. package/dist/commands/tree.js +19 -0
  296. package/dist/commands/tree.js.map +1 -0
  297. package/dist/commands/true.d.ts.map +1 -0
  298. package/dist/commands/true.js +25 -0
  299. package/dist/commands/true.js.map +1 -0
  300. package/dist/commands/type.d.ts.map +1 -0
  301. package/dist/commands/type.js +40 -0
  302. package/dist/commands/type.js.map +1 -0
  303. package/dist/commands/uname.d.ts.map +1 -0
  304. package/dist/commands/uname.js +30 -0
  305. package/dist/commands/uname.js.map +1 -0
  306. package/dist/commands/uniq.d.ts.map +1 -0
  307. package/dist/commands/uniq.js +39 -0
  308. package/dist/commands/uniq.js.map +1 -0
  309. package/dist/commands/unset.d.ts.map +1 -0
  310. package/dist/commands/unset.js +17 -0
  311. package/dist/commands/unset.js.map +1 -0
  312. package/dist/commands/uptime.d.ts.map +1 -0
  313. package/dist/commands/uptime.js +49 -0
  314. package/dist/commands/uptime.js.map +1 -0
  315. package/dist/commands/wc.d.ts.map +1 -0
  316. package/dist/commands/wc.js +56 -0
  317. package/dist/commands/wc.js.map +1 -0
  318. package/dist/commands/wget.d.ts.map +1 -0
  319. package/dist/commands/wget.js +127 -0
  320. package/dist/commands/wget.js.map +1 -0
  321. package/dist/commands/which.d.ts.map +1 -0
  322. package/dist/commands/which.js +33 -0
  323. package/dist/commands/which.js.map +1 -0
  324. package/dist/commands/who.d.ts.map +1 -0
  325. package/dist/commands/who.js +23 -0
  326. package/dist/commands/who.js.map +1 -0
  327. package/dist/commands/whoami.d.ts.map +1 -0
  328. package/dist/commands/whoami.js +13 -0
  329. package/dist/commands/whoami.js.map +1 -0
  330. package/dist/commands/xargs.d.ts.map +1 -0
  331. package/dist/commands/xargs.js +22 -0
  332. package/dist/commands/xargs.js.map +1 -0
  333. package/dist/index.d.ts.map +1 -0
  334. package/dist/index.js +10 -0
  335. package/dist/index.js.map +1 -0
  336. package/dist/modules/linuxRootfs.d.ts.map +1 -0
  337. package/dist/modules/linuxRootfs.js +620 -0
  338. package/dist/modules/linuxRootfs.js.map +1 -0
  339. package/dist/modules/neofetch.d.ts.map +1 -0
  340. package/dist/modules/neofetch.js +285 -0
  341. package/dist/modules/neofetch.js.map +1 -0
  342. package/dist/modules/shellInteractive.d.ts.map +1 -0
  343. package/dist/modules/shellInteractive.js +27 -0
  344. package/dist/modules/shellInteractive.js.map +1 -0
  345. package/dist/modules/shellRuntime.d.ts.map +1 -0
  346. package/dist/modules/shellRuntime.js +53 -0
  347. package/dist/modules/shellRuntime.js.map +1 -0
  348. package/dist/self-standalone.d.ts.map +1 -0
  349. package/dist/self-standalone.js +419 -0
  350. package/dist/self-standalone.js.map +1 -0
  351. package/dist/standalone-wo-sftp.d.ts.map +1 -0
  352. package/dist/standalone-wo-sftp.js +31 -0
  353. package/dist/standalone-wo-sftp.js.map +1 -0
  354. package/dist/standalone.d.ts.map +1 -0
  355. package/dist/standalone.js +36 -0
  356. package/dist/standalone.js.map +1 -0
  357. package/dist/types/commands.d.ts.map +1 -0
  358. package/dist/types/commands.js +1 -0
  359. package/dist/types/commands.js.map +1 -0
  360. package/dist/types/pipeline.d.ts.map +1 -0
  361. package/dist/types/pipeline.js +1 -0
  362. package/dist/types/pipeline.js.map +1 -0
  363. package/dist/types/streams.d.ts.map +1 -0
  364. package/dist/types/streams.js +1 -0
  365. package/dist/types/streams.js.map +1 -0
  366. package/dist/types/vfs.d.ts.map +1 -0
  367. package/dist/types/vfs.js +1 -0
  368. package/dist/types/vfs.js.map +1 -0
  369. package/dist/utils/expand.d.ts.map +1 -0
  370. package/dist/utils/expand.js +477 -0
  371. package/dist/utils/expand.js.map +1 -0
  372. package/dist/utils/perfLogger.d.ts.map +1 -0
  373. package/dist/utils/perfLogger.js +50 -0
  374. package/dist/utils/perfLogger.js.map +1 -0
  375. package/dist/utils/tokenize.d.ts.map +1 -0
  376. package/dist/utils/tokenize.js +115 -0
  377. package/dist/utils/tokenize.js.map +1 -0
  378. package/dist/utils/vfsDiff.d.ts.map +1 -0
  379. package/dist/utils/vfsDiff.js +178 -0
  380. package/dist/utils/vfsDiff.js.map +1 -0
  381. package/dist/web-api.d.ts.map +1 -0
  382. package/dist/web-api.js +47 -0
  383. package/dist/web-api.js.map +1 -0
  384. package/dist/web-full.d.ts.map +1 -0
  385. package/dist/web-full.js +9 -0
  386. package/dist/web-full.js.map +1 -0
  387. package/dist/web.d.ts.map +1 -0
  388. package/dist/web.js +774 -0
  389. package/dist/web.js.map +1 -0
  390. package/docs/.nojekyll +1 -0
  391. package/docs/assets/hierarchy.js +1 -0
  392. package/docs/assets/highlight.css +162 -0
  393. package/docs/assets/icons.js +18 -0
  394. package/docs/assets/icons.svg +1 -0
  395. package/docs/assets/main.js +60 -0
  396. package/docs/assets/navigation.js +1 -0
  397. package/docs/assets/search.js +1 -0
  398. package/docs/assets/style.css +1633 -0
  399. package/docs/classes/HoneyPot.html +31 -0
  400. package/docs/classes/SshClient.html +66 -0
  401. package/docs/classes/VirtualFileSystem.html +262 -0
  402. package/docs/classes/VirtualPackageManager.html +63 -0
  403. package/docs/classes/VirtualSftpServer.html +169 -0
  404. package/docs/classes/VirtualShell.html +265 -0
  405. package/docs/classes/VirtualSshServer.html +177 -0
  406. package/docs/classes/VirtualUserManager.html +276 -0
  407. package/docs/docs/.nojekyll +1 -0
  408. package/docs/docs/assets/hierarchy.js +1 -0
  409. package/docs/docs/assets/highlight.css +162 -0
  410. package/docs/docs/assets/icons.js +18 -0
  411. package/docs/docs/assets/icons.svg +1 -0
  412. package/docs/docs/assets/main.js +60 -0
  413. package/docs/docs/assets/navigation.js +1 -0
  414. package/docs/docs/assets/search.js +1 -0
  415. package/docs/docs/assets/style.css +1633 -0
  416. package/docs/docs/hierarchy.html +1 -0
  417. package/docs/docs/index.html +1842 -0
  418. package/docs/docs/media/LICENSE +21 -0
  419. package/docs/docs/modules.html +1 -0
  420. package/docs/functions/assertDiff.html +6 -0
  421. package/docs/functions/diffSnapshots.html +7 -0
  422. package/docs/functions/formatDiff.html +6 -0
  423. package/docs/functions/getArg.html +13 -0
  424. package/docs/functions/getFlag.html +15 -0
  425. package/docs/functions/ifFlag.html +11 -0
  426. package/docs/hierarchy.html +1 -0
  427. package/docs/index.html +1842 -0
  428. package/docs/interfaces/AuditLogEntry.html +6 -0
  429. package/docs/interfaces/CommandContext.html +22 -0
  430. package/docs/interfaces/CommandResult.html +26 -0
  431. package/docs/interfaces/ExecStream.html +11 -0
  432. package/docs/interfaces/HoneyPotStats.html +14 -0
  433. package/docs/interfaces/InstalledPackage.html +20 -0
  434. package/docs/interfaces/NanoEditorSession.html +8 -0
  435. package/docs/interfaces/PackageDefinition.html +30 -0
  436. package/docs/interfaces/PackageFile.html +8 -0
  437. package/docs/interfaces/RemoveOptions.html +4 -0
  438. package/docs/interfaces/ShellEnv.html +6 -0
  439. package/docs/interfaces/ShellModule.html +14 -0
  440. package/docs/interfaces/ShellProperties.html +14 -0
  441. package/docs/interfaces/ShellStream.html +11 -0
  442. package/docs/interfaces/SudoChallenge.html +24 -0
  443. package/docs/interfaces/VfsBaseNode.html +12 -0
  444. package/docs/interfaces/VfsDiff.html +10 -0
  445. package/docs/interfaces/VfsDiffEntry.html +6 -0
  446. package/docs/interfaces/VfsDiffModified.html +10 -0
  447. package/docs/interfaces/VfsDirectoryNode.html +15 -0
  448. package/docs/interfaces/VfsFileNode.html +17 -0
  449. package/docs/interfaces/VfsOptions.html +12 -0
  450. package/docs/interfaces/VfsSnapshot.html +3 -0
  451. package/docs/interfaces/VfsSnapshotBaseNode.html +8 -0
  452. package/docs/interfaces/VfsSnapshotDirectoryNode.html +10 -0
  453. package/docs/interfaces/VfsSnapshotFileNode.html +12 -0
  454. package/docs/interfaces/WriteFileOptions.html +6 -0
  455. package/docs/media/LICENSE +21 -0
  456. package/docs/modules.html +1 -0
  457. package/docs/types/CommandMode.html +2 -0
  458. package/docs/types/CommandOutcome.html +2 -0
  459. package/docs/types/VfsNodeStats.html +2 -0
  460. package/docs/types/VfsNodeType.html +2 -0
  461. package/docs/types/VfsPersistenceMode.html +5 -0
  462. package/docs/types/VfsSnapshotNode.html +2 -0
  463. package/examples/web.min.js +5 -5
  464. package/package.json +4 -2
  465. package/tsconfig.json +7 -2
  466. package/typedoc.json +8 -0
  467. package/src/Honeypot/index.d.ts.map +0 -1
  468. package/src/Honeypot/index.js +0 -298
  469. package/src/SSHClient/index.d.ts.map +0 -1
  470. package/src/SSHClient/index.js +0 -237
  471. package/src/SSHMimic/exec.d.ts.map +0 -1
  472. package/src/SSHMimic/exec.js +0 -27
  473. package/src/SSHMimic/executor.d.ts.map +0 -1
  474. package/src/SSHMimic/executor.js +0 -160
  475. package/src/SSHMimic/hostKey.d.ts.map +0 -1
  476. package/src/SSHMimic/hostKey.js +0 -17
  477. package/src/SSHMimic/index.d.ts.map +0 -1
  478. package/src/SSHMimic/index.js +0 -249
  479. package/src/SSHMimic/loginBanner.d.ts.map +0 -1
  480. package/src/SSHMimic/loginBanner.js +0 -22
  481. package/src/SSHMimic/loginFormat.d.ts.map +0 -1
  482. package/src/SSHMimic/loginFormat.js +0 -10
  483. package/src/SSHMimic/prompt.d.ts.map +0 -1
  484. package/src/SSHMimic/prompt.js +0 -9
  485. package/src/SSHMimic/sftp.d.ts.map +0 -1
  486. package/src/SSHMimic/sftp.js +0 -619
  487. package/src/VirtualFileSystem/binaryPack.d.ts.map +0 -1
  488. package/src/VirtualFileSystem/binaryPack.js +0 -216
  489. package/src/VirtualFileSystem/index.d.ts.map +0 -1
  490. package/src/VirtualFileSystem/index.js +0 -689
  491. package/src/VirtualFileSystem/internalTypes.d.ts.map +0 -1
  492. package/src/VirtualFileSystem/internalTypes.js +0 -0
  493. package/src/VirtualFileSystem/path.d.ts.map +0 -1
  494. package/src/VirtualFileSystem/path.js +0 -49
  495. package/src/VirtualPackageManager/index.d.ts.map +0 -1
  496. package/src/VirtualPackageManager/index.js +0 -853
  497. package/src/VirtualShell/index.d.ts.map +0 -1
  498. package/src/VirtualShell/index.js +0 -284
  499. package/src/VirtualShell/shell.d.ts.map +0 -1
  500. package/src/VirtualShell/shell.js +0 -502
  501. package/src/VirtualShell/shellParser.d.ts.map +0 -1
  502. package/src/VirtualShell/shellParser.js +0 -265
  503. package/src/VirtualUserManager/index.d.ts.map +0 -1
  504. package/src/VirtualUserManager/index.js +0 -607
  505. package/src/commands/adduser.d.ts.map +0 -1
  506. package/src/commands/adduser.js +0 -89
  507. package/src/commands/alias.d.ts.map +0 -1
  508. package/src/commands/alias.js +0 -68
  509. package/src/commands/apt.d.ts.map +0 -1
  510. package/src/commands/apt.js +0 -210
  511. package/src/commands/awk.d.ts.map +0 -1
  512. package/src/commands/awk.js +0 -169
  513. package/src/commands/base64.d.ts.map +0 -1
  514. package/src/commands/base64.js +0 -28
  515. package/src/commands/cat.d.ts.map +0 -1
  516. package/src/commands/cat.js +0 -44
  517. package/src/commands/cd.d.ts.map +0 -1
  518. package/src/commands/cd.js +0 -21
  519. package/src/commands/chmod.d.ts.map +0 -1
  520. package/src/commands/chmod.js +0 -87
  521. package/src/commands/clear.d.ts.map +0 -1
  522. package/src/commands/clear.js +0 -13
  523. package/src/commands/command-helpers.d.ts.map +0 -1
  524. package/src/commands/command-helpers.js +0 -221
  525. package/src/commands/cp.d.ts.map +0 -1
  526. package/src/commands/cp.js +0 -75
  527. package/src/commands/curl.d.ts.map +0 -1
  528. package/src/commands/curl.js +0 -127
  529. package/src/commands/cut.d.ts.map +0 -1
  530. package/src/commands/cut.js +0 -34
  531. package/src/commands/date.d.ts.map +0 -1
  532. package/src/commands/date.js +0 -28
  533. package/src/commands/declare.d.ts.map +0 -1
  534. package/src/commands/declare.js +0 -44
  535. package/src/commands/deluser.d.ts.map +0 -1
  536. package/src/commands/deluser.js +0 -83
  537. package/src/commands/df.d.ts.map +0 -1
  538. package/src/commands/df.js +0 -21
  539. package/src/commands/diff.d.ts.map +0 -1
  540. package/src/commands/diff.js +0 -45
  541. package/src/commands/dpkg.d.ts.map +0 -1
  542. package/src/commands/dpkg.js +0 -161
  543. package/src/commands/du.d.ts.map +0 -1
  544. package/src/commands/du.js +0 -50
  545. package/src/commands/echo.d.ts.map +0 -1
  546. package/src/commands/echo.js +0 -45
  547. package/src/commands/env.d.ts.map +0 -1
  548. package/src/commands/env.js +0 -20
  549. package/src/commands/exit.d.ts.map +0 -1
  550. package/src/commands/exit.js +0 -16
  551. package/src/commands/export.d.ts.map +0 -1
  552. package/src/commands/export.js +0 -33
  553. package/src/commands/find.d.ts.map +0 -1
  554. package/src/commands/find.js +0 -55
  555. package/src/commands/free.d.ts.map +0 -1
  556. package/src/commands/free.js +0 -43
  557. package/src/commands/grep.d.ts.map +0 -1
  558. package/src/commands/grep.js +0 -120
  559. package/src/commands/groups.d.ts.map +0 -1
  560. package/src/commands/groups.js +0 -17
  561. package/src/commands/gzip.d.ts.map +0 -1
  562. package/src/commands/gzip.js +0 -82
  563. package/src/commands/head.d.ts.map +0 -1
  564. package/src/commands/head.js +0 -46
  565. package/src/commands/help.d.ts.map +0 -1
  566. package/src/commands/help.js +0 -123
  567. package/src/commands/helpers.d.ts.map +0 -1
  568. package/src/commands/helpers.js +0 -166
  569. package/src/commands/history.d.ts.map +0 -1
  570. package/src/commands/history.js +0 -26
  571. package/src/commands/hostname.d.ts.map +0 -1
  572. package/src/commands/hostname.js +0 -12
  573. package/src/commands/htop.d.ts.map +0 -1
  574. package/src/commands/htop.js +0 -17
  575. package/src/commands/id.d.ts.map +0 -1
  576. package/src/commands/id.js +0 -17
  577. package/src/commands/index.d.ts.map +0 -1
  578. package/src/commands/index.js +0 -2
  579. package/src/commands/kill.d.ts.map +0 -1
  580. package/src/commands/kill.js +0 -18
  581. package/src/commands/ln.d.ts.map +0 -1
  582. package/src/commands/ln.js +0 -66
  583. package/src/commands/ls.d.ts.map +0 -1
  584. package/src/commands/ls.js +0 -200
  585. package/src/commands/lsb-release.d.ts.map +0 -1
  586. package/src/commands/lsb-release.js +0 -61
  587. package/src/commands/man.d.ts.map +0 -1
  588. package/src/commands/man.js +0 -49
  589. package/src/commands/mkdir.d.ts.map +0 -1
  590. package/src/commands/mkdir.js +0 -28
  591. package/src/commands/mv.d.ts.map +0 -1
  592. package/src/commands/mv.js +0 -42
  593. package/src/commands/nano.d.ts.map +0 -1
  594. package/src/commands/nano.js +0 -34
  595. package/src/commands/neofetch.d.ts.map +0 -1
  596. package/src/commands/neofetch.js +0 -48
  597. package/src/commands/node.d.ts.map +0 -1
  598. package/src/commands/node.js +0 -316
  599. package/src/commands/npm.d.ts.map +0 -1
  600. package/src/commands/npm.js +0 -109
  601. package/src/commands/passwd.d.ts.map +0 -1
  602. package/src/commands/passwd.js +0 -44
  603. package/src/commands/ping.d.ts.map +0 -1
  604. package/src/commands/ping.js +0 -28
  605. package/src/commands/printf.d.ts.map +0 -1
  606. package/src/commands/printf.js +0 -144
  607. package/src/commands/ps.d.ts.map +0 -1
  608. package/src/commands/ps.js +0 -46
  609. package/src/commands/pwd.d.ts.map +0 -1
  610. package/src/commands/pwd.js +0 -7
  611. package/src/commands/python.d.ts.map +0 -1
  612. package/src/commands/python.js +0 -2058
  613. package/src/commands/read.d.ts.map +0 -1
  614. package/src/commands/read.js +0 -39
  615. package/src/commands/registry.d.ts.map +0 -1
  616. package/src/commands/registry.js +0 -234
  617. package/src/commands/rm.d.ts.map +0 -1
  618. package/src/commands/rm.js +0 -36
  619. package/src/commands/runtime.d.ts.map +0 -1
  620. package/src/commands/runtime.js +0 -285
  621. package/src/commands/sed.d.ts.map +0 -1
  622. package/src/commands/sed.js +0 -60
  623. package/src/commands/seq.d.ts.map +0 -1
  624. package/src/commands/seq.js +0 -50
  625. package/src/commands/set.d.ts.map +0 -1
  626. package/src/commands/set.js +0 -26
  627. package/src/commands/sh.d.ts.map +0 -1
  628. package/src/commands/sh.js +0 -431
  629. package/src/commands/shift.d.ts.map +0 -1
  630. package/src/commands/shift.js +0 -62
  631. package/src/commands/sleep.d.ts.map +0 -1
  632. package/src/commands/sleep.js +0 -18
  633. package/src/commands/sort.d.ts.map +0 -1
  634. package/src/commands/sort.js +0 -44
  635. package/src/commands/source.d.ts.map +0 -1
  636. package/src/commands/source.js +0 -39
  637. package/src/commands/stat.d.ts.map +0 -1
  638. package/src/commands/stat.js +0 -56
  639. package/src/commands/su.d.ts.map +0 -1
  640. package/src/commands/su.js +0 -57
  641. package/src/commands/sudo.d.ts.map +0 -1
  642. package/src/commands/sudo.js +0 -54
  643. package/src/commands/tail.d.ts.map +0 -1
  644. package/src/commands/tail.js +0 -47
  645. package/src/commands/tar.d.ts.map +0 -1
  646. package/src/commands/tar.js +0 -102
  647. package/src/commands/tee.d.ts.map +0 -1
  648. package/src/commands/tee.js +0 -36
  649. package/src/commands/test.d.ts.map +0 -1
  650. package/src/commands/test.js +0 -114
  651. package/src/commands/touch.d.ts.map +0 -1
  652. package/src/commands/touch.js +0 -25
  653. package/src/commands/tr.d.ts.map +0 -1
  654. package/src/commands/tr.js +0 -61
  655. package/src/commands/tree.d.ts.map +0 -1
  656. package/src/commands/tree.js +0 -18
  657. package/src/commands/true.d.ts.map +0 -1
  658. package/src/commands/true.js +0 -24
  659. package/src/commands/type.d.ts.map +0 -1
  660. package/src/commands/type.js +0 -39
  661. package/src/commands/uname.d.ts.map +0 -1
  662. package/src/commands/uname.js +0 -29
  663. package/src/commands/uniq.d.ts.map +0 -1
  664. package/src/commands/uniq.js +0 -38
  665. package/src/commands/unset.d.ts.map +0 -1
  666. package/src/commands/unset.js +0 -16
  667. package/src/commands/uptime.d.ts.map +0 -1
  668. package/src/commands/uptime.js +0 -48
  669. package/src/commands/wc.d.ts.map +0 -1
  670. package/src/commands/wc.js +0 -55
  671. package/src/commands/wget.d.ts.map +0 -1
  672. package/src/commands/wget.js +0 -126
  673. package/src/commands/which.d.ts.map +0 -1
  674. package/src/commands/which.js +0 -32
  675. package/src/commands/who.d.ts.map +0 -1
  676. package/src/commands/who.js +0 -22
  677. package/src/commands/whoami.d.ts.map +0 -1
  678. package/src/commands/whoami.js +0 -12
  679. package/src/commands/xargs.d.ts.map +0 -1
  680. package/src/commands/xargs.js +0 -21
  681. package/src/index.d.ts.map +0 -1
  682. package/src/index.js +0 -9
  683. package/src/modules/linuxRootfs.d.ts.map +0 -1
  684. package/src/modules/linuxRootfs.js +0 -619
  685. package/src/modules/neofetch.d.ts.map +0 -1
  686. package/src/modules/neofetch.js +0 -284
  687. package/src/modules/shellInteractive.d.ts.map +0 -1
  688. package/src/modules/shellInteractive.js +0 -26
  689. package/src/modules/shellRuntime.d.ts.map +0 -1
  690. package/src/modules/shellRuntime.js +0 -52
  691. package/src/self-standalone.d.ts.map +0 -1
  692. package/src/self-standalone.js +0 -418
  693. package/src/standalone-wo-sftp.d.ts.map +0 -1
  694. package/src/standalone-wo-sftp.js +0 -30
  695. package/src/standalone.d.ts.map +0 -1
  696. package/src/standalone.js +0 -35
  697. package/src/types/commands.d.ts.map +0 -1
  698. package/src/types/commands.js +0 -0
  699. package/src/types/pipeline.d.ts.map +0 -1
  700. package/src/types/pipeline.js +0 -0
  701. package/src/types/streams.d.ts.map +0 -1
  702. package/src/types/streams.js +0 -0
  703. package/src/types/vfs.d.ts.map +0 -1
  704. package/src/types/vfs.js +0 -0
  705. package/src/utils/expand.d.ts.map +0 -1
  706. package/src/utils/expand.js +0 -476
  707. package/src/utils/perfLogger.d.ts.map +0 -1
  708. package/src/utils/perfLogger.js +0 -49
  709. package/src/utils/tokenize.d.ts.map +0 -1
  710. package/src/utils/tokenize.js +0 -114
  711. package/src/utils/vfsDiff.d.ts.map +0 -1
  712. package/src/utils/vfsDiff.js +0 -177
  713. package/src/web-api.d.ts.map +0 -1
  714. package/src/web-api.js +0 -46
  715. package/src/web-full.d.ts.map +0 -1
  716. package/src/web-full.js +0 -8
  717. package/src/web.d.ts.map +0 -1
  718. package/src/web.js +0 -773
  719. package/tests/command-helpers.test.d.ts +0 -2
  720. package/tests/command-helpers.test.d.ts.map +0 -1
  721. package/tests/command-helpers.test.js +0 -92
  722. package/tests/commands-admin-net.test.d.ts +0 -2
  723. package/tests/commands-admin-net.test.d.ts.map +0 -1
  724. package/tests/commands-admin-net.test.js +0 -353
  725. package/tests/commands-advanced.test.d.ts +0 -2
  726. package/tests/commands-advanced.test.d.ts.map +0 -1
  727. package/tests/commands-advanced.test.js +0 -378
  728. package/tests/commands-core.test.d.ts +0 -2
  729. package/tests/commands-core.test.d.ts.map +0 -1
  730. package/tests/commands-core.test.js +0 -477
  731. package/tests/commands-missing.test.d.ts +0 -2
  732. package/tests/commands-missing.test.d.ts.map +0 -1
  733. package/tests/commands-missing.test.js +0 -470
  734. package/tests/commands-specific-units.test.d.ts +0 -2
  735. package/tests/commands-specific-units.test.d.ts.map +0 -1
  736. package/tests/commands-specific-units.test.js +0 -264
  737. package/tests/commands-text-sys.test.d.ts +0 -2
  738. package/tests/commands-text-sys.test.d.ts.map +0 -1
  739. package/tests/commands-text-sys.test.js +0 -366
  740. package/tests/expand.test.d.ts +0 -2
  741. package/tests/expand.test.d.ts.map +0 -1
  742. package/tests/expand.test.js +0 -138
  743. package/tests/helpers.test.d.ts +0 -2
  744. package/tests/helpers.test.d.ts.map +0 -1
  745. package/tests/helpers.test.js +0 -52
  746. package/tests/new-features.test.d.ts +0 -2
  747. package/tests/new-features.test.d.ts.map +0 -1
  748. package/tests/new-features.test.js +0 -850
  749. package/tests/parser-executor.test.d.ts +0 -2
  750. package/tests/parser-executor.test.d.ts.map +0 -1
  751. package/tests/parser-executor.test.js +0 -25
  752. package/tests/sftp.test.d.ts +0 -2
  753. package/tests/sftp.test.d.ts.map +0 -1
  754. package/tests/sftp.test.js +0 -246
  755. package/tests/ssh-exec.test.d.ts +0 -2
  756. package/tests/ssh-exec.test.d.ts.map +0 -1
  757. package/tests/ssh-exec.test.js +0 -39
  758. package/tests/test-helper.d.ts +0 -56
  759. package/tests/test-helper.d.ts.map +0 -1
  760. package/tests/test-helper.js +0 -71
  761. package/tests/users.test.d.ts +0 -2
  762. package/tests/users.test.d.ts.map +0 -1
  763. package/tests/users.test.js +0 -71
  764. package/tests/web.test.d.ts +0 -2
  765. package/tests/web.test.d.ts.map +0 -1
  766. package/tests/web.test.js +0 -149
  767. /package/{src → dist}/Honeypot/index.d.ts +0 -0
  768. /package/{src → dist}/SSHClient/index.d.ts +0 -0
  769. /package/{src → dist}/SSHMimic/exec.d.ts +0 -0
  770. /package/{src → dist}/SSHMimic/executor.d.ts +0 -0
  771. /package/{src → dist}/SSHMimic/hostKey.d.ts +0 -0
  772. /package/{src → dist}/SSHMimic/index.d.ts +0 -0
  773. /package/{src → dist}/SSHMimic/loginBanner.d.ts +0 -0
  774. /package/{src → dist}/SSHMimic/loginFormat.d.ts +0 -0
  775. /package/{src → dist}/SSHMimic/prompt.d.ts +0 -0
  776. /package/{src → dist}/SSHMimic/sftp.d.ts +0 -0
  777. /package/{src → dist}/VirtualFileSystem/binaryPack.d.ts +0 -0
  778. /package/{src → dist}/VirtualFileSystem/index.d.ts +0 -0
  779. /package/{src → dist}/VirtualFileSystem/internalTypes.d.ts +0 -0
  780. /package/{src → dist}/VirtualFileSystem/path.d.ts +0 -0
  781. /package/{src → dist}/VirtualPackageManager/index.d.ts +0 -0
  782. /package/{src → dist}/VirtualShell/index.d.ts +0 -0
  783. /package/{src → dist}/VirtualShell/shell.d.ts +0 -0
  784. /package/{src → dist}/VirtualShell/shellParser.d.ts +0 -0
  785. /package/{src → dist}/VirtualUserManager/index.d.ts +0 -0
  786. /package/{src → dist}/commands/adduser.d.ts +0 -0
  787. /package/{src → dist}/commands/alias.d.ts +0 -0
  788. /package/{src → dist}/commands/apt.d.ts +0 -0
  789. /package/{src → dist}/commands/awk.d.ts +0 -0
  790. /package/{src → dist}/commands/base64.d.ts +0 -0
  791. /package/{src → dist}/commands/cat.d.ts +0 -0
  792. /package/{src → dist}/commands/cd.d.ts +0 -0
  793. /package/{src → dist}/commands/chmod.d.ts +0 -0
  794. /package/{src → dist}/commands/clear.d.ts +0 -0
  795. /package/{src → dist}/commands/command-helpers.d.ts +0 -0
  796. /package/{src → dist}/commands/cp.d.ts +0 -0
  797. /package/{src → dist}/commands/curl.d.ts +0 -0
  798. /package/{src → dist}/commands/cut.d.ts +0 -0
  799. /package/{src → dist}/commands/date.d.ts +0 -0
  800. /package/{src → dist}/commands/declare.d.ts +0 -0
  801. /package/{src → dist}/commands/deluser.d.ts +0 -0
  802. /package/{src → dist}/commands/df.d.ts +0 -0
  803. /package/{src → dist}/commands/diff.d.ts +0 -0
  804. /package/{src → dist}/commands/dpkg.d.ts +0 -0
  805. /package/{src → dist}/commands/du.d.ts +0 -0
  806. /package/{src → dist}/commands/echo.d.ts +0 -0
  807. /package/{src → dist}/commands/env.d.ts +0 -0
  808. /package/{src → dist}/commands/exit.d.ts +0 -0
  809. /package/{src → dist}/commands/export.d.ts +0 -0
  810. /package/{src → dist}/commands/find.d.ts +0 -0
  811. /package/{src → dist}/commands/free.d.ts +0 -0
  812. /package/{src → dist}/commands/grep.d.ts +0 -0
  813. /package/{src → dist}/commands/groups.d.ts +0 -0
  814. /package/{src → dist}/commands/gzip.d.ts +0 -0
  815. /package/{src → dist}/commands/head.d.ts +0 -0
  816. /package/{src → dist}/commands/help.d.ts +0 -0
  817. /package/{src → dist}/commands/helpers.d.ts +0 -0
  818. /package/{src → dist}/commands/history.d.ts +0 -0
  819. /package/{src → dist}/commands/hostname.d.ts +0 -0
  820. /package/{src → dist}/commands/htop.d.ts +0 -0
  821. /package/{src → dist}/commands/id.d.ts +0 -0
  822. /package/{src → dist}/commands/index.d.ts +0 -0
  823. /package/{src → dist}/commands/kill.d.ts +0 -0
  824. /package/{src → dist}/commands/ln.d.ts +0 -0
  825. /package/{src → dist}/commands/ls.d.ts +0 -0
  826. /package/{src → dist}/commands/lsb-release.d.ts +0 -0
  827. /package/{src → dist}/commands/man.d.ts +0 -0
  828. /package/{src → dist}/commands/mkdir.d.ts +0 -0
  829. /package/{src → dist}/commands/mv.d.ts +0 -0
  830. /package/{src → dist}/commands/nano.d.ts +0 -0
  831. /package/{src → dist}/commands/neofetch.d.ts +0 -0
  832. /package/{src → dist}/commands/node.d.ts +0 -0
  833. /package/{src → dist}/commands/npm.d.ts +0 -0
  834. /package/{src → dist}/commands/passwd.d.ts +0 -0
  835. /package/{src → dist}/commands/ping.d.ts +0 -0
  836. /package/{src → dist}/commands/printf.d.ts +0 -0
  837. /package/{src → dist}/commands/ps.d.ts +0 -0
  838. /package/{src → dist}/commands/pwd.d.ts +0 -0
  839. /package/{src → dist}/commands/python.d.ts +0 -0
  840. /package/{src → dist}/commands/read.d.ts +0 -0
  841. /package/{src → dist}/commands/registry.d.ts +0 -0
  842. /package/{src → dist}/commands/rm.d.ts +0 -0
  843. /package/{src → dist}/commands/runtime.d.ts +0 -0
  844. /package/{src → dist}/commands/sed.d.ts +0 -0
  845. /package/{src → dist}/commands/seq.d.ts +0 -0
  846. /package/{src → dist}/commands/set.d.ts +0 -0
  847. /package/{src → dist}/commands/sh.d.ts +0 -0
  848. /package/{src → dist}/commands/shift.d.ts +0 -0
  849. /package/{src → dist}/commands/sleep.d.ts +0 -0
  850. /package/{src → dist}/commands/sort.d.ts +0 -0
  851. /package/{src → dist}/commands/source.d.ts +0 -0
  852. /package/{src → dist}/commands/stat.d.ts +0 -0
  853. /package/{src → dist}/commands/su.d.ts +0 -0
  854. /package/{src → dist}/commands/sudo.d.ts +0 -0
  855. /package/{src → dist}/commands/tail.d.ts +0 -0
  856. /package/{src → dist}/commands/tar.d.ts +0 -0
  857. /package/{src → dist}/commands/tee.d.ts +0 -0
  858. /package/{src → dist}/commands/test.d.ts +0 -0
  859. /package/{src → dist}/commands/touch.d.ts +0 -0
  860. /package/{src → dist}/commands/tr.d.ts +0 -0
  861. /package/{src → dist}/commands/tree.d.ts +0 -0
  862. /package/{src → dist}/commands/true.d.ts +0 -0
  863. /package/{src → dist}/commands/type.d.ts +0 -0
  864. /package/{src → dist}/commands/uname.d.ts +0 -0
  865. /package/{src → dist}/commands/uniq.d.ts +0 -0
  866. /package/{src → dist}/commands/unset.d.ts +0 -0
  867. /package/{src → dist}/commands/uptime.d.ts +0 -0
  868. /package/{src → dist}/commands/wc.d.ts +0 -0
  869. /package/{src → dist}/commands/wget.d.ts +0 -0
  870. /package/{src → dist}/commands/which.d.ts +0 -0
  871. /package/{src → dist}/commands/who.d.ts +0 -0
  872. /package/{src → dist}/commands/whoami.d.ts +0 -0
  873. /package/{src → dist}/commands/xargs.d.ts +0 -0
  874. /package/{src → dist}/index.d.ts +0 -0
  875. /package/{src → dist}/modules/linuxRootfs.d.ts +0 -0
  876. /package/{src → dist}/modules/neofetch.d.ts +0 -0
  877. /package/{src → dist}/modules/shellInteractive.d.ts +0 -0
  878. /package/{src → dist}/modules/shellRuntime.d.ts +0 -0
  879. /package/{src → dist}/self-standalone.d.ts +0 -0
  880. /package/{src → dist}/standalone-wo-sftp.d.ts +0 -0
  881. /package/{src → dist}/standalone.d.ts +0 -0
  882. /package/{src → dist}/types/commands.d.ts +0 -0
  883. /package/{src → dist}/types/pipeline.d.ts +0 -0
  884. /package/{src → dist}/types/streams.d.ts +0 -0
  885. /package/{src → dist}/types/vfs.d.ts +0 -0
  886. /package/{src → dist}/utils/expand.d.ts +0 -0
  887. /package/{src → dist}/utils/perfLogger.d.ts +0 -0
  888. /package/{src → dist}/utils/tokenize.d.ts +0 -0
  889. /package/{src → dist}/utils/vfsDiff.d.ts +0 -0
  890. /package/{src → dist}/web-api.d.ts +0 -0
  891. /package/{src → dist}/web-full.d.ts +0 -0
  892. /package/{src → dist}/web.d.ts +0 -0
@@ -1,68 +0,0 @@
1
- import { ifFlag } from "./command-helpers";
2
- /**
3
- * Manage shell aliases (list / set / remove).
4
- * @category shell
5
- * @params ["[name[=value] ...]"]
6
- */
7
- export const aliasCommand = {
8
- name: "alias",
9
- description: "Define or display aliases",
10
- category: "shell",
11
- params: ["[name[=value] ...]"],
12
- run: ({ args, env }) => {
13
- if (!env)
14
- return { exitCode: 0 };
15
- // Aliases stored in env.vars under prefix __alias_
16
- if (args.length === 0) {
17
- const aliases = Object.entries(env.vars)
18
- .filter(([k]) => k.startsWith("__alias_"))
19
- .map(([k, v]) => `alias ${k.slice("__alias_".length)}='${v}'`);
20
- return { stdout: aliases.join("\n") || "", exitCode: 0 };
21
- }
22
- const lines = [];
23
- for (const arg of args) {
24
- const eq = arg.indexOf("=");
25
- if (eq === -1) {
26
- // Display single alias
27
- const val = env.vars[`__alias_${arg}`];
28
- if (val)
29
- lines.push(`alias ${arg}='${val}'`);
30
- else
31
- return { stderr: `alias: ${arg}: not found`, exitCode: 1 };
32
- }
33
- else {
34
- // Set alias
35
- const name = arg.slice(0, eq);
36
- const val = arg.slice(eq + 1).replace(/^['"]|['"]$/g, "");
37
- env.vars[`__alias_${name}`] = val;
38
- }
39
- }
40
- return { stdout: lines.join("\n") || undefined, exitCode: 0 };
41
- },
42
- };
43
- /**
44
- * Remove shell aliases.
45
- * @category shell
46
- * @params ["<name...>"]
47
- */
48
- export const unaliasCommand = {
49
- name: "unalias",
50
- description: "Remove alias definitions",
51
- category: "shell",
52
- params: ["<name...> | -a"],
53
- run: ({ args, env }) => {
54
- if (!env)
55
- return { exitCode: 0 };
56
- if (ifFlag(args, ["-a"])) {
57
- for (const k of Object.keys(env.vars)) {
58
- if (k.startsWith("__alias_"))
59
- delete env.vars[k];
60
- }
61
- return { exitCode: 0 };
62
- }
63
- for (const name of args) {
64
- delete env.vars[`__alias_${name}`];
65
- }
66
- return { exitCode: 0 };
67
- },
68
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"apt.d.ts","sourceRoot":"","sources":["apt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WAyJxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,WA+D7B,CAAC"}
@@ -1,210 +0,0 @@
1
- import { ifFlag } from "./command-helpers";
2
- import { getPackageManager } from "./helpers";
3
- /**
4
- * APT package manager front-end (simulated).
5
- * @category package
6
- * @params ["<install|remove|update|upgrade|search|show|list> [pkg...]"]
7
- */
8
- export const aptCommand = {
9
- name: "apt",
10
- aliases: ["apt-get"],
11
- description: "Package manager",
12
- category: "package",
13
- params: ["<install|remove|update|upgrade|search|show|list> [pkg...]"],
14
- run: ({ args, shell, authUser }) => {
15
- const pm = getPackageManager(shell);
16
- if (!pm)
17
- return { stderr: "apt: package manager not initialised", exitCode: 1 };
18
- const sub = args[0]?.toLowerCase();
19
- const rest = args.slice(1);
20
- const quiet = ifFlag(rest, ["-q", "--quiet", "-qq"]);
21
- const purge = ifFlag(rest, ["--purge"]);
22
- const pkgs = rest.filter((a) => !a.startsWith("-"));
23
- // Non-root check
24
- const restricted = ["install", "remove", "purge", "upgrade", "update"];
25
- if (restricted.includes(sub ?? "") && authUser !== "root") {
26
- return {
27
- stderr: "E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)\nE: Unable to acquire the dpkg frontend lock, are you root?",
28
- exitCode: 100,
29
- };
30
- }
31
- switch (sub) {
32
- case "install": {
33
- if (pkgs.length === 0)
34
- return { stderr: "apt: no packages specified", exitCode: 1 };
35
- const { output, exitCode } = pm.install(pkgs, { quiet });
36
- return { stdout: output || undefined, exitCode };
37
- }
38
- case "remove":
39
- case "purge": {
40
- if (pkgs.length === 0)
41
- return { stderr: "apt: no packages specified", exitCode: 1 };
42
- const { output, exitCode } = pm.remove(pkgs, {
43
- purge: sub === "purge" || purge,
44
- quiet,
45
- });
46
- return { stdout: output || undefined, exitCode };
47
- }
48
- case "update": {
49
- return {
50
- stdout: [
51
- "Hit:1 fortune://packages.fortune.local aurora InRelease",
52
- "Hit:2 fortune://security.fortune.local aurora-security InRelease",
53
- "Reading package lists... Done",
54
- "Building dependency tree... Done",
55
- "Reading state information... Done",
56
- `All packages are up to date.`,
57
- ].join("\n"),
58
- exitCode: 0,
59
- };
60
- }
61
- case "upgrade": {
62
- return {
63
- stdout: [
64
- "Reading package lists... Done",
65
- "Building dependency tree... Done",
66
- "Reading state information... Done",
67
- "Calculating upgrade... Done",
68
- "0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.",
69
- ].join("\n"),
70
- exitCode: 0,
71
- };
72
- }
73
- case "search": {
74
- const term = pkgs[0];
75
- if (!term)
76
- return { stderr: "apt: search requires a term", exitCode: 1 };
77
- const results = pm.search(term);
78
- if (results.length === 0)
79
- return {
80
- stdout: `Sorting... Done\nFull Text Search... Done\n(no results)`,
81
- exitCode: 0,
82
- };
83
- const lines = results.map((p) => `${p.name}/${p.section ?? "misc"} ${p.version} amd64\n ${p.shortDesc ?? p.description}`);
84
- return {
85
- stdout: `Sorting... Done\nFull Text Search... Done\n${lines.join("\n")}`,
86
- exitCode: 0,
87
- };
88
- }
89
- case "show": {
90
- const name = pkgs[0];
91
- if (!name)
92
- return { stderr: "apt: show requires a package name", exitCode: 1 };
93
- const info = pm.show(name);
94
- if (!info)
95
- return {
96
- stderr: `N: Unable to locate package ${name}`,
97
- exitCode: 100,
98
- };
99
- return { stdout: info, exitCode: 0 };
100
- }
101
- case "list": {
102
- const installedFlag = ifFlag(rest, ["--installed"]);
103
- if (installedFlag) {
104
- const pkgList = pm.listInstalled();
105
- if (pkgList.length === 0)
106
- return {
107
- stdout: "Listing... Done\n(no packages installed)",
108
- exitCode: 0,
109
- };
110
- const lines = pkgList.map((p) => `${p.name}/${p.section} ${p.version} ${p.architecture} [installed]`);
111
- return {
112
- stdout: `Listing... Done\n${lines.join("\n")}`,
113
- exitCode: 0,
114
- };
115
- }
116
- // all available
117
- const all = pm.listAvailable();
118
- const lines = all.map((p) => `${p.name}/${p.section ?? "misc"} ${p.version} amd64`);
119
- return { stdout: `Listing... Done\n${lines.join("\n")}`, exitCode: 0 };
120
- }
121
- default: {
122
- return {
123
- stdout: [
124
- "Usage: apt [options] command",
125
- "",
126
- "Commands:",
127
- " install <pkg...> Install packages",
128
- " remove <pkg...> Remove packages",
129
- " purge <pkg...> Remove packages and config files",
130
- " update Refresh package index",
131
- " upgrade Upgrade all packages",
132
- " search <term> Search in package descriptions",
133
- " show <pkg> Show package details",
134
- " list [--installed] List packages",
135
- ].join("\n"),
136
- exitCode: 0,
137
- };
138
- }
139
- }
140
- },
141
- };
142
- /**
143
- * Query the package cache and retrieve package information.
144
- * @category package
145
- * @params ["<search|show|policy> [pkg]"]
146
- */
147
- export const aptCacheCommand = {
148
- name: "apt-cache",
149
- description: "Query the package cache",
150
- category: "package",
151
- params: ["<search|show|policy> [pkg]"],
152
- run: ({ args, shell }) => {
153
- const pm = getPackageManager(shell);
154
- if (!pm)
155
- return {
156
- stderr: "apt-cache: package manager not initialised",
157
- exitCode: 1,
158
- };
159
- const sub = args[0]?.toLowerCase();
160
- const pkgName = args[1];
161
- switch (sub) {
162
- case "search": {
163
- if (!pkgName)
164
- return { stderr: "Need a search term", exitCode: 1 };
165
- const results = pm.search(pkgName);
166
- return {
167
- stdout: results
168
- .map((p) => `${p.name} - ${p.shortDesc ?? p.description}`)
169
- .join("\n") || "(no results)",
170
- exitCode: 0,
171
- };
172
- }
173
- case "show": {
174
- if (!pkgName)
175
- return { stderr: "Need a package name", exitCode: 1 };
176
- const info = pm.show(pkgName);
177
- return info
178
- ? { stdout: info, exitCode: 0 }
179
- : { stderr: `N: Unable to locate package ${pkgName}`, exitCode: 100 };
180
- }
181
- case "policy": {
182
- if (!pkgName)
183
- return { stderr: "Need a package name", exitCode: 1 };
184
- const def = pm.findInRegistry(pkgName);
185
- if (!def)
186
- return {
187
- stderr: `N: Unable to locate package ${pkgName}`,
188
- exitCode: 100,
189
- };
190
- const inst = pm.isInstalled(pkgName);
191
- return {
192
- stdout: [
193
- `${pkgName}:`,
194
- ` Installed: ${inst ? def.version : "(none)"}`,
195
- ` Candidate: ${def.version}`,
196
- ` Version table:`,
197
- ` ${def.version} 500`,
198
- ` 500 fortune://packages.fortune.local aurora/main amd64 Packages`,
199
- ].join("\n"),
200
- exitCode: 0,
201
- };
202
- }
203
- default:
204
- return {
205
- stderr: `apt-cache: unknown command '${sub ?? ""}'`,
206
- exitCode: 1,
207
- };
208
- }
209
- },
210
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"awk.d.ts","sourceRoot":"","sources":["awk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,EAAE,WAsJxB,CAAC"}
@@ -1,169 +0,0 @@
1
- import { getFlag } from "./command-helpers";
2
- import { assertPathAccess, resolvePath } from "./helpers";
3
- /**
4
- * Minimal awk-like pattern scanner.
5
- *
6
- * Supported:
7
- * - `NR==N` pattern (line number condition)
8
- * - `NF` (number of fields)
9
- * - `/regex/` pattern
10
- * - `{ print $N, $M, ... }` action
11
- * - `{ print }` / `{ print $0 }`
12
- * - `BEGIN { ... }` and `END { ... }` blocks (no side effects)
13
- * - `$NF` (last field)
14
- * - `-F sep` field separator
15
- */
16
- export const awkCommand = {
17
- name: "awk",
18
- description: "Pattern scanning and processing language",
19
- category: "text",
20
- params: ["[-F <sep>] '<program>' [file]"],
21
- run: ({ authUser, args, stdin, cwd, shell }) => {
22
- const sep = getFlag(args, ["-F"]) ?? " ";
23
- const nonFlagArgs = args.filter((a) => !a.startsWith("-") && a !== sep);
24
- const prog = nonFlagArgs[0];
25
- const fileArg = nonFlagArgs[1];
26
- if (!prog)
27
- return { stderr: "awk: no program", exitCode: 1 };
28
- let input = stdin ?? "";
29
- if (fileArg) {
30
- const filePath = resolvePath(cwd, fileArg);
31
- try {
32
- assertPathAccess(authUser, filePath, "awk");
33
- input = shell.vfs.readFile(filePath);
34
- }
35
- catch {
36
- return { stderr: `awk: ${fileArg}: No such file or directory`, exitCode: 1 };
37
- }
38
- }
39
- const lines = input.split("\n");
40
- // Remove empty last element if input ends with \n
41
- if (lines[lines.length - 1] === "")
42
- lines.pop();
43
- const clauses = [];
44
- const progTrim = prog.trim();
45
- // Handle single unbraced pattern (NR==2, /regex/)
46
- if (!progTrim.startsWith("{") && !progTrim.includes("{")) {
47
- clauses.push({ pattern: progTrim, action: "print $0" });
48
- }
49
- else {
50
- // Parse "pattern { action } pattern2 { action2 }"
51
- const clauseRe = /([^{]*)\{([^}]*)\}/g;
52
- let m2 = clauseRe.exec(progTrim);
53
- while (m2 !== null) {
54
- clauses.push({ pattern: m2[1].trim(), action: m2[2].trim() });
55
- m2 = clauseRe.exec(progTrim);
56
- }
57
- if (clauses.length === 0) {
58
- clauses.push({ pattern: "", action: progTrim.replace(/[{}]/g, "").trim() });
59
- }
60
- }
61
- const out = [];
62
- // BEGIN / END
63
- const beginClause = clauses.find((c) => c.pattern === "BEGIN");
64
- const endClause = clauses.find((c) => c.pattern === "END");
65
- const mainClauses = clauses.filter((c) => c.pattern !== "BEGIN" && c.pattern !== "END");
66
- function splitFields(line) {
67
- if (sep === " ")
68
- return line.trim().split(/\s+/).filter(Boolean);
69
- return line.split(sep);
70
- }
71
- function evalAction(action, line, nr) {
72
- const parts = splitFields(line);
73
- const nf = parts.length;
74
- // Expand variables
75
- const resolve = (expr) => {
76
- expr = expr.trim();
77
- if (expr === "NR")
78
- return String(nr);
79
- if (expr === "NF")
80
- return String(nf);
81
- if (expr === "$0")
82
- return line;
83
- if (expr === "$NF")
84
- return parts[nf - 1] ?? "";
85
- if (/^\$\d+$/.test(expr))
86
- return parts[parseInt(expr.slice(1), 10) - 1] ?? "";
87
- // Arithmetic NR+1, NF-1
88
- const arith = expr.replace(/\bNR\b/g, String(nr)).replace(/\bNF\b/g, String(nf));
89
- if (/^[\d\s+\-*/()]+$/.test(arith)) {
90
- try {
91
- return String(Function(`"use strict"; return (${arith});`)());
92
- }
93
- catch { }
94
- }
95
- return expr.replace(/"/g, "");
96
- };
97
- const stmts = action.split(";").map((s) => s.trim()).filter(Boolean);
98
- for (const stmt of stmts) {
99
- if (stmt === "print" || stmt === "print $0") {
100
- out.push(line);
101
- }
102
- else if (stmt.startsWith("print ")) {
103
- const args2 = stmt.slice(6).split(/\s*,\s*/);
104
- out.push(args2.map(resolve).join("\t"));
105
- }
106
- }
107
- }
108
- function matchPattern(pattern, line, nr) {
109
- if (!pattern)
110
- return true;
111
- if (pattern === "1")
112
- return true;
113
- // NR==N or NR>N etc.
114
- const nrCond = pattern.match(/^NR\s*([=!<>]=?|==)\s*(\d+)$/);
115
- if (nrCond) {
116
- const op = nrCond[1];
117
- const val = parseInt(nrCond[2], 10);
118
- switch (op) {
119
- case "==": return nr === val;
120
- case "!=": return nr !== val;
121
- case ">": return nr > val;
122
- case ">=": return nr >= val;
123
- case "<": return nr < val;
124
- case "<=": return nr <= val;
125
- }
126
- }
127
- // NR%N==M
128
- const nrMod = pattern.match(/^NR%(\d+)==(\d+)$/);
129
- if (nrMod) {
130
- return nr % parseInt(nrMod[1], 10) === parseInt(nrMod[2], 10);
131
- }
132
- // /regex/ pattern
133
- if (pattern.startsWith("/") && pattern.endsWith("/")) {
134
- try {
135
- return new RegExp(pattern.slice(1, -1)).test(line);
136
- }
137
- catch {
138
- return false;
139
- }
140
- }
141
- // $N~/regex/
142
- const fieldMatch = pattern.match(/^\$(\d+)~\/(.*)\/$/);
143
- if (fieldMatch) {
144
- const parts = splitFields(line);
145
- const field = parts[parseInt(fieldMatch[1], 10) - 1] ?? "";
146
- try {
147
- return new RegExp(fieldMatch[2]).test(field);
148
- }
149
- catch {
150
- return false;
151
- }
152
- }
153
- return false;
154
- }
155
- if (beginClause)
156
- evalAction(beginClause.action, "", 0);
157
- for (let nr = 1; nr <= lines.length; nr++) {
158
- const line = lines[nr - 1];
159
- for (const clause of mainClauses) {
160
- if (matchPattern(clause.pattern, line, nr)) {
161
- evalAction(clause.action, line, nr);
162
- }
163
- }
164
- }
165
- if (endClause)
166
- evalAction(endClause.action, "", lines.length + 1);
167
- return { stdout: out.join("\n") + (out.length > 0 ? "\n" : ""), exitCode: 0 };
168
- },
169
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["base64.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WAoB3B,CAAC"}
@@ -1,28 +0,0 @@
1
- import { ifFlag } from "./command-helpers";
2
- /**
3
- * Encode or decode base64 data.
4
- * @category text
5
- * @params ["[-d] [file]"]
6
- */
7
- export const base64Command = {
8
- name: "base64",
9
- description: "Encode/decode base64",
10
- category: "text",
11
- params: ["[-d] [file]"],
12
- run: ({ args, stdin }) => {
13
- const decode = ifFlag(args, ["-d", "--decode"]);
14
- const input = stdin ?? "";
15
- if (decode) {
16
- try {
17
- return {
18
- stdout: Buffer.from(input.trim(), "base64").toString("utf8"),
19
- exitCode: 0,
20
- };
21
- }
22
- catch {
23
- return { stderr: "base64: invalid input", exitCode: 1 };
24
- }
25
- }
26
- return { stdout: Buffer.from(input).toString("base64"), exitCode: 0 };
27
- },
28
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"cat.d.ts","sourceRoot":"","sources":["cat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WA0CxB,CAAC"}
@@ -1,44 +0,0 @@
1
- import { ifFlag } from "./command-helpers";
2
- import { assertPathAccess, resolveReadablePath } from "./helpers";
3
- /**
4
- * Concatenate and print files to stdout.
5
- * @category files
6
- * @params ["[-n] [-b] <file...>"]
7
- */
8
- export const catCommand = {
9
- name: "cat",
10
- description: "Concatenate and print files",
11
- category: "files",
12
- params: ["[-n] [-b] <file...>"],
13
- run: ({ authUser, shell, cwd, args, stdin }) => {
14
- const numberAll = ifFlag(args, ["-n", "--number"]);
15
- const numberNonBlank = ifFlag(args, ["-b", "--number-nonblank"]);
16
- const fileArgs = args.filter((a) => !a.startsWith("-"));
17
- if (fileArgs.length === 0 && stdin !== undefined) {
18
- return { stdout: stdin, exitCode: 0 };
19
- }
20
- if (fileArgs.length === 0) {
21
- return { stderr: "cat: missing file operand", exitCode: 1 };
22
- }
23
- const parts = [];
24
- for (const fileArg of fileArgs) {
25
- const target = resolveReadablePath(shell.vfs, cwd, fileArg);
26
- assertPathAccess(authUser, target, "cat");
27
- parts.push(shell.vfs.readFile(target));
28
- }
29
- const combined = parts.join("");
30
- if (!numberAll && !numberNonBlank) {
31
- return { stdout: combined, exitCode: 0 };
32
- }
33
- let lineNum = 1;
34
- const numbered = combined
35
- .split("\n")
36
- .map((line) => {
37
- if (numberNonBlank && line.trim() === "")
38
- return line;
39
- return `${String(lineNum++).padStart(6)}\t${line}`;
40
- })
41
- .join("\n");
42
- return { stdout: numbered, exitCode: 0 };
43
- },
44
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"cd.d.ts","sourceRoot":"","sources":["cd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,WAevB,CAAC"}
@@ -1,21 +0,0 @@
1
- import { assertPathAccess, resolvePath } from "./helpers";
2
- /**
3
- * Change current working directory.
4
- * @category navigation
5
- * @params ["[path]"]
6
- */
7
- export const cdCommand = {
8
- name: "cd",
9
- description: "Change directory",
10
- category: "navigation",
11
- params: ["[path]"],
12
- run: ({ authUser, shell, cwd, args }) => {
13
- const target = resolvePath(cwd, args[0] ?? `~`);
14
- assertPathAccess(authUser, target, "cd");
15
- const stats = shell.vfs.stat(target);
16
- if (stats.type !== "directory") {
17
- return { stderr: `cd: not a directory: ${target}`, exitCode: 1 };
18
- }
19
- return { nextCwd: target, exitCode: 0 };
20
- },
21
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"chmod.d.ts","sourceRoot":"","sources":["chmod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAuCrD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAwC1B,CAAC"}
@@ -1,87 +0,0 @@
1
- import { assertPathAccess, resolvePath } from "./helpers";
2
- /**
3
- * Parse a symbolic chmod mode string (e.g. "+x", "u+x", "go-w", "a+rx")
4
- * and apply it to the existing mode bits.
5
- * Returns null if the string is not a valid symbolic mode.
6
- */
7
- function applySymbolicMode(existing, modeStr) {
8
- const pattern = /^([ugoa]*)([+\-=])([rwx]*)$/;
9
- const parts = modeStr.split(",");
10
- let mode = existing;
11
- for (const part of parts) {
12
- const m = part.trim().match(pattern);
13
- if (!m)
14
- return null;
15
- const [, who = "a", op, perms = ""] = m;
16
- const targets = who === "" || who === "a" ? ["u", "g", "o"] : who.split("");
17
- const bits = {
18
- u: { r: 0o400, w: 0o200, x: 0o100 },
19
- g: { r: 0o040, w: 0o020, x: 0o010 },
20
- o: { r: 0o004, w: 0o002, x: 0o001 },
21
- };
22
- for (const t of targets) {
23
- for (const p of perms.split("")) {
24
- const bit = bits[t]?.[p];
25
- if (bit === undefined)
26
- continue;
27
- if (op === "+")
28
- mode |= bit;
29
- else if (op === "-")
30
- mode &= ~bit;
31
- else if (op === "=") {
32
- // clear all bits for this target, then set requested
33
- const mask = Object.values(bits[t] ?? {}).reduce((a, b) => a | b, 0);
34
- mode = (mode & ~mask) | bit;
35
- }
36
- }
37
- }
38
- }
39
- return mode;
40
- }
41
- /**
42
- * Change file permissions (octal or symbolic).
43
- * @category files
44
- * @params ["<mode> <file>"]
45
- */
46
- export const chmodCommand = {
47
- name: "chmod",
48
- description: "Change file permissions",
49
- category: "files",
50
- params: ["<mode> <file>"],
51
- run: ({ authUser, shell, cwd, args }) => {
52
- const [modeArg, fileArg] = args;
53
- if (!modeArg || !fileArg) {
54
- return { stderr: "chmod: missing operand", exitCode: 1 };
55
- }
56
- const filePath = resolvePath(cwd, fileArg);
57
- try {
58
- assertPathAccess(authUser, filePath, "chmod");
59
- if (!shell.vfs.exists(filePath)) {
60
- return {
61
- stderr: `chmod: ${fileArg}: No such file or directory`,
62
- exitCode: 1,
63
- };
64
- }
65
- let mode;
66
- const octal = parseInt(modeArg, 8);
67
- if (!Number.isNaN(octal) && /^[0-7]+$/.test(modeArg)) {
68
- mode = octal;
69
- }
70
- else {
71
- // symbolic mode
72
- const existing = shell.vfs.stat(filePath).mode;
73
- const result = applySymbolicMode(existing, modeArg);
74
- if (result === null) {
75
- return { stderr: `chmod: invalid mode: ${modeArg}`, exitCode: 1 };
76
- }
77
- mode = result;
78
- }
79
- shell.vfs.chmod(filePath, mode);
80
- return { exitCode: 0 };
81
- }
82
- catch (err) {
83
- const msg = err instanceof Error ? err.message : String(err);
84
- return { stderr: `chmod: ${msg}`, exitCode: 1 };
85
- }
86
- },
87
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"clear.d.ts","sourceRoot":"","sources":["clear.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAO1B,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Clear the terminal screen.
3
- * @category shell
4
- * @params []
5
- */
6
- export const clearCommand = {
7
- name: "clear",
8
- description: "Clear the terminal screen",
9
- category: "shell",
10
- params: [],
11
- // clearScreen flag triggers \x1b[2J\x1b[H in the shell layer
12
- run: () => ({ clearScreen: true, stdout: "", exitCode: 0 }),
13
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-helpers.d.ts","sourceRoot":"","sources":["command-helpers.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAwFF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAYxE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,OAAO,CACtB,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GACtB,MAAM,GAAG,IAAI,GAAG,SAAS,CA0B3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CACrB,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,eAAoB,GAC3B,MAAM,GAAG,SAAS,CAGpB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,SAAS,CACxB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GAC3D;IACF,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,MAAM,EAAE,CAAC;CACtB,CAiDA"}