@intlayer/engine 9.8.0 → 9.8.2

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 (170) hide show
  1. package/dist/assets/initConfig/templates/cjs.txt +16 -15
  2. package/dist/assets/initConfig/templates/json.txt +8 -7
  3. package/dist/assets/initConfig/templates/mjs.txt +16 -15
  4. package/dist/assets/initConfig/templates/ts.txt +16 -15
  5. package/dist/cjs/_virtual/_utils_asset.cjs +1 -1
  6. package/dist/cjs/build.cjs +9 -9
  7. package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs +3 -3
  8. package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs +2 -2
  9. package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs +2 -2
  10. package/dist/cjs/buildIntlayerDictionary/writeNestedDictionary.cjs +2 -2
  11. package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs +2 -2
  12. package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs +2 -2
  13. package/dist/cjs/cleanOutputDir.cjs +1 -1
  14. package/dist/cjs/cleanRemovedContentDeclaration.cjs +1 -1
  15. package/dist/cjs/cli.cjs +22 -7
  16. package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs +1 -1
  17. package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +2 -2
  18. package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +2 -2
  19. package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +2 -2
  20. package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +2 -2
  21. package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +2 -2
  22. package/dist/cjs/createType/createModuleAugmentation.cjs +1 -1
  23. package/dist/cjs/createType/createType.cjs +1 -1
  24. package/dist/cjs/detectFormatCommand.cjs +45 -0
  25. package/dist/cjs/detectFormatCommand.cjs.map +1 -1
  26. package/dist/cjs/handleContentDeclarationFileChange.cjs +2 -2
  27. package/dist/cjs/init/aiSetup.cjs +280 -0
  28. package/dist/cjs/init/aiSetup.cjs.map +1 -0
  29. package/dist/cjs/init/cms.cjs +50 -6
  30. package/dist/cjs/init/cms.cjs.map +1 -1
  31. package/dist/cjs/init/frameworkSetup/nextAppRouter/index.cjs +2 -2
  32. package/dist/cjs/init/frameworkSetup/nextAppRouter/restructure.cjs +1 -1
  33. package/dist/cjs/init/frameworkSetup/tanstackStart/index.cjs +1 -1
  34. package/dist/cjs/init/frameworkSetup/tanstackStart/restructure.cjs +1 -1
  35. package/dist/cjs/init/index.cjs +29 -3
  36. package/dist/cjs/init/index.cjs.map +1 -1
  37. package/dist/cjs/init/utils/configManipulation.cjs +47 -10
  38. package/dist/cjs/init/utils/configManipulation.cjs.map +1 -1
  39. package/dist/cjs/init/utils/fileSystem.cjs +2 -2
  40. package/dist/cjs/init/utils/githubActions.cjs +1 -1
  41. package/dist/cjs/init/utils/index.cjs +11 -0
  42. package/dist/cjs/init/utils/intlayerDependencies.cjs +2 -2
  43. package/dist/cjs/init/utils/packageManager.cjs +1 -1
  44. package/dist/cjs/init/utils/toolConfigManipulation.cjs +247 -0
  45. package/dist/cjs/init/utils/toolConfigManipulation.cjs.map +1 -0
  46. package/dist/cjs/initConfig/index.cjs +1 -1
  47. package/dist/cjs/installLSP.cjs +1 -1
  48. package/dist/cjs/installMCP/installMCP.cjs +44 -2
  49. package/dist/cjs/installMCP/installMCP.cjs.map +1 -1
  50. package/dist/cjs/installSkills/index.cjs +1 -1
  51. package/dist/cjs/listGitFiles.cjs +1 -1
  52. package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +1 -1
  53. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +1 -1
  54. package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +1 -1
  55. package/dist/cjs/loadDictionaries/log.cjs +1 -1
  56. package/dist/cjs/prepareIntlayer.cjs +2 -2
  57. package/dist/cjs/scan/index.cjs +7 -7
  58. package/dist/cjs/syncPluginKit/createFileAdapter.cjs +1 -1
  59. package/dist/cjs/utils/buildComponentFilesList.cjs +1 -1
  60. package/dist/cjs/utils/contentWatcherLock.cjs +2 -2
  61. package/dist/cjs/utils/readDictionariesFromDisk.cjs +1 -1
  62. package/dist/cjs/utils/runOnce.cjs +2 -2
  63. package/dist/cjs/utils/withFileLock.cjs +2 -2
  64. package/dist/cjs/watcher.cjs +4 -4
  65. package/dist/cjs/writeConfiguration/index.cjs +2 -2
  66. package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +1 -1
  67. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +3 -12
  68. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -1
  69. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +3 -12
  70. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs.map +1 -1
  71. package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs +2 -11
  72. package/dist/cjs/writeContentDeclaration/writeMarkdownFile.cjs.map +1 -1
  73. package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs +2 -11
  74. package/dist/cjs/writeContentDeclaration/writeYamlFile.cjs.map +1 -1
  75. package/dist/cjs/writeFileIfChanged.cjs +2 -2
  76. package/dist/esm/_virtual/_utils_asset.mjs +1 -1
  77. package/dist/esm/build.mjs +9 -9
  78. package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs +3 -3
  79. package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs +2 -2
  80. package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs +2 -2
  81. package/dist/esm/buildIntlayerDictionary/writeNestedDictionary.mjs +2 -2
  82. package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs +2 -2
  83. package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs +2 -2
  84. package/dist/esm/cleanOutputDir.mjs +1 -1
  85. package/dist/esm/cleanRemovedContentDeclaration.mjs +1 -1
  86. package/dist/esm/cli.mjs +12 -11
  87. package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs +1 -1
  88. package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +2 -2
  89. package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +2 -2
  90. package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +2 -2
  91. package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +2 -2
  92. package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +2 -2
  93. package/dist/esm/createType/createModuleAugmentation.mjs +1 -1
  94. package/dist/esm/createType/createType.mjs +1 -1
  95. package/dist/esm/detectFormatCommand.mjs +43 -1
  96. package/dist/esm/detectFormatCommand.mjs.map +1 -1
  97. package/dist/esm/handleContentDeclarationFileChange.mjs +2 -2
  98. package/dist/esm/init/aiSetup.mjs +270 -0
  99. package/dist/esm/init/aiSetup.mjs.map +1 -0
  100. package/dist/esm/init/cms.mjs +50 -8
  101. package/dist/esm/init/cms.mjs.map +1 -1
  102. package/dist/esm/init/frameworkSetup/nextAppRouter/index.mjs +2 -2
  103. package/dist/esm/init/frameworkSetup/nextAppRouter/restructure.mjs +1 -1
  104. package/dist/esm/init/frameworkSetup/tanstackStart/index.mjs +1 -1
  105. package/dist/esm/init/frameworkSetup/tanstackStart/restructure.mjs +1 -1
  106. package/dist/esm/init/index.mjs +29 -3
  107. package/dist/esm/init/index.mjs.map +1 -1
  108. package/dist/esm/init/utils/configManipulation.mjs +47 -11
  109. package/dist/esm/init/utils/configManipulation.mjs.map +1 -1
  110. package/dist/esm/init/utils/fileSystem.mjs +2 -2
  111. package/dist/esm/init/utils/githubActions.mjs +1 -1
  112. package/dist/esm/init/utils/index.mjs +3 -2
  113. package/dist/esm/init/utils/intlayerDependencies.mjs +2 -2
  114. package/dist/esm/init/utils/packageManager.mjs +1 -1
  115. package/dist/esm/init/utils/toolConfigManipulation.mjs +236 -0
  116. package/dist/esm/init/utils/toolConfigManipulation.mjs.map +1 -0
  117. package/dist/esm/initConfig/index.mjs +1 -1
  118. package/dist/esm/installLSP.mjs +1 -1
  119. package/dist/esm/installMCP/installMCP.mjs +44 -3
  120. package/dist/esm/installMCP/installMCP.mjs.map +1 -1
  121. package/dist/esm/installSkills/index.mjs +1 -1
  122. package/dist/esm/listGitFiles.mjs +1 -1
  123. package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +1 -1
  124. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +1 -1
  125. package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +1 -1
  126. package/dist/esm/loadDictionaries/log.mjs +1 -1
  127. package/dist/esm/prepareIntlayer.mjs +2 -2
  128. package/dist/esm/scan/index.mjs +7 -7
  129. package/dist/esm/syncPluginKit/createFileAdapter.mjs +1 -1
  130. package/dist/esm/utils/buildComponentFilesList.mjs +1 -1
  131. package/dist/esm/utils/contentWatcherLock.mjs +2 -2
  132. package/dist/esm/utils/readDictionariesFromDisk.mjs +1 -1
  133. package/dist/esm/utils/runOnce.mjs +2 -2
  134. package/dist/esm/utils/withFileLock.mjs +2 -2
  135. package/dist/esm/watcher.mjs +4 -4
  136. package/dist/esm/writeConfiguration/index.mjs +2 -2
  137. package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +1 -1
  138. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +4 -13
  139. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -1
  140. package/dist/esm/writeContentDeclaration/writeJSFile.mjs +4 -13
  141. package/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +1 -1
  142. package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs +3 -12
  143. package/dist/esm/writeContentDeclaration/writeMarkdownFile.mjs.map +1 -1
  144. package/dist/esm/writeContentDeclaration/writeYamlFile.mjs +3 -12
  145. package/dist/esm/writeContentDeclaration/writeYamlFile.mjs.map +1 -1
  146. package/dist/esm/writeFileIfChanged.mjs +2 -2
  147. package/dist/types/build.d.ts +15 -15
  148. package/dist/types/cli.d.ts +14 -13
  149. package/dist/types/detectFormatCommand.d.ts +24 -0
  150. package/dist/types/detectFormatCommand.d.ts.map +1 -1
  151. package/dist/types/init/aiSetup.d.ts +69 -0
  152. package/dist/types/init/aiSetup.d.ts.map +1 -0
  153. package/dist/types/init/cms.d.ts +13 -1
  154. package/dist/types/init/cms.d.ts.map +1 -1
  155. package/dist/types/init/index.d.ts.map +1 -1
  156. package/dist/types/init/utils/configManipulation.d.ts +14 -0
  157. package/dist/types/init/utils/configManipulation.d.ts.map +1 -1
  158. package/dist/types/init/utils/index.d.ts +3 -2
  159. package/dist/types/init/utils/toolConfigManipulation.d.ts +46 -0
  160. package/dist/types/init/utils/toolConfigManipulation.d.ts.map +1 -0
  161. package/dist/types/installMCP/installMCP.d.ts +6 -0
  162. package/dist/types/installMCP/installMCP.d.ts.map +1 -1
  163. package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +1 -1
  164. package/dist/types/scan/index.d.ts +2 -2
  165. package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +1 -1
  166. package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts.map +1 -1
  167. package/dist/types/writeContentDeclaration/writeJSFile.d.ts.map +1 -1
  168. package/dist/types/writeContentDeclaration/writeMarkdownFile.d.ts.map +1 -1
  169. package/dist/types/writeContentDeclaration/writeYamlFile.d.ts.map +1 -1
  170. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"writeYamlFile.mjs","names":[],"sources":["../../../src/writeContentDeclaration/writeYamlFile.ts"],"sourcesContent":["import { execSync } from 'node:child_process';\nimport { mkdir, rename, rm, writeFile } from 'node:fs/promises';\nimport { basename, dirname, join } from 'node:path';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport { detectFormatCommand } from '../detectFormatCommand';\nimport { renderYamlContentDeclaration } from './renderContentDeclaration';\n\nexport const writeYamlFile = async (\n absoluteFilePath: string,\n dictionary: Dictionary,\n configuration: IntlayerConfig\n): Promise<void> => {\n const fileContent = renderYamlContentDeclaration(dictionary);\n\n const dir = dirname(absoluteFilePath);\n await mkdir(dir, { recursive: true });\n\n const tempDir = configuration.system?.tempDir;\n if (tempDir) await mkdir(tempDir, { recursive: true });\n\n const tempFileName = `${basename(absoluteFilePath)}.${Date.now()}-${Math.random().toString(36).slice(2)}.tmp`;\n const tempPath = tempDir\n ? join(tempDir, tempFileName)\n : `${absoluteFilePath}.${tempFileName}`;\n\n try {\n await writeFile(tempPath, fileContent, 'utf-8');\n await rename(tempPath, absoluteFilePath);\n } catch (error) {\n try {\n await rm(tempPath, { force: true });\n } catch {\n // ignore\n }\n throw error;\n }\n\n const formatCommand = detectFormatCommand(configuration);\n if (formatCommand) {\n try {\n execSync(formatCommand.replace('{{file}}', absoluteFilePath), {\n stdio: 'inherit',\n cwd: configuration.system.baseDir,\n });\n } catch (error) {\n console.error(error);\n }\n }\n};\n"],"mappings":";;;;;;;AAQA,MAAa,gBAAgB,OAC3B,kBACA,YACA,kBACkB;CAClB,MAAM,cAAc,6BAA6B,UAAU;CAE3D,MAAM,MAAM,QAAQ,gBAAgB;CACpC,MAAM,MAAM,KAAK,EAAE,WAAW,KAAK,CAAC;CAEpC,MAAM,UAAU,cAAc,QAAQ;CACtC,IAAI,SAAS,MAAM,MAAM,SAAS,EAAE,WAAW,KAAK,CAAC;CAErD,MAAM,eAAe,GAAG,SAAS,gBAAgB,EAAE,GAAG,KAAK,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE;CACxG,MAAM,WAAW,UACb,KAAK,SAAS,YAAY,IAC1B,GAAG,iBAAiB,GAAG;CAE3B,IAAI;EACF,MAAM,UAAU,UAAU,aAAa,OAAO;EAC9C,MAAM,OAAO,UAAU,gBAAgB;CACzC,SAAS,OAAO;EACd,IAAI;GACF,MAAM,GAAG,UAAU,EAAE,OAAO,KAAK,CAAC;EACpC,QAAQ,CAER;EACA,MAAM;CACR;CAEA,MAAM,gBAAgB,oBAAoB,aAAa;CACvD,IAAI,eACF,IAAI;EACF,SAAS,cAAc,QAAQ,YAAY,gBAAgB,GAAG;GAC5D,OAAO;GACP,KAAK,cAAc,OAAO;EAC5B,CAAC;CACH,SAAS,OAAO;EACd,QAAQ,MAAM,KAAK;CACrB;AAEJ"}
