diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-06-29 11:49:28 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-06-29 11:49:28 -0700 |
| commit | d55b767039605256c736166a942a9138e3eacfd7 (patch) | |
| tree | 947063b634c50d438a794325f13275e134aa5993 /node_modules/concurrently/dist/src/command.d.ts | |
| parent | 864ce67d89c77d8ef9c3361f80d619853abcf91c (diff) | |
remove dev node_modules (oops)
Diffstat (limited to 'node_modules/concurrently/dist/src/command.d.ts')
| -rw-r--r-- | node_modules/concurrently/dist/src/command.d.ts | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/node_modules/concurrently/dist/src/command.d.ts b/node_modules/concurrently/dist/src/command.d.ts deleted file mode 100644 index 84c6298..0000000 --- a/node_modules/concurrently/dist/src/command.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -/// <reference types="node" /> -/// <reference types="node" /> -/// <reference types="node" /> -/// <reference types="node" /> -import { ChildProcess as BaseChildProcess, SpawnOptions } from 'child_process'; -import * as Rx from 'rxjs'; -import { EventEmitter, Writable } from 'stream'; -/** - * Identifier for a command; if string, it's the command's name, if number, it's the index. - */ -export type CommandIdentifier = string | number; -export interface CommandInfo { - /** - * Command's name. - */ - name: string; - /** - * Which command line the command has. - */ - command: string; - /** - * Which environment variables should the spawned process have. - */ - env?: Record<string, unknown>; - /** - * The current working directory of the process when spawned. - */ - cwd?: string; - /** - * Color to use on prefix of the command. - */ - prefixColor?: string; - /** - * Output command in raw format. - */ - raw?: boolean; -} -export interface CloseEvent { - command: CommandInfo; - /** - * The command's index among all commands ran. - */ - index: number; - /** - * Whether the command exited because it was killed. - */ - killed: boolean; - /** - * The exit code or signal for the command. - */ - exitCode: string | number; - timings: { - startDate: Date; - endDate: Date; - durationSeconds: number; - }; -} -export interface TimerEvent { - startDate: Date; - endDate?: Date; -} -/** - * Subtype of NodeJS's child_process including only what's actually needed for a command to work. - */ -export type ChildProcess = EventEmitter & Pick<BaseChildProcess, 'pid' | 'stdin' | 'stdout' | 'stderr'>; -/** - * Interface for a function that must kill the process with `pid`, optionally sending `signal` to it. - */ -export type KillProcess = (pid: number, signal?: string) => void; -/** - * Interface for a function that spawns a command and returns its child process instance. - */ -export type SpawnCommand = (command: string, options: SpawnOptions) => ChildProcess; -export declare class Command implements CommandInfo { - private readonly killProcess; - private readonly spawn; - private readonly spawnOpts; - readonly index: number; - /** @inheritdoc */ - readonly name: string; - /** @inheritdoc */ - readonly command: string; - /** @inheritdoc */ - readonly prefixColor?: string; - /** @inheritdoc */ - readonly env: Record<string, unknown>; - /** @inheritdoc */ - readonly cwd?: string; - readonly close: Rx.Subject<CloseEvent>; - readonly error: Rx.Subject<unknown>; - readonly stdout: Rx.Subject<Buffer>; - readonly stderr: Rx.Subject<Buffer>; - readonly timer: Rx.Subject<TimerEvent>; - process?: ChildProcess; - stdin?: Writable; - pid?: number; - killed: boolean; - exited: boolean; - /** @deprecated */ - get killable(): boolean; - constructor({ index, name, command, prefixColor, env, cwd }: CommandInfo & { - index: number; - }, spawnOpts: SpawnOptions, spawn: SpawnCommand, killProcess: KillProcess); - /** - * Starts this command, piping output, error and close events onto the corresponding observables. - */ - start(): void; - /** - * Kills this command, optionally specifying a signal to send to it. - */ - kill(code?: string): void; - /** - * Detects whether a command can be killed. - * - * Also works as a type guard on the input `command`. - */ - static canKill(command: Command): command is Command & { - pid: number; - process: ChildProcess; - }; -} |
