lingo.dev 0.122.0 → 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 +2 -57
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +55 -110
- package/build/cli.mjs.map +1 -1
- package/package.json +1 -1
package/build/cli.cjs
CHANGED
|
@@ -12237,61 +12237,6 @@ function displaySummary(results) {
|
|
|
12237
12237
|
});
|
|
12238
12238
|
}
|
|
12239
12239
|
|
|
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
12240
|
// src/cli/cmd/ci/index.ts
|
|
12296
12241
|
|
|
12297
12242
|
|
|
@@ -15246,7 +15191,7 @@ async function renderHero2() {
|
|
|
15246
15191
|
// package.json
|
|
15247
15192
|
var package_default = {
|
|
15248
15193
|
name: "lingo.dev",
|
|
15249
|
-
version: "0.122.
|
|
15194
|
+
version: "0.122.1",
|
|
15250
15195
|
description: "Lingo.dev CLI",
|
|
15251
15196
|
private: false,
|
|
15252
15197
|
repository: {
|
|
@@ -15689,7 +15634,7 @@ Star the the repo :) https://github.com/LingoDotDev/lingo.dev
|
|
|
15689
15634
|
).version(`v${package_default.version}`, "-v, --version", "Show version").addCommand(init_default).interactive(
|
|
15690
15635
|
"-y, --no-interactive",
|
|
15691
15636
|
"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(
|
|
15637
|
+
).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
15638
|
if (err.code === "commander.helpDisplayed" || err.code === "commander.version" || err.code === "commander.help") {
|
|
15694
15639
|
process.exit(0);
|
|
15695
15640
|
}
|