@fuzdev/fuz_util 0.45.3 → 0.47.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/array.d.ts +1 -1
- package/dist/array.js +1 -1
- package/dist/dom.d.ts +2 -2
- package/dist/dom.js +2 -2
- package/dist/fetch.d.ts +1 -1
- package/dist/fetch.js +1 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +10 -10
- package/dist/path.d.ts +1 -1
- package/dist/path.js +2 -2
- package/dist/print.d.ts +1 -1
- package/dist/print.js +1 -1
- package/dist/process.d.ts +307 -43
- package/dist/process.d.ts.map +1 -1
- package/dist/process.js +477 -108
- package/dist/random.d.ts +1 -1
- package/dist/random.js +1 -1
- package/dist/regexp.d.ts +1 -1
- package/dist/regexp.js +1 -1
- package/package.json +10 -9
- package/src/lib/array.ts +1 -1
- package/src/lib/dom.ts +2 -2
- package/src/lib/fetch.ts +1 -1
- package/src/lib/git.ts +20 -10
- package/src/lib/path.ts +2 -2
- package/src/lib/print.ts +1 -1
- package/src/lib/process.ts +687 -135
- package/src/lib/random.ts +1 -1
- package/src/lib/regexp.ts +1 -1
package/dist/array.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const EMPTY_ARRAY: Array<any>;
|
|
|
4
4
|
export declare const to_array: <T>(value: T) => T extends ReadonlyArray<any> ? T : Array<T>;
|
|
5
5
|
/**
|
|
6
6
|
* Removes an element from `array` at `index` in an unordered manner.
|
|
7
|
-
* @mutates array swaps element at index with last element, then removes last element
|
|
7
|
+
* @mutates array - swaps element at index with last element, then removes last element
|
|
8
8
|
*/
|
|
9
9
|
export declare const remove_unordered: (array: Array<any>, index: number) => void;
|
|
10
10
|
/**
|
package/dist/array.js
CHANGED
|
@@ -4,7 +4,7 @@ export const EMPTY_ARRAY = Object.freeze([]);
|
|
|
4
4
|
export const to_array = (value) => Array.isArray(value) ? value : [value];
|
|
5
5
|
/**
|
|
6
6
|
* Removes an element from `array` at `index` in an unordered manner.
|
|
7
|
-
* @mutates array swaps element at index with last element, then removes last element
|
|
7
|
+
* @mutates array - swaps element at index with last element, then removes last element
|
|
8
8
|
*/
|
|
9
9
|
export const remove_unordered = (array, index) => {
|
|
10
10
|
array[index] = array[array.length - 1];
|
package/dist/dom.d.ts
CHANGED
|
@@ -18,14 +18,14 @@ export declare const is_interactive: (el: any) => boolean;
|
|
|
18
18
|
* @param event
|
|
19
19
|
* @param immediate defaults to `true` to use `stopImmediatePropagation` over `stopPropagation`
|
|
20
20
|
* @param preventDefault defaults to `true`
|
|
21
|
-
* @mutates event calls preventDefault(), stopPropagation(), or stopImmediatePropagation()
|
|
21
|
+
* @mutates event - calls preventDefault(), stopPropagation(), or stopImmediatePropagation()
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
24
|
export declare const swallow: <T extends Pick<Event, "preventDefault" | "stopPropagation" | "stopImmediatePropagation">>(event: T, immediate?: boolean, preventDefault?: boolean) => T;
|
|
25
25
|
/**
|
|
26
26
|
* Handles the value of an event's target and invokes a callback.
|
|
27
27
|
* Defaults to swallowing the event to prevent default actions and propagation.
|
|
28
|
-
* @mutates event calls `swallow()` which mutates the event if `swallow_event` is true
|
|
28
|
+
* @mutates event - calls `swallow()` which mutates the event if `swallow_event` is true
|
|
29
29
|
*/
|
|
30
30
|
export declare const handle_target_value: (cb: (value: any, event: any) => void, swallow_event?: boolean) => (e: any) => void;
|
|
31
31
|
/**
|
package/dist/dom.js
CHANGED
|
@@ -55,7 +55,7 @@ export const is_interactive = (el) => {
|
|
|
55
55
|
* @param event
|
|
56
56
|
* @param immediate defaults to `true` to use `stopImmediatePropagation` over `stopPropagation`
|
|
57
57
|
* @param preventDefault defaults to `true`
|
|
58
|
-
* @mutates event calls preventDefault(), stopPropagation(), or stopImmediatePropagation()
|
|
58
|
+
* @mutates event - calls preventDefault(), stopPropagation(), or stopImmediatePropagation()
|
|
59
59
|
* @returns
|
|
60
60
|
*/
|
|
61
61
|
export const swallow = (event, immediate = true, preventDefault = true) => {
|
|
@@ -73,7 +73,7 @@ export const swallow = (event, immediate = true, preventDefault = true) => {
|
|
|
73
73
|
/**
|
|
74
74
|
* Handles the value of an event's target and invokes a callback.
|
|
75
75
|
* Defaults to swallowing the event to prevent default actions and propagation.
|
|
76
|
-
* @mutates event calls `swallow()` which mutates the event if `swallow_event` is true
|
|
76
|
+
* @mutates event - calls `swallow()` which mutates the event if `swallow_event` is true
|
|
77
77
|
*/
|
|
78
78
|
export const handle_target_value = (cb, swallow_event = true) => (e) => {
|
|
79
79
|
if (swallow_event)
|
package/dist/fetch.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface FetchValueOptions<TValue, TParams = undefined> {
|
|
|
40
40
|
* If the `value` is cached, only the cached safe subset of the `headers` are returned.
|
|
41
41
|
* (currently just `etag` and `last-modified`)
|
|
42
42
|
* Otherwise the full `res.headers` are included.
|
|
43
|
-
* @mutates options.cache calls `cache.set()` to store fetched results if cache is provided
|
|
43
|
+
* @mutates options.cache - calls `cache.set()` to store fetched results if cache is provided
|
|
44
44
|
*/
|
|
45
45
|
export declare const fetch_value: <TValue = any, TParams = undefined>(url: string | URL, options?: FetchValueOptions<TValue, TParams>) => Promise<Result<{
|
|
46
46
|
value: TValue;
|
package/dist/fetch.js
CHANGED
|
@@ -28,7 +28,7 @@ const DEFAULT_GITHUB_API_VERSION_HEADER = '2022-11-28';
|
|
|
28
28
|
* If the `value` is cached, only the cached safe subset of the `headers` are returned.
|
|
29
29
|
* (currently just `etag` and `last-modified`)
|
|
30
30
|
* Otherwise the full `res.headers` are included.
|
|
31
|
-
* @mutates options.cache calls `cache.set()` to store fetched results if cache is provided
|
|
31
|
+
* @mutates options.cache - calls `cache.set()` to store fetched results if cache is provided
|
|
32
32
|
*/
|
|
33
33
|
export const fetch_value = async (url, options) => {
|
|
34
34
|
const { request, params, parse, token, cache, return_early_from_cache, log, fetch = globalThis.fetch, } = options ?? EMPTY_OBJECT;
|
package/dist/git.d.ts.map
C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B,OAAO,CAAC,IAAI,CAQd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GACnC,SAAS,MAAM,EACf,UAAU,YAAY,KACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAKvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oCAAoC,GAChD,UAAU,YAAY,KACpB,OAAO,CAAC,MAAM,CAQhB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,GAAU,UAAU,YAAY,KAAG,OAAO,CAAC,OAAO,CAG3F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC7B,QAAQ,SAAS,EACjB,QAAQ,SAAS,EACjB,YAAY,MAAM,EAClB,YAAY,MAAM,EAClB,UAAU,YAAY,KACpB,OAAO,CAAC,IAAI,CAOd,CAAC"}
|
package/dist/git.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { spawn, spawn_out } from './process.js';
|
|
2
|
+
import { spawn, spawn_out, spawn_result_to_message } from './process.js';
|
|
3
3
|
import { to_file_path } from './path.js';
|
|
4
4
|
import { fs_exists } from './fs.js';
|
|
5
5
|
/**
|
|
@@ -40,11 +40,11 @@ export const git_remote_branch_exists = async (origin = 'origin', branch, option
|
|
|
40
40
|
if (result.ok) {
|
|
41
41
|
return true;
|
|
42
42
|
}
|
|
43
|
-
else if (result.code === 2) {
|
|
43
|
+
else if ('code' in result && result.code === 2) {
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
|
-
throw Error(`git_remote_branch_exists failed for origin '${origin}' and branch '${final_branch}' with
|
|
47
|
+
throw Error(`git_remote_branch_exists failed for origin '${origin}' and branch '${final_branch}' with ${spawn_result_to_message(result)}`);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
@@ -173,7 +173,7 @@ export const git_fetch = async (origin = 'origin', branch, options) => {
|
|
|
173
173
|
args.push(branch);
|
|
174
174
|
const result = await spawn('git', args, options);
|
|
175
175
|
if (!result.ok) {
|
|
176
|
-
throw Error(`git_fetch failed for origin '${origin}' and branch '${branch}' with
|
|
176
|
+
throw Error(`git_fetch failed for origin '${origin}' and branch '${branch}' with ${spawn_result_to_message(result)}`);
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
/**
|
|
@@ -187,7 +187,7 @@ export const git_checkout = async (branch, options) => {
|
|
|
187
187
|
}
|
|
188
188
|
const result = await spawn('git', ['checkout', branch], options);
|
|
189
189
|
if (!result.ok) {
|
|
190
|
-
throw Error(`git_checkout failed for branch '${branch}' with
|
|
190
|
+
throw Error(`git_checkout failed for branch '${branch}' with ${spawn_result_to_message(result)}`);
|
|
191
191
|
}
|
|
192
192
|
return current_branch;
|
|
193
193
|
};
|
|
@@ -200,7 +200,7 @@ export const git_pull = async (origin = 'origin', branch, options) => {
|
|
|
200
200
|
args.push(branch);
|
|
201
201
|
const result = await spawn('git', args, options);
|
|
202
202
|
if (!result.ok) {
|
|
203
|
-
throw Error(`git_pull failed for branch '${branch}' with
|
|
203
|
+
throw Error(`git_pull failed for branch '${branch}' with ${spawn_result_to_message(result)}`);
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
/**
|
|
@@ -213,7 +213,7 @@ export const git_push = async (origin, branch, options, set_upstream = false) =>
|
|
|
213
213
|
args.push('-u');
|
|
214
214
|
const result = await spawn('git', args, options);
|
|
215
215
|
if (!result.ok) {
|
|
216
|
-
throw Error(`git_push failed for branch '${final_branch}' with
|
|
216
|
+
throw Error(`git_push failed for branch '${final_branch}' with ${spawn_result_to_message(result)}`);
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
219
|
/**
|
|
@@ -231,7 +231,7 @@ export const git_push_to_create = async (origin = 'origin', branch, options) =>
|
|
|
231
231
|
push_args.push(final_branch);
|
|
232
232
|
const result = await spawn('git', push_args, options);
|
|
233
233
|
if (!result.ok) {
|
|
234
|
-
throw Error(`git_push failed for branch '${final_branch}' with
|
|
234
|
+
throw Error(`git_push failed for branch '${final_branch}' with ${spawn_result_to_message(result)}`);
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
237
|
/**
|
|
@@ -240,7 +240,7 @@ export const git_push_to_create = async (origin = 'origin', branch, options) =>
|
|
|
240
240
|
export const git_delete_local_branch = async (branch, options) => {
|
|
241
241
|
const result = await spawn('git', ['branch', '-D', branch], options);
|
|
242
242
|
if (!result.ok) {
|
|
243
|
-
throw Error(`git_delete_local_branch failed for branch '${branch}' with
|
|
243
|
+
throw Error(`git_delete_local_branch failed for branch '${branch}' with ${spawn_result_to_message(result)}`);
|
|
244
244
|
}
|
|
245
245
|
};
|
|
246
246
|
/**
|
|
@@ -249,7 +249,7 @@ export const git_delete_local_branch = async (branch, options) => {
|
|
|
249
249
|
export const git_delete_remote_branch = async (origin, branch, options) => {
|
|
250
250
|
const result = await spawn('git', ['push', origin, ':' + branch], options);
|
|
251
251
|
if (!result.ok) {
|
|
252
|
-
throw Error(`git_delete_remote_branch failed for branch '${branch}' with
|
|
252
|
+
throw Error(`git_delete_remote_branch failed for branch '${branch}' with ${spawn_result_to_message(result)}`);
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
255
|
/**
|
package/dist/path.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export declare const parse_path_pieces: (raw_path: string) => Array<PathPiece>;
|
|
|
57
57
|
* Converts a string into a URL-compatible slug.
|
|
58
58
|
* @param str the string to convert
|
|
59
59
|
* @param map_special_characters if `true`, characters like `ñ` are converted to their ASCII equivalents, runs around 5x faster when disabled
|
|
60
|
-
* @mutates special_char_mappers calls `get_special_char_mappers()` which lazily initializes the module-level array if `map_special_characters` is true
|
|
60
|
+
* @mutates special_char_mappers - calls `get_special_char_mappers()` which lazily initializes the module-level array if `map_special_characters` is true
|
|
61
61
|
*/
|
|
62
62
|
export declare const slugify: (str: string, map_special_characters?: boolean) => string;
|
|
63
63
|
//# sourceMappingURL=path.d.ts.map
|
package/dist/path.js
CHANGED
|
@@ -46,7 +46,7 @@ export const parse_path_pieces = (raw_path) => {
|
|
|
46
46
|
* Converts a string into a URL-compatible slug.
|
|
47
47
|
* @param str the string to convert
|
|
48
48
|
* @param map_special_characters if `true`, characters like `ñ` are converted to their ASCII equivalents, runs around 5x faster when disabled
|
|
49
|
-
* @mutates special_char_mappers calls `get_special_char_mappers()` which lazily initializes the module-level array if `map_special_characters` is true
|
|
49
|
+
* @mutates special_char_mappers - calls `get_special_char_mappers()` which lazily initializes the module-level array if `map_special_characters` is true
|
|
50
50
|
*/
|
|
51
51
|
export const slugify = (str, map_special_characters = true) => {
|
|
52
52
|
let s = str.toLowerCase();
|
|
@@ -70,7 +70,7 @@ let special_char_mappers;
|
|
|
70
70
|
/**
|
|
71
71
|
* Lazily constructs `special_char_mappers` which
|
|
72
72
|
* converts special characters to their ASCII equivalents.
|
|
73
|
-
* @mutates special_char_mappers pushes mapper functions into module-level array on first call
|
|
73
|
+
* @mutates special_char_mappers - pushes mapper functions into module-level array on first call
|
|
74
74
|
*/
|
|
75
75
|
const get_special_char_mappers = () => {
|
|
76
76
|
if (special_char_mappers)
|
package/dist/print.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Logger } from './log.js';
|
|
|
4
4
|
export declare let st: typeof styleText;
|
|
5
5
|
/**
|
|
6
6
|
* Configures the module-level styling function for colored output.
|
|
7
|
-
* @mutates st assigns the module-level `st` variable
|
|
7
|
+
* @mutates st - assigns the module-level `st` variable
|
|
8
8
|
*/
|
|
9
9
|
export declare const configure_print_colors: (s: typeof styleText | null | undefined) => typeof styleText;
|
|
10
10
|
/**
|
package/dist/print.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export let st = (_, v) => v;
|
|
2
2
|
/**
|
|
3
3
|
* Configures the module-level styling function for colored output.
|
|
4
|
-
* @mutates st assigns the module-level `st` variable
|
|
4
|
+
* @mutates st - assigns the module-level `st` variable
|
|
5
5
|
*/
|
|
6
6
|
export const configure_print_colors = (s) => {
|
|
7
7
|
st = s ?? ((_, v) => v);
|
package/dist/process.d.ts
CHANGED
|
@@ -1,81 +1,345 @@
|
|
|
1
1
|
import { type SpawnOptions, type ChildProcess } from 'node:child_process';
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
10
|
+
error: Error;
|
|
11
|
+
code: null;
|
|
12
|
+
signal: null;
|
|
6
13
|
}
|
|
7
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Process ran and exited with a code.
|
|
16
|
+
* `ok` is true when `code` is 0.
|
|
17
|
+
*/
|
|
18
|
+
export interface SpawnResultExited {
|
|
19
|
+
ok: boolean;
|
|
8
20
|
child: ChildProcess;
|
|
9
|
-
|
|
10
|
-
code: number
|
|
21
|
+
error: null;
|
|
22
|
+
code: number;
|
|
23
|
+
signal: null;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Process was terminated by a signal (e.g., SIGTERM, SIGKILL).
|
|
27
|
+
*/
|
|
28
|
+
export interface SpawnResultSignaled {
|
|
29
|
+
ok: false;
|
|
30
|
+
child: ChildProcess;
|
|
31
|
+
error: null;
|
|
32
|
+
code: null;
|
|
33
|
+
signal: NodeJS.Signals;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Discriminated union representing all possible spawn outcomes.
|
|
37
|
+
* Use type guards `spawn_result_is_error`, `spawn_result_is_signaled`,
|
|
38
|
+
* and `spawn_result_is_exited` to narrow the type.
|
|
39
|
+
*/
|
|
40
|
+
export type SpawnResult = SpawnResultError | SpawnResultExited | SpawnResultSignaled;
|
|
41
|
+
/**
|
|
42
|
+
* Type guard for spawn errors (process failed to start).
|
|
43
|
+
*/
|
|
44
|
+
export declare const spawn_result_is_error: (result: SpawnResult) => result is SpawnResultError;
|
|
45
|
+
/**
|
|
46
|
+
* Type guard for signal termination.
|
|
47
|
+
*/
|
|
48
|
+
export declare const spawn_result_is_signaled: (result: SpawnResult) => result is SpawnResultSignaled;
|
|
49
|
+
/**
|
|
50
|
+
* Type guard for normal exit with code.
|
|
51
|
+
*/
|
|
52
|
+
export declare const spawn_result_is_exited: (result: SpawnResult) => result is SpawnResultExited;
|
|
53
|
+
/**
|
|
54
|
+
* Options for spawning processes, extending Node's `SpawnOptions`.
|
|
55
|
+
*/
|
|
56
|
+
export interface SpawnProcessOptions extends SpawnOptions {
|
|
57
|
+
/**
|
|
58
|
+
* AbortSignal to cancel the process.
|
|
59
|
+
* When aborted, sends SIGTERM to the child.
|
|
60
|
+
*/
|
|
61
|
+
signal?: AbortSignal;
|
|
62
|
+
/**
|
|
63
|
+
* Timeout in milliseconds. Must be non-negative.
|
|
64
|
+
* Sends SIGTERM when exceeded. A value of 0 triggers immediate SIGTERM.
|
|
65
|
+
*/
|
|
66
|
+
timeout_ms?: number;
|
|
11
67
|
}
|
|
12
|
-
export type SpawnResult = Result<Spawned, Spawned>;
|
|
13
68
|
/**
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
69
|
+
* Options for killing processes.
|
|
70
|
+
*/
|
|
71
|
+
export interface DespawnOptions {
|
|
72
|
+
/**
|
|
73
|
+
* Signal to send.
|
|
74
|
+
* @default 'SIGTERM'
|
|
75
|
+
*/
|
|
76
|
+
signal?: NodeJS.Signals;
|
|
77
|
+
/**
|
|
78
|
+
* Timeout in ms before escalating to SIGKILL. Must be non-negative.
|
|
79
|
+
* Useful for processes that may ignore SIGTERM. A value of 0 triggers immediate SIGKILL escalation.
|
|
80
|
+
*/
|
|
81
|
+
timeout_ms?: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Handle for a spawned process with access to the child and completion promise.
|
|
85
|
+
*/
|
|
86
|
+
export interface SpawnedProcess {
|
|
87
|
+
/** The underlying Node.js ChildProcess */
|
|
88
|
+
child: ChildProcess;
|
|
89
|
+
/** Resolves when the process exits */
|
|
90
|
+
closed: Promise<SpawnResult>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Result of `spawn_out` with captured output streams.
|
|
17
94
|
*/
|
|
18
|
-
export declare const spawn: (...args: Parameters<typeof spawn_process>) => Promise<SpawnResult>;
|
|
19
95
|
export interface SpawnedOut {
|
|
20
96
|
result: SpawnResult;
|
|
97
|
+
/** Captured stdout, or null if stream unavailable */
|
|
21
98
|
stdout: string | null;
|
|
99
|
+
/** Captured stderr, or null if stream unavailable */
|
|
22
100
|
stderr: string | null;
|
|
23
101
|
}
|
|
24
102
|
/**
|
|
25
|
-
*
|
|
103
|
+
* Manages a collection of spawned processes for lifecycle tracking and cleanup.
|
|
104
|
+
*
|
|
105
|
+
* The default instance `process_registry_default` is used by module-level functions.
|
|
106
|
+
* Create separate instances for isolated process groups or testing.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* // Use default registry via module functions
|
|
111
|
+
* const result = await spawn('echo', ['hello']);
|
|
112
|
+
*
|
|
113
|
+
* // Or create isolated registry for testing
|
|
114
|
+
* const registry = new ProcessRegistry();
|
|
115
|
+
* const {child, closed} = registry.spawn('node', ['server.js']);
|
|
116
|
+
* await registry.despawn_all();
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
export declare class ProcessRegistry {
|
|
120
|
+
#private;
|
|
121
|
+
/** All currently tracked child processes */
|
|
122
|
+
readonly processes: Set<ChildProcess>;
|
|
123
|
+
/**
|
|
124
|
+
* Spawns a process and tracks it in this registry.
|
|
125
|
+
* The process is automatically unregistered when it exits.
|
|
126
|
+
*
|
|
127
|
+
* @param command - The command to run
|
|
128
|
+
* @param args - Arguments to pass to the command
|
|
129
|
+
* @param options - Spawn options including `signal` and `timeout_ms`
|
|
130
|
+
* @returns Handle with `child` process and `closed` promise
|
|
131
|
+
*/
|
|
132
|
+
spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions): SpawnedProcess;
|
|
133
|
+
/**
|
|
134
|
+
* Spawns a process and captures stdout/stderr as strings.
|
|
135
|
+
* Sets `stdio: 'pipe'` automatically.
|
|
136
|
+
*
|
|
137
|
+
* @param command - The command to run
|
|
138
|
+
* @param args - Arguments to pass to the command
|
|
139
|
+
* @param options - Spawn options
|
|
140
|
+
* @returns Result with captured `stdout` and `stderr`.
|
|
141
|
+
* - `null` means spawn failed (ENOENT, etc.) or stream was unavailable
|
|
142
|
+
* - `''` (empty string) means process ran but produced no output
|
|
143
|
+
* - non-empty string contains the captured output
|
|
144
|
+
*/
|
|
145
|
+
spawn_out(command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions): Promise<SpawnedOut>;
|
|
146
|
+
/**
|
|
147
|
+
* Kills a child process and waits for it to exit.
|
|
148
|
+
*
|
|
149
|
+
* @param child - The child process to kill
|
|
150
|
+
* @param options - Kill options including signal and timeout
|
|
151
|
+
* @returns The spawn result after the process exits
|
|
152
|
+
*/
|
|
153
|
+
despawn(child: ChildProcess, options?: DespawnOptions): Promise<SpawnResult>;
|
|
154
|
+
/**
|
|
155
|
+
* Kills all processes in this registry.
|
|
156
|
+
*
|
|
157
|
+
* @param options - Kill options applied to all processes
|
|
158
|
+
* @returns Array of spawn results
|
|
159
|
+
*/
|
|
160
|
+
despawn_all(options?: DespawnOptions): Promise<Array<SpawnResult>>;
|
|
161
|
+
/**
|
|
162
|
+
* Attaches an `uncaughtException` handler that kills all processes before exiting.
|
|
163
|
+
* Prevents zombie processes when the parent crashes.
|
|
164
|
+
*
|
|
165
|
+
* By default uses SIGKILL for immediate termination. Set `graceful_timeout_ms`
|
|
166
|
+
* to attempt SIGTERM first (allowing processes to clean up) before escalating
|
|
167
|
+
* to SIGKILL after the timeout.
|
|
168
|
+
*
|
|
169
|
+
* Note: Node's uncaughtException handler cannot await async operations, so
|
|
170
|
+
* graceful shutdown uses a blocking busy-wait. This may not be sufficient
|
|
171
|
+
* for processes that need significant cleanup time.
|
|
172
|
+
*
|
|
173
|
+
* @param options - Configuration options
|
|
174
|
+
* @param options.to_error_label - Customize error label, return `null` for default
|
|
175
|
+
* @param options.map_error_text - Customize error text, return `''` to silence
|
|
176
|
+
* @param options.handle_error - Called after cleanup, defaults to `process.exit(1)`
|
|
177
|
+
* @param options.graceful_timeout_ms - If set, sends SIGTERM first and waits this
|
|
178
|
+
* many ms before SIGKILL. Recommended: 100-500ms. If null/undefined, uses
|
|
179
|
+
* immediate SIGKILL (default).
|
|
180
|
+
* @returns Cleanup function to remove the handler
|
|
181
|
+
*/
|
|
182
|
+
attach_error_handler(options?: {
|
|
183
|
+
to_error_label?: (err: Error, origin: NodeJS.UncaughtExceptionOrigin) => string | null;
|
|
184
|
+
map_error_text?: (err: Error, origin: NodeJS.UncaughtExceptionOrigin) => string | null;
|
|
185
|
+
handle_error?: (err: Error, origin: NodeJS.UncaughtExceptionOrigin) => void;
|
|
186
|
+
graceful_timeout_ms?: number | null;
|
|
187
|
+
}): () => void;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Default process registry used by module-level spawn functions.
|
|
191
|
+
* For testing or isolated process groups, create a new `ProcessRegistry` instance.
|
|
26
192
|
*/
|
|
27
|
-
export declare const
|
|
193
|
+
export declare const process_registry_default: ProcessRegistry;
|
|
28
194
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @
|
|
195
|
+
* Spawns a process with graceful shutdown behavior.
|
|
196
|
+
* Returns a handle with access to the `child` process and `closed` promise.
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```ts
|
|
200
|
+
* const {child, closed} = spawn_process('node', ['server.js']);
|
|
201
|
+
* // Later...
|
|
202
|
+
* child.kill();
|
|
203
|
+
* const result = await closed;
|
|
204
|
+
* ```
|
|
33
205
|
*/
|
|
34
|
-
export declare const spawn_process: (command: string, args?: ReadonlyArray<string>, options?:
|
|
35
|
-
|
|
206
|
+
export declare const spawn_process: (command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions) => SpawnedProcess;
|
|
207
|
+
/**
|
|
208
|
+
* Spawns a process and returns a promise that resolves when it exits.
|
|
209
|
+
* Use this for commands that complete (not long-running processes).
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```ts
|
|
213
|
+
* const result = await spawn('npm', ['install']);
|
|
214
|
+
* if (!result.ok) console.error('Install failed');
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
export declare const spawn: (command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions) => Promise<SpawnResult>;
|
|
36
218
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
219
|
+
* Spawns a process and captures stdout/stderr as strings.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* const {result, stdout} = await spawn_out('git', ['status', '--porcelain']);
|
|
224
|
+
* if (result.ok && stdout) console.log(stdout);
|
|
225
|
+
* ```
|
|
39
226
|
*/
|
|
40
|
-
export declare const
|
|
227
|
+
export declare const spawn_out: (command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions) => Promise<SpawnedOut>;
|
|
41
228
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* @
|
|
45
|
-
*
|
|
229
|
+
* Kills a child process and returns the result.
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```ts
|
|
233
|
+
* const result = await despawn(child, {timeout_ms: 5000});
|
|
234
|
+
* // If process ignores SIGTERM, SIGKILL sent after 5s
|
|
235
|
+
* ```
|
|
46
236
|
*/
|
|
47
|
-
export declare const
|
|
237
|
+
export declare const despawn: (child: ChildProcess, options?: DespawnOptions) => Promise<SpawnResult>;
|
|
48
238
|
/**
|
|
49
|
-
* Kills
|
|
239
|
+
* Kills all processes in the default registry.
|
|
50
240
|
*/
|
|
51
|
-
export declare const
|
|
241
|
+
export declare const despawn_all: (options?: DespawnOptions) => Promise<Array<SpawnResult>>;
|
|
52
242
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
243
|
+
* Attaches an `uncaughtException` handler to the default registry.
|
|
244
|
+
*
|
|
245
|
+
* @see ProcessRegistry.attach_error_handler
|
|
55
246
|
*/
|
|
56
|
-
export declare const
|
|
247
|
+
export declare const attach_process_error_handler: (options?: Parameters<ProcessRegistry["attach_error_handler"]>[0]) => (() => void);
|
|
57
248
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* @
|
|
61
|
-
* @param map_error_text - Customize the error text. Return `''` to silence, or `null` for the default `print_error(err)`.
|
|
249
|
+
* Formats a child process for display.
|
|
250
|
+
*
|
|
251
|
+
* @example `pid(1234) <- node server.js`
|
|
62
252
|
*/
|
|
63
|
-
export declare const
|
|
253
|
+
export declare const print_child_process: (child: ChildProcess) => string;
|
|
64
254
|
/**
|
|
65
|
-
* Formats a
|
|
255
|
+
* Formats a spawn result for display.
|
|
256
|
+
* Returns `'ok'` for success, or the error/signal/code for failures.
|
|
66
257
|
*/
|
|
67
258
|
export declare const print_spawn_result: (result: SpawnResult) => string;
|
|
259
|
+
/**
|
|
260
|
+
* Formats a spawn result for use in error messages.
|
|
261
|
+
*/
|
|
262
|
+
export declare const spawn_result_to_message: (result: SpawnResult) => string;
|
|
263
|
+
/**
|
|
264
|
+
* Handle for a process that can be restarted.
|
|
265
|
+
* Exposes `closed` promise for observing exits and implementing restart policies.
|
|
266
|
+
*/
|
|
68
267
|
export interface RestartableProcess {
|
|
69
|
-
|
|
268
|
+
/**
|
|
269
|
+
* Restart the process, killing the current one if active.
|
|
270
|
+
* Concurrent calls are coalesced - multiple calls before the first completes
|
|
271
|
+
* will share the same restart operation.
|
|
272
|
+
*/
|
|
273
|
+
restart: () => Promise<void>;
|
|
274
|
+
/** Kill the process and set `active` to false */
|
|
70
275
|
kill: () => Promise<void>;
|
|
276
|
+
/**
|
|
277
|
+
* Whether this handle is managing a process.
|
|
278
|
+
*
|
|
279
|
+
* Note: This reflects handle state, not whether the underlying OS process is executing.
|
|
280
|
+
* Remains `true` after a process exits naturally until `kill()` or `restart()` is called.
|
|
281
|
+
* To check if the process actually exited, await `closed`.
|
|
282
|
+
*/
|
|
283
|
+
readonly active: boolean;
|
|
284
|
+
/** The current child process, or null if not active */
|
|
285
|
+
readonly child: ChildProcess | null;
|
|
286
|
+
/** Promise that resolves when the current process exits */
|
|
287
|
+
readonly closed: Promise<SpawnResult>;
|
|
288
|
+
/**
|
|
289
|
+
* Promise that resolves when the initial `spawn_process()` call completes.
|
|
290
|
+
*
|
|
291
|
+
* Note: This resolves when the spawn syscall returns, NOT when the process
|
|
292
|
+
* is "ready" or has produced output. For commands that fail immediately
|
|
293
|
+
* (e.g., ENOENT), `spawned` still resolves - check `closed` for errors.
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* ```ts
|
|
297
|
+
* const rp = spawn_restartable_process('node', ['server.js']);
|
|
298
|
+
* await rp.spawned; // Safe to access rp.child now
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
readonly spawned: Promise<void>;
|
|
71
302
|
}
|
|
72
303
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
304
|
+
* Spawns a process that can be restarted.
|
|
305
|
+
* Handles concurrent restart calls gracefully.
|
|
306
|
+
*
|
|
307
|
+
* Note: The `signal` and `timeout_ms` options are reapplied on each restart.
|
|
308
|
+
* If the AbortSignal is already aborted when `restart()` is called, the new
|
|
309
|
+
* process will be killed immediately.
|
|
310
|
+
*
|
|
311
|
+
* @example Simple restart on crash
|
|
312
|
+
* ```ts
|
|
313
|
+
* const rp = spawn_restartable_process('node', ['server.js']);
|
|
314
|
+
*
|
|
315
|
+
* while (rp.active) {
|
|
316
|
+
* const result = await rp.closed;
|
|
317
|
+
* if (result.ok) break; // Clean exit
|
|
318
|
+
* await rp.restart();
|
|
319
|
+
* }
|
|
320
|
+
* ```
|
|
321
|
+
*
|
|
322
|
+
* @example Restart with backoff
|
|
323
|
+
* ```ts
|
|
324
|
+
* const rp = spawn_restartable_process('node', ['server.js']);
|
|
325
|
+
* let failures = 0;
|
|
326
|
+
*
|
|
327
|
+
* while (rp.active) {
|
|
328
|
+
* const result = await rp.closed;
|
|
329
|
+
* if (result.ok || ++failures > 5) break;
|
|
330
|
+
* await new Promise((r) => setTimeout(r, 1000 * failures));
|
|
331
|
+
* await rp.restart();
|
|
332
|
+
* }
|
|
333
|
+
* ```
|
|
75
334
|
*/
|
|
76
|
-
export declare const spawn_restartable_process: (command: string, args?: ReadonlyArray<string>, options?:
|
|
335
|
+
export declare const spawn_restartable_process: (command: string, args?: ReadonlyArray<string>, options?: SpawnProcessOptions) => RestartableProcess;
|
|
77
336
|
/**
|
|
78
|
-
*
|
|
337
|
+
* Checks if a process with the given PID is running.
|
|
338
|
+
* Uses signal 0 which checks existence without sending a signal.
|
|
339
|
+
*
|
|
340
|
+
* @param pid - The process ID to check (must be a positive integer)
|
|
341
|
+
* @returns `true` if the process exists (even without permission to signal it),
|
|
342
|
+
* `false` if the process doesn't exist or if pid is invalid (non-positive, non-integer, NaN, Infinity)
|
|
79
343
|
*/
|
|
80
344
|
export declare const process_is_pid_running: (pid: number) => boolean;
|
|
81
345
|
//# sourceMappingURL=process.d.ts.map
|
package/dist/process.d.ts.map
CHANGED
|
@@ -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;
|
|
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;AAa5B;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC,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