@inquirer/i18n 1.0.4 → 1.0.6

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/dist/create.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { checkbox as checkboxPrompt, confirm as confirmPrompt, editor as editorPrompt, expand as expandPrompt, input as inputPrompt, number as numberPrompt, password as passwordPrompt, rawlist as rawlistPrompt, search as searchPrompt, select as selectPrompt } from '@inquirer/prompts';
2
- import type { Locale } from './types.js';
3
- export type { Locale } from './types.js';
2
+ import type { Locale } from './types.ts';
3
+ export type { Locale } from './types.ts';
4
4
  type ConfirmConfig = Parameters<typeof confirmPrompt>[0];
5
5
  type SelectConfig<Value> = Parameters<typeof selectPrompt<Value>>[0];
6
6
  type CheckboxConfig<Value> = Parameters<typeof checkboxPrompt<Value>>[0];
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as en from './locales/en.js';
2
- import { createLocalizedPrompts } from './create.js';
3
- export * from './create.js';
1
+ import * as en from './locales/en.ts';
2
+ import { createLocalizedPrompts } from './create.ts';
3
+ export * from './create.ts';
4
4
  type LocaleModule = ReturnType<typeof createLocalizedPrompts>;
5
5
  /**
6
6
  * Register a custom locale so it is automatically picked up by the
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import * as en from './locales/en.js';
2
- import * as es from './locales/es.js';
3
- import * as fr from './locales/fr.js';
4
- import * as pt from './locales/pt.js';
5
- import * as zh from './locales/zh.js';
6
- export * from './create.js';
1
+ import * as en from "./locales/en.js";
2
+ import * as es from "./locales/es.js";
3
+ import * as fr from "./locales/fr.js";
4
+ import * as pt from "./locales/pt.js";
5
+ import * as zh from "./locales/zh.js";
6
+ export * from "./create.js";
7
7
  const localeMap = { en, es, fr, pt, zh };
8
8
  /**
9
9
  * Register a custom locale so it is automatically picked up by the
@@ -131,18 +131,18 @@ export declare const confirm: (this: void, config: {
131
131
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, expand: <Value>(this: void, config: {
132
132
  message: string;
133
133
  choices: readonly (import("@inquirer/prompts").Separator | {
134
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
134
+ 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";
135
135
  name: Value & string;
136
136
  value?: never;
137
137
  } | ({
138
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
138
+ 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";
139
139
  value: Value;
140
140
  } | {
141
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
141
+ 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";
142
142
  name: string;
143
143
  value: Value;
144
144
  }))[];
145
- default?: (("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z") | "h") | undefined;
145
+ 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;
146
146
  expanded?: boolean | undefined;
147
147
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
148
148
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, rawlist: <Value>(this: void, config: {
@@ -177,7 +177,7 @@ export declare const confirm: (this: void, config: {
177
177
  }>>;
178
178
  }, context?: import("@inquirer/type").Context | undefined) => Promise<string>, input: (this: void, config: {
179
179
  message: string;
180
- default?: string;
180
+ default?: string | undefined;
181
181
  prefill?: "tab" | "editable";
182
182
  required?: boolean;
183
183
  transformer?: (value: string, { isFinal }: {
@@ -131,18 +131,18 @@ export declare const confirm: (this: void, config: {
131
131
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, expand: <Value>(this: void, config: {
132
132
  message: string;
133
133
  choices: readonly (import("@inquirer/prompts").Separator | {
134
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
134
+ 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";
135
135
  name: Value & string;
136
136
  value?: never;
137
137
  } | ({
138
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
138
+ 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";
139
139
  value: Value;
140
140
  } | {
141
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
141
+ 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";
142
142
  name: string;
143
143
  value: Value;
144
144
  }))[];
145
- default?: (("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z") | "h") | undefined;
145
+ 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;
146
146
  expanded?: boolean | undefined;
147
147
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
148
148
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, rawlist: <Value>(this: void, config: {
@@ -177,7 +177,7 @@ export declare const confirm: (this: void, config: {
177
177
  }>>;
178
178
  }, context?: import("@inquirer/type").Context | undefined) => Promise<string>, input: (this: void, config: {
179
179
  message: string;
180
- default?: string;
180
+ default?: string | undefined;
181
181
  prefill?: "tab" | "editable";
182
182
  required?: boolean;
183
183
  transformer?: (value: string, { isFinal }: {
@@ -131,18 +131,18 @@ export declare const confirm: (this: void, config: {
131
131
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, expand: <Value>(this: void, config: {
132
132
  message: string;
133
133
  choices: readonly (import("@inquirer/prompts").Separator | {
134
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
134
+ 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";
135
135
  name: Value & string;
136
136
  value?: never;
137
137
  } | ({
138
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
138
+ 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";
139
139
  value: Value;
140
140
  } | {
141
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
141
+ 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";
142
142
  name: string;
143
143
  value: Value;
144
144
  }))[];
145
- default?: (("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z") | "h") | undefined;
145
+ 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;
146
146
  expanded?: boolean | undefined;
147
147
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
148
148
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, rawlist: <Value>(this: void, config: {
@@ -177,7 +177,7 @@ export declare const confirm: (this: void, config: {
177
177
  }>>;
178
178
  }, context?: import("@inquirer/type").Context | undefined) => Promise<string>, input: (this: void, config: {
179
179
  message: string;
180
- default?: string;
180
+ default?: string | undefined;
181
181
  prefill?: "tab" | "editable";
182
182
  required?: boolean;
183
183
  transformer?: (value: string, { isFinal }: {
@@ -131,18 +131,18 @@ export declare const confirm: (this: void, config: {
131
131
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, expand: <Value>(this: void, config: {
132
132
  message: string;
133
133
  choices: readonly (import("@inquirer/prompts").Separator | {
134
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
134
+ 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";
135
135
  name: Value & string;
136
136
  value?: never;
137
137
  } | ({
138
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
138
+ 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";
139
139
  value: Value;
140
140
  } | {
141
- key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
141
+ 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";
142
142
  name: string;
143
143
  value: Value;
144
144
  }))[];
145
- default?: (("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "k" | "p" | "j" | "n" | "f" | "s" | "i" | "a" | "b" | "c" | "d" | "e" | "g" | "l" | "m" | "o" | "q" | "r" | "t" | "u" | "v" | "w" | "x" | "y" | "z") | "h") | undefined;
145
+ 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;
146
146
  expanded?: boolean | undefined;
147
147
  theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
148
148
  }, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, rawlist: <Value>(this: void, config: {
@@ -177,7 +177,7 @@ export declare const confirm: (this: void, config: {
177
177
  }>>;
178
178
  }, context?: import("@inquirer/type").Context | undefined) => Promise<string>, input: (this: void, config: {
179
179
  message: string;
180
- default?: string;
180
+ default?: string | undefined;
181
181
  prefill?: "tab" | "editable";
182
182
  required?: boolean;
183
183
  transformer?: (value: string, { isFinal }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/i18n",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Internationalized Inquirer prompts - drop-in package with i18n support",
5
5
  "keywords": [
6
6
  "answer",
@@ -97,8 +97,8 @@
97
97
  "tsc": "tsc"
98
98
  },
99
99
  "dependencies": {
100
- "@inquirer/core": "^11.1.8",
101
- "@inquirer/prompts": "^8.4.1"
100
+ "@inquirer/core": "^11.1.10",
101
+ "@inquirer/prompts": "^8.4.3"
102
102
  },
103
103
  "devDependencies": {
104
104
  "typescript": "^6.0.2"
@@ -116,5 +116,5 @@
116
116
  },
117
117
  "main": "./dist/index.js",
118
118
  "types": "./dist/index.d.ts",
119
- "gitHead": "979b130330e8c6f4d51f5b9915c8beae26c7e2df"
119
+ "gitHead": "113558c67f0d781d774cf3cf4db48fbcd8738b13"
120
120
  }