@intlayer/engine 9.5.2 → 9.5.4-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +9 -9
  2. package/dist/assets/initConfig/templates/cjs.txt +0 -4
  3. package/dist/assets/initConfig/templates/json.txt +0 -4
  4. package/dist/assets/initConfig/templates/mjs.txt +0 -4
  5. package/dist/assets/initConfig/templates/ts.txt +0 -4
  6. package/dist/cjs/_virtual/_utils_asset.cjs +1 -1
  7. package/dist/cjs/build.cjs +2 -2
  8. package/dist/cjs/cleanOutputDir.cjs +1 -1
  9. package/dist/cjs/cleanRemovedContentDeclaration.cjs +37 -20
  10. package/dist/cjs/cleanRemovedContentDeclaration.cjs.map +1 -1
  11. package/dist/cjs/cli.cjs +2 -2
  12. package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +2 -2
  13. package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +2 -2
  14. package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +2 -2
  15. package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +2 -2
  16. package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +2 -2
  17. package/dist/cjs/createType/createModuleAugmentation.cjs +2 -2
  18. package/dist/cjs/docReview/index.cjs +4 -4
  19. package/dist/cjs/docReview/pipeline.cjs +2 -2
  20. package/dist/cjs/docReview/reviewReport.cjs +1 -1
  21. package/dist/cjs/filterInvalidDictionaries.cjs +1 -1
  22. package/dist/cjs/handleAdditionalContentDeclarationFile.cjs +1 -1
  23. package/dist/cjs/handleContentDeclarationFileChange.cjs +4 -4
  24. package/dist/cjs/handleContentDeclarationFileMoved.cjs +1 -1
  25. package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs +1 -1
  26. package/dist/cjs/init/cms.cjs +2 -2
  27. package/dist/cjs/init/frameworkSetup/nextAppRouter/index.cjs +1 -1
  28. package/dist/cjs/init/frameworkSetup/tanstackStart/index.cjs +1 -1
  29. package/dist/cjs/init/index.cjs +2 -2
  30. package/dist/cjs/init/utils/fileSystem.cjs +1 -1
  31. package/dist/cjs/init/utils/githubActions.cjs +1 -1
  32. package/dist/cjs/init/utils/nextCompilerBabel.cjs +1 -1
  33. package/dist/cjs/init/utils/packageManager.cjs +1 -1
  34. package/dist/cjs/installLSP.cjs +1 -1
  35. package/dist/cjs/installMCP/installMCP.cjs +1 -1
  36. package/dist/cjs/installSkills/index.cjs +1 -1
  37. package/dist/cjs/listDictionariesPath.cjs +1 -1
  38. package/dist/cjs/listGitFiles.cjs +2 -2
  39. package/dist/cjs/listProjects.cjs +1 -1
  40. package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +1 -1
  41. package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +1 -1
  42. package/dist/cjs/loadDictionaries/loadDictionaries.cjs +1 -1
  43. package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +2 -2
  44. package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -1
  45. package/dist/cjs/loadDictionaries/log.cjs +2 -2
  46. package/dist/cjs/logConfigDetails.cjs +3 -3
  47. package/dist/cjs/logConfigDetails.cjs.map +1 -1
  48. package/dist/cjs/prepareIntlayer.cjs +3 -3
  49. package/dist/cjs/scan/index.cjs +1 -1
  50. package/dist/cjs/scan/scanWebsite.cjs +2 -2
  51. package/dist/cjs/syncPluginKit/createFileAdapter.cjs +1 -1
  52. package/dist/cjs/utils/autoDecorateContent.cjs +5 -5
  53. package/dist/cjs/utils/autoDecorateContent.cjs.map +1 -1
  54. package/dist/cjs/utils/buildComponentFilesList.cjs +2 -2
  55. package/dist/cjs/utils/contentWatcherLock.cjs +2 -2
  56. package/dist/cjs/utils/formatter.cjs +1 -1
  57. package/dist/cjs/utils/readDictionariesFromDisk.cjs +1 -1
  58. package/dist/cjs/utils/runOnce.cjs +1 -1
  59. package/dist/cjs/utils/runParallel/pidTree.cjs +1 -1
  60. package/dist/cjs/utils/withFileLock.cjs +1 -1
  61. package/dist/cjs/watcher.cjs +5 -5
  62. package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +1 -1
  63. package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +1 -1
  64. package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +1 -1
  65. package/dist/cjs/writeFileIfChanged.cjs +1 -1
  66. package/dist/esm/_virtual/_utils_asset.mjs +1 -1
  67. package/dist/esm/build.mjs +2 -2
  68. package/dist/esm/cleanOutputDir.mjs +1 -1
  69. package/dist/esm/cleanRemovedContentDeclaration.mjs +37 -20
  70. package/dist/esm/cleanRemovedContentDeclaration.mjs.map +1 -1
  71. package/dist/esm/cli.mjs +2 -2
  72. package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +2 -2
  73. package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +2 -2
  74. package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +2 -2
  75. package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +2 -2
  76. package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +2 -2
  77. package/dist/esm/createType/createModuleAugmentation.mjs +1 -1
  78. package/dist/esm/docReview/index.mjs +4 -4
  79. package/dist/esm/docReview/pipeline.mjs +2 -2
  80. package/dist/esm/docReview/reviewReport.mjs +1 -1
  81. package/dist/esm/filterInvalidDictionaries.mjs +1 -1
  82. package/dist/esm/handleAdditionalContentDeclarationFile.mjs +1 -1
  83. package/dist/esm/handleContentDeclarationFileChange.mjs +4 -4
  84. package/dist/esm/handleContentDeclarationFileMoved.mjs +1 -1
  85. package/dist/esm/handleUnlinkedContentDeclarationFile.mjs +1 -1
  86. package/dist/esm/init/cms.mjs +1 -1
  87. package/dist/esm/init/frameworkSetup/nextAppRouter/index.mjs +1 -1
  88. package/dist/esm/init/frameworkSetup/tanstackStart/index.mjs +1 -1
  89. package/dist/esm/init/index.mjs +1 -1
  90. package/dist/esm/init/utils/fileSystem.mjs +1 -1
  91. package/dist/esm/init/utils/githubActions.mjs +1 -1
  92. package/dist/esm/init/utils/nextCompilerBabel.mjs +1 -1
  93. package/dist/esm/init/utils/packageManager.mjs +1 -1
  94. package/dist/esm/installLSP.mjs +1 -1
  95. package/dist/esm/installMCP/installMCP.mjs +1 -1
  96. package/dist/esm/installSkills/index.mjs +1 -1
  97. package/dist/esm/listDictionariesPath.mjs +1 -1
  98. package/dist/esm/listGitFiles.mjs +2 -2
  99. package/dist/esm/listProjects.mjs +1 -1
  100. package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +1 -1
  101. package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +1 -1
  102. package/dist/esm/loadDictionaries/loadDictionaries.mjs +1 -1
  103. package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +1 -1
  104. package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -1
  105. package/dist/esm/loadDictionaries/log.mjs +1 -1
  106. package/dist/esm/logConfigDetails.mjs +3 -3
  107. package/dist/esm/logConfigDetails.mjs.map +1 -1
  108. package/dist/esm/prepareIntlayer.mjs +2 -2
  109. package/dist/esm/scan/index.mjs +1 -1
  110. package/dist/esm/scan/scanWebsite.mjs +2 -2
  111. package/dist/esm/syncPluginKit/createFileAdapter.mjs +1 -1
  112. package/dist/esm/utils/autoDecorateContent.mjs +5 -5
  113. package/dist/esm/utils/autoDecorateContent.mjs.map +1 -1
  114. package/dist/esm/utils/buildComponentFilesList.mjs +1 -1
  115. package/dist/esm/utils/contentWatcherLock.mjs +2 -2
  116. package/dist/esm/utils/formatter.mjs +1 -1
  117. package/dist/esm/utils/readDictionariesFromDisk.mjs +1 -1
  118. package/dist/esm/utils/runOnce.mjs +1 -1
  119. package/dist/esm/utils/runParallel/pidTree.mjs +1 -1
  120. package/dist/esm/utils/withFileLock.mjs +1 -1
  121. package/dist/esm/watcher.mjs +4 -4
  122. package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +1 -1
  123. package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +1 -1
  124. package/dist/esm/writeContentDeclaration/writeJSFile.mjs +1 -1
  125. package/dist/esm/writeFileIfChanged.mjs +1 -1
  126. package/dist/types/cleanRemovedContentDeclaration.d.ts.map +1 -1
  127. package/dist/types/formatDictionary.d.ts +2 -3
  128. package/dist/types/formatDictionary.d.ts.map +1 -1
  129. package/dist/types/logConfigDetails.d.ts.map +1 -1
  130. package/dist/types/utils/autoDecorateContent.d.ts.map +1 -1
  131. package/package.json +10 -11
  132. package/dist/types/intlayer/dist/types/index.d.ts +0 -14
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <a href="https://intlayer.org" rel="">
3
- <img src="https://raw.githubusercontent.com/aymericzip/intlayer/main/docs/assets/cover.png" width="60%" alt="Intlayer Logo" />
3
+ <img src="https://raw.githubusercontent.com/aymericzip/intlayer/main/docs/assets/cover.webp" width="60%" alt="Intlayer Logo" />
4
4
  </a>
