@intlayer/dictionaries-entry 5.3.10 → 5.3.12
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 +1 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index_browser.cjs +42 -0
- package/dist/cjs/index_browser.cjs.map +1 -0
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index_browser.mjs +11 -0
- package/dist/esm/index_browser.mjs.map +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index_browser.d.ts +9 -0
- package/dist/types/index_browser.d.ts.map +1 -0
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -21,14 +21,13 @@ __export(index_exports, {
|
|
|
21
21
|
default: () => index_default
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(index_exports);
|
|
24
|
+
var import_config = require("@intlayer/config");
|
|
24
25
|
var import_fs = require("fs");
|
|
25
26
|
var import_path = require("path");
|
|
26
|
-
var import_config = require("@intlayer/config");
|
|
27
27
|
let dictionaries = void 0;
|
|
28
28
|
const { content } = (0, import_config.getConfiguration)();
|
|
29
29
|
const dictionariesPath = (0, import_path.join)(content.mainDir, "dictionaries.cjs");
|
|
30
30
|
if ((0, import_fs.existsSync)(dictionariesPath)) {
|
|
31
|
-
(0, import_config.ESMxCJSRequire)(dictionariesPath);
|
|
32
31
|
dictionaries = (0, import_config.ESMxCJSRequire)(dictionariesPath);
|
|
33
32
|
}
|
|
34
33
|
var index_default = dictionaries ?? {};
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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 {
|
|
1
|
+
{"version":3,"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 { ESMxCJSRequire, getConfiguration } from '@intlayer/config';\nimport { existsSync } from 'fs';\nimport { join } from 'path';\n// @ts-ignore intlayer declared for module augmentation\nimport type { IntlayerDictionaryTypesConnector } from 'intlayer';\n\nlet dictionaries = undefined;\n\nconst { content } = getConfiguration();\nconst dictionariesPath = join(content.mainDir, 'dictionaries.cjs');\n\n// Test if the dictionaries file exists\nif (existsSync(dictionariesPath)) {\n dictionaries = ESMxCJSRequire(dictionariesPath);\n}\n\nexport default (dictionaries ?? {}) as Record<\n IntlayerDictionaryTypesConnector['key'],\n IntlayerDictionaryTypesConnector\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,oBAAiD;AACjD,gBAA2B;AAC3B,kBAAqB;AAIrB,IAAI,eAAe;AAEnB,MAAM,EAAE,QAAQ,QAAI,gCAAiB;AACrC,MAAM,uBAAmB,kBAAK,QAAQ,SAAS,kBAAkB;AAGjE,QAAI,sBAAW,gBAAgB,GAAG;AAChC,qBAAe,8BAAe,gBAAgB;AAChD;AAEA,IAAO,gBAAS,gBAAgB,CAAC;","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
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 __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var index_browser_exports = {};
|
|
30
|
+
__export(index_browser_exports, {
|
|
31
|
+
default: () => index_browser_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(index_browser_exports);
|
|
34
|
+
var import_built = __toESM(require("@intlayer/config/built"));
|
|
35
|
+
const import_meta = {};
|
|
36
|
+
const { content } = import_built.default;
|
|
37
|
+
const dictionariesPath = `${content.mainDir}/dictionaries.cjs`;
|
|
38
|
+
const filename = new URL(import_meta.url).pathname;
|
|
39
|
+
console.log({ dictionariesPath, filename, tESt: import_meta });
|
|
40
|
+
const dictionaries = require('.intlayer/main/dictionaries.cjs');
|
|
41
|
+
var index_browser_default = dictionaries ?? {};
|
|
42
|
+
//# sourceMappingURL=index_browser.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index_browser.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 configuration from '@intlayer/config/built';\n// @ts-ignore intlayer declared for module augmentation\nimport type { IntlayerDictionaryTypesConnector } from 'intlayer';\n\nconst { content } = configuration;\nconst dictionariesPath = `${content.mainDir}/dictionaries.cjs`;\n\nconst filename = new URL(import.meta.url).pathname;\nconsole.log({ dictionariesPath, filename, tESt: import.meta });\n\n// Test if the dictionaries file exists\nconst dictionaries = require('.intlayer/main/dictionaries.cjs');\n\nexport default (dictionaries ?? {}) as Record<\n IntlayerDictionaryTypesConnector['key'],\n IntlayerDictionaryTypesConnector\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,mBAA0B;AAN1B;AAUA,MAAM,EAAE,QAAQ,IAAI,aAAAA;AACpB,MAAM,mBAAmB,GAAG,QAAQ,OAAO;AAE3C,MAAM,WAAW,IAAI,IAAI,YAAY,GAAG,EAAE;AAC1C,QAAQ,IAAI,EAAE,kBAAkB,UAAU,MAAM,YAAY,CAAC;AAG7D,MAAM,eAAe,QAAQ,iCAAiC;AAE9D,IAAO,wBAAS,gBAAgB,CAAC;","names":["configuration"]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { ESMxCJSRequire, getConfiguration } from "@intlayer/config";
|
|
1
2
|
import { existsSync } from "fs";
|
|
2
3
|
import { join } from "path";
|
|
3
|
-
import { getConfiguration, ESMxCJSRequire } from "@intlayer/config";
|
|
4
4
|
let dictionaries = void 0;
|
|
5
5
|
const { content } = getConfiguration();
|
|
6
6
|
const dictionariesPath = join(content.mainDir, "dictionaries.cjs");
|
|
7
7
|
if (existsSync(dictionariesPath)) {
|
|
8
|
-
ESMxCJSRequire(dictionariesPath);
|
|
9
8
|
dictionaries = ESMxCJSRequire(dictionariesPath);
|
|
10
9
|
}
|
|
11
10
|
var index_default = dictionaries ?? {};
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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 {
|
|
1
|
+
{"version":3,"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 { ESMxCJSRequire, getConfiguration } from '@intlayer/config';\nimport { existsSync } from 'fs';\nimport { join } from 'path';\n// @ts-ignore intlayer declared for module augmentation\nimport type { IntlayerDictionaryTypesConnector } from 'intlayer';\n\nlet dictionaries = undefined;\n\nconst { content } = getConfiguration();\nconst dictionariesPath = join(content.mainDir, 'dictionaries.cjs');\n\n// Test if the dictionaries file exists\nif (existsSync(dictionariesPath)) {\n dictionaries = ESMxCJSRequire(dictionariesPath);\n}\n\nexport default (dictionaries ?? {}) as Record<\n IntlayerDictionaryTypesConnector['key'],\n IntlayerDictionaryTypesConnector\n>;\n"],"mappings":"AAMA,SAAS,gBAAgB,wBAAwB;AACjD,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AAIrB,IAAI,eAAe;AAEnB,MAAM,EAAE,QAAQ,IAAI,iBAAiB;AACrC,MAAM,mBAAmB,KAAK,QAAQ,SAAS,kBAAkB;AAGjE,IAAI,WAAW,gBAAgB,GAAG;AAChC,iBAAe,eAAe,gBAAgB;AAChD;AAEA,IAAO,gBAAS,gBAAgB,CAAC;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import configuration from "@intlayer/config/built";
|
|
2
|
+
const { content } = configuration;
|
|
3
|
+
const dictionariesPath = `${content.mainDir}/dictionaries.cjs`;
|
|
4
|
+
const filename = new URL(import.meta.url).pathname;
|
|
5
|
+
console.log({ dictionariesPath, filename, tESt: import.meta });
|
|
6
|
+
const dictionaries = require(".intlayer/main/dictionaries.cjs");
|
|
7
|
+
var index_browser_default = dictionaries ?? {};
|
|
8
|
+
export {
|
|
9
|
+
index_browser_default as default
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index_browser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index_browser.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 configuration from '@intlayer/config/built';\n// @ts-ignore intlayer declared for module augmentation\nimport type { IntlayerDictionaryTypesConnector } from 'intlayer';\n\nconst { content } = configuration;\nconst dictionariesPath = `${content.mainDir}/dictionaries.cjs`;\n\nconst filename = new URL(import.meta.url).pathname;\nconsole.log({ dictionariesPath, filename, tESt: import.meta });\n\n// Test if the dictionaries file exists\nconst dictionaries = require('.intlayer/main/dictionaries.cjs');\n\nexport default (dictionaries ?? {}) as Record<\n IntlayerDictionaryTypesConnector['key'],\n IntlayerDictionaryTypesConnector\n>;\n"],"mappings":"AAMA,OAAO,mBAAmB;AAI1B,MAAM,EAAE,QAAQ,IAAI;AACpB,MAAM,mBAAmB,GAAG,QAAQ,OAAO;AAE3C,MAAM,WAAW,IAAI,IAAI,YAAY,GAAG,EAAE;AAC1C,QAAQ,IAAI,EAAE,kBAAkB,UAAU,MAAM,YAAY,CAAC;AAG7D,MAAM,eAAe,QAAQ,iCAAiC;AAE9D,IAAO,wBAAS,gBAAgB,CAAC;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;wBAY1B,MAAM,CAC3C,gCAAgC,CAAC,KAAK,CAAC,EACvC,gCAAgC,CACjC;AAHD,wBAGE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @intlayer/dictionaries-entry is a package that only returns the dictionary entry file.
|
|
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 { IntlayerDictionaryTypesConnector } from 'intlayer';
|
|
7
|
+
declare const _default: Record<IntlayerDictionaryTypesConnector["key"], IntlayerDictionaryTypesConnector>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=index_browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index_browser.d.ts","sourceRoot":"","sources":["../../src/index_browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;wBAW1B,MAAM,CAC3C,gCAAgC,CAAC,KAAK,CAAC,EACvC,gCAAgC,CACjC;AAHD,wBAGE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/dictionaries-entry",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Provides the entry path for Intlayer 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.3.
|
|
56
|
+
"@intlayer/config": "5.3.12"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "^22.13.10",
|
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
"tsup": "^8.4.0",
|
|
67
67
|
"typescript": "^5.8.2",
|
|
68
68
|
"@utils/ts-config": "1.0.4",
|
|
69
|
-
"@utils/ts-config-types": "1.0.4",
|
|
70
69
|
"@utils/eslint-config": "1.0.4",
|
|
70
|
+
"@utils/ts-config-types": "1.0.4",
|
|
71
71
|
"@utils/tsup-config": "1.0.4"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@intlayer/config": "5.3.
|
|
75
|
-
"intlayer": "5.3.
|
|
74
|
+
"@intlayer/config": "5.3.12",
|
|
75
|
+
"intlayer": "5.3.12"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": ">=14.18"
|