lingo.dev 0.101.0 → 0.102.1
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/build/cli.cjs +150 -5
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +191 -46
- package/build/cli.mjs.map +1 -1
- package/package.json +4 -2
package/build/cli.mjs
CHANGED
|
@@ -4542,9 +4542,7 @@ function reorderKeys(data, originalInput) {
|
|
|
4542
4542
|
const dataKeys = new Set(Object.keys(data));
|
|
4543
4543
|
for (const key of originalKeys) {
|
|
4544
4544
|
if (dataKeys.has(key)) {
|
|
4545
|
-
|
|
4546
|
-
orderedData[key] = reorderKeys(data[key], originalInput[key]);
|
|
4547
|
-
}
|
|
4545
|
+
orderedData[key] = reorderKeys(data[key], originalInput[key]);
|
|
4548
4546
|
dataKeys.delete(key);
|
|
4549
4547
|
}
|
|
4550
4548
|
}
|
|
@@ -8260,6 +8258,9 @@ function createWorkerTask(args) {
|
|
|
8260
8258
|
)
|
|
8261
8259
|
).fromPairs().value();
|
|
8262
8260
|
if (!Object.keys(processableData).length) {
|
|
8261
|
+
await args.ioLimiter(async () => {
|
|
8262
|
+
await bucketLoader.push(assignedTask.targetLocale, targetData);
|
|
8263
|
+
});
|
|
8263
8264
|
return { status: "skipped" };
|
|
8264
8265
|
}
|
|
8265
8266
|
const processedTargetData = await args.ctx.localizer.localize(
|
|
@@ -8344,6 +8345,135 @@ function processRenamedKeys(delta, targetData) {
|
|
|
8344
8345
|
}).fromPairs().value();
|
|
8345
8346
|
}
|
|
8346
8347
|
|
|
8348
|
+
// src/cli/cmd/run/watch.ts
|
|
8349
|
+
import * as chokidar from "chokidar";
|
|
8350
|
+
import chalk13 from "chalk";
|
|
8351
|
+
async function watch2(ctx) {
|
|
8352
|
+
const debounceDelay = ctx.flags.debounce || 5e3;
|
|
8353
|
+
console.log(chalk13.hex(colors.orange)("[Watch Mode]"));
|
|
8354
|
+
console.log(
|
|
8355
|
+
`\u{1F440} Watching for changes... (Press ${chalk13.yellow("Ctrl+C")} to stop)`
|
|
8356
|
+
);
|
|
8357
|
+
console.log(chalk13.dim(` Debounce delay: ${debounceDelay}ms`));
|
|
8358
|
+
console.log("");
|
|
8359
|
+
const state = {
|
|
8360
|
+
isRunning: false,
|
|
8361
|
+
pendingChanges: /* @__PURE__ */ new Set()
|
|
8362
|
+
};
|
|
8363
|
+
const watchPatterns = await getWatchPatterns(ctx);
|
|
8364
|
+
if (watchPatterns.length === 0) {
|
|
8365
|
+
console.log(chalk13.yellow("\u26A0\uFE0F No source files found to watch"));
|
|
8366
|
+
return;
|
|
8367
|
+
}
|
|
8368
|
+
console.log(chalk13.dim(`Watching ${watchPatterns.length} file pattern(s):`));
|
|
8369
|
+
watchPatterns.forEach((pattern) => {
|
|
8370
|
+
console.log(chalk13.dim(` \u2022 ${pattern}`));
|
|
8371
|
+
});
|
|
8372
|
+
console.log("");
|
|
8373
|
+
const watcher = chokidar.watch(watchPatterns, {
|
|
8374
|
+
ignoreInitial: true,
|
|
8375
|
+
persistent: true,
|
|
8376
|
+
awaitWriteFinish: {
|
|
8377
|
+
stabilityThreshold: 500,
|
|
8378
|
+
pollInterval: 100
|
|
8379
|
+
}
|
|
8380
|
+
});
|
|
8381
|
+
watcher.on("change", (path17) => {
|
|
8382
|
+
handleFileChange(path17, state, ctx);
|
|
8383
|
+
});
|
|
8384
|
+
watcher.on("add", (path17) => {
|
|
8385
|
+
handleFileChange(path17, state, ctx);
|
|
8386
|
+
});
|
|
8387
|
+
watcher.on("unlink", (path17) => {
|
|
8388
|
+
handleFileChange(path17, state, ctx);
|
|
8389
|
+
});
|
|
8390
|
+
watcher.on("error", (error) => {
|
|
8391
|
+
console.error(
|
|
8392
|
+
chalk13.red(
|
|
8393
|
+
`Watch error: ${error instanceof Error ? error.message : String(error)}`
|
|
8394
|
+
)
|
|
8395
|
+
);
|
|
8396
|
+
});
|
|
8397
|
+
process.on("SIGINT", () => {
|
|
8398
|
+
console.log(chalk13.yellow("\n\n\u{1F6D1} Stopping watch mode..."));
|
|
8399
|
+
watcher.close();
|
|
8400
|
+
process.exit(0);
|
|
8401
|
+
});
|
|
8402
|
+
await new Promise(() => {
|
|
8403
|
+
});
|
|
8404
|
+
}
|
|
8405
|
+
async function getWatchPatterns(ctx) {
|
|
8406
|
+
if (!ctx.config) return [];
|
|
8407
|
+
const buckets = getBuckets(ctx.config);
|
|
8408
|
+
const patterns = [];
|
|
8409
|
+
for (const bucket of buckets) {
|
|
8410
|
+
if (ctx.flags.bucket && !ctx.flags.bucket.includes(bucket.type)) {
|
|
8411
|
+
continue;
|
|
8412
|
+
}
|
|
8413
|
+
for (const bucketPath of bucket.paths) {
|
|
8414
|
+
if (ctx.flags.file) {
|
|
8415
|
+
if (!ctx.flags.file.some((f) => bucketPath.pathPattern.includes(f))) {
|
|
8416
|
+
continue;
|
|
8417
|
+
}
|
|
8418
|
+
}
|
|
8419
|
+
const sourceLocale = ctx.flags.sourceLocale || ctx.config.locale.source;
|
|
8420
|
+
const sourcePattern = bucketPath.pathPattern.replace(
|
|
8421
|
+
"[locale]",
|
|
8422
|
+
sourceLocale
|
|
8423
|
+
);
|
|
8424
|
+
patterns.push(sourcePattern);
|
|
8425
|
+
}
|
|
8426
|
+
}
|
|
8427
|
+
return patterns;
|
|
8428
|
+
}
|
|
8429
|
+
function handleFileChange(filePath, state, ctx) {
|
|
8430
|
+
const debounceDelay = ctx.flags.debounce || 5e3;
|
|
8431
|
+
state.pendingChanges.add(filePath);
|
|
8432
|
+
console.log(chalk13.dim(`\u{1F4DD} File changed: ${filePath}`));
|
|
8433
|
+
if (state.debounceTimer) {
|
|
8434
|
+
clearTimeout(state.debounceTimer);
|
|
8435
|
+
}
|
|
8436
|
+
state.debounceTimer = setTimeout(async () => {
|
|
8437
|
+
if (state.isRunning) {
|
|
8438
|
+
console.log(
|
|
8439
|
+
chalk13.yellow("\u23F3 Translation already in progress, skipping...")
|
|
8440
|
+
);
|
|
8441
|
+
return;
|
|
8442
|
+
}
|
|
8443
|
+
await triggerRetranslation(state, ctx);
|
|
8444
|
+
}, debounceDelay);
|
|
8445
|
+
}
|
|
8446
|
+
async function triggerRetranslation(state, ctx) {
|
|
8447
|
+
if (state.isRunning) return;
|
|
8448
|
+
state.isRunning = true;
|
|
8449
|
+
try {
|
|
8450
|
+
const changedFiles = Array.from(state.pendingChanges);
|
|
8451
|
+
state.pendingChanges.clear();
|
|
8452
|
+
console.log(chalk13.hex(colors.green)("\n\u{1F504} Triggering retranslation..."));
|
|
8453
|
+
console.log(chalk13.dim(`Changed files: ${changedFiles.join(", ")}`));
|
|
8454
|
+
console.log("");
|
|
8455
|
+
const runCtx = {
|
|
8456
|
+
...ctx,
|
|
8457
|
+
tasks: [],
|
|
8458
|
+
results: /* @__PURE__ */ new Map()
|
|
8459
|
+
};
|
|
8460
|
+
await plan(runCtx);
|
|
8461
|
+
if (runCtx.tasks.length === 0) {
|
|
8462
|
+
console.log(chalk13.dim("\u2728 No translation tasks needed"));
|
|
8463
|
+
} else {
|
|
8464
|
+
await execute(runCtx);
|
|
8465
|
+
await renderSummary(runCtx.results);
|
|
8466
|
+
}
|
|
8467
|
+
console.log(chalk13.hex(colors.green)("\u2705 Retranslation completed"));
|
|
8468
|
+
console.log(chalk13.dim("\u{1F440} Continuing to watch for changes...\n"));
|
|
8469
|
+
} catch (error) {
|
|
8470
|
+
console.error(chalk13.red(`\u274C Retranslation failed: ${error.message}`));
|
|
8471
|
+
console.log(chalk13.dim("\u{1F440} Continuing to watch for changes...\n"));
|
|
8472
|
+
} finally {
|
|
8473
|
+
state.isRunning = false;
|
|
8474
|
+
}
|
|
8475
|
+
}
|
|
8476
|
+
|
|
8347
8477
|
// src/cli/cmd/run/_types.ts
|
|
8348
8478
|
import {
|
|
8349
8479
|
bucketTypeSchema as bucketTypeSchema3
|
|
@@ -8362,7 +8492,10 @@ var flagsSchema2 = z2.object({
|
|
|
8362
8492
|
concurrency: z2.number().positive().default(10),
|
|
8363
8493
|
debug: z2.boolean().default(false),
|
|
8364
8494
|
sourceLocale: z2.string().optional(),
|
|
8365
|
-
targetLocale: z2.array(z2.string()).optional()
|
|
8495
|
+
targetLocale: z2.array(z2.string()).optional(),
|
|
8496
|
+
watch: z2.boolean().default(false),
|
|
8497
|
+
debounce: z2.number().positive().default(5e3)
|
|
8498
|
+
// 5 seconds default
|
|
8366
8499
|
});
|
|
8367
8500
|
|
|
8368
8501
|
// src/cli/cmd/run/_utils.ts
|
|
@@ -8413,6 +8546,13 @@ var run_default = new Command16().command("run").description("Run Lingo.dev loca
|
|
|
8413
8546
|
"--concurrency <concurrency>",
|
|
8414
8547
|
"Number of concurrent tasks to run",
|
|
8415
8548
|
(val) => parseInt(val)
|
|
8549
|
+
).option(
|
|
8550
|
+
"--watch",
|
|
8551
|
+
"Watch source files for changes and automatically retranslate"
|
|
8552
|
+
).option(
|
|
8553
|
+
"--debounce <milliseconds>",
|
|
8554
|
+
"Debounce delay in milliseconds for watch mode (default: 5000ms)",
|
|
8555
|
+
(val) => parseInt(val)
|
|
8416
8556
|
).action(async (args) => {
|
|
8417
8557
|
let authId = null;
|
|
8418
8558
|
try {
|
|
@@ -8442,6 +8582,9 @@ var run_default = new Command16().command("run").description("Run Lingo.dev loca
|
|
|
8442
8582
|
await renderSpacer();
|
|
8443
8583
|
await renderSummary(ctx.results);
|
|
8444
8584
|
await renderSpacer();
|
|
8585
|
+
if (ctx.flags.watch) {
|
|
8586
|
+
await watch2(ctx);
|
|
8587
|
+
}
|
|
8445
8588
|
trackEvent(authId, "cmd.run.success", {
|
|
8446
8589
|
config: ctx.config,
|
|
8447
8590
|
flags: ctx.flags
|
|
@@ -9183,7 +9326,7 @@ import {
|
|
|
9183
9326
|
import { Command as Command18 } from "interactive-commander";
|
|
9184
9327
|
import Z11 from "zod";
|
|
9185
9328
|
import Ora10 from "ora";
|
|
9186
|
-
import
|
|
9329
|
+
import chalk14 from "chalk";
|
|
9187
9330
|
import Table from "cli-table3";
|
|
9188
9331
|
var status_default = new Command18().command("status").description("Show the status of the localization process").helpOption("-h, --help", "Show help").option(
|
|
9189
9332
|
"--locale <locale>",
|
|
@@ -9358,7 +9501,7 @@ var status_default = new Command18().command("status").description("Show the sta
|
|
|
9358
9501
|
(totalWordCount.get(_targetLocale) || 0) + sourceWordCount
|
|
9359
9502
|
);
|
|
9360
9503
|
bucketOra.succeed(
|
|
9361
|
-
`[${sourceLocale} -> ${targetLocale}] ${
|
|
9504
|
+
`[${sourceLocale} -> ${targetLocale}] ${chalk14.red(
|
|
9362
9505
|
`0% complete`
|
|
9363
9506
|
)} (0/${sourceKeys.length} keys) - file not found`
|
|
9364
9507
|
);
|
|
@@ -9403,30 +9546,30 @@ var status_default = new Command18().command("status").description("Show the sta
|
|
|
9403
9546
|
const completionPercent = (completeKeys.length / totalKeysInFile * 100).toFixed(1);
|
|
9404
9547
|
if (missingKeys.length === 0 && updatedKeys.length === 0) {
|
|
9405
9548
|
bucketOra.succeed(
|
|
9406
|
-
`[${sourceLocale} -> ${targetLocale}] ${
|
|
9549
|
+
`[${sourceLocale} -> ${targetLocale}] ${chalk14.green(
|
|
9407
9550
|
`100% complete`
|
|
9408
9551
|
)} (${completeKeys.length}/${totalKeysInFile} keys)`
|
|
9409
9552
|
);
|
|
9410
9553
|
} else {
|
|
9411
|
-
const message = `[${sourceLocale} -> ${targetLocale}] ${parseFloat(completionPercent) > 50 ?
|
|
9554
|
+
const message = `[${sourceLocale} -> ${targetLocale}] ${parseFloat(completionPercent) > 50 ? chalk14.yellow(`${completionPercent}% complete`) : chalk14.red(`${completionPercent}% complete`)} (${completeKeys.length}/${totalKeysInFile} keys)`;
|
|
9412
9555
|
bucketOra.succeed(message);
|
|
9413
9556
|
if (flags.verbose) {
|
|
9414
9557
|
if (missingKeys.length > 0) {
|
|
9415
9558
|
console.log(
|
|
9416
|
-
` ${
|
|
9559
|
+
` ${chalk14.red(`Missing:`)} ${missingKeys.length} keys, ~${wordsToTranslate} words`
|
|
9417
9560
|
);
|
|
9418
9561
|
console.log(
|
|
9419
|
-
` ${
|
|
9562
|
+
` ${chalk14.red(`Missing:`)} ${missingKeys.length} keys, ~${wordsToTranslate} words`
|
|
9420
9563
|
);
|
|
9421
9564
|
console.log(
|
|
9422
|
-
` ${
|
|
9565
|
+
` ${chalk14.dim(
|
|
9423
9566
|
`Example missing: ${missingKeys.slice(0, 2).join(", ")}${missingKeys.length > 2 ? "..." : ""}`
|
|
9424
9567
|
)}`
|
|
9425
9568
|
);
|
|
9426
9569
|
}
|
|
9427
9570
|
if (updatedKeys.length > 0) {
|
|
9428
9571
|
console.log(
|
|
9429
|
-
` ${
|
|
9572
|
+
` ${chalk14.yellow(`Updated:`)} ${updatedKeys.length} keys that changed in source`
|
|
9430
9573
|
);
|
|
9431
9574
|
}
|
|
9432
9575
|
}
|
|
@@ -9445,22 +9588,22 @@ var status_default = new Command18().command("status").description("Show the sta
|
|
|
9445
9588
|
);
|
|
9446
9589
|
const totalCompletedKeys = totalSourceKeyCount - totalKeysNeedingTranslation / targetLocales.length;
|
|
9447
9590
|
console.log();
|
|
9448
|
-
ora.succeed(
|
|
9449
|
-
console.log(
|
|
9591
|
+
ora.succeed(chalk14.green(`Localization status completed.`));
|
|
9592
|
+
console.log(chalk14.bold.cyan(`
|
|
9450
9593
|
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`));
|
|
9451
|
-
console.log(
|
|
9452
|
-
console.log(
|
|
9453
|
-
console.log(
|
|
9594
|
+
console.log(chalk14.bold.cyan(`\u2551 LOCALIZATION STATUS REPORT \u2551`));
|
|
9595
|
+
console.log(chalk14.bold.cyan(`\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D`));
|
|
9596
|
+
console.log(chalk14.bold(`
|
|
9454
9597
|
\u{1F4DD} SOURCE CONTENT:`));
|
|
9455
9598
|
console.log(
|
|
9456
|
-
`\u2022 Source language: ${
|
|
9599
|
+
`\u2022 Source language: ${chalk14.green(i18nConfig.locale.source)}`
|
|
9457
9600
|
);
|
|
9458
9601
|
console.log(
|
|
9459
|
-
`\u2022 Source keys: ${
|
|
9602
|
+
`\u2022 Source keys: ${chalk14.yellow(
|
|
9460
9603
|
totalSourceKeyCount.toString()
|
|
9461
9604
|
)} keys across all files`
|
|
9462
9605
|
);
|
|
9463
|
-
console.log(
|
|
9606
|
+
console.log(chalk14.bold(`
|
|
9464
9607
|
\u{1F310} LANGUAGE BY LANGUAGE BREAKDOWN:`));
|
|
9465
9608
|
const table = new Table({
|
|
9466
9609
|
head: [
|
|
@@ -9490,19 +9633,19 @@ var status_default = new Command18().command("status").description("Show the sta
|
|
|
9490
9633
|
let statusColor;
|
|
9491
9634
|
if (stats.missing === totalSourceKeyCount) {
|
|
9492
9635
|
statusText = "\u{1F534} Not started";
|
|
9493
|
-
statusColor =
|
|
9636
|
+
statusColor = chalk14.red;
|
|
9494
9637
|
} else if (stats.missing === 0 && stats.updated === 0) {
|
|
9495
9638
|
statusText = "\u2705 Complete";
|
|
9496
|
-
statusColor =
|
|
9639
|
+
statusColor = chalk14.green;
|
|
9497
9640
|
} else if (parseFloat(percentComplete) > 80) {
|
|
9498
9641
|
statusText = "\u{1F7E1} Almost done";
|
|
9499
|
-
statusColor =
|
|
9642
|
+
statusColor = chalk14.yellow;
|
|
9500
9643
|
} else if (parseFloat(percentComplete) > 0) {
|
|
9501
9644
|
statusText = "\u{1F7E0} In progress";
|
|
9502
|
-
statusColor =
|
|
9645
|
+
statusColor = chalk14.yellow;
|
|
9503
9646
|
} else {
|
|
9504
9647
|
statusText = "\u{1F534} Not started";
|
|
9505
|
-
statusColor =
|
|
9648
|
+
statusColor = chalk14.red;
|
|
9506
9649
|
}
|
|
9507
9650
|
const words = totalWordCount.get(locale) || 0;
|
|
9508
9651
|
totalWordsToTranslate += words;
|
|
@@ -9510,17 +9653,17 @@ var status_default = new Command18().command("status").description("Show the sta
|
|
|
9510
9653
|
locale,
|
|
9511
9654
|
statusColor(statusText),
|
|
9512
9655
|
`${stats.complete}/${totalSourceKeyCount} (${percentComplete}%)`,
|
|
9513
|
-
stats.missing > 0 ?
|
|
9514
|
-
stats.updated > 0 ?
|
|
9515
|
-
totalNeeded > 0 ?
|
|
9656
|
+
stats.missing > 0 ? chalk14.red(stats.missing.toString()) : "0",
|
|
9657
|
+
stats.updated > 0 ? chalk14.yellow(stats.updated.toString()) : "0",
|
|
9658
|
+
totalNeeded > 0 ? chalk14.magenta(totalNeeded.toString()) : "0",
|
|
9516
9659
|
words > 0 ? `~${words.toLocaleString()}` : "0"
|
|
9517
9660
|
]);
|
|
9518
9661
|
}
|
|
9519
9662
|
console.log(table.toString());
|
|
9520
|
-
console.log(
|
|
9663
|
+
console.log(chalk14.bold(`
|
|
9521
9664
|
\u{1F4CA} USAGE ESTIMATE:`));
|
|
9522
9665
|
console.log(
|
|
9523
|
-
`\u2022 WORDS TO BE CONSUMED: ~${
|
|
9666
|
+
`\u2022 WORDS TO BE CONSUMED: ~${chalk14.yellow.bold(
|
|
9524
9667
|
totalWordsToTranslate.toLocaleString()
|
|
9525
9668
|
)} words across all languages`
|
|
9526
9669
|
);
|
|
@@ -9538,11 +9681,11 @@ var status_default = new Command18().command("status").description("Show the sta
|
|
|
9538
9681
|
}
|
|
9539
9682
|
}
|
|
9540
9683
|
if (flags.confirm && Object.keys(fileStats).length > 0) {
|
|
9541
|
-
console.log(
|
|
9684
|
+
console.log(chalk14.bold(`
|
|
9542
9685
|
\u{1F4D1} BREAKDOWN BY FILE:`));
|
|
9543
9686
|
Object.entries(fileStats).sort((a, b) => b[1].wordCount - a[1].wordCount).forEach(([path17, stats]) => {
|
|
9544
9687
|
if (stats.sourceKeys === 0) return;
|
|
9545
|
-
console.log(
|
|
9688
|
+
console.log(chalk14.bold(`
|
|
9546
9689
|
\u2022 ${path17}:`));
|
|
9547
9690
|
console.log(
|
|
9548
9691
|
` ${stats.sourceKeys} source keys, ~${stats.wordCount.toLocaleString()} source words`
|
|
@@ -9562,13 +9705,13 @@ var status_default = new Command18().command("status").description("Show the sta
|
|
|
9562
9705
|
const total = stats.sourceKeys;
|
|
9563
9706
|
const completion = (complete / total * 100).toFixed(1);
|
|
9564
9707
|
let status = "\u2705 Complete";
|
|
9565
|
-
let statusColor =
|
|
9708
|
+
let statusColor = chalk14.green;
|
|
9566
9709
|
if (langStats.missing === total) {
|
|
9567
9710
|
status = "\u274C Not started";
|
|
9568
|
-
statusColor =
|
|
9711
|
+
statusColor = chalk14.red;
|
|
9569
9712
|
} else if (langStats.missing > 0 || langStats.updated > 0) {
|
|
9570
9713
|
status = `\u26A0\uFE0F ${completion}% complete`;
|
|
9571
|
-
statusColor =
|
|
9714
|
+
statusColor = chalk14.yellow;
|
|
9572
9715
|
}
|
|
9573
9716
|
let details = "";
|
|
9574
9717
|
if (langStats.missing > 0 || langStats.updated > 0) {
|
|
@@ -9592,16 +9735,16 @@ var status_default = new Command18().command("status").description("Show the sta
|
|
|
9592
9735
|
const missingLanguages = targetLocales.filter(
|
|
9593
9736
|
(locale) => languageStats[locale].complete === 0
|
|
9594
9737
|
);
|
|
9595
|
-
console.log(
|
|
9738
|
+
console.log(chalk14.bold.green(`
|
|
9596
9739
|
\u{1F4A1} OPTIMIZATION TIPS:`));
|
|
9597
9740
|
if (missingLanguages.length > 0) {
|
|
9598
9741
|
console.log(
|
|
9599
|
-
`\u2022 ${
|
|
9742
|
+
`\u2022 ${chalk14.yellow(missingLanguages.join(", "))} ${missingLanguages.length === 1 ? "has" : "have"} no translations yet`
|
|
9600
9743
|
);
|
|
9601
9744
|
}
|
|
9602
9745
|
if (completeLanguages.length > 0) {
|
|
9603
9746
|
console.log(
|
|
9604
|
-
`\u2022 ${
|
|
9747
|
+
`\u2022 ${chalk14.green(completeLanguages.join(", "))} ${completeLanguages.length === 1 ? "is" : "are"} completely translated`
|
|
9605
9748
|
);
|
|
9606
9749
|
}
|
|
9607
9750
|
if (targetLocales.length > 1) {
|
|
@@ -9684,7 +9827,7 @@ function validateParams2(i18nConfig, flags) {
|
|
|
9684
9827
|
import { Command as Command19 } from "interactive-commander";
|
|
9685
9828
|
import * as cp from "node:child_process";
|
|
9686
9829
|
import figlet2 from "figlet";
|
|
9687
|
-
import
|
|
9830
|
+
import chalk15 from "chalk";
|
|
9688
9831
|
import { vice as vice2 } from "gradient-string";
|
|
9689
9832
|
var colors2 = {
|
|
9690
9833
|
orange: "#ff6600",
|
|
@@ -9698,7 +9841,7 @@ var may_the_fourth_default = new Command19().command("may-the-fourth").descripti
|
|
|
9698
9841
|
await renderClear2();
|
|
9699
9842
|
await renderBanner2();
|
|
9700
9843
|
await renderSpacer2();
|
|
9701
|
-
console.log(
|
|
9844
|
+
console.log(chalk15.hex(colors2.yellow)("Loading the Star Wars movie..."));
|
|
9702
9845
|
await renderSpacer2();
|
|
9703
9846
|
await new Promise((resolve, reject) => {
|
|
9704
9847
|
const ssh = cp.spawn("ssh", ["starwarstel.net"], {
|
|
@@ -9717,12 +9860,12 @@ var may_the_fourth_default = new Command19().command("may-the-fourth").descripti
|
|
|
9717
9860
|
});
|
|
9718
9861
|
await renderSpacer2();
|
|
9719
9862
|
console.log(
|
|
9720
|
-
`${
|
|
9863
|
+
`${chalk15.hex(colors2.green)("We hope you enjoyed it! :)")} ${chalk15.hex(
|
|
9721
9864
|
colors2.blue
|
|
9722
9865
|
)("May the Fourth be with you! \u{1F680}")}`
|
|
9723
9866
|
);
|
|
9724
9867
|
await renderSpacer2();
|
|
9725
|
-
console.log(
|
|
9868
|
+
console.log(chalk15.dim(`---`));
|
|
9726
9869
|
await renderSpacer2();
|
|
9727
9870
|
await renderHero2();
|
|
9728
9871
|
});
|
|
@@ -9745,21 +9888,21 @@ async function renderBanner2() {
|
|
|
9745
9888
|
}
|
|
9746
9889
|
async function renderHero2() {
|
|
9747
9890
|
console.log(
|
|
9748
|
-
`\u26A1\uFE0F ${
|
|
9891
|
+
`\u26A1\uFE0F ${chalk15.hex(colors2.green)(
|
|
9749
9892
|
"Lingo.dev"
|
|
9750
9893
|
)} - open-source, AI-powered i18n CLI for web & mobile localization.`
|
|
9751
9894
|
);
|
|
9752
9895
|
console.log(" ");
|
|
9753
9896
|
console.log(
|
|
9754
|
-
|
|
9897
|
+
chalk15.hex(colors2.blue)("\u2B50 GitHub Repo: https://lingo.dev/go/gh")
|
|
9755
9898
|
);
|
|
9756
|
-
console.log(
|
|
9899
|
+
console.log(chalk15.hex(colors2.blue)("\u{1F4AC} 24/7 Support: hi@lingo.dev"));
|
|
9757
9900
|
}
|
|
9758
9901
|
|
|
9759
9902
|
// package.json
|
|
9760
9903
|
var package_default = {
|
|
9761
9904
|
name: "lingo.dev",
|
|
9762
|
-
version: "0.
|
|
9905
|
+
version: "0.102.1",
|
|
9763
9906
|
description: "Lingo.dev CLI",
|
|
9764
9907
|
private: false,
|
|
9765
9908
|
publishConfig: {
|
|
@@ -9894,6 +10037,7 @@ var package_default = {
|
|
|
9894
10037
|
ai: "^4.3.15",
|
|
9895
10038
|
bitbucket: "^2.12.0",
|
|
9896
10039
|
chalk: "^5.4.1",
|
|
10040
|
+
chokidar: "^4.0.3",
|
|
9897
10041
|
"cli-progress": "^3.12.0",
|
|
9898
10042
|
"cli-table3": "^0.6.5",
|
|
9899
10043
|
cors: "^2.8.5",
|
|
@@ -9962,6 +10106,7 @@ var package_default = {
|
|
|
9962
10106
|
},
|
|
9963
10107
|
devDependencies: {
|
|
9964
10108
|
"@types/babel__generator": "^7.27.0",
|
|
10109
|
+
"@types/chokidar": "^2.1.7",
|
|
9965
10110
|
"@types/cli-progress": "^3.11.6",
|
|
9966
10111
|
"@types/cors": "^2.8.17",
|
|
9967
10112
|
"@types/diff": "^7.0.0",
|