1
+ {"version":3,"file":"writeYamlFile.mjs","names":[],"sources":["../../../src/writeContentDeclaration/writeYamlFile.ts"],"sourcesContent":["import { mkdir, rename, rm, writeFile } from 'node:fs/promises';\nimport { basename, dirname, join } from 'node:path';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport { runFormatCommand } from '../detectFormatCommand';\nimport { renderYamlContentDeclaration } from './renderContentDeclaration';\n\nexport const writeYamlFile = async (\n absoluteFilePath: string,\n dictionary: Dictionary,\n configuration: IntlayerConfig\n): Promise<void> => {\n const fileContent = renderYamlContentDeclaration(dictionary);\n\n const dir = dirname(absoluteFilePath);\n await mkdir(dir, { recursive: true });\n\n const tempDir = configuration.system?.tempDir;\n if (tempDir) await mkdir(tempDir, { recursive: true });\n\n const tempFileName = `${basename(absoluteFilePath)}.${Date.now()}-${Math.random().toString(36).slice(2)}.tmp`;\n const tempPath = tempDir\n ? join(tempDir, tempFileName)\n : `${absoluteFilePath}.${tempFileName}`;\n\n try {\n await writeFile(tempPath, fileContent, 'utf-8');\n await rename(tempPath, absoluteFilePath);\n } catch (error) {\n try {\n await rm(tempPath, { force: true });\n } catch {\n // ignore\n }\n throw error;\n }\n\n runFormatCommand(absoluteFilePath, configuration);\n};\n"],"mappings":";;;;;;AAOA,MAAa,gBAAgB,OAC3B,kBACA,YACA,kBACkB;CAClB,MAAM,cAAc,6BAA6B,UAAU;CAE3D,MAAM,MAAM,QAAQ,gBAAgB;CACpC,MAAM,MAAM,KAAK,EAAE,WAAW,KAAK,CAAC;CAEpC,MAAM,UAAU,cAAc,QAAQ;CACtC,IAAI,SAAS,MAAM,MAAM,SAAS,EAAE,WAAW,KAAK,CAAC;CAErD,MAAM,eAAe,GAAG,SAAS,gBAAgB,EAAE,GAAG,KAAK,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE;CACxG,MAAM,WAAW,UACb,KAAK,SAAS,YAAY,IAC1B,GAAG,iBAAiB,GAAG;CAE3B,IAAI;EACF,MAAM,UAAU,UAAU,aAAa,OAAO;EAC9C,MAAM,OAAO,UAAU,gBAAgB;CACzC,SAAS,OAAO;EACd,IAAI;GACF,MAAM,GAAG,UAAU,EAAE,OAAO,KAAK,CAAC;EACpC,QAAQ,CAER;EACA,MAAM;CACR;CAEA,iBAAiB,kBAAkB,aAAa;AAClD"}
@@ -1,6 +1,6 @@
1
- import { rmSync } from "node:fs";
2
- import { basename, dirname, join } from "node:path";
3
1
  import { chmod, mkdir, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
2
+ import { basename, dirname, join } from "node:path";
3
+ import { rmSync } from "node:fs";
4
4
  import { randomBytes } from "node:crypto";
5
5
 
6
6
  // src/writeFileIfChanged.ts
@@ -1,22 +1,10 @@
1
1
  import "./buildIntlayerDictionary/index.js";
2
- import { DictionariesStatus, loadDictionaries } from "./loadDictionaries/loadDictionaries.js";
3
- import { ensureIntlayerBundle, formatLocalDictionaries, loadContentDeclaration, loadContentDeclarations } from "./loadDictionaries/loadContentDeclaration.js";
4
- import { loadLocalDictionaries } from "./loadDictionaries/loadLocalDictionaries.js";
5
- import { formatDistantDictionaries, loadRemoteDictionaries } from "./loadDictionaries/loadRemoteDictionaries.js";
6
2
  import { cleanOutputDir } from "./cleanOutputDir.js";
7
- import "./createDictionaryEntryPoint/index.js";
8
- import { detectExportedComponentName } from "./writeContentDeclaration/detectExportedComponentName.js";
9
- import { DictionaryStatus } from "./writeContentDeclaration/dictionaryStatus.js";
10
- import { RenderContentDeclarationOptions, RenderedContentDeclaration, formatContentDeclaration, isRenderableContentDeclarationPath, renderContentDeclaration, renderMarkdownContentDeclaration, renderYamlContentDeclaration } from "./writeContentDeclaration/renderContentDeclaration.js";
11
- import { transformJSFile } from "./writeContentDeclaration/transformJSFile.js";
12
- import { writeContentDeclaration } from "./writeContentDeclaration/writeContentDeclaration.js";
13
- import { writeJSFile } from "./writeContentDeclaration/writeJSFile.js";
14
- import "./createType/index.js";
15
- import { formatDictionaries, formatDictionariesOutput, formatDictionary, formatDictionaryOutput } from "./formatDictionary.js";
16
3
  import { BuildDictionariesOptions, addStoredSiblingDictionaries, buildDictionary } from "./buildIntlayerDictionary/buildIntlayerDictionary.js";
17
4
  import { processContentDeclaration } from "./buildIntlayerDictionary/processContentDeclaration.js";
18
5
  import { rebuildUnmergedDictionaries } from "./buildIntlayerDictionary/rebuildUnmergedDictionaries.js";
19
- import "./loadDictionaries/index.js";
6
+ import "./createDictionaryEntryPoint/index.js";
7
+ import "./createType/index.js";
20
8
  import { CreateDictionaryEntryPointOptions, createDictionaryEntryPoint } from "./createDictionaryEntryPoint/createDictionaryEntryPoint.js";
21
9
  import { generateDictionaryListContent } from "./createDictionaryEntryPoint/generateDictionaryListContent.js";
22
10
  import { getBuiltDictionariesPath } from "./createDictionaryEntryPoint/getBuiltDictionariesPath.js";
@@ -24,11 +12,23 @@ import { getBuiltDynamicDictionariesPath } from "./createDictionaryEntryPoint/ge
24
12
  import { getBuiltFetchDictionariesPath } from "./createDictionaryEntryPoint/getBuiltFetchDictionariesPath.js";
25
13
  import { getBuiltRemoteDictionariesPath } from "./createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.js";
26
14
  import { getBuiltUnmergedDictionariesPath } from "./createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.js";
27
- import { prepareIntlayer } from "./prepareIntlayer.js";
15
+ import { formatDictionaries, formatDictionariesOutput, formatDictionary, formatDictionaryOutput } from "./formatDictionary.js";
28
16
  import { createModuleAugmentation, formatDomains, formatRewriteRules, getTypeName } from "./createType/createModuleAugmentation.js";
29
17
  import { createTypes, generateTypeScriptType } from "./createType/createType.js";
18
+ import "./loadDictionaries/index.js";
19
+ import { prepareIntlayer } from "./prepareIntlayer.js";
20
+ import { DictionariesStatus, loadDictionaries } from "./loadDictionaries/loadDictionaries.js";
21
+ import { ensureIntlayerBundle, formatLocalDictionaries, loadContentDeclaration, loadContentDeclarations } from "./loadDictionaries/loadContentDeclaration.js";
22
+ import { loadLocalDictionaries } from "./loadDictionaries/loadLocalDictionaries.js";
23
+ import { formatDistantDictionaries, loadRemoteDictionaries } from "./loadDictionaries/loadRemoteDictionaries.js";
30
24
  import { INTLAYER_WATCH_ENV_VAR, PrepareIntlayerServerOptions, getIsDevWatcherCommand, getIsServerDevelopment, prepareIntlayerServer } from "./prepareIntlayerServer.js";
31
25
  import { readDictionariesFromDisk } from "./utils/readDictionariesFromDisk.js";
32
26
  import { BuiltEditorOverride, WatchBuiltEditorConfigurationOptions, isCachedConfigurationUpToDate, overrideBuiltEditorConfiguration, watchBuiltEditorConfiguration, writeConfiguration } from "./writeConfiguration/index.js";
27
+ import { detectExportedComponentName } from "./writeContentDeclaration/detectExportedComponentName.js";
28
+ import { DictionaryStatus } from "./writeContentDeclaration/dictionaryStatus.js";
29
+ import { RenderContentDeclarationOptions, RenderedContentDeclaration, formatContentDeclaration, isRenderableContentDeclarationPath, renderContentDeclaration, renderMarkdownContentDeclaration, renderYamlContentDeclaration } from "./writeContentDeclaration/renderContentDeclaration.js";
30
+ import { transformJSFile } from "./writeContentDeclaration/transformJSFile.js";
31
+ import { writeContentDeclaration } from "./writeContentDeclaration/writeContentDeclaration.js";
32
+ import { writeJSFile } from "./writeContentDeclaration/writeJSFile.js";
33
33
  import "./writeContentDeclaration/index.js";
34
34
  export { BuildDictionariesOptions, BuiltEditorOverride, CreateDictionaryEntryPointOptions, DictionariesStatus, DictionaryStatus, INTLAYER_WATCH_ENV_VAR, PrepareIntlayerServerOptions, RenderContentDeclarationOptions, RenderedContentDeclaration, WatchBuiltEditorConfigurationOptions, addStoredSiblingDictionaries, buildDictionary, cleanOutputDir, createDictionaryEntryPoint, createModuleAugmentation, createTypes, detectExportedComponentName, ensureIntlayerBundle, formatContentDeclaration, formatDictionaries, formatDictionariesOutput, formatDictionary, formatDictionaryOutput, formatDistantDictionaries, formatDomains, formatLocalDictionaries, formatRewriteRules, generateDictionaryListContent, generateTypeScriptType, getBuiltDictionariesPath, getBuiltDynamicDictionariesPath, getBuiltFetchDictionariesPath, getBuiltRemoteDictionariesPath, getBuiltUnmergedDictionariesPath, getIsDevWatcherCommand, getIsServerDevelopment, getTypeName, isCachedConfigurationUpToDate, isRenderableContentDeclarationPath, loadContentDeclaration, loadContentDeclarations, loadDictionaries, loadLocalDictionaries, loadRemoteDictionaries, overrideBuiltEditorConfiguration, prepareIntlayer, prepareIntlayerServer, processContentDeclaration, readDictionariesFromDisk, rebuildUnmergedDictionaries, renderContentDeclaration, renderMarkdownContentDeclaration, renderYamlContentDeclaration, transformJSFile, watchBuiltEditorConfiguration, writeConfiguration, writeContentDeclaration, writeJSFile };
@@ -1,30 +1,31 @@
1
- import { detectFormatCommand } from "./detectFormatCommand.js";
1
+ import { buildFormatCommand, detectFormatCommand, escapeShellFilePath, runFormatCommand } from "./detectFormatCommand.js";
2
2
  import "./getContentDeclarationFileTemplate/index.js";
3
- import { getContentDeclarationFileTemplate } from "./getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.js";
4
- import { CmsCredentials, enableEditorInConfig, setupCmsCredentials, writeCmsCredentialsToEnv } from "./init/cms.js";
3
+ import { AI_PACKAGE_NAME, AI_PROVIDER_CHOICES, AI_PROVIDER_SETUPS, AiProviderSetup, SetupAiProviderOptions, fetchAiProviderModels, getAiProviderSetup, installAiProviderPackages, parseModelIds, setupAiProvider } from "./init/aiSetup.js";
4
+ import { detectExportedComponentName } from "./writeContentDeclaration/detectExportedComponentName.js";
5
+ import { DictionaryStatus } from "./writeContentDeclaration/dictionaryStatus.js";
6
+ import { RenderContentDeclarationOptions, RenderedContentDeclaration, formatContentDeclaration, isRenderableContentDeclarationPath, renderContentDeclaration, renderMarkdownContentDeclaration, renderYamlContentDeclaration } from "./writeContentDeclaration/renderContentDeclaration.js";
7
+ import { transformJSFile } from "./writeContentDeclaration/transformJSFile.js";
8
+ import { writeContentDeclaration } from "./writeContentDeclaration/writeContentDeclaration.js";
9
+ import { writeJSFile } from "./writeContentDeclaration/writeJSFile.js";
10
+ import { CmsCredentials, enableEditorInConfig, setAiInConfig, setupCmsCredentials, writeCmsCredentialsToEnv, writeEnvVariables } from "./init/cms.js";
5
11
  import { InitOptions, getDefaultApplicationURL, initIntlayer, logInitSuccessMessage } from "./init/index.js";
6
- import { RoutingMode } from "./init/utils/configManipulation.js";
7
12
  import { UpgradeIntlayerPackagesOptions, UpgradeIntlayerPackagesResult, upgradeIntlayerPackages } from "./init/upgradeIntlayerPackages.js";
8
- import { DocumentationRouter, DocumentationRouterType, getDocumentationUrl } from "./init/documentationRouter.js";
9
13
  import "./init/utils/index.js";
10
14
  import { CATALOG_MESSAGE_FORMATS, CONTENT_FORMATS_BY_LAYOUT, CatalogMessageFormat, ContentFormat, ContentLayout, ContentLayoutSetup, getContentLayoutSetup } from "./init/utils/contentLayout.js";
15
+ import { getContentDeclarationFileTemplate } from "./getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.js";
11
16
  import { NEXT_INTLAYER_BABEL_CONFIG_CONTENT } from "./init/utils/nextCompilerBabel.js";
12
17
  import { COMPAT_I18N_LIBRARIES, CompatI18nLibrary, PackageManager, detectCompatI18nLibraries, detectPackageManager, findLockFileDir, hasLintTooling, installPackages } from "./init/utils/packageManager.js";
13
18
  import { PRETTIER_CONFIG_FILES, hasPrettier } from "./init/utils/prettierConfig.js";
19
+ import { RoutingMode } from "./init/utils/configManipulation.js";
14
20
  import { hasUrlRoutingFramework } from "./init/utils/urlRoutingFramework.js";
21
+ import { DocumentationRouter, DocumentationRouterType, getDocumentationUrl } from "./init/documentationRouter.js";
15
22
  import { installLSP } from "./installLSP.js";
16
- import { MCPTransport, MCP_TRANSPORTS, installMCP } from "./installMCP/installMCP.js";
23
+ import { MCPTransport, MCP_TRANSPORTS, installMCP, upgradeMCPConfigs } from "./installMCP/installMCP.js";
17
24
  import { PLATFORMS, PLATFORMS_METADATA, Platform, PlatformMetadata, SKILLS, SKILLS_METADATA, Skill, detectPlatform, getInitialSkills, installSkills } from "./installSkills/index.js";
18
25
  import { listDictionaries, listDictionariesWithStats } from "./listDictionariesPath.js";
19
26
  import { DiffMode, ListGitFilesOptions, ListGitLinesOptions, listGitFiles, listGitLines } from "./listGitFiles.js";
20
27
  import { ListProjectsOptions, getGitRootDir, listProjects } from "./listProjects.js";
21
28
  import { logConfigDetails } from "./logConfigDetails.js";
22
29
  import { prepareIntlayer } from "./prepareIntlayer.js";
23
- import { detectExportedComponentName } from "./writeContentDeclaration/detectExportedComponentName.js";
24
- import { DictionaryStatus } from "./writeContentDeclaration/dictionaryStatus.js";
25
- import { RenderContentDeclarationOptions, RenderedContentDeclaration, formatContentDeclaration, isRenderableContentDeclarationPath, renderContentDeclaration, renderMarkdownContentDeclaration, renderYamlContentDeclaration } from "./writeContentDeclaration/renderContentDeclaration.js";
26
- import { transformJSFile } from "./writeContentDeclaration/transformJSFile.js";
27
- import { writeContentDeclaration } from "./writeContentDeclaration/writeContentDeclaration.js";
28
- import { writeJSFile } from "./writeContentDeclaration/writeJSFile.js";
29
30
  import "./writeContentDeclaration/index.js";
30
- export { CATALOG_MESSAGE_FORMATS, COMPAT_I18N_LIBRARIES, CONTENT_FORMATS_BY_LAYOUT, CatalogMessageFormat, type CmsCredentials, type CompatI18nLibrary, ContentFormat, ContentLayout, ContentLayoutSetup, DictionaryStatus, DiffMode, DocumentationRouter, type DocumentationRouterType, InitOptions, ListGitFilesOptions, ListGitLinesOptions, ListProjectsOptions, MCPTransport, MCP_TRANSPORTS, NEXT_INTLAYER_BABEL_CONFIG_CONTENT, PLATFORMS, PLATFORMS_METADATA, PRETTIER_CONFIG_FILES, type PackageManager, Platform, PlatformMetadata, RenderContentDeclarationOptions, RenderedContentDeclaration, type RoutingMode, SKILLS, SKILLS_METADATA, Skill, UpgradeIntlayerPackagesOptions, UpgradeIntlayerPackagesResult, detectCompatI18nLibraries, detectExportedComponentName, detectFormatCommand, detectPackageManager, detectPlatform, enableEditorInConfig, findLockFileDir, formatContentDeclaration, getContentDeclarationFileTemplate, getContentLayoutSetup, getDefaultApplicationURL, getDocumentationUrl, getGitRootDir, getInitialSkills, hasLintTooling, hasPrettier, hasUrlRoutingFramework, initIntlayer, installLSP, installMCP, installPackages, installSkills, isRenderableContentDeclarationPath, listDictionaries, listDictionariesWithStats, listGitFiles, listGitLines, listProjects, logConfigDetails, logInitSuccessMessage, prepareIntlayer, renderContentDeclaration, renderMarkdownContentDeclaration, renderYamlContentDeclaration, setupCmsCredentials, transformJSFile, upgradeIntlayerPackages, writeCmsCredentialsToEnv, writeContentDeclaration, writeJSFile };
31
+ export { AI_PACKAGE_NAME, AI_PROVIDER_CHOICES, AI_PROVIDER_SETUPS, AiProviderSetup, CATALOG_MESSAGE_FORMATS, COMPAT_I18N_LIBRARIES, CONTENT_FORMATS_BY_LAYOUT, CatalogMessageFormat, type CmsCredentials, type CompatI18nLibrary, ContentFormat, ContentLayout, ContentLayoutSetup, DictionaryStatus, DiffMode, DocumentationRouter, type DocumentationRouterType, InitOptions, ListGitFilesOptions, ListGitLinesOptions, ListProjectsOptions, MCPTransport, MCP_TRANSPORTS, NEXT_INTLAYER_BABEL_CONFIG_CONTENT, PLATFORMS, PLATFORMS_METADATA, PRETTIER_CONFIG_FILES, type PackageManager, Platform, PlatformMetadata, RenderContentDeclarationOptions, RenderedContentDeclaration, type RoutingMode, SKILLS, SKILLS_METADATA, SetupAiProviderOptions, Skill, UpgradeIntlayerPackagesOptions, UpgradeIntlayerPackagesResult, buildFormatCommand, detectCompatI18nLibraries, detectExportedComponentName, detectFormatCommand, detectPackageManager, detectPlatform, enableEditorInConfig, escapeShellFilePath, fetchAiProviderModels, findLockFileDir, formatContentDeclaration, getAiProviderSetup, getContentDeclarationFileTemplate, getContentLayoutSetup, getDefaultApplicationURL, getDocumentationUrl, getGitRootDir, getInitialSkills, hasLintTooling, hasPrettier, hasUrlRoutingFramework, initIntlayer, installAiProviderPackages, installLSP, installMCP, installPackages, installSkills, isRenderableContentDeclarationPath, listDictionaries, listDictionariesWithStats, listGitFiles, listGitLines, listProjects, logConfigDetails, logInitSuccessMessage, parseModelIds, prepareIntlayer, renderContentDeclaration, renderMarkdownContentDeclaration, renderYamlContentDeclaration, runFormatCommand, setAiInConfig, setupAiProvider, setupCmsCredentials, transformJSFile, upgradeIntlayerPackages, upgradeMCPConfigs, writeCmsCredentialsToEnv, writeContentDeclaration, writeEnvVariables, writeJSFile };
@@ -1,3 +1,27 @@
1
1
  import { IntlayerConfig } from "@intlayer/types/config";
2
+ /**
3
+ * Escapes shell variable/command-substitution markers (`$` and `` ` ``) in a
4
+ * file path before interpolating it into a shell command string.
5
+ *
6
+ * Route segments like TanStack Start's `{-$locale}` or `$locale` contain `$`,
7
+ * which POSIX shells (`sh`/`zsh`/`bash`) expand inside double-quoted strings
8
+ * (`"{-$locale}"` → `"{-}"`). On Windows (`cmd.exe`), `%` is the variable
9
+ * marker, not `$`, so leaving `$` unescaped is required there.
10
+ */
11
+ export declare const escapeShellFilePath: (filePath: string, platform?: NodeJS.Platform) => string;
12
+ /**
13
+ * Interpolates `filePath` into a `formatCommand` template (`{{file}}`),
14
+ * escaping shell expansion characters so dynamic route segments (e.g.
15
+ * `{-$locale}`, `$id`) survive double-quoted shell execution.
16
+ *
17
+ * Note: `String.prototype.replace` treats `$` in replacement strings as a
18
+ * special pattern (`$&`, `$'`, `` $` ``), so a replacement function is used.
19
+ */
20
+ export declare const buildFormatCommand: (formatCommand: string, filePath: string, platform?: NodeJS.Platform) => string;
21
+ /**
22
+ * Runs the configured or auto-detected formatter on `filePath` if one is
23
+ * available. Errors from the formatter are caught and logged without throwing.
24
+ */
25
+ export declare const runFormatCommand: (filePath: string, configuration: IntlayerConfig) => void;
2
26
  export declare const detectFormatCommand: (configuration: IntlayerConfig, projectRequireProp?: NodeJS.Require) => string;
3
27
  //# sourceMappingURL=detectFormatCommand.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"detectFormatCommand.d.ts","names":[],"sources":["../../src/detectFormatCommand.ts"],"mappings":";qBAKa,sBAAmB,eACf,gBAAc,qBACR,OAAO"}
1
+ {"version":3,"file":"detectFormatCommand.d.ts","names":[],"sources":["../../src/detectFormatCommand.ts"],"mappings":";;;;;;;;;;qBAea,sBAAmB,kBACd,WACN,OAAO;;;;;;;;;qBAiBN,qBAAkB,uBACR,kBACL,WACN,OAAO;;;;;qBAUN,mBAAgB,kBACX,eACD;qBAgBJ,sBAAmB,eACf,gBAAc,qBACR,OAAO"}
@@ -0,0 +1,69 @@
1
+ import { AiProviders } from "@intlayer/types/config";
2
+ /** Package running the AI commands locally with the user's own key. */
3
+ export declare const AI_PACKAGE_NAME = "@intlayer/ai";
4
+ /** Request listing the models of a provider. */
5
+ type ModelsRequest = {
6
+ url: string;
7
+ headers?: Record<string, string>;
8
+ };
9
+ /** Everything `intlayer init ai` needs to know about a provider. */
10
+ export type AiProviderSetup = {
11
+ provider: `${AiProviders}`;
12
+ label: string;
13
+ /**
14
+ * AI SDK package to install. `undefined` when `@intlayer/ai` already ships
15
+ * it (Anthropic, OpenAI and the OpenAI-compatible Ollama).
16
+ */
17
+ sdkPackage?: string;
18
+ /**
19
+ * Environment variable the API key is stored in. `undefined` for local
20
+ * runtimes and cloud providers authenticated by their own credentials.
21
+ */
22
+ apiKeyEnvironmentVariable?: string;
23
+ /** Start of a valid key, shown as the input placeholder. */
24
+ apiKeyPlaceholder?: string;
25
+ /** Where the user creates an API key. */
26
+ apiKeyUrl?: string;
27
+ /** Builds the request listing the available models, when the API has one. */
28
+ getModelsRequest?: (apiKey?: string) => ModelsRequest;
29
+ /** Models suggested when the list cannot be fetched (first is default). */
30
+ suggestedModels: string[];
31
+ };
32
+ /** Providers offered by `intlayer init ai`, in display order. */
33
+ export declare const AI_PROVIDER_SETUPS: AiProviderSetup[];
34
+ /** Providers accepted by `--provider`. */
35
+ export declare const AI_PROVIDER_CHOICES: ("alibaba" | "anthropic" | "bedrock" | "deepseek" | "fireworks" | "gemini" | "googlegenerativeai" | "googlevertex" | "groq" | "huggingface" | "lmstudio" | "mistral" | "moonshotai" | "ollama" | "openai" | "openrouter" | "togetherai")[];
36
+ /** Looks up the setup of a provider. */
37
+ export declare const getAiProviderSetup: (provider: string) => AiProviderSetup | undefined;
38
+ /**
39
+ * Reads model ids out of a `/models` response: OpenAI-style `{ data: [{ id }] }`,
40
+ * Google-style `{ models: [{ name: 'models/…' }] }`, or a bare array.
41
+ */
42
+ export declare const parseModelIds: (body: unknown) => string[];
43
+ /**
44
+ * Lists the models available to the given key from the provider API. Resolves
45
+ * to an empty list when the provider has no listing endpoint, the key is
46
+ * rejected or the API cannot be reached.
47
+ */
48
+ export declare const fetchAiProviderModels: (provider: string, apiKey?: string) => Promise<string[]>;
49
+ /**
50
+ * Installs `@intlayer/ai` (runs the AI commands locally with the user's key)
51
+ * and the provider AI SDK when `@intlayer/ai` does not ship it, as dev
52
+ * dependencies. Already declared packages are skipped.
53
+ */
54
+ export declare const installAiProviderPackages: (rootDir: string, provider: string, version?: string) => Promise<void>;
55
+ /** Choices of `intlayer init ai`. */
56
+ export type SetupAiProviderOptions = {
57
+ provider: string;
58
+ model?: string;
59
+ /** Stored in the environment file when given. */
60
+ apiKey?: string;
61
+ };
62
+ /**
63
+ * Persists an AI provider setup: the API key to the environment file (e.g.
64
+ * `ANTHROPIC_API_KEY=sk-ant-…` in `.env`) and the provider, model and
65
+ * `process.env` key reference to the `ai` block of the Intlayer config.
66
+ */
67
+ export declare const setupAiProvider: (rootDir: string, { provider, model, apiKey }: SetupAiProviderOptions) => Promise<void>;
68
+ export {};
69
+ //# sourceMappingURL=aiSetup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aiSetup.d.ts","names":[],"sources":["../../../src/init/aiSetup.ts"],"mappings":";;qBAYa;;KAGR;EACH;EACA,UAAU;;;YAIA;EACV,aAAa;EACb;;;;;EAKA;;;;;EAKA;;EAEA;;EAEA;;EAEA,oBAAoB,oBAAoB;;EAExC;;;qBAaW,oBAAoB;;qBA+KpB;;qBAKA,qBAAkB,qBAE5B;;;;;qBAOU,gBAAa;;;;;;qBA8Bb,wBAAqB,kBAChB,oBAEf;;;;;;qBAwBU,4BAAyB,iBACrB,kBACC,qBAEf;;YA+CS;EACV;EACA;;EAEA;;;;;;;qBAQW,kBAAe,mBACX,UAAA,OAAA,UACc,2BAC5B"}
@@ -1,4 +1,4 @@
1
- import { RoutingMode } from "./utils/configManipulation.js";
1
+ import { IntlayerConfigAiSettings, RoutingMode } from "./utils/configManipulation.js";
2
2
  /**
3
3
  * Intlayer configuration file candidates, ordered by the precedence used when
4
4
  * resolving which file to mutate.
@@ -22,6 +22,18 @@ export declare const findEnvFile: (rootDir: string) => Promise<string>;
22
22
  * of the file that was written.
23
23
  */
24
24
  export declare const writeCmsCredentialsToEnv: (rootDir: string, { clientId, clientSecret }: CmsCredentials) => Promise<string>;
25
+ /**
26
+ * Upserts `KEY=value` lines in the project's environment file (detected with
27
+ * {@link findEnvFile}, created when missing), and makes sure git ignores it.
28
+ * Returns the relative path of the file that was written.
29
+ */
30
+ export declare const writeEnvVariables: (rootDir: string, variables: Record<string, string>) => Promise<string>;
31
+ /**
32
+ * Writes the AI provider, model and API key reference to the `ai` block of the
33
+ * project's Intlayer configuration file. Returns the config file that was
34
+ * updated, or `undefined` when none was found.
35
+ */
36
+ export declare const setAiInConfig: (rootDir: string, settings: IntlayerConfigAiSettings) => Promise<string | undefined>;
25
37
  /**
26
38
  * Enables the Intlayer visual editor in the project's configuration file:
27
39
  * flips `editor.enabled` to `true` and wires `clientId` / `clientSecret` to the
@@ -1 +1 @@
1
- {"version":3,"file":"cms.d.ts","names":[],"sources":["../../../src/init/cms.ts"],"mappings":";;;;;qBAkBa;;YAgBD;EACV;EACA;;;;;;;qBAwBW,cAAW,oBAA4B;;;;;;;qBA0CvC,2BAAwB,mBACpB,UAAA,gBACa,mBAC3B;;;;;;;;qBAmCU,uBAAoB,oBAE9B;;;;;qBAwCU,yBAAsB,iBAClB,MACT,gBACL;;;;;qBAuBU,yBAAsB,iBAClB,yBAEd;;;;;;qBA4BU,gCAA6B,oBAEvC;;;;;;qBA2BU,4BAAyB,iBACrB,2BAEd;;;;;;qBA4BU,8BAA2B,oBAErC;;;;;;qBAwBU,sBAAmB,iBACf,aACF,mBACZ"}
1
+ {"version":3,"file":"cms.d.ts","names":[],"sources":["../../../src/init/cms.ts"],"mappings":";;;;;qBAoBa;;YAgBD;EACV;EACA;;;;;;;qBAwBW,cAAW,oBAA4B;;;;;;;qBA0CvC,2BAAwB,mBACpB,UAAA,gBACa,mBAC3B;;;;;;qBAkBU,oBAAiB,iBACb,WACJ,2BACV;;;;;;qBA0DU,gBAAa,iBACT,UACL,6BACT;;;;;;;;qBAwCU,uBAAoB,oBAE9B;;;;;qBAwCU,yBAAsB,iBAClB,MACT,gBACL;;;;;qBAuBU,yBAAsB,iBAClB,yBAEd;;;;;;qBA4BU,gCAA6B,oBAEvC;;;;;;qBA2BU,4BAAyB,iBACrB,2BAEd;;;;;;qBA4BU,8BAA2B,oBAErC;;;;;;qBAwBU,sBAAmB,iBACf,aACF,mBACZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/init/index.ts"],"mappings":";;;;;;;;;;qBAyFa,2BAAwB,cACrB;;;;YAgBJ;EACV;;EAEA;;;;;EAKA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;EAOA;;EAEA;;;;;;EAMA;;;;;;EAMA,cAAc;;;;;;;EAOd;;;;;;;EAOA,gBAAgB;;;;;EAKhB,gBAAgB;;;;;EAKhB,uBAAuB;;;;;qBA4GZ,eAAY,iBAAyB,UAAY,gBAAW;;;qBAmmC5D,wBAAqB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/init/index.ts"],"mappings":";;;;;;;;;;qBAmGa,2BAAwB,cACrB;;;;YAgBJ;EACV;;EAEA;;;;;EAKA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;EAOA;;EAEA;;;;;;EAMA;;;;;;EAMA,cAAc;;;;;;;EAOd;;;;;;;EAOA,gBAAgB;;;;;EAKhB,gBAAgB;;;;;EAKhB,uBAAuB;;;;;qBA4JZ,eAAY,iBAAyB,UAAY,gBAAW;;;qBAkoC5D,wBAAqB"}
@@ -10,6 +10,20 @@ export type RoutingMode = RoutingConfig['mode'];
10
10
  * TypeScript recast parser.
11
11
  */
12
12
  export declare const setIntlayerConfigRoutingMode: (content: string, extension: string, mode: RoutingMode) => string;
13
+ /** AI settings written to the `ai` block of an Intlayer configuration. */
14
+ export type IntlayerConfigAiSettings = {
15
+ provider: string;
16
+ model?: string;
17
+ /** Environment variable holding the API key, referenced as `process.env.X`. */
18
+ apiKeyEnvironmentVariable?: string;
19
+ };
20
+ /**
21
+ * Sets `ai.provider`, `ai.model` and `ai.apiKey` (as a `process.env`
22
+ * reference) in an Intlayer configuration file, keeping the other `ai`
23
+ * fields. JSON configs get the provider and model only: they cannot reference
24
+ * environment variables.
25
+ */
26
+ export declare const setIntlayerConfigAi: (content: string, extension: string, { provider, model, apiKeyEnvironmentVariable }: IntlayerConfigAiSettings) => string;
13
27
  /**
14
28
  * Sets `routing.enableProxy` in an Intlayer configuration file. Idempotent and
15
29
  * comment-preserving: an existing property only has its value swapped. Supports
@@ -1 +1 @@
1
- {"version":3,"file":"configManipulation.d.ts","names":[],"sources":["../../../../src/init/utils/configManipulation.ts"],"mappings":";;;YAYY,cAAc;;;;;;;;qBA0Fb,+BAA4B,iBACxB,mBACE,MACX;;;;;;qBAuCK,+BAA4B,iBACxB,mBACE;;;;;;;;qBA+CN,sCAAmC,iBAC/B;;;;;;;;;qBAgDJ,kCAA+B,iBAC3B,mBACE;;;;;;;;qBAyCN,oCAAiC,iBAC7B;;;;;;;;;qBAyDJ,6BAA0B;;;;;;;;qBA+Q1B,wBAAqB;qBAIrB,mBAAgB,iBACZ;qBAoBJ,oBAAiB,iBACb;qBAoBJ,mBAAgB,iBACZ;;;;;;;;;;;;;qBA2EJ,oBAAiB,iBACb;;;;;;;qBA2EJ,yBAAsB;qBAgBtB,mBAAgB;;;;;qBA6DhB,6BAA0B,iBACtB;;;;;;qBA8BJ,kCAA+B,iBAC3B,mBACE,cACH;;;;;;;;;;qBAiCH,sCAAmC,iBAC/B,oBACG,2BACO;;;;;qBAqGd,mCAAgC,iBAC5B;;;;;qBAcJ,gCAA6B;;;;;qBA+D7B,iCAA8B,iBAC1B;;;;;;;qBAgBJ,8BAA2B,iBACvB;;;;;;qBAgQJ,qCAAkC,iBAC9B,mBACE,YACL"}
1
+ {"version":3,"file":"configManipulation.d.ts","names":[],"sources":["../../../../src/init/utils/configManipulation.ts"],"mappings":";;;YAYY,cAAc;;;;;;;;qBA0Fb,+BAA4B,iBACxB,mBACE,MACX;;YAmCI;EACV;EACA;;EAEA;;;;;;;;qBASW,sBAAmB,iBACf,qBACE,UAAA,OAAA,6BAC+B;;;;;;qBAwDrC,+BAA4B,iBACxB,mBACE;;;;;;;;qBA+CN,sCAAmC,iBAC/B;;;;;;;;;qBAgDJ,kCAA+B,iBAC3B,mBACE;;;;;;;;qBAyCN,oCAAiC,iBAC7B;;;;;;;;;qBAyDJ,6BAA0B;;;;;;;;qBAmR1B,wBAAqB;qBAIrB,mBAAgB,iBACZ;qBAoBJ,oBAAiB,iBACb;qBAoBJ,mBAAgB,iBACZ;;;;;;;;;;;;;qBA2EJ,oBAAiB,iBACb;;;;;;;qBA2EJ,yBAAsB;qBAgBtB,mBAAgB;;;;;qBA6DhB,6BAA0B,iBACtB;;;;;;qBA8BJ,kCAA+B,iBAC3B,mBACE,cACH;;;;;;;;;;qBAiCH,sCAAmC,iBAC/B,oBACG,2BACO;;;;;qBAqGd,mCAAgC,iBAC5B;;;;;qBAcJ,gCAA6B;;;;;qBA+D7B,iCAA8B,iBAC1B;;;;;;;qBAgBJ,8BAA2B,iBACvB;;;;;;qBAgQJ,qCAAkC,iBAC9B,mBACE,YACL"}
@@ -1,6 +1,6 @@
1
1
  import { ensureNamedImport, firstInsertIndex, isModuleScopeBinding } from "./astImports.js";
2
2
  import { BACKEND_INTLAYER_PACKAGES } from "./backendPackages.js";
3
- import { RoutingMode, enableIntlayerEditorConfig, getMetroConfigTemplate, hasIntlayerVitePlugin, replaceViteConfigPluginImportSource, setIntlayerConfigCompilerOutput, setIntlayerConfigDictionaryLocale, setIntlayerConfigEnableProxy, setIntlayerConfigRoutingMode, setIntlayerConfigRoutingStorageOnly, updateAstroConfig, updateIntlayerConfigWithSyncPlugin, updateMetroConfig, updateNextConfig, updateNextConfigForNextI18next, updateNextConfigForNextIntl, updateNextConfigForNextTranslate, updateNuxtConfig, updateNuxtConfigForNuxtjsI18n, updateViteConfig, updateViteConfigForCompatPlugin, updateViteConfigForVueI18n } from "./configManipulation.js";
3
+ import { IntlayerConfigAiSettings, RoutingMode, enableIntlayerEditorConfig, getMetroConfigTemplate, hasIntlayerVitePlugin, replaceViteConfigPluginImportSource, setIntlayerConfigAi, setIntlayerConfigCompilerOutput, setIntlayerConfigDictionaryLocale, setIntlayerConfigEnableProxy, setIntlayerConfigRoutingMode, setIntlayerConfigRoutingStorageOnly, updateAstroConfig, updateIntlayerConfigWithSyncPlugin, updateMetroConfig, updateNextConfig, updateNextConfigForNextI18next, updateNextConfigForNextIntl, updateNextConfigForNextTranslate, updateNuxtConfig, updateNuxtConfigForNuxtjsI18n, updateViteConfig, updateViteConfigForCompatPlugin, updateViteConfigForVueI18n } from "./configManipulation.js";
4
4
  import { JsonLocalePattern, JsonLocalePatternType, LinguiCatalogPattern, NextIntlMessagesPattern, detectJsonLocalePattern, detectLinguiCatalogPattern, detectNextIntlMessagesPattern, ensureDirectory, exists, readFileFromRoot, writeFileToRoot } from "./fileSystem.js";
5
5
  import { GITHUB_FILL_WORKFLOW_PATH, GITHUB_TEST_WORKFLOW_PATH, GithubWorkflowFile, GithubWorkflowsContext, GithubWorkflowsOptions, getGithubWorkflows, resolveGithubWorkflowsContext } from "./githubActions.js";
6
6
  import { IntlayerDependency, IntlayerDependencyUpgrade, PackageJsonIntlayerDependencies, fetchLatestPackageVersion, findPackageJsonFiles, getIntlayerDependencies, getIntlayerDependencyUpgrades, listIntlayerDependencies, toRange, writeIntlayerDependencyUpgrades } from "./intlayerDependencies.js";
@@ -9,7 +9,8 @@ import { LINT_PLUGIN_PACKAGE_NAME, OxlintConfig, addIntlayerRulesToOxlintConfig
9
9
  import { NEXT_INTLAYER_BABEL_CONFIG_CONTENT, setupNextCompilerBabelConfig } from "./nextCompilerBabel.js";
10
10
  import { COMPAT_I18N_LIBRARIES, COMPAT_PACKAGE_REPLACEMENTS, CompatI18nLibrary, CompatSyncConfig, CompatVitePluginConfig, DetectMissingPackagesOptions, IntlayerPackageAnalysis, MINIMUM_ESLINT_MAJOR, PENDING_COMPAT_ADAPTERS, PackageManager, detectCompatI18nLibraries, detectMissingIntlayerPackages, detectPackageManager, findLockFileDir, hasLegacyEslint, hasLintTooling, installPackages, isIntlayerPackageName, moveCompatPackagesToDevDependencies, normalizeVersion, runPackageInstall } from "./packageManager.js";
11
11
  import { JSON_PRETTIER_CONFIG_FILES, PRETTIER_CONFIG_FILES, PRETTIER_PLUGIN_PACKAGE_NAME, PrettierConfig, addIntlayerPluginToPrettierConfig, hasPrettier } from "./prettierConfig.js";
12
+ import { CONTENT_DECLARATION_ROUTE_IGNORE_PATTERN, ESLINT_FLAT_CONFIG_FILES, SCRIPT_PRETTIER_CONFIG_FILES, ToolConfigPatchResult, YAML_PRETTIER_CONFIG_FILES, addIntlayerPluginToPrettierScriptConfig, addIntlayerPluginToPrettierYamlConfig, addIntlayerPresetToEslintFlatConfig, hasTanStackRouterVitePlugin, setTanStackRouteFileIgnorePattern } from "./toolConfigManipulation.js";
12
13
  import { findTsConfigFiles } from "./tsConfig.js";
13
14
  import { hasUrlRoutingFramework } from "./urlRoutingFramework.js";
14
15
  import { isVersionAtLeast } from "./version.js";
15
- export { BACKEND_INTLAYER_PACKAGES, COMPAT_I18N_LIBRARIES, COMPAT_PACKAGE_REPLACEMENTS, CompatI18nLibrary, CompatSyncConfig, CompatVitePluginConfig, DetectMissingPackagesOptions, GITHUB_FILL_WORKFLOW_PATH, GITHUB_TEST_WORKFLOW_PATH, GithubWorkflowFile, GithubWorkflowsContext, GithubWorkflowsOptions, IntlayerDependency, IntlayerDependencyUpgrade, IntlayerPackageAnalysis, JSON_PRETTIER_CONFIG_FILES, JsonLocalePattern, JsonLocalePatternType, LINT_PLUGIN_PACKAGE_NAME, LinguiCatalogPattern, MINIMUM_ESLINT_MAJOR, NEXT_INTLAYER_BABEL_CONFIG_CONTENT, NextIntlMessagesPattern, OxlintConfig, PENDING_COMPAT_ADAPTERS, PRETTIER_CONFIG_FILES, PRETTIER_PLUGIN_PACKAGE_NAME, PackageJsonIntlayerDependencies, PackageManager, PrettierConfig, RoutingMode, addIntlayerPluginToPrettierConfig, addIntlayerRulesToOxlintConfig, detectCompatI18nLibraries, detectJsonLocalePattern, detectLinguiCatalogPattern, detectMissingIntlayerPackages, detectNextIntlMessagesPattern, detectPackageManager, enableIntlayerEditorConfig, ensureDirectory, ensureNamedImport, exists, fetchLatestPackageVersion, findLockFileDir, findPackageJsonFiles, findTsConfigFiles, firstInsertIndex, getGithubWorkflows, getIntlayerDependencies, getIntlayerDependencyUpgrades, getMetroConfigTemplate, hasIntlayerVitePlugin, hasLegacyEslint, hasLintTooling, hasPrettier, hasUrlRoutingFramework, installPackages, isIntlayerPackageName, isModuleScopeBinding, isVersionAtLeast, listIntlayerDependencies, moveCompatPackagesToDevDependencies, normalizeVersion, parseJSONWithComments, readFileFromRoot, replaceViteConfigPluginImportSource, resolveGithubWorkflowsContext, runPackageInstall, setIntlayerConfigCompilerOutput, setIntlayerConfigDictionaryLocale, setIntlayerConfigEnableProxy, setIntlayerConfigRoutingMode, setIntlayerConfigRoutingStorageOnly, setupNextCompilerBabelConfig, toRange, updateAstroConfig, updateIntlayerConfigWithSyncPlugin, updateMetroConfig, updateNextConfig, updateNextConfigForNextI18next, updateNextConfigForNextIntl, updateNextConfigForNextTranslate, updateNuxtConfig, updateNuxtConfigForNuxtjsI18n, updateViteConfig, updateViteConfigForCompatPlugin, updateViteConfigForVueI18n, writeFileToRoot, writeIntlayerDependencyUpgrades };
16
+ export { BACKEND_INTLAYER_PACKAGES, COMPAT_I18N_LIBRARIES, COMPAT_PACKAGE_REPLACEMENTS, CONTENT_DECLARATION_ROUTE_IGNORE_PATTERN, CompatI18nLibrary, CompatSyncConfig, CompatVitePluginConfig, DetectMissingPackagesOptions, ESLINT_FLAT_CONFIG_FILES, GITHUB_FILL_WORKFLOW_PATH, GITHUB_TEST_WORKFLOW_PATH, GithubWorkflowFile, GithubWorkflowsContext, GithubWorkflowsOptions, IntlayerConfigAiSettings, IntlayerDependency, IntlayerDependencyUpgrade, IntlayerPackageAnalysis, JSON_PRETTIER_CONFIG_FILES, JsonLocalePattern, JsonLocalePatternType, LINT_PLUGIN_PACKAGE_NAME, LinguiCatalogPattern, MINIMUM_ESLINT_MAJOR, NEXT_INTLAYER_BABEL_CONFIG_CONTENT, NextIntlMessagesPattern, OxlintConfig, PENDING_COMPAT_ADAPTERS, PRETTIER_CONFIG_FILES, PRETTIER_PLUGIN_PACKAGE_NAME, PackageJsonIntlayerDependencies, PackageManager, PrettierConfig, RoutingMode, SCRIPT_PRETTIER_CONFIG_FILES, ToolConfigPatchResult, YAML_PRETTIER_CONFIG_FILES, addIntlayerPluginToPrettierConfig, addIntlayerPluginToPrettierScriptConfig, addIntlayerPluginToPrettierYamlConfig, addIntlayerPresetToEslintFlatConfig, addIntlayerRulesToOxlintConfig, detectCompatI18nLibraries, detectJsonLocalePattern, detectLinguiCatalogPattern, detectMissingIntlayerPackages, detectNextIntlMessagesPattern, detectPackageManager, enableIntlayerEditorConfig, ensureDirectory, ensureNamedImport, exists, fetchLatestPackageVersion, findLockFileDir, findPackageJsonFiles, findTsConfigFiles, firstInsertIndex, getGithubWorkflows, getIntlayerDependencies, getIntlayerDependencyUpgrades, getMetroConfigTemplate, hasIntlayerVitePlugin, hasLegacyEslint, hasLintTooling, hasPrettier, hasTanStackRouterVitePlugin, hasUrlRoutingFramework, installPackages, isIntlayerPackageName, isModuleScopeBinding, isVersionAtLeast, listIntlayerDependencies, moveCompatPackagesToDevDependencies, normalizeVersion, parseJSONWithComments, readFileFromRoot, replaceViteConfigPluginImportSource, resolveGithubWorkflowsContext, runPackageInstall, setIntlayerConfigAi, setIntlayerConfigCompilerOutput, setIntlayerConfigDictionaryLocale, setIntlayerConfigEnableProxy, setIntlayerConfigRoutingMode, setIntlayerConfigRoutingStorageOnly, setTanStackRouteFileIgnorePattern, setupNextCompilerBabelConfig, toRange, updateAstroConfig, updateIntlayerConfigWithSyncPlugin, updateMetroConfig, updateNextConfig, updateNextConfigForNextI18next, updateNextConfigForNextIntl, updateNextConfigForNextTranslate, updateNuxtConfig, updateNuxtConfigForNuxtjsI18n, updateViteConfig, updateViteConfigForCompatPlugin, updateViteConfigForVueI18n, writeFileToRoot, writeIntlayerDependencyUpgrades };
@@ -0,0 +1,46 @@
1
+ /** ESLint flat config file names, in the order ESLint resolves them. */
2
+ export declare const ESLINT_FLAT_CONFIG_FILES: string[];
3
+ /** Prettier config files holding JavaScript / TypeScript. */
4
+ export declare const SCRIPT_PRETTIER_CONFIG_FILES: string[];
5
+ /** Prettier config files holding YAML. */
6
+ export declare const YAML_PRETTIER_CONFIG_FILES: string[];
7
+ /**
8
+ * Outcome of a config patch: `updated` carries the rewritten file, `already`
9
+ * means the plugin is wired, `unsupported` that the file shape is not one the
10
+ * patcher can edit safely (the caller prints the manual snippet instead).
11
+ */
12
+ export type ToolConfigPatchResult = {
13
+ status: 'updated';
14
+ content: string;
15
+ } | {
16
+ status: 'already' | 'unsupported';
17
+ };
18
+ /**
19
+ * Adds `...intlayer.configs.recommended` to an ESLint flat config, importing
20
+ * `eslint-plugin-intlayer` when needed. Handles the exported array, and the
21
+ * `defineConfig(…)` / `tseslint.config(…)` / `composer(…)`-style helpers
22
+ * (array argument or variadic configs).
23
+ */
24
+ export declare const addIntlayerPresetToEslintFlatConfig: (content: string, extension: string) => ToolConfigPatchResult;
25
+ /**
26
+ * Adds `prettier-plugin-intlayer` to the `plugins` of a JavaScript /
27
+ * TypeScript Prettier config (`export default {…}`, `module.exports = {…}`,
28
+ * or an exported `const config = {…}`).
29
+ */
30
+ export declare const addIntlayerPluginToPrettierScriptConfig: (content: string) => ToolConfigPatchResult;
31
+ /**
32
+ * Adds `prettier-plugin-intlayer` to a YAML Prettier config: appends a
33
+ * `plugins` block, or extends an existing block / flow list.
34
+ */
35
+ export declare const addIntlayerPluginToPrettierYamlConfig: (content: string) => ToolConfigPatchResult;
36
+ /** Content declaration extensions TanStack Router must not treat as routes. */
37
+ export declare const CONTENT_DECLARATION_ROUTE_IGNORE_PATTERN = "\\.content\\.(ts|tsx|js|jsx|mjs|cjs|json|jsonc|json5|md|mdx|yaml|yml)$";
38
+ /** Whether a Vite config registers a TanStack Router / Start plugin. */
39
+ export declare const hasTanStackRouterVitePlugin: (content: string) => boolean;
40
+ /**
41
+ * Sets `routeFileIgnorePattern` on the TanStack Start / Router Vite plugin so
42
+ * co-located `.content.*` files are not picked up as route files. An existing
43
+ * string pattern is combined with the content one.
44
+ */
45
+ export declare const setTanStackRouteFileIgnorePattern: (content: string) => ToolConfigPatchResult;
46
+ //# sourceMappingURL=toolConfigManipulation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolConfigManipulation.d.ts","names":[],"sources":["../../../../src/init/utils/toolConfigManipulation.ts"],"mappings":";qBASa;;qBAUA;;qBAgBA;;;;;;YAUD;EACN;EAAmB;;EACnB;;;;;;;;qBAuIO,sCAAmC,iBAC/B,sBAEd;;;;;;qBA+DU,0CAAuC,oBAEjD;;;;;qBAgDU,wCAAqC,oBAE/C;;qBA8DU;;qBAWA,8BAA2B;;;;;;qBAU3B,oCAAiC,oBAE3C"}
@@ -8,4 +8,10 @@ export declare const MCP_TRANSPORTS: MCPTransport[];
8
8
  * through `.mcp.json`), so nothing outside the project is modified.
