@intlayer/dynamic-dictionaries-entry 5.5.11 → 5.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.
- package/README.md +1 -1
- package/dist/cjs/index.cjs +5 -8
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.mjs +5 -8
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts +2 -8
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<a href="https://www.facebook.com/intlayer" target="blank"><img align="center"
|
|
34
34
|
src="https://img.shields.io/badge/facebook-4267B2.svg?style=for-the-badge&logo=facebook&logoColor=white"
|
|
35
35
|
alt="Intlayer Facebook" height="30"/></a>
|
|
36
|
-
<a href="https://www.instagram.com/
|
|
36
|
+
<a href="https://www.instagram.com/intlayer/" target="blank"><img align="center"
|
|
37
37
|
src="https://img.shields.io/badge/instagram-%23E4405F.svg?style=for-the-badge&logo=Instagram&logoColor=white"
|
|
38
38
|
alt="Intlayer Instagram" height="30"/></a>
|
|
39
39
|
<a href="https://x.com/Intlayer183096" target="blank"><img align="center"
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -19,18 +19,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var index_exports = {};
|
|
20
20
|
__export(index_exports, {
|
|
21
21
|
default: () => index_default,
|
|
22
|
-
|
|
22
|
+
getDynamicDictionaries: () => getDynamicDictionaries
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(index_exports);
|
|
25
25
|
var import_config = require("@intlayer/config");
|
|
26
26
|
var import_fs = require("fs");
|
|
27
27
|
var import_path = require("path");
|
|
28
|
-
const
|
|
28
|
+
const getDynamicDictionaries = () => {
|
|
29
29
|
const { content } = (0, import_config.getConfiguration)();
|
|
30
|
-
const dictionariesPath = (0, import_path.join)(
|
|
31
|
-
content.mainDir,
|
|
32
|
-
import_config.isESModule ? "unmerged_dictionaries.mjs" : "unmerged_dictionaries.cjs"
|
|
33
|
-
);
|
|
30
|
+
const dictionariesPath = (0, import_path.join)(content.mainDir, "dynamic_dictionaries.cjs");
|
|
34
31
|
let dictionaries = {};
|
|
35
32
|
if ((0, import_fs.existsSync)(dictionariesPath)) {
|
|
36
33
|
delete import_config.ESMxCJSRequire.cache[dictionariesPath];
|
|
@@ -38,9 +35,9 @@ const getUnmergedDictionaries = () => {
|
|
|
38
35
|
}
|
|
39
36
|
return dictionaries;
|
|
40
37
|
};
|
|
41
|
-
var index_default = (() =>
|
|
38
|
+
var index_default = (() => getDynamicDictionaries())();
|
|
42
39
|
// Annotate the CommonJS export names for ESM import in node:
|
|
43
40
|
0 && (module.exports = {
|
|
44
|
-
|
|
41
|
+
getDynamicDictionaries
|
|
45
42
|
});
|
|
46
43
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// @ts-nocheck intlayer declared for module augmentation\n\n/**\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 { ESMxCJSRequire, getConfiguration } from '@intlayer/config';\nimport { existsSync } from 'fs';\nimport {\n Dictionary,\n IntlayerDictionaryTypesConnector,\n LanguageContent,\n} from 'intlayer';\nimport { join } from 'path';\n\nexport const getDynamicDictionaries = () => {\n const { content } = getConfiguration();\n\n const dictionariesPath = join(content.mainDir, 'dynamic_dictionaries.cjs');\n let dictionaries: Record<\n IntlayerDictionaryTypesConnector['key'],\n LanguageContent<Dictionary>\n > = {};\n\n if (existsSync(dictionariesPath)) {\n delete ESMxCJSRequire.cache[dictionariesPath];\n dictionaries = ESMxCJSRequire(dictionariesPath);\n }\n\n return dictionaries;\n};\n\nexport default (() => getDynamicDictionaries())();\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,oBAAiD;AACjD,gBAA2B;AAM3B,kBAAqB;AAEd,MAAM,yBAAyB,MAAM;AAC1C,QAAM,EAAE,QAAQ,QAAI,gCAAiB;AAErC,QAAM,uBAAmB,kBAAK,QAAQ,SAAS,0BAA0B;AACzE,MAAI,eAGA,CAAC;AAEL,UAAI,sBAAW,gBAAgB,GAAG;AAChC,WAAO,6BAAe,MAAM,gBAAgB;AAC5C,uBAAe,8BAAe,gBAAgB;AAAA,EAChD;AAEA,SAAO;AACT;AAEA,IAAO,iBAAS,MAAM,uBAAuB,GAAG;","names":[]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { ESMxCJSRequire, getConfiguration
|
|
1
|
+
import { ESMxCJSRequire, getConfiguration } from "@intlayer/config";
|
|
2
2
|
import { existsSync } from "fs";
|
|
3
3
|
import { join } from "path";
|
|
4
|
-
const
|
|
4
|
+
const getDynamicDictionaries = () => {
|
|
5
5
|
const { content } = getConfiguration();
|
|
6
|
-
const dictionariesPath = join(
|
|
7
|
-
content.mainDir,
|
|
8
|
-
isESModule ? "unmerged_dictionaries.mjs" : "unmerged_dictionaries.cjs"
|
|
9
|
-
);
|
|
6
|
+
const dictionariesPath = join(content.mainDir, "dynamic_dictionaries.cjs");
|
|
10
7
|
let dictionaries = {};
|
|
11
8
|
if (existsSync(dictionariesPath)) {
|
|
12
9
|
delete ESMxCJSRequire.cache[dictionariesPath];
|
|
@@ -14,9 +11,9 @@ const getUnmergedDictionaries = () => {
|
|
|
14
11
|
}
|
|
15
12
|
return dictionaries;
|
|
16
13
|
};
|
|
17
|
-
var index_default = (() =>
|
|
14
|
+
var index_default = (() => getDynamicDictionaries())();
|
|
18
15
|
export {
|
|
19
16
|
index_default as default,
|
|
20
|
-
|
|
17
|
+
getDynamicDictionaries
|
|
21
18
|
};
|
|
22
19
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * @intlayer/
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// @ts-nocheck intlayer declared for module augmentation\n\n/**\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 { ESMxCJSRequire, getConfiguration } from '@intlayer/config';\nimport { existsSync } from 'fs';\nimport {\n Dictionary,\n IntlayerDictionaryTypesConnector,\n LanguageContent,\n} from 'intlayer';\nimport { join } from 'path';\n\nexport const getDynamicDictionaries = () => {\n const { content } = getConfiguration();\n\n const dictionariesPath = join(content.mainDir, 'dynamic_dictionaries.cjs');\n let dictionaries: Record<\n IntlayerDictionaryTypesConnector['key'],\n LanguageContent<Dictionary>\n > = {};\n\n if (existsSync(dictionariesPath)) {\n delete ESMxCJSRequire.cache[dictionariesPath];\n dictionaries = ESMxCJSRequire(dictionariesPath);\n }\n\n return dictionaries;\n};\n\nexport default (() => getDynamicDictionaries())();\n"],"mappings":"AAQA,SAAS,gBAAgB,wBAAwB;AACjD,SAAS,kBAAkB;AAM3B,SAAS,YAAY;AAEd,MAAM,yBAAyB,MAAM;AAC1C,QAAM,EAAE,QAAQ,IAAI,iBAAiB;AAErC,QAAM,mBAAmB,KAAK,QAAQ,SAAS,0BAA0B;AACzE,MAAI,eAGA,CAAC;AAEL,MAAI,WAAW,gBAAgB,GAAG;AAChC,WAAO,eAAe,MAAM,gBAAgB;AAC5C,mBAAe,eAAe,gBAAgB;AAAA,EAChD;AAEA,SAAO;AACT;AAEA,IAAO,iBAAS,MAAM,uBAAuB,GAAG;","names":[]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Using an external package allow to alias it in the bundle configuration (such as webpack).
|
|
4
|
-
* The alias allow hot reload the app (such as nextjs) on any dictionary change.
|
|
5
|
-
*/
|
|
6
|
-
import type { Dictionary } from 'intlayer';
|
|
7
|
-
export declare const getUnmergedDictionaries: () => Record<IntlayerDictionaryTypesConnector, Dictionary[]>;
|
|
8
|
-
declare const _default: Record<IntlayerDictionaryTypesConnector, Dictionary[]>;
|
|
1
|
+
export declare const getDynamicDictionaries: () => Record<IntlayerDictionaryTypesConnector, IConfigLocales<Content>>;
|
|
2
|
+
declare const _default: Record<IntlayerDictionaryTypesConnector, IConfigLocales<Content>>;
|
|
9
3
|
export default _default;
|
|
10
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,sBAAsB,yEAelC,CAAC;;AAEF,wBAAkD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/dynamic-dictionaries-entry",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
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": [
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"./package.json"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@intlayer/config": "5.
|
|
56
|
+
"@intlayer/config": "5.7.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "^22.15.30",
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
"typescript": "^5.8.3",
|
|
68
68
|
"vitest": "^3.2.2",
|
|
69
69
|
"@utils/eslint-config": "1.0.4",
|
|
70
|
-
"@utils/ts-config-types": "1.0.4",
|
|
71
70
|
"@utils/ts-config": "1.0.4",
|
|
71
|
+
"@utils/ts-config-types": "1.0.4",
|
|
72
72
|
"@utils/tsup-config": "1.0.4"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@intlayer/config": "5.
|
|
76
|
-
"intlayer": "5.
|
|
75
|
+
"@intlayer/config": "5.7.0",
|
|
76
|
+
"intlayer": "5.7.0"
|
|
77
77
|
},
|
|
78
78
|
"engines": {
|
|
79
79
|
"node": ">=14.18"
|