typescript-virtual-container 1.0.6 → 1.0.7
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/modules/neofetch.ts +6 -1
- package/package.json +1 -1
- package/src/SSHMimic/executor.ts +3 -0
package/modules/neofetch.ts
CHANGED
|
@@ -252,6 +252,11 @@ function resolveDefaults(info: NeofetchInfo): Required<NeofetchInfo> {
|
|
|
252
252
|
const usedMem = Math.max(0, totalMem - freeMem);
|
|
253
253
|
const shellProps = info.shellProps;
|
|
254
254
|
|
|
255
|
+
const processUptime = process.uptime();
|
|
256
|
+
if (info.uptimeSeconds === undefined) {
|
|
257
|
+
info.uptimeSeconds = Math.round(processUptime);
|
|
258
|
+
}
|
|
259
|
+
|
|
255
260
|
console.log("Resolving neofetch info with shellProps:", shellProps);
|
|
256
261
|
|
|
257
262
|
return {
|
|
@@ -316,7 +321,7 @@ export function buildNeofetchOutput(info: NeofetchInfo): string {
|
|
|
316
321
|
`Host: ${resolveHostLabel(fields.host)}`,
|
|
317
322
|
`Kernel: ${fields.kernel}`,
|
|
318
323
|
`Uptime: ${uptime}`,
|
|
319
|
-
`Packages: ${fields.packages}`,
|
|
324
|
+
// `Packages: ${fields.packages}`,
|
|
320
325
|
`Shell: ${fields.shell}`,
|
|
321
326
|
// `Shell Props: ${fields.shellProps}`,
|
|
322
327
|
`Resolution: ${fields.resolution}`,
|
package/package.json
CHANGED
package/src/SSHMimic/executor.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CommandMode, CommandResult } from "../types/commands";
|
|
2
2
|
import type { Pipeline, PipelineCommand } from "../types/pipeline";
|
|
3
3
|
import type VirtualFileSystem from "../VirtualFileSystem";
|
|
4
|
+
import { defaultShellProperties } from "../VirtualShell";
|
|
4
5
|
import { runCommand as runSingleCommand } from "../VirtualShell/commands";
|
|
5
6
|
import { resolvePath } from "../VirtualShell/commands/helpers";
|
|
6
7
|
import type { VirtualUserManager } from "./users";
|
|
@@ -84,6 +85,7 @@ async function executeSingleCommandWithRedirections(
|
|
|
84
85
|
users,
|
|
85
86
|
mode,
|
|
86
87
|
cwd,
|
|
88
|
+
defaultShellProperties,
|
|
87
89
|
vfs,
|
|
88
90
|
stdin,
|
|
89
91
|
);
|
|
@@ -159,6 +161,7 @@ async function executePipelineChain(
|
|
|
159
161
|
users,
|
|
160
162
|
mode,
|
|
161
163
|
cwd,
|
|
164
|
+
defaultShellProperties,
|
|
162
165
|
vfs,
|
|
163
166
|
currentOutput,
|
|
164
167
|
);
|