9
9
  */
10
10
  export declare const installMCP: (projectRoot: string, platform: Platform, transport: MCPTransport) => Promise<string>;
11
+ /**
12
+ * Points the stdio Intlayer MCP entries of every platform config of the
13
+ * project at the given dist-tag (`npx -y @intlayer/mcp@latest`), so agents
14
+ * start the upgraded server. Returns the config files that were rewritten.
15
+ */
16
+ export declare const upgradeMCPConfigs: (projectRoot: string, distTag?: string) => Promise<string[]>;
11
17
  //# sourceMappingURL=installMCP.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"installMCP.d.ts","names":[],"sources":["../../../src/installMCP/installMCP.ts"],"mappings":";YAIY;;qBAGC,gBAAgB;;;;;;qBA4DhB,aAAU,qBACF,UACT,UAAQ,WACP,iBACV"}
1
+ {"version":3,"file":"installMCP.d.ts","names":[],"sources":["../../../src/installMCP/installMCP.ts"],"mappings":";YAIY;;qBAGC,gBAAgB;;;;;;qBAsEhB,aAAU,qBACF,UACT,UAAQ,WACP,iBACV;;;;;;qBAmCU,oBAAiB,qBACT,qBAElB"}
@@ -1,6 +1,6 @@
1
1
  import { DictionariesStatus } from "./loadDictionaries.js";
