@intlayer/dynamic-dictionaries-entry 8.11.1 → 8.11.3
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
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
let node_fs = require("node:fs");
|
|
4
3
|
let node_path = require("node:path");
|
|
5
4
|
let _intlayer_config_built = require("@intlayer/config/built");
|
|
6
|
-
_intlayer_config_built = require_runtime.__toESM(_intlayer_config_built);
|
|
7
5
|
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
6
|
|
|
9
7
|
//#region src/index.ts
|
|
@@ -12,11 +10,14 @@ let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
|
12
10
|
* Using an external package allow to alias it in the bundle configuration (such as webpack).
|
|
13
11
|
* The alias allow hot reload the app (such as nextjs) on any dictionary change.
|
|
14
12
|
*/
|
|
15
|
-
const getUnmergedDictionaries = (configuration =
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const getUnmergedDictionaries = (configuration = {
|
|
14
|
+
system: _intlayer_config_built.system,
|
|
15
|
+
build: _intlayer_config_built.build
|
|
16
|
+
}) => {
|
|
17
|
+
const { system: system$1, build: build$1 } = configuration;
|
|
18
|
+
const dictionariesPath = (0, node_path.join)(system$1.mainDir, `unmerged_dictionaries.cjs`);
|
|
18
19
|
let dictionaries = {};
|
|
19
|
-
if ((0, node_fs.existsSync)(dictionariesPath)) dictionaries = (build.require ?? _intlayer_config_utils.configESMxCJSRequire)(dictionariesPath);
|
|
20
|
+
if ((0, node_fs.existsSync)(dictionariesPath)) dictionaries = (build$1.require ?? _intlayer_config_utils.configESMxCJSRequire)(dictionariesPath);
|
|
20
21
|
return dictionaries;
|
|
21
22
|
};
|
|
22
23
|
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["system","build","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 { 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 { 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: 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, `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,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,uCAAwBA,SAAO,SAAS,2BAA2B;CACzE,IAAI,eAAqD,CAAC;CAE1D,4BAAe,gBAAgB,GAC7B,gBAAgBC,QAAM,WAAWC,6CAAsB,gBAAgB;CAGzE,OAAO;AACT"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import
|
|
3
|
+
import { build, system } from "@intlayer/config/built";
|
|
4
4
|
import { configESMxCJSRequire } from "@intlayer/config/utils";
|
|
5
5
|
|
|
6
6
|
//#region src/index.ts
|
|
@@ -9,11 +9,14 @@ import { 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 getUnmergedDictionaries = (configuration =
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const getUnmergedDictionaries = (configuration = {
|
|
13
|
+
system,
|
|
14
|
+
build
|
|
15
|
+
}) => {
|
|
16
|
+
const { system: system$1, build: build$1 } = configuration;
|
|
17
|
+
const dictionariesPath = join(system$1.mainDir, `unmerged_dictionaries.cjs`);
|
|
15
18
|
let dictionaries = {};
|
|
16
|
-
if (existsSync(dictionariesPath)) dictionaries = (build.require ?? configESMxCJSRequire)(dictionariesPath);
|
|
19
|
+
if (existsSync(dictionariesPath)) dictionaries = (build$1.require ?? configESMxCJSRequire)(dictionariesPath);
|
|
17
20
|
return dictionaries;
|
|
18
21
|
};
|
|
19
22
|
|
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 {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["system","build"],"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 { 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 { 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: 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, `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,gBAA0D;CAAE;CAAQ;AAAM,MACvE;CACH,MAAM,EAAE,kBAAQ,mBAAU;CAG1B,MAAM,mBAAmB,KAAKA,SAAO,SAAS,2BAA2B;CACzE,IAAI,eAAqD,CAAC;CAE1D,IAAI,WAAW,gBAAgB,GAC7B,gBAAgBC,QAAM,WAAW,sBAAsB,gBAAgB;CAGzE,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/dynamic-dictionaries-entry",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.3",
|
|
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": [
|
|
@@ -78,16 +78,16 @@
|
|
|
78
78
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@intlayer/config": "8.11.
|
|
81
|
+
"@intlayer/config": "8.11.3"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@intlayer/types": "8.11.
|
|
84
|
+
"@intlayer/types": "8.11.3",
|
|
85
85
|
"@types/node": "25.9.1",
|
|
86
86
|
"@utils/ts-config": "1.0.4",
|
|
87
87
|
"@utils/ts-config-types": "1.0.4",
|
|
88
88
|
"@utils/tsdown-config": "1.0.4",
|
|
89
89
|
"rimraf": "6.1.3",
|
|
90
|
-
"tsdown": "0.22.
|
|
90
|
+
"tsdown": "0.22.1",
|
|
91
91
|
"typescript": "6.0.3",
|
|
92
92
|
"vitest": "4.1.7"
|
|
93
93
|
},
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
|
|
29
|
-
exports.__toESM = __toESM;
|