typescript-virtual-container 1.4.0 → 1.4.1
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/builds/self-standalone.js +184 -300
- package/builds/self-standalone.js.map +3 -3
- package/builds/standalone-wo-sftp.js +155 -271
- package/builds/standalone-wo-sftp.js.map +3 -3
- package/builds/standalone.js +149 -265
- package/builds/standalone.js.map +3 -3
- package/dist/VirtualPackageManager/index.d.ts.map +1 -1
- package/dist/VirtualPackageManager/index.js +29 -1
- package/dist/commands/curl.d.ts.map +1 -1
- package/dist/commands/curl.js +2 -1
- package/dist/commands/gzip.d.ts.map +1 -1
- package/dist/commands/gzip.js +6 -0
- package/dist/commands/man.d.ts.map +1 -1
- package/dist/commands/man.js +30 -136
- package/dist/commands/neofetch.d.ts.map +1 -1
- package/dist/commands/neofetch.js +6 -0
- package/dist/commands/wget.d.ts.map +1 -1
- package/dist/commands/wget.js +11 -1
- package/package.json +2 -2
- package/src/VirtualPackageManager/index.ts +29 -1
- package/src/commands/curl.ts +2 -1
- package/src/commands/gzip.ts +7 -0
- package/src/commands/man.ts +38 -143
- package/src/commands/manuals/adduser.txt +11 -0
- package/src/commands/manuals/apt-cache.txt +12 -0
- package/src/commands/manuals/apt.txt +20 -0
- package/src/commands/manuals/awk.txt +13 -0
- package/src/commands/manuals/cat.txt +14 -0
- package/src/commands/manuals/cd.txt +16 -0
- package/src/commands/manuals/chmod.txt +16 -0
- package/src/commands/manuals/clear.txt +10 -0
- package/src/commands/manuals/cp.txt +10 -0
- package/src/commands/manuals/curl.txt +20 -0
- package/src/commands/manuals/date.txt +14 -0
- package/src/commands/manuals/declare.txt +12 -0
- package/src/commands/manuals/deluser.txt +10 -0
- package/src/commands/manuals/df.txt +10 -0
- package/src/commands/manuals/dpkg-query.txt +11 -0
- package/src/commands/manuals/dpkg.txt +14 -0
- package/src/commands/manuals/du.txt +11 -0
- package/src/commands/manuals/echo.txt +11 -0
- package/src/commands/manuals/false.txt +10 -0
- package/src/commands/manuals/find.txt +11 -0
- package/src/commands/manuals/free.txt +12 -0
- package/src/commands/manuals/grep.txt +13 -0
- package/src/commands/manuals/groups.txt +10 -0
- package/src/commands/manuals/gzip.txt +11 -0
- package/src/commands/manuals/head.txt +10 -0
- package/src/commands/manuals/help.txt +11 -0
- package/src/commands/manuals/history.txt +11 -0
- package/src/commands/manuals/hostname.txt +10 -0
- package/src/commands/manuals/id.txt +10 -0
- package/src/commands/manuals/kill.txt +13 -0
- package/src/commands/manuals/ls.txt +20 -0
- package/src/commands/manuals/lsb_release.txt +14 -0
- package/src/commands/manuals/mkdir.txt +10 -0
- package/src/commands/manuals/mv.txt +10 -0
- package/src/commands/manuals/nano.txt +11 -0
- package/src/commands/manuals/neofetch.txt +10 -0
- package/src/commands/manuals/node.txt +13 -0
- package/src/commands/manuals/npm.txt +13 -0
- package/src/commands/manuals/npx.txt +13 -0
- package/src/commands/manuals/passwd.txt +11 -0
- package/src/commands/manuals/ping.txt +10 -0
- package/src/commands/manuals/printf.txt +11 -0
- package/src/commands/manuals/ps.txt +10 -0
- package/src/commands/manuals/pwd.txt +10 -0
- package/src/commands/manuals/python3.txt +13 -0
- package/src/commands/manuals/readlink.txt +10 -0
- package/src/commands/manuals/return.txt +10 -0
- package/src/commands/manuals/rm.txt +10 -0
- package/src/commands/manuals/sed.txt +11 -0
- package/src/commands/manuals/set.txt +11 -0
- package/src/commands/manuals/shift.txt +10 -0
- package/src/commands/manuals/sleep.txt +10 -0
- package/src/commands/manuals/sort.txt +12 -0
- package/src/commands/manuals/source.txt +11 -0
- package/src/commands/manuals/ssh.txt +11 -0
- package/src/commands/manuals/stat.txt +10 -0
- package/src/commands/manuals/su.txt +13 -0
- package/src/commands/manuals/sudo.txt +11 -0
- package/src/commands/manuals/tail.txt +10 -0
- package/src/commands/manuals/tar.txt +19 -0
- package/src/commands/manuals/tee.txt +10 -0
- package/src/commands/manuals/test.txt +11 -0
- package/src/commands/manuals/touch.txt +11 -0
- package/src/commands/manuals/tr.txt +10 -0
- package/src/commands/manuals/trap.txt +10 -0
- package/src/commands/manuals/true.txt +10 -0
- package/src/commands/manuals/type.txt +10 -0
- package/src/commands/manuals/uname.txt +12 -0
- package/src/commands/manuals/uniq.txt +12 -0
- package/src/commands/manuals/unset.txt +10 -0
- package/src/commands/manuals/uptime.txt +11 -0
- package/src/commands/manuals/wc.txt +12 -0
- package/src/commands/manuals/wget.txt +12 -0
- package/src/commands/manuals/which.txt +10 -0
- package/src/commands/manuals/whoami.txt +10 -0
- package/src/commands/manuals/xargs.txt +10 -0
- package/src/commands/neofetch.ts +7 -0
- package/src/commands/wget.ts +12 -1
- package/tests/new-features.test.ts +2 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
TAR(1) GNU tar Manual TAR(1)
|
|
2
|
+
|
|
3
|
+
NAME
|
|
4
|
+
tar - an archiving utility
|
|
5
|
+
|
|
6
|
+
SYNOPSIS
|
|
7
|
+
tar [OPTION...] [FILE]...
|
|
8
|
+
|
|
9
|
+
DESCRIPTION
|
|
10
|
+
tar saves many files together into a single tape or disk archive,
|
|
11
|
+
and can restore individual files from the archive.
|
|
12
|
+
|
|
13
|
+
OPTIONS
|
|
14
|
+
-c, --create create a new archive
|
|
15
|
+
-x, --extract extract files from an archive
|
|
16
|
+
-z, --gzip filter the archive through gzip
|
|
17
|
+
-f, --file=ARCHIVE use archive file or device ARCHIVE
|
|
18
|
+
-v, --verbose verbosely list files processed
|
|
19
|
+
-t, --list list the contents of an archive
|
package/src/commands/neofetch.ts
CHANGED
|
@@ -13,6 +13,13 @@ export const neofetchCommand: ShellModule = {
|
|
|
13
13
|
category: "system",
|
|
14
14
|
params: ["[--off]"],
|
|
15
15
|
run: ({ args, authUser, hostname, shell, env }) => {
|
|
16
|
+
if (!shell.packageManager.isInstalled("neofetch")) {
|
|
17
|
+
return {
|
|
18
|
+
stderr:
|
|
19
|
+
"bash: neofetch: command not found\nHint: install it with: apt install neofetch\n",
|
|
20
|
+
exitCode: 127,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
16
23
|
if (ifFlag(args, "--help")) {
|
|
17
24
|
return {
|
|
18
25
|
stdout: "Usage: neofetch [--off]",
|
package/src/commands/wget.ts
CHANGED
|
@@ -49,7 +49,18 @@ export const wgetCommand: ShellModule = {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
const
|
|
52
|
+
const urlWithoutProtocol = positionals[0];
|
|
53
|
+
if (!urlWithoutProtocol) {
|
|
54
|
+
return {
|
|
55
|
+
stderr: "wget: missing URL\nUsage: wget [OPTION]... [URL]...",
|
|
56
|
+
exitCode: 1,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const url = urlWithoutProtocol.startsWith("http://") ||
|
|
61
|
+
urlWithoutProtocol.startsWith("https://")
|
|
62
|
+
? urlWithoutProtocol
|
|
63
|
+
: `http://${urlWithoutProtocol}`;
|
|
53
64
|
if (!url)
|
|
54
65
|
return {
|
|
55
66
|
stderr: "wget: missing URL\nUsage: wget [OPTION]... [URL]...",
|
|
@@ -223,7 +223,7 @@ describe("Package manager (apt/dpkg)", () => {
|
|
|
223
223
|
});
|
|
224
224
|
|
|
225
225
|
test("neofetch shows package count after installs", async () => {
|
|
226
|
-
await client.exec("apt install curl wget htop");
|
|
226
|
+
await client.exec("apt install curl wget htop neofetch");
|
|
227
227
|
const r = await client.exec("neofetch");
|
|
228
228
|
expect(r.exitCode).toBe(0);
|
|
229
229
|
expect(r.stdout).toContain("(dpkg)");
|
|
@@ -675,7 +675,7 @@ describe("/proc/self and /proc/<pid>", () => {
|
|
|
675
675
|
});
|
|
676
676
|
});
|
|
677
677
|
|
|
678
|
-
import { diffSnapshots, formatDiff
|
|
678
|
+
import { assertDiff, diffSnapshots, formatDiff } from "../src";
|
|
679
679
|
|
|
680
680
|
describe("VFS snapshot diff tooling", () => {
|
|
681
681
|
let shell5: VirtualShell;
|