docs-i18n 0.3.2 → 0.4.0

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/dist/cli.js CHANGED
@@ -49,7 +49,7 @@ Options:
49
49
  console.error("Error: --lang is required");
50
50
  process.exit(1);
51
51
  }
52
- const { translate } = await import("./translate-FI4IXXOP.js");
52
+ const { translate } = await import("./translate-DHRWBIXV.js");
53
53
  await translate(config, {
54
54
  lang,
55
55
  project: getOpt("project") || void 0,
package/dist/index.d.ts CHANGED
@@ -19,6 +19,7 @@ interface DocsI18nConfig {
19
19
  llm?: {
20
20
  provider?: 'openrouter' | 'openai' | 'anthropic';
21
21
  model?: string;
22
+ apiKey?: string;
22
23
  contextLength?: number;
23
24
  maxTokens?: number;
24
25
  };
@@ -591,6 +591,7 @@ async function translate(config, opts) {
591
591
  const maxTokens = opts.maxTokens ?? llm.maxTokens ?? 16384;
592
592
  const contextLength = opts.contextLength ?? llm.contextLength ?? 32768;
593
593
  const model = opts.model ?? llm.model ?? "";
594
+ const apiKey = llm.apiKey ?? "";
594
595
  const apiType = llm.provider ?? "openrouter";
595
596
  const docsContext = config.context ?? "";
596
597
  for (const source of sources) {
@@ -666,6 +667,7 @@ async function translate(config, opts) {
666
667
  langName: lang,
667
668
  guide: "",
668
669
  apiType,
670
+ apiKey: apiKey || void 0,
669
671
  model: model || void 0,
670
672
  maxTokens,
671
673
  filePath: chunkLog,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docs-i18n",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Universal documentation translation engine — parse, translate, cache, assemble, manage.",
5
5
  "type": "module",
6
6
  "bin": {