lingo.dev 0.111.8 → 0.111.10
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 -1
- package/build/cli.cjs +143 -75
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +143 -75
- package/build/cli.mjs.map +1 -1
- package/build/locale-codes.cjs.map +1 -1
- package/build/locale-codes.mjs.map +1 -1
- package/package.json +2 -2
package/build/cli.mjs
CHANGED
|
@@ -442,12 +442,12 @@ function createAuthenticator(params) {
|
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
// src/cli/cmd/auth.ts
|
|
445
|
-
var auth_default = new Command().command("auth").description("Show current authentication status").helpOption("-h, --help", "Show help").option(
|
|
445
|
+
var auth_default = new Command().command("auth").description("Show current authentication status and user email").helpOption("-h, --help", "Show help").option(
|
|
446
446
|
"--login",
|
|
447
|
-
"
|
|
447
|
+
"DEPRECATED: Shows deprecation warning and exits. Use `lingo.dev login` instead"
|
|
448
448
|
).option(
|
|
449
449
|
"--logout",
|
|
450
|
-
"
|
|
450
|
+
"DEPRECATED: Shows deprecation warning and exits. Use `lingo.dev logout` instead"
|
|
451
451
|
).action(async (options) => {
|
|
452
452
|
try {
|
|
453
453
|
if (options.login) {
|
|
@@ -595,7 +595,9 @@ async function renderSummary(results) {
|
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
// src/cli/cmd/login.ts
|
|
598
|
-
var login_default = new Command2().command("login").description(
|
|
598
|
+
var login_default = new Command2().command("login").description(
|
|
599
|
+
"Open browser to authenticate with lingo.dev and save your API key"
|
|
600
|
+
).helpOption("-h, --help", "Show help").action(async () => {
|
|
599
601
|
try {
|
|
600
602
|
await renderClear();
|
|
601
603
|
await renderSpacer();
|
|
@@ -654,7 +656,7 @@ async function waitForApiKey(cb) {
|
|
|
654
656
|
// src/cli/cmd/logout.ts
|
|
655
657
|
import { Command as Command3 } from "interactive-commander";
|
|
656
658
|
import Ora3 from "ora";
|
|
657
|
-
var logout_default = new Command3().command("logout").description("Log out
|
|
659
|
+
var logout_default = new Command3().command("logout").description("Log out by removing saved authentication credentials").helpOption("-h, --help", "Show help").action(async () => {
|
|
658
660
|
try {
|
|
659
661
|
await renderClear();
|
|
660
662
|
await renderSpacer();
|
|
@@ -1072,10 +1074,16 @@ var throwHelpError = (option, value) => {
|
|
|
1072
1074
|
Do you need support for ${value} ${option}? Type "help" and we will.`
|
|
1073
1075
|
);
|
|
1074
1076
|
};
|
|
1075
|
-
var init_default = new InteractiveCommand().command("init").description("
|
|
1076
|
-
new InteractiveOption(
|
|
1077
|
+
var init_default = new InteractiveCommand().command("init").description("Create i18n.json configuration file for a new project").helpOption("-h, --help", "Show help").addOption(
|
|
1078
|
+
new InteractiveOption(
|
|
1079
|
+
"-f --force",
|
|
1080
|
+
"Overwrite existing Lingo.dev configuration instead of aborting initialization (destructive operation)"
|
|
1081
|
+
).prompt(void 0).default(false)
|
|
1077
1082
|
).addOption(
|
|
1078
|
-
new InteractiveOption(
|
|
1083
|
+
new InteractiveOption(
|
|
1084
|
+
"-s --source <locale>",
|
|
1085
|
+
"Primary language of your application that content will be translated from. Defaults to 'en'"
|
|
1086
|
+
).argParser((value) => {
|
|
1079
1087
|
try {
|
|
1080
1088
|
resolveLocaleCode2(value);
|
|
1081
1089
|
} catch (e) {
|
|
@@ -1084,7 +1092,10 @@ var init_default = new InteractiveCommand().command("init").description("Initial
|
|
|
1084
1092
|
return value;
|
|
1085
1093
|
}).default("en")
|
|
1086
1094
|
).addOption(
|
|
1087
|
-
new InteractiveOption(
|
|
1095
|
+
new InteractiveOption(
|
|
1096
|
+
"-t --targets <locale...>",
|
|
1097
|
+
"Target languages to translate to. Accepts locale codes like 'es', 'fr', 'de-AT' separated by commas or spaces. Defaults to 'es'"
|
|
1098
|
+
).argParser((value) => {
|
|
1088
1099
|
const values = value.includes(",") ? value.split(",") : value.split(" ");
|
|
1089
1100
|
values.forEach((value2) => {
|
|
1090
1101
|
try {
|
|
@@ -1096,7 +1107,10 @@ var init_default = new InteractiveCommand().command("init").description("Initial
|
|
|
1096
1107
|
return values;
|
|
1097
1108
|
}).default("es")
|
|
1098
1109
|
).addOption(
|
|
1099
|
-
new InteractiveOption(
|
|
1110
|
+
new InteractiveOption(
|
|
1111
|
+
"-b, --bucket <type>",
|
|
1112
|
+
"File format for your translation files. Must match a supported type such as json, yaml, or android"
|
|
1113
|
+
).argParser((value) => {
|
|
1100
1114
|
if (!bucketTypes.includes(value)) {
|
|
1101
1115
|
throwHelpError("bucket format", value);
|
|
1102
1116
|
}
|
|
@@ -1105,7 +1119,7 @@ var init_default = new InteractiveCommand().command("init").description("Initial
|
|
|
1105
1119
|
).addOption(
|
|
1106
1120
|
new InteractiveOption(
|
|
1107
1121
|
"-p, --paths [path...]",
|
|
1108
|
-
"
|
|
1122
|
+
"File paths containing translations when using --no-interactive mode. Specify paths with [locale] placeholder, separated by commas or spaces"
|
|
1109
1123
|
).argParser((value) => {
|
|
1110
1124
|
if (!value || value.length === 0) return [];
|
|
1111
1125
|
const values = value.includes(",") ? value.split(",") : value.split(" ");
|
|
@@ -1248,7 +1262,7 @@ import _4 from "lodash";
|
|
|
1248
1262
|
import fs7 from "fs";
|
|
1249
1263
|
import path8 from "path";
|
|
1250
1264
|
import { defaultConfig as defaultConfig2 } from "@lingo.dev/_spec";
|
|
1251
|
-
var config_default = new Command4().command("config").description("Print
|
|
1265
|
+
var config_default = new Command4().command("config").description("Print effective i18n.json after merging with defaults").helpOption("-h, --help", "Show help").action(async (options) => {
|
|
1252
1266
|
const fileConfig = loadReplexicaFileConfig();
|
|
1253
1267
|
const config = _4.merge({}, defaultConfig2, fileConfig);
|
|
1254
1268
|
console.log(JSON.stringify(config, null, 2));
|
|
@@ -1268,7 +1282,10 @@ function loadReplexicaFileConfig() {
|
|
|
1268
1282
|
import { Command as Command5 } from "interactive-commander";
|
|
1269
1283
|
import Ora5 from "ora";
|
|
1270
1284
|
import { localeCodes } from "@lingo.dev/_spec";
|
|
1271
|
-
var locale_default = new Command5().command("locale").description("
|
|
1285
|
+
var locale_default = new Command5().command("locale").description("List supported locale codes").helpOption("-h, --help", "Show help").argument(
|
|
1286
|
+
"<type>",
|
|
1287
|
+
'Type of locales to show: "sources" or "targets" - both show the full supported locale list'
|
|
1288
|
+
).action(async (type) => {
|
|
1272
1289
|
const ora = Ora5();
|
|
1273
1290
|
try {
|
|
1274
1291
|
switch (type) {
|
|
@@ -1432,12 +1449,14 @@ function resolveBucketItem(bucketItem) {
|
|
|
1432
1449
|
|
|
1433
1450
|
// src/cli/cmd/show/files.ts
|
|
1434
1451
|
import { resolveOverriddenLocale as resolveOverriddenLocale2 } from "@lingo.dev/_spec";
|
|
1435
|
-
var files_default = new Command6().command("files").description(
|
|
1452
|
+
var files_default = new Command6().command("files").description(
|
|
1453
|
+
"Expand each bucket's path pattern into concrete source and target file paths"
|
|
1454
|
+
).option(
|
|
1436
1455
|
"--source",
|
|
1437
|
-
"Only
|
|
1456
|
+
"Only list the source locale variant for each path pattern"
|
|
1438
1457
|
).option(
|
|
1439
1458
|
"--target",
|
|
1440
|
-
"Only
|
|
1459
|
+
"Only list the target locale variants for each configured locale"
|
|
1441
1460
|
).helpOption("-h, --help", "Show help").action(async (type) => {
|
|
1442
1461
|
const ora = Ora6();
|
|
1443
1462
|
try {
|
|
@@ -1498,7 +1517,7 @@ var files_default = new Command6().command("files").description("Print out the l
|
|
|
1498
1517
|
});
|
|
1499
1518
|
|
|
1500
1519
|
// src/cli/cmd/show/index.ts
|
|
1501
|
-
var show_default = new Command7().command("show").description("
|
|
1520
|
+
var show_default = new Command7().command("show").description("Display configuration, locales, and file paths").helpOption("-h, --help", "Show help").addCommand(config_default).addCommand(locale_default).addCommand(files_default);
|
|
1502
1521
|
|
|
1503
1522
|
// src/cli/cmd/config/index.ts
|
|
1504
1523
|
import { Command as Command11 } from "interactive-commander";
|
|
@@ -1508,9 +1527,12 @@ import { Command as Command8 } from "interactive-commander";
|
|
|
1508
1527
|
import chalk2 from "chalk";
|
|
1509
1528
|
import dedent from "dedent";
|
|
1510
1529
|
import _6 from "lodash";
|
|
1511
|
-
var set_default = new Command8().name("set").description("Set a
|
|
1530
|
+
var set_default = new Command8().name("set").description("Set or update a CLI setting in ~/.lingodotdevrc").addHelpText("afterAll", `
|
|
1512
1531
|
Available keys:
|
|
1513
|
-
${SETTINGS_KEYS.join("\n ")}`).argument(
|
|
1532
|
+
${SETTINGS_KEYS.join("\n ")}`).argument(
|
|
1533
|
+
"<key>",
|
|
1534
|
+
"Configuration key to set (dot notation, e.g., auth.apiKey)"
|
|
1535
|
+
).argument("<value>", "The configuration value to set").helpOption("-h, --help", "Show help").action(async (key, value) => {
|
|
1514
1536
|
if (!SETTINGS_KEYS.includes(key)) {
|
|
1515
1537
|
console.error(
|
|
1516
1538
|
dedent`
|
|
@@ -1544,9 +1566,12 @@ import { Command as Command9 } from "interactive-commander";
|
|
|
1544
1566
|
import chalk3 from "chalk";
|
|
1545
1567
|
import dedent2 from "dedent";
|
|
1546
1568
|
import _7 from "lodash";
|
|
1547
|
-
var unset_default = new Command9().name("unset").description("Remove a
|
|
1569
|
+
var unset_default = new Command9().name("unset").description("Remove a CLI setting from ~/.lingodotdevrc").addHelpText("afterAll", `
|
|
1548
1570
|
Available keys:
|
|
1549
|
-
${SETTINGS_KEYS.join("\n ")}`).argument(
|
|
1571
|
+
${SETTINGS_KEYS.join("\n ")}`).argument(
|
|
1572
|
+
"<key>",
|
|
1573
|
+
"Configuration key to remove (must match one of the available keys listed below)"
|
|
1574
|
+
).helpOption("-h, --help", "Show help").action(async (key) => {
|
|
1550
1575
|
if (!SETTINGS_KEYS.includes(key)) {
|
|
1551
1576
|
console.error(
|
|
1552
1577
|
dedent2`
|
|
@@ -1590,9 +1615,12 @@ import { Command as Command10 } from "interactive-commander";
|
|
|
1590
1615
|
import chalk4 from "chalk";
|
|
1591
1616
|
import _8 from "lodash";
|
|
1592
1617
|
import dedent3 from "dedent";
|
|
1593
|
-
var get_default = new Command10().name("get").description("
|
|
1618
|
+
var get_default = new Command10().name("get").description("Display the value of a CLI setting from ~/.lingodotdevrc").addHelpText("afterAll", `
|
|
1594
1619
|
Available keys:
|
|
1595
|
-
${SETTINGS_KEYS.join("\n ")}`).argument(
|
|
1620
|
+
${SETTINGS_KEYS.join("\n ")}`).argument(
|
|
1621
|
+
"<key>",
|
|
1622
|
+
"Configuration key to read (choose from the available keys listed below)"
|
|
1623
|
+
).helpOption("-h, --help", "Show help").action(async (key) => {
|
|
1596
1624
|
if (!SETTINGS_KEYS.includes(key)) {
|
|
1597
1625
|
console.error(
|
|
1598
1626
|
dedent3`
|
|
@@ -1617,7 +1645,9 @@ Available keys:
|
|
|
1617
1645
|
});
|
|
1618
1646
|
|
|
1619
1647
|
// src/cli/cmd/config/index.ts
|
|
1620
|
-
var config_default2 = new Command11().command("config").description(
|
|
1648
|
+
var config_default2 = new Command11().command("config").description(
|
|
1649
|
+
"Manage CLI settings (authentication, API keys) stored in ~/.lingodotdevrc"
|
|
1650
|
+
).helpOption("-h, --help", "Show help").addCommand(set_default).addCommand(unset_default).addCommand(get_default);
|
|
1621
1651
|
|
|
1622
1652
|
// src/cli/cmd/i18n.ts
|
|
1623
1653
|
import {
|
|
@@ -7201,6 +7231,7 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys,
|
|
|
7201
7231
|
createXcodeXcstringsLoader(options.defaultLocale),
|
|
7202
7232
|
createFlatLoader(),
|
|
7203
7233
|
createEnsureKeyOrderLoader(),
|
|
7234
|
+
createLockedKeysLoader(lockedKeys || []),
|
|
7204
7235
|
createSyncLoader(),
|
|
7205
7236
|
createVariableLoader({ type: "ieee" }),
|
|
7206
7237
|
createUnlocalizableLoader(options.returnUnlocalizedKeys)
|
|
@@ -7781,41 +7812,43 @@ function createDeltaProcessor(fileKey) {
|
|
|
7781
7812
|
}
|
|
7782
7813
|
|
|
7783
7814
|
// src/cli/cmd/i18n.ts
|
|
7784
|
-
var i18n_default = new Command12().command("i18n").description(
|
|
7815
|
+
var i18n_default = new Command12().command("i18n").description(
|
|
7816
|
+
"DEPRECATED: Run localization pipeline (prefer `run` command instead)"
|
|
7817
|
+
).helpOption("-h, --help", "Show help").option(
|
|
7785
7818
|
"--locale <locale>",
|
|
7786
|
-
"
|
|
7819
|
+
"Limit processing to the listed target locale codes from i18n.json. Repeat the flag to include multiple locales. Defaults to all configured target locales",
|
|
7787
7820
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
7788
7821
|
).option(
|
|
7789
7822
|
"--bucket <bucket>",
|
|
7790
|
-
"
|
|
7823
|
+
"Limit processing to specific bucket types defined in i18n.json (e.g., json, yaml, android). Repeat the flag to include multiple bucket types. Defaults to all buckets",
|
|
7791
7824
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
7792
7825
|
).option(
|
|
7793
7826
|
"--key <key>",
|
|
7794
|
-
"
|
|
7827
|
+
"Limit processing to a single translation key by exact match. Filters all buckets and locales to process only this key, useful for testing or debugging specific translations. Example: auth.login.title"
|
|
7795
7828
|
).option(
|
|
7796
7829
|
"--file [files...]",
|
|
7797
|
-
"
|
|
7830
|
+
"Filter processing to only buckets whose file paths contain these substrings. Example: 'components' to process only files in components directories"
|
|
7798
7831
|
).option(
|
|
7799
7832
|
"--frozen",
|
|
7800
|
-
|
|
7833
|
+
"Validate translations are up-to-date without making changes - fails if source files, target files, or lockfile are out of sync. Ideal for CI/CD to ensure translation consistency before deployment"
|
|
7801
7834
|
).option(
|
|
7802
7835
|
"--force",
|
|
7803
|
-
"
|
|
7836
|
+
"Force re-translation of all keys, bypassing change detection. Useful when you want to regenerate translations with updated AI models or translation settings"
|
|
7804
7837
|
).option(
|
|
7805
7838
|
"--verbose",
|
|
7806
|
-
"
|
|
7839
|
+
"Print the translation data being processed as formatted JSON for each bucket and locale"
|
|
7807
7840
|
).option(
|
|
7808
7841
|
"--interactive",
|
|
7809
|
-
"
|
|
7842
|
+
"Review and edit AI-generated translations interactively before applying changes to files"
|
|
7810
7843
|
).option(
|
|
7811
7844
|
"--api-key <api-key>",
|
|
7812
|
-
"
|
|
7845
|
+
"Override API key from settings or environment variables"
|
|
7813
7846
|
).option(
|
|
7814
7847
|
"--debug",
|
|
7815
|
-
"Pause
|
|
7848
|
+
"Pause before processing localization so you can attach a debugger"
|
|
7816
7849
|
).option(
|
|
7817
7850
|
"--strict",
|
|
7818
|
-
"Stop
|
|
7851
|
+
"Stop immediately on first error instead of continuing to process remaining buckets and locales (fail-fast mode)"
|
|
7819
7852
|
).action(async function(options) {
|
|
7820
7853
|
updateGitignore();
|
|
7821
7854
|
const ora = Ora7();
|
|
@@ -8514,7 +8547,12 @@ var LockfileSchema = Z4.object({
|
|
|
8514
8547
|
|
|
8515
8548
|
// src/cli/cmd/lockfile.ts
|
|
8516
8549
|
import { resolveOverriddenLocale as resolveOverriddenLocale4 } from "@lingo.dev/_spec";
|
|
8517
|
-
var lockfile_default = new Command13().command("lockfile").description(
|
|
8550
|
+
var lockfile_default = new Command13().command("lockfile").description(
|
|
8551
|
+
"Generate or refresh i18n.lock based on the current source locale content"
|
|
8552
|
+
).helpOption("-h, --help", "Show help").option(
|
|
8553
|
+
"-f, --force",
|
|
8554
|
+
"Overwrite existing lockfile to reset translation tracking"
|
|
8555
|
+
).action(async (options) => {
|
|
8518
8556
|
const flags = flagsSchema.parse(options);
|
|
8519
8557
|
const ora = Ora8();
|
|
8520
8558
|
const lockfileHelper = createLockfileHelper();
|
|
@@ -8559,10 +8597,19 @@ import { Command as Command14 } from "interactive-commander";
|
|
|
8559
8597
|
import _33 from "lodash";
|
|
8560
8598
|
import Ora9 from "ora";
|
|
8561
8599
|
var cleanup_default = new Command14().command("cleanup").description(
|
|
8562
|
-
"Remove keys from target
|
|
8563
|
-
).helpOption("-h, --help", "Show help").option(
|
|
8600
|
+
"Remove translation keys from target locales that no longer exist in the source locale"
|
|
8601
|
+
).helpOption("-h, --help", "Show help").option(
|
|
8602
|
+
"--locale <locale>",
|
|
8603
|
+
"Limit cleanup to a specific target locale from i18n.json. Defaults to all configured target locales"
|
|
8604
|
+
).option(
|
|
8605
|
+
"--bucket <bucket>",
|
|
8606
|
+
"Limit cleanup to a specific bucket type defined under `buckets` in i18n.json"
|
|
8607
|
+
).option(
|
|
8608
|
+
"--dry-run",
|
|
8609
|
+
"Preview which keys would be deleted without making any changes"
|
|
8610
|
+
).option(
|
|
8564
8611
|
"--verbose",
|
|
8565
|
-
"
|
|
8612
|
+
"Print detailed output showing the specific keys to be removed for each locale"
|
|
8566
8613
|
).action(async function(options) {
|
|
8567
8614
|
const ora = Ora9();
|
|
8568
8615
|
const results = [];
|
|
@@ -8683,7 +8730,9 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
8683
8730
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8684
8731
|
import Z6 from "zod";
|
|
8685
8732
|
import { ReplexicaEngine } from "@lingo.dev/_sdk";
|
|
8686
|
-
var mcp_default = new Command15().command("mcp").description(
|
|
8733
|
+
var mcp_default = new Command15().command("mcp").description(
|
|
8734
|
+
"Start a Model Context Protocol (MCP) server for AI assistant integration"
|
|
8735
|
+
).helpOption("-h, --help", "Show help").action(async (_35, program) => {
|
|
8687
8736
|
const apiKey = program.args[0];
|
|
8688
8737
|
const settings = getSettings(apiKey);
|
|
8689
8738
|
if (!settings.auth.apiKey) {
|
|
@@ -9671,48 +9720,45 @@ function playSound(type) {
|
|
|
9671
9720
|
setTimeout(resolve, 3e3);
|
|
9672
9721
|
});
|
|
9673
9722
|
}
|
|
9674
|
-
var run_default = new Command16().command("run").description("Run
|
|
9723
|
+
var run_default = new Command16().command("run").description("Run localization pipeline").helpOption("-h, --help", "Show help").option(
|
|
9675
9724
|
"--source-locale <source-locale>",
|
|
9676
|
-
"
|
|
9725
|
+
"Override the source locale from i18n.json for this run"
|
|
9677
9726
|
).option(
|
|
9678
9727
|
"--target-locale <target-locale>",
|
|
9679
|
-
"
|
|
9728
|
+
"Limit processing to the listed target locale codes from i18n.json. Repeat the flag to include multiple locales. Defaults to all configured target locales",
|
|
9680
9729
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
9681
9730
|
).option(
|
|
9682
9731
|
"--bucket <bucket>",
|
|
9683
|
-
"
|
|
9732
|
+
"Limit processing to specific bucket types defined in i18n.json (e.g., json, yaml, android). Repeat the flag to include multiple bucket types. Defaults to all configured buckets",
|
|
9684
9733
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
9685
9734
|
).option(
|
|
9686
9735
|
"--file <file>",
|
|
9687
|
-
"
|
|
9736
|
+
"Filter bucket path pattern values by substring match. Examples: messages.json or locale/. Repeat to add multiple filters",
|
|
9688
9737
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
9689
9738
|
).option(
|
|
9690
9739
|
"--key <key>",
|
|
9691
|
-
"
|
|
9740
|
+
"Filter keys by prefix matching on dot-separated paths. Example: auth.login to match all keys starting with auth.login. Repeat for multiple patterns",
|
|
9692
9741
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
9693
9742
|
).option(
|
|
9694
9743
|
"--force",
|
|
9695
|
-
"
|
|
9744
|
+
"Force re-translation of all keys, bypassing change detection. Useful when you want to regenerate translations with updated AI models or translation settings"
|
|
9696
9745
|
).option(
|
|
9697
9746
|
"--api-key <api-key>",
|
|
9698
|
-
"
|
|
9699
|
-
).option(
|
|
9700
|
-
"--debug",
|
|
9701
|
-
"Pause execution at start for debugging purposes, waits for user confirmation before proceeding"
|
|
9702
|
-
).option(
|
|
9747
|
+
"Override API key from settings or environment variables"
|
|
9748
|
+
).option("--debug", "Pause before processing to allow attaching a debugger.").option(
|
|
9703
9749
|
"--concurrency <concurrency>",
|
|
9704
|
-
"Number of
|
|
9750
|
+
"Number of translation jobs to run concurrently. Higher values can speed up large translation batches but may increase memory usage. Defaults to 10 (maximum 10)",
|
|
9705
9751
|
(val) => parseInt(val)
|
|
9706
9752
|
).option(
|
|
9707
9753
|
"--watch",
|
|
9708
|
-
"Watch source files
|
|
9754
|
+
"Watch source locale files continuously and retranslate automatically when files change"
|
|
9709
9755
|
).option(
|
|
9710
9756
|
"--debounce <milliseconds>",
|
|
9711
|
-
"
|
|
9757
|
+
"Delay in milliseconds after file changes before retranslating in watch mode. Defaults to 5000",
|
|
9712
9758
|
(val) => parseInt(val)
|
|
9713
9759
|
).option(
|
|
9714
9760
|
"--sound",
|
|
9715
|
-
"Play
|
|
9761
|
+
"Play audio feedback when translations complete (success or failure sounds)"
|
|
9716
9762
|
).action(async (args) => {
|
|
9717
9763
|
let authId = null;
|
|
9718
9764
|
try {
|
|
@@ -10417,13 +10463,29 @@ var getPlatformKit = () => {
|
|
|
10417
10463
|
};
|
|
10418
10464
|
|
|
10419
10465
|
// src/cli/cmd/ci/index.ts
|
|
10420
|
-
var ci_default = new Command17().command("ci").description("Run
|
|
10466
|
+
var ci_default = new Command17().command("ci").description("Run localization pipeline in CI/CD environment").helpOption("-h, --help", "Show help").option(
|
|
10467
|
+
"--parallel [boolean]",
|
|
10468
|
+
"Process translations concurrently for faster execution. Defaults to false",
|
|
10469
|
+
parseBooleanArg
|
|
10470
|
+
).option(
|
|
10471
|
+
"--api-key <key>",
|
|
10472
|
+
"Override API key from settings or environment variables"
|
|
10473
|
+
).option(
|
|
10421
10474
|
"--pull-request [boolean]",
|
|
10422
|
-
"Create a pull
|
|
10475
|
+
"Create or update translations on a dedicated branch and manage pull requests automatically. When false, commits directly to current branch. Defaults to false",
|
|
10423
10476
|
parseBooleanArg
|
|
10424
|
-
).option(
|
|
10477
|
+
).option(
|
|
10478
|
+
"--commit-message <message>",
|
|
10479
|
+
"Commit message for localization changes. Defaults to 'feat: update translations via @lingodotdev'"
|
|
10480
|
+
).option(
|
|
10481
|
+
"--pull-request-title <title>",
|
|
10482
|
+
"Title for the pull request when using --pull-request mode. Defaults to 'feat: update translations via @lingodotdev'"
|
|
10483
|
+
).option(
|
|
10484
|
+
"--working-directory <dir>",
|
|
10485
|
+
"Directory to run localization from (useful for monorepos where localization files are in a subdirectory)"
|
|
10486
|
+
).option(
|
|
10425
10487
|
"--process-own-commits [boolean]",
|
|
10426
|
-
"
|
|
10488
|
+
"Allow processing commits made by this CI user (bypasses infinite loop prevention)",
|
|
10427
10489
|
parseBooleanArg
|
|
10428
10490
|
).action(async (options) => {
|
|
10429
10491
|
const settings = getSettings(options.apiKey);
|
|
@@ -10531,21 +10593,24 @@ function checkForPendingOperations() {
|
|
|
10531
10593
|
// src/cli/cmd/status.ts
|
|
10532
10594
|
var status_default = new Command18().command("status").description("Show the status of the localization process").helpOption("-h, --help", "Show help").option(
|
|
10533
10595
|
"--locale <locale>",
|
|
10534
|
-
"
|
|
10596
|
+
"Limit the report to specific target locales from i18n.json. Repeat the flag to include multiple locales. Defaults to all configured target locales",
|
|
10535
10597
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
10536
10598
|
).option(
|
|
10537
10599
|
"--bucket <bucket>",
|
|
10538
|
-
"
|
|
10600
|
+
"Limit the report to specific bucket types defined in i18n.json (e.g., json, yaml, android). Repeat the flag to include multiple bucket types. Defaults to all buckets",
|
|
10539
10601
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
10540
10602
|
).option(
|
|
10541
10603
|
"--file [files...]",
|
|
10542
|
-
"
|
|
10604
|
+
"Filter the status report to only include files whose paths contain these substrings. Example: 'components' to match any file path containing 'components'"
|
|
10543
10605
|
).option(
|
|
10544
10606
|
"--force",
|
|
10545
|
-
"
|
|
10546
|
-
).option(
|
|
10607
|
+
"Force all keys to be counted as needing translation, bypassing change detection. Shows word estimates for a complete retranslation regardless of current translation status"
|
|
10608
|
+
).option(
|
|
10609
|
+
"--verbose",
|
|
10610
|
+
"Print detailed output showing missing and updated key counts with example key names for each file and locale"
|
|
10611
|
+
).option(
|
|
10547
10612
|
"--api-key <api-key>",
|
|
10548
|
-
"
|
|
10613
|
+
"Override the API key from settings or environment variables for this run"
|
|
10549
10614
|
).action(async function(options) {
|
|
10550
10615
|
const ora = Ora10();
|
|
10551
10616
|
const flags = parseFlags2(options);
|
|
@@ -11109,7 +11174,7 @@ async function renderHero2() {
|
|
|
11109
11174
|
// package.json
|
|
11110
11175
|
var package_default = {
|
|
11111
11176
|
name: "lingo.dev",
|
|
11112
|
-
version: "0.111.
|
|
11177
|
+
version: "0.111.10",
|
|
11113
11178
|
description: "Lingo.dev CLI",
|
|
11114
11179
|
private: false,
|
|
11115
11180
|
publishConfig: {
|
|
@@ -11360,24 +11425,24 @@ import Ora11 from "ora";
|
|
|
11360
11425
|
import { resolveOverriddenLocale as resolveOverriddenLocale8 } from "@lingo.dev/_spec";
|
|
11361
11426
|
import { confirm as confirm3 } from "@inquirer/prompts";
|
|
11362
11427
|
var purge_default = new Command20().command("purge").description(
|
|
11363
|
-
"
|
|
11428
|
+
"WARNING: Permanently delete translation entries from bucket path patterns defined in i18n.json. This is a destructive operation that cannot be undone. Without any filters, ALL managed keys will be removed from EVERY target locale."
|
|
11364
11429
|
).helpOption("-h, --help", "Show help").option(
|
|
11365
11430
|
"--bucket <bucket>",
|
|
11366
|
-
"
|
|
11431
|
+
"Limit the purge to specific bucket types defined under `buckets` in i18n.json. Repeat the flag to include multiple bucket types. Defaults to all buckets",
|
|
11367
11432
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
11368
11433
|
).option(
|
|
11369
11434
|
"--file [files...]",
|
|
11370
|
-
"
|
|
11435
|
+
"Filter which file paths to purge by matching against path patterns. Only paths containing any of these values will be processed. Examples: --file messages.json --file admin/"
|
|
11371
11436
|
).option(
|
|
11372
11437
|
"--key <key>",
|
|
11373
|
-
"
|
|
11438
|
+
"Filter which keys to delete using prefix matching on dot-separated key paths. Example: 'auth.login' matches all keys starting with auth.login. Omit this option to delete ALL keys. Keys marked as locked or ignored in i18n.json are automatically skipped"
|
|
11374
11439
|
).option(
|
|
11375
11440
|
"--locale <locale>",
|
|
11376
|
-
"
|
|
11441
|
+
"Limit purging to specific target locale codes from i18n.json. Repeat the flag to include multiple locales. Defaults to all configured target locales. Warning: Including the source locale will delete content from it as well.",
|
|
11377
11442
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
11378
11443
|
).option(
|
|
11379
11444
|
"--yes-really",
|
|
11380
|
-
"
|
|
11445
|
+
"Bypass safety confirmations for destructive operations. Use with extreme caution - this will delete translation keys without asking for confirmation. Intended for automated scripts and CI environments only."
|
|
11381
11446
|
).action(async function(options) {
|
|
11382
11447
|
const ora = Ora11();
|
|
11383
11448
|
try {
|
|
@@ -11532,7 +11597,10 @@ ${vice3(
|
|
|
11532
11597
|
|
|
11533
11598
|
Star the the repo :) https://github.com/LingoDotDev/lingo.dev
|
|
11534
11599
|
`
|
|
11535
|
-
).version(`v${package_default.version}`, "-v, --version", "Show version").addCommand(init_default).interactive(
|
|
11600
|
+
).version(`v${package_default.version}`, "-v, --version", "Show version").addCommand(init_default).interactive(
|
|
11601
|
+
"-y, --no-interactive",
|
|
11602
|
+
"Run every command in non-interactive mode (no prompts); required when scripting"
|
|
11603
|
+
).addCommand(i18n_default).addCommand(auth_default).addCommand(login_default).addCommand(logout_default).addCommand(show_default).addCommand(config_default2).addCommand(lockfile_default).addCommand(cleanup_default).addCommand(mcp_default).addCommand(ci_default).addCommand(status_default).addCommand(may_the_fourth_default, { hidden: true }).addCommand(run_default).addCommand(purge_default).exitOverride((err) => {
|
|
11536
11604
|
if (err.code === "commander.helpDisplayed" || err.code === "commander.version" || err.code === "commander.help") {
|
|
11537
11605
|
process.exit(0);
|
|
11538
11606
|
}
|