@intlayer/dictionaries-entry 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 (56) hide show
  1. package/README.md +9 -9
  2. package/dist/cjs/dynamic.browser.cjs +7 -0
  3. package/dist/cjs/dynamic.browser.cjs.map +1 -0
  4. package/dist/cjs/dynamic.cjs +29 -0
  5. package/dist/cjs/dynamic.cjs.map +1 -0
  6. package/dist/cjs/fetch.browser.cjs +7 -0
  7. package/dist/cjs/fetch.browser.cjs.map +1 -0
  8. package/dist/cjs/fetch.cjs +32 -0
  9. package/dist/cjs/fetch.cjs.map +1 -0
  10. package/dist/cjs/index.cjs +6 -3
  11. package/dist/cjs/index.cjs.map +1 -1
  12. package/dist/cjs/remote.browser.cjs +7 -0
  13. package/dist/cjs/remote.browser.cjs.map +1 -0
  14. package/dist/cjs/remote.cjs +31 -0
  15. package/dist/cjs/remote.cjs.map +1 -0
  16. package/dist/cjs/unmerged.browser.cjs +7 -0
  17. package/dist/cjs/unmerged.browser.cjs.map +1 -0
  18. package/dist/cjs/unmerged.cjs +35 -0
  19. package/dist/cjs/unmerged.cjs.map +1 -0
  20. package/dist/esm/dynamic.browser.mjs +6 -0
  21. package/dist/esm/dynamic.browser.mjs.map +1 -0
  22. package/dist/esm/dynamic.mjs +28 -0
  23. package/dist/esm/dynamic.mjs.map +1 -0
  24. package/dist/esm/fetch.browser.mjs +6 -0
  25. package/dist/esm/fetch.browser.mjs.map +1 -0
  26. package/dist/esm/fetch.mjs +31 -0
  27. package/dist/esm/fetch.mjs.map +1 -0
  28. package/dist/esm/index.mjs +6 -3
  29. package/dist/esm/index.mjs.map +1 -1
  30. package/dist/esm/remote.browser.mjs +6 -0
  31. package/dist/esm/remote.browser.mjs.map +1 -0
  32. package/dist/esm/remote.mjs +30 -0
  33. package/dist/esm/remote.mjs.map +1 -0
  34. package/dist/esm/unmerged.browser.mjs +6 -0
  35. package/dist/esm/unmerged.browser.mjs.map +1 -0
  36. package/dist/esm/unmerged.mjs +34 -0
  37. package/dist/esm/unmerged.mjs.map +1 -0
  38. package/dist/types/dynamic.browser.d.ts +4 -0
  39. package/dist/types/dynamic.browser.d.ts.map +1 -0
  40. package/dist/types/dynamic.d.ts +9 -0
  41. package/dist/types/dynamic.d.ts.map +1 -0
  42. package/dist/types/fetch.browser.d.ts +4 -0
  43. package/dist/types/fetch.browser.d.ts.map +1 -0
  44. package/dist/types/fetch.d.ts +9 -0
  45. package/dist/types/fetch.d.ts.map +1 -0
  46. package/dist/types/index.d.ts +1 -1
  47. package/dist/types/index.d.ts.map +1 -1
  48. package/dist/types/remote.browser.d.ts +4 -0
  49. package/dist/types/remote.browser.d.ts.map +1 -0
  50. package/dist/types/remote.d.ts +9 -0
  51. package/dist/types/remote.d.ts.map +1 -0
  52. package/dist/types/unmerged.browser.d.ts +4 -0
  53. package/dist/types/unmerged.browser.d.ts.map +1 -0
  54. package/dist/types/unmerged.d.ts +9 -0
  55. package/dist/types/unmerged.d.ts.map +1 -0
  56. package/package.json +47 -12
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)
@@ -0,0 +1,7 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ //#region src/dynamic.browser.ts
3
+ const getDynamicDictionaries = () => ({});
4
+
5
+ //#endregion
6
+ exports.getDynamicDictionaries = getDynamicDictionaries;
7
+ //# sourceMappingURL=dynamic.browser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic.browser.cjs","names":[],"sources":["../../src/dynamic.browser.ts"],"sourcesContent":["export const getDynamicDictionaries = () => ({});\n"],"mappings":";;AAAA,MAAa,gCAAgC,CAAC"}
@@ -0,0 +1,29 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let node_fs = require("node:fs");
3
+ let node_path = require("node:path");
4
+ let _intlayer_config_built = require("@intlayer/config/built");
5
+ let _intlayer_config_utils = require("@intlayer/config/utils");
6
+
7
+ //#region src/dynamic.ts
8
+ /**
9
+ * Returns the dynamic dictionaries generated by Intlayer (per-locale lazy
10
+ * loaders).
11
+ *
12
+ * `@intlayer/dictionaries-entry/dynamic` is meant to be aliased by the bundler
13
+ * configuration to the generated `.intlayer/main/dynamic_dictionaries` entry.
14
+ * Outside a bundler (Node) this stub reads the entry itself.
15
+ */
16
+ const getDynamicDictionaries = (configuration = {
17
+ system: _intlayer_config_built.system,
18
+ build: _intlayer_config_built.build
19
+ }) => {
20
+ const { system: system$1, build: build$1 } = configuration;
21
+ const dictionariesPath = (0, node_path.join)(system$1.mainDir, `dynamic_dictionaries.cjs`);
22
+ let dictionaries = {};
23
+ if ((0, node_fs.existsSync)(dictionariesPath)) dictionaries = (build$1.require ?? _intlayer_config_utils.configESMxCJSRequire)(dictionariesPath);
24
+ return dictionaries;
25
+ };
26
+
27
+ //#endregion
28
+ exports.getDynamicDictionaries = getDynamicDictionaries;
29
+ //# sourceMappingURL=dynamic.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic.cjs","names":["join","system","existsSync","build","configESMxCJSRequire"],"sources":["../../src/dynamic.ts"],"sourcesContent":["/**\n * Returns the dynamic dictionaries generated by Intlayer (per-locale lazy\n * loaders).\n *\n * `@intlayer/dictionaries-entry/dynamic` is meant to be aliased by the bundler\n * configuration to the generated `.intlayer/main/dynamic_dictionaries` entry.\n * Outside a bundler (Node) this stub reads the entry itself.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { build, system } from '@intlayer/config/built';\nimport { configESMxCJSRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type {\n DictionaryKeys,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nexport type DynamicDictionaries = Record<\n DictionaryKeys,\n StrictModeLocaleMap<() => Promise<Dictionary>>\n>;\n\ntype GetDynamicDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system' | 'build'>\n) => DynamicDictionaries;\n\nexport const getDynamicDictionaries: GetDynamicDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `dynamic_dictionaries.cjs`);\n let dictionaries: DynamicDictionaries = {};\n\n if (existsSync(dictionariesPath)) {\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return dictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,MAAa,0BACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,uBAAmBA,gBAAKC,SAAO,SAAS,0BAA0B;CACxE,IAAI,eAAoC,CAAC;CAEzC,QAAIC,oBAAW,gBAAgB,GAC7B,gBAAgBC,QAAM,WAAWC,4CAAoB,CAAE,gBAAgB;CAGzE,OAAO;AACT"}
@@ -0,0 +1,7 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ //#region src/fetch.browser.ts
3
+ const getFetchDictionaries = () => ({});
4
+
5
+ //#endregion
6
+ exports.getFetchDictionaries = getFetchDictionaries;
7
+ //# sourceMappingURL=fetch.browser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.browser.cjs","names":[],"sources":["../../src/fetch.browser.ts"],"sourcesContent":["export const getFetchDictionaries = () => ({});\n"],"mappings":";;AAAA,MAAa,8BAA8B,CAAC"}
@@ -0,0 +1,32 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let node_fs = require("node:fs");
3
+ let node_path = require("node:path");
4
+ let _intlayer_config_built = require("@intlayer/config/built");
5
+
6
+ //#region src/fetch.ts
7
+ /**
8
+ * Returns the fetch dictionaries generated by Intlayer (per-locale JSON files
9
+ * fetched at runtime).
10
+ *
11
+ * `@intlayer/dictionaries-entry/fetch` is meant to be aliased by the bundler
12
+ * configuration to the generated `.intlayer/main/fetch_dictionaries` entry.
13
+ * Outside a bundler (Node) this stub reads the JSON files itself.
14
+ */
15
+ const getFetchDictionaries = (configuration = { system: _intlayer_config_built.system }) => {
16
+ const { system: system$1 } = configuration;
17
+ const { fetchDictionariesDir } = system$1;
18
+ const dictionaries = {};
19
+ if ((0, node_fs.existsSync)(fetchDictionariesDir)) {
20
+ const files = (0, node_fs.readdirSync)(fetchDictionariesDir).filter((file) => file.endsWith(".json"));
21
+ for (const file of files) {
22
+ const key = (0, node_path.basename)(file, (0, node_path.extname)(file));
23
+ const content = (0, node_fs.readFileSync)((0, node_path.join)(fetchDictionariesDir, file), "utf-8");
24
+ dictionaries[key] = JSON.parse(content);
25
+ }
26
+ }
27
+ return dictionaries;
28
+ };
29
+
30
+ //#endregion
31
+ exports.getFetchDictionaries = getFetchDictionaries;
32
+ //# sourceMappingURL=fetch.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.cjs","names":["system","existsSync","readdirSync","basename","extname","readFileSync","join"],"sources":["../../src/fetch.ts"],"sourcesContent":["/**\n * Returns the fetch dictionaries generated by Intlayer (per-locale JSON files\n * fetched at runtime).\n *\n * `@intlayer/dictionaries-entry/fetch` is meant to be aliased by the bundler\n * configuration to the generated `.intlayer/main/fetch_dictionaries` entry.\n * Outside a bundler (Node) this stub reads the JSON files itself.\n */\n\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { basename, extname, join } from 'node:path';\nimport { system } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type {\n DictionaryKeys,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nexport type FetchDictionaries = Record<\n DictionaryKeys,\n StrictModeLocaleMap<Dictionary>\n>;\n\ntype GetFetchDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system'>\n) => FetchDictionaries;\n\nexport const getFetchDictionaries: GetFetchDictionaries = (\n configuration: Pick<IntlayerConfig, 'system'> = { system }\n) => {\n const { system } = configuration;\n const { fetchDictionariesDir } = system;\n\n const dictionaries: Record<string, StrictModeLocaleMap<Dictionary>> = {};\n\n if (existsSync(fetchDictionariesDir)) {\n // Read JSON files directly to avoid require.cache memory leak\n const files = readdirSync(fetchDictionariesDir).filter((file) =>\n file.endsWith('.json')\n );\n\n for (const file of files) {\n const key = basename(file, extname(file));\n const content = readFileSync(join(fetchDictionariesDir, file), 'utf-8');\n dictionaries[key] = JSON.parse(content);\n }\n }\n\n return dictionaries as FetchDictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;;AA4BA,MAAa,wBACX,gBAAgD,EAAE,sCAAO,MACtD;CACH,MAAM,EAAE,qBAAW;CACnB,MAAM,EAAE,yBAAyBA;CAEjC,MAAM,eAAgE,CAAC;CAEvE,QAAIC,oBAAW,oBAAoB,GAAG;EAEpC,MAAM,YAAQC,qBAAY,oBAAoB,CAAC,CAAC,QAAQ,SACtD,KAAK,SAAS,OAAO,CACvB;EAEA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,UAAMC,oBAAS,UAAMC,mBAAQ,IAAI,CAAC;GACxC,MAAM,cAAUC,0BAAaC,gBAAK,sBAAsB,IAAI,GAAG,OAAO;GACtE,aAAa,OAAO,KAAK,MAAM,OAAO;EACxC;CACF;CAEA,OAAO;AACT"}
@@ -6,9 +6,12 @@ let _intlayer_config_utils = require("@intlayer/config/utils");
6
6
 
