i18next-cli 1.80.5 → 1.80.7
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/README.md +1 -0
- package/dist/cjs/cli.js +1 -1
- package/dist/cjs/config.js +2 -6
- package/dist/cjs/extractor/core/ast-visitors.js +13 -6
- package/dist/cjs/extractor/parsers/expression-resolver.js +93 -25
- package/dist/cjs/extractor/parsers/scope-manager.js +9 -5
- package/dist/cjs/init.js +2 -6
- package/dist/cjs/instrumenter/core/instrumenter.js +5 -9
- package/dist/cjs/localize/localize.js +6 -6
- package/dist/cjs/locize.js +21 -21
- package/dist/cjs/status.js +9 -9
- package/dist/cjs/utils/locize-onboarding.js +10 -10
- package/dist/cjs/utils/prompt.js +33 -0
- package/dist/cjs/utils/wrap-ora.js +12 -18
- package/dist/esm/cli.js +1 -1
- package/dist/esm/config.js +2 -2
- package/dist/esm/extractor/core/ast-visitors.js +13 -6
- package/dist/esm/extractor/parsers/expression-resolver.js +93 -26
- package/dist/esm/extractor/parsers/scope-manager.js +9 -5
- package/dist/esm/init.js +2 -2
- package/dist/esm/instrumenter/core/instrumenter.js +5 -5
- package/dist/esm/localize/localize.js +5 -5
- package/dist/esm/locize.js +19 -19
- package/dist/esm/status.js +8 -8
- package/dist/esm/utils/locize-onboarding.js +9 -9
- package/dist/esm/utils/prompt.js +24 -0
- package/dist/esm/utils/wrap-ora.js +11 -17
- package/package.json +8 -5
- package/types/extractor/core/ast-visitors.d.ts.map +1 -1
- package/types/extractor/parsers/expression-resolver.d.ts +17 -0
- package/types/extractor/parsers/expression-resolver.d.ts.map +1 -1
- package/types/extractor/parsers/scope-manager.d.ts +1 -0
- package/types/extractor/parsers/scope-manager.d.ts.map +1 -1
- package/types/utils/prompt.d.ts +8 -0
- package/types/utils/prompt.d.ts.map +1 -0
- package/types/utils/wrap-ora.d.ts +1 -1
|
@@ -2,7 +2,7 @@ import { readFile, mkdir, writeFile, access } from 'node:fs/promises';
|
|
|
2
2
|
import { glob } from 'glob';
|
|
3
3
|
import { dirname, extname, join, relative, isAbsolute, resolve } from 'node:path';
|
|
4
4
|
import { parse } from '@swc/core';
|
|
5
|
-
import
|
|
5
|
+
import { prompt } from '../../utils/prompt.js';
|
|
6
6
|
import { styleText } from 'node:util';
|
|
7
7
|
import { detectCandidate } from './string-detector.js';
|
|
8
8
|
import { transformFile } from './transformer.js';
|
|
@@ -49,7 +49,7 @@ async function runInstrumenter(config, options, logger = new ConsoleLogger()) {
|
|
|
49
49
|
let targetNamespace = options.namespace;
|
|
50
50
|
if (!targetNamespace && options.isInteractive) {
|
|
51
51
|
const defaultNS = config.extract.defaultNS ?? 'translation';
|
|
52
|
-
const { ns } = await
|
|
52
|
+
const { ns } = await prompt([
|
|
53
53
|
{
|
|
54
54
|
type: 'input',
|
|
55
55
|
name: 'ns',
|
|
@@ -90,7 +90,7 @@ async function runInstrumenter(config, options, logger = new ConsoleLogger()) {
|
|
|
90
90
|
if (options.isInteractive) {
|
|
91
91
|
// Ask user about each candidate
|
|
92
92
|
for (const candidate of candidates) {
|
|
93
|
-
const { action } = await
|
|
93
|
+
const { action } = await prompt([
|
|
94
94
|
{
|
|
95
95
|
type: 'select',
|
|
96
96
|
name: 'action',
|
|
@@ -111,7 +111,7 @@ async function runInstrumenter(config, options, logger = new ConsoleLogger()) {
|
|
|
111
111
|
candidate.skipReason = 'User skipped';
|
|
112
112
|
break;
|
|
113
113
|
case 'edit-key': {
|
|
114
|
-
const { key } = await
|
|
114
|
+
const { key } = await prompt([
|
|
115
115
|
{
|
|
116
116
|
type: 'input',
|
|
117
117
|
name: 'key',
|
|
@@ -123,7 +123,7 @@ async function runInstrumenter(config, options, logger = new ConsoleLogger()) {
|
|
|
123
123
|
break;
|
|
124
124
|
}
|
|
125
125
|
case 'edit-value': {
|
|
126
|
-
const { value } = await
|
|
126
|
+
const { value } = await prompt([
|
|
127
127
|
{
|
|
128
128
|
type: 'input',
|
|
129
129
|
name: 'value',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styleText } from 'node:util';
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import spawn from 'nano-spawn';
|
|
4
|
+
import { prompt } from '../utils/prompt.js';
|
|
5
5
|
import { glob } from 'glob';
|
|
6
6
|
import { loadConfig, ensureConfig } from '../config.js';
|
|
7
7
|
import { detectConfig } from '../heuristic-config.js';
|
|
@@ -53,7 +53,7 @@ const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
|
53
53
|
*/
|
|
54
54
|
async function isGitTreeDirty() {
|
|
55
55
|
try {
|
|
56
|
-
const { stdout } = await
|
|
56
|
+
const { stdout } = await spawn('git', ['status', '--porcelain']);
|
|
57
57
|
return stdout.trim().length > 0;
|
|
58
58
|
}
|
|
59
59
|
catch {
|
|
@@ -235,7 +235,7 @@ async function runLocalize(options = {}, configPath) {
|
|
|
235
235
|
}
|
|
236
236
|
else if (dirty) {
|
|
237
237
|
if (interactive) {
|
|
238
|
-
const { proceed } = await
|
|
238
|
+
const { proceed } = await prompt([{
|
|
239
239
|
type: 'confirm',
|
|
240
240
|
name: 'proceed',
|
|
241
241
|
message: 'Working tree has uncommitted changes. instrument rewrites source files — continue?',
|
|
@@ -254,7 +254,7 @@ async function runLocalize(options = {}, configPath) {
|
|
|
254
254
|
}
|
|
255
255
|
// Already-using-i18next heuristic (instrument is idempotent either way)
|
|
256
256
|
if (stack.hasI18next && stack.initFile && interactive) {
|
|
257
|
-
const { proceed } = await
|
|
257
|
+
const { proceed } = await prompt([{
|
|
258
258
|
type: 'confirm',
|
|
259
259
|
name: 'proceed',
|
|
260
260
|
message: `Your project already uses i18next (found ${stack.initFile}). Run instrumentation anyway to catch remaining hardcoded strings?`,
|
package/dist/esm/locize.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import spawn from 'nano-spawn';
|
|
2
2
|
import { styleText } from 'node:util';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import yoctoSpinner from 'yocto-spinner';
|
|
4
|
+
import { prompt } from './utils/prompt.js';
|
|
5
5
|
import { sep, resolve } from 'node:path';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -20,7 +20,7 @@ import { sep, resolve } from 'node:path';
|
|
|
20
20
|
async function resolveLocizeBin() {
|
|
21
21
|
// 1. Try a locally / globally installed binary
|
|
22
22
|
try {
|
|
23
|
-
await
|
|
23
|
+
await spawn('locize', ['--version']);
|
|
24
24
|
return { cmd: 'locize', prefixArgs: [] };
|
|
25
25
|
}
|
|
26
26
|
catch {
|
|
@@ -29,7 +29,7 @@ async function resolveLocizeBin() {
|
|
|
29
29
|
// 2. Fall back to npx
|
|
30
30
|
try {
|
|
31
31
|
console.log(styleText('yellow', '`locize` command not found – trying npx...'));
|
|
32
|
-
await
|
|
32
|
+
await spawn('npx', ['locize-cli', '--version']);
|
|
33
33
|
return { cmd: 'npx', prefixArgs: ['locize-cli'] };
|
|
34
34
|
}
|
|
35
35
|
catch {
|
|
@@ -61,18 +61,18 @@ async function resolveLocizeBin() {
|
|
|
61
61
|
*/
|
|
62
62
|
async function interactiveCredentialSetup(config) {
|
|
63
63
|
console.log(styleText('yellow', '\nLocize configuration is missing or invalid. Let\'s set it up!'));
|
|
64
|
-
const answers = await
|
|
64
|
+
const answers = await prompt([
|
|
65
65
|
{
|
|
66
66
|
type: 'input',
|
|
67
67
|
name: 'projectId',
|
|
68
68
|
message: 'What is your Locize Project ID? (Find this in your project settings on www.locize.app)',
|
|
69
|
-
validate: input => !!input || 'Project ID cannot be empty.',
|
|
69
|
+
validate: (input) => !!input || 'Project ID cannot be empty.',
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
type: 'password',
|
|
73
73
|
name: 'apiKey',
|
|
74
74
|
message: 'Enter your Locize API key (Project settings → API → API Keys). Any write-capable key works — missing languages are created automatically for new projects.',
|
|
75
|
-
validate: input => !!input || 'API Key cannot be empty.',
|
|
75
|
+
validate: (input) => !!input || 'API Key cannot be empty.',
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
type: 'input',
|
|
@@ -85,7 +85,7 @@ async function interactiveCredentialSetup(config) {
|
|
|
85
85
|
console.error(styleText('red', 'Project ID is required to continue.'));
|
|
86
86
|
return undefined;
|
|
87
87
|
}
|
|
88
|
-
const { save } = await
|
|
88
|
+
const { save } = await prompt([{
|
|
89
89
|
type: 'confirm',
|
|
90
90
|
name: 'save',
|
|
91
91
|
message: 'Would you like to see how to save these credentials for future use?',
|
|
@@ -170,7 +170,7 @@ function maskArgs(args) {
|
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
/**
|
|
173
|
-
* Helper function to build the array of arguments for the
|
|
173
|
+
* Helper function to build the array of arguments for the spawn call.
|
|
174
174
|
* This ensures the logic is consistent for both the initial run and the retry.
|
|
175
175
|
*/
|
|
176
176
|
function buildArgs(command, config, cliOptions) {
|
|
@@ -325,14 +325,14 @@ async function runLocizeCommand(command, config, cliOptions = {}) {
|
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
327
|
const { cmd, prefixArgs } = resolved;
|
|
328
|
-
const spinner =
|
|
328
|
+
const spinner = yoctoSpinner({ text: `Running 'locize ${command}'...\n` }).start();
|
|
329
329
|
let effectiveConfig = config;
|
|
330
330
|
try {
|
|
331
331
|
// 1. First attempt
|
|
332
332
|
const initialArgs = [...prefixArgs, ...buildArgs(command, effectiveConfig, cliOptions)];
|
|
333
333
|
console.log(styleText('cyan', `\nRunning 'locize ${maskArgs(initialArgs.slice(prefixArgs.length)).join(' ')}'...`));
|
|
334
|
-
const result = await
|
|
335
|
-
spinner.
|
|
334
|
+
const result = await spawn(cmd, initialArgs, { stdio: 'pipe' });
|
|
335
|
+
spinner.success(styleText('green', `'locize ${command}' completed successfully.`));
|
|
336
336
|
if (result?.stdout)
|
|
337
337
|
console.log(result.stdout); // Print captured output on success
|
|
338
338
|
}
|
|
@@ -341,7 +341,7 @@ async function runLocizeCommand(command, config, cliOptions = {}) {
|
|
|
341
341
|
if (throwOnError) {
|
|
342
342
|
// Orchestrating callers (e.g. `localize`) handle credentials and
|
|
343
343
|
// messaging themselves — no interactive retry, no process.exit.
|
|
344
|
-
spinner.
|
|
344
|
+
spinner.error(styleText('red', `Error executing 'locize ${command}'.`));
|
|
345
345
|
throw new LocizeCommandError(stderr || error.stdout || error.message, { stdout: error.stdout, stderr });
|
|
346
346
|
}
|
|
347
347
|
if (stderr.includes('missing required argument')) {
|
|
@@ -355,25 +355,25 @@ async function runLocizeCommand(command, config, cliOptions = {}) {
|
|
|
355
355
|
// 3. Retry attempt, rebuilding args with the NOW-UPDATED currentConfig object
|
|
356
356
|
const retryArgs = [...prefixArgs, ...buildArgs(command, effectiveConfig, cliOptions)];
|
|
357
357
|
console.log(styleText('cyan', `\nRunning 'locize ${maskArgs(retryArgs.slice(prefixArgs.length)).join(' ')}'...`));
|
|
358
|
-
const result = await
|
|
359
|
-
spinner.
|
|
358
|
+
const result = await spawn(cmd, retryArgs, { stdio: 'pipe' });
|
|
359
|
+
spinner.success(styleText('green', 'Retry successful!'));
|
|
360
360
|
if (result?.stdout)
|
|
361
361
|
console.log(result.stdout);
|
|
362
362
|
}
|
|
363
363
|
catch (retryError) {
|
|
364
|
-
spinner.
|
|
364
|
+
spinner.error(styleText('red', 'Error during retry.'));
|
|
365
365
|
console.error(retryError.stderr || retryError.message);
|
|
366
366
|
process.exit(1);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
else {
|
|
370
|
-
spinner.
|
|
370
|
+
spinner.error('Operation cancelled.');
|
|
371
371
|
process.exit(1); // User aborted the prompt
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
else {
|
|
375
375
|
// Handle other errors
|
|
376
|
-
spinner.
|
|
376
|
+
spinner.error(styleText('red', `Error executing 'locize ${command}'.`));
|
|
377
377
|
console.error(stderr || error.message);
|
|
378
378
|
process.exit(1);
|
|
379
379
|
}
|
package/dist/esm/status.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styleText } from 'node:util';
|
|
2
|
-
import
|
|
2
|
+
import yoctoSpinner from 'yocto-spinner';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
4
|
import { runExtractor } from './extractor/core/extractor.js';
|
|
5
5
|
import { findKeys } from './extractor/core/key-finder.js';
|
|
@@ -115,10 +115,10 @@ function getOptionalPluralCategories(locale, isOrdinal) {
|
|
|
115
115
|
async function runStatus(config, options = {}) {
|
|
116
116
|
config.extract.primaryLanguage ||= config.locales[0] || 'en';
|
|
117
117
|
config.extract.secondaryLanguages ||= config.locales.filter((l) => l !== config?.extract?.primaryLanguage);
|
|
118
|
-
const spinner =
|
|
118
|
+
const spinner = yoctoSpinner({ text: 'Analyzing project localization status...\n' }).start();
|
|
119
119
|
try {
|
|
120
120
|
const report = await generateStatusReport(config);
|
|
121
|
-
spinner.
|
|
121
|
+
spinner.success('Analysis complete.');
|
|
122
122
|
await displayStatusReport(report, config, options);
|
|
123
123
|
// When a specific locale is requested (`status <locale>`), the pass/fail
|
|
124
124
|
// result must reflect THAT locale only — otherwise the displayed summary
|
|
@@ -155,14 +155,14 @@ async function runStatus(config, options = {}) {
|
|
|
155
155
|
if (hasMissing) {
|
|
156
156
|
// Name the locale when the check is scoped so the failure reason is clear
|
|
157
157
|
// (the displayed summary already explains what is missing for it).
|
|
158
|
-
spinner.
|
|
158
|
+
spinner.error(scopedLocale
|
|
159
159
|
? `Error: Incomplete translations detected for "${scopedLocale}".`
|
|
160
160
|
: 'Error: Incomplete translations detected.');
|
|
161
161
|
process.exit(1);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
catch (error) {
|
|
165
|
-
spinner.
|
|
165
|
+
spinner.error('Failed to generate status report.');
|
|
166
166
|
console.error(error);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
@@ -865,14 +865,14 @@ async function runUnusedReport(config, options = {}) {
|
|
|
865
865
|
// be active regardless of the user's config. The caller's config object
|
|
866
866
|
// stays untouched.
|
|
867
867
|
const cfg = { ...config, extract: { ...config.extract, removeUnusedKeys: true } };
|
|
868
|
-
const spinner =
|
|
868
|
+
const spinner = yoctoSpinner({ text: 'Analyzing project for unused translation keys...\n' }).start();
|
|
869
869
|
let extraction;
|
|
870
870
|
try {
|
|
871
871
|
extraction = await runExtractor(cfg, { isDryRun: true, quiet: true });
|
|
872
|
-
spinner.
|
|
872
|
+
spinner.success('Analysis complete.');
|
|
873
873
|
}
|
|
874
874
|
catch (error) {
|
|
875
|
-
spinner.
|
|
875
|
+
spinner.error('Failed to analyze unused translation keys.');
|
|
876
876
|
console.error(error);
|
|
877
877
|
process.exit(1);
|
|
878
878
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { prompt } from './prompt.js';
|
|
2
|
+
import spawn from 'nano-spawn';
|
|
3
3
|
|
|
4
4
|
/** Rough 8-4-4-4-12 hex UUID shape — not strict (locize project IDs may evolve). */
|
|
5
5
|
const UUID_SHAPE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -19,29 +19,29 @@ async function openBrowser(url, opts = {}) {
|
|
|
19
19
|
}
|
|
20
20
|
try {
|
|
21
21
|
if (process.platform === 'darwin') {
|
|
22
|
-
await
|
|
22
|
+
await spawn('open', [url], { stdio: 'ignore' });
|
|
23
23
|
}
|
|
24
24
|
else if (process.platform === 'win32') {
|
|
25
25
|
// `start` is a cmd.exe builtin; the empty "" is the window-title slot
|
|
26
|
-
await
|
|
26
|
+
await spawn('cmd', ['/c', 'start', '""', url], { stdio: 'ignore' });
|
|
27
27
|
}
|
|
28
28
|
else if (isWSL) {
|
|
29
29
|
// WSL: try the wslu / wsl-open shims that bridge to the Windows side
|
|
30
30
|
// before falling back to xdg-open (which usually isn't installed there).
|
|
31
31
|
try {
|
|
32
|
-
await
|
|
32
|
+
await spawn('wslview', [url], { stdio: 'ignore' });
|
|
33
33
|
}
|
|
34
34
|
catch {
|
|
35
35
|
try {
|
|
36
|
-
await
|
|
36
|
+
await spawn('wsl-open', [url], { stdio: 'ignore' });
|
|
37
37
|
}
|
|
38
38
|
catch {
|
|
39
|
-
await
|
|
39
|
+
await spawn('xdg-open', [url], { stdio: 'ignore' });
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
await
|
|
44
|
+
await spawn('xdg-open', [url], { stdio: 'ignore' });
|
|
45
45
|
}
|
|
46
46
|
return true;
|
|
47
47
|
}
|
|
@@ -54,7 +54,7 @@ async function openBrowser(url, opts = {}) {
|
|
|
54
54
|
* Warns (but does not block) when the Project ID does not look like a UUID.
|
|
55
55
|
*/
|
|
56
56
|
async function promptLocizeCredentials() {
|
|
57
|
-
const credentials = await
|
|
57
|
+
const credentials = await prompt([
|
|
58
58
|
{
|
|
59
59
|
type: 'input',
|
|
60
60
|
name: 'projectId',
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import confirm from '@inquirer/confirm';
|
|
2
|
+
import input from '@inquirer/input';
|
|
3
|
+
import password from '@inquirer/password';
|
|
4
|
+
import select from '@inquirer/select';
|
|
5
|
+
|
|
6
|
+
const prompts = { confirm, input, password, select };
|
|
7
|
+
/**
|
|
8
|
+
* Minimal stand-in for inquirer's legacy `prompt([...questions])`, covering what this CLI
|
|
9
|
+
* asks: input/password/confirm/select questions with default, choices, validate, filter
|
|
10
|
+
* and when. Using the single @inquirer prompts instead of the `inquirer` bundle keeps the
|
|
11
|
+
* editor prompt (and its iconv-lite/safer-buffer chain) out of the dependency tree.
|
|
12
|
+
*/
|
|
13
|
+
async function prompt(questions) {
|
|
14
|
+
const answers = {};
|
|
15
|
+
for (const { type = 'input', name, when, filter, ...config } of questions) {
|
|
16
|
+
if (typeof when === 'function' ? !(await when(answers)) : when === false)
|
|
17
|
+
continue;
|
|
18
|
+
const value = await prompts[type](config);
|
|
19
|
+
answers[name] = filter ? await filter(value, answers) : value;
|
|
20
|
+
}
|
|
21
|
+
return answers;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { prompt };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import yoctoSpinner from 'yocto-spinner';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates a spinner-like object that either:
|
|
5
5
|
* - is fully silent (quiet mode),
|
|
6
6
|
* - logs only start/succeed/fail events to a logger (no animation),
|
|
7
|
-
* - or falls back to
|
|
7
|
+
* - or falls back to an animated yocto-spinner.
|
|
8
8
|
*
|
|
9
9
|
* This avoids flooding structured loggers with spinner frames and ensures clean output in CI, Vite, etc.
|
|
10
10
|
*/
|
|
11
11
|
function createSpinnerLike(initialText, options = {}) {
|
|
12
12
|
const { quiet, logger } = options;
|
|
13
13
|
let text = initialText;
|
|
14
|
-
// If interactive (no logger and not quiet), create a single real
|
|
14
|
+
// If interactive (no logger and not quiet), create a single real spinner
|
|
15
15
|
let realSpinner = null;
|
|
16
16
|
if (!quiet && !logger) {
|
|
17
|
-
realSpinner =
|
|
17
|
+
realSpinner = yoctoSpinner({ text }).start();
|
|
18
18
|
}
|
|
19
19
|
const self = {
|
|
20
20
|
get text() { return text; },
|
|
@@ -38,8 +38,8 @@ function createSpinnerLike(initialText, options = {}) {
|
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
40
40
|
if (!realSpinner)
|
|
41
|
-
realSpinner =
|
|
42
|
-
realSpinner.
|
|
41
|
+
realSpinner = yoctoSpinner({ text }).start();
|
|
42
|
+
realSpinner.success(message);
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
fail(msg) {
|
|
@@ -56,8 +56,8 @@ function createSpinnerLike(initialText, options = {}) {
|
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
58
|
if (!realSpinner)
|
|
59
|
-
realSpinner =
|
|
60
|
-
realSpinner.
|
|
59
|
+
realSpinner = yoctoSpinner({ text }).start();
|
|
60
|
+
realSpinner.error(message);
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
warn(msg) {
|
|
@@ -74,14 +74,8 @@ function createSpinnerLike(initialText, options = {}) {
|
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
76
|
if (!realSpinner)
|
|
77
|
-
realSpinner =
|
|
78
|
-
|
|
79
|
-
realSpinner.warn?.(message);
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
realSpinner.stop();
|
|
83
|
-
process.stderr.write(message + '\n');
|
|
84
|
-
}
|
|
77
|
+
realSpinner = yoctoSpinner({ text }).start();
|
|
78
|
+
realSpinner.warning(message);
|
|
85
79
|
}
|
|
86
80
|
},
|
|
87
81
|
stop() { if (realSpinner)
|
|
@@ -99,7 +93,7 @@ function createSpinnerLike(initialText, options = {}) {
|
|
|
99
93
|
}
|
|
100
94
|
else {
|
|
101
95
|
if (!realSpinner)
|
|
102
|
-
realSpinner =
|
|
96
|
+
realSpinner = yoctoSpinner({ text }).start();
|
|
103
97
|
realSpinner.text = String(msg);
|
|
104
98
|
}
|
|
105
99
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18next-cli",
|
|
3
|
-
"version": "1.80.
|
|
3
|
+
"version": "1.80.7",
|
|
4
4
|
"description": "A unified, high-performance i18next CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -74,21 +74,24 @@
|
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@croct/json5-parser": "^0.2.2",
|
|
76
76
|
"@formatjs/icu-messageformat-parser": "^3.5.22",
|
|
77
|
+
"@inquirer/confirm": "^6.3.5",
|
|
78
|
+
"@inquirer/input": "^5.1.9",
|
|
79
|
+
"@inquirer/password": "^5.2.5",
|
|
80
|
+
"@inquirer/select": "^5.2.8",
|
|
77
81
|
"@swc/core": "^1.16.20",
|
|
78
82
|
"chokidar": "^5.0.0",
|
|
79
83
|
"commander": "^15.0.0",
|
|
80
|
-
"execa": "^10.2.1",
|
|
81
84
|
"glob": "^13.0.6",
|
|
82
85
|
"i18next": "^26.5.10",
|
|
83
86
|
"i18next-resources-for-ts": "^2.1.2",
|
|
84
|
-
"inquirer": "^14.2.4",
|
|
85
87
|
"jiti": "^2.7.0",
|
|
86
88
|
"jsonc-parser": "^3.3.1",
|
|
87
89
|
"magic-string": "^1.4.3",
|
|
88
90
|
"messageformat": "^4.1.0",
|
|
89
91
|
"minimatch": "^10.2.6",
|
|
90
|
-
"
|
|
92
|
+
"nano-spawn": "^2.1.0",
|
|
91
93
|
"react-i18next": "^17.1.8",
|
|
92
|
-
"yaml": "^2.9.1"
|
|
94
|
+
"yaml": "^2.9.1",
|
|
95
|
+
"yocto-spinner": "^1.2.2"
|
|
93
96
|
}
|
|
94
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast-visitors.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/ast-visitors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAQ,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC3H,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAiB,MAAM,mCAAmC,CAAA;AAuCrF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAe;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAC9D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,KAAK,CAAiB;IAE9B,IAAW,UAAU,gBAEpB;IAGD,SAAgB,YAAY,EAAE,YAAY,EAAE,CAAK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
1
|
import type { Expression, ObjectExpression } from '@swc/core';
|
|
2
2
|
import type { ASTVisitorHooks } from '../../types.js';
|
|
3
3
|
export declare const nestedMembers: (members: Record<string, string[]> | undefined, name: string) => Record<string, string[]> | undefined;
|
|
4
|
+
export declare class ValueTable<V> extends Map<string, V> {
|
|
5
|
+
private readonly scope;
|
|
6
|
+
constructor(scope: {
|
|
7
|
+
isParameter(name: string): boolean;
|
|
8
|
+
});
|
|
9
|
+
get(name: string): V | undefined;
|
|
10
|
+
}
|
|
4
11
|
export declare class ExpressionResolver {
|
|
5
12
|
private hooks;
|
|
6
13
|
private variableTable;
|
|
@@ -8,6 +15,7 @@ export declare class ExpressionResolver {
|
|
|
8
15
|
private typeAliasTable;
|
|
9
16
|
private sharedVariableTable;
|
|
10
17
|
private sharedObjectMapTable;
|
|
18
|
+
private sharedObjectKeysTable;
|
|
11
19
|
private sharedTypeAliasTable;
|
|
12
20
|
private sharedFunctionReturnTable;
|
|
13
21
|
private temporaryVariables;
|
|
@@ -33,12 +41,19 @@ export declare class ExpressionResolver {
|
|
|
33
41
|
private fileImports;
|
|
34
42
|
private fileNamespaces;
|
|
35
43
|
private fileVariables;
|
|
44
|
+
private parameters;
|
|
36
45
|
pathAliases: Record<string, string>;
|
|
37
46
|
constructor(hooks: ASTVisitorHooks);
|
|
38
47
|
setCurrentFile(file: string): void;
|
|
39
48
|
private importPath;
|
|
40
49
|
private moduleOf;
|
|
41
50
|
keysOf(name: string): string[];
|
|
51
|
+
isParameter(name: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Hide the values declared under the names of `fn`'s parameters while its body is read.
|
|
54
|
+
* Call the returned function when leaving it.
|
|
55
|
+
*/
|
|
56
|
+
enterParameters(fn: any): () => void;
|
|
42
57
|
declaringKey(name: string): string | undefined;
|
|
43
58
|
private inCurrentFile;
|
|
44
59
|
/**
|
|
@@ -240,6 +255,8 @@ export declare class ExpressionResolver {
|
|
|
240
255
|
* Checks per-file variableTable first, then sharedEnumTable (for enums).
|
|
241
256
|
*/
|
|
242
257
|
getObjectMap(name: string): Record<string, string> | undefined;
|
|
258
|
+
/** All keys of an object map, also those whose value is not a string, or of an enum. */
|
|
259
|
+
getObjectKeys(name: string): string[] | undefined;
|
|
243
260
|
/**
|
|
244
261
|
* Capture a TypeScript enum declaration so members can be resolved later.
|
|
245
262
|
* Accepts SWC node shapes like `TsEnumDeclaration` / `TSEnumDeclaration`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expression-resolver.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/expression-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAkD,MAAM,WAAW,CAAA;AAC7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AA2BrD,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,EAAE,MAAM,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAetH,CAAA;
|
|
1
|
+
{"version":3,"file":"expression-resolver.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/expression-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAkD,MAAM,WAAW,CAAA;AAC7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AA2BrD,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,EAAE,MAAM,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAetH,CAAA;AAsCD,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE;QAAE,WA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,CAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAInD;;;;OAIG;IACI,yBAAyB,CAAE,MAAM,EAAE,GAAG,GAAG,MAAM,EAAE;IAQxD;;;OAGG;IACI,iBAAiB,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAQ7D,6FAA6F;IACtF,eAAe,CAAE,IAAI,EAAE,GAAG,GAAG,gBAAgB,GAAG,SAAS;IAMhE;;;;OAIG;IACI,YAAY,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;IAMtE,wFAAwF;IACjF,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAOzD;;;;;OAKG;IACH,sBAAsB,CAAE,IAAI,EAAE,GAAG,GAAG,IAAI;IAwBxC;;;;;;;OAOG;IACH,kCAAkC,CAAE,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE;IAKrE;;;;;;;OAOG;IACH,8BAA8B,CAAE,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE;IAKjE;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,yCAAyC;IA+OjD,OAAO,CAAC,mCAAmC;IAwI3C;;;;;;OAMG;IACH,OAAO,CAAC,6CAA6C;IAyBrD;;;;;;OAMG;IACH,OAAO,CAAC,kDAAkD;CAwB3D"}
|
|
@@ -10,6 +10,7 @@ export declare class ScopeManager {
|
|
|
10
10
|
private simpleConstantArrays;
|
|
11
11
|
private paramDefaults;
|
|
12
12
|
identifierFallback?: (name: string) => string | undefined;
|
|
13
|
+
isParameter: (name: string) => boolean;
|
|
13
14
|
private sharedConstants;
|
|
14
15
|
private sharedConstantObjects;
|
|
15
16
|
constructor(config: Omit<I18nextToolkitConfig, 'plugins'>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/scope-manager.ts"],"names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G,SAAS,GAAG,IAAI;IAwBlF;;;;;OAKG;IACH,OAAO,CAAC,4BAA4B;CA+DrC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal stand-in for inquirer's legacy `prompt([...questions])`, covering what this CLI
|
|
3
|
+
* asks: input/password/confirm/select questions with default, choices, validate, filter
|
|
4
|
+
* and when. Using the single @inquirer prompts instead of the `inquirer` bundle keeps the
|
|
5
|
+
* editor prompt (and its iconv-lite/safer-buffer chain) out of the dependency tree.
|
|
6
|
+
*/
|
|
7
|
+
export declare function prompt(questions: any[]): Promise<Record<string, any>>;
|
|
8
|
+
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/utils/prompt.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,wBAAsB,MAAM,CAAE,SAAS,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAQ5E"}
|
|
@@ -11,7 +11,7 @@ export interface SpinnerLike {
|
|
|
11
11
|
* Creates a spinner-like object that either:
|
|
12
12
|
* - is fully silent (quiet mode),
|
|
13
13
|
* - logs only start/succeed/fail events to a logger (no animation),
|
|
14
|
-
* - or falls back to
|
|
14
|
+
* - or falls back to an animated yocto-spinner.
|
|
15
15
|
*
|
|
16
16
|
* This avoids flooding structured loggers with spinner frames and ensures clean output in CI, Vite, etc.
|
|
17
17
|
*/
|