@intlayer/dictionaries-entry 9.6.0 → 9.7.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.
@@ -1 +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"}
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-contract/dictionary';\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"}
@@ -1 +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"}
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-contract/dictionary';\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"}
@@ -1,6 +1,6 @@
1
1
  import { IntlayerConfig } from "@intlayer/types/config";
2
2
  import { DictionaryKey } from "@intlayer/types/dictionary";
3
- import { DictionaryAPI } from "@intlayer/backend";
3
+ import { DictionaryAPI } from "@intlayer/backend-contract/dictionary";
4
4
  //#region src/remote.d.ts
5
5
  export type RemoteDictionaries = Record<DictionaryKey, DictionaryAPI[]>;
6
6
  type GetRemoteDictionaries = (configuration?: Pick<IntlayerConfig, "system" | "build">) => RemoteDictionaries;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/dictionaries-entry",
3
- "version": "9.6.0",
3
+ "version": "9.7.0",
4
4
  "private": false,
5
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": [
@@ -113,11 +113,12 @@
113
113
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
114
114
  },
115
115
  "dependencies": {
116
- "@intlayer/config": "9.6.0"
116
+ "@intlayer/backend-contract": "9.7.0",
117
+ "@intlayer/config": "9.7.0"
117
118
  },
118
119
  "devDependencies": {
119
- "@intlayer/types": "9.6.0",
120
- "@types/node": "^22",
120
+ "@intlayer/types": "9.7.0",
121
+ "@types/node": "^26",
121
122
  "@utils/ts-config": "1.0.4",
122
123
  "@utils/ts-config-types": "1.0.4",
123
124
  "@utils/tsdown-config": "1.0.4",