lingo.dev 0.122.0 → 0.122.2
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 +6 -59
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +59 -112
- package/build/cli.mjs.map +1 -1
- package/package.json +3 -3
package/build/cli.cjs
CHANGED
|
@@ -11625,7 +11625,8 @@ var i18n_default = new (0, _interactivecommander.Command)().command("i18n").desc
|
|
|
11625
11625
|
sourceData,
|
|
11626
11626
|
processableData,
|
|
11627
11627
|
targetLocale,
|
|
11628
|
-
|
|
11628
|
+
// When --force is used, exclude previous translations from reference to ensure fresh translations
|
|
11629
|
+
targetData: flags.force ? {} : targetData
|
|
11629
11630
|
},
|
|
11630
11631
|
(progress, sourceChunk, processedChunk) => {
|
|
11631
11632
|
bucketOra.text = `[${sourceLocale} -> ${targetLocale}] [${Object.keys(processableData).length} entries] (${progress}%) AI localization in progress...`;
|
|
@@ -12237,61 +12238,6 @@ function displaySummary(results) {
|
|
|
12237
12238
|
});
|
|
12238
12239
|
}
|
|
12239
12240
|
|
|
12240
|
-
// src/cli/cmd/mcp.ts
|
|
12241
|
-
|
|
12242
|
-
var _stdiojs = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
12243
|
-
var _mcpjs = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
var mcp_default = new (0, _interactivecommander.Command)().command("mcp").description(
|
|
12247
|
-
"Start a Model Context Protocol (MCP) server for AI assistant integration"
|
|
12248
|
-
).helpOption("-h, --help", "Show help").action(async (_37, program) => {
|
|
12249
|
-
const apiKey = program.args[0];
|
|
12250
|
-
const settings = getSettings(apiKey);
|
|
12251
|
-
if (!settings.auth.apiKey) {
|
|
12252
|
-
console.error("No API key provided");
|
|
12253
|
-
return;
|
|
12254
|
-
}
|
|
12255
|
-
const authenticator = createAuthenticator({
|
|
12256
|
-
apiUrl: settings.auth.apiUrl,
|
|
12257
|
-
apiKey: settings.auth.apiKey
|
|
12258
|
-
});
|
|
12259
|
-
const auth = await authenticator.whoami();
|
|
12260
|
-
if (!auth) {
|
|
12261
|
-
console.error("Not authenticated");
|
|
12262
|
-
return;
|
|
12263
|
-
} else {
|
|
12264
|
-
console.log(`Authenticated as ${auth.email}`);
|
|
12265
|
-
}
|
|
12266
|
-
const replexicaEngine = new (0, __sdk.ReplexicaEngine)({
|
|
12267
|
-
apiKey: settings.auth.apiKey,
|
|
12268
|
-
apiUrl: settings.auth.apiUrl
|
|
12269
|
-
});
|
|
12270
|
-
const server = new (0, _mcpjs.McpServer)({
|
|
12271
|
-
name: "Lingo.dev",
|
|
12272
|
-
version: "1.0.0"
|
|
12273
|
-
});
|
|
12274
|
-
server.tool(
|
|
12275
|
-
"translate",
|
|
12276
|
-
"Detect language and translate text with Lingo.dev.",
|
|
12277
|
-
{
|
|
12278
|
-
text: _zod2.default.string(),
|
|
12279
|
-
targetLocale: _zod2.default.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/)
|
|
12280
|
-
},
|
|
12281
|
-
async ({ text, targetLocale }) => {
|
|
12282
|
-
const sourceLocale = await replexicaEngine.recognizeLocale(text);
|
|
12283
|
-
const data = await replexicaEngine.localizeText(text, {
|
|
12284
|
-
sourceLocale,
|
|
12285
|
-
targetLocale
|
|
12286
|
-
});
|
|
12287
|
-
return { content: [{ type: "text", text: data }] };
|
|
12288
|
-
}
|
|
12289
|
-
);
|
|
12290
|
-
const transport = new (0, _stdiojs.StdioServerTransport)();
|
|
12291
|
-
await server.connect(transport);
|
|
12292
|
-
console.log("Lingo.dev MCP Server running on stdio");
|
|
12293
|
-
});
|
|
12294
|
-
|
|
12295
12241
|
// src/cli/cmd/ci/index.ts
|
|
12296
12242
|
|
|
12297
12243
|
|
|
@@ -13322,7 +13268,8 @@ function createWorkerTask(args) {
|
|
|
13322
13268
|
sourceLocale: assignedTask.sourceLocale,
|
|
13323
13269
|
targetLocale: assignedTask.targetLocale,
|
|
13324
13270
|
sourceData,
|
|
13325
|
-
|
|
13271
|
+
// When --force is used, exclude previous translations from reference to ensure fresh translations
|
|
13272
|
+
targetData: args.ctx.flags.force ? {} : targetData,
|
|
13326
13273
|
processableData,
|
|
13327
13274
|
hints: relevantHints
|
|
13328
13275
|
},
|
|
@@ -15246,7 +15193,7 @@ async function renderHero2() {
|
|
|
15246
15193
|
// package.json
|
|
15247
15194
|
var package_default = {
|
|
15248
15195
|
name: "lingo.dev",
|
|
15249
|
-
version: "0.122.
|
|
15196
|
+
version: "0.122.2",
|
|
15250
15197
|
description: "Lingo.dev CLI",
|
|
15251
15198
|
private: false,
|
|
15252
15199
|
repository: {
|
|
@@ -15689,7 +15636,7 @@ Star the the repo :) https://github.com/LingoDotDev/lingo.dev
|
|
|
15689
15636
|
).version(`v${package_default.version}`, "-v, --version", "Show version").addCommand(init_default).interactive(
|
|
15690
15637
|
"-y, --no-interactive",
|
|
15691
15638
|
"Run every command in non-interactive mode (no prompts); required when scripting"
|
|
15692
|
-
).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(
|
|
15639
|
+
).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) => {
|
|
15693
15640
|
if (err.code === "commander.helpDisplayed" || err.code === "commander.version" || err.code === "commander.help") {
|
|
15694
15641
|
process.exit(0);
|
|
15695
15642
|
}
|