@intlayer/docs 9.2.0 → 9.3.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.
Files changed (233) hide show
  1. package/README.md +24 -24
  2. package/blog/ar/index.md +1 -1
  3. package/blog/ar/rag_powered_documentation_assistant.md +1 -1
  4. package/blog/de/index.md +1 -1
  5. package/blog/en/index.md +1 -1
  6. package/blog/en-GB/index.md +1 -1
  7. package/blog/es/index.md +1 -1
  8. package/blog/fr/index.md +1 -1
  9. package/blog/hi/index.md +1 -1
  10. package/blog/id/index.md +1 -1
  11. package/blog/it/index.md +1 -1
  12. package/blog/ja/index.md +1 -1
  13. package/blog/ko/index.md +1 -1
  14. package/blog/pl/index.md +1 -1
  15. package/blog/pl/rag_powered_documentation_assistant.md +1 -1
  16. package/blog/pt/index.md +1 -1
  17. package/blog/ru/index.md +1 -1
  18. package/blog/uk/index.md +1 -1
  19. package/blog/vi/index.md +1 -1
  20. package/blog/zh/index.md +1 -1
  21. package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -2
  22. package/dist/cjs/authors2.cjs +0 -1
  23. package/dist/cjs/common.cjs +24 -1
  24. package/dist/cjs/common.cjs.map +1 -1
  25. package/dist/cjs/generated/blog.entry.cjs +35 -6
  26. package/dist/cjs/generated/blog.entry.cjs.map +1 -1
  27. package/dist/cjs/generated/docs.entry.cjs +35 -6
  28. package/dist/cjs/generated/docs.entry.cjs.map +1 -1
  29. package/dist/cjs/generated/frequentQuestions.entry.cjs +35 -6
  30. package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
  31. package/dist/cjs/generated/legal.entry.cjs +35 -6
  32. package/dist/cjs/generated/legal.entry.cjs.map +1 -1
  33. package/dist/esm/common.mjs +24 -1
  34. package/dist/esm/common.mjs.map +1 -1
  35. package/dist/esm/generated/blog.entry.mjs +35 -6
  36. package/dist/esm/generated/blog.entry.mjs.map +1 -1
  37. package/dist/esm/generated/docs.entry.mjs +35 -6
  38. package/dist/esm/generated/docs.entry.mjs.map +1 -1
  39. package/dist/esm/generated/frequentQuestions.entry.mjs +35 -6
  40. package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
  41. package/dist/esm/generated/legal.entry.mjs +35 -6
  42. package/dist/esm/generated/legal.entry.mjs.map +1 -1
  43. package/dist/types/common.d.ts.map +1 -1
  44. package/dist/types/generated/blog.entry.d.ts.map +1 -1
  45. package/dist/types/generated/docs.entry.d.ts.map +1 -1
  46. package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
  47. package/dist/types/generated/legal.entry.d.ts.map +1 -1
  48. package/docs/ar/bundle_optimization.md +58 -25
  49. package/docs/ar/configuration.md +10 -10
  50. package/docs/ar/interest_of_intlayer.md +24 -22
  51. package/docs/ar/intlayer_with_express.md +1 -1
  52. package/docs/ar/intlayer_with_svelte_kit.md +1 -1
  53. package/docs/ar/intlayer_with_tanstack+solid.md +5 -3
  54. package/docs/ar/intlayer_with_tanstack.md +5 -3
  55. package/docs/ar/live-sync.md +4 -0
  56. package/docs/ar/lsp.md +114 -175
  57. package/docs/ar/readme.md +25 -25
  58. package/docs/bn/bundle_optimization.md +58 -25
  59. package/docs/bn/configuration.md +10 -10
  60. package/docs/bn/interest_of_intlayer.md +24 -22
  61. package/docs/cs/bundle_optimization.md +58 -25
  62. package/docs/cs/configuration.md +10 -10
  63. package/docs/cs/interest_of_intlayer.md +24 -22
  64. package/docs/de/bundle_optimization.md +58 -25
  65. package/docs/de/configuration.md +10 -10
  66. package/docs/de/interest_of_intlayer.md +24 -22
  67. package/docs/de/intlayer_with_svelte_kit.md +1 -1
  68. package/docs/de/intlayer_with_tanstack+solid.md +5 -3
  69. package/docs/de/intlayer_with_tanstack.md +5 -3
  70. package/docs/de/live-sync.md +4 -0
  71. package/docs/de/lsp.md +111 -172
  72. package/docs/de/readme.md +24 -24
  73. package/docs/en/bundle_optimization.md +51 -23
  74. package/docs/en/configuration.md +10 -10
  75. package/docs/en/interest_of_intlayer.md +24 -22
  76. package/docs/en/intlayer_with_svelte_kit.md +1 -1
  77. package/docs/en/intlayer_with_tanstack+solid.md +5 -3
  78. package/docs/en/intlayer_with_tanstack.md +5 -3
  79. package/docs/en/live-sync.md +4 -0
  80. package/docs/en/lsp.md +109 -170
  81. package/docs/en/readme.md +24 -24
  82. package/docs/en-GB/bundle_optimization.md +58 -25
  83. package/docs/en-GB/configuration.md +10 -10
  84. package/docs/en-GB/interest_of_intlayer.md +24 -22
  85. package/docs/en-GB/intlayer_with_svelte_kit.md +1 -1
  86. package/docs/en-GB/intlayer_with_tanstack+solid.md +5 -3
  87. package/docs/en-GB/intlayer_with_tanstack.md +5 -3
  88. package/docs/en-GB/live-sync.md +4 -0
  89. package/docs/en-GB/lsp.md +109 -170
  90. package/docs/en-GB/readme.md +24 -24
  91. package/docs/es/bundle_optimization.md +58 -25
  92. package/docs/es/configuration.md +10 -10
  93. package/docs/es/interest_of_intlayer.md +24 -22
  94. package/docs/es/intlayer_with_svelte_kit.md +1 -1
  95. package/docs/es/intlayer_with_tanstack+solid.md +5 -3
  96. package/docs/es/intlayer_with_tanstack.md +5 -3
  97. package/docs/es/live-sync.md +4 -0
  98. package/docs/es/lsp.md +114 -175
  99. package/docs/es/readme.md +24 -24
  100. package/docs/fr/bundle_optimization.md +58 -25
  101. package/docs/fr/configuration.md +10 -10
  102. package/docs/fr/interest_of_intlayer.md +24 -22
  103. package/docs/fr/intlayer_with_svelte_kit.md +1 -1
  104. package/docs/fr/intlayer_with_tanstack+solid.md +5 -3
  105. package/docs/fr/intlayer_with_tanstack.md +5 -3
  106. package/docs/fr/live-sync.md +4 -0
  107. package/docs/fr/lsp.md +110 -171
  108. package/docs/fr/readme.md +24 -24
  109. package/docs/hi/bundle_optimization.md +58 -25
  110. package/docs/hi/configuration.md +10 -10
  111. package/docs/hi/interest_of_intlayer.md +24 -22
  112. package/docs/hi/intlayer_with_express.md +1 -1
  113. package/docs/hi/intlayer_with_svelte_kit.md +1 -1
  114. package/docs/hi/intlayer_with_tanstack+solid.md +5 -3
  115. package/docs/hi/intlayer_with_tanstack.md +5 -3
  116. package/docs/hi/live-sync.md +4 -0
  117. package/docs/hi/lsp.md +113 -174
  118. package/docs/hi/readme.md +24 -24
  119. package/docs/id/bundle_optimization.md +58 -25
  120. package/docs/id/configuration.md +10 -10
  121. package/docs/id/interest_of_intlayer.md +24 -22
  122. package/docs/id/intlayer_with_svelte_kit.md +1 -1
  123. package/docs/id/intlayer_with_tanstack+solid.md +5 -3
  124. package/docs/id/intlayer_with_tanstack.md +5 -3
  125. package/docs/id/live-sync.md +4 -0
  126. package/docs/id/lsp.md +113 -174
  127. package/docs/id/readme.md +24 -24
  128. package/docs/it/bundle_optimization.md +58 -25
  129. package/docs/it/configuration.md +10 -10
  130. package/docs/it/interest_of_intlayer.md +24 -22
  131. package/docs/it/intlayer_with_svelte_kit.md +1 -1
  132. package/docs/it/intlayer_with_tanstack+solid.md +5 -3
  133. package/docs/it/intlayer_with_tanstack.md +5 -3
  134. package/docs/it/live-sync.md +4 -0
  135. package/docs/it/lsp.md +115 -176
  136. package/docs/it/readme.md +24 -24
  137. package/docs/ja/bundle_optimization.md +58 -25
  138. package/docs/ja/configuration.md +10 -10
  139. package/docs/ja/interest_of_intlayer.md +24 -22
  140. package/docs/ja/intlayer_with_tanstack+solid.md +5 -3
  141. package/docs/ja/intlayer_with_tanstack.md +5 -3
  142. package/docs/ja/live-sync.md +4 -0
  143. package/docs/ja/lsp.md +113 -174
  144. package/docs/ja/readme.md +24 -24
  145. package/docs/ko/bundle_optimization.md +58 -25
  146. package/docs/ko/configuration.md +10 -10
  147. package/docs/ko/interest_of_intlayer.md +24 -22
  148. package/docs/ko/intlayer_with_svelte_kit.md +1 -1
  149. package/docs/ko/intlayer_with_tanstack+solid.md +5 -3
  150. package/docs/ko/intlayer_with_tanstack.md +5 -3
  151. package/docs/ko/live-sync.md +4 -0
  152. package/docs/ko/lsp.md +112 -173
  153. package/docs/ko/readme.md +24 -24
  154. package/docs/nl/bundle_optimization.md +58 -25
  155. package/docs/nl/configuration.md +10 -10
  156. package/docs/nl/interest_of_intlayer.md +24 -22
  157. package/docs/pl/bundle_optimization.md +58 -25
  158. package/docs/pl/configuration.md +10 -10
  159. package/docs/pl/interest_of_intlayer.md +4 -2
  160. package/docs/pl/intlayer_with_svelte_kit.md +1 -1
  161. package/docs/pl/intlayer_with_tanstack+solid.md +5 -3
  162. package/docs/pl/intlayer_with_tanstack.md +5 -3
  163. package/docs/pl/live-sync.md +4 -0
  164. package/docs/pl/lsp.md +115 -176
  165. package/docs/pl/readme.md +24 -24
  166. package/docs/pt/bundle_optimization.md +58 -24
  167. package/docs/pt/configuration.md +10 -10
  168. package/docs/pt/interest_of_intlayer.md +24 -22
  169. package/docs/pt/intlayer_with_svelte_kit.md +1 -1
  170. package/docs/pt/intlayer_with_tanstack+solid.md +5 -3
  171. package/docs/pt/intlayer_with_tanstack.md +5 -3
  172. package/docs/pt/live-sync.md +4 -0
  173. package/docs/pt/lsp.md +113 -174
  174. package/docs/pt/readme.md +24 -24
  175. package/docs/ru/bundle_optimization.md +58 -25
  176. package/docs/ru/configuration.md +10 -10
  177. package/docs/ru/interest_of_intlayer.md +24 -22
  178. package/docs/ru/intlayer_with_nextjs_14.md +1 -1
  179. package/docs/ru/intlayer_with_nextjs_15.md +1 -1
  180. package/docs/ru/intlayer_with_svelte_kit.md +1 -1
  181. package/docs/ru/intlayer_with_tanstack+solid.md +5 -3
  182. package/docs/ru/intlayer_with_tanstack.md +5 -3
  183. package/docs/ru/live-sync.md +4 -0
  184. package/docs/ru/lsp.md +112 -173
  185. package/docs/ru/readme.md +24 -24
  186. package/docs/tr/bundle_optimization.md +58 -25
  187. package/docs/tr/configuration.md +10 -10
  188. package/docs/tr/interest_of_intlayer.md +24 -22
  189. package/docs/tr/intlayer_with_svelte_kit.md +1 -1
  190. package/docs/tr/intlayer_with_tanstack+solid.md +5 -3
  191. package/docs/tr/intlayer_with_tanstack.md +5 -3
  192. package/docs/tr/live-sync.md +4 -0
  193. package/docs/tr/lsp.md +113 -174
  194. package/docs/tr/readme.md +24 -24
  195. package/docs/uk/bundle_optimization.md +58 -25
  196. package/docs/uk/configuration.md +10 -10
  197. package/docs/uk/interest_of_intlayer.md +4 -2
  198. package/docs/uk/intlayer_with_svelte_kit.md +1 -1
  199. package/docs/uk/intlayer_with_tanstack+solid.md +5 -3
  200. package/docs/uk/intlayer_with_tanstack.md +5 -3
  201. package/docs/uk/live-sync.md +4 -0
  202. package/docs/uk/lsp.md +113 -174
  203. package/docs/uk/per_locale_file.md +1 -1
  204. package/docs/uk/readme.md +24 -24
  205. package/docs/ur/bundle_optimization.md +58 -25
  206. package/docs/ur/configuration.md +10 -10
  207. package/docs/ur/interest_of_intlayer.md +24 -22
  208. package/docs/vi/bundle_optimization.md +58 -25
  209. package/docs/vi/configuration.md +10 -10
  210. package/docs/vi/interest_of_intlayer.md +24 -22
  211. package/docs/vi/intlayer_with_svelte_kit.md +1 -1
  212. package/docs/vi/intlayer_with_tanstack+solid.md +5 -3
  213. package/docs/vi/intlayer_with_tanstack.md +5 -3
  214. package/docs/vi/live-sync.md +4 -0
  215. package/docs/vi/lsp.md +115 -176
  216. package/docs/vi/readme.md +24 -24
  217. package/docs/zh/bundle_optimization.md +58 -25
  218. package/docs/zh/configuration.md +10 -10
  219. package/docs/zh/interest_of_intlayer.md +24 -22
  220. package/docs/zh/intlayer_with_svelte_kit.md +1 -1
  221. package/docs/zh/intlayer_with_tanstack+solid.md +5 -3
  222. package/docs/zh/intlayer_with_tanstack.md +5 -3
  223. package/docs/zh/live-sync.md +4 -0
  224. package/docs/zh/lsp.md +113 -174
  225. package/docs/zh/readme.md +21 -21
  226. package/docs/zh-TW/bundle_optimization.md +58 -25
  227. package/docs/zh-TW/interest_of_intlayer.md +24 -22
  228. package/package.json +7 -7
  229. package/src/common.ts +39 -2
  230. package/src/generated/blog.entry.ts +39 -7
  231. package/src/generated/docs.entry.ts +39 -7
  232. package/src/generated/frequentQuestions.entry.ts +39 -7
  233. package/src/generated/legal.entry.ts +39 -7
