tnp-core 19.0.1 → 19.0.3
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 +3 -3
- package/browser/fesm2022/tnp-core.mjs +5 -0
- package/browser/fesm2022/tnp-core.mjs.map +1 -1
- package/browser/lib/utils.d.ts +15 -24
- package/cli.backend.js +2 -2
- package/client/fesm2022/tnp-core.mjs +5 -0
- package/client/fesm2022/tnp-core.mjs.map +1 -1
- package/client/lib/utils.d.ts +15 -24
- package/lib/build-info._auto-generated_.d.ts +1 -0
- package/lib/build-info._auto-generated_.js +4 -1
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/index._auto-generated_.js +2 -2
- package/lib/index._auto-generated_.js.map +1 -1
- package/lib/node-chalk-mock.js +2 -2
- package/lib/node-path-mock.js +2 -2
- package/lib/utils.d.ts +15 -24
- package/lib/utils.js +6 -1
- package/lib/utils.js.map +1 -1
- package/package.json +1 -1
- package/src.d.ts +3 -3
- package/tmp-environment.json +4 -3
- package/websql/fesm2022/tnp-core.mjs +5 -0
- package/websql/fesm2022/tnp-core.mjs.map +1 -1
- package/websql/lib/utils.d.ts +15 -24
package/websql/lib/utils.d.ts
CHANGED
@@ -277,21 +277,22 @@ export declare namespace UtilsMigrations {
|
|
277
277
|
const isValidTimestamp: (value: any) => boolean;
|
278
278
|
}
|
279
279
|
export declare namespace UtilsTerminal {
|
280
|
+
export interface SelectChoice {
|
281
|
+
/**
|
282
|
+
* Title of the choice
|
283
|
+
*/
|
284
|
+
name?: string;
|
285
|
+
disabled?: boolean;
|
286
|
+
}
|
287
|
+
export interface SelectChoiceValue<T = string> extends SelectChoice {
|
288
|
+
value?: T;
|
289
|
+
}
|
280
290
|
type SelectActionChoice = {
|
281
|
-
[choice: string]: {
|
282
|
-
/**
|
283
|
-
* Title of the choice
|
284
|
-
*/
|
285
|
-
name: string;
|
291
|
+
[choice: string]: SelectChoice & {
|
286
292
|
/**
|
287
293
|
* Action to execute
|
288
294
|
*/
|
289
295
|
action?: () => any;
|
290
|
-
/**
|
291
|
-
* If choice is visible
|
292
|
-
* default: true
|
293
|
-
*/
|
294
|
-
visible?: boolean;
|
295
296
|
};
|
296
297
|
};
|
297
298
|
export const wait: (second: number) => Promise<void>;
|
@@ -303,13 +304,8 @@ export declare namespace UtilsTerminal {
|
|
303
304
|
* @deprecated use select instead
|
304
305
|
*/
|
305
306
|
onlyOneChoice?: boolean;
|
306
|
-
choices: {
|
307
|
-
|
308
|
-
value: T;
|
309
|
-
}[] | {
|
310
|
-
[choice: string]: {
|
311
|
-
name: string;
|
312
|
-
};
|
307
|
+
choices: SelectChoiceValue<T>[] | {
|
308
|
+
[choice: string]: SelectChoice;
|
313
309
|
};
|
314
310
|
autocomplete?: boolean;
|
315
311
|
defaultSelected?: string[];
|
@@ -338,13 +334,8 @@ export declare namespace UtilsTerminal {
|
|
338
334
|
}) => Promise<any>;
|
339
335
|
export const select: <T = string>(options: {
|
340
336
|
question: string;
|
341
|
-
choices: {
|
342
|
-
|
343
|
-
value: T;
|
344
|
-
}[] | {
|
345
|
-
[choice: string]: {
|
346
|
-
name: string;
|
347
|
-
};
|
337
|
+
choices: SelectChoiceValue<T>[] | {
|
338
|
+
[choice: string]: SelectChoice;
|
348
339
|
};
|
349
340
|
autocomplete?: boolean;
|
350
341
|
defaultSelected?: string;
|