lingo.dev 0.121.1 → 0.122.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 +33 -88
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +85 -140
- package/build/cli.mjs.map +1 -1
- package/package.json +11 -11
package/build/cli.mjs
CHANGED
|
@@ -86,7 +86,7 @@ function _loadDefaults() {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
function _loadEnv() {
|
|
89
|
-
return Z.
|
|
89
|
+
return Z.looseObject({
|
|
90
90
|
LINGODOTDEV_API_KEY: Z.string().optional(),
|
|
91
91
|
LINGODOTDEV_API_URL: Z.string().optional(),
|
|
92
92
|
LINGODOTDEV_WEB_URL: Z.string().optional(),
|
|
@@ -97,14 +97,14 @@ function _loadEnv() {
|
|
|
97
97
|
GOOGLE_API_KEY: Z.string().optional(),
|
|
98
98
|
OPENROUTER_API_KEY: Z.string().optional(),
|
|
99
99
|
MISTRAL_API_KEY: Z.string().optional()
|
|
100
|
-
}).
|
|
100
|
+
}).parse(process.env);
|
|
101
101
|
}
|
|
102
102
|
function _loadSystemFile() {
|
|
103
103
|
const settingsFilePath = _getSettingsFilePath();
|
|
104
104
|
const content = fs.existsSync(settingsFilePath) ? fs.readFileSync(settingsFilePath, "utf-8") : "";
|
|
105
105
|
const data = Ini.parse(content);
|
|
106
|
-
return Z.
|
|
107
|
-
auth: Z.
|
|
106
|
+
return Z.looseObject({
|
|
107
|
+
auth: Z.looseObject({
|
|
108
108
|
apiKey: Z.string().optional(),
|
|
109
109
|
apiUrl: Z.string().optional(),
|
|
110
110
|
webUrl: Z.string().optional(),
|
|
@@ -112,7 +112,7 @@ function _loadSystemFile() {
|
|
|
112
112
|
apiKey: Z.string().optional()
|
|
113
113
|
}).optional()
|
|
114
114
|
}).optional(),
|
|
115
|
-
llm: Z.
|
|
115
|
+
llm: Z.looseObject({
|
|
116
116
|
openaiApiKey: Z.string().optional(),
|
|
117
117
|
anthropicApiKey: Z.string().optional(),
|
|
118
118
|
groqApiKey: Z.string().optional(),
|
|
@@ -120,7 +120,7 @@ function _loadSystemFile() {
|
|
|
120
120
|
openrouterApiKey: Z.string().optional(),
|
|
121
121
|
mistralApiKey: Z.string().optional()
|
|
122
122
|
}).optional()
|
|
123
|
-
}).
|
|
123
|
+
}).parse(data);
|
|
124
124
|
}
|
|
125
125
|
function _saveSystemFile(settings) {
|
|
126
126
|
const settingsFilePath = _getSettingsFilePath();
|
|
@@ -10870,7 +10870,7 @@ import { createAnthropic } from "@ai-sdk/anthropic";
|
|
|
10870
10870
|
import { createGoogleGenerativeAI } from "@ai-sdk/google";
|
|
10871
10871
|
import { createOpenRouter } from "@openrouter/ai-sdk-provider";
|
|
10872
10872
|
import { createMistral } from "@ai-sdk/mistral";
|
|
10873
|
-
import { createOllama } from "ollama-ai-provider";
|
|
10873
|
+
import { createOllama } from "ollama-ai-provider-v2";
|
|
10874
10874
|
function createProcessor(provider, params) {
|
|
10875
10875
|
if (!provider) {
|
|
10876
10876
|
const result = createLingoLocalizer(params);
|
|
@@ -11198,7 +11198,7 @@ function checkIfFileExists(filePath) {
|
|
|
11198
11198
|
import * as path16 from "path";
|
|
11199
11199
|
import YAML5 from "yaml";
|
|
11200
11200
|
var LockSchema = z.object({
|
|
11201
|
-
version: z.literal(1).
|
|
11201
|
+
version: z.literal(1).prefault(1),
|
|
11202
11202
|
checksums: z.record(
|
|
11203
11203
|
z.string(),
|
|
11204
11204
|
// localizable files' keys
|
|
@@ -11208,8 +11208,8 @@ var LockSchema = z.object({
|
|
|
11208
11208
|
z.string(),
|
|
11209
11209
|
// checksum of the key's value in the source locale
|
|
11210
11210
|
z.string()
|
|
11211
|
-
).
|
|
11212
|
-
).
|
|
11211
|
+
).prefault({})
|
|
11212
|
+
).prefault({})
|
|
11213
11213
|
});
|
|
11214
11214
|
function createDeltaProcessor(fileKey) {
|
|
11215
11215
|
const lockfilePath = path16.join(process.cwd(), "i18n.lock");
|
|
@@ -11797,8 +11797,8 @@ function parseFlags(options) {
|
|
|
11797
11797
|
strict: Z3.boolean().optional(),
|
|
11798
11798
|
key: Z3.string().optional(),
|
|
11799
11799
|
file: Z3.array(Z3.string()).optional(),
|
|
11800
|
-
interactive: Z3.boolean().
|
|
11801
|
-
debug: Z3.boolean().
|
|
11800
|
+
interactive: Z3.boolean().prefault(false),
|
|
11801
|
+
debug: Z3.boolean().prefault(false)
|
|
11802
11802
|
}).parse(options);
|
|
11803
11803
|
}
|
|
11804
11804
|
async function validateAuth(settings) {
|
|
@@ -12032,7 +12032,7 @@ function createLockfileHelper() {
|
|
|
12032
12032
|
}
|
|
12033
12033
|
}
|
|
12034
12034
|
var LockfileSchema = Z4.object({
|
|
12035
|
-
version: Z4.literal(1).
|
|
12035
|
+
version: Z4.literal(1).prefault(1),
|
|
12036
12036
|
checksums: Z4.record(
|
|
12037
12037
|
Z4.string(),
|
|
12038
12038
|
// localizable files' keys
|
|
@@ -12042,8 +12042,8 @@ var LockfileSchema = Z4.object({
|
|
|
12042
12042
|
// key
|
|
12043
12043
|
Z4.string()
|
|
12044
12044
|
// checksum of the key's value in the source locale
|
|
12045
|
-
).
|
|
12046
|
-
).
|
|
12045
|
+
).prefault({})
|
|
12046
|
+
).prefault({})
|
|
12047
12047
|
});
|
|
12048
12048
|
|
|
12049
12049
|
// src/cli/cmd/lockfile.ts
|
|
@@ -12093,7 +12093,7 @@ var lockfile_default = new Command15().command("lockfile").description(
|
|
|
12093
12093
|
}
|
|
12094
12094
|
});
|
|
12095
12095
|
var flagsSchema = Z5.object({
|
|
12096
|
-
force: Z5.boolean().
|
|
12096
|
+
force: Z5.boolean().prefault(false)
|
|
12097
12097
|
});
|
|
12098
12098
|
|
|
12099
12099
|
// src/cli/cmd/cleanup.ts
|
|
@@ -12233,63 +12233,8 @@ function displaySummary(results) {
|
|
|
12233
12233
|
});
|
|
12234
12234
|
}
|
|
12235
12235
|
|
|
12236
|
-
// src/cli/cmd/mcp.ts
|
|
12237
|
-
import { Command as Command17 } from "interactive-commander";
|
|
12238
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
12239
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12240
|
-
import Z6 from "zod";
|
|
12241
|
-
import { ReplexicaEngine } from "@lingo.dev/_sdk";
|
|
12242
|
-
var mcp_default = new Command17().command("mcp").description(
|
|
12243
|
-
"Start a Model Context Protocol (MCP) server for AI assistant integration"
|
|
12244
|
-
).helpOption("-h, --help", "Show help").action(async (_37, program) => {
|
|
12245
|
-
const apiKey = program.args[0];
|
|
12246
|
-
const settings = getSettings(apiKey);
|
|
12247
|
-
if (!settings.auth.apiKey) {
|
|
12248
|
-
console.error("No API key provided");
|
|
12249
|
-
return;
|
|
12250
|
-
}
|
|
12251
|
-
const authenticator = createAuthenticator({
|
|
12252
|
-
apiUrl: settings.auth.apiUrl,
|
|
12253
|
-
apiKey: settings.auth.apiKey
|
|
12254
|
-
});
|
|
12255
|
-
const auth = await authenticator.whoami();
|
|
12256
|
-
if (!auth) {
|
|
12257
|
-
console.error("Not authenticated");
|
|
12258
|
-
return;
|
|
12259
|
-
} else {
|
|
12260
|
-
console.log(`Authenticated as ${auth.email}`);
|
|
12261
|
-
}
|
|
12262
|
-
const replexicaEngine = new ReplexicaEngine({
|
|
12263
|
-
apiKey: settings.auth.apiKey,
|
|
12264
|
-
apiUrl: settings.auth.apiUrl
|
|
12265
|
-
});
|
|
12266
|
-
const server = new McpServer({
|
|
12267
|
-
name: "Lingo.dev",
|
|
12268
|
-
version: "1.0.0"
|
|
12269
|
-
});
|
|
12270
|
-
server.tool(
|
|
12271
|
-
"translate",
|
|
12272
|
-
"Detect language and translate text with Lingo.dev.",
|
|
12273
|
-
{
|
|
12274
|
-
text: Z6.string(),
|
|
12275
|
-
targetLocale: Z6.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/)
|
|
12276
|
-
},
|
|
12277
|
-
async ({ text, targetLocale }) => {
|
|
12278
|
-
const sourceLocale = await replexicaEngine.recognizeLocale(text);
|
|
12279
|
-
const data = await replexicaEngine.localizeText(text, {
|
|
12280
|
-
sourceLocale,
|
|
12281
|
-
targetLocale
|
|
12282
|
-
});
|
|
12283
|
-
return { content: [{ type: "text", text: data }] };
|
|
12284
|
-
}
|
|
12285
|
-
);
|
|
12286
|
-
const transport = new StdioServerTransport();
|
|
12287
|
-
await server.connect(transport);
|
|
12288
|
-
console.log("Lingo.dev MCP Server running on stdio");
|
|
12289
|
-
});
|
|
12290
|
-
|
|
12291
12236
|
// src/cli/cmd/ci/index.ts
|
|
12292
|
-
import { Command as
|
|
12237
|
+
import { Command as Command18 } from "interactive-commander";
|
|
12293
12238
|
import createOra from "ora";
|
|
12294
12239
|
|
|
12295
12240
|
// src/cli/cmd/ci/flows/pull-request.ts
|
|
@@ -12318,7 +12263,7 @@ function escapeShellArg(arg) {
|
|
|
12318
12263
|
}
|
|
12319
12264
|
|
|
12320
12265
|
// src/cli/cmd/run/index.ts
|
|
12321
|
-
import { Command as
|
|
12266
|
+
import { Command as Command17 } from "interactive-commander";
|
|
12322
12267
|
import { exec } from "child_process";
|
|
12323
12268
|
import path18 from "path";
|
|
12324
12269
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -12579,7 +12524,7 @@ import chalk10 from "chalk";
|
|
|
12579
12524
|
import dedent7 from "dedent";
|
|
12580
12525
|
import { generateText as generateText2 } from "ai";
|
|
12581
12526
|
import { jsonrepair as jsonrepair3 } from "jsonrepair";
|
|
12582
|
-
import { createOllama as createOllama2 } from "ollama-ai-provider";
|
|
12527
|
+
import { createOllama as createOllama2 } from "ollama-ai-provider-v2";
|
|
12583
12528
|
function createExplicitLocalizer(provider) {
|
|
12584
12529
|
const settings = provider.settings || {};
|
|
12585
12530
|
switch (provider.id) {
|
|
@@ -13551,13 +13496,13 @@ var flagsSchema2 = z2.object({
|
|
|
13551
13496
|
frozen: z2.boolean().optional(),
|
|
13552
13497
|
verbose: z2.boolean().optional(),
|
|
13553
13498
|
strict: z2.boolean().optional(),
|
|
13554
|
-
interactive: z2.boolean().
|
|
13555
|
-
concurrency: z2.number().positive().
|
|
13556
|
-
debug: z2.boolean().
|
|
13499
|
+
interactive: z2.boolean().prefault(false),
|
|
13500
|
+
concurrency: z2.number().positive().prefault(10),
|
|
13501
|
+
debug: z2.boolean().prefault(false),
|
|
13557
13502
|
sourceLocale: z2.string().optional(),
|
|
13558
13503
|
targetLocale: z2.array(z2.string()).optional(),
|
|
13559
|
-
watch: z2.boolean().
|
|
13560
|
-
debounce: z2.number().positive().
|
|
13504
|
+
watch: z2.boolean().prefault(false),
|
|
13505
|
+
debounce: z2.number().positive().prefault(5e3),
|
|
13561
13506
|
// 5 seconds default
|
|
13562
13507
|
sound: z2.boolean().optional(),
|
|
13563
13508
|
pseudo: z2.boolean().optional()
|
|
@@ -13751,7 +13696,7 @@ function playSound(type) {
|
|
|
13751
13696
|
setTimeout(resolve, 3e3);
|
|
13752
13697
|
});
|
|
13753
13698
|
}
|
|
13754
|
-
var run_default = new
|
|
13699
|
+
var run_default = new Command17().command("run").description("Run localization pipeline").helpOption("-h, --help", "Show help").option(
|
|
13755
13700
|
"--source-locale <source-locale>",
|
|
13756
13701
|
"Override the source locale from i18n.json for this run"
|
|
13757
13702
|
).option(
|
|
@@ -14154,11 +14099,11 @@ Hey team,
|
|
|
14154
14099
|
// src/cli/cmd/ci/platforms/bitbucket.ts
|
|
14155
14100
|
import { execSync as execSync5 } from "child_process";
|
|
14156
14101
|
import bbLib from "bitbucket";
|
|
14157
|
-
import
|
|
14102
|
+
import Z7 from "zod";
|
|
14158
14103
|
|
|
14159
14104
|
// src/cli/cmd/ci/platforms/_base.ts
|
|
14160
14105
|
import { execSync as execSync4 } from "child_process";
|
|
14161
|
-
import
|
|
14106
|
+
import Z6 from "zod";
|
|
14162
14107
|
var defaultMessage = "feat: update translations via @lingodotdev";
|
|
14163
14108
|
var PlatformKit = class {
|
|
14164
14109
|
gitConfig(token, repoUrl) {
|
|
@@ -14169,20 +14114,20 @@ var PlatformKit = class {
|
|
|
14169
14114
|
}
|
|
14170
14115
|
}
|
|
14171
14116
|
get config() {
|
|
14172
|
-
const env =
|
|
14173
|
-
LINGODOTDEV_API_KEY:
|
|
14174
|
-
LINGODOTDEV_PULL_REQUEST:
|
|
14117
|
+
const env = Z6.object({
|
|
14118
|
+
LINGODOTDEV_API_KEY: Z6.string(),
|
|
14119
|
+
LINGODOTDEV_PULL_REQUEST: Z6.preprocess(
|
|
14175
14120
|
(val) => val === "true" || val === true,
|
|
14176
|
-
|
|
14121
|
+
Z6.boolean()
|
|
14177
14122
|
),
|
|
14178
|
-
LINGODOTDEV_COMMIT_MESSAGE:
|
|
14179
|
-
LINGODOTDEV_PULL_REQUEST_TITLE:
|
|
14180
|
-
LINGODOTDEV_COMMIT_AUTHOR_NAME:
|
|
14181
|
-
LINGODOTDEV_COMMIT_AUTHOR_EMAIL:
|
|
14182
|
-
LINGODOTDEV_WORKING_DIRECTORY:
|
|
14183
|
-
LINGODOTDEV_PROCESS_OWN_COMMITS:
|
|
14123
|
+
LINGODOTDEV_COMMIT_MESSAGE: Z6.string().optional(),
|
|
14124
|
+
LINGODOTDEV_PULL_REQUEST_TITLE: Z6.string().optional(),
|
|
14125
|
+
LINGODOTDEV_COMMIT_AUTHOR_NAME: Z6.string().optional(),
|
|
14126
|
+
LINGODOTDEV_COMMIT_AUTHOR_EMAIL: Z6.string().optional(),
|
|
14127
|
+
LINGODOTDEV_WORKING_DIRECTORY: Z6.string().optional(),
|
|
14128
|
+
LINGODOTDEV_PROCESS_OWN_COMMITS: Z6.preprocess(
|
|
14184
14129
|
(val) => val === "true" || val === true,
|
|
14185
|
-
|
|
14130
|
+
Z6.boolean()
|
|
14186
14131
|
).optional()
|
|
14187
14132
|
}).parse(process.env);
|
|
14188
14133
|
return {
|
|
@@ -14278,10 +14223,10 @@ var BitbucketPlatformKit = class extends PlatformKit {
|
|
|
14278
14223
|
);
|
|
14279
14224
|
}
|
|
14280
14225
|
get platformConfig() {
|
|
14281
|
-
const env =
|
|
14282
|
-
BITBUCKET_BRANCH:
|
|
14283
|
-
BITBUCKET_REPO_FULL_NAME:
|
|
14284
|
-
BB_TOKEN:
|
|
14226
|
+
const env = Z7.object({
|
|
14227
|
+
BITBUCKET_BRANCH: Z7.string(),
|
|
14228
|
+
BITBUCKET_REPO_FULL_NAME: Z7.string(),
|
|
14229
|
+
BB_TOKEN: Z7.string().optional()
|
|
14285
14230
|
}).parse(process.env);
|
|
14286
14231
|
const [repositoryOwner, repositoryName] = env.BITBUCKET_REPO_FULL_NAME.split("/");
|
|
14287
14232
|
return {
|
|
@@ -14299,7 +14244,7 @@ var BitbucketPlatformKit = class extends PlatformKit {
|
|
|
14299
14244
|
|
|
14300
14245
|
// src/cli/cmd/ci/platforms/github.ts
|
|
14301
14246
|
import { Octokit } from "octokit";
|
|
14302
|
-
import
|
|
14247
|
+
import Z8 from "zod";
|
|
14303
14248
|
var GitHubPlatformKit = class extends PlatformKit {
|
|
14304
14249
|
_octokit;
|
|
14305
14250
|
get octokit() {
|
|
@@ -14369,12 +14314,12 @@ var GitHubPlatformKit = class extends PlatformKit {
|
|
|
14369
14314
|
}
|
|
14370
14315
|
}
|
|
14371
14316
|
get platformConfig() {
|
|
14372
|
-
const env =
|
|
14373
|
-
GITHUB_REPOSITORY:
|
|
14374
|
-
GITHUB_REPOSITORY_OWNER:
|
|
14375
|
-
GITHUB_REF_NAME:
|
|
14376
|
-
GITHUB_HEAD_REF:
|
|
14377
|
-
GH_TOKEN:
|
|
14317
|
+
const env = Z8.object({
|
|
14318
|
+
GITHUB_REPOSITORY: Z8.string(),
|
|
14319
|
+
GITHUB_REPOSITORY_OWNER: Z8.string(),
|
|
14320
|
+
GITHUB_REF_NAME: Z8.string(),
|
|
14321
|
+
GITHUB_HEAD_REF: Z8.string(),
|
|
14322
|
+
GH_TOKEN: Z8.string().optional()
|
|
14378
14323
|
}).parse(process.env);
|
|
14379
14324
|
const baseBranchName = !env.GITHUB_REF_NAME.endsWith("/merge") ? env.GITHUB_REF_NAME : env.GITHUB_HEAD_REF;
|
|
14380
14325
|
return {
|
|
@@ -14392,7 +14337,7 @@ var GitHubPlatformKit = class extends PlatformKit {
|
|
|
14392
14337
|
|
|
14393
14338
|
// src/cli/cmd/ci/platforms/gitlab.ts
|
|
14394
14339
|
import { Gitlab } from "@gitbeaker/rest";
|
|
14395
|
-
import
|
|
14340
|
+
import Z9 from "zod";
|
|
14396
14341
|
var gl = new Gitlab({ token: "" });
|
|
14397
14342
|
var GitlabPlatformKit = class extends PlatformKit {
|
|
14398
14343
|
_gitlab;
|
|
@@ -14409,15 +14354,15 @@ var GitlabPlatformKit = class extends PlatformKit {
|
|
|
14409
14354
|
return this._gitlab;
|
|
14410
14355
|
}
|
|
14411
14356
|
get platformConfig() {
|
|
14412
|
-
const env =
|
|
14413
|
-
GL_TOKEN:
|
|
14414
|
-
CI_COMMIT_BRANCH:
|
|
14415
|
-
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:
|
|
14416
|
-
CI_PROJECT_NAMESPACE:
|
|
14417
|
-
CI_PROJECT_NAME:
|
|
14418
|
-
CI_PROJECT_ID:
|
|
14419
|
-
CI_PROJECT_DIR:
|
|
14420
|
-
CI_REPOSITORY_URL:
|
|
14357
|
+
const env = Z9.object({
|
|
14358
|
+
GL_TOKEN: Z9.string().optional(),
|
|
14359
|
+
CI_COMMIT_BRANCH: Z9.string(),
|
|
14360
|
+
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME: Z9.string().optional(),
|
|
14361
|
+
CI_PROJECT_NAMESPACE: Z9.string(),
|
|
14362
|
+
CI_PROJECT_NAME: Z9.string(),
|
|
14363
|
+
CI_PROJECT_ID: Z9.string(),
|
|
14364
|
+
CI_PROJECT_DIR: Z9.string(),
|
|
14365
|
+
CI_REPOSITORY_URL: Z9.string()
|
|
14421
14366
|
}).parse(process.env);
|
|
14422
14367
|
const config = {
|
|
14423
14368
|
glToken: env.GL_TOKEN,
|
|
@@ -14513,7 +14458,7 @@ var getPlatformKit = () => {
|
|
|
14513
14458
|
};
|
|
14514
14459
|
|
|
14515
14460
|
// src/cli/cmd/ci/index.ts
|
|
14516
|
-
var ci_default = new
|
|
14461
|
+
var ci_default = new Command18().command("ci").description("Run localization pipeline in CI/CD environment").helpOption("-h, --help", "Show help").option(
|
|
14517
14462
|
"--parallel [boolean]",
|
|
14518
14463
|
"Process translations concurrently for faster execution. Defaults to false",
|
|
14519
14464
|
parseBooleanArg
|
|
@@ -14613,8 +14558,8 @@ import {
|
|
|
14613
14558
|
localeCodeSchema as localeCodeSchema3,
|
|
14614
14559
|
resolveOverriddenLocale as resolveOverriddenLocale9
|
|
14615
14560
|
} from "@lingo.dev/_spec";
|
|
14616
|
-
import { Command as
|
|
14617
|
-
import
|
|
14561
|
+
import { Command as Command19 } from "interactive-commander";
|
|
14562
|
+
import Z10 from "zod";
|
|
14618
14563
|
import Ora13 from "ora";
|
|
14619
14564
|
import chalk16 from "chalk";
|
|
14620
14565
|
import Table from "cli-table3";
|
|
@@ -14653,7 +14598,7 @@ function checkForPendingOperations() {
|
|
|
14653
14598
|
}
|
|
14654
14599
|
|
|
14655
14600
|
// src/cli/cmd/status.ts
|
|
14656
|
-
var status_default = new
|
|
14601
|
+
var status_default = new Command19().command("status").description("Show the status of the localization process").helpOption("-h, --help", "Show help").option(
|
|
14657
14602
|
"--locale <locale>",
|
|
14658
14603
|
"Limit the report to specific target locales from i18n.json. Repeat the flag to include multiple locales. Defaults to all configured target locales",
|
|
14659
14604
|
(val, prev) => prev ? [...prev, val] : [val]
|
|
@@ -15109,14 +15054,14 @@ var status_default = new Command20().command("status").description("Show the sta
|
|
|
15109
15054
|
}
|
|
15110
15055
|
});
|
|
15111
15056
|
function parseFlags2(options) {
|
|
15112
|
-
return
|
|
15113
|
-
locale:
|
|
15114
|
-
bucket:
|
|
15115
|
-
force:
|
|
15116
|
-
confirm:
|
|
15117
|
-
verbose:
|
|
15118
|
-
file:
|
|
15119
|
-
apiKey:
|
|
15057
|
+
return Z10.object({
|
|
15058
|
+
locale: Z10.array(localeCodeSchema3).optional(),
|
|
15059
|
+
bucket: Z10.array(bucketTypeSchema4).optional(),
|
|
15060
|
+
force: Z10.boolean().optional(),
|
|
15061
|
+
confirm: Z10.boolean().optional(),
|
|
15062
|
+
verbose: Z10.boolean().optional(),
|
|
15063
|
+
file: Z10.array(Z10.string()).optional(),
|
|
15064
|
+
apiKey: Z10.string().optional()
|
|
15120
15065
|
}).parse(options);
|
|
15121
15066
|
}
|
|
15122
15067
|
async function tryAuthenticate(settings) {
|
|
@@ -15161,7 +15106,7 @@ function validateParams2(i18nConfig, flags) {
|
|
|
15161
15106
|
}
|
|
15162
15107
|
|
|
15163
15108
|
// src/cli/cmd/may-the-fourth.ts
|
|
15164
|
-
import { Command as
|
|
15109
|
+
import { Command as Command20 } from "interactive-commander";
|
|
15165
15110
|
import * as cp from "child_process";
|
|
15166
15111
|
import figlet2 from "figlet";
|
|
15167
15112
|
import chalk17 from "chalk";
|
|
@@ -15174,7 +15119,7 @@ var colors2 = {
|
|
|
15174
15119
|
grey: "#808080",
|
|
15175
15120
|
red: "#ff0000"
|
|
15176
15121
|
};
|
|
15177
|
-
var may_the_fourth_default = new
|
|
15122
|
+
var may_the_fourth_default = new Command20().command("may-the-fourth").description("May the Fourth be with you").helpOption("-h, --help", "Show help").action(async () => {
|
|
15178
15123
|
await renderClear2();
|
|
15179
15124
|
await renderBanner2();
|
|
15180
15125
|
await renderSpacer2();
|
|
@@ -15242,7 +15187,7 @@ async function renderHero2() {
|
|
|
15242
15187
|
// package.json
|
|
15243
15188
|
var package_default = {
|
|
15244
15189
|
name: "lingo.dev",
|
|
15245
|
-
version: "0.
|
|
15190
|
+
version: "0.122.1",
|
|
15246
15191
|
description: "Lingo.dev CLI",
|
|
15247
15192
|
private: false,
|
|
15248
15193
|
repository: {
|
|
@@ -15371,10 +15316,10 @@ var package_default = {
|
|
|
15371
15316
|
author: "",
|
|
15372
15317
|
license: "Apache-2.0",
|
|
15373
15318
|
dependencies: {
|
|
15374
|
-
"@ai-sdk/anthropic": "
|
|
15375
|
-
"@ai-sdk/google": "
|
|
15376
|
-
"@ai-sdk/mistral": "
|
|
15377
|
-
"@ai-sdk/openai": "
|
|
15319
|
+
"@ai-sdk/anthropic": "3.0.9",
|
|
15320
|
+
"@ai-sdk/google": "3.0.6",
|
|
15321
|
+
"@ai-sdk/mistral": "3.0.5",
|
|
15322
|
+
"@ai-sdk/openai": "3.0.7",
|
|
15378
15323
|
"@babel/generator": "7.28.5",
|
|
15379
15324
|
"@babel/parser": "7.28.5",
|
|
15380
15325
|
"@babel/traverse": "7.28.5",
|
|
@@ -15392,10 +15337,10 @@ var package_default = {
|
|
|
15392
15337
|
"@lingo.dev/_spec": "workspace:*",
|
|
15393
15338
|
"@markdoc/markdoc": "0.5.4",
|
|
15394
15339
|
"@modelcontextprotocol/sdk": "1.22.0",
|
|
15395
|
-
"@openrouter/ai-sdk-provider": "0.
|
|
15340
|
+
"@openrouter/ai-sdk-provider": "6.0.0-alpha.1",
|
|
15396
15341
|
"@paralleldrive/cuid2": "2.2.2",
|
|
15397
15342
|
"@types/ejs": "3.1.5",
|
|
15398
|
-
ai: "
|
|
15343
|
+
ai: "6.0.25",
|
|
15399
15344
|
bitbucket: "2.12.0",
|
|
15400
15345
|
chalk: "5.6.2",
|
|
15401
15346
|
chokidar: "4.0.3",
|
|
@@ -15442,7 +15387,7 @@ var package_default = {
|
|
|
15442
15387
|
"node-webvtt": "1.9.4",
|
|
15443
15388
|
"object-hash": "3.0.0",
|
|
15444
15389
|
octokit: "4.0.2",
|
|
15445
|
-
"ollama-ai-provider": "
|
|
15390
|
+
"ollama-ai-provider-v2": "2.0.0",
|
|
15446
15391
|
open: "10.2.0",
|
|
15447
15392
|
ora: "8.1.1",
|
|
15448
15393
|
"p-limit": "6.2.0",
|
|
@@ -15469,7 +15414,7 @@ var package_default = {
|
|
|
15469
15414
|
xml2js: "0.6.2",
|
|
15470
15415
|
xpath: "0.0.34",
|
|
15471
15416
|
yaml: "2.8.1",
|
|
15472
|
-
zod: "
|
|
15417
|
+
zod: "4.1.12"
|
|
15473
15418
|
},
|
|
15474
15419
|
devDependencies: {
|
|
15475
15420
|
"@types/babel__generator": "7.27.0",
|
|
@@ -15503,11 +15448,11 @@ var package_default = {
|
|
|
15503
15448
|
};
|
|
15504
15449
|
|
|
15505
15450
|
// src/cli/cmd/purge.ts
|
|
15506
|
-
import { Command as
|
|
15451
|
+
import { Command as Command21 } from "interactive-commander";
|
|
15507
15452
|
import Ora14 from "ora";
|
|
15508
15453
|
import { resolveOverriddenLocale as resolveOverriddenLocale10 } from "@lingo.dev/_spec";
|
|
15509
15454
|
import { confirm as confirm4 } from "@inquirer/prompts";
|
|
15510
|
-
var purge_default = new
|
|
15455
|
+
var purge_default = new Command21().command("purge").description(
|
|
15511
15456
|
"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."
|
|
15512
15457
|
).helpOption("-h, --help", "Show help").option(
|
|
15513
15458
|
"--bucket <bucket>",
|
|
@@ -15685,7 +15630,7 @@ Star the the repo :) https://github.com/LingoDotDev/lingo.dev
|
|
|
15685
15630
|
).version(`v${package_default.version}`, "-v, --version", "Show version").addCommand(init_default).interactive(
|
|
15686
15631
|
"-y, --no-interactive",
|
|
15687
15632
|
"Run every command in non-interactive mode (no prompts); required when scripting"
|
|
15688
|
-
).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(
|
|
15633
|
+
).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(ci_default).addCommand(status_default).addCommand(may_the_fourth_default, { hidden: true }).addCommand(run_default).addCommand(purge_default).exitOverride((err) => {
|
|
15689
15634
|
if (err.code === "commander.helpDisplayed" || err.code === "commander.version" || err.code === "commander.help") {
|
|
15690
15635
|
process.exit(0);
|
|
15691
15636
|
}
|