2
- import { DictionaryAPI } from "@intlayer/api";
3
2
  import { Dictionary } from "@intlayer/types/dictionary";
3
+ import { DictionaryAPI } from "@intlayer/api";
4
4
  export declare const formatDistantDictionaries: (dictionaries: (DictionaryAPI | Dictionary)[]) => Dictionary[];
5
5
  export declare const loadRemoteDictionaries: (configuration?: import("@intlayer/types").IntlayerConfig, onStatusUpdate?: (status: DictionariesStatus[]) => void, options?: {
6
6
  onStartRemoteCheck?: () => void;
@@ -1,7 +1,7 @@
1
1
  import { analyzeBundleContent } from "./analyzeBundleContent.js";
2
- import { RoutingDetection, RoutingDetectionInput, RoutingStrategy, detectRoutingStrategy, getUrlLocale } from "./detection/detectRoutingStrategy.js";
3
2
  import { ScorableEvent, Score, ScoreCheckType, mutateScore, scoreRecord, toScorePercent } from "./calculateScore.js";
4
3
  import { EmitScanEvent, PageSignals, checkBundleContent, checkCanonical, checkHreflang, checkHreflangReciprocity, checkHtmlDir, checkHtmlLang, checkInternalLinks, checkLocaleConsistency, checkOgLocale, checkRobots, checkSitemap, checkXDefault, formatBundleAnalysis, formatSize } from "./checks.js";
4
+ import { RoutingDetection, RoutingDetectionInput, RoutingStrategy, detectRoutingStrategy, getUrlLocale } from "./detection/detectRoutingStrategy.js";
5
5
  import { TechnologyCategory, TechnologySignature, technologySignatures } from "./detection/technologySignatures.js";
6
6
  import { DetectedTechnology, TechnologyDetectionInput, detectTechnologies, getTechnologyGlobalNames } from "./detection/detectTechnologies.js";
7
7
  import "./detection/index.js";
@@ -9,12 +9,12 @@ import { FetchTextResult, ScanFetchOptions, fetchText } from "./fetchText.js";
9
9
  import { Anchor, HreflangLink, byteLength, extractAnchors, extractCanonicalHref, extractHreflangs, extractHtmlDir, extractHtmlLang, extractMetaDescription, extractOgImage, extractOgLocale, extractOgLocaleAlternates, extractResourceUrls, extractScriptUrls, extractTitle, extractVisibleTextStrings, hasCanonical } from "./parseHtml.js";
10
10
  import { ParsedRobots, isPathAllowedByRobots, parseRobots } from "./robots.js";
11
11
  import { RunScanChecksOptions, ScanChecksResult, ScanPageInfo, ScanPageInput, runScanChecks } from "./runScanChecks.js";
12
- import { scanWebsite } from "./scanWebsite.js";
13
12
  import { CheckDetailParts, getCheckDetailLines, splitCheckDetails } from "./detection/checkDetails.js";
14
13
  import { LinkAnchor, LinkClassification, LinkClassificationInput, classifyInternalLinks } from "./detection/classifyInternalLinks.js";
15
14
  import { findMatchingLocale, getLanguageCode, isRightToLeftLocale, isSameLanguage, isSameLocale, isValidLocaleCode, isValidOpenGraphLocale, looksLikeLocaleCode, normalizeLocaleCode, toOpenGraphLocale } from "./detection/localeCode.js";
16
15
  import { BaseLocalePageInput, LocalizedPage, getLocalizedPages, isBaseLocalePage } from "./detection/localizedPages.js";
17
16
  import { getFirstPathSegment, getSiteDomain, isAbsoluteUrl, normalizeHostname, normalizeUrl, parseUrl, toAbsoluteScanUrl } from "./detection/url.js";
17
+ import { scanWebsite } from "./scanWebsite.js";
18
18
  import { CollectedSitemaps, ParsedSitemap, SitemapEntry, collectSitemapEntries, discoverSitemapUrls, getDefaultSitemapUrls, parseSitemap } from "./sitemap.js";
19
19
  import { BundleChunkInput, BundleContentAnalysis, ChunkAnalysis, PageMetadata, ScanCheckStatus, ScanEvent, ScanEventDetails, ScanMode, ScanOptions, ScanResult } from "./types.js";
20
20
  export { Anchor, BaseLocalePageInput, BundleChunkInput, BundleContentAnalysis, CheckDetailParts, ChunkAnalysis, CollectedSitemaps, DetectedTechnology, EmitScanEvent, FetchTextResult, HreflangLink, LinkAnchor, LinkClassification, LinkClassificationInput, LocalizedPage, PageMetadata, PageSignals, ParsedRobots, ParsedSitemap, RoutingDetection, RoutingDetectionInput, RoutingStrategy, RunScanChecksOptions, ScanCheckStatus, ScanChecksResult, ScanEvent, ScanEventDetails, ScanFetchOptions, ScanMode, ScanOptions, ScanPageInfo, ScanPageInput, ScanResult, ScorableEvent, Score, ScoreCheckType, SitemapEntry, TechnologyCategory, TechnologyDetectionInput, TechnologySignature, analyzeBundleContent, byteLength, checkBundleContent, checkCanonical, checkHreflang, checkHreflangReciprocity, checkHtmlDir, checkHtmlLang, checkInternalLinks, checkLocaleConsistency, checkOgLocale, checkRobots, checkSitemap, checkXDefault, classifyInternalLinks, collectSitemapEntries, detectRoutingStrategy, detectTechnologies, discoverSitemapUrls, extractAnchors, extractCanonicalHref, extractHreflangs, extractHtmlDir, extractHtmlLang, extractMetaDescription, extractOgImage, extractOgLocale, extractOgLocaleAlternates, extractResourceUrls, extractScriptUrls, extractTitle, extractVisibleTextStrings, fetchText, findMatchingLocale, formatBundleAnalysis, formatSize, getCheckDetailLines, getDefaultSitemapUrls, getFirstPathSegment, getLanguageCode, getLocalizedPages, getSiteDomain, getTechnologyGlobalNames, getUrlLocale, hasCanonical, isAbsoluteUrl, isBaseLocalePage, isPathAllowedByRobots, isRightToLeftLocale, isSameLanguage, isSameLocale, isValidLocaleCode, isValidOpenGraphLocale, looksLikeLocaleCode, mutateScore, normalizeHostname, normalizeLocaleCode, normalizeUrl, parseRobots, parseSitemap, parseUrl, runScanChecks, scanWebsite, scoreRecord, splitCheckDetails, technologySignatures, toAbsoluteScanUrl, toOpenGraphLocale, toScorePercent };
@@ -1,8 +1,8 @@
1
1
  import { DictionaryStatus } from "./dictionaryStatus.js";
2
2
  import { IntlayerConfig } from "@intlayer/types/config";
3
3
  import { Dictionary } from "@intlayer/types/dictionary";
4
- import { LocalesValues } from "@intlayer/types/module_augmentation";
5
4
  import { Locale } from "@intlayer/types/allLocales";
5
+ import { LocalesValues } from "@intlayer/types/module_augmentation";
6
6
  type WriteContentDeclarationOptions = {
7
7
  newDictionariesPath?: string;
8
8
  localeList?: LocalesValues[];
@@ -1 +1 @@
1
- {"version":3,"file":"writeContentDeclaration.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeContentDeclaration.ts"],"mappings":";;;;;KAmBK;EACH;EACA,aAAa;EACb,iBAAiB;;qBAON,0BAAuB,YACtB,YAAU,eACP,gBAAc,UACnB,mCACT;EAAU,QAAQ;EAAkB"}
1
+ {"version":3,"file":"writeContentDeclaration.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeContentDeclaration.ts"],"mappings":";;;;;KAkBK;EACH;EACA,aAAa;EACb,iBAAiB;;qBAON,0BAAuB,YACtB,YAAU,eACP,gBAAc,UACnB,mCACT;EAAU,QAAQ;EAAkB"}
@@ -1 +1 @@
1
- {"version":3,"file":"writeJSFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeJSFile.ts"],"mappings":";;;;;;;;qBAqBa,cAAW,kBACN,YACJ,YAAU,eACP,gBAAc,yBAE5B"}
1
+ {"version":3,"file":"writeJSFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeJSFile.ts"],"mappings":";;;;;;;;qBAoBa,cAAW,kBACN,YACJ,YAAU,eACP,gBAAc,yBAE5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"writeMarkdownFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeMarkdownFile.ts"],"mappings":";;qBAQa,oBAAiB,0BACJ,YACZ,YAAU,eACP,mBACd"}
1
+ {"version":3,"file":"writeMarkdownFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeMarkdownFile.ts"],"mappings":";;qBAOa,oBAAiB,0BACJ,YACZ,YAAU,eACP,mBACd"}
@@ -1 +1 @@
1
- {"version":3,"file":"writeYamlFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeYamlFile.ts"],"mappings":";;qBAQa,gBAAa,0BACA,YACZ,YAAU,eACP,mBACd"}
1
+ {"version":3,"file":"writeYamlFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeYamlFile.ts"],"mappings":";;qBAOa,gBAAa,0BACA,YACZ,YAAU,eACP,mBACd"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/engine",
3
- "version": "9.8.0",
3
+ "version": "9.8.2",
4
4
  "private": false,