@@ -9,20 +9,49 @@ let _intlayer_config_utils = require("@intlayer/config/utils");
9
9
  const currentDir = typeof __dirname !== "undefined" ? __dirname : (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
10
10
  let baseDir;
11
11
  try {
12
- baseDir = (0, _intlayer_config_utils.getPackageJsonPath)((0, _intlayer_config_utils.getProjectRequire)(currentDir).resolve("@intlayer/docs")).baseDir;
12
+ const docEntryPath = (0, _intlayer_config_utils.getProjectRequire)(currentDir).resolve("@intlayer/docs");
13
+ baseDir = (0, _intlayer_config_utils.getPackageJsonPath)(docEntryPath).baseDir;
13
14
  } catch {
14
15
  try {
15
- baseDir = (0, _intlayer_config_utils.getPackageJsonPath)((0, _intlayer_config_utils.getProjectRequire)().resolve("@intlayer/docs")).baseDir;
16
+ const docEntryPath = (0, _intlayer_config_utils.getProjectRequire)().resolve("@intlayer/docs");
17
+ baseDir = (0, _intlayer_config_utils.getPackageJsonPath)(docEntryPath).baseDir;
16
18
  } catch {
17
19
  baseDir = (0, _intlayer_config_utils.getPackageJsonPath)(currentDir).baseDir;
18
20
  }
19
21
  }
20
- const readLocale = (relativeAfterLocale, locale) => {
22
+ /**
23
+ * Reads a document, preferring the requested locale and falling back to English.
24
+ */
25
+ const readLocaleFile = async (relativeAfterLocale, locale) => {
21
26
  const target1 = (0, node_path.join)(baseDir, `./frequent_questions/${locale}/${relativeAfterLocale}`);
22
- if ((0, node_fs.existsSync)(target1)) return (0, node_fs_promises.readFile)(target1, "utf8");
27
+ if ((0, node_fs.existsSync)(target1)) return await (0, node_fs_promises.readFile)(target1, "utf8");
23
28
  const target2 = (0, node_path.join)(baseDir, `./frequent_questions/en/${relativeAfterLocale}`);
24
- if ((0, node_fs.existsSync)(target2)) return (0, node_fs_promises.readFile)(target2, "utf8");
25
- return Promise.reject(/* @__PURE__ */ new Error(`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`));
29
+ if ((0, node_fs.existsSync)(target2)) return await (0, node_fs_promises.readFile)(target2, "utf8");
30
+ throw new Error(`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`);
31
+ };
32
+ /**
33
+ * Builds a lazy, awaitable handle over a document.
34
+ *
35
+ * The entry map below holds one handle per document *per locale*, so reading
36
+ * eagerly would pull every markdown file of every locale into memory as soon as
37
+ * this module is imported — hundreds of megabytes, duplicated in every
38
+ * prerender worker, for the handful of documents a page actually renders.
39
+ *
40
+ * The returned value is a thenable rather than a promise: consumers only ever
41
+ * `await` it, and `await` triggers `then`, so the file is read on first use and
42
+ * the resulting promise is cached for subsequent reads.
43
+ */
44
+ const readLocale = (relativeAfterLocale, locale) => {
45
+ let pendingRead;
46
+ const read = () => {
47
+ pendingRead ??= readLocaleFile(relativeAfterLocale, locale);
48
+ return pendingRead;
49
+ };
50
+ return {
51
+ then: (onFulfilled, onRejected) => read().then(onFulfilled, onRejected),
52
+ catch: (onRejected) => read().catch(onRejected),
53
+ finally: (onFinally) => read().finally(onFinally)
54
+ };
26
55
  };
27
56
  const frequentQuestionsEntry = {
28
57
  "./frequent_questions/en/SSR_Next_no_[locale].md": {
@@ -1 +1 @@
1
- {"version":3,"file":"frequentQuestions.entry.cjs","names":[],"sources":["../../../src/generated/frequentQuestions.entry.ts"],"sourcesContent":["/* AUTO-GENERATED – DO NOT EDIT */\n/* REGENERATE USING `pnpm prepare` */\nimport { existsSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { join, dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { getPackageJsonPath, getProjectRequire } from '@intlayer/config/utils';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\n\n// Robustly resolve the base directory of the @intlayer/docs package in both\n// bundled environments (Next.js) and standalone CLIs (MCP via npx).\nconst currentDir =\n typeof __dirname !== 'undefined'\n ? __dirname\n : pathDirname(fileURLToPath(import.meta.url));\n\nlet baseDir: string;\ntry {\n // Prefer resolving from the location of this file (works for CLIs).\n const projectRequire = getProjectRequire(currentDir);\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n} catch {\n try {\n // Fallback: resolve from the consumer project (works for apps/bundlers).\n const projectRequire = getProjectRequire();\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n } catch {\n // Last resort: walk up from currentDir (useful when executed inside @intlayer/docs).\n baseDir = getPackageJsonPath(currentDir).baseDir;\n }\n}\n\nconst readLocale = (\n relativeAfterLocale: string,\n locale: LocalesValues\n): Promise<string> => {\n const target1 = join(\n baseDir,\n `./frequent_questions/${locale}/${relativeAfterLocale}`\n );\n if (existsSync(target1)) {\n return readFile(target1, 'utf8');\n }\n const target2 = join(\n baseDir,\n `./frequent_questions/en/${relativeAfterLocale}`\n );\n if (existsSync(target2)) {\n return readFile(target2, 'utf8');\n }\n\n return Promise.reject(\n new Error(\n `[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`\n )\n );\n};\n\nexport const frequentQuestionsEntry = {\n './frequent_questions/en/SSR_Next_no_[locale].md': {\n en: readLocale('SSR_Next_no_[locale].md', 'en'),\n es: readLocale('SSR_Next_no_[locale].md', 'es'),\n ru: readLocale('SSR_Next_no_[locale].md', 'ru'),\n ja: readLocale('SSR_Next_no_[locale].md', 'ja'),\n fr: readLocale('SSR_Next_no_[locale].md', 'fr'),\n ko: readLocale('SSR_Next_no_[locale].md', 'ko'),\n zh: readLocale('SSR_Next_no_[locale].md', 'zh'),\n de: readLocale('SSR_Next_no_[locale].md', 'de'),\n ar: readLocale('SSR_Next_no_[locale].md', 'ar'),\n it: readLocale('SSR_Next_no_[locale].md', 'it'),\n 'en-GB': readLocale('SSR_Next_no_[locale].md', 'en-GB'),\n pt: readLocale('SSR_Next_no_[locale].md', 'pt'),\n hi: readLocale('SSR_Next_no_[locale].md', 'hi'),\n tr: readLocale('SSR_Next_no_[locale].md', 'tr'),\n pl: readLocale('SSR_Next_no_[locale].md', 'pl'),\n id: readLocale('SSR_Next_no_[locale].md', 'id'),\n vi: readLocale('SSR_Next_no_[locale].md', 'vi'),\n uk: readLocale('SSR_Next_no_[locale].md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/array_as_content_declaration.md': {\n en: readLocale('array_as_content_declaration.md', 'en'),\n es: readLocale('array_as_content_declaration.md', 'es'),\n ru: readLocale('array_as_content_declaration.md', 'ru'),\n ja: readLocale('array_as_content_declaration.md', 'ja'),\n fr: readLocale('array_as_content_declaration.md', 'fr'),\n ko: readLocale('array_as_content_declaration.md', 'ko'),\n zh: readLocale('array_as_content_declaration.md', 'zh'),\n de: readLocale('array_as_content_declaration.md', 'de'),\n ar: readLocale('array_as_content_declaration.md', 'ar'),\n it: readLocale('array_as_content_declaration.md', 'it'),\n 'en-GB': readLocale('array_as_content_declaration.md', 'en-GB'),\n pt: readLocale('array_as_content_declaration.md', 'pt'),\n hi: readLocale('array_as_content_declaration.md', 'hi'),\n tr: readLocale('array_as_content_declaration.md', 'tr'),\n pl: readLocale('array_as_content_declaration.md', 'pl'),\n id: readLocale('array_as_content_declaration.md', 'id'),\n vi: readLocale('array_as_content_declaration.md', 'vi'),\n uk: readLocale('array_as_content_declaration.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/build_dictionaries.md': {\n en: readLocale('build_dictionaries.md', 'en'),\n es: readLocale('build_dictionaries.md', 'es'),\n ru: readLocale('build_dictionaries.md', 'ru'),\n ja: readLocale('build_dictionaries.md', 'ja'),\n fr: readLocale('build_dictionaries.md', 'fr'),\n ko: readLocale('build_dictionaries.md', 'ko'),\n zh: readLocale('build_dictionaries.md', 'zh'),\n de: readLocale('build_dictionaries.md', 'de'),\n ar: readLocale('build_dictionaries.md', 'ar'),\n it: readLocale('build_dictionaries.md', 'it'),\n 'en-GB': readLocale('build_dictionaries.md', 'en-GB'),\n pt: readLocale('build_dictionaries.md', 'pt'),\n hi: readLocale('build_dictionaries.md', 'hi'),\n tr: readLocale('build_dictionaries.md', 'tr'),\n pl: readLocale('build_dictionaries.md', 'pl'),\n id: readLocale('build_dictionaries.md', 'id'),\n vi: readLocale('build_dictionaries.md', 'vi'),\n uk: readLocale('build_dictionaries.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/build_error_CI_CD.md': {\n en: readLocale('build_error_CI_CD.md', 'en'),\n es: readLocale('build_error_CI_CD.md', 'es'),\n ru: readLocale('build_error_CI_CD.md', 'ru'),\n ja: readLocale('build_error_CI_CD.md', 'ja'),\n fr: readLocale('build_error_CI_CD.md', 'fr'),\n ko: readLocale('build_error_CI_CD.md', 'ko'),\n zh: readLocale('build_error_CI_CD.md', 'zh'),\n de: readLocale('build_error_CI_CD.md', 'de'),\n ar: readLocale('build_error_CI_CD.md', 'ar'),\n it: readLocale('build_error_CI_CD.md', 'it'),\n 'en-GB': readLocale('build_error_CI_CD.md', 'en-GB'),\n pt: readLocale('build_error_CI_CD.md', 'pt'),\n hi: readLocale('build_error_CI_CD.md', 'hi'),\n tr: readLocale('build_error_CI_CD.md', 'tr'),\n pl: readLocale('build_error_CI_CD.md', 'pl'),\n id: readLocale('build_error_CI_CD.md', 'id'),\n vi: readLocale('build_error_CI_CD.md', 'vi'),\n uk: readLocale('build_error_CI_CD.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/bun_set_up.md': {\n en: readLocale('bun_set_up.md', 'en'),\n es: readLocale('bun_set_up.md', 'es'),\n ru: readLocale('bun_set_up.md', 'ru'),\n ja: readLocale('bun_set_up.md', 'ja'),\n fr: readLocale('bun_set_up.md', 'fr'),\n ko: readLocale('bun_set_up.md', 'ko'),\n zh: readLocale('bun_set_up.md', 'zh'),\n de: readLocale('bun_set_up.md', 'de'),\n ar: readLocale('bun_set_up.md', 'ar'),\n it: readLocale('bun_set_up.md', 'it'),\n 'en-GB': readLocale('bun_set_up.md', 'en-GB'),\n pt: readLocale('bun_set_up.md', 'pt'),\n hi: readLocale('bun_set_up.md', 'hi'),\n tr: readLocale('bun_set_up.md', 'tr'),\n pl: readLocale('bun_set_up.md', 'pl'),\n id: readLocale('bun_set_up.md', 'id'),\n vi: readLocale('bun_set_up.md', 'vi'),\n uk: readLocale('bun_set_up.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/customized_locale_list.md': {\n en: readLocale('customized_locale_list.md', 'en'),\n es: readLocale('customized_locale_list.md', 'es'),\n ru: readLocale('customized_locale_list.md', 'ru'),\n ja: readLocale('customized_locale_list.md', 'ja'),\n fr: readLocale('customized_locale_list.md', 'fr'),\n ko: readLocale('customized_locale_list.md', 'ko'),\n zh: readLocale('customized_locale_list.md', 'zh'),\n de: readLocale('customized_locale_list.md', 'de'),\n ar: readLocale('customized_locale_list.md', 'ar'),\n it: readLocale('customized_locale_list.md', 'it'),\n 'en-GB': readLocale('customized_locale_list.md', 'en-GB'),\n pt: readLocale('customized_locale_list.md', 'pt'),\n hi: readLocale('customized_locale_list.md', 'hi'),\n tr: readLocale('customized_locale_list.md', 'tr'),\n pl: readLocale('customized_locale_list.md', 'pl'),\n id: readLocale('customized_locale_list.md', 'id'),\n vi: readLocale('customized_locale_list.md', 'vi'),\n uk: readLocale('customized_locale_list.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/domain_routing.md': {\n en: readLocale('domain_routing.md', 'en'),\n es: readLocale('domain_routing.md', 'es'),\n ru: readLocale('domain_routing.md', 'ru'),\n ja: readLocale('domain_routing.md', 'ja'),\n fr: readLocale('domain_routing.md', 'fr'),\n ko: readLocale('domain_routing.md', 'ko'),\n zh: readLocale('domain_routing.md', 'zh'),\n de: readLocale('domain_routing.md', 'de'),\n ar: readLocale('domain_routing.md', 'ar'),\n it: readLocale('domain_routing.md', 'it'),\n 'en-GB': readLocale('domain_routing.md', 'en-GB'),\n pt: readLocale('domain_routing.md', 'pt'),\n hi: readLocale('domain_routing.md', 'hi'),\n tr: readLocale('domain_routing.md', 'tr'),\n pl: readLocale('domain_routing.md', 'pl'),\n id: readLocale('domain_routing.md', 'id'),\n vi: readLocale('domain_routing.md', 'vi'),\n uk: readLocale('domain_routing.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/error-vite-env-only.md': {\n en: readLocale('error-vite-env-only.md', 'en'),\n es: readLocale('error-vite-env-only.md', 'es'),\n ru: readLocale('error-vite-env-only.md', 'ru'),\n ja: readLocale('error-vite-env-only.md', 'ja'),\n fr: readLocale('error-vite-env-only.md', 'fr'),\n ko: readLocale('error-vite-env-only.md', 'ko'),\n zh: readLocale('error-vite-env-only.md', 'zh'),\n de: readLocale('error-vite-env-only.md', 'de'),\n ar: readLocale('error-vite-env-only.md', 'ar'),\n it: readLocale('error-vite-env-only.md', 'it'),\n 'en-GB': readLocale('error-vite-env-only.md', 'en-GB'),\n pt: readLocale('error-vite-env-only.md', 'pt'),\n hi: readLocale('error-vite-env-only.md', 'hi'),\n tr: readLocale('error-vite-env-only.md', 'tr'),\n pl: readLocale('error-vite-env-only.md', 'pl'),\n id: readLocale('error-vite-env-only.md', 'id'),\n vi: readLocale('error-vite-env-only.md', 'vi'),\n uk: readLocale('error-vite-env-only.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/esbuild_error.md': {\n en: readLocale('esbuild_error.md', 'en'),\n es: readLocale('esbuild_error.md', 'es'),\n ru: readLocale('esbuild_error.md', 'ru'),\n ja: readLocale('esbuild_error.md', 'ja'),\n fr: readLocale('esbuild_error.md', 'fr'),\n ko: readLocale('esbuild_error.md', 'ko'),\n zh: readLocale('esbuild_error.md', 'zh'),\n de: readLocale('esbuild_error.md', 'de'),\n ar: readLocale('esbuild_error.md', 'ar'),\n it: readLocale('esbuild_error.md', 'it'),\n 'en-GB': readLocale('esbuild_error.md', 'en-GB'),\n pt: readLocale('esbuild_error.md', 'pt'),\n hi: readLocale('esbuild_error.md', 'hi'),\n tr: readLocale('esbuild_error.md', 'tr'),\n pl: readLocale('esbuild_error.md', 'pl'),\n id: readLocale('esbuild_error.md', 'id'),\n vi: readLocale('esbuild_error.md', 'vi'),\n uk: readLocale('esbuild_error.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/get_locale_cookie.md': {\n en: readLocale('get_locale_cookie.md', 'en'),\n es: readLocale('get_locale_cookie.md', 'es'),\n ru: readLocale('get_locale_cookie.md', 'ru'),\n ja: readLocale('get_locale_cookie.md', 'ja'),\n fr: readLocale('get_locale_cookie.md', 'fr'),\n ko: readLocale('get_locale_cookie.md', 'ko'),\n zh: readLocale('get_locale_cookie.md', 'zh'),\n de: readLocale('get_locale_cookie.md', 'de'),\n ar: readLocale('get_locale_cookie.md', 'ar'),\n it: readLocale('get_locale_cookie.md', 'it'),\n 'en-GB': readLocale('get_locale_cookie.md', 'en-GB'),\n pt: readLocale('get_locale_cookie.md', 'pt'),\n hi: readLocale('get_locale_cookie.md', 'hi'),\n tr: readLocale('get_locale_cookie.md', 'tr'),\n pl: readLocale('get_locale_cookie.md', 'pl'),\n id: readLocale('get_locale_cookie.md', 'id'),\n vi: readLocale('get_locale_cookie.md', 'vi'),\n uk: readLocale('get_locale_cookie.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/intlayerNode.md': {\n en: readLocale('intlayerNode.md', 'en'),\n es: readLocale('intlayerNode.md', 'es'),\n ru: readLocale('intlayerNode.md', 'ru'),\n ja: readLocale('intlayerNode.md', 'ja'),\n fr: readLocale('intlayerNode.md', 'fr'),\n ko: readLocale('intlayerNode.md', 'ko'),\n zh: readLocale('intlayerNode.md', 'zh'),\n de: readLocale('intlayerNode.md', 'de'),\n ar: readLocale('intlayerNode.md', 'ar'),\n it: readLocale('intlayerNode.md', 'it'),\n 'en-GB': readLocale('intlayerNode.md', 'en-GB'),\n pt: readLocale('intlayerNode.md', 'pt'),\n hi: readLocale('intlayerNode.md', 'hi'),\n tr: readLocale('intlayerNode.md', 'tr'),\n pl: readLocale('intlayerNode.md', 'pl'),\n id: readLocale('intlayerNode.md', 'id'),\n vi: readLocale('intlayerNode.md', 'vi'),\n uk: readLocale('intlayerNode.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/intlayer_command_undefined.md': {\n en: readLocale('intlayer_command_undefined.md', 'en'),\n es: readLocale('intlayer_command_undefined.md', 'es'),\n ru: readLocale('intlayer_command_undefined.md', 'ru'),\n ja: readLocale('intlayer_command_undefined.md', 'ja'),\n fr: readLocale('intlayer_command_undefined.md', 'fr'),\n ko: readLocale('intlayer_command_undefined.md', 'ko'),\n zh: readLocale('intlayer_command_undefined.md', 'zh'),\n de: readLocale('intlayer_command_undefined.md', 'de'),\n ar: readLocale('intlayer_command_undefined.md', 'ar'),\n it: readLocale('intlayer_command_undefined.md', 'it'),\n 'en-GB': readLocale('intlayer_command_undefined.md', 'en-GB'),\n pt: readLocale('intlayer_command_undefined.md', 'pt'),\n hi: readLocale('intlayer_command_undefined.md', 'hi'),\n tr: readLocale('intlayer_command_undefined.md', 'tr'),\n pl: readLocale('intlayer_command_undefined.md', 'pl'),\n id: readLocale('intlayer_command_undefined.md', 'id'),\n vi: readLocale('intlayer_command_undefined.md', 'vi'),\n uk: readLocale('intlayer_command_undefined.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/locale_incorect_in_url.md': {\n en: readLocale('locale_incorect_in_url.md', 'en'),\n es: readLocale('locale_incorect_in_url.md', 'es'),\n ru: readLocale('locale_incorect_in_url.md', 'ru'),\n ja: readLocale('locale_incorect_in_url.md', 'ja'),\n fr: readLocale('locale_incorect_in_url.md', 'fr'),\n ko: readLocale('locale_incorect_in_url.md', 'ko'),\n zh: readLocale('locale_incorect_in_url.md', 'zh'),\n de: readLocale('locale_incorect_in_url.md', 'de'),\n ar: readLocale('locale_incorect_in_url.md', 'ar'),\n it: readLocale('locale_incorect_in_url.md', 'it'),\n 'en-GB': readLocale('locale_incorect_in_url.md', 'en-GB'),\n pt: readLocale('locale_incorect_in_url.md', 'pt'),\n hi: readLocale('locale_incorect_in_url.md', 'hi'),\n tr: readLocale('locale_incorect_in_url.md', 'tr'),\n pl: readLocale('locale_incorect_in_url.md', 'pl'),\n id: readLocale('locale_incorect_in_url.md', 'id'),\n vi: readLocale('locale_incorect_in_url.md', 'vi'),\n uk: readLocale('locale_incorect_in_url.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/package_version_error.md': {\n en: readLocale('package_version_error.md', 'en'),\n es: readLocale('package_version_error.md', 'es'),\n ru: readLocale('package_version_error.md', 'ru'),\n ja: readLocale('package_version_error.md', 'ja'),\n fr: readLocale('package_version_error.md', 'fr'),\n ko: readLocale('package_version_error.md', 'ko'),\n zh: readLocale('package_version_error.md', 'zh'),\n de: readLocale('package_version_error.md', 'de'),\n ar: readLocale('package_version_error.md', 'ar'),\n it: readLocale('package_version_error.md', 'it'),\n 'en-GB': readLocale('package_version_error.md', 'en-GB'),\n pt: readLocale('package_version_error.md', 'pt'),\n hi: readLocale('package_version_error.md', 'hi'),\n tr: readLocale('package_version_error.md', 'tr'),\n pl: readLocale('package_version_error.md', 'pl'),\n id: readLocale('package_version_error.md', 'id'),\n vi: readLocale('package_version_error.md', 'vi'),\n uk: readLocale('package_version_error.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/static_rendering.md': {\n en: readLocale('static_rendering.md', 'en'),\n es: readLocale('static_rendering.md', 'es'),\n ru: readLocale('static_rendering.md', 'ru'),\n ja: readLocale('static_rendering.md', 'ja'),\n fr: readLocale('static_rendering.md', 'fr'),\n ko: readLocale('static_rendering.md', 'ko'),\n zh: readLocale('static_rendering.md', 'zh'),\n de: readLocale('static_rendering.md', 'de'),\n ar: readLocale('static_rendering.md', 'ar'),\n it: readLocale('static_rendering.md', 'it'),\n 'en-GB': readLocale('static_rendering.md', 'en-GB'),\n pt: readLocale('static_rendering.md', 'pt'),\n hi: readLocale('static_rendering.md', 'hi'),\n tr: readLocale('static_rendering.md', 'tr'),\n pl: readLocale('static_rendering.md', 'pl'),\n id: readLocale('static_rendering.md', 'id'),\n vi: readLocale('static_rendering.md', 'vi'),\n uk: readLocale('static_rendering.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/translated_path_url.md': {\n en: readLocale('translated_path_url.md', 'en'),\n es: readLocale('translated_path_url.md', 'es'),\n ru: readLocale('translated_path_url.md', 'ru'),\n ja: readLocale('translated_path_url.md', 'ja'),\n fr: readLocale('translated_path_url.md', 'fr'),\n ko: readLocale('translated_path_url.md', 'ko'),\n zh: readLocale('translated_path_url.md', 'zh'),\n de: readLocale('translated_path_url.md', 'de'),\n ar: readLocale('translated_path_url.md', 'ar'),\n it: readLocale('translated_path_url.md', 'it'),\n 'en-GB': readLocale('translated_path_url.md', 'en-GB'),\n pt: readLocale('translated_path_url.md', 'pt'),\n hi: readLocale('translated_path_url.md', 'hi'),\n tr: readLocale('translated_path_url.md', 'tr'),\n pl: readLocale('translated_path_url.md', 'pl'),\n id: readLocale('translated_path_url.md', 'id'),\n vi: readLocale('translated_path_url.md', 'vi'),\n uk: readLocale('translated_path_url.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/unknown_command.md': {\n en: readLocale('unknown_command.md', 'en'),\n es: readLocale('unknown_command.md', 'es'),\n ru: readLocale('unknown_command.md', 'ru'),\n ja: readLocale('unknown_command.md', 'ja'),\n fr: readLocale('unknown_command.md', 'fr'),\n ko: readLocale('unknown_command.md', 'ko'),\n zh: readLocale('unknown_command.md', 'zh'),\n de: readLocale('unknown_command.md', 'de'),\n ar: readLocale('unknown_command.md', 'ar'),\n it: readLocale('unknown_command.md', 'it'),\n 'en-GB': readLocale('unknown_command.md', 'en-GB'),\n pt: readLocale('unknown_command.md', 'pt'),\n hi: readLocale('unknown_command.md', 'hi'),\n tr: readLocale('unknown_command.md', 'tr'),\n pl: readLocale('unknown_command.md', 'pl'),\n id: readLocale('unknown_command.md', 'id'),\n vi: readLocale('unknown_command.md', 'vi'),\n uk: readLocale('unknown_command.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n} as const;\n"],"mappings":";;;;;;;;AAWA,MAAM,aACJ,OAAO,cAAc,cACjB,4GACyC,CAAC;AAEhD,IAAI;AACJ,IAAI;CAIF,uGAFyC,UACP,CAAC,CAAC,QAAQ,gBACJ,CAAC,CAAC,CAAC;AAC7C,QAAQ;CACN,IAAI;EAIF,uGADkC,CAAC,CAAC,QAAQ,gBACJ,CAAC,CAAC,CAAC;CAC7C,QAAQ;EAEN,yDAA6B,UAAU,CAAC,CAAC;CAC3C;AACF;AAEA,MAAM,cACJ,qBACA,WACoB;CACpB,MAAM,8BACJ,SACA,wBAAwB,OAAO,GAAG,qBACpC;CACA,4BAAe,OAAO,GACpB,sCAAgB,SAAS,MAAM;CAEjC,MAAM,8BACJ,SACA,2BAA2B,qBAC7B;CACA,4BAAe,OAAO,GACpB,sCAAgB,SAAS,MAAM;CAGjC,OAAO,QAAQ,uBACb,IAAI,MACF,0BAA0B,oBAAoB,aAAa,OAAO,WAAW,QAAQ,WAAW,SAClG,CACF;AACF;AAEA,MAAa,yBAAyB;CACpC,mDAAmD;EACjD,IAAI,WAAW,2BAA2B,IAAI;EAC9C,IAAI,WAAW,2BAA2B,IAAI;EAC9C,IAAI,WAAW,2BAA2B,IAAI;EAC9C,IAAI,WAAW,2BAA2B,IAAI;EAC9C,IAAI,WAAW,2BAA2B,IAAI;EAC9C,IAAI,WAAW,2BAA2B,IAAI;EAC9C,IAAI,WAAW,2BAA2B,IAAI;EAC9C,IAAI,WAAW,2BAA2B,IAAI;EAC9C,IAAI,WAAW,2BAA2B,IAAI;EAC9C,IAAI,WAAW,2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AAW,sBAAsB,OAAO;EACjD,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;CAC3C;AACF"}
1
+ {"version":3,"file":"frequentQuestions.entry.cjs","names":["pathDirname","fileURLToPath","getProjectRequire","getPackageJsonPath","join","existsSync","readFile"],"sources":["../../../src/generated/frequentQuestions.entry.ts"],"sourcesContent":["/* AUTO-GENERATED – DO NOT EDIT */\n/* REGENERATE USING `pnpm prepare` */\nimport { existsSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { join, dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { getPackageJsonPath, getProjectRequire } from '@intlayer/config/utils';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\n\n// Robustly resolve the base directory of the @intlayer/docs package in both\n// bundled environments (Next.js) and standalone CLIs (MCP via npx).\nconst currentDir =\n typeof __dirname !== 'undefined'\n ? __dirname\n : pathDirname(fileURLToPath(import.meta.url));\n\nlet baseDir: string;\ntry {\n // Prefer resolving from the location of this file (works for CLIs).\n const projectRequire = getProjectRequire(currentDir);\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n} catch {\n try {\n // Fallback: resolve from the consumer project (works for apps/bundlers).\n const projectRequire = getProjectRequire();\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n } catch {\n // Last resort: walk up from currentDir (useful when executed inside @intlayer/docs).\n baseDir = getPackageJsonPath(currentDir).baseDir;\n }\n}\n\n/**\n * Reads a document, preferring the requested locale and falling back to English.\n */\nconst readLocaleFile = async (\n relativeAfterLocale: string,\n locale: LocalesValues\n): Promise<string> => {\n const target1 = join(\n baseDir,\n `./frequent_questions/${locale}/${relativeAfterLocale}`\n );\n if (existsSync(target1)) {\n return await readFile(target1, 'utf8');\n }\n const target2 = join(\n baseDir,\n `./frequent_questions/en/${relativeAfterLocale}`\n );\n if (existsSync(target2)) {\n return await readFile(target2, 'utf8');\n }\n\n throw new Error(\n `[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`\n );\n};\n\n/**\n * Builds a lazy, awaitable handle over a document.\n *\n * The entry map below holds one handle per document *per locale*, so reading\n * eagerly would pull every markdown file of every locale into memory as soon as\n * this module is imported — hundreds of megabytes, duplicated in every\n * prerender worker, for the handful of documents a page actually renders.\n *\n * The returned value is a thenable rather than a promise: consumers only ever\n * `await` it, and `await` triggers `then`, so the file is read on first use and\n * the resulting promise is cached for subsequent reads.\n */\nconst readLocale = (\n relativeAfterLocale: string,\n locale: LocalesValues\n): Promise<string> => {\n let pendingRead: Promise<string> | undefined;\n\n const read = (): Promise<string> => {\n pendingRead ??= readLocaleFile(relativeAfterLocale, locale);\n return pendingRead;\n };\n\n return {\n // biome-ignore lint/suspicious/noThenProperty: the thenable is intentional — `await` is what triggers the lazy read.\n then: (onFulfilled, onRejected) => read().then(onFulfilled, onRejected),\n catch: (onRejected) => read().catch(onRejected),\n finally: (onFinally) => read().finally(onFinally),\n } as Promise<string>;\n};\n\nexport const frequentQuestionsEntry = {\n './frequent_questions/en/SSR_Next_no_[locale].md': {\n en: readLocale('SSR_Next_no_[locale].md', 'en'),\n es: readLocale('SSR_Next_no_[locale].md', 'es'),\n ru: readLocale('SSR_Next_no_[locale].md', 'ru'),\n ja: readLocale('SSR_Next_no_[locale].md', 'ja'),\n fr: readLocale('SSR_Next_no_[locale].md', 'fr'),\n ko: readLocale('SSR_Next_no_[locale].md', 'ko'),\n zh: readLocale('SSR_Next_no_[locale].md', 'zh'),\n de: readLocale('SSR_Next_no_[locale].md', 'de'),\n ar: readLocale('SSR_Next_no_[locale].md', 'ar'),\n it: readLocale('SSR_Next_no_[locale].md', 'it'),\n 'en-GB': readLocale('SSR_Next_no_[locale].md', 'en-GB'),\n pt: readLocale('SSR_Next_no_[locale].md', 'pt'),\n hi: readLocale('SSR_Next_no_[locale].md', 'hi'),\n tr: readLocale('SSR_Next_no_[locale].md', 'tr'),\n pl: readLocale('SSR_Next_no_[locale].md', 'pl'),\n id: readLocale('SSR_Next_no_[locale].md', 'id'),\n vi: readLocale('SSR_Next_no_[locale].md', 'vi'),\n uk: readLocale('SSR_Next_no_[locale].md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/array_as_content_declaration.md': {\n en: readLocale('array_as_content_declaration.md', 'en'),\n es: readLocale('array_as_content_declaration.md', 'es'),\n ru: readLocale('array_as_content_declaration.md', 'ru'),\n ja: readLocale('array_as_content_declaration.md', 'ja'),\n fr: readLocale('array_as_content_declaration.md', 'fr'),\n ko: readLocale('array_as_content_declaration.md', 'ko'),\n zh: readLocale('array_as_content_declaration.md', 'zh'),\n de: readLocale('array_as_content_declaration.md', 'de'),\n ar: readLocale('array_as_content_declaration.md', 'ar'),\n it: readLocale('array_as_content_declaration.md', 'it'),\n 'en-GB': readLocale('array_as_content_declaration.md', 'en-GB'),\n pt: readLocale('array_as_content_declaration.md', 'pt'),\n hi: readLocale('array_as_content_declaration.md', 'hi'),\n tr: readLocale('array_as_content_declaration.md', 'tr'),\n pl: readLocale('array_as_content_declaration.md', 'pl'),\n id: readLocale('array_as_content_declaration.md', 'id'),\n vi: readLocale('array_as_content_declaration.md', 'vi'),\n uk: readLocale('array_as_content_declaration.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/build_dictionaries.md': {\n en: readLocale('build_dictionaries.md', 'en'),\n es: readLocale('build_dictionaries.md', 'es'),\n ru: readLocale('build_dictionaries.md', 'ru'),\n ja: readLocale('build_dictionaries.md', 'ja'),\n fr: readLocale('build_dictionaries.md', 'fr'),\n ko: readLocale('build_dictionaries.md', 'ko'),\n zh: readLocale('build_dictionaries.md', 'zh'),\n de: readLocale('build_dictionaries.md', 'de'),\n ar: readLocale('build_dictionaries.md', 'ar'),\n it: readLocale('build_dictionaries.md', 'it'),\n 'en-GB': readLocale('build_dictionaries.md', 'en-GB'),\n pt: readLocale('build_dictionaries.md', 'pt'),\n hi: readLocale('build_dictionaries.md', 'hi'),\n tr: readLocale('build_dictionaries.md', 'tr'),\n pl: readLocale('build_dictionaries.md', 'pl'),\n id: readLocale('build_dictionaries.md', 'id'),\n vi: readLocale('build_dictionaries.md', 'vi'),\n uk: readLocale('build_dictionaries.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/build_error_CI_CD.md': {\n en: readLocale('build_error_CI_CD.md', 'en'),\n es: readLocale('build_error_CI_CD.md', 'es'),\n ru: readLocale('build_error_CI_CD.md', 'ru'),\n ja: readLocale('build_error_CI_CD.md', 'ja'),\n fr: readLocale('build_error_CI_CD.md', 'fr'),\n ko: readLocale('build_error_CI_CD.md', 'ko'),\n zh: readLocale('build_error_CI_CD.md', 'zh'),\n de: readLocale('build_error_CI_CD.md', 'de'),\n ar: readLocale('build_error_CI_CD.md', 'ar'),\n it: readLocale('build_error_CI_CD.md', 'it'),\n 'en-GB': readLocale('build_error_CI_CD.md', 'en-GB'),\n pt: readLocale('build_error_CI_CD.md', 'pt'),\n hi: readLocale('build_error_CI_CD.md', 'hi'),\n tr: readLocale('build_error_CI_CD.md', 'tr'),\n pl: readLocale('build_error_CI_CD.md', 'pl'),\n id: readLocale('build_error_CI_CD.md', 'id'),\n vi: readLocale('build_error_CI_CD.md', 'vi'),\n uk: readLocale('build_error_CI_CD.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/bun_set_up.md': {\n en: readLocale('bun_set_up.md', 'en'),\n es: readLocale('bun_set_up.md', 'es'),\n ru: readLocale('bun_set_up.md', 'ru'),\n ja: readLocale('bun_set_up.md', 'ja'),\n fr: readLocale('bun_set_up.md', 'fr'),\n ko: readLocale('bun_set_up.md', 'ko'),\n zh: readLocale('bun_set_up.md', 'zh'),\n de: readLocale('bun_set_up.md', 'de'),\n ar: readLocale('bun_set_up.md', 'ar'),\n it: readLocale('bun_set_up.md', 'it'),\n 'en-GB': readLocale('bun_set_up.md', 'en-GB'),\n pt: readLocale('bun_set_up.md', 'pt'),\n hi: readLocale('bun_set_up.md', 'hi'),\n tr: readLocale('bun_set_up.md', 'tr'),\n pl: readLocale('bun_set_up.md', 'pl'),\n id: readLocale('bun_set_up.md', 'id'),\n vi: readLocale('bun_set_up.md', 'vi'),\n uk: readLocale('bun_set_up.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/customized_locale_list.md': {\n en: readLocale('customized_locale_list.md', 'en'),\n es: readLocale('customized_locale_list.md', 'es'),\n ru: readLocale('customized_locale_list.md', 'ru'),\n ja: readLocale('customized_locale_list.md', 'ja'),\n fr: readLocale('customized_locale_list.md', 'fr'),\n ko: readLocale('customized_locale_list.md', 'ko'),\n zh: readLocale('customized_locale_list.md', 'zh'),\n de: readLocale('customized_locale_list.md', 'de'),\n ar: readLocale('customized_locale_list.md', 'ar'),\n it: readLocale('customized_locale_list.md', 'it'),\n 'en-GB': readLocale('customized_locale_list.md', 'en-GB'),\n pt: readLocale('customized_locale_list.md', 'pt'),\n hi: readLocale('customized_locale_list.md', 'hi'),\n tr: readLocale('customized_locale_list.md', 'tr'),\n pl: readLocale('customized_locale_list.md', 'pl'),\n id: readLocale('customized_locale_list.md', 'id'),\n vi: readLocale('customized_locale_list.md', 'vi'),\n uk: readLocale('customized_locale_list.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/domain_routing.md': {\n en: readLocale('domain_routing.md', 'en'),\n es: readLocale('domain_routing.md', 'es'),\n ru: readLocale('domain_routing.md', 'ru'),\n ja: readLocale('domain_routing.md', 'ja'),\n fr: readLocale('domain_routing.md', 'fr'),\n ko: readLocale('domain_routing.md', 'ko'),\n zh: readLocale('domain_routing.md', 'zh'),\n de: readLocale('domain_routing.md', 'de'),\n ar: readLocale('domain_routing.md', 'ar'),\n it: readLocale('domain_routing.md', 'it'),\n 'en-GB': readLocale('domain_routing.md', 'en-GB'),\n pt: readLocale('domain_routing.md', 'pt'),\n hi: readLocale('domain_routing.md', 'hi'),\n tr: readLocale('domain_routing.md', 'tr'),\n pl: readLocale('domain_routing.md', 'pl'),\n id: readLocale('domain_routing.md', 'id'),\n vi: readLocale('domain_routing.md', 'vi'),\n uk: readLocale('domain_routing.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/error-vite-env-only.md': {\n en: readLocale('error-vite-env-only.md', 'en'),\n es: readLocale('error-vite-env-only.md', 'es'),\n ru: readLocale('error-vite-env-only.md', 'ru'),\n ja: readLocale('error-vite-env-only.md', 'ja'),\n fr: readLocale('error-vite-env-only.md', 'fr'),\n ko: readLocale('error-vite-env-only.md', 'ko'),\n zh: readLocale('error-vite-env-only.md', 'zh'),\n de: readLocale('error-vite-env-only.md', 'de'),\n ar: readLocale('error-vite-env-only.md', 'ar'),\n it: readLocale('error-vite-env-only.md', 'it'),\n 'en-GB': readLocale('error-vite-env-only.md', 'en-GB'),\n pt: readLocale('error-vite-env-only.md', 'pt'),\n hi: readLocale('error-vite-env-only.md', 'hi'),\n tr: readLocale('error-vite-env-only.md', 'tr'),\n pl: readLocale('error-vite-env-only.md', 'pl'),\n id: readLocale('error-vite-env-only.md', 'id'),\n vi: readLocale('error-vite-env-only.md', 'vi'),\n uk: readLocale('error-vite-env-only.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/esbuild_error.md': {\n en: readLocale('esbuild_error.md', 'en'),\n es: readLocale('esbuild_error.md', 'es'),\n ru: readLocale('esbuild_error.md', 'ru'),\n ja: readLocale('esbuild_error.md', 'ja'),\n fr: readLocale('esbuild_error.md', 'fr'),\n ko: readLocale('esbuild_error.md', 'ko'),\n zh: readLocale('esbuild_error.md', 'zh'),\n de: readLocale('esbuild_error.md', 'de'),\n ar: readLocale('esbuild_error.md', 'ar'),\n it: readLocale('esbuild_error.md', 'it'),\n 'en-GB': readLocale('esbuild_error.md', 'en-GB'),\n pt: readLocale('esbuild_error.md', 'pt'),\n hi: readLocale('esbuild_error.md', 'hi'),\n tr: readLocale('esbuild_error.md', 'tr'),\n pl: readLocale('esbuild_error.md', 'pl'),\n id: readLocale('esbuild_error.md', 'id'),\n vi: readLocale('esbuild_error.md', 'vi'),\n uk: readLocale('esbuild_error.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/get_locale_cookie.md': {\n en: readLocale('get_locale_cookie.md', 'en'),\n es: readLocale('get_locale_cookie.md', 'es'),\n ru: readLocale('get_locale_cookie.md', 'ru'),\n ja: readLocale('get_locale_cookie.md', 'ja'),\n fr: readLocale('get_locale_cookie.md', 'fr'),\n ko: readLocale('get_locale_cookie.md', 'ko'),\n zh: readLocale('get_locale_cookie.md', 'zh'),\n de: readLocale('get_locale_cookie.md', 'de'),\n ar: readLocale('get_locale_cookie.md', 'ar'),\n it: readLocale('get_locale_cookie.md', 'it'),\n 'en-GB': readLocale('get_locale_cookie.md', 'en-GB'),\n pt: readLocale('get_locale_cookie.md', 'pt'),\n hi: readLocale('get_locale_cookie.md', 'hi'),\n tr: readLocale('get_locale_cookie.md', 'tr'),\n pl: readLocale('get_locale_cookie.md', 'pl'),\n id: readLocale('get_locale_cookie.md', 'id'),\n vi: readLocale('get_locale_cookie.md', 'vi'),\n uk: readLocale('get_locale_cookie.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/intlayerNode.md': {\n en: readLocale('intlayerNode.md', 'en'),\n es: readLocale('intlayerNode.md', 'es'),\n ru: readLocale('intlayerNode.md', 'ru'),\n ja: readLocale('intlayerNode.md', 'ja'),\n fr: readLocale('intlayerNode.md', 'fr'),\n ko: readLocale('intlayerNode.md', 'ko'),\n zh: readLocale('intlayerNode.md', 'zh'),\n de: readLocale('intlayerNode.md', 'de'),\n ar: readLocale('intlayerNode.md', 'ar'),\n it: readLocale('intlayerNode.md', 'it'),\n 'en-GB': readLocale('intlayerNode.md', 'en-GB'),\n pt: readLocale('intlayerNode.md', 'pt'),\n hi: readLocale('intlayerNode.md', 'hi'),\n tr: readLocale('intlayerNode.md', 'tr'),\n pl: readLocale('intlayerNode.md', 'pl'),\n id: readLocale('intlayerNode.md', 'id'),\n vi: readLocale('intlayerNode.md', 'vi'),\n uk: readLocale('intlayerNode.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/intlayer_command_undefined.md': {\n en: readLocale('intlayer_command_undefined.md', 'en'),\n es: readLocale('intlayer_command_undefined.md', 'es'),\n ru: readLocale('intlayer_command_undefined.md', 'ru'),\n ja: readLocale('intlayer_command_undefined.md', 'ja'),\n fr: readLocale('intlayer_command_undefined.md', 'fr'),\n ko: readLocale('intlayer_command_undefined.md', 'ko'),\n zh: readLocale('intlayer_command_undefined.md', 'zh'),\n de: readLocale('intlayer_command_undefined.md', 'de'),\n ar: readLocale('intlayer_command_undefined.md', 'ar'),\n it: readLocale('intlayer_command_undefined.md', 'it'),\n 'en-GB': readLocale('intlayer_command_undefined.md', 'en-GB'),\n pt: readLocale('intlayer_command_undefined.md', 'pt'),\n hi: readLocale('intlayer_command_undefined.md', 'hi'),\n tr: readLocale('intlayer_command_undefined.md', 'tr'),\n pl: readLocale('intlayer_command_undefined.md', 'pl'),\n id: readLocale('intlayer_command_undefined.md', 'id'),\n vi: readLocale('intlayer_command_undefined.md', 'vi'),\n uk: readLocale('intlayer_command_undefined.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/locale_incorect_in_url.md': {\n en: readLocale('locale_incorect_in_url.md', 'en'),\n es: readLocale('locale_incorect_in_url.md', 'es'),\n ru: readLocale('locale_incorect_in_url.md', 'ru'),\n ja: readLocale('locale_incorect_in_url.md', 'ja'),\n fr: readLocale('locale_incorect_in_url.md', 'fr'),\n ko: readLocale('locale_incorect_in_url.md', 'ko'),\n zh: readLocale('locale_incorect_in_url.md', 'zh'),\n de: readLocale('locale_incorect_in_url.md', 'de'),\n ar: readLocale('locale_incorect_in_url.md', 'ar'),\n it: readLocale('locale_incorect_in_url.md', 'it'),\n 'en-GB': readLocale('locale_incorect_in_url.md', 'en-GB'),\n pt: readLocale('locale_incorect_in_url.md', 'pt'),\n hi: readLocale('locale_incorect_in_url.md', 'hi'),\n tr: readLocale('locale_incorect_in_url.md', 'tr'),\n pl: readLocale('locale_incorect_in_url.md', 'pl'),\n id: readLocale('locale_incorect_in_url.md', 'id'),\n vi: readLocale('locale_incorect_in_url.md', 'vi'),\n uk: readLocale('locale_incorect_in_url.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/package_version_error.md': {\n en: readLocale('package_version_error.md', 'en'),\n es: readLocale('package_version_error.md', 'es'),\n ru: readLocale('package_version_error.md', 'ru'),\n ja: readLocale('package_version_error.md', 'ja'),\n fr: readLocale('package_version_error.md', 'fr'),\n ko: readLocale('package_version_error.md', 'ko'),\n zh: readLocale('package_version_error.md', 'zh'),\n de: readLocale('package_version_error.md', 'de'),\n ar: readLocale('package_version_error.md', 'ar'),\n it: readLocale('package_version_error.md', 'it'),\n 'en-GB': readLocale('package_version_error.md', 'en-GB'),\n pt: readLocale('package_version_error.md', 'pt'),\n hi: readLocale('package_version_error.md', 'hi'),\n tr: readLocale('package_version_error.md', 'tr'),\n pl: readLocale('package_version_error.md', 'pl'),\n id: readLocale('package_version_error.md', 'id'),\n vi: readLocale('package_version_error.md', 'vi'),\n uk: readLocale('package_version_error.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/static_rendering.md': {\n en: readLocale('static_rendering.md', 'en'),\n es: readLocale('static_rendering.md', 'es'),\n ru: readLocale('static_rendering.md', 'ru'),\n ja: readLocale('static_rendering.md', 'ja'),\n fr: readLocale('static_rendering.md', 'fr'),\n ko: readLocale('static_rendering.md', 'ko'),\n zh: readLocale('static_rendering.md', 'zh'),\n de: readLocale('static_rendering.md', 'de'),\n ar: readLocale('static_rendering.md', 'ar'),\n it: readLocale('static_rendering.md', 'it'),\n 'en-GB': readLocale('static_rendering.md', 'en-GB'),\n pt: readLocale('static_rendering.md', 'pt'),\n hi: readLocale('static_rendering.md', 'hi'),\n tr: readLocale('static_rendering.md', 'tr'),\n pl: readLocale('static_rendering.md', 'pl'),\n id: readLocale('static_rendering.md', 'id'),\n vi: readLocale('static_rendering.md', 'vi'),\n uk: readLocale('static_rendering.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/translated_path_url.md': {\n en: readLocale('translated_path_url.md', 'en'),\n es: readLocale('translated_path_url.md', 'es'),\n ru: readLocale('translated_path_url.md', 'ru'),\n ja: readLocale('translated_path_url.md', 'ja'),\n fr: readLocale('translated_path_url.md', 'fr'),\n ko: readLocale('translated_path_url.md', 'ko'),\n zh: readLocale('translated_path_url.md', 'zh'),\n de: readLocale('translated_path_url.md', 'de'),\n ar: readLocale('translated_path_url.md', 'ar'),\n it: readLocale('translated_path_url.md', 'it'),\n 'en-GB': readLocale('translated_path_url.md', 'en-GB'),\n pt: readLocale('translated_path_url.md', 'pt'),\n hi: readLocale('translated_path_url.md', 'hi'),\n tr: readLocale('translated_path_url.md', 'tr'),\n pl: readLocale('translated_path_url.md', 'pl'),\n id: readLocale('translated_path_url.md', 'id'),\n vi: readLocale('translated_path_url.md', 'vi'),\n uk: readLocale('translated_path_url.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './frequent_questions/en/unknown_command.md': {\n en: readLocale('unknown_command.md', 'en'),\n es: readLocale('unknown_command.md', 'es'),\n ru: readLocale('unknown_command.md', 'ru'),\n ja: readLocale('unknown_command.md', 'ja'),\n fr: readLocale('unknown_command.md', 'fr'),\n ko: readLocale('unknown_command.md', 'ko'),\n zh: readLocale('unknown_command.md', 'zh'),\n de: readLocale('unknown_command.md', 'de'),\n ar: readLocale('unknown_command.md', 'ar'),\n it: readLocale('unknown_command.md', 'it'),\n 'en-GB': readLocale('unknown_command.md', 'en-GB'),\n pt: readLocale('unknown_command.md', 'pt'),\n hi: readLocale('unknown_command.md', 'hi'),\n tr: readLocale('unknown_command.md', 'tr'),\n pl: readLocale('unknown_command.md', 'pl'),\n id: readLocale('unknown_command.md', 'id'),\n vi: readLocale('unknown_command.md', 'vi'),\n uk: readLocale('unknown_command.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n} as const;\n"],"mappings":";;;;;;;;AAWA,MAAM,aACJ,OAAO,cAAc,cACjB,gBACAA,uBAAYC,qEAA6B,CAAC;AAEhD,IAAI;AACJ,IAAI;CAGF,MAAM,mBADiBC,0CAAkB,UACP,CAAC,CAAC,QAAQ,gBAAgB;CAC5D,cAAUC,2CAAmB,YAAY,CAAC,CAAC;AAC7C,QAAQ;CACN,IAAI;EAGF,MAAM,mBADiBD,0CACW,CAAC,CAAC,QAAQ,gBAAgB;EAC5D,cAAUC,2CAAmB,YAAY,CAAC,CAAC;CAC7C,QAAQ;EAEN,cAAUA,2CAAmB,UAAU,CAAC,CAAC;CAC3C;AACF;;;;AAKA,MAAM,iBAAiB,OACrB,qBACA,WACoB;CACpB,MAAM,cAAUC,gBACd,SACA,wBAAwB,OAAO,GAAG,qBACpC;CACA,QAAIC,oBAAW,OAAO,GACpB,OAAO,UAAMC,2BAAS,SAAS,MAAM;CAEvC,MAAM,cAAUF,gBACd,SACA,2BAA2B,qBAC7B;CACA,QAAIC,oBAAW,OAAO,GACpB,OAAO,UAAMC,2BAAS,SAAS,MAAM;CAGvC,MAAM,IAAI,MACR,0BAA0B,oBAAoB,aAAa,OAAO,WAAW,QAAQ,WAAW,SAClG;AACF;;;;;;;;;;;;;AAcA,MAAM,cACJ,qBACA,WACoB;CACpB,IAAI;CAEJ,MAAM,a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AAO;EACrD,IAAI,WAAW,0BAA0B,IAAI;EAC7C,IAAI,WAAW,0BAA0B,IAAI;EAC7C,IAAI,WAAW,0BAA0B,IAAI;EAC7C,IAAI,WAAW,0BAA0B,IAAI;EAC7C,IAAI,WAAW,0BAA0B,IAAI;EAC7C,IAAI,WAAW,0BAA0B,IAAI;EAC7C,IAAI,WAAW,0BAA0B,IAAI;CAC/C;CACA,8CAA8C;EAC5C,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,SAAS,WAAW,sBAAsB,OAAO;EACjD,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;EACzC,IAAI,WAAW,sBAAsB,IAAI;CAC3C;AACF"}
@@ -9,20 +9,49 @@ let _intlayer_config_utils = require("@intlayer/config/utils");
9
9
  const currentDir = typeof __dirname !== "undefined" ? __dirname : (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
10
10
  let baseDir;
11
11
  try {
12
- baseDir = (0, _intlayer_config_utils.getPackageJsonPath)((0, _intlayer_config_utils.getProjectRequire)(currentDir).resolve("@intlayer/docs")).baseDir;
12
+ const docEntryPath = (0, _intlayer_config_utils.getProjectRequire)(currentDir).resolve("@intlayer/docs");
13
+ baseDir = (0, _intlayer_config_utils.getPackageJsonPath)(docEntryPath).baseDir;
13
14
  } catch {
14
15
  try {
15
- baseDir = (0, _intlayer_config_utils.getPackageJsonPath)((0, _intlayer_config_utils.getProjectRequire)().resolve("@intlayer/docs")).baseDir;
16
+ const docEntryPath = (0, _intlayer_config_utils.getProjectRequire)().resolve("@intlayer/docs");
17
+ baseDir = (0, _intlayer_config_utils.getPackageJsonPath)(docEntryPath).baseDir;
16
18
  } catch {
17
19
  baseDir = (0, _intlayer_config_utils.getPackageJsonPath)(currentDir).baseDir;
18
20
  }
19
21
  }
20
- const readLocale = (relativeAfterLocale, locale) => {
22
+ /**
23
+ * Reads a document, preferring the requested locale and falling back to English.
24
+ */
25
+ const readLocaleFile = async (relativeAfterLocale, locale) => {
21
26
  const target1 = (0, node_path.join)(baseDir, `./legal/${locale}/${relativeAfterLocale}`);
22
- if ((0, node_fs.existsSync)(target1)) return (0, node_fs_promises.readFile)(target1, "utf8");
27
+ if ((0, node_fs.existsSync)(target1)) return await (0, node_fs_promises.readFile)(target1, "utf8");
23
28
  const target2 = (0, node_path.join)(baseDir, `./legal/en/${relativeAfterLocale}`);
24
- if ((0, node_fs.existsSync)(target2)) return (0, node_fs_promises.readFile)(target2, "utf8");
25
- return Promise.reject(/* @__PURE__ */ new Error(`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`));
29
+ if ((0, node_fs.existsSync)(target2)) return await (0, node_fs_promises.readFile)(target2, "utf8");
30
+ throw new Error(`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`);
31
+ };
32
+ /**
33
+ * Builds a lazy, awaitable handle over a document.
34
+ *
35
+ * The entry map below holds one handle per document *per locale*, so reading
36
+ * eagerly would pull every markdown file of every locale into memory as soon as
37
+ * this module is imported — hundreds of megabytes, duplicated in every
38
+ * prerender worker, for the handful of documents a page actually renders.
39
+ *
40
+ * The returned value is a thenable rather than a promise: consumers only ever
41
+ * `await` it, and `await` triggers `then`, so the file is read on first use and
42
+ * the resulting promise is cached for subsequent reads.
43
+ */
44
+ const readLocale = (relativeAfterLocale, locale) => {
45
+ let pendingRead;
46
+ const read = () => {
47
+ pendingRead ??= readLocaleFile(relativeAfterLocale, locale);
48
+ return pendingRead;
49
+ };
50
+ return {
51
+ then: (onFulfilled, onRejected) => read().then(onFulfilled, onRejected),
52
+ catch: (onRejected) => read().catch(onRejected),
53
+ finally: (onFinally) => read().finally(onFinally)
54
+ };
26
55
  };
27
56
  const legalEntry = {
28
57
  "./legal/en/privacy_notice.md": {
@@ -1 +1 @@
1
- {"version":3,"file":"legal.entry.cjs","names":[],"sources":["../../../src/generated/legal.entry.ts"],"sourcesContent":["/* AUTO-GENERATED – DO NOT EDIT */\n/* REGENERATE USING `pnpm prepare` */\nimport { existsSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { join, dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { getPackageJsonPath, getProjectRequire } from '@intlayer/config/utils';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\n\n// Robustly resolve the base directory of the @intlayer/docs package in both\n// bundled environments (Next.js) and standalone CLIs (MCP via npx).\nconst currentDir =\n typeof __dirname !== 'undefined'\n ? __dirname\n : pathDirname(fileURLToPath(import.meta.url));\n\nlet baseDir: string;\ntry {\n // Prefer resolving from the location of this file (works for CLIs).\n const projectRequire = getProjectRequire(currentDir);\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n} catch {\n try {\n // Fallback: resolve from the consumer project (works for apps/bundlers).\n const projectRequire = getProjectRequire();\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n } catch {\n // Last resort: walk up from currentDir (useful when executed inside @intlayer/docs).\n baseDir = getPackageJsonPath(currentDir).baseDir;\n }\n}\n\nconst readLocale = (\n relativeAfterLocale: string,\n locale: LocalesValues\n): Promise<string> => {\n const target1 = join(baseDir, `./legal/${locale}/${relativeAfterLocale}`);\n if (existsSync(target1)) {\n return readFile(target1, 'utf8');\n }\n const target2 = join(baseDir, `./legal/en/${relativeAfterLocale}`);\n if (existsSync(target2)) {\n return readFile(target2, 'utf8');\n }\n\n return Promise.reject(\n new Error(\n `[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`\n )\n );\n};\n\nexport const legalEntry = {\n './legal/en/privacy_notice.md': {\n en: readLocale('privacy_notice.md', 'en'),\n es: readLocale('privacy_notice.md', 'es'),\n ru: readLocale('privacy_notice.md', 'ru'),\n ja: readLocale('privacy_notice.md', 'ja'),\n fr: readLocale('privacy_notice.md', 'fr'),\n ko: readLocale('privacy_notice.md', 'ko'),\n zh: readLocale('privacy_notice.md', 'zh'),\n de: readLocale('privacy_notice.md', 'de'),\n ar: readLocale('privacy_notice.md', 'ar'),\n it: readLocale('privacy_notice.md', 'it'),\n 'en-GB': readLocale('privacy_notice.md', 'en-GB'),\n pt: readLocale('privacy_notice.md', 'pt'),\n hi: readLocale('privacy_notice.md', 'hi'),\n tr: readLocale('privacy_notice.md', 'tr'),\n pl: readLocale('privacy_notice.md', 'pl'),\n id: readLocale('privacy_notice.md', 'id'),\n vi: readLocale('privacy_notice.md', 'vi'),\n uk: readLocale('privacy_notice.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './legal/en/terms_of_service.md': {\n en: readLocale('terms_of_service.md', 'en'),\n es: readLocale('terms_of_service.md', 'es'),\n ru: readLocale('terms_of_service.md', 'ru'),\n ja: readLocale('terms_of_service.md', 'ja'),\n fr: readLocale('terms_of_service.md', 'fr'),\n ko: readLocale('terms_of_service.md', 'ko'),\n zh: readLocale('terms_of_service.md', 'zh'),\n de: readLocale('terms_of_service.md', 'de'),\n ar: readLocale('terms_of_service.md', 'ar'),\n it: readLocale('terms_of_service.md', 'it'),\n 'en-GB': readLocale('terms_of_service.md', 'en-GB'),\n pt: readLocale('terms_of_service.md', 'pt'),\n hi: readLocale('terms_of_service.md', 'hi'),\n tr: readLocale('terms_of_service.md', 'tr'),\n pl: readLocale('terms_of_service.md', 'pl'),\n id: readLocale('terms_of_service.md', 'id'),\n vi: readLocale('terms_of_service.md', 'vi'),\n uk: readLocale('terms_of_service.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n} as const;\n"],"mappings":";;;;;;;;AAWA,MAAM,aACJ,OAAO,cAAc,cACjB,4GACyC,CAAC;AAEhD,IAAI;AACJ,IAAI;CAIF,uGAFyC,UACP,CAAC,CAAC,QAAQ,gBACJ,CAAC,CAAC,CAAC;AAC7C,QAAQ;CACN,IAAI;EAIF,uGADkC,CAAC,CAAC,QAAQ,gBACJ,CAAC,CAAC,CAAC;CAC7C,QAAQ;EAEN,yDAA6B,UAAU,CAAC,CAAC;CAC3C;AACF;AAEA,MAAM,cACJ,qBACA,WACoB;CACpB,MAAM,8BAAe,SAAS,WAAW,OAAO,GAAG,qBAAqB;CACxE,4BAAe,OAAO,GACpB,sCAAgB,SAAS,MAAM;CAEjC,MAAM,8BAAe,SAAS,cAAc,qBAAqB;CACjE,4BAAe,OAAO,GACpB,sCAAgB,SAAS,MAAM;CAGjC,OAAO,QAAQ,uBACb,IAAI,MACF,0BAA0B,oBAAoB,aAAa,OAAO,WAAW,QAAQ,WAAW,SAClG,CACF;AACF;AAEA,MAAa,aAAa;CACxB,gCAAgC;EAC9B,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,SAAS,WAAW,qBAAqB,OAAO;EAChD,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;EACxC,IAAI,WAAW,qBAAqB,IAAI;CAC1C;CACA,kCAAkC;EAChC,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,SAAS,WAAW,uBAAuB,OAAO;EAClD,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;EAC1C,IAAI,WAAW,uBAAuB,IAAI;CAC5C;AACF"}
1
+ {"version":3,"file":"legal.entry.cjs","names":["pathDirname","fileURLToPath","getProjectRequire","getPackageJsonPath","join","existsSync","readFile"],"sources":["../../../src/generated/legal.entry.ts"],"sourcesContent":["/* AUTO-GENERATED – DO NOT EDIT */\n/* REGENERATE USING `pnpm prepare` */\nimport { existsSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { join, dirname as pathDirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { getPackageJsonPath, getProjectRequire } from '@intlayer/config/utils';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\n\n// Robustly resolve the base directory of the @intlayer/docs package in both\n// bundled environments (Next.js) and standalone CLIs (MCP via npx).\nconst currentDir =\n typeof __dirname !== 'undefined'\n ? __dirname\n : pathDirname(fileURLToPath(import.meta.url));\n\nlet baseDir: string;\ntry {\n // Prefer resolving from the location of this file (works for CLIs).\n const projectRequire = getProjectRequire(currentDir);\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n} catch {\n try {\n // Fallback: resolve from the consumer project (works for apps/bundlers).\n const projectRequire = getProjectRequire();\n const docEntryPath = projectRequire.resolve('@intlayer/docs');\n baseDir = getPackageJsonPath(docEntryPath).baseDir;\n } catch {\n // Last resort: walk up from currentDir (useful when executed inside @intlayer/docs).\n baseDir = getPackageJsonPath(currentDir).baseDir;\n }\n}\n\n/**\n * Reads a document, preferring the requested locale and falling back to English.\n */\nconst readLocaleFile = async (\n relativeAfterLocale: string,\n locale: LocalesValues\n): Promise<string> => {\n const target1 = join(baseDir, `./legal/${locale}/${relativeAfterLocale}`);\n if (existsSync(target1)) {\n return await readFile(target1, 'utf8');\n }\n const target2 = join(baseDir, `./legal/en/${relativeAfterLocale}`);\n if (existsSync(target2)) {\n return await readFile(target2, 'utf8');\n }\n\n throw new Error(\n `[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`\n );\n};\n\n/**\n * Builds a lazy, awaitable handle over a document.\n *\n * The entry map below holds one handle per document *per locale*, so reading\n * eagerly would pull every markdown file of every locale into memory as soon as\n * this module is imported — hundreds of megabytes, duplicated in every\n * prerender worker, for the handful of documents a page actually renders.\n *\n * The returned value is a thenable rather than a promise: consumers only ever\n * `await` it, and `await` triggers `then`, so the file is read on first use and\n * the resulting promise is cached for subsequent reads.\n */\nconst readLocale = (\n relativeAfterLocale: string,\n locale: LocalesValues\n): Promise<string> => {\n let pendingRead: Promise<string> | undefined;\n\n const read = (): Promise<string> => {\n pendingRead ??= readLocaleFile(relativeAfterLocale, locale);\n return pendingRead;\n };\n\n return {\n // biome-ignore lint/suspicious/noThenProperty: the thenable is intentional — `await` is what triggers the lazy read.\n then: (onFulfilled, onRejected) => read().then(onFulfilled, onRejected),\n catch: (onRejected) => read().catch(onRejected),\n finally: (onFinally) => read().finally(onFinally),\n } as Promise<string>;\n};\n\nexport const legalEntry = {\n './legal/en/privacy_notice.md': {\n en: readLocale('privacy_notice.md', 'en'),\n es: readLocale('privacy_notice.md', 'es'),\n ru: readLocale('privacy_notice.md', 'ru'),\n ja: readLocale('privacy_notice.md', 'ja'),\n fr: readLocale('privacy_notice.md', 'fr'),\n ko: readLocale('privacy_notice.md', 'ko'),\n zh: readLocale('privacy_notice.md', 'zh'),\n de: readLocale('privacy_notice.md', 'de'),\n ar: readLocale('privacy_notice.md', 'ar'),\n it: readLocale('privacy_notice.md', 'it'),\n 'en-GB': readLocale('privacy_notice.md', 'en-GB'),\n pt: readLocale('privacy_notice.md', 'pt'),\n hi: readLocale('privacy_notice.md', 'hi'),\n tr: readLocale('privacy_notice.md', 'tr'),\n pl: readLocale('privacy_notice.md', 'pl'),\n id: readLocale('privacy_notice.md', 'id'),\n vi: readLocale('privacy_notice.md', 'vi'),\n uk: readLocale('privacy_notice.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n './legal/en/terms_of_service.md': {\n en: readLocale('terms_of_service.md', 'en'),\n es: readLocale('terms_of_service.md', 'es'),\n ru: readLocale('terms_of_service.md', 'ru'),\n ja: readLocale('terms_of_service.md', 'ja'),\n fr: readLocale('terms_of_service.md', 'fr'),\n ko: readLocale('terms_of_service.md', 'ko'),\n zh: readLocale('terms_of_service.md', 'zh'),\n de: readLocale('terms_of_service.md', 'de'),\n ar: readLocale('terms_of_service.md', 'ar'),\n it: readLocale('terms_of_service.md', 'it'),\n 'en-GB': readLocale('terms_of_service.md', 'en-GB'),\n pt: readLocale('terms_of_service.md', 'pt'),\n hi: readLocale('terms_of_service.md', 'hi'),\n tr: readLocale('terms_of_service.md', 'tr'),\n pl: readLocale('terms_of_service.md', 'pl'),\n id: readLocale('terms_of_service.md', 'id'),\n vi: readLocale('terms_of_service.md', 'vi'),\n uk: readLocale('terms_of_service.md', 'uk'),\n } as unknown as Record<LocalesValues, Promise<string>>,\n} as const;\n"],"mappings":";;;;;;;;AAWA,MAAM,aACJ,OAAO,cAAc,cACjB,gBACAA,uBAAYC,qEAA6B,CAAC;AAEhD,IAAI;AACJ,IAAI;CAGF,MAAM,mBADiBC,0CAAkB,UACP,CAAC,CAAC,QAAQ,gBAAgB;CAC5D,cAAUC,2CAAmB,YAAY,CAAC,CAAC;AAC7C,QAAQ;CACN,IAAI;EAGF,MAAM,mBADiBD,0CACW,CAAC,CAAC,QAAQ,gBAAgB;EAC5D,cAAUC,2CAAmB,YAAY,CAAC,CAAC;CAC7C,QAAQ;EAEN,cAAUA,2CAAmB,UAAU,CAAC,CAAC;CAC3C;AACF;;;;AAKA,MAAM,iBAAiB,OACrB,qBACA,WACoB;CACpB,MAAM,cAAUC,gBAAK,SAAS,WAAW,OAAO,GAAG,qBAAqB;CACxE,QAAIC,oBAAW,OAAO,GACpB,OAAO,UAAMC,2BAAS,SAAS,MAAM;CAEvC,MAAM,cAAUF,gBAAK,SAAS,cAAc,qBAAqB;CACjE,QAAIC,oBAAW,OAAO,GACpB,OAAO,UAAMC,2BAAS,SAAS,MAAM;CAGvC,MAAM,IAAI,MACR,0BAA0B,oBAAoB,aAAa,OAAO,WAAW,QAAQ,WAAW,SAClG;AACF;;;;;;;;;;;;;AAcA,MAAM,cACJ,qBACA,WACoB;CACpB,IAAI;CAEJ,MAAM,aAA8B;EAClC,gBAAgB,eAAe,qBAAqB,MAAM;EAC1D,OAAO;CACT;CAEA,OAAO;EAEL,OAAO,aAAa,eAAe,KAAK,CAAC,CAAC,KAAK,aAAa,UAAU;EACtE,QAAQ,eAAe,KAAK,CAAC,CAAC,MAAM,UAAU;EAC9C,UAAU,cAAc,KAAK,CAAC,CAAC,QAAQ,SAAS;CAClD;AACF;AAEA,MAAa,aAAa;CAC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F"}
@@ -45,12 +45,35 @@ const getFileMetadata = async (files, docKey, locale = defaultLocale) => {
45
45
  const file = await getFile(files, docKey, locale);
46
46
  return formatMetadata(docKey, file, locale);
47
47
  };
48
- const getFileMetadataRecord = async (files, locale = defaultLocale) => {
48
+ /**
49
+ * Per-locale metadata records, keyed by the entry map they were built from.
50
+ *
51
+ * Building a record parses the frontmatter of every document of a category, and
52
+ * callers such as {@link getFileMetadataBySlug} need the whole record just to
53
+ * resolve a single slug — which a static site generator repeats for every page
54
+ * it renders. Documents are read once per process anyway (each entry caches its
55
+ * own read), so the derived metadata is equally safe to keep.
56
+ */
57
+ const fileMetadataRecordCache = /* @__PURE__ */ new WeakMap();
58
+ const buildFileMetadataRecord = async (files, locale) => {
49
59
  const filesEntries = (await Promise.allSettled(Object.entries(files).map(async ([key]) => {
50
60
  return [key, await getFileMetadata(files, key, locale)];
51
61
  }))).filter((r) => r.status === "fulfilled").map((r) => r.value);
52
62
  return Object.fromEntries(filesEntries);
53
63
  };
64
+ const getFileMetadataRecord = async (files, locale = defaultLocale) => {
65
+ let localeCache = fileMetadataRecordCache.get(files);
66
+ if (!localeCache) {
67
+ localeCache = /* @__PURE__ */ new Map();
68
+ fileMetadataRecordCache.set(files, localeCache);
69
+ }
70
+ let record = localeCache.get(locale);
71
+ if (!record) {
72
+ record = buildFileMetadataRecord(files, locale);
73
+ localeCache.set(locale, record);
74
+ }
75
+ return await record;
76
+ };
54
77
  const getFileMetadataBySlug = async (files, slugs, locale = defaultLocale, strict = false) => {
55
78
  const slugsArray = Array.isArray(slugs) ? slugs : [slugs];
56
79
  const filesMetadata = await getFileMetadataRecord(files, defaultLocale);
@@ -1 +1 @@
1
- {"version":3,"file":"common.mjs","names":[],"sources":["../../src/common.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { getLocalizedUrl } from '@intlayer/core/localization';\nimport { getMarkdownMetadata } from '@intlayer/core/transpiler';\nimport * as Locales from '@intlayer/types/locales';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\n\nexport const defaultLocale = Locales.ENGLISH;\n\nexport const GITHUB_URL_PREFIX =\n 'https://github.com/aymericzip/intlayer/blob/main/docs';\nexport const URL_PREFIX = 'https://intlayer.org/';\n\nexport const getKeys = <T extends Record<string, any>>(obj: T): (keyof T)[] =>\n Object.keys(obj) as (keyof T)[];\n\nexport const getFiles = async <\n F extends Record<`./${string}`, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n lang: LocalesValues = defaultLocale as LocalesValues\n): Promise<Record<string, string>> => {\n const filesEntries = await Promise.all(\n Object.entries(files)\n .map(([key, value]) => [key, value[lang as LocalesValues]])\n .map(async ([key, value]) => [key, await value])\n );\n const filesResult = Object.fromEntries(filesEntries);\n return filesResult;\n};\n\nexport const getFile = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n docKey: keyof F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<string> => {\n const fileRecord = files[docKey];\n\n if (!fileRecord) {\n throw new Error(`File ${docKey as string} not found`);\n }\n\n const file = await files[docKey]?.[locale];\n\n if (!file) {\n const englishFile = await files[docKey]?.[defaultLocale as LocalesValues];\n\n if (!englishFile) {\n throw new Error(`File ${docKey as string} not found`);\n }\n\n return englishFile;\n }\n\n return file;\n};\n\nexport type FileMetadata = {\n docKey: string;\n url: string;\n relativeUrl: string;\n githubUrl: string;\n title: string;\n slugs: string[];\n description: string;\n keywords: string[];\n updatedAt: string;\n createdAt: string;\n author?: string;\n youtubeVideo?: string;\n applicationTemplate?: string;\n applicationShowcase?: string;\n history?: {\n version: string;\n date: string;\n changes: string;\n }[];\n};\n\nexport const formatMetadata = (\n docKey: string,\n file: string,\n locale: LocalesValues = defaultLocale as LocalesValues\n): FileMetadata => {\n const metadata = getMarkdownMetadata(file);\n\n const slugs = (metadata.slugs ?? []).map(String);\n const keywords = (metadata.keywords ?? []).map(String);\n\n const relativeUrl = join('/', ...slugs);\n\n const slicedDocKey = docKey.slice(1);\n\n // Normalise author: accept both a plain string handle (new format)\n // and a legacy object `{ github: '...' }` — always reduce to a plain string.\n const rawAuthor = metadata.author as\n | string\n | { name?: string; github?: string }\n | undefined;\n const author: string | undefined =\n typeof rawAuthor === 'string'\n ? rawAuthor || undefined\n : rawAuthor?.github || undefined;\n\n return {\n ...metadata,\n docKey,\n slugs,\n keywords,\n author,\n githubUrl: `${GITHUB_URL_PREFIX}${slicedDocKey}`.replace(\n '/en/',\n `/${locale}/`\n ),\n relativeUrl: getLocalizedUrl(relativeUrl, locale),\n url: getLocalizedUrl(join(URL_PREFIX, relativeUrl), locale),\n } as FileMetadata;\n};\n\nexport const getFileMetadata = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n R extends FileMetadata,\n>(\n files: F,\n docKey: keyof F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<R> => {\n const file = await getFile(files, docKey, locale);\n\n return formatMetadata(docKey as string, file, locale) as R;\n};\n\nexport const getFileMetadataRecord = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<Record<keyof F, FileMetadata>> => {\n const results = await Promise.allSettled(\n Object.entries(files).map(async ([key]) => {\n const metadata = await getFileMetadata(files, key as keyof F, locale);\n return [key, metadata] as [string, FileMetadata];\n })\n );\n const filesEntries = results\n .filter(\n (r): r is PromiseFulfilledResult<[string, FileMetadata]> =>\n r.status === 'fulfilled'\n )\n .map((r) => r.value);\n const filesResult = Object.fromEntries(filesEntries);\n return filesResult as Record<keyof F, FileMetadata>;\n};\n\nexport const getFileMetadataBySlug = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n slugs: string | string[],\n locale: LocalesValues = defaultLocale as LocalesValues,\n strict = false\n) => {\n const slugsArray = Array.isArray(slugs) ? slugs : [slugs];\n const filesMetadata = await getFileMetadataRecord(\n files,\n defaultLocale as LocalesValues\n );\n\n let fileMetadataArray: FileMetadata[] = Object.values(filesMetadata).filter(\n (fileMetadata) =>\n slugsArray.every((slug) => fileMetadata.slugs?.includes(slug))\n );\n\n if (strict) {\n fileMetadataArray = fileMetadataArray.filter(\n (fileMetadata) => fileMetadata.slugs.length === slugsArray.length\n );\n }\n\n if (locale !== defaultLocale) {\n const localizedFileMetadata = await Promise.all(\n fileMetadataArray.map(\n async (fileMetadata) =>\n await getFileMetadata(files, fileMetadata.docKey, locale)\n )\n );\n\n return localizedFileMetadata;\n }\n\n return fileMetadataArray;\n};\n\nexport const getFileBySlug = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n slugs: string | string[],\n locale: LocalesValues = defaultLocale as LocalesValues,\n strict = false\n) => {\n const slugsArray = Array.isArray(slugs) ? slugs : [slugs];\n const filesMetadata = await getFileMetadataRecord(\n files,\n defaultLocale as LocalesValues\n );\n\n let fileMetadataArray = Object.values(filesMetadata).filter((fileMetadata) =>\n slugsArray.every((slug) => fileMetadata.slugs?.includes(slug))\n );\n\n if (strict) {\n fileMetadataArray = fileMetadataArray.filter(\n (fileMetadata) => fileMetadata.slugs.length === slugsArray.length\n );\n }\n\n const fileList = await Promise.all(\n fileMetadataArray.map(async (fileMetadata) => {\n const file = await getFile(files, fileMetadata.docKey, locale);\n return file;\n })\n );\n\n return fileList;\n};\n"],"mappings":";;;;;;AAMA,MAAa,gBAAgB,QAAQ;AAErC,MAAa,oBACX;AACF,MAAa,aAAa;AAE1B,MAAa,WAA0C,QACrD,OAAO,KAAK,GAAG;AAEjB,MAAa,WAAW,OAGtB,OACA,OAAsB,kBACc;CACpC,MAAM,eAAe,MAAM,QAAQ,IACjC,OAAO,QAAQ,KAAK,CAAC,CAClB,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,MAAM,KAAsB,CAAC,CAAC,CAC1D,IAAI,OAAO,CAAC,KAAK,WAAW,CAAC,KAAK,MAAM,KAAK,CAAC,CACnD;CAEA,OADoB,OAAO,YAAY,YACtB;AACnB;AAEA,MAAa,UAAU,OAGrB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C4B,CACzB,QACE,MACC,EAAE,WAAW,WACjB,CAAC,CACA,KAAK,MAAM,EAAE,KAAK;CAErB,OADoB,OAAO,YAAY,YACtB;AACnB;AAEA,MAAa,wBAAwB,OAGnC,OACA,OACA,SAAwB,eACxB,SAAS,UACN;CACH,MAAM,aAAa,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;CACxD,MAAM,gBAAgB,MAAM,sBAC1B,OACA,aACF;CAEA,IAAI,oBAAoC,OAAO,OAAO,aAAa,CAAC,CAAC,QAClE,iBACC,WAAW,OAAO,SAAS,aAAa,OAAO,SAAS,IAAI,CAAC,CACjE;CAEA,IAAI,QACF,oBAAoB,kBAAkB,QACnC,iBAAiB,aAAa,MAAM,WAAW,WAAW,MAC7D;CAGF,IAAI,WAAW,eAQb,OAAO,MAP6B,QAAQ,IAC1C,kBAAkB,IAChB,OAAO,iBACL,MAAM,gBAAgB,OAAO,aAAa,QAAQ,MAAM,CAC5D,CACF;CAKF,OAAO;AACT;AAEA,MAAa,gBAAgB,OAG3B,OACA,OACA,SAAwB,eACxB,SAAS,UACN;CACH,MAAM,aAAa,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;CACxD,MAAM,gBAAgB,MAAM,sBAC1B,OACA,aACF;CAEA,IAAI,oBAAoB,OAAO,OAAO,aAAa,CAAC,CAAC,QAAQ,iBAC3D,WAAW,OAAO,SAAS,aAAa,OAAO,SAAS,IAAI,CAAC,CAC/D;CAEA,IAAI,QACF,oBAAoB,kBAAkB,QACnC,iBAAiB,aAAa,MAAM,WAAW,WAAW,MAC7D;CAUF,OAAO,MAPgB,QAAQ,IAC7B,kBAAkB,IAAI,OAAO,iBAAiB;EAE5C,OAAO,MADY,QAAQ,OAAO,aAAa,QAAQ,MAAM;CAE/D,CAAC,CACH;AAGF"}
1
+ {"version":3,"file":"common.mjs","names":[],"sources":["../../src/common.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { getLocalizedUrl } from '@intlayer/core/localization';\nimport { getMarkdownMetadata } from '@intlayer/core/transpiler';\nimport * as Locales from '@intlayer/types/locales';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\n\nexport const defaultLocale = Locales.ENGLISH;\n\nexport const GITHUB_URL_PREFIX =\n 'https://github.com/aymericzip/intlayer/blob/main/docs';\nexport const URL_PREFIX = 'https://intlayer.org/';\n\nexport const getKeys = <T extends Record<string, any>>(obj: T): (keyof T)[] =>\n Object.keys(obj) as (keyof T)[];\n\nexport const getFiles = async <\n F extends Record<`./${string}`, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n lang: LocalesValues = defaultLocale as LocalesValues\n): Promise<Record<string, string>> => {\n const filesEntries = await Promise.all(\n Object.entries(files)\n .map(([key, value]) => [key, value[lang as LocalesValues]])\n .map(async ([key, value]) => [key, await value])\n );\n const filesResult = Object.fromEntries(filesEntries);\n return filesResult;\n};\n\nexport const getFile = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n docKey: keyof F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<string> => {\n const fileRecord = files[docKey];\n\n if (!fileRecord) {\n throw new Error(`File ${docKey as string} not found`);\n }\n\n const file = await files[docKey]?.[locale];\n\n if (!file) {\n const englishFile = await files[docKey]?.[defaultLocale as LocalesValues];\n\n if (!englishFile) {\n throw new Error(`File ${docKey as string} not found`);\n }\n\n return englishFile;\n }\n\n return file;\n};\n\nexport type FileMetadata = {\n docKey: string;\n url: string;\n relativeUrl: string;\n githubUrl: string;\n title: string;\n slugs: string[];\n description: string;\n keywords: string[];\n updatedAt: string;\n createdAt: string;\n author?: string;\n youtubeVideo?: string;\n applicationTemplate?: string;\n applicationShowcase?: string;\n history?: {\n version: string;\n date: string;\n changes: string;\n }[];\n};\n\nexport const formatMetadata = (\n docKey: string,\n file: string,\n locale: LocalesValues = defaultLocale as LocalesValues\n): FileMetadata => {\n const metadata = getMarkdownMetadata(file);\n\n const slugs = (metadata.slugs ?? []).map(String);\n const keywords = (metadata.keywords ?? []).map(String);\n\n const relativeUrl = join('/', ...slugs);\n\n const slicedDocKey = docKey.slice(1);\n\n // Normalise author: accept both a plain string handle (new format)\n // and a legacy object `{ github: '...' }` — always reduce to a plain string.\n const rawAuthor = metadata.author as\n | string\n | { name?: string; github?: string }\n | undefined;\n const author: string | undefined =\n typeof rawAuthor === 'string'\n ? rawAuthor || undefined\n : rawAuthor?.github || undefined;\n\n return {\n ...metadata,\n docKey,\n slugs,\n keywords,\n author,\n githubUrl: `${GITHUB_URL_PREFIX}${slicedDocKey}`.replace(\n '/en/',\n `/${locale}/`\n ),\n relativeUrl: getLocalizedUrl(relativeUrl, locale),\n url: getLocalizedUrl(join(URL_PREFIX, relativeUrl), locale),\n } as FileMetadata;\n};\n\nexport const getFileMetadata = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n R extends FileMetadata,\n>(\n files: F,\n docKey: keyof F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<R> => {\n const file = await getFile(files, docKey, locale);\n\n return formatMetadata(docKey as string, file, locale) as R;\n};\n\n/**\n * Per-locale metadata records, keyed by the entry map they were built from.\n *\n * Building a record parses the frontmatter of every document of a category, and\n * callers such as {@link getFileMetadataBySlug} need the whole record just to\n * resolve a single slug — which a static site generator repeats for every page\n * it renders. Documents are read once per process anyway (each entry caches its\n * own read), so the derived metadata is equally safe to keep.\n */\nconst fileMetadataRecordCache = new WeakMap<\n Record<string, unknown>,\n Map<LocalesValues, Promise<Record<string, FileMetadata>>>\n>();\n\nconst buildFileMetadataRecord = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n locale: LocalesValues\n): Promise<Record<keyof F, FileMetadata>> => {\n const results = await Promise.allSettled(\n Object.entries(files).map(async ([key]) => {\n const metadata = await getFileMetadata(files, key as keyof F, locale);\n return [key, metadata] as [string, FileMetadata];\n })\n );\n const filesEntries = results\n .filter(\n (r): r is PromiseFulfilledResult<[string, FileMetadata]> =>\n r.status === 'fulfilled'\n )\n .map((r) => r.value);\n const filesResult = Object.fromEntries(filesEntries);\n return filesResult as Record<keyof F, FileMetadata>;\n};\n\nexport const getFileMetadataRecord = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n locale: LocalesValues = defaultLocale as LocalesValues\n): Promise<Record<keyof F, FileMetadata>> => {\n let localeCache = fileMetadataRecordCache.get(files);\n\n if (!localeCache) {\n localeCache = new Map();\n fileMetadataRecordCache.set(files, localeCache);\n }\n\n let record = localeCache.get(locale);\n\n if (!record) {\n record = buildFileMetadataRecord(files, locale);\n localeCache.set(locale, record);\n }\n\n return (await record) as Record<keyof F, FileMetadata>;\n};\n\nexport const getFileMetadataBySlug = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n slugs: string | string[],\n locale: LocalesValues = defaultLocale as LocalesValues,\n strict = false\n) => {\n const slugsArray = Array.isArray(slugs) ? slugs : [slugs];\n const filesMetadata = await getFileMetadataRecord(\n files,\n defaultLocale as LocalesValues\n );\n\n let fileMetadataArray: FileMetadata[] = Object.values(filesMetadata).filter(\n (fileMetadata) =>\n slugsArray.every((slug) => fileMetadata.slugs?.includes(slug))\n );\n\n if (strict) {\n fileMetadataArray = fileMetadataArray.filter(\n (fileMetadata) => fileMetadata.slugs.length === slugsArray.length\n );\n }\n\n if (locale !== defaultLocale) {\n const localizedFileMetadata = await Promise.all(\n fileMetadataArray.map(\n async (fileMetadata) =>\n await getFileMetadata(files, fileMetadata.docKey, locale)\n )\n );\n\n return localizedFileMetadata;\n }\n\n return fileMetadataArray;\n};\n\nexport const getFileBySlug = async <\n F extends Record<string, Record<LocalesValues, Promise<string>>>,\n>(\n files: F,\n slugs: string | string[],\n locale: LocalesValues = defaultLocale as LocalesValues,\n strict = false\n) => {\n const slugsArray = Array.isArray(slugs) ? slugs : [slugs];\n const filesMetadata = await getFileMetadataRecord(\n files,\n defaultLocale as LocalesValues\n );\n\n let fileMetadataArray = Object.values(filesMetadata).filter((fileMetadata) =>\n slugsArray.every((slug) => fileMetadata.slugs?.includes(slug))\n );\n\n if (strict) {\n fileMetadataArray = fileMetadataArray.filter(\n (fileMetadata) => fileMetadata.slugs.length === slugsArray.length\n );\n }\n\n const fileList = await Promise.all(\n fileMetadataArray.map(async (fileMetadata) => {\n const file = await getFile(files, fileMetadata.docKey, locale);\n return file;\n })\n );\n\n return fileList;\n};\n"],"mappings":";;;;;;AAMA,MAAa,gBAAgB,QAAQ;AAErC,MAAa,oBACX;AACF,MAAa,aAAa;AAE1B,MAAa,WAA0C,QACrD,OAAO,KAAK,GAAG;AAEjB,MAAa,WAAW,OAGtB,OACA,OAAsB,kBACc;CACpC,MAAM,eAAe,MAAM,QAAQ,IACjC,OAAO,QAAQ,KAAK,CAAC,CAClB,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,MAAM,KAAsB,CAAC,CAAC,CAC1D,IAAI,OAAO,CAAC,KAAK,WAAW,CAAC,KAAK,MAAM,KAAK,CAAC,CACnD;CAEA,OADoB,OAAO,YAAY,YACtB;AACnB;AAEA,MAAa,UAAU,OAGrB,OACA,QACA,SAAwB,kBACJ;CAGpB,IAAI,CAFe,MAAM,SAGvB,MAAM,IAAI,MAAM,QAAQ,OAAiB,WAAW;CAGtD,MAAM,OAAO,MAAM,MAAM,OAAO,GAAG;CAEnC,IAAI,CAAC,MAAM;EACT,MAAM,cAAc,MAAM,MAAM,OAAO,GAAG;EAE1C,IAAI,CAAC,aACH,MAAM,IAAI,MAAM,QAAQ,OAAiB,WAAW;EAGtD,OAAO;CACT;CAEA,OAAO;AACT;AAwBA,MAAa,kBACX,QACA,MACA,SAAwB,kBACP;CACjB,MAAM,WAAW,oBAAoB,IAAI;CAEzC,MAAM,SAAS,SAAS,SAAS,CAAC,EAAC,CAAE,IAAI,MAAM;CAC/C,MAAM,YAAY,SAAS,YAAY,CAAC,EAAC,CAAE,IAAI,MAAM;CAErD,MAAM,cAAc,KAAK,KAAK,GAAG,KAAK;CAEtC,M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,aAAa,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;CACxD,MAAM,gBAAgB,MAAM,sBAC1B,OACA,aACF;CAEA,IAAI,oBAAoC,OAAO,OAAO,aAAa,CAAC,CAAC,QAClE,iBACC,WAAW,OAAO,SAAS,aAAa,OAAO,SAAS,IAAI,CAAC,CACjE;CAEA,IAAI,QACF,oBAAoB,kBAAkB,QACnC,iBAAiB,aAAa,MAAM,WAAW,WAAW,MAC7D;CAGF,IAAI,WAAW,eAQb,OAAO,MAP6B,QAAQ,IAC1C,kBAAkB,IAChB,OAAO,iBACL,MAAM,gBAAgB,OAAO,aAAa,QAAQ,MAAM,CAC5D,CACF;CAKF,OAAO;AACT;AAEA,MAAa,gBAAgB,OAG3B,OACA,OACA,SAAwB,eACxB,SAAS,UACN;CACH,MAAM,aAAa,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;CACxD,MAAM,gBAAgB,MAAM,sBAC1B,OACA,aACF;CAEA,IAAI,oBAAoB,OAAO,OAAO,aAAa,CAAC,CAAC,QAAQ,iBAC3D,WAAW,OAAO,SAAS,aAAa,OAAO,SAAS,IAAI,CAAC,CAC/D;CAEA,IAAI,QACF,oBAAoB,kBAAkB,QACnC,iBAAiB,aAAa,MAAM,WAAW,WAAW,MAC7D;CAUF,OAAO,MAPgB,QAAQ,IAC7B,kBAAkB,IAAI,OAAO,iBAAiB;EAE5C,OAAO,MADY,QAAQ,OAAO,aAAa,QAAQ,MAAM;CAE/D,CAAC,CACH;AAGF"}
@@ -8,20 +8,49 @@ import { getPackageJsonPath, getProjectRequire } from "@intlayer/config/utils";
8
8
  const currentDir = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
9
9
  let baseDir;
10
10
  try {
11
- baseDir = getPackageJsonPath(getProjectRequire(currentDir).resolve("@intlayer/docs")).baseDir;
11
+ const docEntryPath = getProjectRequire(currentDir).resolve("@intlayer/docs");
12
+ baseDir = getPackageJsonPath(docEntryPath).baseDir;
12
13
  } catch {
13
14
  try {
14
- baseDir = getPackageJsonPath(getProjectRequire().resolve("@intlayer/docs")).baseDir;
15
+ const docEntryPath = getProjectRequire().resolve("@intlayer/docs");
16
+ baseDir = getPackageJsonPath(docEntryPath).baseDir;
15
17
  } catch {
16
18
  baseDir = getPackageJsonPath(currentDir).baseDir;
17
19
  }
18
20
  }
19
- const readLocale = (relativeAfterLocale, locale) => {
21
+ /**
22
+ * Reads a document, preferring the requested locale and falling back to English.
23
+ */
24
+ const readLocaleFile = async (relativeAfterLocale, locale) => {
20
25
  const target1 = join(baseDir, `./blog/${locale}/${relativeAfterLocale}`);
21
- if (existsSync(target1)) return readFile(target1, "utf8");
26
+ if (existsSync(target1)) return await readFile(target1, "utf8");
22
27
  const target2 = join(baseDir, `./blog/en/${relativeAfterLocale}`);
23
- if (existsSync(target2)) return readFile(target2, "utf8");
24
- return Promise.reject(/* @__PURE__ */ new Error(`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`));
28
+ if (existsSync(target2)) return await readFile(target2, "utf8");
29
+ throw new Error(`[docs] File not found: ${relativeAfterLocale} - locale: ${locale} - path: ${target1} - path: ${target2}`);
30
+ };
31
+ /**
32
+ * Builds a lazy, awaitable handle over a document.
33
+ *
34
+ * The entry map below holds one handle per document *per locale*, so reading
35
+ * eagerly would pull every markdown file of every locale into memory as soon as
36
+ * this module is imported — hundreds of megabytes, duplicated in every
37
+ * prerender worker, for the handful of documents a page actually renders.
38
+ *
39
+ * The returned value is a thenable rather than a promise: consumers only ever
40
+ * `await` it, and `await` triggers `then`, so the file is read on first use and
41
+ * the resulting promise is cached for subsequent reads.
42
+ */
43
+ const readLocale = (relativeAfterLocale, locale) => {
44
+ let pendingRead;
45
+ const read = () => {
46
+ pendingRead ??= readLocaleFile(relativeAfterLocale, locale);
47
+ return pendingRead;
48
+ };
49
+ return {
50
+ then: (onFulfilled, onRejected) => read().then(onFulfilled, onRejected),
51
+ catch: (onRejected) => read().catch(onRejected),
52
+ finally: (onFinally) => read().finally(onFinally)
53
+ };
25
54
  };
26
55
  const blogEntry = {
27
56
  "./blog/en/compiler_vs_declarative_i18n.md": {