7
7
  //#region src/index.ts
8
8
  /**
9
- * @intlayer/dictionaries-entry is a package that only returns the dictionary entry file.
10
- * Using an external package allow to alias it in the bundle configuration (such as webpack).
11
- * The alias allow hot reload the app (such as nextjs) on any dictionary change.
9
+ * Returns the merged dictionaries generated by Intlayer.
10
+ *
11
+ * `@intlayer/dictionaries-entry` is meant to be aliased by the
12
+ * bundler configuration (webpack, Vite, Turbopack, esbuild, Metro, …) to the
13
+ * generated `.intlayer/main/dictionaries` entry, so the app hot reloads on any
14
+ * dictionary change. Outside a bundler (Node) this stub reads the entry itself.
12
15
  */
13
16
  const getDictionaries = (configuration = {
14
17
  system: _intlayer_config_built.system,
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["join","system","existsSync","build","configESMxCJSRequire"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/dictionaries-entry is a package that only returns the dictionary entry file.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n * The alias allow hot reload the app (such as nextjs) on any dictionary change.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { build, system } from '@intlayer/config/built';\nimport { configESMxCJSRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { DictionaryRegistry } from '@intlayer/types/module_augmentation';\n\ntype GetDictionaries = (configuration?: IntlayerConfig) => DictionaryRegistry;\n\nexport const getDictionaries: GetDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `dictionaries.cjs`);\n\n let dictionaries = {};\n if (existsSync(dictionariesPath)) {\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return (dictionaries ?? {}) as DictionaryRegistry;\n};\n"],"mappings":";;;;;;;;;;;;AAeA,MAAa,mBACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,uBAAmBA,gBAAKC,SAAO,SAAS,kBAAkB;CAEhE,IAAI,eAAe,CAAC;CACpB,QAAIC,oBAAW,gBAAgB,GAC7B,gBAAgBC,QAAM,WAAWC,4CAAoB,CAAE,gBAAgB;CAGzE,OAAQ,gBAAgB,CAAC;AAC3B"}
1
+ {"version":3,"file":"index.cjs","names":["join","system","existsSync","build","configESMxCJSRequire"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * Returns the merged dictionaries generated by Intlayer.\n *\n * `@intlayer/dictionaries-entry` is meant to be aliased by the\n * bundler configuration (webpack, Vite, Turbopack, esbuild, Metro, …) to the\n * generated `.intlayer/main/dictionaries` entry, so the app hot reloads on any\n * dictionary change. Outside a bundler (Node) this stub reads the entry itself.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { build, system } from '@intlayer/config/built';\nimport { configESMxCJSRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { DictionaryRegistry } from '@intlayer/types/module_augmentation';\n\ntype GetDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system' | 'build'>\n) => DictionaryRegistry;\n\nexport const getDictionaries: GetDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `dictionaries.cjs`);\n\n let dictionaries = {};\n if (existsSync(dictionariesPath)) {\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return (dictionaries ?? {}) as DictionaryRegistry;\n};\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAa,mBACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,uBAAmBA,gBAAKC,SAAO,SAAS,kBAAkB;CAEhE,IAAI,eAAe,CAAC;CACpB,QAAIC,oBAAW,gBAAgB,GAC7B,gBAAgBC,QAAM,WAAWC,4CAAoB,CAAE,gBAAgB;CAGzE,OAAQ,gBAAgB,CAAC;AAC3B"}
@@ -0,0 +1,7 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ //#region src/remote.browser.ts
3
+ const getRemoteDictionaries = () => ({});
4
+
5
+ //#endregion
6
+ exports.getRemoteDictionaries = getRemoteDictionaries;
7
+ //# sourceMappingURL=remote.browser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.browser.cjs","names":[],"sources":["../../src/remote.browser.ts"],"sourcesContent":["export const getRemoteDictionaries = () => ({});\n"],"mappings":";;AAAA,MAAa,+BAA+B,CAAC"}
@@ -0,0 +1,31 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let node_fs = require("node:fs");
3
+ let node_path = require("node:path");
4
+ let _intlayer_config_built = require("@intlayer/config/built");
5
+ let _intlayer_config_utils = require("@intlayer/config/utils");
6
+
7
+ //#region src/remote.ts
8
+ /**
9
+ * Returns the remote dictionaries pulled from the Intlayer CMS.
10
+ *
11
+ * `@intlayer/dictionaries-entry/remote` is meant to be aliased by the bundler
12
+ * configuration to the generated `.intlayer/main/remote_dictionaries` entry.
13
+ * Outside a bundler (Node) this stub reads the entry itself.
14
+ */
15
+ const getRemoteDictionaries = (configuration = {
16
+ system: _intlayer_config_built.system,
17
+ build: _intlayer_config_built.build
18
+ }) => {
19
+ const { system: system$1, build: build$1 } = configuration;
20
+ const dictionariesPath = (0, node_path.join)(system$1.mainDir, `remote_dictionaries.cjs`);
21
+ let dictionaries = {};
22
+ if ((0, node_fs.existsSync)(dictionariesPath)) {
23
+ (0, _intlayer_config_utils.clearModuleCache)(dictionariesPath);
24
+ dictionaries = (build$1.require ?? _intlayer_config_utils.configESMxCJSRequire)(dictionariesPath);
25
+ }
26
+ return dictionaries;
27
+ };
28
+
29
+ //#endregion
30
+ exports.getRemoteDictionaries = getRemoteDictionaries;
31
+ //# sourceMappingURL=remote.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.cjs","names":["join","system","existsSync","build","configESMxCJSRequire"],"sources":["../../src/remote.ts"],"sourcesContent":["/**\n * Returns the remote dictionaries pulled from the Intlayer CMS.\n *\n * `@intlayer/dictionaries-entry/remote` is meant to be aliased by the bundler\n * configuration to the generated `.intlayer/main/remote_dictionaries` entry.\n * Outside a bundler (Node) this stub reads the entry itself.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport { build, system } from '@intlayer/config/built';\nimport { clearModuleCache, configESMxCJSRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { DictionaryKey } from '@intlayer/types/dictionary';\n\nexport type RemoteDictionaries = Record<DictionaryKey, DictionaryAPI[]>;\n\ntype GetRemoteDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system' | 'build'>\n) => RemoteDictionaries;\n\nexport const getRemoteDictionaries: GetRemoteDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `remote_dictionaries.cjs`);\n let dictionaries: RemoteDictionaries = {};\n\n if (existsSync(dictionariesPath)) {\n // Clear cache for remote_dictionaries.cjs and all its dependencies (JSON files)\n clearModuleCache(dictionariesPath);\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return dictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAa,yBACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,uBAAmBA,gBAAKC,SAAO,SAAS,yBAAyB;CACvE,IAAI,eAAmC,CAAC;CAExC,QAAIC,oBAAW,gBAAgB,GAAG;EAEhC,6CAAiB,gBAAgB;EACjC,gBAAgBC,QAAM,WAAWC,4CAAoB,CAAE,gBAAgB;CACzE;CAEA,OAAO;AACT"}
@@ -0,0 +1,7 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ //#region src/unmerged.browser.ts
3
+ const getUnmergedDictionaries = () => ({});
4
+
5
+ //#endregion
6
+ exports.getUnmergedDictionaries = getUnmergedDictionaries;
7
+ //# sourceMappingURL=unmerged.browser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unmerged.browser.cjs","names":[],"sources":["../../src/unmerged.browser.ts"],"sourcesContent":["export const getUnmergedDictionaries = () => ({});\n"],"mappings":";;AAAA,MAAa,iCAAiC,CAAC"}
@@ -0,0 +1,35 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ let node_fs = require("node:fs");
3
+ let node_path = require("node:path");
4
+ let _intlayer_config_built = require("@intlayer/config/built");
5
+
6
+ //#region src/unmerged.ts
7
+ /**
8
+ * Returns the unmerged dictionaries generated by Intlayer (one array of
9
+ * declarations per key, before merging).
10
+ *
11
+ * `@intlayer/dictionaries-entry/unmerged` is meant to be aliased by the bundler
12
+ * configuration to the generated `.intlayer/main/unmerged_dictionaries` entry.
13
+ * Outside a bundler (Node) this stub reads the JSON files itself.
14
+ */
15
+ const getUnmergedDictionaries = (configuration = {
16
+ system: _intlayer_config_built.system,
17
+ build: _intlayer_config_built.build
18
+ }) => {
19
+ const { system: system$1 } = configuration;
20
+ const { unmergedDictionariesDir } = system$1;
21
+ const dictionaries = {};
22
+ if ((0, node_fs.existsSync)(unmergedDictionariesDir)) {
23
+ const files = (0, node_fs.readdirSync)(unmergedDictionariesDir).filter((file) => file.endsWith(".json"));
24
+ for (const file of files) {
25
+ const key = (0, node_path.basename)(file, (0, node_path.extname)(file));
26
+ const content = (0, node_fs.readFileSync)((0, node_path.join)(unmergedDictionariesDir, file), "utf-8");
27
+ dictionaries[key] = JSON.parse(content);
28
+ }
29
+ }
30
+ return dictionaries;
31
+ };
32
+
33
+ //#endregion
34
+ exports.getUnmergedDictionaries = getUnmergedDictionaries;
35
+ //# sourceMappingURL=unmerged.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unmerged.cjs","names":["system","existsSync","readdirSync","basename","extname","readFileSync","join"],"sources":["../../src/unmerged.ts"],"sourcesContent":["/**\n * Returns the unmerged dictionaries generated by Intlayer (one array of\n * declarations per key, before merging).\n *\n * `@intlayer/dictionaries-entry/unmerged` is meant to be aliased by the bundler\n * configuration to the generated `.intlayer/main/unmerged_dictionaries` entry.\n * Outside a bundler (Node) this stub reads the JSON files itself.\n */\n\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { basename, extname, join } from 'node:path';\nimport { build, system } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type { DictionaryKeys } from '@intlayer/types/module_augmentation';\n\nexport type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;\n\ntype GetUnmergedDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system' | 'build'>\n) => UnmergedDictionaries;\n\nexport const getUnmergedDictionaries: GetUnmergedDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system } = configuration;\n const { unmergedDictionariesDir } = system;\n\n const dictionaries: Record<string, Dictionary[]> = {};\n\n if (existsSync(unmergedDictionariesDir)) {\n // Read JSON files directly to avoid require.cache memory leak\n const files = readdirSync(unmergedDictionariesDir).filter((file) =>\n file.endsWith('.json')\n );\n\n for (const file of files) {\n const key = basename(file, extname(file));\n const content = readFileSync(\n join(unmergedDictionariesDir, file),\n 'utf-8'\n );\n dictionaries[key] = JSON.parse(content);\n }\n }\n\n return dictionaries as UnmergedDictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAa,2BACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,qBAAW;CACnB,MAAM,EAAE,4BAA4BA;CAEpC,MAAM,eAA6C,CAAC;CAEpD,QAAIC,oBAAW,uBAAuB,GAAG;EAEvC,MAAM,YAAQC,qBAAY,uBAAuB,CAAC,CAAC,QAAQ,SACzD,KAAK,SAAS,OAAO,CACvB;EAEA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,UAAMC,oBAAS,UAAMC,mBAAQ,IAAI,CAAC;GACxC,MAAM,cAAUC,0BACdC,gBAAK,yBAAyB,IAAI,GAClC,OACF;GACA,aAAa,OAAO,KAAK,MAAM,OAAO;EACxC;CACF;CAEA,OAAO;AACT"}
@@ -0,0 +1,6 @@
1
+ //#region src/dynamic.browser.ts
2
+ const getDynamicDictionaries = () => ({});
3
+
4
+ //#endregion
5
+ export { getDynamicDictionaries };
6
+ //# sourceMappingURL=dynamic.browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic.browser.mjs","names":[],"sources":["../../src/dynamic.browser.ts"],"sourcesContent":["export const getDynamicDictionaries = () => ({});\n"],"mappings":";AAAA,MAAa,gCAAgC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { existsSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { build, system } from "@intlayer/config/built";
4
+ import { configESMxCJSRequire } from "@intlayer/config/utils";
5
+
6
+ //#region src/dynamic.ts
7
+ /**
8
+ * Returns the dynamic dictionaries generated by Intlayer (per-locale lazy
9
+ * loaders).
10
+ *
11
+ * `@intlayer/dictionaries-entry/dynamic` is meant to be aliased by the bundler
12
+ * configuration to the generated `.intlayer/main/dynamic_dictionaries` entry.
13
+ * Outside a bundler (Node) this stub reads the entry itself.
14
+ */
15
+ const getDynamicDictionaries = (configuration = {
16
+ system,
17
+ build
18
+ }) => {
19
+ const { system: system$1, build: build$1 } = configuration;
20
+ const dictionariesPath = join(system$1.mainDir, `dynamic_dictionaries.cjs`);
21
+ let dictionaries = {};
22
+ if (existsSync(dictionariesPath)) dictionaries = (build$1.require ?? configESMxCJSRequire)(dictionariesPath);
23
+ return dictionaries;
24
+ };
25
+
26
+ //#endregion
27
+ export { getDynamicDictionaries };
28
+ //# sourceMappingURL=dynamic.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic.mjs","names":["system","build"],"sources":["../../src/dynamic.ts"],"sourcesContent":["/**\n * Returns the dynamic dictionaries generated by Intlayer (per-locale lazy\n * loaders).\n *\n * `@intlayer/dictionaries-entry/dynamic` is meant to be aliased by the bundler\n * configuration to the generated `.intlayer/main/dynamic_dictionaries` entry.\n * Outside a bundler (Node) this stub reads the entry itself.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { build, system } from '@intlayer/config/built';\nimport { configESMxCJSRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type {\n DictionaryKeys,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nexport type DynamicDictionaries = Record<\n DictionaryKeys,\n StrictModeLocaleMap<() => Promise<Dictionary>>\n>;\n\ntype GetDynamicDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system' | 'build'>\n) => DynamicDictionaries;\n\nexport const getDynamicDictionaries: GetDynamicDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `dynamic_dictionaries.cjs`);\n let dictionaries: DynamicDictionaries = {};\n\n if (existsSync(dictionariesPath)) {\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return dictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;;AA6BA,MAAa,0BACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,mBAAmB,KAAKA,SAAO,SAAS,0BAA0B;CACxE,IAAI,eAAoC,CAAC;CAEzC,IAAI,WAAW,gBAAgB,GAC7B,gBAAgBC,QAAM,WAAW,qBAAoB,CAAE,gBAAgB;CAGzE,OAAO;AACT"}
@@ -0,0 +1,6 @@
1
+ //#region src/fetch.browser.ts
2
+ const getFetchDictionaries = () => ({});
3
+
4
+ //#endregion
5
+ export { getFetchDictionaries };
6
+ //# sourceMappingURL=fetch.browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.browser.mjs","names":[],"sources":["../../src/fetch.browser.ts"],"sourcesContent":["export const getFetchDictionaries = () => ({});\n"],"mappings":";AAAA,MAAa,8BAA8B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
2
+ import { basename, extname, join } from "node:path";
3
+ import { system } from "@intlayer/config/built";
4
+
5
+ //#region src/fetch.ts
6
+ /**
7
+ * Returns the fetch dictionaries generated by Intlayer (per-locale JSON files
8
+ * fetched at runtime).
9
+ *
10
+ * `@intlayer/dictionaries-entry/fetch` is meant to be aliased by the bundler
11
+ * configuration to the generated `.intlayer/main/fetch_dictionaries` entry.
12
+ * Outside a bundler (Node) this stub reads the JSON files itself.
13
+ */
14
+ const getFetchDictionaries = (configuration = { system }) => {
15
+ const { system: system$1 } = configuration;
16
+ const { fetchDictionariesDir } = system$1;
17
+ const dictionaries = {};
18
+ if (existsSync(fetchDictionariesDir)) {
19
+ const files = readdirSync(fetchDictionariesDir).filter((file) => file.endsWith(".json"));
20
+ for (const file of files) {
21
+ const key = basename(file, extname(file));
22
+ const content = readFileSync(join(fetchDictionariesDir, file), "utf-8");
23
+ dictionaries[key] = JSON.parse(content);
24
+ }
25
+ }
26
+ return dictionaries;
27
+ };
28
+
29
+ //#endregion
30
+ export { getFetchDictionaries };
31
+ //# sourceMappingURL=fetch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.mjs","names":["system"],"sources":["../../src/fetch.ts"],"sourcesContent":["/**\n * Returns the fetch dictionaries generated by Intlayer (per-locale JSON files\n * fetched at runtime).\n *\n * `@intlayer/dictionaries-entry/fetch` is meant to be aliased by the bundler\n * configuration to the generated `.intlayer/main/fetch_dictionaries` entry.\n * Outside a bundler (Node) this stub reads the JSON files itself.\n */\n\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { basename, extname, join } from 'node:path';\nimport { system } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type {\n DictionaryKeys,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nexport type FetchDictionaries = Record<\n DictionaryKeys,\n StrictModeLocaleMap<Dictionary>\n>;\n\ntype GetFetchDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system'>\n) => FetchDictionaries;\n\nexport const getFetchDictionaries: GetFetchDictionaries = (\n configuration: Pick<IntlayerConfig, 'system'> = { system }\n) => {\n const { system } = configuration;\n const { fetchDictionariesDir } = system;\n\n const dictionaries: Record<string, StrictModeLocaleMap<Dictionary>> = {};\n\n if (existsSync(fetchDictionariesDir)) {\n // Read JSON files directly to avoid require.cache memory leak\n const files = readdirSync(fetchDictionariesDir).filter((file) =>\n file.endsWith('.json')\n );\n\n for (const file of files) {\n const key = basename(file, extname(file));\n const content = readFileSync(join(fetchDictionariesDir, file), 'utf-8');\n dictionaries[key] = JSON.parse(content);\n }\n }\n\n return dictionaries as FetchDictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;AA4BA,MAAa,wBACX,gBAAgD,EAAE,OAAO,MACtD;CACH,MAAM,EAAE,qBAAW;CACnB,MAAM,EAAE,yBAAyBA;CAEjC,MAAM,eAAgE,CAAC;CAEvE,IAAI,WAAW,oBAAoB,GAAG;EAEpC,MAAM,QAAQ,YAAY,oBAAoB,CAAC,CAAC,QAAQ,SACtD,KAAK,SAAS,OAAO,CACvB;EAEA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,MAAM,SAAS,MAAM,QAAQ,IAAI,CAAC;GACxC,MAAM,UAAU,aAAa,KAAK,sBAAsB,IAAI,GAAG,OAAO;GACtE,aAAa,OAAO,KAAK,MAAM,OAAO;EACxC;CACF;CAEA,OAAO;AACT"}
@@ -5,9 +5,12 @@ import { configESMxCJSRequire } from "@intlayer/config/utils";
5
5
 
6
6
  //#region src/index.ts
7
7
  /**
8
- * @intlayer/dictionaries-entry is a package that only returns the dictionary entry file.
9
- * Using an external package allow to alias it in the bundle configuration (such as webpack).
10
- * The alias allow hot reload the app (such as nextjs) on any dictionary change.
8
+ * Returns the merged dictionaries generated by Intlayer.
9
+ *
10
+ * `@intlayer/dictionaries-entry` is meant to be aliased by the
11
+ * bundler configuration (webpack, Vite, Turbopack, esbuild, Metro, …) to the
12
+ * generated `.intlayer/main/dictionaries` entry, so the app hot reloads on any
13
+ * dictionary change. Outside a bundler (Node) this stub reads the entry itself.
11
14
  */
12
15
  const getDictionaries = (configuration = {
13
16
  system,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["system","build"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/dictionaries-entry is a package that only returns the dictionary entry file.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n * The alias allow hot reload the app (such as nextjs) on any dictionary change.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { build, system } from '@intlayer/config/built';\nimport { configESMxCJSRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { DictionaryRegistry } from '@intlayer/types/module_augmentation';\n\ntype GetDictionaries = (configuration?: IntlayerConfig) => DictionaryRegistry;\n\nexport const getDictionaries: GetDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `dictionaries.cjs`);\n\n let dictionaries = {};\n if (existsSync(dictionariesPath)) {\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return (dictionaries ?? {}) as DictionaryRegistry;\n};\n"],"mappings":";;;;;;;;;;;AAeA,MAAa,mBACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,mBAAmB,KAAKA,SAAO,SAAS,kBAAkB;CAEhE,IAAI,eAAe,CAAC;CACpB,IAAI,WAAW,gBAAgB,GAC7B,gBAAgBC,QAAM,WAAW,qBAAoB,CAAE,gBAAgB;CAGzE,OAAQ,gBAAgB,CAAC;AAC3B"}
1
+ {"version":3,"file":"index.mjs","names":["system","build"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * Returns the merged dictionaries generated by Intlayer.\n *\n * `@intlayer/dictionaries-entry` is meant to be aliased by the\n * bundler configuration (webpack, Vite, Turbopack, esbuild, Metro, …) to the\n * generated `.intlayer/main/dictionaries` entry, so the app hot reloads on any\n * dictionary change. Outside a bundler (Node) this stub reads the entry itself.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { build, system } from '@intlayer/config/built';\nimport { configESMxCJSRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { DictionaryRegistry } from '@intlayer/types/module_augmentation';\n\ntype GetDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system' | 'build'>\n) => DictionaryRegistry;\n\nexport const getDictionaries: GetDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `dictionaries.cjs`);\n\n let dictionaries = {};\n if (existsSync(dictionariesPath)) {\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return (dictionaries ?? {}) as DictionaryRegistry;\n};\n"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAa,mBACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,mBAAmB,KAAKA,SAAO,SAAS,kBAAkB;CAEhE,IAAI,eAAe,CAAC;CACpB,IAAI,WAAW,gBAAgB,GAC7B,gBAAgBC,QAAM,WAAW,qBAAoB,CAAE,gBAAgB;CAGzE,OAAQ,gBAAgB,CAAC;AAC3B"}
@@ -0,0 +1,6 @@
1
+ //#region src/remote.browser.ts
2
+ const getRemoteDictionaries = () => ({});
3
+
4
+ //#endregion
5
+ export { getRemoteDictionaries };
6
+ //# sourceMappingURL=remote.browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.browser.mjs","names":[],"sources":["../../src/remote.browser.ts"],"sourcesContent":["export const getRemoteDictionaries = () => ({});\n"],"mappings":";AAAA,MAAa,+BAA+B,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { existsSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { build, system } from "@intlayer/config/built";
4
+ import { clearModuleCache, configESMxCJSRequire } from "@intlayer/config/utils";
5
+
6
+ //#region src/remote.ts
7
+ /**
8
+ * Returns the remote dictionaries pulled from the Intlayer CMS.
9
+ *
10
+ * `@intlayer/dictionaries-entry/remote` is meant to be aliased by the bundler
11
+ * configuration to the generated `.intlayer/main/remote_dictionaries` entry.
12
+ * Outside a bundler (Node) this stub reads the entry itself.
13
+ */
14
+ const getRemoteDictionaries = (configuration = {
15
+ system,
16
+ build
17
+ }) => {
18
+ const { system: system$1, build: build$1 } = configuration;
19
+ const dictionariesPath = join(system$1.mainDir, `remote_dictionaries.cjs`);
20
+ let dictionaries = {};
21
+ if (existsSync(dictionariesPath)) {
22
+ clearModuleCache(dictionariesPath);
23
+ dictionaries = (build$1.require ?? configESMxCJSRequire)(dictionariesPath);
24
+ }
25
+ return dictionaries;
26
+ };
27
+
28
+ //#endregion
29
+ export { getRemoteDictionaries };
30
+ //# sourceMappingURL=remote.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.mjs","names":["system","build"],"sources":["../../src/remote.ts"],"sourcesContent":["/**\n * Returns the remote dictionaries pulled from the Intlayer CMS.\n *\n * `@intlayer/dictionaries-entry/remote` is meant to be aliased by the bundler\n * configuration to the generated `.intlayer/main/remote_dictionaries` entry.\n * Outside a bundler (Node) this stub reads the entry itself.\n */\n\nimport { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nimport type { DictionaryAPI } from '@intlayer/backend';\nimport { build, system } from '@intlayer/config/built';\nimport { clearModuleCache, configESMxCJSRequire } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { DictionaryKey } from '@intlayer/types/dictionary';\n\nexport type RemoteDictionaries = Record<DictionaryKey, DictionaryAPI[]>;\n\ntype GetRemoteDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system' | 'build'>\n) => RemoteDictionaries;\n\nexport const getRemoteDictionaries: GetRemoteDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `remote_dictionaries.cjs`);\n let dictionaries: RemoteDictionaries = {};\n\n if (existsSync(dictionariesPath)) {\n // Clear cache for remote_dictionaries.cjs and all its dependencies (JSON files)\n clearModuleCache(dictionariesPath);\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return dictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;AAsBA,MAAa,yBACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,mBAAmB,KAAKA,SAAO,SAAS,yBAAyB;CACvE,IAAI,eAAmC,CAAC;CAExC,IAAI,WAAW,gBAAgB,GAAG;EAEhC,iBAAiB,gBAAgB;EACjC,gBAAgBC,QAAM,WAAW,qBAAoB,CAAE,gBAAgB;CACzE;CAEA,OAAO;AACT"}
@@ -0,0 +1,6 @@
1
+ //#region src/unmerged.browser.ts
2
+ const getUnmergedDictionaries = () => ({});
3
+
4
+ //#endregion
5
+ export { getUnmergedDictionaries };
6
+ //# sourceMappingURL=unmerged.browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unmerged.browser.mjs","names":[],"sources":["../../src/unmerged.browser.ts"],"sourcesContent":["export const getUnmergedDictionaries = () => ({});\n"],"mappings":";AAAA,MAAa,iCAAiC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
2
+ import { basename, extname, join } from "node:path";
3
+ import { build, system } from "@intlayer/config/built";
4
+
5
+ //#region src/unmerged.ts
6
+ /**
7
+ * Returns the unmerged dictionaries generated by Intlayer (one array of
8
+ * declarations per key, before merging).
9
+ *
10
+ * `@intlayer/dictionaries-entry/unmerged` is meant to be aliased by the bundler
11
+ * configuration to the generated `.intlayer/main/unmerged_dictionaries` entry.
12
+ * Outside a bundler (Node) this stub reads the JSON files itself.
13
+ */
14
+ const getUnmergedDictionaries = (configuration = {
15
+ system,
16
+ build
17
+ }) => {
18
+ const { system: system$1 } = configuration;
19
+ const { unmergedDictionariesDir } = system$1;
20
+ const dictionaries = {};
21
+ if (existsSync(unmergedDictionariesDir)) {
22
+ const files = readdirSync(unmergedDictionariesDir).filter((file) => file.endsWith(".json"));
23
+ for (const file of files) {
24
+ const key = basename(file, extname(file));
25
+ const content = readFileSync(join(unmergedDictionariesDir, file), "utf-8");
26
+ dictionaries[key] = JSON.parse(content);
27
+ }
28
+ }
29
+ return dictionaries;
30
+ };
31
+
32
+ //#endregion
33
+ export { getUnmergedDictionaries };
34
+ //# sourceMappingURL=unmerged.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unmerged.mjs","names":["system"],"sources":["../../src/unmerged.ts"],"sourcesContent":["/**\n * Returns the unmerged dictionaries generated by Intlayer (one array of\n * declarations per key, before merging).\n *\n * `@intlayer/dictionaries-entry/unmerged` is meant to be aliased by the bundler\n * configuration to the generated `.intlayer/main/unmerged_dictionaries` entry.\n * Outside a bundler (Node) this stub reads the JSON files itself.\n */\n\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { basename, extname, join } from 'node:path';\nimport { build, system } from '@intlayer/config/built';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport type { DictionaryKeys } from '@intlayer/types/module_augmentation';\n\nexport type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;\n\ntype GetUnmergedDictionaries = (\n configuration?: Pick<IntlayerConfig, 'system' | 'build'>\n) => UnmergedDictionaries;\n\nexport const getUnmergedDictionaries: GetUnmergedDictionaries = (\n configuration: Pick<IntlayerConfig, 'system' | 'build'> = { system, build }\n) => {\n const { system } = configuration;\n const { unmergedDictionariesDir } = system;\n\n const dictionaries: Record<string, Dictionary[]> = {};\n\n if (existsSync(unmergedDictionariesDir)) {\n // Read JSON files directly to avoid require.cache memory leak\n const files = readdirSync(unmergedDictionariesDir).filter((file) =>\n file.endsWith('.json')\n );\n\n for (const file of files) {\n const key = basename(file, extname(file));\n const content = readFileSync(\n join(unmergedDictionariesDir, file),\n 'utf-8'\n );\n dictionaries[key] = JSON.parse(content);\n }\n }\n\n return dictionaries as UnmergedDictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;AAsBA,MAAa,2BACX,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,qBAAW;CACnB,MAAM,EAAE,4BAA4BA;CAEpC,MAAM,eAA6C,CAAC;CAEpD,IAAI,WAAW,uBAAuB,GAAG;EAEvC,MAAM,QAAQ,YAAY,uBAAuB,CAAC,CAAC,QAAQ,SACzD,KAAK,SAAS,OAAO,CACvB;EAEA,KAAK,MAAM,QAAQ,OAAO;GACxB,MAAM,MAAM,SAAS,MAAM,QAAQ,IAAI,CAAC;GACxC,MAAM,UAAU,aACd,KAAK,yBAAyB,IAAI,GAClC,OACF;GACA,aAAa,OAAO,KAAK,MAAM,OAAO;EACxC;CACF;CAEA,OAAO;AACT"}
@@ -0,0 +1,4 @@
1
+ //#region src/dynamic.browser.d.ts
2
+ export declare const getDynamicDictionaries: () => {};
3
+ //#endregion
4
+ //# sourceMappingURL=dynamic.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic.browser.d.ts","names":[],"sources":["../../src/dynamic.browser.ts"],"mappings":";qBAAa"}
@@ -0,0 +1,9 @@
1
+ import { IntlayerConfig } from "@intlayer/types/config";
2
+ import { Dictionary } from "@intlayer/types/dictionary";
3
+ import { DictionaryKeys, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
4
+ //#region src/dynamic.d.ts
5
+ export type DynamicDictionaries = Record<DictionaryKeys, StrictModeLocaleMap<() => Promise<Dictionary>>>;
6
+ type GetDynamicDictionaries = (configuration?: Pick<IntlayerConfig, "system" | "build">) => DynamicDictionaries;
7
+ export declare const getDynamicDictionaries: GetDynamicDictionaries;
8
+ //#endregion
9
+ //# sourceMappingURL=dynamic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic.d.ts","names":[],"sources":["../../src/dynamic.ts"],"mappings":";;;;YAoBY,sBAAsB,OAChC,gBACA,0BAA0B,QAAQ;KAG/B,0BACH,gBAAgB,KAAK,wCAClB;qBAEQ,wBAAwB"}
@@ -0,0 +1,4 @@
1
+ //#region src/fetch.browser.d.ts
2
+ export declare const getFetchDictionaries: () => {};
3
+ //#endregion
4
+ //# sourceMappingURL=fetch.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.browser.d.ts","names":[],"sources":["../../src/fetch.browser.ts"],"mappings":";qBAAa"}
@@ -0,0 +1,9 @@
1
+ import { IntlayerConfig } from "@intlayer/types/config";
2
+ import { Dictionary } from "@intlayer/types/dictionary";
3
+ import { DictionaryKeys, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
4
+ //#region src/fetch.d.ts
5
+ export type FetchDictionaries = Record<DictionaryKeys, StrictModeLocaleMap<Dictionary>>;
6
+ type GetFetchDictionaries = (configuration?: Pick<IntlayerConfig, "system">) => FetchDictionaries;
7
+ export declare const getFetchDictionaries: GetFetchDictionaries;
8
+ //#endregion
9
+ //# sourceMappingURL=fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.d.ts","names":[],"sources":["../../src/fetch.ts"],"mappings":";;;;YAmBY,oBAAoB,OAC9B,gBACA,oBAAoB;KAGjB,wBACH,gBAAgB,KAAK,8BAClB;qBAEQ,sBAAsB"}
@@ -1,7 +1,7 @@
1
1
  import { IntlayerConfig } from "@intlayer/types/config";
2
2
  import { DictionaryRegistry } from "@intlayer/types/module_augmentation";
3
3
  //#region src/index.d.ts
4
- type GetDictionaries = (configuration?: IntlayerConfig) => DictionaryRegistry;
4
+ type GetDictionaries = (configuration?: Pick<IntlayerConfig, "system" | "build">) => DictionaryRegistry;
5
5
  export declare const getDictionaries: GetDictionaries;
6
6
  //#endregion
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;KAaK,mBAAmB,gBAAgB,mBAAmB;qBAE9C,iBAAiB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;KAgBK,mBACH,gBAAgB,KAAK,wCAClB;qBAEQ,iBAAiB"}
@@ -0,0 +1,4 @@
1
+ //#region src/remote.browser.d.ts
2
+ export declare const getRemoteDictionaries: () => {};
3
+ //#endregion
4
+ //# sourceMappingURL=remote.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.browser.d.ts","names":[],"sources":["../../src/remote.browser.ts"],"mappings":";qBAAa"}
@@ -0,0 +1,9 @@
1
+ import { IntlayerConfig } from "@intlayer/types/config";
2
+ import { DictionaryKey } from "@intlayer/types/dictionary";
3
+ import { DictionaryAPI } from "@intlayer/backend";
4
+ //#region src/remote.d.ts
5
+ export type RemoteDictionaries = Record<DictionaryKey, DictionaryAPI[]>;
6
+ type GetRemoteDictionaries = (configuration?: Pick<IntlayerConfig, "system" | "build">) => RemoteDictionaries;
7
+ export declare const getRemoteDictionaries: GetRemoteDictionaries;
8
+ //#endregion
9
+ //# sourceMappingURL=remote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.d.ts","names":[],"sources":["../../src/remote.ts"],"mappings":";;;;YAgBY,qBAAqB,OAAO,eAAe;KAElD,yBACH,gBAAgB,KAAK,wCAClB;qBAEQ,uBAAuB"}
@@ -0,0 +1,4 @@
1
+ //#region src/unmerged.browser.d.ts
2
+ export declare const getUnmergedDictionaries: () => {};
3
+ //#endregion
4
+ //# sourceMappingURL=unmerged.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unmerged.browser.d.ts","names":[],"sources":["../../src/unmerged.browser.ts"],"mappings":";qBAAa"}
@@ -0,0 +1,9 @@
1
+ import { IntlayerConfig } from "@intlayer/types/config";
2
+ import { Dictionary } from "@intlayer/types/dictionary";
3
+ import { DictionaryKeys } from "@intlayer/types/module_augmentation";
4
+ //#region src/unmerged.d.ts
5
+ export type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;
6
+ type GetUnmergedDictionaries = (configuration?: Pick<IntlayerConfig, "system" | "build">) => UnmergedDictionaries;
7
+ export declare const getUnmergedDictionaries: GetUnmergedDictionaries;
8
+ //#endregion
9
+ //# sourceMappingURL=unmerged.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unmerged.d.ts","names":[],"sources":["../../src/unmerged.ts"],"mappings":";;;;YAgBY,uBAAuB,OAAO,gBAAgB;KAErD,2BACH,gBAAgB,KAAK,wCAClB;qBAEQ,yBAAyB"}
package/package.json CHANGED
@@ -1,13 +1,17 @@
1
1
  {
2
2
  "name": "@intlayer/dictionaries-entry",
3
- "version": "9.5.2",
3
+ "version": "9.5.4-canary.0",
4
4
  "private": false,
5
- "description": "Provides the entry path for Intlayer dictionaries, solving filesystem retrieval issues for bundlers like Webpack and Rollup.",
5
+ "description": "Provides the entry points for the generated Intlayer dictionaries (merged, unmerged, remote, dynamic, fetch), designed to be aliased by bundlers like Webpack, Vite, Turbopack, esbuild and Metro.",
6
6
  "keywords": [
7
7
  "intlayer",
8
8
  "alias",
9
9
  "dictionaries",
10
- "entry"
10
+ "entry",
11
+ "unmerged",
12
+ "remote",
13
+ "dynamic",
14
+ "fetch"
11
15
  ],
12
16
  "homepage": "https://intlayer.org",
13
17
  "bugs": {
@@ -32,17 +36,35 @@
32
36
  "sideEffects": false,
33
37
  "exports": {
34
38
  ".": {
35
- "browser": "./dist/esm/index.browser.mjs",
36
39
  "types": "./dist/types/index.d.ts",
37
- "require": "./dist/cjs/index.cjs",
38
- "import": "./dist/esm/index.mjs"
39
- },
40
- "./*": {
41
40
  "browser": "./dist/esm/index.browser.mjs",
42
- "types": "./dist/types/index.d.ts",
43
41
  "require": "./dist/cjs/index.cjs",
44
42
  "import": "./dist/esm/index.mjs"
45
43
  },
44
+ "./unmerged": {
45
+ "types": "./dist/types/unmerged.d.ts",
46
+ "browser": "./dist/esm/unmerged.browser.mjs",
47
+ "require": "./dist/cjs/unmerged.cjs",
48
+ "import": "./dist/esm/unmerged.mjs"
49
+ },
50
+ "./remote": {
51
+ "types": "./dist/types/remote.d.ts",
52
+ "browser": "./dist/esm/remote.browser.mjs",
53
+ "require": "./dist/cjs/remote.cjs",
54
+ "import": "./dist/esm/remote.mjs"
55
+ },
56
+ "./dynamic": {
57
+ "types": "./dist/types/dynamic.d.ts",
58
+ "browser": "./dist/esm/dynamic.browser.mjs",
59
+ "require": "./dist/cjs/dynamic.cjs",
60
+ "import": "./dist/esm/dynamic.mjs"
61
+ },
62
+ "./fetch": {
63
+ "types": "./dist/types/fetch.d.ts",
64
+ "browser": "./dist/esm/fetch.browser.mjs",
65
+ "require": "./dist/cjs/fetch.cjs",
66
+ "import": "./dist/esm/fetch.mjs"
67
+ },
46
68
  "./package.json": "./package.json"
47
69
  },
48
70
  "main": "dist/cjs/index.cjs",
@@ -50,6 +72,18 @@
50
72
  "types": "dist/types/index.d.ts",
51
73
  "typesVersions": {
52
74
  "*": {
75
+ "unmerged": [
76
+ "./dist/types/unmerged.d.ts"
77
+ ],
78
+ "remote": [
79
+ "./dist/types/remote.d.ts"
80
+ ],
81
+ "dynamic": [
82
+ "./dist/types/dynamic.d.ts"
83
+ ],
84
+ "fetch": [
85
+ "./dist/types/fetch.d.ts"
86
+ ],
53
87
  "package.json": [
54
88
  "./package.json"
55
89
  ]
@@ -72,16 +106,17 @@
72
106
  "prepublish": "cp -f ../../../README.md ./README.md",
73
107
  "publish": "bun publish || true",
74
108
  "publish:canary": "bun publish --access public --tag canary || true",
109
+ "publish:ci": "bun ../../../scripts/publish-package.mjs",
75
110
  "publish:latest": "bun publish --access public --tag latest || true",
76
111
  "test": "bun --bun vitest run",
77
112
  "test:watch": "bun --bun vitest",
78
113
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
79
114
  },
80
115
  "dependencies": {
81
- "@intlayer/config": "9.5.2"
116
+ "@intlayer/config": "9.5.4-canary.0"
82
117
  },
83
118
  "devDependencies": {
84
- "@intlayer/types": "9.5.2",
119
+ "@intlayer/types": "9.5.4-canary.0",
85
120
  "@types/node": "^22",
86
121
  "@utils/ts-config": "1.0.4",
87
122
  "@utils/ts-config-types": "1.0.4",
@@ -89,7 +124,7 @@
89
124
  "rimraf": "6.1.3",
90
125
  "tsdown": "0.23.0",
91
126
  "typescript": "7.0.2",
92
- "vitest": "5.0.0"
127
+ "vitest": "5.0.1"
93
128
  },
94
129
  "engines": {
95
130
  "node": ">=14.18"