@intlayer/config 6.1.6 → 7.0.0-canary.1
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/_virtual/rolldown_runtime.cjs +34 -0
- package/dist/cjs/alias.cjs +27 -100
- package/dist/cjs/alias.cjs.map +1 -1
- package/dist/cjs/built.cjs +7 -25
- package/dist/cjs/built.cjs.map +1 -1
- package/dist/cjs/bundleJSFile.cjs +30 -51
- package/dist/cjs/bundleJSFile.cjs.map +1 -1
- package/dist/cjs/client.cjs +19 -52
- package/dist/cjs/configFile/buildConfigurationFields.cjs +100 -657
- package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
- package/dist/cjs/configFile/getConfiguration.cjs +60 -114
- package/dist/cjs/configFile/getConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/index.cjs +8 -25
- package/dist/cjs/configFile/loadConfigurationFile.cjs +22 -47
- package/dist/cjs/configFile/loadConfigurationFile.cjs.map +1 -1
- package/dist/cjs/configFile/searchConfigurationFile.cjs +49 -55
- package/dist/cjs/configFile/searchConfigurationFile.cjs.map +1 -1
- package/dist/cjs/defaultValues/build.cjs +23 -35
- package/dist/cjs/defaultValues/build.cjs.map +1 -1
- package/dist/cjs/defaultValues/content.cjs +68 -70
- package/dist/cjs/defaultValues/content.cjs.map +1 -1
- package/dist/cjs/defaultValues/editor.cjs +29 -41
- package/dist/cjs/defaultValues/editor.cjs.map +1 -1
- package/dist/cjs/defaultValues/index.cjs +62 -0
- package/dist/cjs/defaultValues/index.cjs.map +1 -0
- package/dist/cjs/defaultValues/internationalization.cjs +23 -34
- package/dist/cjs/defaultValues/internationalization.cjs.map +1 -1
- package/dist/cjs/defaultValues/log.cjs +17 -29
- package/dist/cjs/defaultValues/log.cjs.map +1 -1
- package/dist/cjs/defaultValues/routing.cjs +38 -0
- package/dist/cjs/defaultValues/routing.cjs.map +1 -0
- package/dist/cjs/extractErrorMessage.cjs +95 -0
- package/dist/cjs/extractErrorMessage.cjs.map +1 -0
- package/dist/cjs/index.cjs +67 -98
- package/dist/cjs/loadEnvFile.cjs +30 -51
- package/dist/cjs/loadEnvFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/bundleFile.cjs +74 -0
- package/dist/cjs/loadExternalFile/bundleFile.cjs.map +1 -0
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs +86 -0
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs.map +1 -0
- package/dist/cjs/loadExternalFile/parseFileContent.cjs +67 -0
- package/dist/cjs/loadExternalFile/parseFileContent.cjs.map +1 -0
- package/dist/cjs/loadExternalFile/transpileTSToMJS.cjs +60 -0
- package/dist/cjs/loadExternalFile/transpileTSToMJS.cjs.map +1 -0
- package/dist/cjs/logger.cjs +124 -152
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/cjs/package.cjs +12 -0
- package/dist/cjs/package.cjs.map +1 -0
- package/dist/cjs/retryManager.cjs +42 -49
- package/dist/cjs/retryManager.cjs.map +1 -1
- package/dist/cjs/utils/ESMxCJSHelpers.cjs +24 -33
- package/dist/cjs/utils/ESMxCJSHelpers.cjs.map +1 -1
- package/dist/cjs/utils/cache.cjs +426 -0
- package/dist/cjs/utils/cache.cjs.map +1 -0
- package/dist/cjs/utils/clearModuleCache.cjs +23 -46
- package/dist/cjs/utils/clearModuleCache.cjs.map +1 -1
- package/dist/cjs/utils/extractErrorMessage.cjs +95 -0
- package/dist/cjs/utils/extractErrorMessage.cjs.map +1 -0
- package/dist/cjs/utils/getExtension.cjs +12 -35
- package/dist/cjs/utils/getExtension.cjs.map +1 -1
- package/dist/cjs/utils/getPackageJsonPath.cjs +37 -0
- package/dist/cjs/utils/getPackageJsonPath.cjs.map +1 -0
- package/dist/cjs/utils/logStack.cjs +16 -0
- package/dist/cjs/utils/logStack.cjs.map +1 -0
- package/dist/cjs/utils/normalizePath.cjs +15 -27
- package/dist/cjs/utils/normalizePath.cjs.map +1 -1
- package/dist/esm/_virtual/rolldown_runtime.mjs +17 -0
- package/dist/esm/alias.mjs +23 -74
- package/dist/esm/alias.mjs.map +1 -1
- package/dist/esm/built.mjs +5 -3
- package/dist/esm/built.mjs.map +1 -1
- package/dist/esm/bundleJSFile.mjs +26 -25
- package/dist/esm/bundleJSFile.mjs.map +1 -1
- package/dist/esm/client.mjs +4 -31
- package/dist/esm/configFile/buildConfigurationFields.mjs +97 -674
- package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
- package/dist/esm/configFile/getConfiguration.mjs +52 -75
- package/dist/esm/configFile/getConfiguration.mjs.map +1 -1
- package/dist/esm/configFile/index.mjs +5 -3
- package/dist/esm/configFile/loadConfigurationFile.mjs +22 -23
- package/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -1
- package/dist/esm/configFile/searchConfigurationFile.mjs +45 -30
- package/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -1
- package/dist/esm/defaultValues/build.mjs +16 -11
- package/dist/esm/defaultValues/build.mjs.map +1 -1
- package/dist/esm/defaultValues/content.mjs +48 -34
- package/dist/esm/defaultValues/content.mjs.map +1 -1
- package/dist/esm/defaultValues/editor.mjs +17 -11
- package/dist/esm/defaultValues/editor.mjs.map +1 -1
- package/dist/esm/defaultValues/index.mjs +21 -0
- package/dist/esm/defaultValues/index.mjs.map +1 -0
- package/dist/esm/defaultValues/internationalization.mjs +13 -7
- package/dist/esm/defaultValues/internationalization.mjs.map +1 -1
- package/dist/esm/defaultValues/log.mjs +10 -4
- package/dist/esm/defaultValues/log.mjs.map +1 -1
- package/dist/esm/defaultValues/routing.mjs +25 -0
- package/dist/esm/defaultValues/routing.mjs.map +1 -0
- package/dist/esm/extractErrorMessage.mjs +94 -0
- package/dist/esm/extractErrorMessage.mjs.map +1 -0
- package/dist/esm/index.mjs +18 -61
- package/dist/esm/loadEnvFile.mjs +27 -17
- package/dist/esm/loadEnvFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/bundleFile.mjs +68 -0
- package/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -0
- package/dist/esm/loadExternalFile/loadExternalFile.mjs +81 -0
- package/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -0
- package/dist/esm/loadExternalFile/parseFileContent.mjs +63 -0
- package/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -0
- package/dist/esm/loadExternalFile/transpileTSToMJS.mjs +55 -0
- package/dist/esm/loadExternalFile/transpileTSToMJS.mjs.map +1 -0
- package/dist/esm/logger.mjs +110 -115
- package/dist/esm/logger.mjs.map +1 -1
- package/dist/esm/package.mjs +6 -0
- package/dist/esm/package.mjs.map +1 -0
- package/dist/esm/retryManager.mjs +40 -23
- package/dist/esm/retryManager.mjs.map +1 -1
- package/dist/esm/utils/ESMxCJSHelpers.mjs +20 -6
- package/dist/esm/utils/ESMxCJSHelpers.mjs.map +1 -1
- package/dist/esm/utils/cache.mjs +414 -0
- package/dist/esm/utils/cache.mjs.map +1 -0
- package/dist/esm/utils/clearModuleCache.mjs +22 -21
- package/dist/esm/utils/clearModuleCache.mjs.map +1 -1
- package/dist/esm/utils/extractErrorMessage.mjs +94 -0
- package/dist/esm/utils/extractErrorMessage.mjs.map +1 -0
- package/dist/esm/utils/getExtension.mjs +11 -11
- package/dist/esm/utils/getExtension.mjs.map +1 -1
- package/dist/esm/utils/getPackageJsonPath.mjs +33 -0
- package/dist/esm/utils/getPackageJsonPath.mjs.map +1 -0
- package/dist/esm/utils/logStack.mjs +16 -0
- package/dist/esm/utils/logStack.mjs.map +1 -0
- package/dist/esm/utils/normalizePath.mjs +14 -3
- package/dist/esm/utils/normalizePath.mjs.map +1 -1
- package/dist/types/alias.d.ts +20 -12
- package/dist/types/alias.d.ts.map +1 -1
- package/dist/types/built.d.ts +7 -6
- package/dist/types/built.d.ts.map +1 -1
- package/dist/types/bundleJSFile.d.ts +97 -93
- package/dist/types/bundleJSFile.d.ts.map +1 -1
- package/dist/types/client.d.ts +3 -5
- package/dist/types/configFile/buildConfigurationFields.d.ts +7 -2
- package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
- package/dist/types/configFile/getConfiguration.d.ts +19 -15
- package/dist/types/configFile/getConfiguration.d.ts.map +1 -1
- package/dist/types/configFile/index.d.ts +4 -3
- package/dist/types/configFile/loadConfigurationFile.d.ts +8 -3
- package/dist/types/configFile/loadConfigurationFile.d.ts.map +1 -1
- package/dist/types/configFile/searchConfigurationFile.d.ts +6 -4
- package/dist/types/configFile/searchConfigurationFile.d.ts.map +1 -1
- package/dist/types/defaultValues/build.d.ts +10 -4
- package/dist/types/defaultValues/build.d.ts.map +1 -1
- package/dist/types/defaultValues/content.d.ts +23 -16
- package/dist/types/defaultValues/content.d.ts.map +1 -1
- package/dist/types/defaultValues/editor.d.ts +14 -9
- package/dist/types/defaultValues/editor.d.ts.map +1 -1
- package/dist/types/defaultValues/index.d.ts +14 -0
- package/dist/types/defaultValues/index.d.ts.map +1 -0
- package/dist/types/defaultValues/internationalization.d.ts +12 -6
- package/dist/types/defaultValues/internationalization.d.ts.map +1 -1
- package/dist/types/defaultValues/log.d.ts +7 -2
- package/dist/types/defaultValues/log.d.ts.map +1 -1
- package/dist/types/defaultValues/routing.d.ts +14 -0
- package/dist/types/defaultValues/routing.d.ts.map +1 -0
- package/dist/types/extractErrorMessage.d.ts +5 -0
- package/dist/types/extractErrorMessage.d.ts.map +1 -0
- package/dist/types/index.d.ts +21 -17
- package/dist/types/loadEnvFile.d.ts +8 -5
- package/dist/types/loadEnvFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/bundleFile.d.ts +10 -0
- package/dist/types/loadExternalFile/bundleFile.d.ts.map +1 -0
- package/dist/types/loadExternalFile/loadExternalFile.d.ts +25 -0
- package/dist/types/loadExternalFile/loadExternalFile.d.ts.map +1 -0
- package/dist/types/loadExternalFile/parseFileContent.d.ts +29 -0
- package/dist/types/loadExternalFile/parseFileContent.d.ts.map +1 -0
- package/dist/types/loadExternalFile/transpileTSToMJS.d.ts +9 -0
- package/dist/types/loadExternalFile/transpileTSToMJS.d.ts.map +1 -0
- package/dist/types/logger.d.ts +41 -37
- package/dist/types/logger.d.ts.map +1 -1
- package/dist/types/retryManager.d.ts +26 -8
- package/dist/types/retryManager.d.ts.map +1 -1
- package/dist/types/utils/ESMxCJSHelpers.d.ts +16 -2
- package/dist/types/utils/ESMxCJSHelpers.d.ts.map +1 -1
- package/dist/types/utils/cache.d.ts +50 -0
- package/dist/types/utils/cache.d.ts.map +1 -0
- package/dist/types/utils/clearModuleCache.d.ts +4 -1
- package/dist/types/utils/clearModuleCache.d.ts.map +1 -1
- package/dist/types/utils/extractErrorMessage.d.ts +5 -0
- package/dist/types/utils/extractErrorMessage.d.ts.map +1 -0
- package/dist/types/utils/getExtension.d.ts +6 -2
- package/dist/types/utils/getExtension.d.ts.map +1 -1
- package/dist/types/utils/getPackageJsonPath.d.ts +10 -0
- package/dist/types/utils/getPackageJsonPath.d.ts.map +1 -0
- package/dist/types/utils/logStack.d.ts +7 -0
- package/dist/types/utils/logStack.d.ts.map +1 -0
- package/dist/types/utils/normalizePath.d.ts +4 -1
- package/dist/types/utils/normalizePath.d.ts.map +1 -1
- package/package.json +40 -35
- package/LICENSE +0 -202
- package/dist/cjs/client.cjs.map +0 -1
- package/dist/cjs/configFile/index.cjs.map +0 -1
- package/dist/cjs/defaultValues/middleware.cjs +0 -47
- package/dist/cjs/defaultValues/middleware.cjs.map +0 -1
- package/dist/cjs/getSandboxContext.cjs +0 -64
- package/dist/cjs/getSandboxContext.cjs.map +0 -1
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/loadExternalFile.cjs +0 -105
- package/dist/cjs/loadExternalFile.cjs.map +0 -1
- package/dist/cjs/types/config.cjs +0 -17
- package/dist/cjs/types/config.cjs.map +0 -1
- package/dist/cjs/types/locales.cjs +0 -310
- package/dist/cjs/types/locales.cjs.map +0 -1
- package/dist/esm/client.mjs.map +0 -1
- package/dist/esm/configFile/index.mjs.map +0 -1
- package/dist/esm/defaultValues/middleware.mjs +0 -17
- package/dist/esm/defaultValues/middleware.mjs.map +0 -1
- package/dist/esm/getSandboxContext.mjs +0 -40
- package/dist/esm/getSandboxContext.mjs.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/loadExternalFile.mjs +0 -81
- package/dist/esm/loadExternalFile.mjs.map +0 -1
- package/dist/esm/types/config.mjs +0 -1
- package/dist/esm/types/config.mjs.map +0 -1
- package/dist/esm/types/locales.mjs +0 -286
- package/dist/esm/types/locales.mjs.map +0 -1
- package/dist/types/client.d.ts.map +0 -1
- package/dist/types/configFile/index.d.ts.map +0 -1
- package/dist/types/defaultValues/middleware.d.ts +0 -8
- package/dist/types/defaultValues/middleware.d.ts.map +0 -1
- package/dist/types/getSandboxContext.d.ts +0 -4
- package/dist/types/getSandboxContext.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/loadExternalFile.d.ts +0 -8
- package/dist/types/loadExternalFile.d.ts.map +0 -1
- package/dist/types/types/config.d.ts +0 -659
- package/dist/types/types/config.d.ts.map +0 -1
- package/dist/types/types/locales.d.ts +0 -564
- package/dist/types/types/locales.d.ts.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
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 = (all) => {
|
|
9
|
+
let target = {};
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
18
|
+
key = keys[i];
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
20
|
+
get: ((k) => from[k]).bind(null, key),
|
|
21
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
value: mod,
|
|
28
|
+
enumerable: true
|
|
29
|
+
}) : target, mod));
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
|
|
33
|
+
exports.__export = __export;
|
|
34
|
+
exports.__toESM = __toESM;
|
package/dist/cjs/alias.cjs
CHANGED
|
@@ -1,102 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils_getExtension = require('./utils/getExtension.cjs');
|
|
3
|
+
const require_utils_normalizePath = require('./utils/normalizePath.cjs');
|
|
4
|
+
let node_path = require("node:path");
|
|
5
|
+
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
6
|
+
|
|
7
|
+
//#region src/alias.ts
|
|
8
|
+
const getAlias = ({ configuration, format = "esm", formatter = (value) => value }) => {
|
|
9
|
+
const extension = require_utils_getExtension.getExtension(configuration, format);
|
|
10
|
+
const { mainDir, configDir, baseDir } = configuration.content;
|
|
11
|
+
const fixedDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `dictionaries.${extension}`))));
|
|
12
|
+
const fixedUnmergedDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `unmerged_dictionaries.${extension}`))));
|
|
13
|
+
const fixedRemoteDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `remote_dictionaries.${extension}`))));
|
|
14
|
+
const fixedDynamicDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `dynamic_dictionaries.${extension}`))));
|
|
15
|
+
const fixedFetchDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `fetch_dictionaries.${extension}`))));
|
|
16
|
+
const fixedConfigurationPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(configDir, `configuration.json`))));
|
|
17
|
+
return {
|
|
18
|
+
"@intlayer/dictionaries-entry": fixedDictionariesPath,
|
|
19
|
+
"@intlayer/unmerged-dictionaries-entry": fixedUnmergedDictionariesPath,
|
|
20
|
+
"@intlayer/remote-dictionaries-entry": fixedRemoteDictionariesPath,
|
|
21
|
+
"@intlayer/dynamic-dictionaries-entry": fixedDynamicDictionariesPath,
|
|
22
|
+
"@intlayer/fetch-dictionaries-entry": fixedFetchDictionariesPath,
|
|
23
|
+
"@intlayer/config/built": fixedConfigurationPath
|
|
24
|
+
};
|
|
9
25
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var alias_exports = {};
|
|
20
|
-
__export(alias_exports, {
|
|
21
|
-
getAlias: () => getAlias
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(alias_exports);
|
|
24
|
-
var import_path = require("path");
|
|
25
|
-
var import_getConfiguration = require('./configFile/getConfiguration.cjs');
|
|
26
|
-
var import_getExtension = require('./utils/getExtension.cjs');
|
|
27
|
-
var import_normalizePath = require('./utils/normalizePath.cjs');
|
|
28
|
-
const getAlias = ({
|
|
29
|
-
configuration = (0, import_getConfiguration.getConfiguration)(),
|
|
30
|
-
format = "esm",
|
|
31
|
-
formatter = (value) => value
|
|
32
|
-
} = {}) => {
|
|
33
|
-
const extension = (0, import_getExtension.getExtension)(configuration, format);
|
|
34
|
-
const { mainDir, configDir, baseDir } = configuration.content;
|
|
35
|
-
const dictionariesPath = (0, import_path.join)(mainDir, `dictionaries.${extension}`);
|
|
36
|
-
const relativeDictionariesPath = (0, import_path.relative)(baseDir, dictionariesPath);
|
|
37
|
-
const normalizedDictionariesPath = formatter(
|
|
38
|
-
(0, import_normalizePath.normalizePath)(relativeDictionariesPath)
|
|
39
|
-
);
|
|
40
|
-
const unmergedDictionariesPath = (0, import_path.join)(
|
|
41
|
-
mainDir,
|
|
42
|
-
`unmerged_dictionaries.${extension}`
|
|
43
|
-
);
|
|
44
|
-
const relativeUnmergedDictionariesPath = (0, import_path.relative)(
|
|
45
|
-
baseDir,
|
|
46
|
-
unmergedDictionariesPath
|
|
47
|
-
);
|
|
48
|
-
const normalizedUnmergedDictionariesPath = formatter(
|
|
49
|
-
(0, import_normalizePath.normalizePath)(relativeUnmergedDictionariesPath)
|
|
50
|
-
);
|
|
51
|
-
const remoteDictionariesPath = (0, import_path.join)(
|
|
52
|
-
mainDir,
|
|
53
|
-
`remote_dictionaries.${extension}`
|
|
54
|
-
);
|
|
55
|
-
const relativeRemoteDictionariesPath = (0, import_path.relative)(
|
|
56
|
-
baseDir,
|
|
57
|
-
remoteDictionariesPath
|
|
58
|
-
);
|
|
59
|
-
const normalizedRemoteDictionariesPath = formatter(
|
|
60
|
-
(0, import_normalizePath.normalizePath)(relativeRemoteDictionariesPath)
|
|
61
|
-
);
|
|
62
|
-
const dynamicDictionariesPath = (0, import_path.join)(
|
|
63
|
-
mainDir,
|
|
64
|
-
`dynamic_dictionaries.${extension}`
|
|
65
|
-
);
|
|
66
|
-
const relativeDynamicDictionariesPath = (0, import_path.relative)(
|
|
67
|
-
baseDir,
|
|
68
|
-
dynamicDictionariesPath
|
|
69
|
-
);
|
|
70
|
-
const normalizedDynamicDictionariesPath = formatter(
|
|
71
|
-
(0, import_normalizePath.normalizePath)(relativeDynamicDictionariesPath)
|
|
72
|
-
);
|
|
73
|
-
const fetchDictionariesPath = (0, import_path.join)(
|
|
74
|
-
mainDir,
|
|
75
|
-
`fetch_dictionaries.${extension}`
|
|
76
|
-
);
|
|
77
|
-
const relativeFetchDictionariesPath = (0, import_path.relative)(
|
|
78
|
-
baseDir,
|
|
79
|
-
fetchDictionariesPath
|
|
80
|
-
);
|
|
81
|
-
const normalizedFetchDictionariesPath = formatter(
|
|
82
|
-
(0, import_normalizePath.normalizePath)(relativeFetchDictionariesPath)
|
|
83
|
-
);
|
|
84
|
-
const configurationPath = (0, import_path.join)(configDir, `configuration.json`);
|
|
85
|
-
const relativeConfigurationPath = (0, import_path.relative)(baseDir, configurationPath);
|
|
86
|
-
const normalizedConfigurationPath = formatter(
|
|
87
|
-
(0, import_normalizePath.normalizePath)(relativeConfigurationPath)
|
|
88
|
-
);
|
|
89
|
-
return {
|
|
90
|
-
"@intlayer/dictionaries-entry": normalizedDictionariesPath,
|
|
91
|
-
"@intlayer/unmerged-dictionaries-entry": normalizedUnmergedDictionariesPath,
|
|
92
|
-
"@intlayer/remote-dictionaries-entry": normalizedRemoteDictionariesPath,
|
|
93
|
-
"@intlayer/dynamic-dictionaries-entry": normalizedDynamicDictionariesPath,
|
|
94
|
-
"@intlayer/fetch-dictionaries-entry": normalizedFetchDictionariesPath,
|
|
95
|
-
"@intlayer/config/built": normalizedConfigurationPath
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
-
0 && (module.exports = {
|
|
100
|
-
getAlias
|
|
101
|
-
});
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.getAlias = getAlias;
|
|
102
29
|
//# sourceMappingURL=alias.cjs.map
|
package/dist/cjs/alias.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/alias.ts"],"sourcesContent":["import { join, relative } from 'path';\nimport
|
|
1
|
+
{"version":3,"file":"alias.cjs","names":["getExtension","normalizePath"],"sources":["../../src/alias.ts"],"sourcesContent":["import { join, relative } from 'node:path';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { getExtension } from './utils/getExtension';\nimport { normalizePath } from './utils/normalizePath';\n\nexport type GetAliasOptions = {\n configuration: IntlayerConfig;\n format?: 'esm' | 'cjs';\n formatter?: (value: string) => string;\n};\n\nexport const getAlias = ({\n configuration,\n format = 'esm',\n formatter = (value: string) => value,\n}: GetAliasOptions) => {\n const extension = getExtension(configuration, format);\n\n const { mainDir, configDir, baseDir } = configuration.content;\n\n /**\n * Dictionaries\n */\n const dictionariesPath = join(mainDir, `dictionaries.${extension}`);\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n const fixedDictionariesPath = formatter(\n normalizePath(relativeDictionariesPath)\n );\n\n /**\n * Unmerged dictionaries\n */\n const unmergedDictionariesPath = join(\n mainDir,\n `unmerged_dictionaries.${extension}`\n );\n const relativeUnmergedDictionariesPath = relative(\n baseDir,\n unmergedDictionariesPath\n );\n const fixedUnmergedDictionariesPath = formatter(\n normalizePath(relativeUnmergedDictionariesPath)\n );\n\n /**\n * Remote dictionaries\n */\n const remoteDictionariesPath = join(\n mainDir,\n `remote_dictionaries.${extension}`\n );\n const relativeRemoteDictionariesPath = relative(\n baseDir,\n remoteDictionariesPath\n );\n const fixedRemoteDictionariesPath = formatter(\n normalizePath(relativeRemoteDictionariesPath)\n );\n\n /**\n * Dynamic dictionaries\n */\n const dynamicDictionariesPath = join(\n mainDir,\n `dynamic_dictionaries.${extension}`\n );\n const relativeDynamicDictionariesPath = relative(\n baseDir,\n dynamicDictionariesPath\n );\n const fixedDynamicDictionariesPath = formatter(\n normalizePath(relativeDynamicDictionariesPath)\n );\n\n /**\n * Fetch dictionaries\n */\n const fetchDictionariesPath = join(\n mainDir,\n `fetch_dictionaries.${extension}`\n );\n const relativeFetchDictionariesPath = relative(\n baseDir,\n fetchDictionariesPath\n );\n const fixedFetchDictionariesPath = formatter(\n normalizePath(relativeFetchDictionariesPath)\n );\n\n /**\n * Configuration\n */\n const configurationPath = join(configDir, `configuration.json`);\n const relativeConfigurationPath = relative(baseDir, configurationPath);\n const fixedConfigurationPath = formatter(\n normalizePath(relativeConfigurationPath)\n );\n\n return {\n '@intlayer/dictionaries-entry': fixedDictionariesPath,\n '@intlayer/unmerged-dictionaries-entry': fixedUnmergedDictionariesPath,\n '@intlayer/remote-dictionaries-entry': fixedRemoteDictionariesPath,\n '@intlayer/dynamic-dictionaries-entry': fixedDynamicDictionariesPath,\n '@intlayer/fetch-dictionaries-entry': fixedFetchDictionariesPath,\n '@intlayer/config/built': fixedConfigurationPath,\n };\n};\n"],"mappings":";;;;;;;AAWA,MAAa,YAAY,EACvB,eACA,SAAS,OACT,aAAa,UAAkB,YACV;CACrB,MAAM,YAAYA,wCAAa,eAAe,OAAO;CAErD,MAAM,EAAE,SAAS,WAAW,YAAY,cAAc;CAOtD,MAAM,wBAAwB,UAC5BC,kEAFwC,6BADZ,SAAS,gBAAgB,YAAY,CACC,CAE3B,CACxC;CAaD,MAAM,gCAAgC,UACpCA,kEAJA,6BAJA,SACA,yBAAyB,YAC1B,CAIA,CAEgD,CAChD;CAaD,MAAM,8BAA8B,UAClCA,kEAJA,6BAJA,SACA,uBAAuB,YACxB,CAIA,CAE8C,CAC9C;CAaD,MAAM,+BAA+B,UACnCA,kEAJA,6BAJA,SACA,wBAAwB,YACzB,CAIA,CAE+C,CAC/C;CAaD,MAAM,6BAA6B,UACjCA,kEAJA,6BAJA,SACA,sBAAsB,YACvB,CAIA,CAE6C,CAC7C;CAOD,MAAM,yBAAyB,UAC7BA,kEAFyC,6BADZ,WAAW,qBAAqB,CACO,CAE5B,CACzC;AAED,QAAO;EACL,gCAAgC;EAChC,yCAAyC;EACzC,uCAAuC;EACvC,wCAAwC;EACxC,sCAAsC;EACtC,0BAA0B;EAC3B"}
|
package/dist/cjs/built.cjs
CHANGED
|
@@ -1,27 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var built_exports = {};
|
|
20
|
-
__export(built_exports, {
|
|
21
|
-
default: () => built_default
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(built_exports);
|
|
24
|
-
var import_getConfiguration = require('./configFile/getConfiguration.cjs');
|
|
25
|
-
const configuration = (0, import_getConfiguration.getConfiguration)();
|
|
1
|
+
const require_configFile_getConfiguration = require('./configFile/getConfiguration.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/built.ts
|
|
4
|
+
const configuration = require_configFile_getConfiguration.getConfiguration();
|
|
26
5
|
var built_default = configuration;
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
module.exports = built_default;
|
|
27
9
|
//# sourceMappingURL=built.cjs.map
|
package/dist/cjs/built.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/built.ts"],"sourcesContent":["/**\n * @intlayer/config/built is a package that only returns the configuration file as a JSON object.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n */\n\nimport { getConfiguration } from './configFile/getConfiguration';\n\nconst configuration = getConfiguration();\n\nexport default configuration;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"built.cjs","names":["configuration: IntlayerConfig","getConfiguration"],"sources":["../../src/built.ts"],"sourcesContent":["/**\n * @intlayer/config/built is a package that only returns the configuration file as a JSON object.\n * Using an external package allow to alias it in the bundle configuration (such as webpack).\n */\n\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { getConfiguration } from './configFile/getConfiguration';\n\nconst configuration: IntlayerConfig = getConfiguration();\n\nexport default configuration;\n"],"mappings":";;;AAQA,MAAMA,gBAAgCC,sDAAkB;AAExD,oBAAe"}
|
|
@@ -1,55 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var bundleJSFile_exports = {};
|
|
20
|
-
__export(bundleJSFile_exports, {
|
|
21
|
-
bundleJSFile: () => bundleJSFile
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(bundleJSFile_exports);
|
|
24
|
-
var import_esbuild = require("esbuild");
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let esbuild = require("esbuild");
|
|
3
|
+
esbuild = require_rolldown_runtime.__toESM(esbuild);
|
|
4
|
+
|
|
5
|
+
//#region src/bundleJSFile.ts
|
|
25
6
|
const commonBuildOptions = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
7
|
+
bundle: true,
|
|
8
|
+
format: "cjs",
|
|
9
|
+
platform: "node",
|
|
10
|
+
target: "es2019",
|
|
11
|
+
sourcemap: false,
|
|
12
|
+
logLevel: "silent",
|
|
13
|
+
write: true,
|
|
14
|
+
packages: "external",
|
|
15
|
+
loader: {
|
|
16
|
+
".js": "js",
|
|
17
|
+
".jsx": "jsx",
|
|
18
|
+
".mjs": "js",
|
|
19
|
+
".ts": "ts",
|
|
20
|
+
".tsx": "tsx",
|
|
21
|
+
".cjs": "js",
|
|
22
|
+
".json": "json",
|
|
23
|
+
".md": "text",
|
|
24
|
+
".mdx": "text"
|
|
25
|
+
}
|
|
46
26
|
};
|
|
47
|
-
const bundleJSFile = async (buildOptions) => await (0,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
});
|
|
51
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
-
0 && (module.exports = {
|
|
53
|
-
bundleJSFile
|
|
27
|
+
const bundleJSFile = async (buildOptions) => await (0, esbuild.build)({
|
|
28
|
+
...commonBuildOptions,
|
|
29
|
+
...buildOptions
|
|
54
30
|
});
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.bundleJSFile = bundleJSFile;
|
|
55
34
|
//# sourceMappingURL=bundleJSFile.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/bundleJSFile.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"bundleJSFile.cjs","names":[],"sources":["../../src/bundleJSFile.ts"],"sourcesContent":["import { type BuildOptions, build } from 'esbuild';\n\nconst commonBuildOptions = {\n bundle: true,\n format: 'cjs',\n platform: 'node',\n target: 'es2019',\n sourcemap: false,\n logLevel: 'silent',\n write: true,\n // Bundle relative/local files, but keep bare module imports external\n packages: 'external',\n loader: {\n '.js': 'js',\n '.jsx': 'jsx',\n '.mjs': 'js',\n '.ts': 'ts',\n '.tsx': 'tsx',\n '.cjs': 'js',\n '.json': 'json',\n '.md': 'text',\n '.mdx': 'text',\n },\n} as const;\n\nexport const bundleJSFile = async (buildOptions: BuildOptions) =>\n await build({\n ...commonBuildOptions,\n ...buildOptions,\n });\n"],"mappings":";;;;;AAEA,MAAM,qBAAqB;CACzB,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,WAAW;CACX,UAAU;CACV,OAAO;CAEP,UAAU;CACV,QAAQ;EACN,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,SAAS;EACT,OAAO;EACP,QAAQ;EACT;CACF;AAED,MAAa,eAAe,OAAO,iBACjC,yBAAY;CACV,GAAG;CACH,GAAG;CACJ,CAAC"}
|
package/dist/cjs/client.cjs
CHANGED
|
@@ -1,54 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
1
|
+
const require_logger = require('./logger.cjs');
|
|
2
|
+
const require_defaultValues_index = require('./defaultValues/index.cjs');
|
|
3
|
+
|
|
4
|
+
exports.ANSIColors = require_logger.ANSIColors;
|
|
5
|
+
Object.defineProperty(exports, 'DefaultValues', {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function () {
|
|
8
|
+
return require_defaultValues_index.defaultValues_exports;
|
|
15
9
|
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var client_exports = {};
|
|
20
|
-
__export(client_exports, {
|
|
21
|
-
ANSIColors: () => import_logger.ANSIColors,
|
|
22
|
-
Locales: () => import_locales.Locales,
|
|
23
|
-
clock: () => import_logger.clock,
|
|
24
|
-
colon: () => import_logger.colon,
|
|
25
|
-
colorizeKey: () => import_logger.colorizeKey,
|
|
26
|
-
colorizeLocales: () => import_logger.colorizeLocales,
|
|
27
|
-
colorizeNumber: () => import_logger.colorizeNumber,
|
|
28
|
-
colorizePath: () => import_logger.colorizePath,
|
|
29
|
-
getAppLogger: () => import_logger.getAppLogger,
|
|
30
|
-
logger: () => import_logger.logger,
|
|
31
|
-
spinnerFrames: () => import_logger.spinnerFrames,
|
|
32
|
-
v: () => import_logger.v,
|
|
33
|
-
x: () => import_logger.x
|
|
34
10
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
colorizeNumber,
|
|
47
|
-
colorizePath,
|
|
48
|
-
getAppLogger,
|
|
49
|
-
logger,
|
|
50
|
-
spinnerFrames,
|
|
51
|
-
v,
|
|
52
|
-
x
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=client.cjs.map
|
|
11
|
+
exports.clock = require_logger.clock;
|
|
12
|
+
exports.colon = require_logger.colon;
|
|
13
|
+
exports.colorizeKey = require_logger.colorizeKey;
|
|
14
|
+
exports.colorizeLocales = require_logger.colorizeLocales;
|
|
15
|
+
exports.colorizeNumber = require_logger.colorizeNumber;
|
|
16
|
+
exports.colorizePath = require_logger.colorizePath;
|
|
17
|
+
exports.getAppLogger = require_logger.getAppLogger;
|
|
18
|
+
exports.logger = require_logger.logger;
|
|
19
|
+
exports.spinnerFrames = require_logger.spinnerFrames;
|
|
20
|
+
exports.v = require_logger.v;
|
|
21
|
+
exports.x = require_logger.x;
|