typescript-virtual-container 1.5.7 → 1.5.9

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 (37) hide show
  1. package/README.md +39 -29
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/SSHMimic/executor.js +9 -0
  4. package/dist/SSHMimic/prompt.d.ts +2 -1
  5. package/dist/SSHMimic/prompt.js +28 -6
  6. package/dist/SSHMimic/sftp.d.ts +1 -1
  7. package/dist/SSHMimic/sftp.js +1 -1
  8. package/dist/VirtualShell/index.d.ts +2 -3
  9. package/dist/VirtualShell/index.js +2 -3
  10. package/dist/VirtualShell/shell.js +108 -134
  11. package/dist/VirtualShell/shellParser.js +35 -3
  12. package/dist/commands/coreutils.d.ts +55 -0
  13. package/dist/commands/coreutils.js +275 -0
  14. package/dist/commands/id.js +8 -1
  15. package/dist/commands/index.d.ts +1 -1
  16. package/dist/commands/index.js +1 -1
  17. package/dist/commands/manuals-bundle.js +237 -1
  18. package/dist/commands/pacman.d.ts +8 -0
  19. package/dist/commands/pacman.js +15 -0
  20. package/dist/commands/registry.js +13 -0
  21. package/dist/commands/rm.d.ts +1 -1
  22. package/dist/commands/rm.js +48 -11
  23. package/dist/commands/runtime.d.ts +5 -0
  24. package/dist/commands/runtime.js +60 -1
  25. package/dist/commands/sh.js +5 -3
  26. package/dist/modules/linuxRootfs.js +7 -3
  27. package/dist/modules/nanoEditor.d.ts +92 -0
  28. package/dist/modules/nanoEditor.js +974 -0
  29. package/dist/modules/pacmanGame.d.ts +59 -0
  30. package/dist/modules/pacmanGame.js +655 -0
  31. package/dist/modules/webTermRenderer.d.ts +50 -0
  32. package/dist/modules/webTermRenderer.js +425 -0
  33. package/dist/types/commands.d.ts +2 -0
  34. package/dist/types/pipeline.d.ts +2 -0
  35. package/dist/utils/shellSession.d.ts +10 -0
  36. package/dist/utils/shellSession.js +56 -0
  37. package/package.json +2 -2
@@ -0,0 +1,59 @@
1
+ import type { ShellStream } from "../types/streams";
2
+ import type { TerminalSize } from "./shellRuntime";
3
+ export interface PacmanGameOptions {
4
+ stream: ShellStream;
5
+ terminalSize: TerminalSize;
6
+ onExit: () => void;
7
+ }
8
+ export declare class PacmanGame {
9
+ private stream;
10
+ private onExit;
11
+ private grid;
12
+ private visualGrid;
13
+ private pacR;
14
+ private pacC;
15
+ private pacDir;
16
+ private pacNextDir;
17
+ private pacMouthOpen;
18
+ private pacAlive;
19
+ private ghosts;
20
+ private score;
21
+ private lives;
22
+ private level;
23
+ private dotsTotal;
24
+ private dotsEaten;
25
+ private frightDuration;
26
+ private gameOver;
27
+ private won;
28
+ private msgTicks;
29
+ private msg;
30
+ private globalMode;
31
+ private globalModeTick;
32
+ private readonly modeSchedule;
33
+ private modeIdx;
34
+ private tick;
35
+ private intervalId;
36
+ private inputKey;
37
+ private escBuf;
38
+ private deathTick;
39
+ private deathAnimating;
40
+ private prevLines;
41
+ constructor(opts: PacmanGameOptions);
42
+ private countDots;
43
+ private initGhosts;
44
+ start(): void;
45
+ stop(): void;
46
+ handleInput(chunk: Buffer): void;
47
+ private gameTick;
48
+ private isWalkable;
49
+ private movePacman;
50
+ private activateFright;
51
+ private ghostTarget;
52
+ private moveGhost;
53
+ private checkCollisions;
54
+ private tickFrightCountdowns;
55
+ private respawn;
56
+ private buildLines;
57
+ private renderFull;
58
+ private renderDiff;
59
+ }