Skip to content

Commit 78bee57

Browse files
committed
feat: replace the old translation server runner
1 parent 1bd958d commit 78bee57

4 files changed

Lines changed: 757 additions & 182 deletions

File tree

cmp/compiler/src/translation-server/cli.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ import { parseArgs } from "node:util";
4141
import { readFile, access } from "fs/promises";
4242
import { resolve, join } from "path";
4343
import { pathToFileURL } from "url";
44-
import { startOrGetTranslationServerHono } from "./translation-server-hono";
4544
import type { TranslationMiddlewareConfig } from "../types";
4645
import type { LingoNextPluginOptions } from "../plugin/next";
4746
import { logger } from "../utils/logger";
47+
import { startOrGetTranslationServer } from "./translation-server";
4848

4949
interface CLIOptions {
5050
port?: number;
@@ -449,10 +449,10 @@ export async function main(): Promise<void> {
449449
}
450450

451451
// Start server
452-
const { server, url } = await startOrGetTranslationServerHono({
452+
const { server, url } = await startOrGetTranslationServer({
453453
startPort: cliOpts.port || 60000,
454454
config,
455-
requestTimeout: cliOpts.timeout || 30000,
455+
// requestTimeout: cliOpts.timeout || 30000,
456456
onError: (err) => {
457457
logger.error("Translation server error:", err);
458458
},
@@ -485,7 +485,4 @@ export async function main(): Promise<void> {
485485
}
486486
}
487487

488-
// Run if called directly (ESM check)
489-
if (import.meta.url === `file://${process.argv[1]}`) {
490-
main();
491-
}
488+
main();

cmp/compiler/src/translation-server/start-server.ts

Lines changed: 0 additions & 173 deletions
This file was deleted.

cmp/demo/react-router/app/.lingo/dev-config.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)