@inquirer/i18n 1.3.4 → 1.4.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.
@@ -2,8 +2,8 @@ import type { Locale } from '../types.ts';
2
2
  export declare const locale: Locale;
3
3
  export declare const confirm: (this: void, config: {
4
4
  message: string;
5
- default?: boolean | undefined | undefined;
6
- transformer?: ((value: boolean) => string) | undefined;
5
+ default?: boolean | undefined;
6
+ transformer?: (value: boolean) => string;
7
7
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
8
8
  keywords: {
9
9
  yes: string;
@@ -16,7 +16,7 @@ export declare const confirm: (this: void, config: {
16
16
  style: {
17
17
  confirmDefault: (text: string) => string;
18
18
  };
19
- }>> | undefined;
19
+ }>>;
20
20
  } & {
21
21
  message: string;
22
22
  default?: boolean | undefined;
@@ -36,16 +36,16 @@ export declare const confirm: (this: void, config: {
36
36
  }>>;
37
37
  }, context?: import("@inquirer/type").Context | undefined) => Promise<boolean>, select: <Value>(this: void, config: {
38
38
  message: string;
39
- choices: readonly (import("@inquirer/prompts").Separator | Value | {
39
+ choices: readonly (Value | {
40
40
  value: Value;
41
41
  name?: string;
42
42
  description?: string;
43
43
  short?: string;
44
44
  disabled?: boolean | string;
45
45
  type?: never;
46
- })[];
47
- pageSize?: number | undefined;
48
- loop?: boolean | undefined;
46
+ } | import("@inquirer/prompts").Separator)[];
47
+ pageSize?: number;
48
+ loop?: boolean;
49
49
  default?: NoInfer<Value> | undefined;
50
50
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
51
51
  icon: {
@@ -59,18 +59,18 @@ export declare const confirm: (this: void, config: {
59
59
  i18n: {
60
60
  disabledError: string;
61
61
  };
62
- indexMode: "hidden" | "number";
63
- }>> | undefined;
62
+ indexMode: 'hidden' | 'number';
63
+ }>>;
64
64
  } & {
65
65
  message: string;
66
- choices: readonly (import("@inquirer/prompts").Separator | Value | {
66
+ choices: readonly (Value | {
67
67
  value: Value;
68
68
  name?: string;
69
69
  description?: string;
70
70
  short?: string;
71
71
  disabled?: boolean | string;
72
72
  type?: never;
73
- })[];
73
+ } | import("@inquirer/prompts").Separator)[];
74
74
  pageSize?: number;
75
75
  loop?: boolean;
76
76
  default?: NoInfer<Value> | undefined;
@@ -86,13 +86,13 @@ export declare const confirm: (this: void, config: {
86
86
  i18n: {
87
87
  disabledError: string;
88
88
  };
89
- indexMode: "hidden" | "number";
89
+ indexMode: 'hidden' | 'number';
90
90
  }>>;
91
91
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, checkbox: <Value>(this: void, config: {
92
92
  message: string;
93
- prefix?: string | undefined;
94
- pageSize?: number | undefined;
95
- choices: readonly (import("@inquirer/prompts").Separator | Value | {
93
+ prefix?: string;
94
+ pageSize?: number;
95
+ choices: readonly (Value | {
96
96
  value: Value;
97
97
  name?: string;
98
98
  checkedName?: string;
@@ -101,9 +101,9 @@ export declare const confirm: (this: void, config: {
101
101
  disabled?: boolean | string;
102
102
  checked?: boolean;
103
103
  type?: never;
104
- })[];
105
- loop?: boolean | undefined;
106
- required?: boolean | undefined;
104
+ } | import("@inquirer/prompts").Separator)[];
105
+ loop?: boolean;
106
+ required?: boolean;
107
107
  validate?: ((choices: readonly {
108
108
  value: Value;
109
109
  name: string;
@@ -146,16 +146,16 @@ export declare const confirm: (this: void, config: {
146
146
  i18n: {
147
147
  disabledError: string;
148
148
  };
149
- }>> | undefined;
149
+ }>>;
150
150
  shortcuts?: {
151
151
  all?: string | null;
152
152
  invert?: string | null;
153
- } | undefined;
153
+ };
154
154
  } & {
155
155
  message: string;
156
156
  prefix?: string;
157
157
  pageSize?: number;
158
- choices: readonly (import("@inquirer/prompts").Separator | Value | {
158
+ choices: readonly (Value | {
159
159
  value: Value;
160
160
  name?: string;
161
161
  checkedName?: string;
@@ -164,7 +164,7 @@ export declare const confirm: (this: void, config: {
164
164
  disabled?: boolean | string;
165
165
  checked?: boolean;
166
166
  type?: never;
167
- })[];
167
+ } | import("@inquirer/prompts").Separator)[];
168
168
  loop?: boolean;
169
169
  required?: boolean;
170
170
  validate?: ((choices: readonly {
@@ -218,25 +218,25 @@ export declare const confirm: (this: void, config: {
218
218
  message: string;
219
219
  source: (term: string | undefined, opt: {
220
220
  signal: AbortSignal;
221
- }) => readonly (import("@inquirer/prompts").Separator | Value | {
221
+ }) => Promise<readonly (Value | {
222
222
  value: Value;
223
223
  name?: string;
224
224
  description?: string;
225
225
  short?: string;
226
226
  disabled?: boolean | string;
227
227
  type?: never;
228
- })[] | Promise<readonly (import("@inquirer/prompts").Separator | Value | {
228
+ } | import("@inquirer/prompts").Separator)[]> | readonly (Value | {
229
229
  value: Value;
230
230
  name?: string;
231
231
  description?: string;
232
232
  short?: string;
233
233
  disabled?: boolean | string;
234
234
  type?: never;
235
- })[]>;
235
+ } | import("@inquirer/prompts").Separator)[];
236
236
  validate?: ((value: Value) => boolean | string | Promise<string | boolean>) | undefined;
237
- pageSize?: number | undefined;
237
+ pageSize?: number;
238
238
  default?: NoInfer<Value> | undefined;
239
- initialValue?: string | undefined;
239
+ initialValue?: string;
240
240
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
241
241
  icon: {
242
242
  cursor: string;
@@ -247,26 +247,26 @@ export declare const confirm: (this: void, config: {
247
247
  description: (text: string) => string;
248
248
  keysHelpTip: (keys: [key: string, action: string][]) => string | undefined;
249
249
  };
250
- }>> | undefined;
250
+ }>>;
251
251
  } & {
252
252
  message: string;
253
253
  source: (term: string | undefined, opt: {
254
254
  signal: AbortSignal;
255
- }) => readonly (import("@inquirer/prompts").Separator | Value | {
255
+ }) => Promise<readonly (Value | {
256
256
  value: Value;
257
257
  name?: string;
258
258
  description?: string;
259
259
  short?: string;
260
260
  disabled?: boolean | string;
261
261
  type?: never;
262
- })[] | Promise<readonly (import("@inquirer/prompts").Separator | Value | {
262
+ } | import("@inquirer/prompts").Separator)[]> | readonly (Value | {
263
263
  value: Value;
264
264
  name?: string;
265
265
  description?: string;
266
266
  short?: string;
267
267
  disabled?: boolean | string;
268
268
  type?: never;
269
- })[]>;
269
+ } | import("@inquirer/prompts").Separator)[];
270
270
  validate?: ((value: Value) => boolean | string | Promise<string | boolean>) | undefined;
271
271
  pageSize?: number;
272
272
  default?: NoInfer<Value> | undefined;
@@ -285,62 +285,62 @@ export declare const confirm: (this: void, config: {
285
285
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, expand: <Value>(this: void, config: {
286
286
  message: string;
287
287
  choices: readonly (import("@inquirer/prompts").Separator | {
288
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "f" | "s" | "a" | "b" | "c" | "d" | "e" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
288
+ key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
289
289
  name: Value & string;
290
290
  value?: never;
291
291
  } | ({
292
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "f" | "s" | "a" | "b" | "c" | "d" | "e" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
292
+ key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
293
293
  value: Value;
294
294
  } | {
295
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "f" | "s" | "a" | "b" | "c" | "d" | "e" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
295
+ key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
296
296
  name: string;
297
297
  value: Value;
298
298
  }))[];
299
- default?: (("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "f" | "s" | "a" | "b" | "c" | "d" | "e" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z") | "h") | undefined;
300
- expanded?: boolean | undefined;
301
- theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
299
+ default?: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z") | 'h';
300
+ expanded?: boolean;
301
+ theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme>;
302
302
  } & {
303
303
  message: string;
304
- choices: readonly (import("@inquirer/prompts").Separator | ({
305
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "f" | "s" | "a" | "b" | "c" | "d" | "e" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
304
+ choices: readonly (import("@inquirer/prompts").Separator | {
305
+ key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
306
+ name: Value & string;
307
+ value?: never;
308
+ } | ({
309
+ key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
306
310
  value: Value;
307
311
  } | {
308
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "f" | "s" | "a" | "b" | "c" | "d" | "e" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
312
+ key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
309
313
  name: string;
310
314
  value: Value;
311
- }) | {
312
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "f" | "s" | "a" | "b" | "c" | "d" | "e" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
313
- name: Value & string;
314
- value?: never;
315
- })[];
316
- default?: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "f" | "s" | "a" | "b" | "c" | "d" | "e" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z") | "h";
315
+ }))[];
316
+ default?: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z") | 'h';
317
317
  expanded?: boolean;
318
318
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme>;
319
319
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, rawlist: <Value>(this: void, config: {
320
320
  message: string;
321
- choices: readonly (import("@inquirer/prompts").Separator | Value | {
321
+ choices: readonly (Value | {
322
322
  value: Value;
323
323
  name?: string;
324
324
  short?: string;
325
325
  key?: string;
326
326
  description?: string;
327
- })[];
328
- loop?: boolean | undefined;
327
+ } | import("@inquirer/prompts").Separator)[];
328
+ loop?: boolean;
329
329
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
330
330
  style: {
331
331
  description: (text: string) => string;
332
332
  };
333
- }>> | undefined;
333
+ }>>;
334
334
  default?: NoInfer<Value> | undefined;
335
335
  } & {
336
336
  message: string;
337
- choices: readonly (import("@inquirer/prompts").Separator | Value | {
337
+ choices: readonly (Value | {
338
338
  value: Value;
339
339
  name?: string;
340
340
  short?: string;
341
341
  key?: string;
342
342
  description?: string;
343
- })[];
343
+ } | import("@inquirer/prompts").Separator)[];
344
344
  loop?: boolean;
345
345
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
346
346
  style: {
@@ -350,18 +350,18 @@ export declare const confirm: (this: void, config: {
350
350
  default?: NoInfer<Value> | undefined;
351
351
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, editor: (this: void, config: {
352
352
  message: string;
353
- default?: string | undefined | undefined;
354
- postfix?: string | undefined;
355
- waitForUserInput?: boolean | undefined;
356
- validate?: ((value: string) => boolean | string | Promise<string | boolean>) | undefined;
357
- file?: import("@inquirer/external-editor").FileOptions | undefined;
353
+ default?: string | undefined;
354
+ postfix?: string;
355
+ waitForUserInput?: boolean;
356
+ validate?: (value: string) => boolean | string | Promise<string | boolean>;
357
+ file?: import("@inquirer/external-editor").FileOptions;
358
358
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
359
- validationFailureMode: "keep" | "clear";
359
+ validationFailureMode: 'keep' | 'clear';
360
360
  style: {
361
361
  loadingMessage: () => string;
362
362
  waitingMessage: (enterKey: string) => string;
363
363
  };
364
- }>> | undefined;
364
+ }>>;
365
365
  } & {
366
366
  message: string;
367
367
  default?: string | undefined;
@@ -370,7 +370,7 @@ export declare const confirm: (this: void, config: {
370
370
  validate?: (value: string) => boolean | string | Promise<string | boolean>;
371
371
  file?: import("@inquirer/external-editor").FileOptions;
372
372
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
373
- validationFailureMode: "keep" | "clear";
373
+ validationFailureMode: 'keep' | 'clear';
374
374
  style: {
375
375
  loadingMessage: () => string;
376
376
  waitingMessage: (enterKey: string) => string;
@@ -378,61 +378,61 @@ export declare const confirm: (this: void, config: {
378
378
  }>>;
379
379
  }, context?: import("@inquirer/type").Context | undefined) => Promise<string>, input: (this: void, config: {
380
380
  message: string;
381
- default?: string | undefined | undefined;
382
- prefill?: "tab" | "editable" | undefined;
383
- required?: boolean | undefined;
384
- transformer?: ((value: string, { isFinal }: {
381
+ default?: string | undefined;
382
+ prefill?: 'tab' | 'editable';
383
+ required?: boolean;
384
+ transformer?: (value: string, { isFinal }: {
385
385
  isFinal: boolean;
386
- }) => string) | undefined;
387
- validate?: ((value: string) => boolean | string | Promise<string | boolean>) | undefined;
386
+ }) => string;
387
+ validate?: (value: string) => boolean | string | Promise<string | boolean>;
388
388
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
389
- validationFailureMode: "keep" | "clear";
390
- }>> | undefined;
391
- pattern?: RegExp | undefined;
392
- patternError?: string | undefined;
389
+ validationFailureMode: 'keep' | 'clear';
390
+ }>>;
391
+ pattern?: RegExp;
392
+ patternError?: string;
393
393
  } & {
394
394
  message: string;
395
395
  default?: string | undefined;
396
- prefill?: "tab" | "editable";
396
+ prefill?: 'tab' | 'editable';
397
397
  required?: boolean;
398
398
  transformer?: (value: string, { isFinal }: {
399
399
  isFinal: boolean;
400
400
  }) => string;
401
401
  validate?: (value: string) => boolean | string | Promise<string | boolean>;
402
402
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
403
- validationFailureMode: "keep" | "clear";
403
+ validationFailureMode: 'keep' | 'clear';
404
404
  }>>;
405
405
  pattern?: RegExp;
406
406
  patternError?: string;
407
407
  }, context?: import("@inquirer/type").Context | undefined) => Promise<string>, number: <Required extends boolean = boolean>(this: void, config: {
408
408
  message: string;
409
- default?: number | undefined | undefined;
410
- min?: number | undefined;
411
- max?: number | undefined;
412
- step?: number | "any" | undefined;
409
+ default?: number | undefined;
410
+ min?: number;
411
+ max?: number;
412
+ step?: number | 'any';
413
413
  required?: Required | undefined;
414
414
  validate?: ((value: Required extends true ? number : number | undefined) => boolean | string | Promise<string | boolean>) | undefined;
415
- theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
415
+ theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme>;
416
416
  } & {
417
417
  message: string;
418
418
  default?: number | undefined;
419
419
  min?: number;
420
420
  max?: number;
421
- step?: number | "any";
421
+ step?: number | 'any';
422
422
  required?: Required | undefined;
423
423
  validate?: ((value: Required extends true ? number : number | undefined) => boolean | string | Promise<string | boolean>) | undefined;
424
424
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme>;
425
425
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Required extends true ? number : number | undefined>, password: (this: void, config: {
426
426
  message: string;
427
- mask?: boolean | string | undefined;
428
- toggleMask?: boolean | undefined;
429
- validate?: ((value: string) => boolean | string | Promise<string | boolean>) | undefined;
427
+ mask?: boolean | string;
428
+ toggleMask?: boolean;
429
+ validate?: (value: string) => boolean | string | Promise<string | boolean>;
430
430
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme<{
431
431
  style: {
432
432
  maskedText: string;
433
433
  keysHelpTip: (keys: [key: string, action: string][]) => string | undefined;
434
434
  };
435
- }>> | undefined;
435
+ }>>;
436
436
  } & {
437
437
  message: string;
438
438
  mask?: boolean | string;
@@ -1,4 +1,4 @@
1
- import { createLocalizedPrompts } from "../create.js";
1
+ import { createLocalizedPrompts } from '../create.js';
2
2
  export const locale = {
3
3
  confirm: {
4
4
  yesLabel: 'Sí',