5
5
  </p>
6
6
 
@@ -49,10 +49,10 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
49
49
 
50
50
  | Feature | Description |
51
51
  | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
52
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.png?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
52
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/frameworks.webp?raw=true" alt="Feature" width="700"> | **Cross-Frameworks Support**<br><br>Intlayer is compatible with all major frameworks and libraries, including Next.js, React, Vite, Vue.js, Nuxt, Preact, Express, and more. |
53
53
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/javascript_content_management.jpg?raw=true" alt="Feature" width="700"> | **JavaScript-Powered Content Management**<br><br>Harness the flexibility of JavaScript to define and manage your content efficiently. <br><br> - [Content declaration](https://intlayer.org/doc/concept/content) |
54
54
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/per_locale_content_declaration_file.png?raw=true" alt="Feature" width="700"> | **Per-Locale Content Declaration File**<br><br>Speed up your development by declaring your content once, before auto generation.<br><br> - [Per-Locale Content Declaration File](https://intlayer.org/doc/concept/per-locale-file) |
55
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.jpg?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
55
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/compiler.webp?raw=true" alt="Feature" width="700"> | **Compiler**<br><br>The Intlayer Compiler extract automatically the content from the components and generate the dictionary files.<br><br> - [Compiler](https://intlayer.org/doc/compiler) |
56
56
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/autocompletion.png?raw=true" alt="Feature" width="700"> | **Type-Safe Environment**<br><br>Leverage TypeScript to ensure your content definitions and code are error-free, while also benefiting from IDE autocompletion.<br><br> - [TypeScript configuration](https://intlayer.org/doc/environment/vite-and-react#configure-typescript) |
57
57
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/config_file.png?raw=true" alt="Feature" width="700"> | **Simplified Setup**<br><br>Get up and running quickly with minimal configuration. Adjust settings for internationalization, routing, AI, build, and content handling with ease. <br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
58
58
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/content_retrieval.png?raw=true" alt="Feature" width="700"> | **Simplified Content Retrieval**<br><br>No need to call your `t` function for each piece of content. Retrieve all your content directly using a single hook.<br><br> - [React integration](https://intlayer.org/doc/environment/create-react-app) |
@@ -60,12 +60,12 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
60
60
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/file_tree.png?raw=true" alt="Feature" width="700"> | **Organized Codebase**<br><br>Keep your codebase more organized: 1 component = 1 dictionary in the same folder. Translations close to their respective components, enhance maintainability and clarity. <br><br> - [How Intlayer works](https://intlayer.org/doc/concept/how-works-intlayer) |
61
61
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/url_routing.png?raw=true" alt="Feature" width="700"> | **Enhanced Routing**<br><br>Full support of app routing, adapting seamlessly to complex application structures, for Next.js, React, Vite, Vue.js, etc.<br><br> - [Explore Next.js integration](https://intlayer.org/doc/environment/nextjs) |
62
62
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/markdown.png?raw=true" alt="Feature" width="700"> | **Markdown Support**<br><br>Import and interpret, locale files and remote Markdown for multilingual content like privacy policies, documentation, etc. Interpret and make Markdown metadata accessible in your code.<br><br> - [Content files](https://intlayer.org/doc/concept/content/file) |
63
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.png?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
64
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.png?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
65
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.png?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
63
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/visual_editor.webp?raw=true" alt="Feature" width="700"> | **Free Visual Editor & CMS**<br><br>A free visual editor and CMS are available for content writers, removing the need for a localization platform. Keep your content synchronized using Git, or externalize it totally or partially with the CMS.<br><br> - [Intlayer Editor](https://intlayer.org/doc/concept/editor) <br> - [Intlayer CMS](https://intlayer.org/doc/concept/cms) |
64
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/bundle.webp?raw=true" alt="Feature" width="700"> | **Tree-shakable Content**<br><br>Tree-shakable content, reducing the size of the final bundle. Loads content per component, excluding any unused content from your bundle. Supports lazy loading to enhance app loading efficiency. <br><br> - [App build optimization](https://intlayer.org/doc/concept/how-works-intlayer#app-build-optimization) |
65
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/static_rendering.webp?raw=true" alt="Feature" width="700"> | **Static Rendering**<br><br>Doesn't block Static Rendering. <br><br> - [Next.js integration](https://intlayer.org/doc/environment/nextjs) |
66
66
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/AI_translation.png?raw=true" alt="Feature" width="700"> | **AI-Powered Translation**<br><br>Transform your website into 231 languages with just one click using Intlayer's advanced AI-powered translation tools using your own AI provider / API key. <br><br> - [CI/CD integration](https://intlayer.org/doc/concept/ci-cd) <br> - [Intlayer CLI](https://intlayer.org/doc/concept/cli) <br> - [Auto fill](https://intlayer.org/doc/concept/auto-fill) |
67
67
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
68
- | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
68
+ | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.webp?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
69
69
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) <br> - [Intlayer compat adapters](https://intlayer.org/doc/compatibility) |
70
70
  | <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
71
71
 
@@ -262,7 +262,7 @@ Intlayer connects **developers**, **copywriters**, and **AI agents** in one work
262
262
  - Feature flags
263
263
  - Headless CMSs (e.g. Contentful, Strapi, Sanity)
264
264
 
265
- ![CMS Preview](https://github.com/aymericzip/intlayer/blob/main/docs/assets/CMS.png?raw=true)
265
+ ![CMS Preview](https://github.com/aymericzip/intlayer/blob/main/docs/assets/CMS.webp?raw=true)
266
266
 
267
267
  ## 🌐 Readme in other languages
268
268
 
@@ -328,4 +328,4 @@ Contribute on [GitHub](https://github.com/aymericzip/intlayer), [GitLab](https:/
328
328
 
329
329
  If you like Intlayer, give us a ⭐ on GitHub. It helps others discover the project! [See why GitHub Stars matter](https://github.com/aymericzip/intlayer/blob/main/CONTRIBUTING.md#why-github-stars-matter-).
330
330
 
331
- [![Star History Chart](https://api.star-history.com/svg?repos=aymericzip/intlayer&type=Date)](https://api.star-history.com/#aymericzip/intlayer&Date)
331
+ [![Star History Chart](https://api.star-history.com/svg?repos=aymericzip/intlayer&type=Date)](https://star-history.com/#aymericzip/intlayer&Date)
@@ -120,15 +120,11 @@ const config = {
120
120
  },
121
121
  build: {
122
122
  /**
123
- * (Experimental feature)
124
- *
125
123
  * Minify the dictionaries to reduce the bundle size.
126
124
  */
127
125
  minify: true,
128
126
 
129
127
  /**
130
- * (Experimental feature)
131
- *
132
128
  * Purge the unused keys in a dictionaries
133
129
  */
134
130
  purge: true,
@@ -80,15 +80,11 @@
80
80
  },
81
81
  "build": {
82
82
  /**
83
- * (Experimental feature)
84
- *
85
83
  * Minify the dictionaries to reduce the bundle size.
86
84
  */
87
85
  "minify": true,
88
86
 
89
87
  /**
90
- * (Experimental feature)
91
- *
92
88
  * Purge the unused keys in a dictionaries
93
89
  */
94
90
  "purge": true,
@@ -120,15 +120,11 @@ const config = {
120
120
  },
121
121
  build: {
122
122
  /**
123
- * (Experimental feature)
124
- *
125
123
  * Minify the dictionaries to reduce the bundle size.
126
124
  */
127
125
  minify: true,
128
126
 
129
127
  /**
130
- * (Experimental feature)
131
- *
132
128
  * Purge the unused keys in a dictionaries
133
129
  */
134
130
  purge: true,
@@ -119,15 +119,11 @@ const config: IntlayerConfig = {
119
119
  },
120
120
  build: {
121
121
  /**
122
- * (Experimental feature)
123
- *
124
122
  * Minify the dictionaries to reduce the bundle size.
125
123
  */
126
124
  minify: true,
127
125
 
128
126
  /**
129
- * (Experimental feature)
130
- *
131
127
  * Purge the unused keys in a dictionaries
132
128
  */
133
129
  purge: true,
@@ -1,5 +1,5 @@
1
- let node_path = require("node:path");
2
1
  let node_fs = require("node:fs");
2
+ let node_path = require("node:path");
3
3
  let node_url = require("node:url");
4
4
 
5
5
  //#region \0utils:asset
@@ -1,4 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_utils_readDictionariesFromDisk = require('./utils/readDictionariesFromDisk.cjs');
3
+ const require_buildIntlayerDictionary_buildIntlayerDictionary = require('./buildIntlayerDictionary/buildIntlayerDictionary.cjs');
2
4
  const require_createDictionaryEntryPoint_generateDictionaryListContent = require('./createDictionaryEntryPoint/generateDictionaryListContent.cjs');
3
5
  const require_createDictionaryEntryPoint_getBuiltDictionariesPath = require('./createDictionaryEntryPoint/getBuiltDictionariesPath.cjs');
4
6
  const require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath = require('./createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs');
@@ -6,8 +8,6 @@ const require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath = require
6
8
  const require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath = require('./createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs');
7
9
  const require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath = require('./createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs');
8
10
  const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
9
- const require_utils_readDictionariesFromDisk = require('./utils/readDictionariesFromDisk.cjs');
10
- const require_buildIntlayerDictionary_buildIntlayerDictionary = require('./buildIntlayerDictionary/buildIntlayerDictionary.cjs');
11
11
  const require_createType_createModuleAugmentation = require('./createType/createModuleAugmentation.cjs');
12
12
  const require_createType_createType = require('./createType/createType.cjs');
13
13
  const require_buildIntlayerDictionary_processContentDeclaration = require('./buildIntlayerDictionary/processContentDeclaration.cjs');
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let node_fs = require("node:fs");
2
3
  let node_fs_promises = require("node:fs/promises");
3
4
  let _intlayer_config_logger = require("@intlayer/config/logger");
4
- let node_fs = require("node:fs");
5
5
 
6
6
  //#region src/cleanOutputDir.ts
7
7
  const cleanOutputDir = async (configuration) => {
@@ -1,16 +1,36 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
- const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
4
3
  const require_utils_readDictionariesFromDisk = require('./utils/readDictionariesFromDisk.cjs');
5
4
  const require_writeJsonIfChanged = require('./writeJsonIfChanged.cjs');
5
+ const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
6
6
  let node_fs_promises = require("node:fs/promises");
7
7
  let node_path = require("node:path");
8
- let _intlayer_config_client = require("@intlayer/config/client");
9
8
  let _intlayer_config_logger = require("@intlayer/config/logger");
10
9
  let fast_glob = require("fast-glob");
11
10
  fast_glob = require_runtime.__toESM(fast_glob);
11
+ let _intlayer_config_client = require("@intlayer/config/client");
12
12
 
13
13
  //#region src/cleanRemovedContentDeclaration.ts
14
+ /**
15
+ * Grace period before bundler-graph artifacts (JSON, dynamic chunks) are
16
+ * deleted, so a bundler rebuild started from the previous entry point can
17
+ * still resolve them.
18
+ */
19
+ const ARTIFACT_REMOVAL_DELAY_MS = 3e3;
20
+ /**
21
+ * Source ids of a merged dictionary. A dictionary built from a single source
22
+ * is written as-is, so it carries `localId` rather than `localIds`.
23
+ */
24
+ const getMergedLocalIds = (dictionary) => dictionary.localIds ?? (dictionary.localId ? [dictionary.localId] : []);
25
+ const removeArtifacts = async (paths, baseDir, appLogger) => await Promise.all(paths.map(async (path) => {
26
+ const relativePath = (0, node_path.relative)(baseDir, path);
27
+ try {
28
+ await (0, node_fs_promises.rm)(path, { force: true });
29
+ appLogger(`Deleted artifact: ${(0, _intlayer_config_logger.colorizePath)(relativePath)}`, { isVerbose: true });
30
+ } catch {
31
+ appLogger(`Error while removing file ${(0, _intlayer_config_logger.colorizePath)(relativePath)}`, { isVerbose: true });
32
+ }
33
+ }));
14
34
  const cleanRemovedContentDeclaration = async (filePath, keysToKeep, configuration) => {
15
35
  const appLogger = (0, _intlayer_config_logger.getAppLogger)(configuration);
16
36
  const unmergedDictionaries = require_utils_readDictionariesFromDisk.readDictionariesFromDisk(configuration.system.unmergedDictionariesDir);
@@ -19,6 +39,7 @@ const cleanRemovedContentDeclaration = async (filePath, keysToKeep, configuratio
19
39
  const uniqueUnmergedDictionaries = Object.values(unmergedDictionaries).flat().filter((dictionary) => dictionary.filePath === relativeFilePath && !keysToKeep.includes(dictionary.key)).filter((dictionary, index, self) => index === self.findIndex((t) => t.key === dictionary.key));
20
40
  const changedDictionariesLocalIds = [];
21
41
  const filesToRemove = [];
42
+ const typeFilesToRemove = [];
22
43
  const excludeKeys = [];
23
44
  await Promise.all(uniqueUnmergedDictionaries.map(async (dictionary) => {
24
45
  const unmergedFilePath = (0, node_path.normalize)((0, node_path.join)(configuration.system.unmergedDictionariesDir, `${dictionary.key}.json`));
@@ -43,28 +64,30 @@ const cleanRemovedContentDeclaration = async (filePath, keysToKeep, configuratio
43
64
  }
44
65
  }));
45
66
  const dictionaries = require_utils_readDictionariesFromDisk.readDictionariesFromDisk(configuration.system.dictionariesDir);
46
- const uniqueMergedDictionaries = (Object.values(dictionaries)?.filter((dictionary) => !keysToKeep.includes(dictionary.key) && dictionary.localIds?.length === 1 && dictionary.localIds[0].endsWith(`::local::${relativeFilePath}`))).filter((dictionary, index, self) => index === self.findIndex((t) => t.key === dictionary.key));
67
+ const flatDictionaries = Object.values(dictionaries);
68
+ const isFromChangedFile = (localId) => localId.endsWith(`::local::${relativeFilePath}`);
69
+ const uniqueMergedDictionaries = (flatDictionaries?.filter((dictionary) => !keysToKeep.includes(dictionary.key) && getMergedLocalIds(dictionary).some(isFromChangedFile))).filter((dictionary, index, self) => index === self.findIndex((t) => t.key === dictionary.key));
47
70
  await Promise.all(uniqueMergedDictionaries.map(async (dictionary) => {
48
71
  const mergedFilePath = (0, node_path.normalize)((0, node_path.join)(configuration.system.dictionariesDir, `${dictionary.key}.json`));
49
72
  try {
50
73
  const fileContent = await (0, node_fs_promises.readFile)(mergedFilePath, "utf8");
51
74
  const parsedContent = JSON.parse(fileContent);
52
- if (parsedContent.localIds?.length === 1) {
53
- if (parsedContent.localIds[0].endsWith(`::local::${relativeFilePath}`)) {
75
+ const localIds = getMergedLocalIds(parsedContent);
76
+ if (localIds.length === 1) {
77
+ if (isFromChangedFile(localIds[0])) {
54
78
  appLogger(`Removing outdated unmerged dictionary ${(0, _intlayer_config_logger.colorizeKey)(dictionary.key)}`, { isVerbose: true });
55
79
  filesToRemove.push(mergedFilePath);
56
80
  const typesFilePath = (0, node_path.normalize)((0, node_path.join)(configuration.system.typesDir, `${dictionary.key}.ts`));
57
- filesToRemove.push(typesFilePath);
81
+ typeFilesToRemove.push(typesFilePath);
58
82
  const dynamicFilesGlob = (0, node_path.join)(configuration.system.dynamicDictionariesDir, `${dictionary.key}.*`);
59
83
  const dynamicFiles = await (0, fast_glob.default)((0, _intlayer_config_client.normalizePath)(dynamicFilesGlob), { absolute: true });
60
84
  filesToRemove.push(...dynamicFiles);
61
85
  if (!excludeKeys.includes(dictionary.key)) excludeKeys.push(dictionary.key);
62
86
  }
63
87
  } else {
64
- const localIds = parsedContent.localIds?.filter((localeId) => !localeId.endsWith(`::local::${relativeFilePath}`));
65
88
  const newContent = {
66
89
  ...parsedContent,
67
- localIds
90
+ localIds: localIds.filter((localId) => !isFromChangedFile(localId))
68
91
  };
69
92
  await require_writeJsonIfChanged.writeJsonIfChanged(mergedFilePath, newContent);
70
93
  }
@@ -72,26 +95,20 @@ const cleanRemovedContentDeclaration = async (filePath, keysToKeep, configuratio
72
95
  if (error.code === "ENOENT") {
73
96
  if (!excludeKeys.includes(dictionary.key)) excludeKeys.push(dictionary.key);
74
97
  const typesFilePath = (0, node_path.normalize)((0, node_path.join)(configuration.system.typesDir, `${dictionary.key}.ts`));
75
- filesToRemove.push(typesFilePath);
98
+ typeFilesToRemove.push(typesFilePath);
76
99
  }
77
100
  }
78
101
  }));
79
- if (filesToRemove.length > 0 || excludeKeys.length > 0) {
102
+ const hasRebuilt = filesToRemove.length > 0 || typeFilesToRemove.length > 0 || excludeKeys.length > 0;
103
+ if (hasRebuilt) {
80
104
  await require_createDictionaryEntryPoint_createDictionaryEntryPoint.createDictionaryEntryPoint(configuration, { excludeKeys });
81
- if (filesToRemove.length > 0) setTimeout(async () => await Promise.all(filesToRemove.map(async (path) => {
82
- const relativePath = (0, node_path.relative)(baseDir, path);
83
- try {
84
- await (0, node_fs_promises.rm)(path, { force: true });
85
- appLogger(`Deleted artifact: ${(0, _intlayer_config_logger.colorizePath)(relativePath)}`, { isVerbose: true });
86
- } catch {
87
- appLogger(`Error while removing file ${(0, _intlayer_config_logger.colorizePath)(relativePath)}`, { isVerbose: true });
88
- }
89
- })), 3e3);
105
+ await removeArtifacts(typeFilesToRemove, baseDir, appLogger);
106
+ if (filesToRemove.length > 0) setTimeout(() => removeArtifacts(filesToRemove, baseDir, appLogger), ARTIFACT_REMOVAL_DELAY_MS);
90
107
  }
91
108
  return {
92
109
  changedDictionariesLocalIds,
93
110
  excludeKeys,
94
- hasRebuilt: filesToRemove.length > 0 || excludeKeys.length > 0
111
+ hasRebuilt
95
112
  };
96
113
  };
97
114
 
@@ -1 +1 @@
1
- {"version":3,"file":"cleanRemovedContentDeclaration.cjs","names":["getAppLogger","readDictionariesFromDisk","relative","normalize","join","readFile","colorizeKey","writeJsonIfChanged","fg","normalizePath","createDictionaryEntryPoint","rm","colorizePath"],"sources":["../../src/cleanRemovedContentDeclaration.ts"],"sourcesContent":["import { readFile, rm } from 'node:fs/promises';\nimport { join, normalize, relative } from 'node:path';\nimport { normalizePath } from '@intlayer/config/client';\nimport {\n colorizeKey,\n colorizePath,\n getAppLogger,\n} from '@intlayer/config/logger';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport fg from 'fast-glob';\nimport { createDictionaryEntryPoint } from './createDictionaryEntryPoint';\nimport { readDictionariesFromDisk } from './utils/readDictionariesFromDisk';\nimport { writeJsonIfChanged } from './writeJsonIfChanged';\n\nexport const cleanRemovedContentDeclaration = async (\n filePath: string,\n keysToKeep: string[],\n configuration: IntlayerConfig\n): Promise<{\n changedDictionariesLocalIds: string[];\n excludeKeys: string[];\n hasRebuilt: boolean;\n}> => {\n const appLogger = getAppLogger(configuration);\n\n const unmergedDictionaries = readDictionariesFromDisk<\n Record<string, Dictionary[]>\n >(configuration.system.unmergedDictionariesDir);\n\n const baseDir = configuration.system.baseDir;\n\n const relativeFilePath = relative(baseDir, filePath);\n const flatUnmergedDictionaries = Object.values(unmergedDictionaries).flat();\n\n const filteredUnmergedDictionaries = flatUnmergedDictionaries.filter(\n (dictionary) =>\n dictionary.filePath === relativeFilePath &&\n !keysToKeep.includes(dictionary.key)\n );\n\n // Deduplicate dictionaries by key\n const uniqueUnmergedDictionaries = filteredUnmergedDictionaries.filter(\n (dictionary, index, self) =>\n index === self.findIndex((t) => t.key === dictionary.key)\n );\n\n const changedDictionariesLocalIds: string[] = [];\n const filesToRemove: string[] = [];\n const excludeKeys: string[] = [];\n\n // Identify Unmerged Dictionaries to remove or clean\n await Promise.all(\n uniqueUnmergedDictionaries.map(async (dictionary) => {\n const unmergedFilePath = normalize(\n join(\n configuration.system.unmergedDictionariesDir,\n `${dictionary.key}.json`\n )\n );\n\n try {\n const jsonContent = await readFile(unmergedFilePath, 'utf8');\n const parsedContent = JSON.parse(jsonContent);\n\n if (parsedContent.length === 1) {\n if (parsedContent[0].filePath === relativeFilePath) {\n appLogger(\n `Removing outdated dictionary ${colorizeKey(dictionary.key)}`,\n { isVerbose: true }\n );\n filesToRemove.push(unmergedFilePath);\n excludeKeys.push(dictionary.key);\n }\n } else {\n const filteredContent = parsedContent.filter(\n (content: any) => content.filePath !== relativeFilePath\n );\n await writeJsonIfChanged(unmergedFilePath, filteredContent);\n changedDictionariesLocalIds.push(dictionary.localId!);\n }\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n if (!excludeKeys.includes(dictionary.key)) {\n excludeKeys.push(dictionary.key);\n }\n }\n }\n })\n );\n\n const dictionaries = readDictionariesFromDisk<Record<string, Dictionary>>(\n configuration.system.dictionariesDir\n );\n const flatDictionaries = Object.values(dictionaries) as Dictionary[];\n\n const filteredMergedDictionaries = flatDictionaries?.filter(\n (dictionary) =>\n !keysToKeep.includes(dictionary.key) &&\n dictionary.localIds?.length === 1 &&\n (dictionary.localIds[0] as string).endsWith(\n `::local::${relativeFilePath}`\n )\n );\n\n const uniqueMergedDictionaries = filteredMergedDictionaries.filter(\n (dictionary, index, self) =>\n index === self.findIndex((t) => t.key === dictionary.key)\n );\n\n // Identify Merged Dictionaries, Types, and Dynamic Dictionaries to remove\n await Promise.all(\n uniqueMergedDictionaries.map(async (dictionary) => {\n const mergedFilePath = normalize(\n join(configuration.system.dictionariesDir, `${dictionary.key}.json`)\n );\n\n try {\n const fileContent = await readFile(mergedFilePath, 'utf8');\n const parsedContent = JSON.parse(fileContent) as Dictionary;\n\n if (parsedContent.localIds?.length === 1) {\n if (\n parsedContent.localIds[0].endsWith(`::local::${relativeFilePath}`)\n ) {\n appLogger(\n `Removing outdated unmerged dictionary ${colorizeKey(dictionary.key)}`,\n { isVerbose: true }\n );\n\n // Mark JSON for removal\n filesToRemove.push(mergedFilePath);\n\n // Mark TS Types for removal\n const typesFilePath = normalize(\n join(configuration.system.typesDir, `${dictionary.key}.ts`)\n );\n filesToRemove.push(typesFilePath);\n\n // Mark Dynamic Dictionaries for removal\n // We use glob to catch the loader files (.cjs, .mjs) AND the split locale files (.en.json, etc.)\n const dynamicFilesGlob = join(\n configuration.system.dynamicDictionariesDir,\n `${dictionary.key}.*`\n );\n const dynamicFiles = await fg(normalizePath(dynamicFilesGlob), {\n absolute: true,\n });\n filesToRemove.push(...dynamicFiles);\n\n if (!excludeKeys.includes(dictionary.key)) {\n excludeKeys.push(dictionary.key);\n }\n }\n } else {\n const localIds = parsedContent.localIds?.filter(\n (localeId) => !localeId.endsWith(`::local::${relativeFilePath}`)\n ) as string[];\n const newContent = { ...parsedContent, localIds };\n await writeJsonIfChanged(mergedFilePath, newContent);\n }\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n if (!excludeKeys.includes(dictionary.key)) {\n excludeKeys.push(dictionary.key);\n }\n const typesFilePath = normalize(\n join(configuration.system.typesDir, `${dictionary.key}.ts`)\n );\n filesToRemove.push(typesFilePath);\n }\n }\n })\n );\n\n // Execute Cleanup\n if (filesToRemove.length > 0 || excludeKeys.length > 0) {\n // Update entry points (indexes) first so the app doesn't import dead files\n await createDictionaryEntryPoint(configuration, { excludeKeys });\n\n // Remove the files synchronously (awaited) immediately after.\n if (filesToRemove.length > 0) {\n setTimeout(\n async () =>\n await Promise.all(\n filesToRemove.map(async (path) => {\n const relativePath = relative(baseDir, path);\n try {\n await rm(path, { force: true });\n\n appLogger(`Deleted artifact: ${colorizePath(relativePath)}`, {\n isVerbose: true,\n });\n } catch {\n appLogger(\n `Error while removing file ${colorizePath(relativePath)}`,\n {\n isVerbose: true,\n }\n );\n }\n })\n ),\n 3000\n );\n }\n }\n\n return {\n changedDictionariesLocalIds,\n excludeKeys,\n hasRebuilt: filesToRemove.length > 0 || excludeKeys.length > 0,\n };\n};\n"],"mappings":";;;;;;;;;;;;;AAeA,MAAa,iCAAiC,OAC5C,UACA,YACA,kBAKI;CACJ,MAAM,gBAAYA,sCAAa,aAAa;CAE5C,MAAM,uBAAuBC,gEAE3B,cAAc,OAAO,uBAAuB;CAE9C,MAAM,UAAU,cAAc,OAAO;CAErC,MAAM,uBAAmBC,oBAAS,SAAS,QAAQ;CAUnD,MAAM,6BAT2B,OAAO,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IAAI,IAAI,CAC5D;IACA,cAAc,KAAK,aAAa;GAClC;EACF;CACF,CAAC,CACH;CAGA,IAAI,cAAc,SAAS,KAAK,YAAY,SAAS,GAAG;EAEtD,MAAMM,yFAA2B,eAAe,EAAE,YAAY,CAAC;EAG/D,IAAI,cAAc,SAAS,GACzB,WACE,YACE,MAAM,QAAQ,IACZ,cAAc,IAAI,OAAO,SAAS;GAChC,MAAM,mBAAeR,oBAAS,SAAS,IAAI;GAC3C,IAAI;IACF,UAAMS,qBAAG,MAAM,EAAE,OAAO,KAAK,CAAC;IAE9B,UAAU,yBAAqBC,sCAAa,YAAY,KAAK,EAC3D,WAAW,KACb,CAAC;GACH,QAAQ;IACN,UACE,iCAA6BA,sCAAa,YAAY,KACtD,EACE,WAAW,KACb,CACF;GACF;EACF,CAAC,CACH,GACF,GACF;CAEJ;CAEA,OAAO;EACL;EACA;EACA,YAAY,cAAc,SAAS,KAAK,YAAY,SAAS;CAC/D;AACF"}
1
+ {"version":3,"file":"cleanRemovedContentDeclaration.cjs","names":["relative","rm","colorizePath","getAppLogger","readDictionariesFromDisk","normalize","join","readFile","colorizeKey","writeJsonIfChanged","fg","normalizePath","createDictionaryEntryPoint"],"sources":["../../src/cleanRemovedContentDeclaration.ts"],"sourcesContent":["import { readFile, rm } from 'node:fs/promises';\nimport { join, normalize, relative } from 'node:path';\nimport { normalizePath } from '@intlayer/config/client';\nimport {\n colorizeKey,\n colorizePath,\n getAppLogger,\n} from '@intlayer/config/logger';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary, LocalDictionaryId } from '@intlayer/types/dictionary';\nimport fg from 'fast-glob';\nimport { createDictionaryEntryPoint } from './createDictionaryEntryPoint';\nimport { readDictionariesFromDisk } from './utils/readDictionariesFromDisk';\nimport { writeJsonIfChanged } from './writeJsonIfChanged';\n\n/**\n * Grace period before bundler-graph artifacts (JSON, dynamic chunks) are\n * deleted, so a bundler rebuild started from the previous entry point can\n * still resolve them.\n */\nconst ARTIFACT_REMOVAL_DELAY_MS = 3000;\n\n/**\n * Source ids of a merged dictionary. A dictionary built from a single source\n * is written as-is, so it carries `localId` rather than `localIds`.\n */\nconst getMergedLocalIds = (dictionary: Dictionary): LocalDictionaryId[] =>\n dictionary.localIds ?? (dictionary.localId ? [dictionary.localId] : []);\n\nconst removeArtifacts = async (\n paths: string[],\n baseDir: string,\n appLogger: ReturnType<typeof getAppLogger>\n) =>\n await Promise.all(\n paths.map(async (path) => {\n const relativePath = relative(baseDir, path);\n try {\n await rm(path, { force: true });\n\n appLogger(`Deleted artifact: ${colorizePath(relativePath)}`, {\n isVerbose: true,\n });\n } catch {\n appLogger(`Error while removing file ${colorizePath(relativePath)}`, {\n isVerbose: true,\n });\n }\n })\n );\n\nexport const cleanRemovedContentDeclaration = async (\n filePath: string,\n keysToKeep: string[],\n configuration: IntlayerConfig\n): Promise<{\n changedDictionariesLocalIds: string[];\n excludeKeys: string[];\n hasRebuilt: boolean;\n}> => {\n const appLogger = getAppLogger(configuration);\n\n const unmergedDictionaries = readDictionariesFromDisk<\n Record<string, Dictionary[]>\n >(configuration.system.unmergedDictionariesDir);\n\n const baseDir = configuration.system.baseDir;\n\n const relativeFilePath = relative(baseDir, filePath);\n const flatUnmergedDictionaries = Object.values(unmergedDictionaries).flat();\n\n const filteredUnmergedDictionaries = flatUnmergedDictionaries.filter(\n (dictionary) =>\n dictionary.filePath === relativeFilePath &&\n !keysToKeep.includes(dictionary.key)\n );\n\n // Deduplicate dictionaries by key\n const uniqueUnmergedDictionaries = filteredUnmergedDictionaries.filter(\n (dictionary, index, self) =>\n index === self.findIndex((t) => t.key === dictionary.key)\n );\n\n const changedDictionariesLocalIds: string[] = [];\n // Bundler-graph artifacts, deleted after the entry points stop importing them\n const filesToRemove: string[] = [];\n // Type declarations are not in the bundler graph and must be gone before the\n // module augmentation is regenerated, so they are deleted right away\n const typeFilesToRemove: string[] = [];\n const excludeKeys: string[] = [];\n\n // Identify Unmerged Dictionaries to remove or clean\n await Promise.all(\n uniqueUnmergedDictionaries.map(async (dictionary) => {\n const unmergedFilePath = normalize(\n join(\n configuration.system.unmergedDictionariesDir,\n `${dictionary.key}.json`\n )\n );\n\n try {\n const jsonContent = await readFile(unmergedFilePath, 'utf8');\n const parsedContent = JSON.parse(jsonContent);\n\n if (parsedContent.length === 1) {\n if (parsedContent[0].filePath === relativeFilePath) {\n appLogger(\n `Removing outdated dictionary ${colorizeKey(dictionary.key)}`,\n { isVerbose: true }\n );\n filesToRemove.push(unmergedFilePath);\n excludeKeys.push(dictionary.key);\n }\n } else {\n const filteredContent = parsedContent.filter(\n (content: any) => content.filePath !== relativeFilePath\n );\n await writeJsonIfChanged(unmergedFilePath, filteredContent);\n changedDictionariesLocalIds.push(dictionary.localId!);\n }\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n if (!excludeKeys.includes(dictionary.key)) {\n excludeKeys.push(dictionary.key);\n }\n }\n }\n })\n );\n\n const dictionaries = readDictionariesFromDisk<Record<string, Dictionary>>(\n configuration.system.dictionariesDir\n );\n const flatDictionaries = Object.values(dictionaries) as Dictionary[];\n\n const isFromChangedFile = (localId: LocalDictionaryId) =>\n localId.endsWith(`::local::${relativeFilePath}`);\n\n const filteredMergedDictionaries = flatDictionaries?.filter(\n (dictionary) =>\n !keysToKeep.includes(dictionary.key) &&\n getMergedLocalIds(dictionary).some(isFromChangedFile)\n );\n\n const uniqueMergedDictionaries = filteredMergedDictionaries.filter(\n (dictionary, index, self) =>\n index === self.findIndex((t) => t.key === dictionary.key)\n );\n\n // Identify Merged Dictionaries, Types, and Dynamic Dictionaries to remove\n await Promise.all(\n uniqueMergedDictionaries.map(async (dictionary) => {\n const mergedFilePath = normalize(\n join(configuration.system.dictionariesDir, `${dictionary.key}.json`)\n );\n\n try {\n const fileContent = await readFile(mergedFilePath, 'utf8');\n const parsedContent = JSON.parse(fileContent) as Dictionary;\n const localIds = getMergedLocalIds(parsedContent);\n\n if (localIds.length === 1) {\n if (isFromChangedFile(localIds[0]!)) {\n appLogger(\n `Removing outdated unmerged dictionary ${colorizeKey(dictionary.key)}`,\n { isVerbose: true }\n );\n\n // Mark JSON for removal\n filesToRemove.push(mergedFilePath);\n\n // Mark TS Types for removal\n const typesFilePath = normalize(\n join(configuration.system.typesDir, `${dictionary.key}.ts`)\n );\n typeFilesToRemove.push(typesFilePath);\n\n // Mark Dynamic Dictionaries for removal\n // We use glob to catch the loader files (.cjs, .mjs) AND the split locale files (.en.json, etc.)\n const dynamicFilesGlob = join(\n configuration.system.dynamicDictionariesDir,\n `${dictionary.key}.*`\n );\n const dynamicFiles = await fg(normalizePath(dynamicFilesGlob), {\n absolute: true,\n });\n filesToRemove.push(...dynamicFiles);\n\n if (!excludeKeys.includes(dictionary.key)) {\n excludeKeys.push(dictionary.key);\n }\n }\n } else {\n const newContent = {\n ...parsedContent,\n localIds: localIds.filter((localId) => !isFromChangedFile(localId)),\n };\n await writeJsonIfChanged(mergedFilePath, newContent);\n }\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n if (!excludeKeys.includes(dictionary.key)) {\n excludeKeys.push(dictionary.key);\n }\n const typesFilePath = normalize(\n join(configuration.system.typesDir, `${dictionary.key}.ts`)\n );\n typeFilesToRemove.push(typesFilePath);\n }\n }\n })\n );\n\n const hasRebuilt =\n filesToRemove.length > 0 ||\n typeFilesToRemove.length > 0 ||\n excludeKeys.length > 0;\n\n // Execute Cleanup\n if (hasRebuilt) {\n // Update entry points (indexes) first so the app doesn't import dead files\n await createDictionaryEntryPoint(configuration, { excludeKeys });\n\n await removeArtifacts(typeFilesToRemove, baseDir, appLogger);\n\n if (filesToRemove.length > 0) {\n setTimeout(\n () => removeArtifacts(filesToRemove, baseDir, appLogger),\n ARTIFACT_REMOVAL_DELAY_MS\n );\n }\n }\n\n return {\n changedDictionariesLocalIds,\n excludeKeys,\n hasRebuilt,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,MAAM,4BAA4B;;;;;AAMlC,MAAM,qBAAqB,eACzB,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oBAAgBH,yBACpBC,gBAAK,cAAc,OAAO,UAAU,GAAG,WAAW,IAAI,IAAI,CAC5D;KACA,kBAAkB,KAAK,aAAa;KAIpC,MAAM,uBAAmBA,gBACvB,cAAc,OAAO,wBACrB,GAAG,WAAW,IAAI,GACpB;KACA,MAAM,eAAe,UAAMI,uBAAGC,uCAAc,gBAAgB,GAAG,EAC7D,UAAU,KACZ,CAAC;KACD,cAAc,KAAK,GAAG,YAAY;KAElC,IAAI,CAAC,YAAY,SAAS,WAAW,GAAG,GACtC,YAAY,KAAK,WAAW,GAAG;IAEnC;UACK;IACL,MAAM,aAAa;KACjB,GAAG;KACH,UAAU,SAAS,QAAQ,YAAY,CAAC,kBAAkB,OAAO,CAAC;IACpE;IACA,MAAMF,8CAAmB,gBAAgB,UAAU;GACrD;EACF,SAAS,OAAY;GACnB,IAAI,MAAM,SAAS,UAAU;IAC3B,IAAI,CAAC,YAAY,SAAS,WAAW,GAAG,GACtC,YAAY,KAAK,WAAW,GAAG;IAEjC,MAAM,oBAAgBJ,yBACpBC,gBAAK,cAAc,OAAO,UAAU,GAAG,WAAW,IAAI,IAAI,CAC5D;IACA,kBAAkB,KAAK,aAAa;GACtC;EACF;CACF,CAAC,CACH;CAEA,MAAM,aACJ,cAAc,SAAS,KACvB,kBAAkB,SAAS,KAC3B,YAAY,SAAS;CAGvB,IAAI,YAAY;EAEd,MAAMM,yFAA2B,eAAe,EAAE,YAAY,CAAC;EAE/D,MAAM,gBAAgB,mBAAmB,SAAS,SAAS;EAE3D,IAAI,cAAc,SAAS,GACzB,iBACQ,gBAAgB,eAAe,SAAS,SAAS,GACvD,yBACF;CAEJ;CAEA,OAAO;EACL;EACA;EACA;CACF;AACF"}
package/dist/cjs/cli.cjs CHANGED
@@ -1,6 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_listProjects = require('./listProjects.cjs');
3
- const require_installLSP = require('./installLSP.cjs');
4
2
  const require_listDictionariesPath = require('./listDictionariesPath.cjs');
5
3
  const require_prepareIntlayer = require('./prepareIntlayer.cjs');
6
4
  const require_writeContentDeclaration_detectExportedComponentName = require('./writeContentDeclaration/detectExportedComponentName.cjs');
@@ -9,6 +7,8 @@ const require_detectFormatCommand = require('./detectFormatCommand.cjs');
9
7
  const require_getContentDeclarationFileTemplate_getContentDeclarationFileTemplate = require('./getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs');
10
8
  const require_writeContentDeclaration_writeJSFile = require('./writeContentDeclaration/writeJSFile.cjs');
11
9
  const require_writeContentDeclaration_writeContentDeclaration = require('./writeContentDeclaration/writeContentDeclaration.cjs');
10
+ const require_installLSP = require('./installLSP.cjs');
11
+ const require_listProjects = require('./listProjects.cjs');
12
12
  const require_init_cms = require('./init/cms.cjs');
13
13
  const require_init_utils_packageManager = require('./init/utils/packageManager.cjs');
14
14
  const require_init_utils_nextCompilerBabel = require('./init/utils/nextCompilerBabel.cjs');
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_fs_promises = require("node:fs/promises");
4
5
  let node_path = require("node:path");
6
+ let _intlayer_config_utils = require("@intlayer/config/utils");
5
7
  let fast_glob = require("fast-glob");
6
8
  fast_glob = require_runtime.__toESM(fast_glob);
7
- let node_fs = require("node:fs");
8
- let _intlayer_config_utils = require("@intlayer/config/utils");
9
9
 
10
10
  //#region src/createDictionaryEntryPoint/getBuiltDictionariesPath.ts
11
11
  /**
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_fs_promises = require("node:fs/promises");
4
5
  let node_path = require("node:path");
6
+ let _intlayer_config_utils = require("@intlayer/config/utils");
5
7
  let fast_glob = require("fast-glob");
6
8
  fast_glob = require_runtime.__toESM(fast_glob);
7
- let node_fs = require("node:fs");
8
- let _intlayer_config_utils = require("@intlayer/config/utils");
9
9
 
10
10
  //#region src/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.ts
11
11
  /**
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_fs_promises = require("node:fs/promises");
4
5
  let node_path = require("node:path");
6
+ let _intlayer_config_utils = require("@intlayer/config/utils");
5
7
  let fast_glob = require("fast-glob");
6
8
  fast_glob = require_runtime.__toESM(fast_glob);
7
- let node_fs = require("node:fs");
8
- let _intlayer_config_utils = require("@intlayer/config/utils");
9
9
 
10
10
  //#region src/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.ts
11
11
  /**
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_fs_promises = require("node:fs/promises");
4
5
  let node_path = require("node:path");
6
+ let _intlayer_config_utils = require("@intlayer/config/utils");
5
7
  let fast_glob = require("fast-glob");
6
8
  fast_glob = require_runtime.__toESM(fast_glob);
7
- let node_fs = require("node:fs");
8
- let _intlayer_config_utils = require("@intlayer/config/utils");
9
9
 
10
10
  //#region src/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.ts
11
11
  /**
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_fs = require("node:fs");
3
4
  let node_fs_promises = require("node:fs/promises");
4
5
  let node_path = require("node:path");
6
+ let _intlayer_config_utils = require("@intlayer/config/utils");
5
7
  let fast_glob = require("fast-glob");
6
8
  fast_glob = require_runtime.__toESM(fast_glob);
7
- let node_fs = require("node:fs");
8
- let _intlayer_config_utils = require("@intlayer/config/utils");
9
9
 
10
10
  //#region src/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.ts
11
11
  /**
@@ -4,10 +4,10 @@ const require_writeFileIfChanged = require('../writeFileIfChanged.cjs');
4
4
  const require_utils_getPathHash = require('../utils/getPathHash.cjs');
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  let node_path = require("node:path");
7
- let fast_glob = require("fast-glob");
8
- fast_glob = require_runtime.__toESM(fast_glob);
9
7
  let _intlayer_config_utils = require("@intlayer/config/utils");
10
8
  let _intlayer_core_localization = require("@intlayer/core/localization");
9
+ let fast_glob = require("fast-glob");
10
+ fast_glob = require_runtime.__toESM(fast_glob);
11
11
 
12
12
  //#region src/createType/createModuleAugmentation.ts
13
13
  const getTypeName = (key) => `${(0, _intlayer_config_utils.kebabCaseToCamelCase)(key)}Content`;
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_docReview_planActions = require('./planActions.cjs');
3
- const require_docReview_normalizeBlock = require('./normalizeBlock.cjs');
4
- const require_docReview_fingerprintBlock = require('./fingerprintBlock.cjs');
5
- const require_docReview_computeSimilarity = require('./computeSimilarity.cjs');
6
2
  const require_docReview_mapChangedLinesToBlocks = require('./mapChangedLinesToBlocks.cjs');
3
+ const require_docReview_computeSimilarity = require('./computeSimilarity.cjs');
7
4
  const require_docReview_alignBlocks = require('./alignBlocks.cjs');
5
+ const require_docReview_fingerprintBlock = require('./fingerprintBlock.cjs');
6
+ const require_docReview_normalizeBlock = require('./normalizeBlock.cjs');
8
7
  const require_docReview_rebuildDocument = require('./rebuildDocument.cjs');
9
8
  const require_docReview_segmentDocument = require('./segmentDocument.cjs');
10
9
  const require_docReview_pipeline = require('./pipeline.cjs');
10
+ const require_docReview_planActions = require('./planActions.cjs');
11
11
  const require_docReview_reviewReport = require('./reviewReport.cjs');
12
12
 
13
13
  exports.alignBaseAndTargetBlocks = require_docReview_alignBlocks.alignBaseAndTargetBlocks;
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_docReview_normalizeBlock = require('./normalizeBlock.cjs');
3
- const require_docReview_fingerprintBlock = require('./fingerprintBlock.cjs');
4
2
  const require_docReview_mapChangedLinesToBlocks = require('./mapChangedLinesToBlocks.cjs');
5
3
  const require_docReview_alignBlocks = require('./alignBlocks.cjs');
4
+ const require_docReview_fingerprintBlock = require('./fingerprintBlock.cjs');
5
+ const require_docReview_normalizeBlock = require('./normalizeBlock.cjs');
6
6
  const require_docReview_rebuildDocument = require('./rebuildDocument.cjs');
7
7
  const require_docReview_segmentDocument = require('./segmentDocument.cjs');
8
8
 
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  const require_docReview_pipeline = require('./pipeline.cjs');
4
- let _intlayer_config_logger = require("@intlayer/config/logger");
5
4
  let _intlayer_config_colors = require("@intlayer/config/colors");
6
5
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
6
+ let _intlayer_config_logger = require("@intlayer/config/logger");
7
7
 
8
8
  //#region src/docReview/reviewReport.ts
9
9
  /**
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_utils_formatter = require('./utils/formatter.cjs');
4
- let _intlayer_config_logger = require("@intlayer/config/logger");
5
4
  let _intlayer_config_colors = require("@intlayer/config/colors");
6
5
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
6
+ let _intlayer_config_logger = require("@intlayer/config/logger");
7
7
  let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
8
8
 
9
9
  //#region src/filterInvalidDictionaries.ts
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
3
2
  const require_utils_formatter = require('./utils/formatter.cjs');
4
3
  const require_buildIntlayerDictionary_buildIntlayerDictionary = require('./buildIntlayerDictionary/buildIntlayerDictionary.cjs');
4
+ const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
5
5
  const require_createType_createModuleAugmentation = require('./createType/createModuleAugmentation.cjs');
6
6
  const require_createType_createType = require('./createType/createType.cjs');
7
7
  const require_loadDictionaries_loadLocalDictionaries = require('./loadDictionaries/loadLocalDictionaries.cjs');
@@ -1,16 +1,16 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_createDictionaryEntryPoint_getBuiltDictionariesPath = require('./createDictionaryEntryPoint/getBuiltDictionariesPath.cjs');
3
- const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
4
- const require_cleanRemovedContentDeclaration = require('./cleanRemovedContentDeclaration.cjs');
5
2
  const require_utils_formatter = require('./utils/formatter.cjs');
6
3
  const require_buildIntlayerDictionary_buildIntlayerDictionary = require('./buildIntlayerDictionary/buildIntlayerDictionary.cjs');
4
+ const require_createDictionaryEntryPoint_getBuiltDictionariesPath = require('./createDictionaryEntryPoint/getBuiltDictionariesPath.cjs');
5
+ const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
7
6
  const require_createType_createModuleAugmentation = require('./createType/createModuleAugmentation.cjs');
8
7
  const require_createType_createType = require('./createType/createType.cjs');
9
8
  const require_loadDictionaries_loadLocalDictionaries = require('./loadDictionaries/loadLocalDictionaries.cjs');
9
+ const require_cleanRemovedContentDeclaration = require('./cleanRemovedContentDeclaration.cjs');
10
+ let node_fs = require("node:fs");
10
11
  let node_fs_promises = require("node:fs/promises");
11
12
  let node_path = require("node:path");
12
13
  let _intlayer_config_logger = require("@intlayer/config/logger");
13
- let node_fs = require("node:fs");
14
14
 
15
15
  //#region src/handleContentDeclarationFileChange.ts
16
16
  const handleContentDeclarationFileChange = async (filePath, config) => {
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_cleanRemovedContentDeclaration = require('./cleanRemovedContentDeclaration.cjs');
3
2
  const require_utils_formatter = require('./utils/formatter.cjs');
4
3
  const require_loadDictionaries_loadLocalDictionaries = require('./loadDictionaries/loadLocalDictionaries.cjs');
4
+ const require_cleanRemovedContentDeclaration = require('./cleanRemovedContentDeclaration.cjs');
5
5
  const require_handleContentDeclarationFileChange = require('./handleContentDeclarationFileChange.cjs');
6
6
  let _intlayer_config_logger = require("@intlayer/config/logger");
7
7
 
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_cleanRemovedContentDeclaration = require('./cleanRemovedContentDeclaration.cjs');
3
2
  const require_utils_formatter = require('./utils/formatter.cjs');
4
3
  const require_buildIntlayerDictionary_buildIntlayerDictionary = require('./buildIntlayerDictionary/buildIntlayerDictionary.cjs');
5
4
  const require_createType_createModuleAugmentation = require('./createType/createModuleAugmentation.cjs');
6
5
  const require_createType_createType = require('./createType/createType.cjs');
7
6
  const require_loadDictionaries_loadLocalDictionaries = require('./loadDictionaries/loadLocalDictionaries.cjs');
7
+ const require_cleanRemovedContentDeclaration = require('./cleanRemovedContentDeclaration.cjs');
8
8
  const require_listDictionariesPath = require('./listDictionariesPath.cjs');
9
9
  let node_path = require("node:path");
10
10
  let _intlayer_config_logger = require("@intlayer/config/logger");
@@ -2,11 +2,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
3
  const require_init_utils_configManipulation = require('./utils/configManipulation.cjs');
4
4
  const require_init_utils_fileSystem = require('./utils/fileSystem.cjs');
5
+ let _intlayer_config_colors = require("@intlayer/config/colors");
6
+ _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
5
7
  let _intlayer_config_logger = require("@intlayer/config/logger");
6
8
  let fast_glob = require("fast-glob");
7
9
  fast_glob = require_runtime.__toESM(fast_glob);
8
- let _intlayer_config_colors = require("@intlayer/config/colors");
9
- _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
10
10
 
11
11
  //#region src/init/cms.ts
12
12
  /**
@@ -7,9 +7,9 @@ const require_init_frameworkSetup_nextAppRouter_restructure = require('./restruc
7
7
  const require_init_frameworkSetup_nextAppRouter_templates = require('./templates.cjs');
8
8
  const require_init_frameworkSetup_nextAppRouter_transforms = require('./transforms.cjs');
9
9
  let node_path = require("node:path");
10
- let _intlayer_config_logger = require("@intlayer/config/logger");
11
10
  let _intlayer_config_colors = require("@intlayer/config/colors");
12
11
  _intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
12
+ let _intlayer_config_logger = require("@intlayer/config/logger");
13
13
 
14
14
  //#region src/init/frameworkSetup/nextAppRouter/index.ts
15
15
  /**