@inquirer/i18n 1.0.5 → 1.1.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.
- package/dist/create.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -6
- package/dist/locales/es.d.ts +5 -7
- package/dist/locales/fr.d.ts +5 -7
- package/dist/locales/pt.d.ts +5 -7
- package/dist/locales/zh.d.ts +5 -7
- package/package.json +4 -4
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.
|
|
3
|
-
export type { Locale } from './types.
|
|
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.
|
|
2
|
-
import { createLocalizedPrompts } from './create.
|
|
3
|
-
export * from './create.
|
|
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
|
|
2
|
-
import * as es from
|
|
3
|
-
import * as fr from
|
|
4
|
-
import * as pt from
|
|
5
|
-
import * as zh from
|
|
6
|
-
export * from
|
|
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
|
package/dist/locales/es.d.ts
CHANGED
|
@@ -29,7 +29,6 @@ export declare const confirm: (this: void, config: {
|
|
|
29
29
|
disabledError: string;
|
|
30
30
|
};
|
|
31
31
|
indexMode: "hidden" | "number";
|
|
32
|
-
keybindings: ReadonlyArray<import("@inquirer/core").Keybinding>;
|
|
33
32
|
}>> | undefined;
|
|
34
33
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, checkbox: <Value>(this: void, config: {
|
|
35
34
|
message: string;
|
|
@@ -89,7 +88,6 @@ export declare const confirm: (this: void, config: {
|
|
|
89
88
|
i18n: {
|
|
90
89
|
disabledError: string;
|
|
91
90
|
};
|
|
92
|
-
keybindings: ReadonlyArray<import("@inquirer/core").Keybinding>;
|
|
93
91
|
}>> | undefined;
|
|
94
92
|
shortcuts?: {
|
|
95
93
|
all?: string | null;
|
|
@@ -131,18 +129,18 @@ export declare const confirm: (this: void, config: {
|
|
|
131
129
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, expand: <Value>(this: void, config: {
|
|
132
130
|
message: string;
|
|
133
131
|
choices: readonly (import("@inquirer/prompts").Separator | {
|
|
134
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
132
|
+
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";
|
|
135
133
|
name: Value & string;
|
|
136
134
|
value?: never;
|
|
137
135
|
} | ({
|
|
138
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
136
|
+
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";
|
|
139
137
|
value: Value;
|
|
140
138
|
} | {
|
|
141
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
139
|
+
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";
|
|
142
140
|
name: string;
|
|
143
141
|
value: Value;
|
|
144
142
|
}))[];
|
|
145
|
-
default?: (("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
143
|
+
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") | undefined;
|
|
146
144
|
expanded?: boolean | undefined;
|
|
147
145
|
theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
|
|
148
146
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, rawlist: <Value>(this: void, config: {
|
|
@@ -177,7 +175,7 @@ export declare const confirm: (this: void, config: {
|
|
|
177
175
|
}>>;
|
|
178
176
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<string>, input: (this: void, config: {
|
|
179
177
|
message: string;
|
|
180
|
-
default?: string;
|
|
178
|
+
default?: string | undefined;
|
|
181
179
|
prefill?: "tab" | "editable";
|
|
182
180
|
required?: boolean;
|
|
183
181
|
transformer?: (value: string, { isFinal }: {
|
package/dist/locales/fr.d.ts
CHANGED
|
@@ -29,7 +29,6 @@ export declare const confirm: (this: void, config: {
|
|
|
29
29
|
disabledError: string;
|
|
30
30
|
};
|
|
31
31
|
indexMode: "hidden" | "number";
|
|
32
|
-
keybindings: ReadonlyArray<import("@inquirer/core").Keybinding>;
|
|
33
32
|
}>> | undefined;
|
|
34
33
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, checkbox: <Value>(this: void, config: {
|
|
35
34
|
message: string;
|
|
@@ -89,7 +88,6 @@ export declare const confirm: (this: void, config: {
|
|
|
89
88
|
i18n: {
|
|
90
89
|
disabledError: string;
|
|
91
90
|
};
|
|
92
|
-
keybindings: ReadonlyArray<import("@inquirer/core").Keybinding>;
|
|
93
91
|
}>> | undefined;
|
|
94
92
|
shortcuts?: {
|
|
95
93
|
all?: string | null;
|
|
@@ -131,18 +129,18 @@ export declare const confirm: (this: void, config: {
|
|
|
131
129
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, expand: <Value>(this: void, config: {
|
|
132
130
|
message: string;
|
|
133
131
|
choices: readonly (import("@inquirer/prompts").Separator | {
|
|
134
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
132
|
+
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";
|
|
135
133
|
name: Value & string;
|
|
136
134
|
value?: never;
|
|
137
135
|
} | ({
|
|
138
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
136
|
+
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";
|
|
139
137
|
value: Value;
|
|
140
138
|
} | {
|
|
141
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
139
|
+
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";
|
|
142
140
|
name: string;
|
|
143
141
|
value: Value;
|
|
144
142
|
}))[];
|
|
145
|
-
default?: (("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
143
|
+
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") | undefined;
|
|
146
144
|
expanded?: boolean | undefined;
|
|
147
145
|
theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
|
|
148
146
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, rawlist: <Value>(this: void, config: {
|
|
@@ -177,7 +175,7 @@ export declare const confirm: (this: void, config: {
|
|
|
177
175
|
}>>;
|
|
178
176
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<string>, input: (this: void, config: {
|
|
179
177
|
message: string;
|
|
180
|
-
default?: string;
|
|
178
|
+
default?: string | undefined;
|
|
181
179
|
prefill?: "tab" | "editable";
|
|
182
180
|
required?: boolean;
|
|
183
181
|
transformer?: (value: string, { isFinal }: {
|
package/dist/locales/pt.d.ts
CHANGED
|
@@ -29,7 +29,6 @@ export declare const confirm: (this: void, config: {
|
|
|
29
29
|
disabledError: string;
|
|
30
30
|
};
|
|
31
31
|
indexMode: "hidden" | "number";
|
|
32
|
-
keybindings: ReadonlyArray<import("@inquirer/core").Keybinding>;
|
|
33
32
|
}>> | undefined;
|
|
34
33
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, checkbox: <Value>(this: void, config: {
|
|
35
34
|
message: string;
|
|
@@ -89,7 +88,6 @@ export declare const confirm: (this: void, config: {
|
|
|
89
88
|
i18n: {
|
|
90
89
|
disabledError: string;
|
|
91
90
|
};
|
|
92
|
-
keybindings: ReadonlyArray<import("@inquirer/core").Keybinding>;
|
|
93
91
|
}>> | undefined;
|
|
94
92
|
shortcuts?: {
|
|
95
93
|
all?: string | null;
|
|
@@ -131,18 +129,18 @@ export declare const confirm: (this: void, config: {
|
|
|
131
129
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, expand: <Value>(this: void, config: {
|
|
132
130
|
message: string;
|
|
133
131
|
choices: readonly (import("@inquirer/prompts").Separator | {
|
|
134
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
132
|
+
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";
|
|
135
133
|
name: Value & string;
|
|
136
134
|
value?: never;
|
|
137
135
|
} | ({
|
|
138
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
136
|
+
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";
|
|
139
137
|
value: Value;
|
|
140
138
|
} | {
|
|
141
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
139
|
+
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";
|
|
142
140
|
name: string;
|
|
143
141
|
value: Value;
|
|
144
142
|
}))[];
|
|
145
|
-
default?: (("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
143
|
+
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") | undefined;
|
|
146
144
|
expanded?: boolean | undefined;
|
|
147
145
|
theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
|
|
148
146
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, rawlist: <Value>(this: void, config: {
|
|
@@ -177,7 +175,7 @@ export declare const confirm: (this: void, config: {
|
|
|
177
175
|
}>>;
|
|
178
176
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<string>, input: (this: void, config: {
|
|
179
177
|
message: string;
|
|
180
|
-
default?: string;
|
|
178
|
+
default?: string | undefined;
|
|
181
179
|
prefill?: "tab" | "editable";
|
|
182
180
|
required?: boolean;
|
|
183
181
|
transformer?: (value: string, { isFinal }: {
|
package/dist/locales/zh.d.ts
CHANGED
|
@@ -29,7 +29,6 @@ export declare const confirm: (this: void, config: {
|
|
|
29
29
|
disabledError: string;
|
|
30
30
|
};
|
|
31
31
|
indexMode: "hidden" | "number";
|
|
32
|
-
keybindings: ReadonlyArray<import("@inquirer/core").Keybinding>;
|
|
33
32
|
}>> | undefined;
|
|
34
33
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, checkbox: <Value>(this: void, config: {
|
|
35
34
|
message: string;
|
|
@@ -89,7 +88,6 @@ export declare const confirm: (this: void, config: {
|
|
|
89
88
|
i18n: {
|
|
90
89
|
disabledError: string;
|
|
91
90
|
};
|
|
92
|
-
keybindings: ReadonlyArray<import("@inquirer/core").Keybinding>;
|
|
93
91
|
}>> | undefined;
|
|
94
92
|
shortcuts?: {
|
|
95
93
|
all?: string | null;
|
|
@@ -131,18 +129,18 @@ export declare const confirm: (this: void, config: {
|
|
|
131
129
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, expand: <Value>(this: void, config: {
|
|
132
130
|
message: string;
|
|
133
131
|
choices: readonly (import("@inquirer/prompts").Separator | {
|
|
134
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
132
|
+
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";
|
|
135
133
|
name: Value & string;
|
|
136
134
|
value?: never;
|
|
137
135
|
} | ({
|
|
138
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
136
|
+
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";
|
|
139
137
|
value: Value;
|
|
140
138
|
} | {
|
|
141
|
-
key: "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
139
|
+
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";
|
|
142
140
|
name: string;
|
|
143
141
|
value: Value;
|
|
144
142
|
}))[];
|
|
145
|
-
default?: (("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "
|
|
143
|
+
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") | undefined;
|
|
146
144
|
expanded?: boolean | undefined;
|
|
147
145
|
theme?: import("@inquirer/type").PartialDeep<import("@inquirer/core").Theme> | undefined;
|
|
148
146
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<Value>, rawlist: <Value>(this: void, config: {
|
|
@@ -177,7 +175,7 @@ export declare const confirm: (this: void, config: {
|
|
|
177
175
|
}>>;
|
|
178
176
|
}, context?: import("@inquirer/type").Context | undefined) => Promise<string>, input: (this: void, config: {
|
|
179
177
|
message: string;
|
|
180
|
-
default?: string;
|
|
178
|
+
default?: string | undefined;
|
|
181
179
|
prefill?: "tab" | "editable";
|
|
182
180
|
required?: boolean;
|
|
183
181
|
transformer?: (value: string, { isFinal }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/i18n",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
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.
|
|
101
|
-
"@inquirer/prompts": "^8.
|
|
100
|
+
"@inquirer/core": "^11.2.0",
|
|
101
|
+
"@inquirer/prompts": "^8.5.0"
|
|
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": "
|
|
119
|
+
"gitHead": "5ca6d1101d5d3f8fb066cd5b389bccfdafbbe0c0"
|
|
120
120
|
}
|