locadex 0.1.13-alpha.2 → 0.1.13
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/CHANGELOG.md +11 -0
- package/dist/cli.js +5 -7
- package/dist/cli.js.map +1 -1
- package/dist/commands/fixErrors.d.ts.map +1 -1
- package/dist/commands/fixErrors.js +2 -7
- package/dist/commands/fixErrors.js.map +1 -1
- package/dist/commands/i18n.d.ts.map +1 -1
- package/dist/commands/i18n.js +2 -7
- package/dist/commands/i18n.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +3 -10
- package/dist/commands/setup.js.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/logging/console.js +1 -4
- package/dist/logging/console.js.map +1 -1
- package/dist/logging/logger.js +1 -4
- package/dist/logging/logger.js.map +1 -1
- package/dist/mcp/getDocs.js +1 -4
- package/dist/mcp/getDocs.js.map +1 -1
- package/dist/mcp/getGuide.js +1 -4
- package/dist/mcp/getGuide.js.map +1 -1
- package/dist/mcp/getPort.js +1 -4
- package/dist/mcp/getPort.js.map +1 -1
- package/dist/mcp/tools/docs.js +1 -4
- package/dist/mcp/tools/docs.js.map +1 -1
- package/dist/mcp/tools/guides.js +1 -4
- package/dist/mcp/tools/guides.js.map +1 -1
- package/dist/mcp/tools/validate.js +1 -4
- package/dist/mcp/tools/validate.js.map +1 -1
- package/dist/mcp/validateEnv.js +1 -4
- package/dist/mcp/validateEnv.js.map +1 -1
- package/dist/mcp-sse.js +1 -4
- package/dist/mcp-sse.js.map +1 -1
- package/dist/mcp-stdio.js +1 -4
- package/dist/mcp-stdio.js.map +1 -1
- package/dist/prompts/system.js +1 -4
- package/dist/prompts/system.js.map +1 -1
- package/dist/resources/getResource.js +1 -4
- package/dist/resources/getResource.js.map +1 -1
- package/dist/tasks/concurrency.js +1 -4
- package/dist/tasks/concurrency.js.map +1 -1
- package/dist/tasks/fixErrors.js +1 -4
- package/dist/tasks/fixErrors.js.map +1 -1
- package/dist/tasks/i18n.d.ts.map +1 -1
- package/dist/tasks/i18n.js +3 -8
- package/dist/tasks/i18n.js.map +1 -1
- package/dist/tasks/setup.d.ts.map +1 -1
- package/dist/tasks/setup.js +43 -6
- package/dist/tasks/setup.js.map +1 -1
- package/dist/telemetry.js +2 -5
- package/dist/telemetry.js.map +1 -1
- package/dist/types/claude-sdk.js +1 -4
- package/dist/types/claude-sdk.js.map +1 -1
- package/dist/types/cli.d.ts +2 -1
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/cli.js +1 -4
- package/dist/types/cli.js.map +1 -1
- package/dist/utils/claudeCode.js +1 -4
- package/dist/utils/claudeCode.js.map +1 -1
- package/dist/utils/config.js +1 -4
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/dag/createDag.js +1 -4
- package/dist/utils/dag/createDag.js.map +1 -1
- package/dist/utils/dag/extractFiles.js +1 -4
- package/dist/utils/dag/extractFiles.js.map +1 -1
- package/dist/utils/dag/getFiles.js +1 -4
- package/dist/utils/dag/getFiles.js.map +1 -1
- package/dist/utils/dag/matchFiles.js +1 -4
- package/dist/utils/dag/matchFiles.js.map +1 -1
- package/dist/utils/errors.js +1 -4
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/exec.js +1 -4
- package/dist/utils/exec.js.map +1 -1
- package/dist/utils/fs/findConfigs.js +1 -4
- package/dist/utils/fs/findConfigs.js.map +1 -1
- package/dist/utils/fs/getFiles.js +1 -4
- package/dist/utils/fs/getFiles.js.map +1 -1
- package/dist/utils/fs/git.js +1 -4
- package/dist/utils/fs/git.js.map +1 -1
- package/dist/utils/fs/writeFiles.js +1 -4
- package/dist/utils/fs/writeFiles.js.map +1 -1
- package/dist/utils/getPaths.js +1 -4
- package/dist/utils/getPaths.js.map +1 -1
- package/dist/utils/locadexManager.d.ts +2 -0
- package/dist/utils/locadexManager.d.ts.map +1 -1
- package/dist/utils/locadexManager.js +6 -4
- package/dist/utils/locadexManager.js.map +1 -1
- package/dist/utils/lockfile.d.ts +0 -1
- package/dist/utils/lockfile.d.ts.map +1 -1
- package/dist/utils/lockfile.js +5 -14
- package/dist/utils/lockfile.js.map +1 -1
- package/dist/utils/packages/installPackage.js +1 -4
- package/dist/utils/packages/installPackage.js.map +1 -1
- package/dist/utils/session.js +1 -4
- package/dist/utils/session.js.map +1 -1
- package/dist/utils/shared.js +1 -4
- package/dist/utils/shared.js.map +1 -1
- package/dist/utils/shutdown.js +1 -4
- package/dist/utils/shutdown.js.map +1 -1
- package/dist/utils/stats.js +1 -4
- package/dist/utils/stats.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# locadex
|
|
2
2
|
|
|
3
|
+
## 0.1.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#396](https://github.com/generaltranslation/gt/pull/396) [`4f41851`](https://github.com/generaltranslation/gt/commit/4f41851a124df2f855db616a618f3e28b5a94455) Thanks [@andrewherndon](https://github.com/andrewherndon)! - added local translations as param to start command
|
|
8
|
+
|
|
9
|
+
- [#409](https://github.com/generaltranslation/gt/pull/409) [`557f74d`](https://github.com/generaltranslation/gt/commit/557f74da58ebd84ca50c1961fc6dfecd63bb7797) Thanks [@brian-lou](https://github.com/brian-lou)! - Make locadex more reliable + improve validation
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`557f74d`](https://github.com/generaltranslation/gt/commit/557f74da58ebd84ca50c1961fc6dfecd63bb7797)]:
|
|
12
|
+
- gtx-cli@1.2.30
|
|
13
|
+
|
|
3
14
|
## 0.1.12
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1bff4bd9-c351-539d-a8af-f167c50673b1")}catch(e){}}();
|
|
4
2
|
import dotenv from 'dotenv';
|
|
5
3
|
dotenv.config({ path: '.env' });
|
|
6
4
|
dotenv.config({ path: '.env.local', override: true });
|
|
@@ -27,13 +25,14 @@ program
|
|
|
27
25
|
.option('-b, --batch-size <number>', 'File batch size')
|
|
28
26
|
.option('-t, --timeout <number>', 'Timeout for each file in a batch')
|
|
29
27
|
.option('-c, --concurrency <number>', 'Max number of concurrent agents')
|
|
30
|
-
.option('-m, --match-files <
|
|
28
|
+
.option('-m, --match-files <patterns...>', 'Space-separated list of glob patterns to match source files. Should be relative to root directory.')
|
|
31
29
|
.option('--package-manager <manager>', 'Package manager to use. (npm, pnpm, yarn_v1, yarn_v2, bun, deno)')
|
|
32
30
|
.option('-y, --bypass-prompts', 'Bypass interactive prompts')
|
|
33
31
|
.option('--no-telemetry', 'Disable telemetry')
|
|
34
32
|
.option('--no-translate', 'Disable translation step')
|
|
35
33
|
.option('-f, --format-cmd <cmd>', 'Command to format modified files')
|
|
36
34
|
.option('--app-dir <dir>', 'Relative path to the application directory', '.')
|
|
35
|
+
.option('--local-translations', 'Enable local translations with loadTranslations.js file and GT config')
|
|
37
36
|
.action(setupCommand);
|
|
38
37
|
program
|
|
39
38
|
.command('auto')
|
|
@@ -43,7 +42,7 @@ program
|
|
|
43
42
|
.option('-b, --batch-size <number>', 'File batch size')
|
|
44
43
|
.option('-t, --timeout <number>', 'Timeout for each file in a batch')
|
|
45
44
|
.option('-c, --concurrency <number>', 'Max number of concurrent agents')
|
|
46
|
-
.option('-m, --match-files <
|
|
45
|
+
.option('-m, --match-files <patterns...>', 'Space-separated list of glob patterns to match source files. Should be relative to root directory.')
|
|
47
46
|
.option('--package-manager <manager>', 'Package manager to use. (npm, pnpm, yarn_v1, yarn_v2, bun, deno)')
|
|
48
47
|
.option('--no-telemetry', 'Disable telemetry')
|
|
49
48
|
.option('--no-translate', 'Disable translation step')
|
|
@@ -58,7 +57,7 @@ program
|
|
|
58
57
|
.option('-b, --batch-size <number>', 'File batch size')
|
|
59
58
|
.option('-t, --timeout <number>', 'Timeout for each file in a batch')
|
|
60
59
|
.option('-c, --concurrency <number>', 'Max number of concurrent agents')
|
|
61
|
-
.option('-m, --match-files <
|
|
60
|
+
.option('-m, --match-files <patterns...>', 'Space-separated list of glob patterns to match source files. Should be relative to root directory.')
|
|
62
61
|
.option('--no-telemetry', 'Disable telemetry')
|
|
63
62
|
.option('--no-translate', 'Disable translation step')
|
|
64
63
|
.option('-f, --format-cmd <cmd>', 'Command to format modified files')
|
|
@@ -66,5 +65,4 @@ program
|
|
|
66
65
|
.action(i18nCommand);
|
|
67
66
|
main(program);
|
|
68
67
|
program.parse();
|
|
69
|
-
//# sourceMappingURL=cli.js.map
|
|
70
|
-
//# debugId=1bff4bd9-c351-539d-a8af-f167c50673b1
|
|
68
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sources":["cli.ts"],"
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"/","sources":["cli.ts"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;AAChC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AACtD,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAE3D,OAAO,gBAAgB,CAAC;AACxB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY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CAAC;AAEvB,IAAI,CAAC,OAAO,CAAC,CAAC;AAEd,OAAO,CAAC,KAAK,EAAE,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport dotenv from 'dotenv';\n\ndotenv.config({ path: '.env' });\ndotenv.config({ path: '.env.local', override: true });\ndotenv.config({ path: '.env.production', override: true });\n\nimport './telemetry.js';\nimport './utils/shutdown.js';\nimport { Command } from 'commander';\nimport { readFileSync } from 'node:fs';\nimport { fromPackageRoot } from './utils/getPaths.js';\nimport { autoSetupCommand, setupCommand } from './commands/setup.js';\nimport { i18nCommand } from './commands/i18n.js';\nimport { main } from 'gtx-cli/index';\n\nconst packageJson = JSON.parse(\n readFileSync(fromPackageRoot('package.json'), 'utf8')\n);\n\nconst program = new Command();\n\nprogram\n .name('locadex')\n .description('AI agent for internationalization')\n .version(packageJson.version);\n\nprogram\n .command('start')\n .description('Run Locadex on your project')\n .option('-v, --verbose', 'Verbose output')\n .option('-d, --debug', 'Debug output')\n .option('-b, --batch-size <number>', 'File batch size')\n .option('-t, --timeout <number>', 'Timeout for each file in a batch')\n .option('-c, --concurrency <number>', 'Max number of concurrent agents')\n .option(\n '-m, --match-files <patterns...>',\n 'Space-separated list of glob patterns to match source files. Should be relative to root directory.'\n )\n .option(\n '--package-manager <manager>',\n 'Package manager to use. (npm, pnpm, yarn_v1, yarn_v2, bun, deno)'\n )\n .option('-y, --bypass-prompts', 'Bypass interactive prompts')\n .option('--no-telemetry', 'Disable telemetry')\n .option('--no-translate', 'Disable translation step')\n .option('-f, --format-cmd <cmd>', 'Command to format modified files')\n .option('--app-dir <dir>', 'Relative path to the application directory', '.')\n .option(\n '--local-translations',\n 'Enable local translations with loadTranslations.js file and GT config'\n )\n .action(setupCommand);\n\nprogram\n .command('auto')\n .description('Run Locadex with auto-setup on your project')\n .option('-v, --verbose', 'Verbose output')\n .option('-d, --debug', 'Debug output')\n .option('-b, --batch-size <number>', 'File batch size')\n .option('-t, --timeout <number>', 'Timeout for each file in a batch')\n .option('-c, --concurrency <number>', 'Max number of concurrent agents')\n .option(\n '-m, --match-files <patterns...>',\n 'Space-separated list of glob patterns to match source files. Should be relative to root directory.'\n )\n .option(\n '--package-manager <manager>',\n 'Package manager to use. (npm, pnpm, yarn_v1, yarn_v2, bun, deno)'\n )\n .option('--no-telemetry', 'Disable telemetry')\n .option('--no-translate', 'Disable translation step')\n .option('-f, --format-cmd <cmd>', 'Command to format modified files')\n .option('--app-dir <dir>', 'Relative path to the application directory', '.')\n .action(autoSetupCommand);\n\nprogram\n .command('i18n')\n .description('Run Locadex i18n on your project')\n .option('-v, --verbose', 'Verbose output')\n .option('-d, --debug', 'Debug output')\n .option('-b, --batch-size <number>', 'File batch size')\n .option('-t, --timeout <number>', 'Timeout for each file in a batch')\n .option('-c, --concurrency <number>', 'Max number of concurrent agents')\n .option(\n '-m, --match-files <patterns...>',\n 'Space-separated list of glob patterns to match source files. Should be relative to root directory.'\n )\n .option('--no-telemetry', 'Disable telemetry')\n .option('--no-translate', 'Disable translation step')\n .option('-f, --format-cmd <cmd>', 'Command to format modified files')\n .option('--app-dir <dir>', 'Relative path to the application directory', '.')\n .action(i18nCommand);\n\nmain(program);\n\nprogram.parse();\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixErrors.d.ts","sourceRoot":"/","sources":["commands/fixErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQ7C,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"fixErrors.d.ts","sourceRoot":"/","sources":["commands/fixErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQ7C,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,iBAmC3E"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d6a0db9b-aeb1-5960-bd4f-45fd295ef67d")}catch(e){}}();
|
|
3
1
|
import { withTelemetry } from '../telemetry.js';
|
|
4
2
|
import { LocadexManager } from '../utils/locadexManager.js';
|
|
5
3
|
import { displayHeader } from '../logging/console.js';
|
|
@@ -22,9 +20,7 @@ export async function fixErrorsCommand(options, command) {
|
|
|
22
20
|
cliOptions: allOptions,
|
|
23
21
|
options: {
|
|
24
22
|
...(allOptions.matchingFiles && {
|
|
25
|
-
matchingFiles: allOptions.matchingFiles
|
|
26
|
-
.split(',')
|
|
27
|
-
.map((file) => file.trim()),
|
|
23
|
+
matchingFiles: allOptions.matchingFiles,
|
|
28
24
|
}),
|
|
29
25
|
...(allOptions.concurrency && {
|
|
30
26
|
maxConcurrency: Number(allOptions.concurrency),
|
|
@@ -40,5 +36,4 @@ export async function fixErrorsCommand(options, command) {
|
|
|
40
36
|
await fixErrorsTask();
|
|
41
37
|
});
|
|
42
38
|
}
|
|
43
|
-
//# sourceMappingURL=fixErrors.js.map
|
|
44
|
-
//# debugId=d6a0db9b-aeb1-5960-bd4f-45fd295ef67d
|
|
39
|
+
//# sourceMappingURL=fixErrors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixErrors.js","
|
|
1
|
+
{"version":3,"file":"fixErrors.js","sourceRoot":"/","sources":["commands/fixErrors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,a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AU,CAAC,SAAS,CAAC;iBACxC,CAAC;gBACF,GAAG,CAAC,UAAU,CAAC,OAAO,IAAI;oBACxB,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC;iBACpC,CAAC;aACH;SACF,CAAC,CAAC;QACH,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["import { Command } from 'commander';\nimport { CliOptions } from '../types/cli.js';\nimport { withTelemetry } from '../telemetry.js';\nimport { LocadexManager } from '../utils/locadexManager.js';\nimport { displayHeader } from '../logging/console.js';\nimport path from 'node:path';\nimport { validateConfig } from '../utils/config.js';\nimport { fixErrorsTask } from '../tasks/fixErrors.js';\n\nexport async function fixErrorsCommand(options: CliOptions, command: Command) {\n const parentOptions = command.parent?.opts() || {};\n const allOptions = { ...parentOptions, ...options };\n const telemetryEnabled = !allOptions.noTelemetry;\n withTelemetry(\n { enabled: telemetryEnabled, options: allOptions },\n async () => {\n await validateConfig(allOptions);\n\n displayHeader(telemetryEnabled);\n LocadexManager.initialize({\n rootDirectory: process.cwd(),\n appDirectory: path.resolve(process.cwd(), allOptions.appDir),\n mcpTransport: 'stdio',\n apiKey: process.env.ANTHROPIC_API_KEY || '',\n metadata: {},\n cliOptions: allOptions,\n options: {\n ...(allOptions.matchingFiles && {\n matchingFiles: allOptions.matchingFiles,\n }),\n ...(allOptions.concurrency && {\n maxConcurrency: Number(allOptions.concurrency),\n }),\n ...(allOptions.batchSize && {\n batchSize: Number(allOptions.batchSize),\n }),\n ...(allOptions.timeout && {\n timeout: Number(allOptions.timeout),\n }),\n },\n });\n await fixErrorsTask();\n }\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"/","sources":["commands/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAO7C,wBAAsB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"/","sources":["commands/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAO7C,wBAAsB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,iBAmCtE"}
|
package/dist/commands/i18n.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d714a128-e108-586c-906f-4efb76e0eafe")}catch(e){}}();
|
|
3
1
|
import { i18nTask } from '../tasks/i18n.js';
|
|
4
2
|
import { withTelemetry } from '../telemetry.js';
|
|
5
3
|
import { LocadexManager } from '../utils/locadexManager.js';
|
|
@@ -22,9 +20,7 @@ export async function i18nCommand(options, command) {
|
|
|
22
20
|
cliOptions: allOptions,
|
|
23
21
|
options: {
|
|
24
22
|
...(allOptions.matchingFiles && {
|
|
25
|
-
matchingFiles: allOptions.matchingFiles
|
|
26
|
-
.split(',')
|
|
27
|
-
.map((file) => file.trim()),
|
|
23
|
+
matchingFiles: allOptions.matchingFiles,
|
|
28
24
|
}),
|
|
29
25
|
...(allOptions.concurrency && {
|
|
30
26
|
maxConcurrency: Number(allOptions.concurrency),
|
|
@@ -40,5 +36,4 @@ export async function i18nCommand(options, command) {
|
|
|
40
36
|
await i18nTask(allOptions);
|
|
41
37
|
});
|
|
42
38
|
}
|
|
43
|
-
//# sourceMappingURL=i18n.js.map
|
|
44
|
-
//# debugId=d714a128-e108-586c-906f-4efb76e0eafe
|
|
39
|
+
//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AC,UAAU,CAAC,aAAa,IAAI;oBAC9B,aAAa,EAAE,UAAU,CAAC,aAAa;iBACxC,CAAC;gBACF,GAAG,CAAC,UAAU,CAAC,WAAW,IAAI;oBAC5B,cAAc,EAAE,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;iBAC/C,CAAC;gBACF,GAAG,CAAC,UAAU,CAAC,SAAS,IAAI;oBAC1B,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC;iBACxC,CAAC;gBACF,GAAG,CAAC,UAAU,CAAC,OAAO,IAAI;oBACxB,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC;iBACpC,CAAC;aACH;SACF,CAAC,CAAC;QACH,MAAM,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["import { Command } from 'commander';\nimport { i18nTask } from '../tasks/i18n.js';\nimport { CliOptions } from '../types/cli.js';\nimport { withTelemetry } from '../telemetry.js';\nimport { LocadexManager } from '../utils/locadexManager.js';\nimport { displayHeader } from '../logging/console.js';\nimport path from 'node:path';\nimport { validateConfig } from '../utils/config.js';\n\nexport async function i18nCommand(options: CliOptions, command: Command) {\n const parentOptions = command.parent?.opts() || {};\n const allOptions = { ...parentOptions, ...options };\n const telemetryEnabled = !allOptions.noTelemetry;\n withTelemetry(\n { enabled: telemetryEnabled, options: allOptions },\n async () => {\n await validateConfig(allOptions);\n\n displayHeader(telemetryEnabled);\n LocadexManager.initialize({\n rootDirectory: process.cwd(),\n appDirectory: path.resolve(process.cwd(), allOptions.appDir),\n mcpTransport: 'stdio',\n apiKey: process.env.ANTHROPIC_API_KEY || '',\n metadata: {},\n cliOptions: allOptions,\n options: {\n ...(allOptions.matchingFiles && {\n matchingFiles: allOptions.matchingFiles,\n }),\n ...(allOptions.concurrency && {\n maxConcurrency: Number(allOptions.concurrency),\n }),\n ...(allOptions.batchSize && {\n batchSize: Number(allOptions.batchSize),\n }),\n ...(allOptions.timeout && {\n timeout: Number(allOptions.timeout),\n }),\n },\n });\n await i18nTask(allOptions);\n }\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"/","sources":["commands/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAO7C,wBAAsB,YAAY,CAChC,OAAO,EAAE,UAAU,GAAG;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,EACD,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"/","sources":["commands/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAO7C,wBAAsB,YAAY,CAChC,OAAO,EAAE,UAAU,GAAG;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,EACD,OAAO,EAAE,OAAO,iBAyCjB;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,UAAU,GAAG;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,EACD,OAAO,EAAE,OAAO,iBAyCjB"}
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ed9f70b4-d985-572c-a2d0-be175bfc18ad")}catch(e){}}();
|
|
3
1
|
import { setupTask } from '../tasks/setup.js';
|
|
4
2
|
import { withTelemetry } from '../telemetry.js';
|
|
5
3
|
import { LocadexManager } from '../utils/locadexManager.js';
|
|
@@ -22,9 +20,7 @@ export async function setupCommand(options, command) {
|
|
|
22
20
|
cliOptions: allOptions,
|
|
23
21
|
options: {
|
|
24
22
|
...(allOptions.matchingFiles && {
|
|
25
|
-
matchingFiles: allOptions.matchingFiles
|
|
26
|
-
.split(',')
|
|
27
|
-
.map((file) => file.trim()),
|
|
23
|
+
matchingFiles: allOptions.matchingFiles,
|
|
28
24
|
}),
|
|
29
25
|
...(allOptions.concurrency && {
|
|
30
26
|
maxConcurrency: Number(allOptions.concurrency),
|
|
@@ -56,9 +52,7 @@ export async function autoSetupCommand(options, command) {
|
|
|
56
52
|
cliOptions: allOptions,
|
|
57
53
|
options: {
|
|
58
54
|
...(allOptions.matchingFiles && {
|
|
59
|
-
matchingFiles: allOptions.matchingFiles
|
|
60
|
-
.split(',')
|
|
61
|
-
.map((file) => file.trim()),
|
|
55
|
+
matchingFiles: allOptions.matchingFiles,
|
|
62
56
|
}),
|
|
63
57
|
...(allOptions.concurrency && {
|
|
64
58
|
maxConcurrency: Number(allOptions.concurrency),
|
|
@@ -74,5 +68,4 @@ export async function autoSetupCommand(options, command) {
|
|
|
74
68
|
await setupTask(allOptions, true, !!allOptions.bypassPrompts, allOptions.packageManager);
|
|
75
69
|
});
|
|
76
70
|
}
|
|
77
|
-
//# sourceMappingURL=setup.js.map
|
|
78
|
-
//# debugId=ed9f70b4-d985-572c-a2d0-be175bfc18ad
|
|
71
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"/","sources":["commands/setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,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AE,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;iBAC/C,CAAC;gBACF,GAAG,CAAC,UAAU,CAAC,SAAS,IAAI;oBAC1B,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC;iBACxC,CAAC;gBACF,GAAG,CAAC,UAAU,CAAC,OAAO,IAAI;oBACxB,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC;iBACpC,CAAC;aACH;SACF,CAAC,CAAC;QACH,MAAM,SAAS,CACb,UAAU,EACV,IAAI,EACJ,CAAC,CAAC,UAAU,CAAC,aAAa,EAC1B,UAAU,CAAC,cAAc,CAC1B,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["import { Command } from 'commander';\nimport { setupTask } from '../tasks/setup.js';\nimport { CliOptions } from '../types/cli.js';\nimport { withTelemetry } from '../telemetry.js';\nimport { LocadexManager } from '../utils/locadexManager.js';\nimport { displayHeader } from '../logging/console.js';\nimport path from 'node:path';\nimport { validateConfig } from '../utils/config.js';\n\nexport async function setupCommand(\n options: CliOptions & {\n packageManager?: string;\n bypassPrompts?: boolean;\n },\n command: Command\n) {\n const parentOptions = command.parent?.opts() || {};\n const allOptions = { ...parentOptions, ...options };\n const telemetryEnabled = !allOptions.noTelemetry;\n withTelemetry(\n { enabled: telemetryEnabled, options: allOptions },\n async () => {\n await validateConfig(allOptions);\n\n displayHeader(telemetryEnabled);\n LocadexManager.initialize({\n rootDirectory: process.cwd(),\n appDirectory: path.resolve(process.cwd(), allOptions.appDir),\n mcpTransport: 'stdio',\n apiKey: process.env.ANTHROPIC_API_KEY || '',\n metadata: {},\n cliOptions: allOptions,\n options: {\n ...(allOptions.matchingFiles && {\n matchingFiles: allOptions.matchingFiles,\n }),\n ...(allOptions.concurrency && {\n maxConcurrency: Number(allOptions.concurrency),\n }),\n ...(allOptions.batchSize && {\n batchSize: Number(allOptions.batchSize),\n }),\n ...(allOptions.timeout && {\n timeout: Number(allOptions.timeout),\n }),\n },\n });\n await setupTask(\n allOptions,\n false,\n !!allOptions.bypassPrompts,\n allOptions.packageManager\n );\n }\n );\n}\n\nexport async function autoSetupCommand(\n options: CliOptions & {\n packageManager?: string;\n bypassPrompts?: boolean;\n },\n command: Command\n) {\n const parentOptions = command.parent?.opts() || {};\n const allOptions = { ...parentOptions, ...options };\n const telemetryEnabled = !allOptions.noTelemetry;\n withTelemetry(\n { enabled: telemetryEnabled, options: allOptions },\n async () => {\n await validateConfig(allOptions);\n\n displayHeader(telemetryEnabled);\n LocadexManager.initialize({\n rootDirectory: process.cwd(),\n appDirectory: path.resolve(process.cwd(), allOptions.appDir),\n mcpTransport: 'stdio',\n apiKey: process.env.ANTHROPIC_API_KEY || '',\n metadata: {},\n cliOptions: allOptions,\n options: {\n ...(allOptions.matchingFiles && {\n matchingFiles: allOptions.matchingFiles,\n }),\n ...(allOptions.concurrency && {\n maxConcurrency: Number(allOptions.concurrency),\n }),\n ...(allOptions.batchSize && {\n batchSize: Number(allOptions.batchSize),\n }),\n ...(allOptions.timeout && {\n timeout: Number(allOptions.timeout),\n }),\n },\n });\n await setupTask(\n allOptions,\n true,\n !!allOptions.bypassPrompts,\n allOptions.packageManager\n );\n }\n );\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2018e1ad-65d3-5c7a-aa89-fdda8e4aebd8")}catch(e){}}();
|
|
3
1
|
export {};
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
5
|
-
//# debugId=2018e1ad-65d3-5c7a-aa89-fdda8e4aebd8
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/dist/logging/console.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="534f6873-f4bf-5059-b72a-ed5ebf6e629f")}catch(e){}}();
|
|
3
1
|
import { log, spinner, intro, outro, text, select, confirm, isCancel, cancel, multiselect, taskLog, progress, } from '@clack/prompts';
|
|
4
2
|
import chalk from 'chalk';
|
|
5
3
|
import { getLocadexVersion } from '../utils/getPaths.js';
|
|
@@ -134,5 +132,4 @@ export async function promptConfirm({ message, defaultValue = true, cancelMessag
|
|
|
134
132
|
export function createTaskLogger(message) {
|
|
135
133
|
return taskLog({ title: message });
|
|
136
134
|
}
|
|
137
|
-
//# sourceMappingURL=console.js.map
|
|
138
|
-
//# debugId=534f6873-f4bf-5059-b72a-ed5ebf6e629f
|
|
135
|
+
//# sourceMappingURL=console.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.js","sources":["logging/console.ts"],"
|
|
1
|
+
{"version":3,"file":"console.js","sourceRoot":"/","sources":["logging/console.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,OAAO,EACP,KAAK,EACL,KAAK,EACL,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,MAAM,EACN,WAAW,EACX,OAAO,EACP,QAAQ,GACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,0BAA0B;AAC1B,M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C,CAAC;QAC9B,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC;IAED,OAAO,MAAkB,CAAC;AAC5B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,EAClC,OAAO,EACP,YAAY,GAAG,IAAI,EACnB,aAAa,GAAG,qBAAqB,GAKtC;IACC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;QAC3B,OAAO;QACP,YAAY,EAAE,YAAY;KAC3B,CAAC,CAAC;IAEH,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,MAAM,CAAC,aAAa,CAAC,CAAC;QACtB,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import {\n log,\n spinner,\n intro,\n outro,\n text,\n select,\n confirm,\n isCancel,\n cancel,\n multiselect,\n taskLog,\n progress,\n} from '@clack/prompts';\nimport chalk from 'chalk';\nimport { getLocadexVersion } from '../utils/getPaths.js';\nimport { exit } from '../utils/shutdown.js';\n\n// Basic logging functions\nexport function logInfo(message: string) {\n log.info(message);\n}\nexport function logWarning(message: string) {\n log.warn(message);\n}\nexport function logError(message: string) {\n log.error(message);\n}\nexport function logSuccess(message: string) {\n log.success(message);\n}\nexport function logStep(message: string) {\n log.step(message);\n}\nexport function logMessage(message: string) {\n log.message(message, { symbol: chalk.cyan('~') });\n}\n\nexport async function logErrorAndExit(message: string) {\n log.error(message);\n await exit(1);\n}\n\n// Clack prompts\nexport function startCommand(message: string) {\n intro(chalk.cyan(message));\n}\nexport function endCommand(message: string) {\n outro(chalk.cyan(message));\n}\n\n// GT specific logging\nexport function displayHeader(telemetryEnabled: boolean) {\n displayAsciiTitle();\n displayInitializingText(telemetryEnabled);\n startCommand(chalk.cyan(`Locadex v${getLocadexVersion()}`));\n}\n\nfunction displayAsciiTitle() {\n // eslint-disable-next-line no-console\n console.log(\n chalk.cyan(\n `\\n ,ad8888ba, 888888888888 \n d8\"' \\`\"8b 88 \nd8' 88 \n88 88 \n88 88888 88 \nY8, 88 88 \n Y8a. .a88 88 \n \\`\"Y88888P\" 88 `\n )\n );\n}\n\nfunction displayInitializingText(telemetryEnabled: boolean) {\n // eslint-disable-next-line no-console\n console.log(\n `\\n${chalk.bold.blue('General Translation, Inc.')}\n${chalk.dim('https://generaltranslation.com/docs')}\n${telemetryEnabled ? chalk.dim('\\nLocadex is configured to collect anonymous telemetry data. You can opt out by running with the --no-telemetry flag.\\n') : ''}\nLocadex is in open beta and may make mistakes. Please report any bugs or issues to https://github.com/generaltranslation/gt/issues.\n`\n );\n}\n\n// Spinner functionality\nexport function createSpinner(indicator: 'dots' | 'timer' = 'timer') {\n return spinner({ indicator });\n}\n\nexport function createProgressBar(total: number) {\n return progress({ max: total });\n}\n\n// Input prompts\nexport async function promptText({\n message,\n defaultValue,\n validate,\n}: {\n message: string;\n defaultValue?: string;\n validate?: (value: string) => boolean | string;\n}) {\n const result = await text({\n message,\n placeholder: defaultValue,\n validate: validate\n ? (value) => {\n const validation = validate(value || '');\n return validation === true ? undefined : validation.toString();\n }\n : undefined,\n });\n\n if (isCancel(result)) {\n cancel('Operation cancelled');\n await exit(0);\n }\n\n return result;\n}\n\nexport async function promptSelect<T>({\n message,\n options,\n defaultValue,\n}: {\n message: string;\n options: Array<{ value: T; label: string; hint?: string }>;\n defaultValue?: T;\n}) {\n // Convert options to the format expected by clack\n const clackOptions = options.map((opt) => ({\n value: opt.value,\n label: opt.label,\n hint: opt.hint,\n }));\n\n const result = await select({\n message,\n options: clackOptions as any,\n initialValue: defaultValue,\n });\n\n if (isCancel(result)) {\n cancel('Operation cancelled');\n await exit(0);\n }\n\n return result as T;\n}\n\nexport async function promptMultiSelect<T extends string>({\n message,\n options,\n required = true,\n}: {\n message: string;\n options: Array<{ value: T; label: string; hint?: string }>;\n required?: boolean;\n}) {\n // Convert options to the format expected by clack\n const clackOptions = options.map((opt) => ({\n value: opt.value,\n label: opt.label,\n hint: opt.hint,\n }));\n\n const result = await multiselect({\n message,\n options: clackOptions as any,\n required,\n });\n\n if (isCancel(result)) {\n cancel('Operation cancelled');\n await exit(0);\n }\n\n return result as Array<T>;\n}\n\nexport async function promptConfirm({\n message,\n defaultValue = true,\n cancelMessage = 'Operation cancelled',\n}: {\n message: string;\n defaultValue?: boolean;\n cancelMessage?: string;\n}) {\n const result = await confirm({\n message,\n initialValue: defaultValue,\n });\n\n if (isCancel(result)) {\n cancel(cancelMessage);\n await exit(0);\n }\n\n return result;\n}\n\nexport function createTaskLogger(message: string) {\n return taskLog({ title: message });\n}\n"]}
|
package/dist/logging/logger.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b168e9ef-273d-54c6-b5db-2949020e6d61")}catch(e){}}();
|
|
3
1
|
import { logInfo, logWarning, logError, logSuccess, logStep, logMessage, logErrorAndExit, createProgressBar, createSpinner, } from './console.js';
|
|
4
2
|
import { appendFileSync } from 'node:fs';
|
|
5
3
|
class ProgressBar {
|
|
@@ -164,5 +162,4 @@ class Logger {
|
|
|
164
162
|
}
|
|
165
163
|
}
|
|
166
164
|
export const logger = Logger.getInstance();
|
|
167
|
-
//# sourceMappingURL=logger.js.map
|
|
168
|
-
//# debugId=b168e9ef-273d-54c6-b5db-2949020e6d61
|
|
165
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sources":["logging/logger.ts"],"
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"/","sources":["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,CAAC;QACzD,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC","sourcesContent":["import { ProgressResult, SpinnerResult } from '@clack/prompts';\nimport {\n logInfo,\n logWarning,\n logError,\n logSuccess,\n logStep,\n logMessage,\n logErrorAndExit,\n createProgressBar,\n createSpinner,\n} from './console.js';\nimport { appendFileSync } from 'node:fs';\n\nclass ProgressBar {\n private progressBar: ProgressResult | undefined;\n constructor() {}\n\n init(total: number): void {\n if (!this.progressBar) {\n this.progressBar = createProgressBar(total);\n }\n }\n\n start(message?: string): void {\n if (this.progressBar) {\n this.progressBar.start(message);\n }\n }\n\n advance(amount: number, message?: string): void {\n if (this.progressBar) {\n this.progressBar.advance(amount, message);\n }\n }\n\n stop(message?: string): void {\n if (this.progressBar) {\n try {\n this.progressBar.stop(message);\n this.progressBar = undefined;\n } catch (error) {\n this.progressBar = undefined;\n }\n }\n }\n}\n\nclass Spinner {\n private spinner: SpinnerResult | undefined;\n constructor() {}\n\n init(): void {\n if (!this.spinner) {\n this.spinner = createSpinner();\n }\n }\n\n start(message?: string): void {\n if (this.spinner) {\n this.spinner.start(message);\n }\n }\n\n update(message?: string): void {\n if (this.spinner) {\n this.spinner.message(message);\n }\n }\n\n stop(message?: string): void {\n if (this.spinner) {\n try {\n this.spinner.stop(message);\n this.spinner = undefined;\n } catch (error) {\n this.spinner = undefined;\n }\n }\n }\n}\n\nclass Logger {\n private static instance: Logger;\n private _verbose: boolean = false;\n private _debug: boolean = false;\n private logFile: string | undefined;\n progressBar: ProgressBar = new ProgressBar();\n spinner: Spinner = new Spinner();\n private constructor() {}\n\n static getInstance(): Logger {\n if (!Logger.instance) {\n Logger.instance = new Logger();\n }\n return Logger.instance;\n }\n\n initialize(\n options: { verbose?: boolean; debug?: boolean },\n logFile?: string\n ): void {\n if (options.debug) {\n this._debug = true;\n this._verbose = true;\n }\n if (options.verbose) {\n this._verbose = true;\n }\n if (logFile) {\n this.logFile = logFile;\n }\n }\n\n get verbose(): boolean {\n return this._verbose;\n }\n\n get debug(): boolean {\n return this._debug;\n }\n\n reset(): void {\n this._verbose = false;\n this._debug = false;\n }\n\n // Basic logging methods using existing console functions\n info(message: string): void {\n this.log(message);\n logInfo(message);\n }\n\n warning(message: string): void {\n this.log(message);\n logWarning(message);\n }\n\n error(message: string): void {\n this.log(message);\n logError(message);\n }\n\n success(message: string): void {\n this.log(message);\n logSuccess(message);\n }\n\n step(message: string): void {\n this.log(message);\n logStep(message);\n }\n\n message(message: string): void {\n this.log(message);\n logMessage(message);\n }\n\n async errorAndExit(message: string) {\n this.log(message);\n await logErrorAndExit(message);\n }\n\n // Conditional logging methods\n verboseMessage(message: string): void {\n this.log(message);\n if (this._verbose) {\n logMessage(message);\n }\n }\n\n debugMessage(message: string): void {\n this.log(message);\n if (this._debug) {\n logMessage(message);\n }\n }\n\n log(message: string): void {\n if (this.logFile) {\n const timestamp = new Date().toISOString();\n appendFileSync(this.logFile, `[${timestamp}] ${message}\\n`);\n }\n }\n\n initializeProgressBar(total: number): void {\n if (!this._verbose && !this._debug) {\n this.progressBar.init(total);\n }\n if (this.logFile) {\n appendFileSync(\n this.logFile,\n `Initializing progress bar with total: ${total}\\n`\n );\n }\n }\n initializeSpinner(): void {\n if (!this._verbose && !this._debug) {\n this.spinner.init();\n }\n if (this.logFile) {\n appendFileSync(this.logFile, `Initializing spinner\\n`);\n }\n }\n}\n\nexport const logger = Logger.getInstance();\n"]}
|
package/dist/mcp/getDocs.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ef6f15a9-182f-5863-911a-bbbe0faedbc4")}catch(e){}}();
|
|
3
1
|
export const GITHUB_URL = 'https://raw.githubusercontent.com/generaltranslation/gt/refs/heads/main/apps/docs/content/docs/en';
|
|
4
2
|
export const DOCS_URL = 'https://docs.generaltranslation.app';
|
|
5
3
|
export const getDocs = async (path) => {
|
|
@@ -51,5 +49,4 @@ export async function fetchDocContent(path) {
|
|
|
51
49
|
throw error;
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
|
-
//# sourceMappingURL=getDocs.js.map
|
|
55
|
-
//# debugId=ef6f15a9-182f-5863-911a-bbbe0faedbc4
|
|
52
|
+
//# sourceMappingURL=getDocs.js.map
|
package/dist/mcp/getDocs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDocs.js","sources":["mcp/getDocs.ts"],"
|
|
1
|
+
{"version":3,"file":"getDocs.js","sourceRoot":"/","sources":["mcp/getDocs.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GACrB,mGAAmG,CAAC;AAEtG,MAAM,CAAC,MAAM,QAAQ,GAAG,qCAAqC,CAAC;AAE9D,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE;IAC5C,MAAM,GAAG,GAAG,GAAG,UAAU,IAAI,IAAI,EAAE,CAAC;IAEpC,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,kBAAkB,IAAI,GAAG,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAQF,iCAAiC;AACjC,MAAM,KAAK,GAA+B,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,4BAA4B;AAEpE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,eA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/refs/heads/main/apps/docs/content/docs/en';\n\nexport const DOCS_URL = 'https://docs.generaltranslation.app';\n\nexport const getDocs = async (path: string) => {\n const url = `${GITHUB_URL}/${path}`;\n\n try {\n const response = await fetch(url);\n return response.text();\n } catch (error) {\n console.error(`Error fetching ${path}:`, error);\n return null;\n }\n};\n\n// Cache for storing fetched docs with expiration\ninterface CacheEntry {\n content: string;\n timestamp: number;\n}\n\n// Cache with 5-minute expiration\nconst cache: Record<string, CacheEntry> = {};\nexport const CACHE_TTL = 5 * 60 * 1000; // 5 minutes in milliseconds\n\n/**\n * Fetches content from the docs URL with caching\n * Refreshes cache every 5 minutes\n */\nexport async function fetchDocContent(path: string): Promise<string> {\n const now = Date.now();\n\n // Check if we have a valid cached entry\n if (cache[path] && now - cache[path].timestamp < CACHE_TTL) {\n return cache[path].content;\n }\n\n const url = `${DOCS_URL}/${path}`;\n console.error(`Fetching document from: ${url}`);\n\n try {\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(\n `Failed to fetch ${path}: ${response.status} ${response.statusText}`\n );\n }\n\n const content = await response.text();\n\n // Update cache\n cache[path] = {\n content,\n timestamp: now,\n };\n\n return content;\n } catch (error) {\n console.error(`Error fetching ${path}:`, error);\n\n // Return cached content if available, even if expired\n if (cache[path]) {\n console.error(`Returning stale cached content for ${path}`);\n return cache[path].content;\n }\n\n throw error;\n }\n}\n"]}
|
package/dist/mcp/getGuide.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="334ec386-5249-5eeb-b13f-b2e6ce046b60")}catch(e){}}();
|
|
3
1
|
import { readFile } from 'node:fs/promises';
|
|
4
2
|
import { fromPackageRoot } from '../utils/getPaths.js';
|
|
5
3
|
import { logger } from '../logging/logger.js';
|
|
@@ -14,5 +12,4 @@ export default async function getGuide(path) {
|
|
|
14
12
|
return { error: error instanceof Error ? error.message : String(error) };
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
|
-
//# sourceMappingURL=getGuide.js.map
|
|
18
|
-
//# debugId=334ec386-5249-5eeb-b13f-b2e6ce046b60
|
|
15
|
+
//# sourceMappingURL=getGuide.js.map
|
package/dist/mcp/getGuide.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGuide.js","
|
|
1
|
+
{"version":3,"file":"getGuide.js","sourceRoot":"/","sources":["mcp/getGuide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,QAAQ,CACpC,IAAY;IAEZ,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAClD,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,GAAG,CAAC,uBAAuB,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC;QACpD,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAC3E,CAAC;AACH,CAAC","sourcesContent":["import { readFile } from 'node:fs/promises';\nimport { fromPackageRoot } from '../utils/getPaths.js';\nimport { logger } from '../logging/logger.js';\n\nexport default async function getGuide(\n path: string\n): Promise<{ content?: string; error?: string }> {\n try {\n const filePath = fromPackageRoot(path);\n const content = await readFile(filePath, 'utf-8');\n return { content };\n } catch (error) {\n logger.log(`Error reading guide ${path}: ${error}`);\n return { error: error instanceof Error ? error.message : String(error) };\n }\n}\n"]}
|
package/dist/mcp/getPort.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="31c29238-9e18-5aff-9956-b289204c95f6")}catch(e){}}();
|
|
3
1
|
import { createServer } from 'node:http';
|
|
4
2
|
export async function findAvailablePort(startPort) {
|
|
5
3
|
return new Promise((resolve, reject) => {
|
|
@@ -21,5 +19,4 @@ export async function findAvailablePort(startPort) {
|
|
|
21
19
|
});
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
|
-
//# sourceMappingURL=getPort.js.map
|
|
25
|
-
//# debugId=31c29238-9e18-5aff-9956-b289204c95f6
|
|
22
|
+
//# sourceMappingURL=getPort.js.map
|
package/dist/mcp/getPort.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPort.js","
|
|
1
|
+
{"version":3,"file":"getPort.js","sourceRoot":"/","sources":["mcp/getPort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,SAAiB;IACvD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;QAE9B,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE;YAC5B,MAAM,IAAI,GAAI,MAAM,CAAC,OAAO,EAAU,EAAE,IAAI,CAAC;YAC7C,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAQ,EAAE,EAAE;YAC9B,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBAC9B,mCAAmC;gBACnC,iBAAiB,CAAC,SAAS,GAAG,CAAC,CAAC;qBAC7B,IAAI,CAAC,OAAO,CAAC;qBACb,KAAK,CAAC,MAAM,CAAC,CAAC;YACnB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,CAAC,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { createServer } from 'node:http';\n\nexport async function findAvailablePort(startPort: number): Promise<number> {\n return new Promise((resolve, reject) => {\n const server = createServer();\n\n server.listen(startPort, () => {\n const port = (server.address() as any)?.port;\n server.close(() => resolve(port));\n });\n\n server.on('error', (err: any) => {\n if (err.code === 'EADDRINUSE') {\n // Port is in use, try the next one\n findAvailablePort(startPort + 1)\n .then(resolve)\n .catch(reject);\n } else {\n reject(err);\n }\n });\n });\n}\n"]}
|
package/dist/mcp/tools/docs.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="596bdbfc-3d82-5b86-85a5-9eb94bc8e24d")}catch(e){}}();
|
|
3
1
|
import { z } from 'zod';
|
|
4
2
|
import { fetchDocContent, getDocs } from '../getDocs.js';
|
|
5
3
|
import { logger } from '../../logging/logger.js';
|
|
@@ -89,5 +87,4 @@ export function addDocsTools(server) {
|
|
|
89
87
|
}
|
|
90
88
|
});
|
|
91
89
|
}
|
|
92
|
-
//# sourceMappingURL=docs.js.map
|
|
93
|
-
//# debugId=596bdbfc-3d82-5b86-85a5-9eb94bc8e24d
|
|
90
|
+
//# sourceMappingURL=docs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.js","sources":["mcp/tools/docs.ts"],"
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"/","sources":["mcp/tools/docs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,MAAM,SAAS,GAA6B;IACjD,YAAY,EACV,mEAAmE;IACrE,WAAW,EACT,wIAAwI;CAC3I,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,MAAiB;IAC5C,MAAM,CAAC,IAAI,CACT,YAAY,EACZ,SAAS,CAAC,YAAY,CAAC,EACvB;QACE,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,CACP,6FAA6F,CAC9F;KACJ,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACjB,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;YAEpC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,CAAC,GAAG,CAAC,iDAAiD,IAAI,EAAE,CAAC,CAAC;gBACpE,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,2CAA2C,IAAI,EAAE;yBACxD;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,MAAM,CAAC,GAAG,CACR,4DAA4D,IAAI,EAAE,CACnE,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,OAAO;qBACd;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E,CAClH,CAAC;YACF,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,gCAAgC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBAC/F;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\nimport { fetchDocContent, getDocs } from '../getDocs.js';\nimport { logger } from '../../logging/logger.js';\n\nexport const docsTools: { [id: string]: string } = {\n 'fetch-docs':\n 'Fetches the content of a specific documentation file by its path.',\n 'list-docs':\n 'Lists available documentation files in the format of an llms.txt file. This is a list of all the documentation files available to you.',\n};\n\nexport function addDocsTools(server: McpServer) {\n server.tool(\n 'fetch-docs',\n docsTools['fetch-docs'],\n {\n path: z\n .string()\n .describe(\n 'The path to the documentation file (e.g., \"platform/index.mdx\" or \"react/introduction.mdx\")'\n ),\n },\n async ({ path }) => {\n try {\n const content = await getDocs(path);\n\n if (!content) {\n logger.log(`[locadex-mcp: fetch-docs] Document not found: ${path}`);\n return {\n content: [\n {\n type: 'text',\n text: `Failed to fetch documentation for path: ${path}`,\n },\n ],\n isError: true,\n };\n }\n logger.log(\n `[locadex-mcp: fetch-docs] Document fetched successfully: ${path}`\n );\n\n return {\n content: [\n {\n type: 'text',\n text: content,\n },\n ],\n };\n } catch (error) {\n logger.log(\n `[locadex-mcp: fetch-docs] Error fetching documentation: ${error instanceof Error ? error.message : String(error)}`\n );\n return {\n content: [\n {\n type: 'text',\n text: `Error fetching documentation: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true,\n };\n }\n }\n );\n\n server.tool('list-docs', docsTools['list-docs'], {}, async () => {\n try {\n const content = await fetchDocContent('llms.txt');\n\n if (!content) {\n logger.log(\n `[locadex-mcp: list-docs] Failed to fetch documentation index`\n );\n return {\n content: [\n {\n type: 'text',\n text: `Failed to fetch documentation index`,\n },\n ],\n isError: true,\n };\n }\n\n logger.log(\n `[locadex-mcp: list-docs] Documentation index fetched successfully`\n );\n\n return {\n content: [\n {\n type: 'text',\n text: content,\n },\n ],\n };\n } catch (error) {\n logger.log(\n `[locadex-mcp: list-docs] Error listing documentation: ${error instanceof Error ? error.message : String(error)}`\n );\n return {\n content: [\n {\n type: 'text',\n text: `Error listing documentation: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true,\n };\n }\n });\n}\n"]}
|
package/dist/mcp/tools/guides.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e6aaf2bb-c78f-594b-bf73-d58ce4012f6a")}catch(e){}}();
|
|
3
1
|
import getGuide from '../getGuide.js';
|
|
4
2
|
import { logger } from '../../logging/logger.js';
|
|
5
3
|
export const guides = [
|
|
@@ -87,5 +85,4 @@ export function addGuidesTools(server) {
|
|
|
87
85
|
});
|
|
88
86
|
});
|
|
89
87
|
}
|
|
90
|
-
//# sourceMappingURL=guides.js.map
|
|
91
|
-
//# debugId=e6aaf2bb-c78f-594b-bf73-d58ce4012f6a
|
|
88
|
+
//# sourceMappingURL=guides.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guides.js","sources":["mcp/tools/guides.ts"],"
|
|
1
|
+
{"version":3,"file":"guides.js","sourceRoot":"/","sources":["mcp/tools/guides.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AASjD,MAAM,CAAC,MAAM,MAAM,G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YACtD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;YAChD,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,CAAC,GAAG,CACR,iBAAiB,KAAK,CAAC,EAAE,2BAA2B,KAAK,CAAC,EAAE,YAAY,IAAI,EAAE,CAC/E,CAAC;gBACF,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,yBAAyB,KAAK,EAAE;yBACvC;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,MAAM,CAAC,GAAG,CAAC,iBAAiB,KAAK,CAAC,EAAE,sBAAsB,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;YACtE,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,OAAO,IAAI,EAAE;qBACpB;iBACF;aACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport getGuide from '../getGuide.js';\nimport { logger } from '../../logging/logger.js';\n\ntype Guide = {\n id: string;\n description: string;\n path: string;\n type: 'important' | 'basic' | 'advanced';\n};\n\nexport const guides: Guide[] = [\n {\n id: 'next_important_functions',\n description:\n 'Important documentation outlining the imports available in `gt-next`.',\n path: 'guides/next/important/functions.md',\n type: 'important',\n },\n {\n id: 'next_basic_jsx',\n description:\n 'Call this tool when you see content in JSX or HTML that needs to be internationalized.',\n path: 'guides/next/basic/jsx.md',\n type: 'basic',\n },\n {\n id: 'next_basic_strings',\n description: `Call this tool when you see a string created by '', \"\", or \\`\\` that needs to be internationalized.`,\n path: 'guides/next/basic/strings.md',\n type: 'basic',\n },\n {\n id: 'next_basic_branches',\n description:\n 'Call this tool when you see a conditional statement or a pluralization statement that needs to be internationalized.',\n path: 'guides/next/basic/branches.md',\n type: 'basic',\n },\n {\n id: 'next_basic_variables',\n description:\n 'Call this tool when you see variable content (Currency, DateTime, Numbers, and other dynamic content) that needs to be internationalized.',\n path: 'guides/next/basic/variables.md',\n type: 'basic',\n },\n {\n id: 'next_advanced_interpolated-strings',\n description:\n 'Call this tool when you see a string with variables within/around it or interpolated string (template string literal with quasis) that needs to be internationalized.',\n path: 'guides/next/advanced/interpolated-strings.md',\n type: 'advanced',\n },\n {\n id: 'next_advanced_conditional-rendering',\n description:\n 'Call this tool when you see a conditional statement or a pluralization statement that needs to be internationalized.',\n path: 'guides/next/advanced/conditional-rendering.md',\n type: 'advanced',\n },\n {\n id: 'next_advanced_external-strings',\n description:\n 'Call this tool when you see a variable, constant, or function containing strings outside of a component scope that needs to be internationalized.',\n path: 'guides/next/advanced/external-strings.md',\n type: 'advanced',\n },\n {\n id: 'next_advanced_mapping-expressions',\n description:\n 'Call this tool when you see a mapping expression for a nested data structure that contains content that needs to be internationalized.',\n path: 'guides/next/advanced/mapping-expressions.md',\n type: 'advanced',\n },\n];\n\nexport function addGuidesTools(server: McpServer) {\n guides.forEach((guide) => {\n server.tool(guide.id, guide.description, {}, async () => {\n const path = guide.path;\n const { content, error } = await getGuide(path);\n if (error) {\n logger.log(\n `[locadex-mcp: ${guide.id}] Error fetching guide: ${guide.id} at path ${path}`\n );\n return {\n content: [\n {\n type: 'text',\n text: `Error fetching guide: ${error}`,\n },\n ],\n isError: true,\n };\n }\n logger.log(`[locadex-mcp: ${guide.id}] Returning guide: ${guide.id}`);\n return {\n content: [\n {\n type: 'text',\n text: content ?? '',\n },\n ],\n };\n });\n });\n}\n"]}
|