@fuzdev/fuz_util 0.45.2 → 0.46.0

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/dist/process.d.ts CHANGED
@@ -1,81 +1,341 @@
1
1
  import { type SpawnOptions, type ChildProcess } from 'node:child_process';
2
- import type { Result } from './result.js';
3
- export interface SpawnedProcess {
2
+ /**
3
+ * Spawn failed before the process could run.
4
+ *
5
+ * @example ENOENT when command not found
6
+ */
7
+ export interface SpawnResultError {
8
+ ok: false;
4
9
  child: ChildProcess;
5
- closed: Promise<SpawnResult>;
10
+ error: Error;
6
11
  }
7
- export interface Spawned {
12
+ /**
13
+ * Process ran and exited with a code.
14
+ * `ok` is true when `code` is 0.
15
+ */
16
+ export interface SpawnResultExited {
17
+ ok: boolean;
8
18
  child: ChildProcess;
9
- signal: NodeJS.Signals | null;
10
- code: number | null;
19
+ code: number;
20
+ signal: null;
21
+ }
22
+ /**
23
+ * Process was terminated by a signal (e.g., SIGTERM, SIGKILL).
24
+ */
25
+ export interface SpawnResultSignaled {
26
+ ok: false;
27
+ child: ChildProcess;
28
+ code: null;
29
+ signal: NodeJS.Signals;
30
+ }
31
+ /**
32
+ * Discriminated union representing all possible spawn outcomes.
33
+ * Use type guards `spawn_result_is_error`, `spawn_result_is_signaled`,
34
+ * and `spawn_result_is_exited` to narrow the type.
35
+ */
36
+ export type SpawnResult = SpawnResultError | SpawnResultExited | SpawnResultSignaled;
37
+ /**
38
+ * Type guard for spawn errors (process failed to start).
39
+ */
40
+ export declare const spawn_result_is_error: (result: SpawnResult) => result is SpawnResultError;
41
+ /**
42
+ * Type guard for signal termination.
43
+ */
44
+ export declare const spawn_result_is_signaled: (result: SpawnResult) => result is SpawnResultSignaled;
45
+ /**
46
+ * Type guard for normal exit with code.
47
+ */
48
+ export declare const spawn_result_is_exited: (result: SpawnResult) => result is SpawnResultExited;
49
+ /**
50
+ * Options for spawning processes, extending Node's `SpawnOptions`.
51
+ */
52
+ export interface SpawnProcessOptions extends SpawnOptions {
53
+ /**
54
+ * AbortSignal to cancel the process.
55
+ * When aborted, sends SIGTERM to the child.
56
+ */
57
+ signal?: AbortSignal;
58
+ /**
59
+ * Timeout in milliseconds. Must be non-negative.
60
+ * Sends SIGTERM when exceeded. A value of 0 triggers immediate SIGTERM.
61
+ */
62
+ timeout_ms?: number;
11
63
  }
12
- export type SpawnResult = Result<Spawned, Spawned>;
13
64
  /**
14
- * A convenient promise wrapper around `spawn_process`
15
- * intended for commands that have an end, not long running-processes like watchers.
16
- * Any more advanced usage should use `spawn_process` directly for access to the `child` process.
65
+ * Options for killing processes.
66
+ */
67
+ export interface DespawnOptions {
68
+ /**
69
+ * Signal to send.
70
+ * @default 'SIGTERM'
71
+ */
72
+ signal?: NodeJS.Signals;
73
+ /**
74
+ * Timeout in ms before escalating to SIGKILL. Must be non-negative.
75
+ * Useful for processes that may ignore SIGTERM. A value of 0 triggers immediate SIGKILL escalation.
76
+ */
77
+ timeout_ms?: number;
78
+ }
79
+ /**
80
+ * Handle for a spawned process with access to the child and completion promise.
81
+ */
82
+ export interface SpawnedProcess {
83
+ /** The underlying Node.js ChildProcess */
84
+ child: ChildProcess;
85
+ /** Resolves when the process exits */
86
+ closed: Promise<SpawnResult>;
87
+ }
88
+ /**
89
+ * Result of `spawn_out` with captured output streams.
17
90
  */
18
- export declare const spawn: (...args: Parameters<typeof spawn_process>) => Promise<SpawnResult>;
19
91
  export interface SpawnedOut {
20
92
  result: SpawnResult;
93
+ /** Captured stdout, or null if stream unavailable */
21
94
  stdout: string | null;
95
+ /** Captured stderr, or null if stream unavailable */
22
96
  stderr: string | null;
23
97
  }
24
98
  /**
25
- * Similar to `spawn` but buffers and returns `stdout` and `stderr` as strings.
99
+ * Manages a collection of spawned processes for lifecycle tracking and cleanup.
100
+ *
101
+ * The default instance `process_registry_default` is used by module-level functions.
102
+ * Create separate instances for isolated process groups or testing.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * // Use default registry via module functions
107
+ * const result = await spawn('echo', ['hello']);
108
+ *
109
+ * // Or create isolated registry for testing
110
+ * const registry = new ProcessRegistry();
111
+ * const {child, closed} = registry.spawn('node', ['server.js']);
112
+ * await registry.despawn_all();
113
+ * ```
114
+ */
115
+ export declare class ProcessRegistry {
116
+ #private;
117
+ /** All currently tracked child processes */
118
+ readonly processes: Set<ChildProcess>;
119
+ /**
120
+ * Spawns a process and tracks it in this registry.
121
+ * The process is automatically unregistered when it exits.
122
+ *
123
+ * @param command - The command to run
124
+ * @param args - Arguments to pass to the command
125
+ * @param options - Spawn options including `signal` and `timeout_ms`
126
+ * @returns Handle with `child` process and `closed` promise
127
+ */
128
+ spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions): SpawnedProcess;
129
+ /**
130
+ * Spawns a process and captures stdout/stderr as strings.
131
+ * Sets `stdio: 'pipe'` automatically.
132
+ *
133
+ * @param command - The command to run
134
+ * @param args - Arguments to pass to the command
135
+ * @param options - Spawn options
136
+ * @returns Result with captured `stdout` and `stderr`.
137
+ * - `null` means spawn failed (ENOENT, etc.) or stream was unavailable
138
+ * - `''` (empty string) means process ran but produced no output
139
+ * - non-empty string contains the captured output
140
+ */
141
+ spawn_out(command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions): Promise<SpawnedOut>;
142
+ /**
143
+ * Kills a child process and waits for it to exit.
144
+ *
145
+ * @param child - The child process to kill
146
+ * @param options - Kill options including signal and timeout
147
+ * @returns The spawn result after the process exits
148
+ */
149
+ despawn(child: ChildProcess, options?: DespawnOptions): Promise<SpawnResult>;
150
+ /**
151
+ * Kills all processes in this registry.
152
+ *
153
+ * @param options - Kill options applied to all processes
154
+ * @returns Array of spawn results
155
+ */
156
+ despawn_all(options?: DespawnOptions): Promise<Array<SpawnResult>>;
157
+ /**
158
+ * Attaches an `uncaughtException` handler that kills all processes before exiting.
159
+ * Prevents zombie processes when the parent crashes.
160
+ *
161
+ * By default uses SIGKILL for immediate termination. Set `graceful_timeout_ms`
162
+ * to attempt SIGTERM first (allowing processes to clean up) before escalating
163
+ * to SIGKILL after the timeout.
164
+ *
165
+ * Note: Node's uncaughtException handler cannot await async operations, so
166
+ * graceful shutdown uses a blocking busy-wait. This may not be sufficient
167
+ * for processes that need significant cleanup time.
168
+ *
169
+ * @param options - Configuration options
170
+ * @param options.to_error_label - Customize error label, return `null` for default
171
+ * @param options.map_error_text - Customize error text, return `''` to silence
172
+ * @param options.handle_error - Called after cleanup, defaults to `process.exit(1)`
173
+ * @param options.graceful_timeout_ms - If set, sends SIGTERM first and waits this
174
+ * many ms before SIGKILL. Recommended: 100-500ms. If null/undefined, uses
175
+ * immediate SIGKILL (default).
176
+ * @returns Cleanup function to remove the handler
177
+ */
178
+ attach_error_handler(options?: {
179
+ to_error_label?: (err: Error, origin: NodeJS.UncaughtExceptionOrigin) => string | null;
180
+ map_error_text?: (err: Error, origin: NodeJS.UncaughtExceptionOrigin) => string | null;
181
+ handle_error?: (err: Error, origin: NodeJS.UncaughtExceptionOrigin) => void;
182
+ graceful_timeout_ms?: number | null;
183
+ }): () => void;
184
+ }
185
+ /**
186
+ * Default process registry used by module-level spawn functions.
187
+ * For testing or isolated process groups, create a new `ProcessRegistry` instance.
26
188
  */
27
- export declare const spawn_out: (command: string, args?: ReadonlyArray<string>, options?: SpawnOptions) => Promise<SpawnedOut>;
189
+ export declare const process_registry_default: ProcessRegistry;
28
190
  /**
29
- * Wraps the normal Node `childProcess.spawn` with graceful child shutdown behavior.
30
- * Also returns a convenient `closed` promise.
31
- * If you only need `closed`, prefer the shorthand function `spawn`.
32
- * @mutates global_spawn calls `register_global_spawn()` which adds to the module-level Set
191
+ * Spawns a process with graceful shutdown behavior.
192
+ * Returns a handle with access to the `child` process and `closed` promise.
193
+ *
194
+ * @example
195
+ * ```ts
196
+ * const {child, closed} = spawn_process('node', ['server.js']);
197
+ * // Later...
198
+ * child.kill();
199
+ * const result = await closed;
200
+ * ```
33
201
  */
34
- export declare const spawn_process: (command: string, args?: ReadonlyArray<string>, options?: SpawnOptions) => SpawnedProcess;
35
- export declare const print_child_process: (child: ChildProcess) => string;
202
+ export declare const spawn_process: (command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions) => SpawnedProcess;
203
+ /**
204
+ * Spawns a process and returns a promise that resolves when it exits.
205
+ * Use this for commands that complete (not long-running processes).
206
+ *
207
+ * @example
208
+ * ```ts
209
+ * const result = await spawn('npm', ['install']);
210
+ * if (!result.ok) console.error('Install failed');
211
+ * ```
212
+ */
213
+ export declare const spawn: (command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions) => Promise<SpawnResult>;
36
214
  /**
37
- * We register spawned processes gloabally so we can gracefully exit child processes.
38
- * Otherwise, errors can cause zombie processes, sometimes blocking ports even!
215
+ * Spawns a process and captures stdout/stderr as strings.
216
+ *
217
+ * @example
218
+ * ```ts
219
+ * const {result, stdout} = await spawn_out('git', ['status', '--porcelain']);
220
+ * if (result.ok && stdout) console.log(stdout);
221
+ * ```
39
222
  */
40
- export declare const global_spawn: Set<ChildProcess>;
223
+ export declare const spawn_out: (command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions) => Promise<SpawnedOut>;
41
224
  /**
42
- * Returns a function that unregisters the `child`.
43
- * @param child the child process to register
44
- * @returns cleanup function that removes the child from `global_spawn`
45
- * @mutates global_spawn adds child to the module-level Set, and the returned function removes it
225
+ * Kills a child process and returns the result.
226
+ *
227
+ * @example
228
+ * ```ts
229
+ * const result = await despawn(child, {timeout_ms: 5000});
230
+ * // If process ignores SIGTERM, SIGKILL sent after 5s
231
+ * ```
46
232
  */
47
- export declare const register_global_spawn: (child: ChildProcess) => (() => void);
233
+ export declare const despawn: (child: ChildProcess, options?: DespawnOptions) => Promise<SpawnResult>;
48
234
  /**
49
- * Kills a child process and returns a `SpawnResult`.
235
+ * Kills all processes in the default registry.
50
236
  */
51
- export declare const despawn: (child: ChildProcess) => Promise<SpawnResult>;
237
+ export declare const despawn_all: (options?: DespawnOptions) => Promise<Array<SpawnResult>>;
52
238
  /**
53
- * Kills all globally registered child processes.
54
- * @mutates global_spawn indirectly removes processes through `despawn()` calls
239
+ * Attaches an `uncaughtException` handler to the default registry.
240
+ *
241
+ * @see ProcessRegistry.attach_error_handler
55
242
  */
56
- export declare const despawn_all: () => Promise<Array<SpawnResult>>;
243
+ export declare const attach_process_error_handler: (options?: Parameters<ProcessRegistry["attach_error_handler"]>[0]) => (() => void);
57
244
  /**
58
- * Attaches the `'uncoughtException'` event to despawn all processes,
59
- * and enables custom error logging with `to_error_label`.
60
- * @param to_error_label - Customize the error label or return `null` for the default `origin`.
61
- * @param map_error_text - Customize the error text. Return `''` to silence, or `null` for the default `print_error(err)`.
245
+ * Formats a child process for display.
246
+ *
247
+ * @example `pid(1234) <- node server.js`
62
248
  */
63
- export declare const attach_process_error_handlers: (to_error_label?: (err: Error, origin: NodeJS.UncaughtExceptionOrigin) => string | null, map_error_text?: (err: Error, origin: NodeJS.UncaughtExceptionOrigin) => string | null, handle_error?: (err: Error, origin: NodeJS.UncaughtExceptionOrigin) => void) => void;
249
+ export declare const print_child_process: (child: ChildProcess) => string;
64
250
  /**
65
- * Formats a `SpawnResult` for printing.
251
+ * Formats a spawn result for display.
252
+ * Returns `'ok'` for success, or the error/signal/code for failures.
66
253
  */
67
254
  export declare const print_spawn_result: (result: SpawnResult) => string;
255
+ /**
256
+ * Formats a spawn result for use in error messages.
257
+ */
258
+ export declare const spawn_result_to_message: (result: SpawnResult) => string;
259
+ /**
260
+ * Handle for a process that can be restarted.
261
+ * Exposes `closed` promise for observing exits and implementing restart policies.
262
+ */
68
263
  export interface RestartableProcess {
69
- restart: () => void;
264
+ /**
265
+ * Restart the process, killing the current one if active.
266
+ * Concurrent calls are coalesced - multiple calls before the first completes
267
+ * will share the same restart operation.
268
+ */
269
+ restart: () => Promise<void>;
270
+ /** Kill the process and set `active` to false */
70
271
  kill: () => Promise<void>;
272
+ /**
273
+ * Whether this handle is managing a process.
274
+ *
275
+ * Note: This reflects handle state, not whether the underlying OS process is executing.
276
+ * Remains `true` after a process exits naturally until `kill()` or `restart()` is called.
277
+ * To check if the process actually exited, await `closed`.
278
+ */
279
+ readonly active: boolean;
280
+ /** The current child process, or null if not active */
281
+ readonly child: ChildProcess | null;
282
+ /** Promise that resolves when the current process exits */
283
+ readonly closed: Promise<SpawnResult>;
284
+ /**
285
+ * Promise that resolves when the initial `spawn_process()` call completes.
286
+ *
287
+ * Note: This resolves when the spawn syscall returns, NOT when the process
288
+ * is "ready" or has produced output. For commands that fail immediately
289
+ * (e.g., ENOENT), `spawned` still resolves - check `closed` for errors.
290
+ *
291
+ * @example
292
+ * ```ts
293
+ * const rp = spawn_restartable_process('node', ['server.js']);
294
+ * await rp.spawned; // Safe to access rp.child now
295
+ * ```
296
+ */
297
+ readonly spawned: Promise<void>;
71
298
  }
72
299
  /**
73
- * Like `spawn_process` but with `restart` and `kill`,
74
- * handling many concurrent `restart` calls gracefully.
300
+ * Spawns a process that can be restarted.
301
+ * Handles concurrent restart calls gracefully.
302
+ *
303
+ * Note: The `signal` and `timeout_ms` options are reapplied on each restart.
304
+ * If the AbortSignal is already aborted when `restart()` is called, the new
305
+ * process will be killed immediately.
306
+ *
307
+ * @example Simple restart on crash
308
+ * ```ts
309
+ * const rp = spawn_restartable_process('node', ['server.js']);
310
+ *
311
+ * while (rp.active) {
312
+ * const result = await rp.closed;
313
+ * if (result.ok) break; // Clean exit
314
+ * await rp.restart();
315
+ * }
316
+ * ```
317
+ *
318
+ * @example Restart with backoff
319
+ * ```ts
320
+ * const rp = spawn_restartable_process('node', ['server.js']);
321
+ * let failures = 0;
322
+ *
323
+ * while (rp.active) {
324
+ * const result = await rp.closed;
325
+ * if (result.ok || ++failures > 5) break;
326
+ * await new Promise((r) => setTimeout(r, 1000 * failures));
327
+ * await rp.restart();
328
+ * }
329
+ * ```
75
330
  */
76
- export declare const spawn_restartable_process: (command: string, args?: ReadonlyArray<string>, options?: SpawnOptions) => RestartableProcess;
331
+ export declare const spawn_restartable_process: (command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions) => RestartableProcess;
77
332
  /**
78
- * Check if a PID is still running.
333
+ * Checks if a process with the given PID is running.
334
+ * Uses signal 0 which checks existence without sending a signal.
335
+ *
336
+ * @param pid - The process ID to check (must be a positive integer)
337
+ * @returns `true` if the process exists (even without permission to signal it),
338
+ * `false` if the process doesn't exist or if pid is invalid (non-positive, non-integer, NaN, Infinity)
79
339
  */
80
340
  export declare const process_is_pid_running: (pid: number) => boolean;
81
341
  //# sourceMappingURL=process.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"process.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/process.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAIxC,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,OAAO;IACvB,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAID,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,UAAU,CAAC,OAAO,aAAa,CAAC,KAAG,OAAO,CAAC,WAAW,CACvD,CAAC;AAE/B,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,GACrB,SAAS,MAAM,EACf,OAAM,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