@intlayer/dynamic-dictionaries-entry 8.4.8 → 8.4.9
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.
package/dist/cjs/index.cjs
CHANGED
|
@@ -12,17 +12,14 @@ let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
|
12
12
|
* Using an external package allow to alias it in the bundle configuration (such as webpack).
|
|
13
13
|
* The alias allow hot reload the app (such as nextjs) on any dictionary change.
|
|
14
14
|
*/
|
|
15
|
-
const
|
|
15
|
+
const getUnmergedDictionaries = (configuration = _intlayer_config_built.default) => {
|
|
16
16
|
const { system, build } = configuration;
|
|
17
|
-
const dictionariesPath = (0, node_path.join)(system.mainDir, `
|
|
17
|
+
const dictionariesPath = (0, node_path.join)(system.mainDir, `unmerged_dictionaries.cjs`);
|
|
18
18
|
let dictionaries = {};
|
|
19
|
-
if ((0, node_fs.existsSync)(dictionariesPath))
|
|
20
|
-
(0, _intlayer_config_utils.clearModuleCache)(dictionariesPath);
|
|
21
|
-
dictionaries = (build.require ?? _intlayer_config_utils.configESMxCJSRequire)(dictionariesPath);
|
|
22
|
-
}
|
|
19
|
+
if ((0, node_fs.existsSync)(dictionariesPath)) dictionaries = (build.require ?? _intlayer_config_utils.configESMxCJSRequire)(dictionariesPath);
|
|
23
20
|
return dictionaries;
|
|
24
21
|
};
|
|
25
22
|
|
|
26
23
|
//#endregion
|
|
27
|
-
exports.
|
|
24
|
+
exports.getUnmergedDictionaries = getUnmergedDictionaries;
|
|
28
25
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["config","configESMxCJSRequire"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/dynamic-dictionaries-entry is a package that only returns the dynamic 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 config from '@intlayer/config/built';\nimport {
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["config","configESMxCJSRequire"],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/dynamic-dictionaries-entry is a package that only returns the dynamic 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 config 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 { DictionaryKeys } from '@intlayer/types/module_augmentation';\n\nexport type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;\n\ntype GetUnmergedDictionaries = (\n configuration?: IntlayerConfig\n) => UnmergedDictionaries;\n\nexport const getUnmergedDictionaries: GetUnmergedDictionaries = (\n configuration: IntlayerConfig = config\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `unmerged_dictionaries.cjs`);\n let dictionaries: Record<DictionaryKeys, Dictionary[]> = {};\n\n if (existsSync(dictionariesPath)) {\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return dictionaries;\n};\n"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAa,2BACX,gBAAgCA,mCAC7B;CACH,MAAM,EAAE,QAAQ,UAAU;CAG1B,MAAM,uCAAwB,OAAO,SAAS,4BAA4B;CAC1E,IAAI,eAAqD,EAAE;AAE3D,6BAAe,iBAAiB,CAC9B,iBAAgB,MAAM,WAAWC,6CAAsB,iBAAiB;AAG1E,QAAO"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import config from "@intlayer/config/built";
|
|
4
|
-
import {
|
|
4
|
+
import { configESMxCJSRequire } from "@intlayer/config/utils";
|
|
5
5
|
|
|
6
6
|
//#region src/index.ts
|
|
7
7
|
/**
|
|
@@ -9,17 +9,14 @@ import { clearModuleCache, configESMxCJSRequire } from "@intlayer/config/utils";
|
|
|
9
9
|
* Using an external package allow to alias it in the bundle configuration (such as webpack).
|
|
10
10
|
* The alias allow hot reload the app (such as nextjs) on any dictionary change.
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const getUnmergedDictionaries = (configuration = config) => {
|
|
13
13
|
const { system, build } = configuration;
|
|
14
|
-
const dictionariesPath = join(system.mainDir, `
|
|
14
|
+
const dictionariesPath = join(system.mainDir, `unmerged_dictionaries.cjs`);
|
|
15
15
|
let dictionaries = {};
|
|
16
|
-
if (existsSync(dictionariesPath))
|
|
17
|
-
clearModuleCache(dictionariesPath);
|
|
18
|
-
dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);
|
|
19
|
-
}
|
|
16
|
+
if (existsSync(dictionariesPath)) dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);
|
|
20
17
|
return dictionaries;
|
|
21
18
|
};
|
|
22
19
|
|
|
23
20
|
//#endregion
|
|
24
|
-
export {
|
|
21
|
+
export { getUnmergedDictionaries };
|
|
25
22
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/dynamic-dictionaries-entry is a package that only returns the dynamic 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 config from '@intlayer/config/built';\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/dynamic-dictionaries-entry is a package that only returns the dynamic 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 config 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 { DictionaryKeys } from '@intlayer/types/module_augmentation';\n\nexport type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;\n\ntype GetUnmergedDictionaries = (\n configuration?: IntlayerConfig\n) => UnmergedDictionaries;\n\nexport const getUnmergedDictionaries: GetUnmergedDictionaries = (\n configuration: IntlayerConfig = config\n) => {\n const { system, build } = configuration;\n\n // Always use cjs for dictionaries entry as it uses require\n const dictionariesPath = join(system.mainDir, `unmerged_dictionaries.cjs`);\n let dictionaries: Record<DictionaryKeys, Dictionary[]> = {};\n\n if (existsSync(dictionariesPath)) {\n dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);\n }\n\n return dictionaries;\n};\n"],"mappings":";;;;;;;;;;;AAoBA,MAAa,2BACX,gBAAgC,WAC7B;CACH,MAAM,EAAE,QAAQ,UAAU;CAG1B,MAAM,mBAAmB,KAAK,OAAO,SAAS,4BAA4B;CAC1E,IAAI,eAAqD,EAAE;AAE3D,KAAI,WAAW,iBAAiB,CAC9B,iBAAgB,MAAM,WAAW,sBAAsB,iBAAiB;AAG1E,QAAO"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IntlayerConfig } from "@intlayer/types/config";
|
|
2
2
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
3
|
-
import { DictionaryKeys
|
|
3
|
+
import { DictionaryKeys } from "@intlayer/types/module_augmentation";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
|
-
type
|
|
7
|
-
type
|
|
8
|
-
declare const
|
|
6
|
+
type UnmergedDictionaries = Record<DictionaryKeys, Dictionary[]>;
|
|
7
|
+
type GetUnmergedDictionaries = (configuration?: IntlayerConfig) => UnmergedDictionaries;
|
|
8
|
+
declare const getUnmergedDictionaries: GetUnmergedDictionaries;
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { UnmergedDictionaries, getUnmergedDictionaries };
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;KAcY,oBAAA,GAAuB,MAAA,CAAO,cAAA,EAAgB,UAAA;AAAA,KAErD,uBAAA,IACH,aAAA,GAAgB,cAAA,KACb,oBAAA;AAAA,cAEQ,uBAAA,EAAyB,uBAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/dynamic-dictionaries-entry",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provides the entry path for Intlayer dynamic dictionaries, solving filesystem retrieval issues for bundlers like Webpack and Rollup.",
|
|
6
6
|
"keywords": [
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@intlayer/config": "8.4.
|
|
79
|
+
"@intlayer/config": "8.4.9"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@intlayer/types": "8.4.
|
|
82
|
+
"@intlayer/types": "8.4.9",
|
|
83
83
|
"@types/node": "25.5.0",
|
|
84
84
|
"@utils/ts-config": "1.0.4",
|
|
85
85
|
"@utils/ts-config-types": "1.0.4",
|