typescript-virtual-container 1.3.4 → 1.4.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/.vscode/settings.json +0 -1
- package/README.md +674 -1504
- package/benchmark-results.txt +21 -21
- package/builds/self-standalone.js +274 -208
- package/builds/self-standalone.js.map +4 -4
- package/builds/standalone-wo-sftp.js +201 -149
- package/builds/standalone-wo-sftp.js.map +4 -4
- package/builds/standalone.js +263 -211
- package/builds/standalone.js.map +4 -4
- package/builds/web-full-api.min.js +3 -3
- package/builds/web-full-api.min.js.map +4 -4
- package/builds/web.min.js +2 -2
- package/builds/web.min.js.map +4 -4
- package/bun.lock +14 -12
- package/dist/SSHClient/index.d.ts.map +1 -1
- package/dist/SSHClient/index.js +5 -3
- package/dist/SSHMimic/executor.d.ts +1 -3
- package/dist/SSHMimic/executor.d.ts.map +1 -1
- package/dist/SSHMimic/executor.js +20 -22
- package/dist/SSHMimic/index.d.ts.map +1 -1
- package/dist/SSHMimic/index.js +5 -3
- package/dist/SSHMimic/sftp.d.ts.map +1 -1
- package/dist/SSHMimic/sftp.js +26 -21
- package/dist/VirtualShell/shell.d.ts.map +1 -1
- package/dist/VirtualShell/shell.js +25 -3
- package/dist/VirtualShell/shellParser.d.ts +1 -8
- package/dist/VirtualShell/shellParser.d.ts.map +1 -1
- package/dist/VirtualShell/shellParser.js +2 -81
- package/dist/VirtualUserManager/index.d.ts +7 -1
- package/dist/VirtualUserManager/index.d.ts.map +1 -1
- package/dist/VirtualUserManager/index.js +47 -16
- package/dist/commands/adduser.d.ts +10 -4
- package/dist/commands/adduser.d.ts.map +1 -1
- package/dist/commands/adduser.js +75 -12
- package/dist/commands/alias.d.ts +5 -0
- package/dist/commands/alias.d.ts.map +1 -1
- package/dist/commands/alias.js +5 -0
- package/dist/commands/apt.d.ts +5 -0
- package/dist/commands/apt.d.ts.map +1 -1
- package/dist/commands/apt.js +5 -0
- package/dist/commands/awk.d.ts +10 -8
- package/dist/commands/awk.d.ts.map +1 -1
- package/dist/commands/awk.js +156 -28
- package/dist/commands/cd.d.ts.map +1 -1
- package/dist/commands/cd.js +0 -3
- package/dist/commands/clear.d.ts +5 -0
- package/dist/commands/clear.d.ts.map +1 -1
- package/dist/commands/clear.js +5 -0
- package/dist/commands/command-helpers.d.ts.map +1 -1
- package/dist/commands/command-helpers.js +8 -0
- package/dist/commands/declare.d.ts +5 -0
- package/dist/commands/declare.d.ts.map +1 -1
- package/dist/commands/declare.js +5 -0
- package/dist/commands/deluser.d.ts +12 -0
- package/dist/commands/deluser.d.ts.map +1 -1
- package/dist/commands/deluser.js +72 -6
- package/dist/commands/df.d.ts +5 -0
- package/dist/commands/df.d.ts.map +1 -1
- package/dist/commands/df.js +5 -0
- package/dist/commands/du.d.ts +5 -0
- package/dist/commands/du.d.ts.map +1 -1
- package/dist/commands/du.js +5 -0
- package/dist/commands/export.d.ts +5 -0
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +5 -0
- package/dist/commands/grep.d.ts.map +1 -1
- package/dist/commands/grep.js +22 -4
- package/dist/commands/groups.d.ts +5 -0
- package/dist/commands/groups.d.ts.map +1 -1
- package/dist/commands/groups.js +5 -0
- package/dist/commands/gzip.d.ts +5 -2
- package/dist/commands/gzip.d.ts.map +1 -1
- package/dist/commands/gzip.js +48 -28
- package/dist/commands/head.d.ts.map +1 -1
- package/dist/commands/head.js +12 -3
- package/dist/commands/htop.d.ts +5 -0
- package/dist/commands/htop.d.ts.map +1 -1
- package/dist/commands/htop.js +5 -0
- package/dist/commands/kill.d.ts +5 -0
- package/dist/commands/kill.d.ts.map +1 -1
- package/dist/commands/kill.js +5 -0
- package/dist/commands/ln.d.ts +2 -0
- package/dist/commands/ln.d.ts.map +1 -1
- package/dist/commands/ln.js +22 -0
- package/dist/commands/ls.d.ts.map +1 -1
- package/dist/commands/ls.js +15 -0
- package/dist/commands/lsb-release.d.ts +5 -0
- package/dist/commands/lsb-release.d.ts.map +1 -1
- package/dist/commands/lsb-release.js +5 -0
- package/dist/commands/mkdir.d.ts +5 -0
- package/dist/commands/mkdir.d.ts.map +1 -1
- package/dist/commands/mkdir.js +5 -0
- package/dist/commands/mv.d.ts +5 -0
- package/dist/commands/mv.d.ts.map +1 -1
- package/dist/commands/mv.js +5 -0
- package/dist/commands/nano.d.ts +5 -0
- package/dist/commands/nano.d.ts.map +1 -1
- package/dist/commands/nano.js +5 -0
- package/dist/commands/neofetch.d.ts +5 -0
- package/dist/commands/neofetch.d.ts.map +1 -1
- package/dist/commands/neofetch.js +8 -5
- package/dist/commands/passwd.d.ts +8 -0
- package/dist/commands/passwd.d.ts.map +1 -1
- package/dist/commands/passwd.js +32 -11
- package/dist/commands/ping.d.ts +5 -0
- package/dist/commands/ping.d.ts.map +1 -1
- package/dist/commands/ping.js +5 -0
- package/dist/commands/printf.d.ts +5 -0
- package/dist/commands/printf.d.ts.map +1 -1
- package/dist/commands/printf.js +43 -12
- package/dist/commands/ps.d.ts +5 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +5 -0
- package/dist/commands/read.d.ts +5 -0
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +5 -0
- package/dist/commands/registry.d.ts.map +1 -1
- package/dist/commands/registry.js +4 -1
- package/dist/commands/rm.d.ts +5 -0
- package/dist/commands/rm.d.ts.map +1 -1
- package/dist/commands/rm.js +5 -0
- package/dist/commands/runtime.d.ts.map +1 -1
- package/dist/commands/runtime.js +1 -57
- package/dist/commands/sed.d.ts +5 -0
- package/dist/commands/sed.d.ts.map +1 -1
- package/dist/commands/sed.js +5 -0
- package/dist/commands/set.d.ts +5 -6
- package/dist/commands/set.d.ts.map +1 -1
- package/dist/commands/set.js +5 -22
- package/dist/commands/sh.d.ts +6 -0
- package/dist/commands/sh.d.ts.map +1 -1
- package/dist/commands/sh.js +6 -0
- package/dist/commands/shift.d.ts +10 -0
- package/dist/commands/shift.d.ts.map +1 -1
- package/dist/commands/shift.js +10 -0
- package/dist/commands/sleep.d.ts +5 -0
- package/dist/commands/sleep.d.ts.map +1 -1
- package/dist/commands/sleep.js +5 -0
- package/dist/commands/sort.d.ts +5 -0
- package/dist/commands/sort.d.ts.map +1 -1
- package/dist/commands/sort.js +5 -0
- package/dist/commands/source.d.ts +5 -0
- package/dist/commands/source.d.ts.map +1 -1
- package/dist/commands/source.js +5 -0
- package/dist/commands/stat.d.ts +7 -0
- package/dist/commands/stat.d.ts.map +1 -0
- package/dist/commands/stat.js +56 -0
- package/dist/commands/su.d.ts +13 -0
- package/dist/commands/su.d.ts.map +1 -1
- package/dist/commands/su.js +45 -14
- package/dist/commands/sudo.d.ts.map +1 -1
- package/dist/commands/sudo.js +5 -0
- package/dist/commands/tail.d.ts +5 -0
- package/dist/commands/tail.d.ts.map +1 -1
- package/dist/commands/tail.js +15 -3
- package/dist/commands/tar.d.ts +5 -0
- package/dist/commands/tar.d.ts.map +1 -1
- package/dist/commands/tar.js +40 -10
- package/dist/commands/tee.d.ts +5 -0
- package/dist/commands/tee.d.ts.map +1 -1
- package/dist/commands/tee.js +5 -0
- package/dist/commands/touch.d.ts +5 -0
- package/dist/commands/touch.d.ts.map +1 -1
- package/dist/commands/touch.js +5 -0
- package/dist/commands/tr.d.ts.map +1 -1
- package/dist/commands/tr.js +45 -10
- package/dist/commands/tree.d.ts +5 -0
- package/dist/commands/tree.d.ts.map +1 -1
- package/dist/commands/tree.js +5 -0
- package/dist/commands/true.d.ts +10 -0
- package/dist/commands/true.d.ts.map +1 -1
- package/dist/commands/true.js +10 -0
- package/dist/commands/type.d.ts +5 -0
- package/dist/commands/type.d.ts.map +1 -1
- package/dist/commands/type.js +5 -0
- package/dist/commands/uname.d.ts +5 -0
- package/dist/commands/uname.d.ts.map +1 -1
- package/dist/commands/uname.js +5 -0
- package/dist/commands/uniq.d.ts +5 -0
- package/dist/commands/uniq.d.ts.map +1 -1
- package/dist/commands/uniq.js +5 -0
- package/dist/commands/unset.d.ts +5 -0
- package/dist/commands/unset.d.ts.map +1 -1
- package/dist/commands/unset.js +5 -0
- package/dist/commands/uptime.d.ts +5 -0
- package/dist/commands/uptime.d.ts.map +1 -1
- package/dist/commands/uptime.js +5 -0
- package/dist/commands/wc.d.ts +5 -0
- package/dist/commands/wc.d.ts.map +1 -1
- package/dist/commands/wc.js +5 -0
- package/dist/commands/wget.d.ts +5 -0
- package/dist/commands/wget.d.ts.map +1 -1
- package/dist/commands/wget.js +5 -0
- package/dist/commands/who.d.ts +5 -0
- package/dist/commands/who.d.ts.map +1 -1
- package/dist/commands/who.js +5 -0
- package/dist/commands/whoami.d.ts +5 -0
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +5 -0
- package/dist/commands/xargs.d.ts +5 -0
- package/dist/commands/xargs.d.ts.map +1 -1
- package/dist/commands/xargs.js +5 -0
- package/dist/self-standalone.js +254 -30
- package/dist/types/commands.d.ts +36 -0
- package/dist/types/commands.d.ts.map +1 -1
- package/dist/utils/tokenize.d.ts +20 -0
- package/dist/utils/tokenize.d.ts.map +1 -0
- package/dist/utils/tokenize.js +74 -0
- package/examples/web.min.js +2 -2
- package/package.json +1 -1
- package/src/SSHClient/index.ts +6 -3
- package/src/SSHMimic/executor.ts +21 -44
- package/src/SSHMimic/index.ts +7 -5
- package/src/SSHMimic/sftp.ts +28 -21
- package/src/VirtualShell/shell.ts +34 -4
- package/src/VirtualShell/shellParser.ts +2 -103
- package/src/VirtualUserManager/index.ts +43 -19
- package/src/commands/adduser.ts +86 -13
- package/src/commands/alias.ts +5 -0
- package/src/commands/apt.ts +5 -0
- package/src/commands/awk.ts +154 -29
- package/src/commands/cd.ts +0 -4
- package/src/commands/clear.ts +5 -0
- package/src/commands/command-helpers.ts +9 -0
- package/src/commands/declare.ts +5 -0
- package/src/commands/deluser.ts +84 -7
- package/src/commands/df.ts +5 -0
- package/src/commands/du.ts +5 -0
- package/src/commands/export.ts +5 -0
- package/src/commands/grep.ts +21 -8
- package/src/commands/groups.ts +5 -0
- package/src/commands/gzip.ts +54 -28
- package/src/commands/head.ts +14 -4
- package/src/commands/htop.ts +5 -0
- package/src/commands/kill.ts +5 -0
- package/src/commands/ln.ts +22 -0
- package/src/commands/ls.ts +17 -0
- package/src/commands/lsb-release.ts +5 -0
- package/src/commands/mkdir.ts +5 -0
- package/src/commands/mv.ts +5 -0
- package/src/commands/nano.ts +5 -0
- package/src/commands/neofetch.ts +8 -6
- package/src/commands/passwd.ts +35 -12
- package/src/commands/ping.ts +5 -0
- package/src/commands/printf.ts +30 -13
- package/src/commands/ps.ts +5 -0
- package/src/commands/read.ts +5 -0
- package/src/commands/registry.ts +4 -1
- package/src/commands/rm.ts +5 -0
- package/src/commands/runtime.ts +1 -61
- package/src/commands/sed.ts +5 -0
- package/src/commands/set.ts +5 -24
- package/src/commands/sh.ts +9 -3
- package/src/commands/shift.ts +10 -0
- package/src/commands/sleep.ts +5 -0
- package/src/commands/sort.ts +5 -0
- package/src/commands/source.ts +5 -0
- package/src/commands/stat.ts +61 -0
- package/src/commands/su.ts +54 -16
- package/src/commands/sudo.ts +5 -0
- package/src/commands/tail.ts +17 -3
- package/src/commands/tar.ts +38 -15
- package/src/commands/tee.ts +5 -0
- package/src/commands/touch.ts +5 -0
- package/src/commands/tr.ts +54 -10
- package/src/commands/tree.ts +5 -0
- package/src/commands/true.ts +10 -0
- package/src/commands/type.ts +5 -0
- package/src/commands/uname.ts +5 -0
- package/src/commands/uniq.ts +5 -0
- package/src/commands/unset.ts +5 -0
- package/src/commands/uptime.ts +5 -0
- package/src/commands/wc.ts +5 -0
- package/src/commands/wget.ts +5 -0
- package/src/commands/who.ts +5 -0
- package/src/commands/whoami.ts +5 -0
- package/src/commands/xargs.ts +5 -0
- package/src/self-standalone.ts +316 -33
- package/src/types/commands.ts +37 -0
- package/src/utils/tokenize.ts +78 -0
- package/builds/web-iife.min.js +0 -13
- package/builds/web-iife.min.js.map +0 -7
package/dist/commands/su.js
CHANGED
|
@@ -1,25 +1,56 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { runCommand } from "./runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Switch to another user account.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* su [username] — switch to username (defaults to root)
|
|
7
|
+
* su - [username] — login shell (changes cwd to target home)
|
|
8
|
+
* su -c 'cmd' [user] — run command as user
|
|
9
|
+
*
|
|
10
|
+
* - Root can switch to any user without a password.
|
|
11
|
+
* - Non-root sudoers must enter the target user's password.
|
|
12
|
+
* - Non-sudoers are denied.
|
|
13
|
+
* - Switching to a non-existent user returns an error immediately.
|
|
14
|
+
*/
|
|
2
15
|
export const suCommand = {
|
|
3
16
|
name: "su",
|
|
4
17
|
description: "Switch user",
|
|
5
18
|
category: "users",
|
|
6
|
-
params: ["- <username
|
|
7
|
-
run: ({ authUser, shell, args }) => {
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
19
|
+
params: ["[-] [-c <cmd>] [username]"],
|
|
20
|
+
run: async ({ authUser, shell, args, hostname, mode, cwd }) => {
|
|
21
|
+
const loginShellFlag = args.includes("-") || args.includes("-l") || args.includes("--login");
|
|
22
|
+
const cIdx = args.indexOf("-c");
|
|
23
|
+
const cmdLine = cIdx !== -1 ? args[cIdx + 1] : undefined;
|
|
24
|
+
const filteredArgs = args.filter((_, i) => i !== cIdx && i !== cIdx + 1).filter((a) => a !== "-" && a !== "-l" && a !== "--login");
|
|
25
|
+
const targetUser = filteredArgs.find((a) => !a.startsWith("-")) ?? "root";
|
|
26
|
+
// Verify target user exists
|
|
27
|
+
if (!shell.users.listUsers().includes(targetUser)) {
|
|
28
|
+
return { stderr: `su: user '${targetUser}' does not exist\n`, exitCode: 1 };
|
|
12
29
|
}
|
|
13
|
-
|
|
14
|
-
|
|
30
|
+
// Root switches freely without any password
|
|
31
|
+
if (authUser === "root") {
|
|
32
|
+
if (cmdLine) {
|
|
33
|
+
return runCommand(cmdLine, targetUser, hostname, mode, loginShellFlag ? `/home/${targetUser}` : cwd, shell);
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
switchUser: targetUser,
|
|
37
|
+
nextCwd: loginShellFlag ? `/home/${targetUser}` : undefined,
|
|
38
|
+
exitCode: 0,
|
|
39
|
+
};
|
|
15
40
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return { stderr: "su:
|
|
41
|
+
// Non-sudoers denied
|
|
42
|
+
if (!shell.users.isSudoer(authUser)) {
|
|
43
|
+
return { stderr: "su: permission denied\n", exitCode: 1 };
|
|
19
44
|
}
|
|
45
|
+
// Sudoers must enter target user's password via challenge
|
|
20
46
|
return {
|
|
21
|
-
|
|
22
|
-
|
|
47
|
+
sudoChallenge: {
|
|
48
|
+
username: targetUser,
|
|
49
|
+
targetUser,
|
|
50
|
+
commandLine: cmdLine ?? null,
|
|
51
|
+
loginShell: loginShellFlag,
|
|
52
|
+
prompt: "Password: ",
|
|
53
|
+
},
|
|
23
54
|
exitCode: 0,
|
|
24
55
|
};
|
|
25
56
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sudo.d.ts","sourceRoot":"","sources":["../../src/commands/sudo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"sudo.d.ts","sourceRoot":"","sources":["../../src/commands/sudo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA0BrD,eAAO,MAAM,WAAW,EAAE,WAiDzB,CAAC"}
|
package/dist/commands/sudo.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { parseArgs } from "./command-helpers";
|
|
2
2
|
import { runCommand } from "./runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Execute a command as another user (superuser by default).
|
|
5
|
+
* @category users
|
|
6
|
+
* @params ["[-u user] [-c cmd] [command]"]
|
|
7
|
+
*/
|
|
3
8
|
function parseSudoArgs(args) {
|
|
4
9
|
const { flags, flagsWithValues, positionals } = parseArgs(args, {
|
|
5
10
|
flags: ["-i", "-S"],
|
package/dist/commands/tail.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tail.d.ts","sourceRoot":"","sources":["../../src/commands/tail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"tail.d.ts","sourceRoot":"","sources":["../../src/commands/tail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WA2CzB,CAAC"}
|
package/dist/commands/tail.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { getFlag } from "./command-helpers";
|
|
2
2
|
import { assertPathAccess, resolvePath } from "./helpers";
|
|
3
|
+
/**
|
|
4
|
+
* Output the last part of files or stdin.
|
|
5
|
+
* @category text
|
|
6
|
+
* @params ["[-n <lines>] [file...]"]
|
|
7
|
+
*/
|
|
3
8
|
export const tailCommand = {
|
|
4
9
|
name: "tail",
|
|
5
10
|
description: "Output last lines",
|
|
@@ -7,11 +12,18 @@ export const tailCommand = {
|
|
|
7
12
|
params: ["[-n <lines>] [file...]"],
|
|
8
13
|
run: ({ authUser, shell, cwd, args, stdin }) => {
|
|
9
14
|
const nArg = getFlag(args, ["-n"]);
|
|
10
|
-
const
|
|
11
|
-
const
|
|
15
|
+
const shortN = args.find((a) => /^-\d+$/.test(a));
|
|
16
|
+
const n = typeof nArg === "string"
|
|
17
|
+
? parseInt(nArg, 10)
|
|
18
|
+
: shortN ? parseInt(shortN.slice(1), 10) : 10;
|
|
19
|
+
const positionals = args.filter((a) => !a.startsWith("-") && a !== nArg && a !== String(n));
|
|
12
20
|
const take = (content) => {
|
|
13
21
|
const lines = content.split("\n");
|
|
14
|
-
|
|
22
|
+
// If content ends with \n, last element is ""; exclude from count
|
|
23
|
+
const hasTrailingNewline = content.endsWith("\n");
|
|
24
|
+
const meaningful = hasTrailingNewline ? lines.slice(0, -1) : lines;
|
|
25
|
+
const sliced = meaningful.slice(Math.max(0, meaningful.length - n));
|
|
26
|
+
return sliced.join("\n") + (hasTrailingNewline ? "\n" : "");
|
|
15
27
|
};
|
|
16
28
|
if (positionals.length === 0) {
|
|
17
29
|
return { stdout: take(stdin ?? ""), exitCode: 0 };
|
package/dist/commands/tar.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { ShellModule } from "../types/commands";
|
|
2
|
+
/**
|
|
3
|
+
* Archive or extract files with tar and optional gzip compression.
|
|
4
|
+
* @category archive
|
|
5
|
+
* @params ["[-czf|-xzf|-tf] <archive> [files...]"]
|
|
6
|
+
*/
|
|
2
7
|
export declare const tarCommand: ShellModule;
|
|
3
8
|
//# sourceMappingURL=tar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tar.d.ts","sourceRoot":"","sources":["../../src/commands/tar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tar.d.ts","sourceRoot":"","sources":["../../src/commands/tar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WA6FxB,CAAC"}
|
package/dist/commands/tar.js
CHANGED
|
@@ -1,23 +1,53 @@
|
|
|
1
|
-
import { ifFlag } from "./command-helpers";
|
|
2
1
|
import { resolvePath } from "./helpers";
|
|
2
|
+
/**
|
|
3
|
+
* Archive or extract files with tar and optional gzip compression.
|
|
4
|
+
* @category archive
|
|
5
|
+
* @params ["[-czf|-xzf|-tf] <archive> [files...]"]
|
|
6
|
+
*/
|
|
3
7
|
export const tarCommand = {
|
|
4
8
|
name: "tar",
|
|
5
9
|
description: "Archive utility",
|
|
6
10
|
category: "archive",
|
|
7
11
|
params: ["[-czf|-xzf|-tf] <archive> [files...]"],
|
|
8
12
|
run: ({ authUser, shell, cwd, args }) => {
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
// Expand combined flags: -czf or czf (bare mode string) → ["-c", "-z", "-f"]
|
|
14
|
+
const expanded = [];
|
|
15
|
+
let foundModeStr = false;
|
|
16
|
+
for (const a of args) {
|
|
17
|
+
if (/^-[a-zA-Z]{2,}$/.test(a)) {
|
|
18
|
+
// -czf style
|
|
19
|
+
for (const ch of a.slice(1))
|
|
20
|
+
expanded.push(`-${ch}`);
|
|
21
|
+
}
|
|
22
|
+
else if (!foundModeStr && /^[cxtdru]{1,}[a-zA-Z]*$/.test(a) && !a.includes("/") && !a.startsWith("-")) {
|
|
23
|
+
// czf bare style (first non-path arg)
|
|
24
|
+
foundModeStr = true;
|
|
25
|
+
for (const ch of a)
|
|
26
|
+
expanded.push(`-${ch}`);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
expanded.push(a);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const create = expanded.includes("-c");
|
|
33
|
+
const extract = expanded.includes("-x");
|
|
34
|
+
const list = expanded.includes("-t");
|
|
35
|
+
const fIdx = expanded.indexOf("-f");
|
|
36
|
+
const archiveName = fIdx !== -1
|
|
37
|
+
? expanded[fIdx + 1]
|
|
38
|
+
: expanded.find((a) => a.endsWith(".tar") || a.endsWith(".tar.gz") || a.endsWith(".tgz"));
|
|
39
|
+
if (!create && !extract && !list) {
|
|
40
|
+
return { stderr: "tar: must specify -c, -x, or -t\n", exitCode: 1 };
|
|
41
|
+
}
|
|
16
42
|
if (!archiveName)
|
|
17
|
-
return { stderr: "tar: no archive specified", exitCode: 1 };
|
|
43
|
+
return { stderr: "tar: no archive specified\n", exitCode: 1 };
|
|
18
44
|
const archivePath = resolvePath(cwd, archiveName);
|
|
19
45
|
if (create) {
|
|
20
|
-
|
|
46
|
+
// Skip flags and archive name from file list
|
|
47
|
+
const skipNext2 = new Set();
|
|
48
|
+
if (fIdx !== -1)
|
|
49
|
+
skipNext2.add(fIdx + 1);
|
|
50
|
+
const fileArgs = expanded.filter((a, i) => !a.startsWith("-") && a !== archiveName && !skipNext2.has(i));
|
|
21
51
|
const entries = {};
|
|
22
52
|
for (const f of fileArgs) {
|
|
23
53
|
const p = resolvePath(cwd, f);
|
package/dist/commands/tee.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tee.d.ts","sourceRoot":"","sources":["../../src/commands/tee.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,UAAU,EAAE,WA0BxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"tee.d.ts","sourceRoot":"","sources":["../../src/commands/tee.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WA0BxB,CAAC"}
|
package/dist/commands/tee.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ifFlag } from "./command-helpers";
|
|
2
2
|
import { resolvePath } from "./helpers";
|
|
3
|
+
/**
|
|
4
|
+
* Read stdin and write to stdout and files simultaneously.
|
|
5
|
+
* @category text
|
|
6
|
+
* @params ["[-a] <file...>"]
|
|
7
|
+
*/
|
|
3
8
|
export const teeCommand = {
|
|
4
9
|
name: "tee",
|
|
5
10
|
description: "Read stdin, write to stdout and files",
|
package/dist/commands/touch.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../src/commands/touch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,eAAO,MAAM,YAAY,EAAE,WAmB1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../src/commands/touch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAmB1B,CAAC"}
|
package/dist/commands/touch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../src/commands/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../src/commands/tr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgCrD,eAAO,MAAM,SAAS,EAAE,WAqCvB,CAAC"}
|
package/dist/commands/tr.js
CHANGED
|
@@ -1,25 +1,60 @@
|
|
|
1
1
|
import { ifFlag } from "./command-helpers";
|
|
2
|
+
function unescapeTrSet(s) {
|
|
3
|
+
return s
|
|
4
|
+
.replace(/\\n/g, "\n")
|
|
5
|
+
.replace(/\\t/g, "\t")
|
|
6
|
+
.replace(/\\r/g, "\r")
|
|
7
|
+
.replace(/\\\\/g, "\\");
|
|
8
|
+
}
|
|
9
|
+
function expandTrSet(s) {
|
|
10
|
+
const chars = [];
|
|
11
|
+
const unescaped = unescapeTrSet(s);
|
|
12
|
+
let i = 0;
|
|
13
|
+
while (i < unescaped.length) {
|
|
14
|
+
// Range: a-z, A-Z, 0-9
|
|
15
|
+
if (i + 2 < unescaped.length && unescaped[i + 1] === "-") {
|
|
16
|
+
const from = unescaped.charCodeAt(i);
|
|
17
|
+
const to = unescaped.charCodeAt(i + 2);
|
|
18
|
+
if (from <= to) {
|
|
19
|
+
for (let c = from; c <= to; c++)
|
|
20
|
+
chars.push(String.fromCharCode(c));
|
|
21
|
+
i += 3;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
chars.push(unescaped[i]);
|
|
26
|
+
i++;
|
|
27
|
+
}
|
|
28
|
+
return chars;
|
|
29
|
+
}
|
|
2
30
|
export const trCommand = {
|
|
3
31
|
name: "tr",
|
|
4
32
|
description: "Translate or delete characters",
|
|
5
33
|
category: "text",
|
|
6
|
-
params: ["[-d] <set1> [set2]"],
|
|
34
|
+
params: ["[-d] [-s] <set1> [set2]"],
|
|
7
35
|
run: ({ args, stdin }) => {
|
|
8
36
|
const del = ifFlag(args, ["-d"]);
|
|
37
|
+
const squeeze = ifFlag(args, ["-s"]);
|
|
9
38
|
const positionals = args.filter((a) => !a.startsWith("-"));
|
|
10
|
-
const
|
|
11
|
-
const
|
|
39
|
+
const set1chars = expandTrSet(positionals[0] ?? "");
|
|
40
|
+
const set2chars = expandTrSet(positionals[1] ?? "");
|
|
12
41
|
let input = stdin ?? "";
|
|
13
42
|
if (del) {
|
|
14
|
-
|
|
15
|
-
|
|
43
|
+
const deleteSet = new Set(set1chars);
|
|
44
|
+
input = [...input].filter((c) => !deleteSet.has(c)).join("");
|
|
16
45
|
}
|
|
17
|
-
else if (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
46
|
+
else if (set2chars.length > 0) {
|
|
47
|
+
// Build translation map
|
|
48
|
+
const map = new Map();
|
|
49
|
+
for (let i = 0; i < set1chars.length; i++) {
|
|
50
|
+
map.set(set1chars[i], set2chars[i] ?? set2chars[set2chars.length - 1] ?? "");
|
|
22
51
|
}
|
|
52
|
+
input = [...input].map((c) => map.get(c) ?? c).join("");
|
|
53
|
+
}
|
|
54
|
+
if (squeeze && set2chars.length > 0) {
|
|
55
|
+
// Squeeze repeated characters in set2
|
|
56
|
+
const squeezeSet = new Set(set2chars);
|
|
57
|
+
input = input.replace(/(.)\1+/g, (_, c) => squeezeSet.has(c) ? c : _);
|
|
23
58
|
}
|
|
24
59
|
return { stdout: input, exitCode: 0 };
|
|
25
60
|
},
|
package/dist/commands/tree.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/commands/tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,WAAW,EAAE,WAUzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/commands/tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAUzB,CAAC"}
|
package/dist/commands/tree.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { getArg } from "./command-helpers";
|
|
2
2
|
import { assertPathAccess, resolvePath } from "./helpers";
|
|
3
|
+
/**
|
|
4
|
+
* Display directory structure in a tree format.
|
|
5
|
+
* @category navigation
|
|
6
|
+
* @params ["[path]"]
|
|
7
|
+
*/
|
|
3
8
|
export const treeCommand = {
|
|
4
9
|
name: "tree",
|
|
5
10
|
description: "Display directory tree",
|
package/dist/commands/true.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { ShellModule } from "../types/commands";
|
|
2
|
+
/**
|
|
3
|
+
* Always return success (exit code 0).
|
|
4
|
+
* @category shell
|
|
5
|
+
* @params []
|
|
6
|
+
*/
|
|
2
7
|
export declare const trueCommand: ShellModule;
|
|
8
|
+
/**
|
|
9
|
+
* Always return failure (exit code 1).
|
|
10
|
+
* @category shell
|
|
11
|
+
* @params []
|
|
12
|
+
*/
|
|
3
13
|
export declare const falseCommand: ShellModule;
|
|
4
14
|
//# sourceMappingURL=true.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"true.d.ts","sourceRoot":"","sources":["../../src/commands/true.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,WAAW,EAAE,WAMzB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,WAM1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"true.d.ts","sourceRoot":"","sources":["../../src/commands/true.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAMzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAM1B,CAAC"}
|
package/dist/commands/true.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Always return success (exit code 0).
|
|
3
|
+
* @category shell
|
|
4
|
+
* @params []
|
|
5
|
+
*/
|
|
1
6
|
export const trueCommand = {
|
|
2
7
|
name: "true",
|
|
3
8
|
description: "Return success exit code",
|
|
@@ -5,6 +10,11 @@ export const trueCommand = {
|
|
|
5
10
|
params: [],
|
|
6
11
|
run: () => ({ exitCode: 0 }),
|
|
7
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Always return failure (exit code 1).
|
|
15
|
+
* @category shell
|
|
16
|
+
* @params []
|
|
17
|
+
*/
|
|
8
18
|
export const falseCommand = {
|
|
9
19
|
name: "false",
|
|
10
20
|
description: "Return failure exit code",
|
package/dist/commands/type.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { ShellModule } from "../types/commands";
|
|
2
|
+
/**
|
|
3
|
+
* Describe how a command name would be interpreted (builtin, function, or file).
|
|
4
|
+
* @category shell
|
|
5
|
+
* @params ["<command...>"]
|
|
6
|
+
*/
|
|
2
7
|
export declare const typeCommand: ShellModule;
|
|
3
8
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/commands/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,eAAO,MAAM,WAAW,EAAE,WAuCzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/commands/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WAuCzB,CAAC"}
|
package/dist/commands/type.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { resolveModule } from "./registry";
|
|
2
|
+
/**
|
|
3
|
+
* Describe how a command name would be interpreted (builtin, function, or file).
|
|
4
|
+
* @category shell
|
|
5
|
+
* @params ["<command...>"]
|
|
6
|
+
*/
|
|
2
7
|
export const typeCommand = {
|
|
3
8
|
name: "type",
|
|
4
9
|
description: "Describe how a command would be interpreted",
|
package/dist/commands/uname.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { ShellModule } from "../types/commands";
|
|
2
|
+
/**
|
|
3
|
+
* Print system information (kernel name, version, machine type).
|
|
4
|
+
* @category system
|
|
5
|
+
* @params ["[-a] [-s] [-r] [-m]"]
|
|
6
|
+
*/
|
|
2
7
|
export declare const unameCommand: ShellModule;
|
|
3
8
|
//# sourceMappingURL=uname.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uname.d.ts","sourceRoot":"","sources":["../../src/commands/uname.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,eAAO,MAAM,YAAY,EAAE,WAoB1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"uname.d.ts","sourceRoot":"","sources":["../../src/commands/uname.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAoB1B,CAAC"}
|
package/dist/commands/uname.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ifFlag } from "./command-helpers";
|
|
2
|
+
/**
|
|
3
|
+
* Print system information (kernel name, version, machine type).
|
|
4
|
+
* @category system
|
|
5
|
+
* @params ["[-a] [-s] [-r] [-m]"]
|
|
6
|
+
*/
|
|
2
7
|
export const unameCommand = {
|
|
3
8
|
name: "uname",
|
|
4
9
|
description: "Print system information",
|
package/dist/commands/uniq.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniq.d.ts","sourceRoot":"","sources":["../../src/commands/uniq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,eAAO,MAAM,WAAW,EAAE,WA8BzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"uniq.d.ts","sourceRoot":"","sources":["../../src/commands/uniq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WA8BzB,CAAC"}
|
package/dist/commands/uniq.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ifFlag } from "./command-helpers";
|
|
2
|
+
/**
|
|
3
|
+
* Report or filter out repeated consecutive lines.
|
|
4
|
+
* @category text
|
|
5
|
+
* @params ["[-c] [-d] [-u] [file]"]
|
|
6
|
+
*/
|
|
2
7
|
export const uniqCommand = {
|
|
3
8
|
name: "uniq",
|
|
4
9
|
description: "Report or filter out repeated lines",
|
package/dist/commands/unset.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unset.d.ts","sourceRoot":"","sources":["../../src/commands/unset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,YAAY,EAAE,WAS1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"unset.d.ts","sourceRoot":"","sources":["../../src/commands/unset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,WAS1B,CAAC"}
|
package/dist/commands/unset.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uptime.d.ts","sourceRoot":"","sources":["../../src/commands/uptime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,eAAO,MAAM,aAAa,EAAE,WA6C3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"uptime.d.ts","sourceRoot":"","sources":["../../src/commands/uptime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WA6C3B,CAAC"}
|
package/dist/commands/uptime.js
CHANGED
package/dist/commands/wc.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wc.d.ts","sourceRoot":"","sources":["../../src/commands/wc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,SAAS,EAAE,WA6CvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"wc.d.ts","sourceRoot":"","sources":["../../src/commands/wc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,WA6CvB,CAAC"}
|
package/dist/commands/wc.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ifFlag } from "./command-helpers";
|
|
2
2
|
import { assertPathAccess, resolvePath } from "./helpers";
|
|
3
|
+
/**
|
|
4
|
+
* Count words, lines, and/or bytes in files or stdin.
|
|
5
|
+
* @category text
|
|
6
|
+
* @params ["[-l] [-w] [-c] [file...]"]
|
|
7
|
+
*/
|
|
3
8
|
export const wcCommand = {
|
|
4
9
|
name: "wc",
|
|
5
10
|
description: "Count words/lines/bytes",
|
package/dist/commands/wget.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { ShellModule } from "../types/commands";
|
|
2
|
+
/**
|
|
3
|
+
* Download files from the web (fetch-based implementation).
|
|
4
|
+
* @category network
|
|
5
|
+
* @params ["[options] <url>"]
|
|
6
|
+
*/
|
|
2
7
|
export declare const wgetCommand: ShellModule;
|
|
3
8
|
//# sourceMappingURL=wget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wget.d.ts","sourceRoot":"","sources":["../../src/commands/wget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,eAAO,MAAM,WAAW,EAAE,WA+HzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"wget.d.ts","sourceRoot":"","sources":["../../src/commands/wget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,WA+HzB,CAAC"}
|
package/dist/commands/wget.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ifFlag, parseArgs } from "./command-helpers";
|
|
2
2
|
import { assertPathAccess, resolvePath, stripUrlFilename } from "./helpers";
|
|
3
|
+
/**
|
|
4
|
+
* Download files from the web (fetch-based implementation).
|
|
5
|
+
* @category network
|
|
6
|
+
* @params ["[options] <url>"]
|
|
7
|
+
*/
|
|
3
8
|
export const wgetCommand = {
|
|
4
9
|
name: "wget",
|
|
5
10
|
description: "File downloader (pure fetch)",
|
package/dist/commands/who.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"who.d.ts","sourceRoot":"","sources":["../../src/commands/who.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,eAAO,MAAM,UAAU,EAAE,WAgBxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"who.d.ts","sourceRoot":"","sources":["../../src/commands/who.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,WAgBxB,CAAC"}
|