tnp-core 18.0.44 → 18.0.46
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/assets/shared/shared_folder_info.txt +1 -1
- package/browser/esm2022/lib/utils.mjs +72 -8
- package/browser/fesm2022/tnp-core.mjs +71 -7
- package/browser/fesm2022/tnp-core.mjs.map +1 -1
- package/browser/lib/utils.d.ts +32 -21
- package/cli.backend.d.ts +0 -1
- package/cli.backend.js +2 -2
- package/client/esm2022/lib/utils.mjs +72 -8
- package/client/fesm2022/tnp-core.mjs +71 -7
- package/client/fesm2022/tnp-core.mjs.map +1 -1
- package/client/lib/utils.d.ts +32 -21
- package/lib/helpers.d.ts +2 -2
- package/lib/node-chalk-mock.d.ts +2 -1
- package/lib/node-chalk-mock.js +2 -2
- package/lib/node-path-mock.d.ts +25 -1
- package/lib/node-path-mock.js +2 -2
- package/lib/utils.d.ts +41 -22
- package/lib/utils.js +83 -14
- package/lib/utils.js.map +1 -1
- package/package.json +2 -2
- package/tmp-environment.json +29 -29
- package/websql/esm2022/lib/utils.mjs +72 -8
- package/websql/fesm2022/tnp-core.mjs +71 -7
- package/websql/fesm2022/tnp-core.mjs.map +1 -1
- package/websql/lib/utils.d.ts +32 -21
package/websql/lib/utils.d.ts
CHANGED
@@ -90,7 +90,21 @@ export declare namespace Utils {
|
|
90
90
|
export {};
|
91
91
|
}
|
92
92
|
export declare namespace UtilsProcess {
|
93
|
-
interface
|
93
|
+
interface ResolvePromiseMsg {
|
94
|
+
/**
|
95
|
+
* until this string is in output of stdout
|
96
|
+
*/
|
97
|
+
stdout?: string | string[];
|
98
|
+
/**
|
99
|
+
* until this string is in output of stderr
|
100
|
+
*/
|
101
|
+
stderr?: string | string[];
|
102
|
+
/**
|
103
|
+
* by default only resolve when exit code is 0
|
104
|
+
*/
|
105
|
+
resolveAfterAnyExitCode?: boolean;
|
106
|
+
}
|
107
|
+
export interface ProcessStartOptions {
|
94
108
|
/**
|
95
109
|
* by default is process.cwd();
|
96
110
|
*/
|
@@ -103,20 +117,7 @@ export declare namespace UtilsProcess {
|
|
103
117
|
* Modify output line by line
|
104
118
|
*/
|
105
119
|
outputLineReplace?: (outputLineStderOrStdout: string) => string;
|
106
|
-
resolvePromiseMsg?:
|
107
|
-
/**
|
108
|
-
* until this string is in output of stdout
|
109
|
-
*/
|
110
|
-
stdout?: string | string[];
|
111
|
-
/**
|
112
|
-
* until this string is in output of stderr
|
113
|
-
*/
|
114
|
-
stderr?: string | string[];
|
115
|
-
/**
|
116
|
-
* by default only resolve when exit code is 0
|
117
|
-
*/
|
118
|
-
resolveAfterAnyExitCode?: boolean;
|
119
|
-
};
|
120
|
+
resolvePromiseMsg?: ResolvePromiseMsg;
|
120
121
|
/**
|
121
122
|
* Prefix messages output from child_process
|
122
123
|
*/
|
@@ -141,18 +142,28 @@ export declare namespace UtilsProcess {
|
|
141
142
|
* TODO IMPLEMENT
|
142
143
|
* start async node process
|
143
144
|
*/
|
144
|
-
function startAsync(command: string, options?: ProcessStartOptions): Promise<void>;
|
145
145
|
/**
|
146
|
-
*
|
146
|
+
* This let you start child process and resolve promise when some
|
147
|
+
* condition is met. It is useful for example when you want to start
|
148
|
+
* process and wait until some output is in stdout or stderr.
|
147
149
|
*/
|
148
|
-
|
149
|
-
|
150
|
+
export const startAsyncChildProcessCommandUntil: (command: string, options: {
|
151
|
+
/**
|
152
|
+
* tels when to resolve promise
|
153
|
+
*/
|
154
|
+
untilOptions: ResolvePromiseMsg;
|
155
|
+
displayOutputInParentProcess?: boolean;
|
156
|
+
resolveAfterAnyExitCode?: boolean;
|
157
|
+
cwd?: string;
|
158
|
+
}) => Promise<void>;
|
159
|
+
export const getGitBashPath: () => any;
|
150
160
|
/**
|
151
161
|
* TODO IMPLEMENT
|
152
162
|
* start async node process
|
153
163
|
*/
|
154
|
-
const startInNewTerminalWindow: (command: string, options?: Pick<ProcessStartOptions, "cwd" | "hideOutput">) => any;
|
155
|
-
const getBashOrShellName: () => "browser" | "cmd" | "powershell" | "gitbash" | "cygwin" | "unknown" | "bash" | "zsh" | "fish" | "sh";
|
164
|
+
export const startInNewTerminalWindow: (command: string, options?: Pick<ProcessStartOptions, "cwd" | "hideOutput">) => any;
|
165
|
+
export const getBashOrShellName: () => "browser" | "cmd" | "powershell" | "gitbash" | "cygwin" | "unknown" | "bash" | "zsh" | "fish" | "sh";
|
166
|
+
export {};
|
156
167
|
}
|
157
168
|
export declare namespace UtilsOs {
|
158
169
|
/**
|