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.
@@ -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
- name: string;
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
- name: string;
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;
package/cli.backend.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dummy1745188457408 = dummy1745188457408;
4
- function dummy1745188457408() { }
3
+ exports.dummy1745331869884 = dummy1745331869884;
4
+ function dummy1745331869884() { }
5
5
  //# sourceMappingURL=cli.backend.js.map
@@ -2316,6 +2316,11 @@ var UtilsTerminal;
2316
2316
  /* */
2317
2317
  /* */
2318
2318
  /* */
2319
+ /* */
2320
+ /* */
2321
+ /* */
2322
+ /* */
2323
+ /* */
2319
2324
  return (void 0);
2320
2325
  };
2321
2326
  UtilsTerminal.multiselect = async (options) => {