- initial changes to data shapes

- ls command needs fixing
This commit is contained in:
2026-09-03 11:15:05 +02:00
parent 2e9227f6d8
commit 8a349330b0
12 changed files with 42 additions and 127 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import type { CommandDescriptor } from "@core/command";
import type { ShellState } from "@core/shell_state";
import type { Signal } from "@core/signal";
import { SIGNAL_MAP, type Signal } from "@core/signal";
import { EventEmitter } from "./event_emitter";
import { Process } from "./process";
import type { ShellEventMap } from "./shell";
@@ -11,9 +11,9 @@ export class ProcessManager {
private _EventEmitter: EventEmitter<ShellEventMap> = new EventEmitter();
public createProcess(state: ShellState, descriptor: CommandDescriptor, flags: string[], args: string[]): number {
public createProcess(state: ShellState, descriptor: CommandDescriptor, args: string[]): number {
const pid = ++this._PIDIndex;
const process = new Process(pid, state, descriptor, flags, args);
const process = new Process(pid, state, descriptor, args);
this._Processes.set(pid, process);
process.on("stdout", payload => this._EventEmitter.emit("stdout", payload));
@@ -51,7 +51,7 @@ export class ProcessManager {
}
//Make global signals an enum later
process.sendSignal({ type: "SIGKILL" } satisfies Signal);
process.sendSignal({ type: SIGNAL_MAP.SIGKILL } satisfies Signal);
}
public on<K extends keyof ShellEventMap>(type: K, handler: (payload: ShellEventMap[K]) => void): () => void {