typescript-virtual-container 1.4.6 → 1.4.8
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 +1 -0
- package/README.md +0 -1
- package/benchmark-results.txt +21 -21
- package/builds/self-standalone.js +1111 -299
- package/builds/self-standalone.js.map +4 -4
- package/builds/standalone-wo-sftp.js +993 -183
- package/builds/standalone-wo-sftp.js.map +4 -4
- package/builds/standalone.cjs +984 -173
- package/builds/standalone.cjs.map +4 -4
- package/dist/SSHMimic/exec.d.ts.map +1 -1
- package/dist/SSHMimic/exec.js +0 -1
- package/dist/SSHMimic/exec.js.map +1 -1
- package/dist/SSHMimic/index.d.ts.map +1 -1
- package/dist/SSHMimic/index.js +3 -1
- package/dist/SSHMimic/index.js.map +1 -1
- package/dist/SSHMimic/sftp.d.ts.map +1 -1
- package/dist/SSHMimic/sftp.js +0 -6
- package/dist/SSHMimic/sftp.js.map +1 -1
- package/dist/VirtualFileSystem/binaryPack.d.ts.map +1 -1
- package/dist/VirtualFileSystem/binaryPack.js +21 -9
- package/dist/VirtualFileSystem/binaryPack.js.map +1 -1
- package/dist/VirtualFileSystem/index.d.ts +93 -0
- package/dist/VirtualFileSystem/index.d.ts.map +1 -1
- package/dist/VirtualFileSystem/index.js +361 -46
- package/dist/VirtualFileSystem/index.js.map +1 -1
- package/dist/VirtualFileSystem/internalTypes.d.ts +23 -4
- package/dist/VirtualFileSystem/internalTypes.d.ts.map +1 -1
- package/dist/VirtualFileSystem/journal.d.ts +47 -0
- package/dist/VirtualFileSystem/journal.d.ts.map +1 -0
- package/dist/VirtualFileSystem/journal.js +178 -0
- package/dist/VirtualFileSystem/journal.js.map +1 -0
- package/dist/VirtualFileSystem/path.js +1 -1
- package/dist/VirtualFileSystem/path.js.map +1 -1
- package/dist/VirtualShell/idleManager.d.ts +65 -0
- package/dist/VirtualShell/idleManager.d.ts.map +1 -0
- package/dist/VirtualShell/idleManager.js +106 -0
- package/dist/VirtualShell/idleManager.js.map +1 -0
- package/dist/VirtualShell/index.d.ts +28 -0
- package/dist/VirtualShell/index.d.ts.map +1 -1
- package/dist/VirtualShell/index.js +48 -0
- package/dist/VirtualShell/index.js.map +1 -1
- package/dist/VirtualShell/shell.js +4 -4
- package/dist/VirtualShell/shell.js.map +1 -1
- package/dist/commands/man.d.ts.map +1 -1
- package/dist/commands/man.js +5 -27
- package/dist/commands/man.js.map +1 -1
- package/dist/commands/manuals-bundle.d.ts +11 -0
- package/dist/commands/manuals-bundle.d.ts.map +1 -0
- package/dist/commands/manuals-bundle.js +898 -0
- package/dist/commands/manuals-bundle.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/linuxRootfs.d.ts +8 -1
- package/dist/modules/linuxRootfs.d.ts.map +1 -1
- package/dist/modules/linuxRootfs.js +47 -14
- package/dist/modules/linuxRootfs.js.map +1 -1
- package/dist/self-standalone.js +16 -1
- package/dist/self-standalone.js.map +1 -1
- package/dist/standalone.js +22 -0
- package/dist/standalone.js.map +1 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/HoneyPot.html +8 -8
- package/docs/classes/IdleManager.html +159 -0
- package/docs/classes/SshClient.html +18 -18
- package/docs/classes/VirtualFileSystem.html +57 -32
- package/docs/classes/VirtualPackageManager.html +12 -12
- package/docs/classes/VirtualSftpServer.html +3 -3
- package/docs/classes/VirtualShell.html +40 -25
- package/docs/classes/VirtualSshServer.html +5 -5
- package/docs/classes/VirtualUserManager.html +26 -26
- package/docs/functions/assertDiff.html +1 -1
- package/docs/functions/diffSnapshots.html +1 -1
- package/docs/functions/formatDiff.html +1 -1
- package/docs/functions/getArg.html +1 -1
- package/docs/functions/getFlag.html +1 -1
- package/docs/functions/ifFlag.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +1 -2
- package/docs/interfaces/AuditLogEntry.html +2 -2
- package/docs/interfaces/CommandContext.html +11 -11
- package/docs/interfaces/CommandResult.html +12 -12
- package/docs/interfaces/ExecStream.html +5 -5
- package/docs/interfaces/HoneyPotStats.html +2 -2
- package/docs/interfaces/IdleManagerOptions.html +7 -0
- package/docs/interfaces/InstalledPackage.html +10 -10
- package/docs/interfaces/NanoEditorSession.html +4 -4
- package/docs/interfaces/PackageDefinition.html +13 -13
- package/docs/interfaces/PackageFile.html +4 -4
- package/docs/interfaces/RemoveOptions.html +2 -2
- package/docs/interfaces/ShellEnv.html +3 -3
- package/docs/interfaces/ShellModule.html +7 -7
- package/docs/interfaces/ShellProperties.html +4 -4
- package/docs/interfaces/ShellStream.html +6 -6
- package/docs/interfaces/SudoChallenge.html +8 -8
- package/docs/interfaces/VfsBaseNode.html +6 -6
- package/docs/interfaces/VfsDiff.html +5 -5
- package/docs/interfaces/VfsDiffEntry.html +3 -3
- package/docs/interfaces/VfsDiffModified.html +5 -5
- package/docs/interfaces/VfsDirectoryNode.html +7 -7
- package/docs/interfaces/VfsFileNode.html +8 -8
- package/docs/interfaces/VfsOptions.html +18 -4
- package/docs/interfaces/VfsSnapshot.html +2 -2
- package/docs/interfaces/VfsSnapshotBaseNode.html +3 -3
- package/docs/interfaces/VfsSnapshotDirectoryNode.html +4 -4
- package/docs/interfaces/VfsSnapshotFileNode.html +5 -5
- package/docs/interfaces/WriteFileOptions.html +3 -3
- package/docs/modules.html +1 -1
- package/docs/types/CommandMode.html +1 -1
- package/docs/types/CommandOutcome.html +1 -1
- package/docs/types/IdleState.html +1 -0
- package/docs/types/VfsNodeStats.html +1 -1
- package/docs/types/VfsNodeType.html +1 -1
- package/docs/types/VfsPersistenceMode.html +1 -1
- package/docs/types/VfsSnapshotNode.html +1 -1
- package/package.json +5 -4
- package/scripts/generate-manuals-bundle.mjs +49 -0
- package/src/SSHMimic/exec.ts +0 -1
- package/src/SSHMimic/index.ts +3 -1
- package/src/SSHMimic/sftp.ts +0 -6
- package/src/VirtualFileSystem/binaryPack.ts +21 -9
- package/src/VirtualFileSystem/index.ts +369 -52
- package/src/VirtualFileSystem/internalTypes.ts +24 -4
- package/src/VirtualFileSystem/journal.ts +163 -0
- package/src/VirtualFileSystem/path.ts +1 -1
- package/src/VirtualShell/idleManager.ts +133 -0
- package/src/VirtualShell/index.ts +48 -0
- package/src/VirtualShell/shell.ts +4 -4
- package/src/commands/man.ts +5 -35
- package/src/commands/manuals-bundle.ts +898 -0
- package/src/index.ts +2 -0
- package/src/modules/linuxRootfs.ts +58 -14
- package/src/self-standalone.ts +14 -1
- package/src/standalone.ts +23 -0
- package/builds/standalone.js +0 -491
- package/builds/standalone.js.map +0 -7
package/.vscode/settings.json
CHANGED
package/README.md
CHANGED
|
@@ -85,7 +85,6 @@ curl -s https://raw.githubusercontent.com/itsrealfortune/typescript-virtual-cont
|
|
|
85
85
|
|
|
86
86
|
> [!NOTE]
|
|
87
87
|
> The standalone builds are intended for quick demos and testing. For production use, it's recommended to install the package and import the relevant classes directly in your codebase for better performance, stability, and security.
|
|
88
|
-
> It implies command `man` is not available in standalone mode because manuals are not included in the minimal build, but you can always refer to the [API Reference](#api-reference) for detailed documentation.
|
|
89
88
|
|
|
90
89
|
**`self-standalone.js` options:**
|
|
91
90
|
|
package/benchmark-results.txt
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
Benchmarking VirtualShell concurrency:
|
|
2
2
|
|
|
3
3
|
Running 1 shells...
|
|
4
|
-
Initialized 1 shells in
|
|
5
|
-
Executed shell commands in 5ms, RSS now
|
|
4
|
+
Initialized 1 shells in 58ms, RSS 98 MB
|
|
5
|
+
Executed shell commands in 5ms, RSS now 98 MB (+1 MB)
|
|
6
6
|
|
|
7
7
|
Running 2 shells...
|
|
8
|
-
Initialized 2 shells in
|
|
9
|
-
Executed shell commands in 1ms, RSS now
|
|
8
|
+
Initialized 2 shells in 10ms, RSS 102 MB
|
|
9
|
+
Executed shell commands in 1ms, RSS now 102 MB (+0 MB)
|
|
10
10
|
|
|
11
11
|
Running 5 shells...
|
|
12
|
-
Initialized 5 shells in
|
|
13
|
-
Executed shell commands in 1ms, RSS now
|
|
12
|
+
Initialized 5 shells in 21ms, RSS 113 MB
|
|
13
|
+
Executed shell commands in 1ms, RSS now 113 MB (+0 MB)
|
|
14
14
|
|
|
15
15
|
Running 10 shells...
|
|
16
|
-
Initialized 10 shells in
|
|
17
|
-
Executed shell commands in
|
|
16
|
+
Initialized 10 shells in 43ms, RSS 132 MB
|
|
17
|
+
Executed shell commands in 6ms, RSS now 132 MB (+1 MB)
|
|
18
18
|
|
|
19
19
|
Running 20 shells...
|
|
20
|
-
Initialized 20 shells in
|
|
21
|
-
Executed shell commands in 4ms, RSS now
|
|
20
|
+
Initialized 20 shells in 107ms, RSS 150 MB
|
|
21
|
+
Executed shell commands in 4ms, RSS now 150 MB (+0 MB)
|
|
22
22
|
|
|
23
23
|
Running 50 shells...
|
|
24
|
-
Initialized 50 shells in
|
|
25
|
-
Executed shell commands in 5ms, RSS now
|
|
24
|
+
Initialized 50 shells in 177ms, RSS 178 MB
|
|
25
|
+
Executed shell commands in 5ms, RSS now 179 MB (+0 MB)
|
|
26
26
|
|
|
27
27
|
Running 100 shells...
|
|
28
|
-
Initialized 100 shells in
|
|
29
|
-
Executed shell commands in 9ms, RSS now
|
|
28
|
+
Initialized 100 shells in 302ms, RSS 190 MB
|
|
29
|
+
Executed shell commands in 9ms, RSS now 190 MB (+0 MB)
|
|
30
30
|
|
|
31
31
|
Summary:
|
|
32
32
|
|
|
33
33
|
count init_ms cmd_ms init_rss final_rss delta_rss
|
|
34
|
-
1
|
|
35
|
-
2
|
|
36
|
-
5
|
|
37
|
-
10
|
|
38
|
-
20
|
|
39
|
-
50
|
|
40
|
-
100
|
|
34
|
+
1 58 5 98 MB 98 MB 1 MB
|
|
35
|
+
2 10 1 102 MB 102 MB 0 MB
|
|
36
|
+
5 21 1 113 MB 113 MB 0 MB
|
|
37
|
+
10 43 6 132 MB 132 MB 1 MB
|
|
38
|
+
20 107 4 150 MB 150 MB 0 MB
|
|
39
|
+
50 177 5 178 MB 179 MB 0 MB
|
|
40
|
+
100 302 9 190 MB 190 MB 0 MB
|