@decaf-ts/utils 0.12.2 → 1.0.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/README.md +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.js.map +1 -1
- package/lib/cjs/assets/slogans.js.map +1 -0
- package/lib/cjs/bin/build-scripts.js.map +1 -0
- package/lib/cjs/bin/release-chain-dispatch.js.map +1 -0
- package/lib/cjs/bin/release-chain.js.map +1 -0
- package/lib/cjs/bin/tag-release.js.map +1 -0
- package/lib/cjs/cli/command.js.map +1 -0
- package/lib/{cli → cjs/cli}/commands/build-scripts.cjs +118 -51
- package/lib/cjs/cli/commands/build-scripts.js.map +1 -0
- package/lib/cjs/cli/commands/index.js.map +1 -0
- package/lib/cjs/cli/commands/release-chain.js.map +1 -0
- package/lib/cjs/cli/commands/tag-release.js.map +1 -0
- package/lib/cjs/cli/constants.js.map +1 -0
- package/lib/cjs/cli/index.js.map +1 -0
- package/lib/{cli → cjs/cli}/types.js.map +1 -1
- package/lib/{index.cjs → cjs/index.cjs} +1 -1
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/input/index.js.map +1 -0
- package/lib/cjs/input/input.js.map +1 -0
- package/lib/{input → cjs/input}/types.js.map +1 -1
- package/lib/cjs/output/common.js.map +1 -0
- package/lib/cjs/output/index.js.map +1 -0
- package/lib/cjs/release-chain/index.js.map +1 -0
- package/lib/cjs/tests/Consumer.js.map +1 -0
- package/lib/cjs/tests/ProducerChildProcess.js.map +1 -0
- package/lib/cjs/tests/TestReporter.js.map +1 -0
- package/lib/cjs/tests/index.js.map +1 -0
- package/lib/cjs/tests/jestPerformanceRunner.js.map +1 -0
- package/lib/cjs/tests/utils.js.map +1 -0
- package/lib/cjs/utils/constants.js.map +1 -0
- package/lib/cjs/utils/fs.js.map +1 -0
- package/lib/cjs/utils/http.js.map +1 -0
- package/lib/cjs/utils/index.js.map +1 -0
- package/lib/cjs/utils/md.js.map +1 -0
- package/lib/cjs/utils/performanceRunner.js.map +1 -0
- package/lib/cjs/utils/timeout.js.map +1 -0
- package/lib/{utils → cjs/utils}/types.js.map +1 -1
- package/lib/cjs/utils/utils.js.map +1 -0
- package/lib/cjs/writers/OutputWriter.js.map +1 -0
- package/lib/cjs/writers/RegexpOutputWriter.js.map +1 -0
- package/lib/cjs/writers/StandardOutputWriter.js.map +1 -0
- package/lib/cjs/writers/index.js.map +1 -0
- package/lib/{writers → cjs/writers}/types.js.map +1 -1
- package/lib/esm/cli/commands/build-scripts.js +119 -52
- package/lib/esm/cli/commands/build-scripts.js.map +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/{esm → types}/cli/commands/build-scripts.d.ts +9 -2
- package/lib/{esm → types}/index.d.ts +1 -1
- package/package.json +17 -12
- package/lib/assets/slogans.js.map +0 -1
- package/lib/bin/build-scripts.js.map +0 -1
- package/lib/bin/release-chain-dispatch.js.map +0 -1
- package/lib/bin/release-chain.js.map +0 -1
- package/lib/bin/tag-release.js.map +0 -1
- package/lib/cli/command.js.map +0 -1
- package/lib/cli/commands/build-scripts.d.ts +0 -136
- package/lib/cli/commands/build-scripts.js.map +0 -1
- package/lib/cli/commands/index.js.map +0 -1
- package/lib/cli/commands/release-chain.js.map +0 -1
- package/lib/cli/commands/tag-release.js.map +0 -1
- package/lib/cli/constants.js.map +0 -1
- package/lib/cli/index.js.map +0 -1
- package/lib/esm/assets/slogans.d.ts +0 -19
- package/lib/esm/bin/build-scripts.d.ts +0 -1
- package/lib/esm/bin/release-chain-dispatch.d.ts +0 -1
- package/lib/esm/bin/release-chain.d.ts +0 -1
- package/lib/esm/bin/tag-release.d.ts +0 -1
- package/lib/esm/cli/command.d.ts +0 -104
- package/lib/esm/cli/commands/index.d.ts +0 -3
- package/lib/esm/cli/commands/release-chain.d.ts +0 -62
- package/lib/esm/cli/commands/tag-release.d.ts +0 -105
- package/lib/esm/cli/constants.d.ts +0 -75
- package/lib/esm/cli/index.d.ts +0 -4
- package/lib/esm/cli/types.d.ts +0 -30
- package/lib/index.d.ts +0 -38
- package/lib/index.js.map +0 -1
- package/lib/input/index.d.ts +0 -2
- package/lib/input/index.js.map +0 -1
- package/lib/input/input.d.ts +0 -517
- package/lib/input/input.js.map +0 -1
- package/lib/input/types.d.ts +0 -159
- package/lib/output/common.d.ts +0 -53
- package/lib/output/common.js.map +0 -1
- package/lib/output/index.d.ts +0 -1
- package/lib/output/index.js.map +0 -1
- package/lib/release-chain/index.d.ts +0 -43
- package/lib/release-chain/index.js.map +0 -1
- package/lib/tests/Consumer.d.ts +0 -151
- package/lib/tests/Consumer.js.map +0 -1
- package/lib/tests/ProducerChildProcess.d.ts +0 -18
- package/lib/tests/ProducerChildProcess.js.map +0 -1
- package/lib/tests/TestReporter.d.ts +0 -245
- package/lib/tests/TestReporter.js.map +0 -1
- package/lib/tests/index.d.ts +0 -4
- package/lib/tests/index.js.map +0 -1
- package/lib/tests/jestPerformanceRunner.d.ts +0 -37
- package/lib/tests/jestPerformanceRunner.js.map +0 -1
- package/lib/tests/utils.d.ts +0 -5
- package/lib/tests/utils.js.map +0 -1
- package/lib/utils/constants.d.ts +0 -65
- package/lib/utils/constants.js.map +0 -1
- package/lib/utils/fs.d.ts +0 -259
- package/lib/utils/fs.js.map +0 -1
- package/lib/utils/http.d.ts +0 -41
- package/lib/utils/http.js.map +0 -1
- package/lib/utils/index.d.ts +0 -6
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/md.d.ts +0 -156
- package/lib/utils/md.js.map +0 -1
- package/lib/utils/performanceRunner.d.ts +0 -129
- package/lib/utils/performanceRunner.js.map +0 -1
- package/lib/utils/timeout.d.ts +0 -12
- package/lib/utils/timeout.js.map +0 -1
- package/lib/utils/types.d.ts +0 -112
- package/lib/utils/utils.d.ts +0 -133
- package/lib/utils/utils.js.map +0 -1
- package/lib/writers/OutputWriter.d.ts +0 -49
- package/lib/writers/OutputWriter.js.map +0 -1
- package/lib/writers/RegexpOutputWriter.d.ts +0 -110
- package/lib/writers/RegexpOutputWriter.js.map +0 -1
- package/lib/writers/StandardOutputWriter.d.ts +0 -130
- package/lib/writers/StandardOutputWriter.js.map +0 -1
- package/lib/writers/index.d.ts +0 -4
- package/lib/writers/index.js.map +0 -1
- package/lib/writers/types.d.ts +0 -29
- /package/lib/{assets → cjs/assets}/slogans.cjs +0 -0
- /package/lib/{bin → cjs/bin}/build-scripts.cjs +0 -0
- /package/lib/{bin → cjs/bin}/release-chain-dispatch.cjs +0 -0
- /package/lib/{bin → cjs/bin}/release-chain.cjs +0 -0
- /package/lib/{bin → cjs/bin}/tag-release.cjs +0 -0
- /package/lib/{cli → cjs/cli}/command.cjs +0 -0
- /package/lib/{cli → cjs/cli}/commands/index.cjs +0 -0
- /package/lib/{cli → cjs/cli}/commands/release-chain.cjs +0 -0
- /package/lib/{cli → cjs/cli}/commands/tag-release.cjs +0 -0
- /package/lib/{cli → cjs/cli}/constants.cjs +0 -0
- /package/lib/{cli → cjs/cli}/index.cjs +0 -0
- /package/lib/{cli → cjs/cli}/types.cjs +0 -0
- /package/lib/{input → cjs/input}/index.cjs +0 -0
- /package/lib/{input → cjs/input}/input.cjs +0 -0
- /package/lib/{input → cjs/input}/types.cjs +0 -0
- /package/lib/{output → cjs/output}/common.cjs +0 -0
- /package/lib/{output → cjs/output}/index.cjs +0 -0
- /package/lib/{release-chain → cjs/release-chain}/index.cjs +0 -0
- /package/lib/{tests → cjs/tests}/Consumer.cjs +0 -0
- /package/lib/{tests → cjs/tests}/ProducerChildProcess.cjs +0 -0
- /package/lib/{tests → cjs/tests}/TestReporter.cjs +0 -0
- /package/lib/{tests → cjs/tests}/index.cjs +0 -0
- /package/lib/{tests → cjs/tests}/jestPerformanceRunner.cjs +0 -0
- /package/lib/{tests → cjs/tests}/utils.cjs +0 -0
- /package/lib/{utils → cjs/utils}/constants.cjs +0 -0
- /package/lib/{utils → cjs/utils}/fs.cjs +0 -0
- /package/lib/{utils → cjs/utils}/http.cjs +0 -0
- /package/lib/{utils → cjs/utils}/index.cjs +0 -0
- /package/lib/{utils → cjs/utils}/md.cjs +0 -0
- /package/lib/{utils → cjs/utils}/performanceRunner.cjs +0 -0
- /package/lib/{utils → cjs/utils}/timeout.cjs +0 -0
- /package/lib/{utils → cjs/utils}/types.cjs +0 -0
- /package/lib/{utils → cjs/utils}/utils.cjs +0 -0
- /package/lib/{writers → cjs/writers}/OutputWriter.cjs +0 -0
- /package/lib/{writers → cjs/writers}/RegexpOutputWriter.cjs +0 -0
- /package/lib/{writers → cjs/writers}/StandardOutputWriter.cjs +0 -0
- /package/lib/{writers → cjs/writers}/index.cjs +0 -0
- /package/lib/{writers → cjs/writers}/types.cjs +0 -0
- /package/lib/{assets → types/assets}/slogans.d.ts +0 -0
- /package/lib/{bin → types/bin}/build-scripts.d.ts +0 -0
- /package/lib/{bin → types/bin}/release-chain-dispatch.d.ts +0 -0
- /package/lib/{bin → types/bin}/release-chain.d.ts +0 -0
- /package/lib/{bin → types/bin}/tag-release.d.ts +0 -0
- /package/lib/{cli → types/cli}/command.d.ts +0 -0
- /package/lib/{cli → types/cli}/commands/index.d.ts +0 -0
- /package/lib/{cli → types/cli}/commands/release-chain.d.ts +0 -0
- /package/lib/{cli → types/cli}/commands/tag-release.d.ts +0 -0
- /package/lib/{cli → types/cli}/constants.d.ts +0 -0
- /package/lib/{cli → types/cli}/index.d.ts +0 -0
- /package/lib/{cli → types/cli}/types.d.ts +0 -0
- /package/lib/{esm → types}/input/index.d.ts +0 -0
- /package/lib/{esm → types}/input/input.d.ts +0 -0
- /package/lib/{esm → types}/input/types.d.ts +0 -0
- /package/lib/{esm → types}/output/common.d.ts +0 -0
- /package/lib/{esm → types}/output/index.d.ts +0 -0
- /package/lib/{esm → types}/release-chain/index.d.ts +0 -0
- /package/lib/{esm → types}/tests/Consumer.d.ts +0 -0
- /package/lib/{esm → types}/tests/ProducerChildProcess.d.ts +0 -0
- /package/lib/{esm → types}/tests/TestReporter.d.ts +0 -0
- /package/lib/{esm → types}/tests/index.d.ts +0 -0
- /package/lib/{esm → types}/tests/jestPerformanceRunner.d.ts +0 -0
- /package/lib/{esm → types}/tests/utils.d.ts +0 -0
- /package/lib/{esm → types}/utils/constants.d.ts +0 -0
- /package/lib/{esm → types}/utils/fs.d.ts +0 -0
- /package/lib/{esm → types}/utils/http.d.ts +0 -0
- /package/lib/{esm → types}/utils/index.d.ts +0 -0
- /package/lib/{esm → types}/utils/md.d.ts +0 -0
- /package/lib/{esm → types}/utils/performanceRunner.d.ts +0 -0
- /package/lib/{esm → types}/utils/timeout.d.ts +0 -0
- /package/lib/{esm → types}/utils/types.d.ts +0 -0
- /package/lib/{esm → types}/utils/utils.d.ts +0 -0
- /package/lib/{esm → types}/writers/OutputWriter.d.ts +0 -0
- /package/lib/{esm → types}/writers/RegexpOutputWriter.d.ts +0 -0
- /package/lib/{esm → types}/writers/StandardOutputWriter.d.ts +0 -0
- /package/lib/{esm → types}/writers/index.d.ts +0 -0
- /package/lib/{esm → types}/writers/types.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"performanceRunner.js","sourceRoot":"","sources":["../../src/utils/performanceRunner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,0CAA+C;AAC/C,+CAA8C;AA+IjC,QAAA,oBAAoB,GAAkC;IACjE,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,EAAE;IACX,eAAe,EAAE,SAAS;IAC1B,UAAU,EAAE,kCAAkC;IAC9C,OAAO,EAAE,6BAA6B;IACtC,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAA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AAC,CAAC,EAAE;aACtF,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CACT,WAAW,CACT,2BAA2B,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAC/C,OAAO,EACP,IAAI,CACL,CACF,CAAC;QAEF,IAAI,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;YAC9B,MAAM,SAAS,GACb,IAAI,CAAC,QAAQ,CAAC,gBAAgB;gBAC9B,cAAI,CAAC,IAAI,CACP,OAAO,CAAC,GAAG,EAAE,EACb,UAAU,EACV,SAAS,EACT,wBAAwB,CACzB,CAAC;YACJ,MAAM,0BAA0B,CAC9B,OAAO,EACP,IAAI,EACJ,IAAI,CAAC,QAAQ,CAAC,aAAa,IAAI,4BAAoB,EACnD,SAAS,CACV,CAAC;QACJ,CAAC;IACH,CAAC;IAES,kBAAkB;QAC1B,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC5E,CAAC;CACF;AAzcD,8CAycC"}
|
package/lib/utils/timeout.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Creates a promise that resolves after a specified time.
|
|
3
|
-
* @summary Utility function that pauses execution for a given number of milliseconds.
|
|
4
|
-
*
|
|
5
|
-
* @param {number} ms - The number of milliseconds to wait.
|
|
6
|
-
* @return {Promise<void>} A promise that resolves after the specified timeout.
|
|
7
|
-
*
|
|
8
|
-
* @function awaitTimeout
|
|
9
|
-
*
|
|
10
|
-
* @memberOf module:utils
|
|
11
|
-
*/
|
|
12
|
-
export declare function awaitTimeout(ms: number): Promise<void>;
|
package/lib/utils/timeout.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../src/utils/timeout.ts"],"names":[],"mappings":";;AAWA,oCAEC;AAbD;;;;;;;;;;GAUG;AACI,KAAK,UAAU,YAAY,CAAC,EAAU;IAC3C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
package/lib/utils/types.d.ts
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { ChildProcessWithoutNullStreams } from "child_process";
|
|
2
|
-
import { Environment } from "@decaf-ts/logging";
|
|
3
|
-
/**
|
|
4
|
-
* @description Defines the structure for promise resolution and rejection.
|
|
5
|
-
* @summary Provides methods to resolve or reject a promise.
|
|
6
|
-
* @template R - The type of the resolved value.
|
|
7
|
-
* @template E - The type of the error value, defaulting to Error.
|
|
8
|
-
* @typedef {Object} PromiseExecutor
|
|
9
|
-
* @property {function(R): void} resolve - Function to resolve the promise.
|
|
10
|
-
* @property {function(E): void} reject - Function to reject the promise.
|
|
11
|
-
* @memberOf module:utils
|
|
12
|
-
*/
|
|
13
|
-
export interface PromiseExecutor<R, E = Error> {
|
|
14
|
-
resolve: (value: R | PromiseLike<R>) => void;
|
|
15
|
-
reject: (error: E) => void;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* @description Represents the result of a command execution.
|
|
19
|
-
* @summary Extends Promise with additional properties related to the command execution.
|
|
20
|
-
* This interface provides a comprehensive way to handle and interact with the results
|
|
21
|
-
* of an asynchronous command execution, including access to the command details,
|
|
22
|
-
* output logs, and the ability to abort the execution.
|
|
23
|
-
*
|
|
24
|
-
* @template R - The type of the resolved value, defaulting to void.
|
|
25
|
-
* @interface CommandResult
|
|
26
|
-
* @extends Promise<R>
|
|
27
|
-
* @memberOf module:utils
|
|
28
|
-
*/
|
|
29
|
-
export interface CommandResult<R = void> {
|
|
30
|
-
promise: Promise<R>;
|
|
31
|
-
/**
|
|
32
|
-
* @description Controller to abort the command execution.
|
|
33
|
-
* @summary Provides a mechanism to cancel the ongoing command execution.
|
|
34
|
-
*/
|
|
35
|
-
abort: AbortController;
|
|
36
|
-
/**
|
|
37
|
-
* @description The executed command string.
|
|
38
|
-
* @summary Contains the actual command that was executed.
|
|
39
|
-
*/
|
|
40
|
-
command: string;
|
|
41
|
-
/**
|
|
42
|
-
* @description The child process object.
|
|
43
|
-
* @summary Represents the Node.js child process that was spawned to execute the command.
|
|
44
|
-
*/
|
|
45
|
-
cmd?: ChildProcessWithoutNullStreams;
|
|
46
|
-
/**
|
|
47
|
-
* @description Array of stdout logs.
|
|
48
|
-
* @summary Contains all the standard output messages produced during the command execution.
|
|
49
|
-
*/
|
|
50
|
-
logs: string[];
|
|
51
|
-
/**
|
|
52
|
-
* @description Array of stderr logs.
|
|
53
|
-
* @summary Contains all the standard error messages produced during the command execution.
|
|
54
|
-
*/
|
|
55
|
-
errs: string[];
|
|
56
|
-
/**
|
|
57
|
-
* @description allows chaining commands.
|
|
58
|
-
* @summary allows chaining commands (or piping).
|
|
59
|
-
*/
|
|
60
|
-
pipe: <E>(cb: (r: R) => E) => Promise<E>;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* @description Factory type for creating Environment instances.
|
|
64
|
-
* @summary Defines a function type that creates and returns Environment instances.
|
|
65
|
-
*
|
|
66
|
-
* @template T - The type of object the Environment will accumulate.
|
|
67
|
-
* @template E - The specific Environment type to be created, extending Environment<T>.
|
|
68
|
-
* @typedef {function(...unknown[]): E} EnvironmentFactory
|
|
69
|
-
* @memberOf module:utils
|
|
70
|
-
*/
|
|
71
|
-
export type EnvironmentFactory<T extends object, E extends Environment<T>> = (...args: unknown[]) => E;
|
|
72
|
-
/**
|
|
73
|
-
* @description Map of project dependencies with detailed information.
|
|
74
|
-
* @summary Represents the structure of project dependencies categorized by type (production, development, peer).
|
|
75
|
-
* Each category contains an array of objects with name and version information.
|
|
76
|
-
*
|
|
77
|
-
* @typedef {Object} DependencyMap
|
|
78
|
-
* @property {Array<{name: string, version: string}>} prod - Production dependencies with name and version.
|
|
79
|
-
* @property {Array<{name: string, version: string}>} dev - Development dependencies with name and version.
|
|
80
|
-
* @property {Array<{name: string, version: string}>} peer - Peer dependencies with name and version.
|
|
81
|
-
* @memberOf module:utils
|
|
82
|
-
*/
|
|
83
|
-
export type DependencyMap = {
|
|
84
|
-
prod: {
|
|
85
|
-
name: string;
|
|
86
|
-
version: string;
|
|
87
|
-
}[];
|
|
88
|
-
dev: {
|
|
89
|
-
name: string;
|
|
90
|
-
version: string;
|
|
91
|
-
}[];
|
|
92
|
-
peer: {
|
|
93
|
-
name: string;
|
|
94
|
-
version: string;
|
|
95
|
-
}[];
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* @description Simplified map of project dependencies.
|
|
99
|
-
* @summary Represents a simplified structure of project dependencies categorized by type.
|
|
100
|
-
* Each category contains an optional array of dependency names without version information.
|
|
101
|
-
*
|
|
102
|
-
* @typedef {Object} SimpleDependencyMap
|
|
103
|
-
* @property {string[]} [prod] - Optional array of production dependency names.
|
|
104
|
-
* @property {string[]} [dev] - Optional array of development dependency names.
|
|
105
|
-
* @property {string[]} [peer] - Optional array of peer dependency names.
|
|
106
|
-
* @memberOf module:utils
|
|
107
|
-
*/
|
|
108
|
-
export type SimpleDependencyMap = {
|
|
109
|
-
prod?: string[];
|
|
110
|
-
dev?: string[];
|
|
111
|
-
peer?: string[];
|
|
112
|
-
};
|
package/lib/utils/utils.d.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { ChildProcessWithoutNullStreams, SpawnOptionsWithoutStdio } from "child_process";
|
|
2
|
-
import { StandardOutputWriter } from "../writers/StandardOutputWriter";
|
|
3
|
-
import { CommandResult } from "./types";
|
|
4
|
-
import { OutputWriterConstructor } from "../writers/types";
|
|
5
|
-
import { Logger } from "@decaf-ts/logging";
|
|
6
|
-
/**
|
|
7
|
-
* @description Creates a locked version of a function.
|
|
8
|
-
* @summary This higher-order function takes a function and returns a new function that ensures
|
|
9
|
-
* sequential execution of the original function, even when called multiple times concurrently.
|
|
10
|
-
* It uses a Promise-based locking mechanism to queue function calls.
|
|
11
|
-
*
|
|
12
|
-
* @template R - The return type of the input function.
|
|
13
|
-
*
|
|
14
|
-
* @param f - The function to be locked. It can take any number of parameters and return a value of type R.
|
|
15
|
-
* @return A new function with the same signature as the input function, but with sequential execution guaranteed.
|
|
16
|
-
*
|
|
17
|
-
* @function lockify
|
|
18
|
-
*
|
|
19
|
-
* @mermaid
|
|
20
|
-
* sequenceDiagram
|
|
21
|
-
* participant Caller
|
|
22
|
-
* participant LockedFunction
|
|
23
|
-
* participant OriginalFunction
|
|
24
|
-
* Caller->>LockedFunction: Call with params
|
|
25
|
-
* LockedFunction->>LockedFunction: Check current lock
|
|
26
|
-
* alt Lock is resolved
|
|
27
|
-
* LockedFunction->>OriginalFunction: Execute with params
|
|
28
|
-
* OriginalFunction-->>LockedFunction: Return result
|
|
29
|
-
* LockedFunction-->>Caller: Return result
|
|
30
|
-
* else Lock is pending
|
|
31
|
-
* LockedFunction->>LockedFunction: Queue execution
|
|
32
|
-
* LockedFunction-->>Caller: Return promise
|
|
33
|
-
* Note over LockedFunction: Wait for previous execution
|
|
34
|
-
* LockedFunction->>OriginalFunction: Execute with params
|
|
35
|
-
* OriginalFunction-->>LockedFunction: Return result
|
|
36
|
-
* LockedFunction-->>Caller: Resolve promise with result
|
|
37
|
-
* end
|
|
38
|
-
* LockedFunction->>LockedFunction: Update lock
|
|
39
|
-
*
|
|
40
|
-
* @memberOf module:utils
|
|
41
|
-
*/
|
|
42
|
-
export declare function lockify<R>(f: (...params: unknown[]) => R): (...params: unknown[]) => Promise<R>;
|
|
43
|
-
/**
|
|
44
|
-
* @description Chains multiple abort signals to a controller.
|
|
45
|
-
* @summary Creates a mechanism where multiple abort signals can trigger a single abort controller.
|
|
46
|
-
* This is useful for coordinating cancellation across multiple asynchronous operations.
|
|
47
|
-
*
|
|
48
|
-
* @param {AbortController} controller - The abort controller to be triggered by signals.
|
|
49
|
-
* @param {...AbortSignal} signals - One or more abort signals that can trigger the controller.
|
|
50
|
-
* @return {AbortController} The input controller, now connected to the signals.
|
|
51
|
-
*
|
|
52
|
-
* @function chainAbortController
|
|
53
|
-
*
|
|
54
|
-
* @memberOf module:utils
|
|
55
|
-
*/
|
|
56
|
-
export declare function chainAbortController(controller: AbortController, ...signals: AbortSignal[]): AbortController;
|
|
57
|
-
/**
|
|
58
|
-
* @description Creates a new controller chained to multiple abort signals.
|
|
59
|
-
* @summary Creates a new abort controller that will be triggered if any of the provided signals are aborted.
|
|
60
|
-
*
|
|
61
|
-
* @param {...AbortSignal} signals - One or more abort signals that can trigger the new controller.
|
|
62
|
-
* @return {AbortController} A new abort controller connected to the signals.
|
|
63
|
-
*
|
|
64
|
-
* @function chainAbortController
|
|
65
|
-
*
|
|
66
|
-
* @memberOf module:utils
|
|
67
|
-
*/
|
|
68
|
-
export declare function chainAbortController(...signals: AbortSignal[]): AbortController;
|
|
69
|
-
/**
|
|
70
|
-
* @description Spawns a command as a child process with output handling.
|
|
71
|
-
* @summary Creates a child process to execute a command with support for piping multiple commands,
|
|
72
|
-
* custom output handling, and abort control. This function handles the low-level details of
|
|
73
|
-
* spawning processes and connecting their inputs/outputs when piping is used.
|
|
74
|
-
*
|
|
75
|
-
* @template R - The type of the processed output, defaulting to string.
|
|
76
|
-
* @param {StandardOutputWriter<R>} output - The output writer to handle command output.
|
|
77
|
-
* @param {string} command - The command to execute, can include pipe operators.
|
|
78
|
-
* @param {SpawnOptionsWithoutStdio} opts - Options for the spawned process.
|
|
79
|
-
* @param {AbortController} abort - Controller to abort the command execution.
|
|
80
|
-
* @param {Logger} logger - Logger for recording command execution details.
|
|
81
|
-
* @return {ChildProcessWithoutNullStreams} The spawned child process.
|
|
82
|
-
*
|
|
83
|
-
* @function spawnCommand
|
|
84
|
-
*
|
|
85
|
-
* @memberOf module:utils
|
|
86
|
-
*/
|
|
87
|
-
export declare function spawnCommand<R = string>(output: StandardOutputWriter<R>, command: string, opts: SpawnOptionsWithoutStdio, abort: AbortController, logger: Logger): ChildProcessWithoutNullStreams;
|
|
88
|
-
/**
|
|
89
|
-
* @description Executes a command asynchronously with customizable output handling.
|
|
90
|
-
* @summary This function runs a shell command as a child process, providing fine-grained
|
|
91
|
-
* control over its execution and output handling. It supports custom output writers,
|
|
92
|
-
* allows for command abortion, and captures both stdout and stderr.
|
|
93
|
-
*
|
|
94
|
-
* @template R - The type of the resolved value from the command execution.
|
|
95
|
-
*
|
|
96
|
-
* @param command - The command to run, either as a string or an array of strings.
|
|
97
|
-
* @param opts - Spawn options for the child process. Defaults to an empty object.
|
|
98
|
-
* @param outputConstructor - Constructor for the output writer. Defaults to StandardOutputWriter.
|
|
99
|
-
* @param args - Additional arguments to pass to the output constructor.
|
|
100
|
-
* @return {CommandResult} A promise that resolves to the command result of type R.
|
|
101
|
-
*
|
|
102
|
-
* @function runCommand
|
|
103
|
-
*
|
|
104
|
-
* @mermaid
|
|
105
|
-
* sequenceDiagram
|
|
106
|
-
* participant Caller
|
|
107
|
-
* participant runCommand
|
|
108
|
-
* participant OutputWriter
|
|
109
|
-
* participant ChildProcess
|
|
110
|
-
* Caller->>runCommand: Call with command and options
|
|
111
|
-
* runCommand->>OutputWriter: Create new instance
|
|
112
|
-
* runCommand->>OutputWriter: Parse command
|
|
113
|
-
* runCommand->>ChildProcess: Spawn process
|
|
114
|
-
* ChildProcess-->>runCommand: Return process object
|
|
115
|
-
* runCommand->>ChildProcess: Set up event listeners
|
|
116
|
-
* loop For each stdout data
|
|
117
|
-
* ChildProcess->>runCommand: Emit stdout data
|
|
118
|
-
* runCommand->>OutputWriter: Handle stdout data
|
|
119
|
-
* end
|
|
120
|
-
* loop For each stderr data
|
|
121
|
-
* ChildProcess->>runCommand: Emit stderr data
|
|
122
|
-
* runCommand->>OutputWriter: Handle stderr data
|
|
123
|
-
* end
|
|
124
|
-
* ChildProcess->>runCommand: Emit error (if any)
|
|
125
|
-
* runCommand->>OutputWriter: Handle error
|
|
126
|
-
* ChildProcess->>runCommand: Emit exit
|
|
127
|
-
* runCommand->>OutputWriter: Handle exit
|
|
128
|
-
* OutputWriter-->>runCommand: Resolve or reject promise
|
|
129
|
-
* runCommand-->>Caller: Return CommandResult
|
|
130
|
-
*
|
|
131
|
-
* @memberOf module:utils
|
|
132
|
-
*/
|
|
133
|
-
export declare function runCommand<R = string>(command: string, opts?: SpawnOptionsWithoutStdio, outputConstructor?: OutputWriterConstructor<R, StandardOutputWriter<R>, Error>, ...args: unknown[]): CommandResult<R>;
|
package/lib/utils/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":";;AA+CA,0BAOC;AAmCD,oDAqCC;AAoBD,oCA2CC;AA+CD,gCA8EC;AA1TD,iDAIuB;AACvB,gFAAuE;AAGvE,+CAAwC;AACxC,+CAAoD;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,SAAgB,OAAO,CAAI,CAA8B;IACvD,IAAI,IAAI,GAAsB,OAAO,CAAC,OAAO,EAAE,CAAC;IAChD,OAAO,CAAC,GAAG,MAAiB,EAAE,EAAE;QAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;QAC7C,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC9B,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAmCD,SAAgB,oBAAoB,CAClC,SAAwC,EACxC,GAAG,SAAwB;IAE3B,IAAI,OAAsB,CAAC;IAC3B,IAAI,UAA2B,CAAC;IAEhC,iBAAiB;IACjB,IAAI,SAAS,YAAY,WAAW,EAAE,CAAC;QACrC,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACnC,OAAO,GAAG,CAAC,SAAS,EAAE,GAAG,SAAS,CAAC,CAAC;IACtC,CA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YAC7B,IAAI,CAAC;gBACH,CAAC,CAAC,OAAO,CAAC,2BAA2B,OAAO,KAAK,CAAC,CAAC;gBACnD,MAAM,MAAM,GAAM,MAAM,IAAI,CAAC;gBAC7B,CAAC,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC,CAAC;gBACpD,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC;YAAC,OAAO,CAAU,EAAE,CAAC;gBACpB,CAAC,CAAC,KAAK,CAAC,gCAAgC,CAAC,EAAE,CAAC,CAAC;gBAC7C,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAA0B,CAAC;AACpC,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Defines the structure for output writing operations.
|
|
3
|
-
* @summary The OutputWriter interface provides a standardized set of methods for handling
|
|
4
|
-
* various types of output in a command-line interface (CLI) application. It includes
|
|
5
|
-
* methods for writing data, handling errors, and managing the program's exit process.
|
|
6
|
-
* This interface allows for consistent output handling across different parts of the application.
|
|
7
|
-
*
|
|
8
|
-
* @interface OutputWriter
|
|
9
|
-
* @memberOf module:utils
|
|
10
|
-
*/
|
|
11
|
-
export interface OutputWriter {
|
|
12
|
-
/**
|
|
13
|
-
* @description Handles the output of data chunks.
|
|
14
|
-
* @summary Processes and writes a chunk of data to the output stream.
|
|
15
|
-
* This method is typically used for standard output operations.
|
|
16
|
-
*
|
|
17
|
-
* @param chunk - The data to be written. Can be of any type.
|
|
18
|
-
* @return void
|
|
19
|
-
*/
|
|
20
|
-
data(chunk: any): void;
|
|
21
|
-
/**
|
|
22
|
-
* @description Handles error output.
|
|
23
|
-
* @summary Processes and writes error information to the error output stream.
|
|
24
|
-
* This method is used for non-critical errors or warnings.
|
|
25
|
-
*
|
|
26
|
-
* @param chunk - The error data to be written. Can be of any type.
|
|
27
|
-
* @return void
|
|
28
|
-
*/
|
|
29
|
-
error(chunk: any): void;
|
|
30
|
-
/**
|
|
31
|
-
* @description Handles critical errors.
|
|
32
|
-
* @summary Processes and writes critical error information.
|
|
33
|
-
* This method is used for handling and reporting Error objects.
|
|
34
|
-
*
|
|
35
|
-
* @param err - The Error object to be processed and written.
|
|
36
|
-
* @return void
|
|
37
|
-
*/
|
|
38
|
-
errors(err: Error): void;
|
|
39
|
-
/**
|
|
40
|
-
* @description Manages the program exit process.
|
|
41
|
-
* @summary Handles the termination of the program with a specified exit code.
|
|
42
|
-
* This method is called when the program needs to exit, either successfully or due to an error.
|
|
43
|
-
*
|
|
44
|
-
* @param code - The exit code to be used when terminating the program.
|
|
45
|
-
* @param logs - Array of log messages to be processed before exiting.
|
|
46
|
-
* @return void
|
|
47
|
-
*/
|
|
48
|
-
exit(code: number, logs: string[]): void;
|
|
49
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OutputWriter.js","sourceRoot":"","sources":["../../src/writers/OutputWriter.ts"],"names":[],"mappings":""}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { StandardOutputWriter } from "./StandardOutputWriter";
|
|
2
|
-
import { PromiseExecutor } from "../utils/types";
|
|
3
|
-
/**
|
|
4
|
-
* @description A specialized output writer that uses regular expressions to process output.
|
|
5
|
-
* @summary This class extends StandardOutputWriter to provide regex-based output processing.
|
|
6
|
-
* It allows for pattern matching in the output stream and can trigger specific actions
|
|
7
|
-
* based on matched patterns.
|
|
8
|
-
*
|
|
9
|
-
* @template T - The type of the resolved value, defaulting to string.
|
|
10
|
-
*
|
|
11
|
-
* @param cmd - The command string to be executed.
|
|
12
|
-
* @param lock - A PromiseExecutor to control the asynchronous flow.
|
|
13
|
-
* @param regexp - A string or RegExp to match against the output.
|
|
14
|
-
* @param flags - Optional flags for the RegExp constructor, defaults to "g".
|
|
15
|
-
*
|
|
16
|
-
* @class
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* import { RegexpOutputWriter } from '@decaf-ts/utils';
|
|
20
|
-
* import { PromiseExecutor } from '@decaf-ts/utils';
|
|
21
|
-
*
|
|
22
|
-
* // Create a promise executor
|
|
23
|
-
* const executor: PromiseExecutor<string, Error> = {
|
|
24
|
-
* resolve: (value) => console.log(`Resolved: ${value}`),
|
|
25
|
-
* reject: (error) => console.error(`Rejected: ${error.message}`)
|
|
26
|
-
* };
|
|
27
|
-
*
|
|
28
|
-
* // Create a regexp output writer that matches version numbers
|
|
29
|
-
* const writer = new RegexpOutputWriter('node --version', executor, /v(\d+\.\d+\.\d+)/);
|
|
30
|
-
*
|
|
31
|
-
* // Use the writer to handle command output
|
|
32
|
-
* writer.data('v14.17.0'); // This will automatically resolve with "v14.17.0"
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @mermaid
|
|
36
|
-
* sequenceDiagram
|
|
37
|
-
* participant Client
|
|
38
|
-
* participant RegexpOutputWriter
|
|
39
|
-
* participant StandardOutputWriter
|
|
40
|
-
* participant Logger
|
|
41
|
-
*
|
|
42
|
-
* Client->>RegexpOutputWriter: new RegexpOutputWriter(cmd, lock, regexp, flags)
|
|
43
|
-
* RegexpOutputWriter->>StandardOutputWriter: super(cmd, lock)
|
|
44
|
-
* StandardOutputWriter->>Logger: Logging.for(cmd)
|
|
45
|
-
* RegexpOutputWriter->>RegexpOutputWriter: compile regexp
|
|
46
|
-
*
|
|
47
|
-
* Client->>RegexpOutputWriter: data(chunk)
|
|
48
|
-
* RegexpOutputWriter->>StandardOutputWriter: super.data(chunk)
|
|
49
|
-
* StandardOutputWriter->>Logger: logger.info(log)
|
|
50
|
-
* RegexpOutputWriter->>RegexpOutputWriter: testAndResolve(chunk)
|
|
51
|
-
* RegexpOutputWriter->>RegexpOutputWriter: test(chunk)
|
|
52
|
-
* alt match found
|
|
53
|
-
* RegexpOutputWriter->>RegexpOutputWriter: resolve(match[0])
|
|
54
|
-
* RegexpOutputWriter->>StandardOutputWriter: resolve(match[0])
|
|
55
|
-
* end
|
|
56
|
-
*
|
|
57
|
-
* Client->>RegexpOutputWriter: error(chunk)
|
|
58
|
-
* RegexpOutputWriter->>StandardOutputWriter: super.error(chunk)
|
|
59
|
-
* StandardOutputWriter->>Logger: logger.info(log)
|
|
60
|
-
* RegexpOutputWriter->>RegexpOutputWriter: testAndReject(chunk)
|
|
61
|
-
* RegexpOutputWriter->>RegexpOutputWriter: test(chunk)
|
|
62
|
-
* alt match found
|
|
63
|
-
* RegexpOutputWriter->>RegexpOutputWriter: reject(match[0])
|
|
64
|
-
* RegexpOutputWriter->>StandardOutputWriter: reject(match[0])
|
|
65
|
-
* end
|
|
66
|
-
*/
|
|
67
|
-
export declare class RegexpOutputWriter extends StandardOutputWriter<string> {
|
|
68
|
-
/**
|
|
69
|
-
* @description The regular expression used for matching output.
|
|
70
|
-
* @summary This readonly property stores the compiled RegExp used for pattern matching.
|
|
71
|
-
*/
|
|
72
|
-
protected readonly regexp: RegExp;
|
|
73
|
-
constructor(cmd: string, lock: PromiseExecutor<string, Error>, regexp: string | RegExp, flags?: string);
|
|
74
|
-
/**
|
|
75
|
-
* @description Tests the input data against the stored regular expression.
|
|
76
|
-
* @summary Executes the regular expression on the input data and returns the match result.
|
|
77
|
-
*
|
|
78
|
-
* @param data - The string to test against the regular expression.
|
|
79
|
-
* @return The result of the regular expression execution, or undefined if an error occurs.
|
|
80
|
-
*/
|
|
81
|
-
private test;
|
|
82
|
-
/**
|
|
83
|
-
* @description Tests the data and resolves the promise if a match is found.
|
|
84
|
-
* @summary Executes the test method and resolves the promise with the first match group if successful.
|
|
85
|
-
*
|
|
86
|
-
* @param data - The string to test against the regular expression.
|
|
87
|
-
*/
|
|
88
|
-
protected testAndResolve(data: string): void;
|
|
89
|
-
/**
|
|
90
|
-
* @description Tests the data and rejects the promise if a match is found.
|
|
91
|
-
* @summary Executes the test method and rejects the promise with the first match group if successful.
|
|
92
|
-
*
|
|
93
|
-
* @param data - The string to test against the regular expression.
|
|
94
|
-
*/
|
|
95
|
-
protected testAndReject(data: string): void;
|
|
96
|
-
/**
|
|
97
|
-
* @description Processes incoming data chunks.
|
|
98
|
-
* @summary Calls the parent class data method and then tests the data for a match to potentially resolve the promise.
|
|
99
|
-
*
|
|
100
|
-
* @param chunk - The data chunk to process.
|
|
101
|
-
*/
|
|
102
|
-
data(chunk: any): void;
|
|
103
|
-
/**
|
|
104
|
-
* @description Processes incoming error chunks.
|
|
105
|
-
* @summary Calls the parent class error method and then tests the data for a match to potentially reject the promise.
|
|
106
|
-
*
|
|
107
|
-
* @param chunk - The error chunk to process.
|
|
108
|
-
*/
|
|
109
|
-
error(chunk: any): void;
|
|
110
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RegexpOutputWriter.js","sourceRoot":"","sources":["../../src/writers/RegexpOutputWriter.ts"],"names":[],"mappings":";;;AAAA,qEAA8D;AAG9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,MAAa,kBAAmB,SAAQ,2CAA4B;IAOlE,YACE,GAAW,EACX,IAAoC,EACpC,MAAuB,EACvB,KAAK,GAAG,GAAG;QAEX,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACjB,IAAI,CAAC;YACH,IAAI,CAAC,MAAM;gBACT,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACpE,CAAC;QAAC,OAAO,CAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,EAAE,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACK,IAAI,CAAC,IAAY;QACvB,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,CAAC;QAC1B,IAAI,KAAK,CAAC;QACV,IAAI,CAAC;YACH,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,CAAU,EAAE,CAAC;YACpB,OAAO,OAAO,CAAC,KAAK,CAAC,0BAA0B,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACO,cAAc,CAAC,IAAY;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,KAAK;YAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACO,aAAa,CAAC,IAAY;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,KAAK;YAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACM,IAAI,CAAC,KAAU;QACtB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrC,CAAC;IAED;;;;;OAKG;IACM,KAAK,CAAC,KAAU;QACvB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACpC,CAAC;CACF;AAnFD,gDAmFC"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { OutputWriter } from "./OutputWriter";
|
|
2
|
-
import { PromiseExecutor } from "../utils/types";
|
|
3
|
-
import { OutputType } from "./types";
|
|
4
|
-
import { Logger } from "@decaf-ts/logging";
|
|
5
|
-
/**
|
|
6
|
-
* @description A standard output writer for handling command execution output.
|
|
7
|
-
* @summary This class implements the OutputWriter interface and provides methods for
|
|
8
|
-
* handling various types of output from command execution, including standard output,
|
|
9
|
-
* error output, and exit codes. It also includes utility methods for parsing commands
|
|
10
|
-
* and resolving or rejecting promises based on execution results.
|
|
11
|
-
*
|
|
12
|
-
* @template R - The type of the resolved value, defaulting to string.
|
|
13
|
-
*
|
|
14
|
-
* @param cmd - The command string to be executed.
|
|
15
|
-
* @param lock - A PromiseExecutor to control the asynchronous flow.
|
|
16
|
-
* @param args - Additional arguments (unused in the current implementation).
|
|
17
|
-
*
|
|
18
|
-
* @class
|
|
19
|
-
* @example
|
|
20
|
-
* ```typescript
|
|
21
|
-
* import { StandardOutputWriter } from '@decaf-ts/utils';
|
|
22
|
-
* import { PromiseExecutor } from '@decaf-ts/utils';
|
|
23
|
-
*
|
|
24
|
-
* // Create a promise executor
|
|
25
|
-
* const executor: PromiseExecutor<string> = {
|
|
26
|
-
* resolve: (value) => console.log(`Resolved: ${value}`),
|
|
27
|
-
* reject: (error) => console.error(`Rejected: ${error.message}`)
|
|
28
|
-
* };
|
|
29
|
-
*
|
|
30
|
-
* // Create a standard output writer
|
|
31
|
-
* const writer = new StandardOutputWriter('ls -la', executor);
|
|
32
|
-
*
|
|
33
|
-
* // Use the writer to handle command output
|
|
34
|
-
* writer.data('File list output...');
|
|
35
|
-
* writer.exit(0, ['Command executed successfully']);
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* @mermaid
|
|
39
|
-
* sequenceDiagram
|
|
40
|
-
* participant Client
|
|
41
|
-
* participant StandardOutputWriter
|
|
42
|
-
* participant Logger
|
|
43
|
-
* participant PromiseExecutor
|
|
44
|
-
*
|
|
45
|
-
* Client->>StandardOutputWriter: new StandardOutputWriter(cmd, lock)
|
|
46
|
-
* StandardOutputWriter->>Logger: Logging.for(cmd)
|
|
47
|
-
*
|
|
48
|
-
* Client->>StandardOutputWriter: data(chunk)
|
|
49
|
-
* StandardOutputWriter->>StandardOutputWriter: log("stdout", chunk)
|
|
50
|
-
* StandardOutputWriter->>Logger: logger.info(log)
|
|
51
|
-
*
|
|
52
|
-
* Client->>StandardOutputWriter: error(chunk)
|
|
53
|
-
* StandardOutputWriter->>StandardOutputWriter: log("stderr", chunk)
|
|
54
|
-
* StandardOutputWriter->>Logger: logger.info(log)
|
|
55
|
-
*
|
|
56
|
-
* Client->>StandardOutputWriter: exit(code, logs)
|
|
57
|
-
* StandardOutputWriter->>StandardOutputWriter: log("stdout", exitMessage)
|
|
58
|
-
* alt code === 0
|
|
59
|
-
* StandardOutputWriter->>StandardOutputWriter: resolve(logs)
|
|
60
|
-
* StandardOutputWriter->>PromiseExecutor: lock.resolve(reason)
|
|
61
|
-
* else code !== 0
|
|
62
|
-
* StandardOutputWriter->>StandardOutputWriter: reject(error)
|
|
63
|
-
* StandardOutputWriter->>PromiseExecutor: lock.reject(reason)
|
|
64
|
-
* end
|
|
65
|
-
*/
|
|
66
|
-
export declare class StandardOutputWriter<R = string> implements OutputWriter {
|
|
67
|
-
protected cmd: string;
|
|
68
|
-
protected lock: PromiseExecutor<R>;
|
|
69
|
-
protected logger: Logger;
|
|
70
|
-
constructor(cmd: string, lock: PromiseExecutor<R>, ...args: unknown[]);
|
|
71
|
-
/**
|
|
72
|
-
* @description Logs output to the console.
|
|
73
|
-
* @summary Formats and logs the given data with a timestamp and type indicator.
|
|
74
|
-
*
|
|
75
|
-
* @param type - The type of output (stdout or stderr).
|
|
76
|
-
* @param data - The data to be logged.
|
|
77
|
-
*/
|
|
78
|
-
protected log(type: OutputType, data: string | Buffer): void;
|
|
79
|
-
/**
|
|
80
|
-
* @description Handles standard output data.
|
|
81
|
-
* @summary Logs the given chunk as standard output.
|
|
82
|
-
*
|
|
83
|
-
* @param chunk - The data chunk to be logged.
|
|
84
|
-
*/
|
|
85
|
-
data(chunk: any): void;
|
|
86
|
-
/**
|
|
87
|
-
* @description Handles error output data.
|
|
88
|
-
* @summary Logs the given chunk as error output.
|
|
89
|
-
*
|
|
90
|
-
* @param chunk - The error data chunk to be logged.
|
|
91
|
-
*/
|
|
92
|
-
error(chunk: any): void;
|
|
93
|
-
/**
|
|
94
|
-
* @description Handles error objects.
|
|
95
|
-
* @summary Logs the error message from the given Error object.
|
|
96
|
-
*
|
|
97
|
-
* @param err - The Error object to be logged.
|
|
98
|
-
*/
|
|
99
|
-
errors(err: Error): void;
|
|
100
|
-
/**
|
|
101
|
-
* @description Handles the exit of a command.
|
|
102
|
-
* @summary Logs the exit code and resolves or rejects the promise based on the code.
|
|
103
|
-
*
|
|
104
|
-
* @param code - The exit code of the command.
|
|
105
|
-
* @param logs - Array of log messages to be processed before exiting.
|
|
106
|
-
*/
|
|
107
|
-
exit(code: number | string, logs: string[]): void;
|
|
108
|
-
/**
|
|
109
|
-
* @description Parses a command string or array into components.
|
|
110
|
-
* @summary Converts the command into a consistent format and stores it, then returns it split into command and arguments.
|
|
111
|
-
*
|
|
112
|
-
* @param command - The command as a string or array of strings.
|
|
113
|
-
* @return A tuple containing the command and its arguments as separate elements.
|
|
114
|
-
*/
|
|
115
|
-
parseCommand(command: string | string[]): [string, string[]];
|
|
116
|
-
/**
|
|
117
|
-
* @description Resolves the promise with a success message.
|
|
118
|
-
* @summary Logs a success message and resolves the promise with the given reason.
|
|
119
|
-
*
|
|
120
|
-
* @param reason - The reason for resolving the promise.
|
|
121
|
-
*/
|
|
122
|
-
protected resolve(reason: R): void;
|
|
123
|
-
/**
|
|
124
|
-
* @description Rejects the promise with an error message.
|
|
125
|
-
* @summary Logs an error message and rejects the promise with the given reason.
|
|
126
|
-
*
|
|
127
|
-
* @param reason - The reason for rejecting the promise, either a number (exit code) or a string.
|
|
128
|
-
*/
|
|
129
|
-
protected reject(reason: number | string | Error): void;
|
|
130
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StandardOutputWriter.js","sourceRoot":"","sources":["../../src/writers/StandardOutputWriter.ts"],"names":[],"mappings":";;;AAAA,wDAA8C;AAI9C,iEAA8C;AAC9C,+CAAoD;AACpD,6CAAoC;AAEpC;;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,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACO,OAAO,CAAC,MAAS;QACzB,IAAI,CAAC,GAAG,CACN,QAAQ,EACR,GAAG,IAAI,CAAC,GAAG,2BAA2B,IAAA,6BAAK,EAAC,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAE,MAAiB,CAAC,CAAC,KAAK,EAAE,CACvG,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACO,MAAM,CAAC,MAA+B;QAC9C,IAAI,CAAC,CAAC,MAAM,YAAY,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,GAAG,IAAI,KAAK,CAChB,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAC5D,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,GAAG,CACN,QAAQ,EACR,GAAG,IAAI,CAAC,GAAG,uBAAuB,IAAA,6BAAK,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAC9D,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;CACF;AA/HD,oDA+HC"}
|
package/lib/writers/index.d.ts
DELETED
package/lib/writers/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/writers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAA+B;AAC/B,2DAAqC;AACrC,6DAAuC;AACvC,8CAAwB"}
|
package/lib/writers/types.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { StandardOutputWriter } from "./StandardOutputWriter";
|
|
2
|
-
import { PromiseExecutor } from "../utils/types";
|
|
3
|
-
/**
|
|
4
|
-
* @description Represents the type of output stream.
|
|
5
|
-
* @summary A union type for standard output and standard error streams.
|
|
6
|
-
* @typedef {("stdout" | "stderr")} OutputType
|
|
7
|
-
* @memberOf module:utils
|
|
8
|
-
*/
|
|
9
|
-
export type OutputType = "stdout" | "stderr";
|
|
10
|
-
/**
|
|
11
|
-
* @description Constructor type for output writers.
|
|
12
|
-
* @summary Defines the structure for creating new output writer instances. This type represents
|
|
13
|
-
* a constructor function that takes a PromiseExecutor and additional arguments to create
|
|
14
|
-
* a new instance of an output writer. It allows for flexible creation of different types
|
|
15
|
-
* of output writers while maintaining a consistent interface.
|
|
16
|
-
*
|
|
17
|
-
* @template R - The type of the resolved value, defaulting to string.
|
|
18
|
-
* @template C - The type of the output writer, extending StandardOutputWriter<R>.
|
|
19
|
-
* @template E - The type of the error value, defaulting to number.
|
|
20
|
-
*
|
|
21
|
-
* @param {PromiseExecutor<R, E>} lock - The promise executor for managing asynchronous operations.
|
|
22
|
-
* @param {...unknown[]} args - Additional arguments passed to the constructor.
|
|
23
|
-
* @return {C} An instance of the output writer.
|
|
24
|
-
*
|
|
25
|
-
* @memberOf module:utils
|
|
26
|
-
*/
|
|
27
|
-
export type OutputWriterConstructor<R = string, C extends StandardOutputWriter<R> = StandardOutputWriter<R>, E = number> = {
|
|
28
|
-
new (cmd: string, lock: PromiseExecutor<R, E>, ...args: unknown[]): C;
|
|
29
|
-
};
|