5
5
  "description": "Scans and builds Intlayer declaration files into dictionaries based on Intlayer configuration.",
6
6
  "keywords": [
@@ -158,16 +158,16 @@
158
158
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
159
159
  },
160
160
  "dependencies": {
161
- "@intlayer/api": "9.8.0",
162
- "@intlayer/config": "9.8.0",
163
- "@intlayer/core": "9.8.0",
164
- "@intlayer/dictionaries-entry": "9.8.0",
165
- "@intlayer/types": "9.8.0",
161
+ "@intlayer/api": "9.8.2",
162
+ "@intlayer/config": "9.8.2",
163
+ "@intlayer/core": "9.8.2",
164
+ "@intlayer/dictionaries-entry": "9.8.2",
165
+ "@intlayer/types": "9.8.2",
166
166
  "@parcel/watcher": "2.6.0",
167
167
  "defu": "6.1.7",
168
168
  "fast-glob": "3.3.3",
169
- "recast": "0.24.0",
170
- "simple-git": "4.0.2",
169
+ "recast": "0.24.3",
170
+ "simple-git": "4.1.0",
171
171
  "zod-to-ts": "2.1.0"
172
172
  },
173
173
  "devDependencies": {
@@ -178,11 +178,11 @@
178
178
  "rimraf": "6.1.4",
179
179
  "tsdown": "0.23.7",
180
180
  "typescript": "7.0.2",
181
- "vitest": "5.1.0",
181
+ "vitest": "5.1.1",
182
182
  "zod": "4.6.7"
183
183
  },
184
184
  "peerDependencies": {
185
- "@intlayer/babel": "9.8.0"
185
+ "@intlayer/babel": "9.8.2"
186
186
  },
187
187
  "peerDependenciesMeta": {
188
188
  "@intlayer/babel": {