@intlayer/config 8.4.3 → 8.4.5
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 +29 -0
- package/dist/cjs/built.cjs +7 -1
- package/dist/cjs/built.cjs.map +1 -1
- package/dist/cjs/client.cjs +16 -1
- package/dist/cjs/colors.cjs +33 -1
- package/dist/cjs/colors.cjs.map +1 -1
- package/dist/cjs/configFile/buildConfigurationFields.cjs +199 -1
- package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
- package/dist/cjs/configFile/configurationSchema.cjs +210 -1
- package/dist/cjs/configFile/configurationSchema.cjs.map +1 -1
- package/dist/cjs/configFile/getConfiguration.cjs +69 -1
- package/dist/cjs/configFile/getConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/index.cjs +28 -1
- package/dist/cjs/configFile/loadConfigurationFile.cjs +30 -1
- package/dist/cjs/configFile/loadConfigurationFile.cjs.map +1 -1
- package/dist/cjs/configFile/searchConfigurationFile.cjs +53 -1
- package/dist/cjs/configFile/searchConfigurationFile.cjs.map +1 -1
- package/dist/cjs/defaultValues/build.cjs +35 -1
- package/dist/cjs/defaultValues/build.cjs.map +1 -1
- package/dist/cjs/defaultValues/compiler.cjs +13 -1
- package/dist/cjs/defaultValues/compiler.cjs.map +1 -1
- package/dist/cjs/defaultValues/content.cjs +40 -1
- package/dist/cjs/defaultValues/content.cjs.map +1 -1
- package/dist/cjs/defaultValues/dictionary.cjs +13 -1
- package/dist/cjs/defaultValues/dictionary.cjs.map +1 -1
- package/dist/cjs/defaultValues/editor.cjs +23 -1
- package/dist/cjs/defaultValues/editor.cjs.map +1 -1
- package/dist/cjs/defaultValues/index.cjs +66 -1
- package/dist/cjs/defaultValues/internationalization.cjs +15 -1
- package/dist/cjs/defaultValues/internationalization.cjs.map +1 -1
- package/dist/cjs/defaultValues/log.cjs +10 -1
- package/dist/cjs/defaultValues/log.cjs.map +1 -1
- package/dist/cjs/defaultValues/routing.cjs +19 -1
- package/dist/cjs/defaultValues/routing.cjs.map +1 -1
- package/dist/cjs/defaultValues/system.cjs +29 -1
- package/dist/cjs/defaultValues/system.cjs.map +1 -1
- package/dist/cjs/loadEnvFile.cjs +31 -1
- package/dist/cjs/loadEnvFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/bundleFile.cjs +71 -1
- package/dist/cjs/loadExternalFile/bundleFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/bundleJSFile.cjs +33 -1
- package/dist/cjs/loadExternalFile/bundleJSFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/index.cjs +17 -1
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs +77 -1
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/parseFileContent.cjs +77 -1
- package/dist/cjs/loadExternalFile/parseFileContent.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs +67 -1
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs.map +1 -1
- package/dist/cjs/logger.cjs +133 -1
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/cjs/node.cjs +28 -1
- package/dist/cjs/utils/ESMxCJSHelpers.cjs +27 -1
- package/dist/cjs/utils/ESMxCJSHelpers.cjs.map +1 -1
- package/dist/cjs/utils/alias.cjs +29 -1
- package/dist/cjs/utils/alias.cjs.map +1 -1
- package/dist/cjs/utils/cacheDisk.cjs +173 -1
- package/dist/cjs/utils/cacheDisk.cjs.map +1 -1
- package/dist/cjs/utils/cacheMemory.cjs +269 -1
- package/dist/cjs/utils/cacheMemory.cjs.map +1 -1
- package/dist/cjs/utils/clearModuleCache.cjs +26 -1
- package/dist/cjs/utils/clearModuleCache.cjs.map +1 -1
- package/dist/cjs/utils/compareVersions.cjs +38 -1
- package/dist/cjs/utils/compareVersions.cjs.map +1 -1
- package/dist/cjs/utils/extractErrorMessage.cjs +95 -1
- package/dist/cjs/utils/extractErrorMessage.cjs.map +1 -1
- package/dist/cjs/utils/getExtension.cjs +14 -1
- package/dist/cjs/utils/getExtension.cjs.map +1 -1
- package/dist/cjs/utils/getPackageJsonPath.cjs +33 -1
- package/dist/cjs/utils/getPackageJsonPath.cjs.map +1 -1
- package/dist/cjs/utils/index.cjs +45 -1
- package/dist/cjs/utils/logStack.cjs +17 -1
- package/dist/cjs/utils/logStack.cjs.map +1 -1
- package/dist/cjs/utils/normalizePath.cjs +17 -1
- package/dist/cjs/utils/normalizePath.cjs.map +1 -1
- package/dist/cjs/utils/parseFilePathPattern.cjs +24 -1
- package/dist/cjs/utils/parseFilePathPattern.cjs.map +1 -1
- package/dist/cjs/utils/retryManager.cjs +45 -1
- package/dist/cjs/utils/retryManager.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/camelCaseToKebabCase.cjs +13 -1
- package/dist/cjs/utils/stringFormatter/camelCaseToKebabCase.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/camelCaseToSentence.cjs +16 -1
- package/dist/cjs/utils/stringFormatter/camelCaseToSentence.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/index.cjs +10 -1
- package/dist/cjs/utils/stringFormatter/kebabCaseToCamelCase.cjs +14 -1
- package/dist/cjs/utils/stringFormatter/kebabCaseToCamelCase.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/toLowerCamelCase.cjs +19 -1
- package/dist/cjs/utils/stringFormatter/toLowerCamelCase.cjs.map +1 -1
- package/dist/esm/_virtual/_rolldown/runtime.mjs +8 -0
- package/dist/esm/built.mjs +7 -1
- package/dist/esm/built.mjs.map +1 -1
- package/dist/esm/client.mjs +9 -1
- package/dist/esm/colors.mjs +18 -1
- package/dist/esm/colors.mjs.map +1 -1
- package/dist/esm/configFile/buildConfigurationFields.mjs +197 -1
- package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
- package/dist/esm/configFile/configurationSchema.mjs +191 -1
- package/dist/esm/configFile/configurationSchema.mjs.map +1 -1
- package/dist/esm/configFile/getConfiguration.mjs +66 -1
- package/dist/esm/configFile/getConfiguration.mjs.map +1 -1
- package/dist/esm/configFile/index.mjs +6 -1
- package/dist/esm/configFile/loadConfigurationFile.mjs +29 -1
- package/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -1
- package/dist/esm/configFile/searchConfigurationFile.mjs +50 -1
- package/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -1
- package/dist/esm/defaultValues/build.mjs +28 -1
- package/dist/esm/defaultValues/build.mjs.map +1 -1
- package/dist/esm/defaultValues/compiler.mjs +8 -1
- package/dist/esm/defaultValues/compiler.mjs.map +1 -1
- package/dist/esm/defaultValues/content.mjs +32 -1
- package/dist/esm/defaultValues/content.mjs.map +1 -1
- package/dist/esm/defaultValues/dictionary.mjs +8 -1
- package/dist/esm/defaultValues/dictionary.mjs.map +1 -1
- package/dist/esm/defaultValues/editor.mjs +13 -1
- package/dist/esm/defaultValues/editor.mjs.map +1 -1
- package/dist/esm/defaultValues/index.mjs +11 -1
- package/dist/esm/defaultValues/internationalization.mjs +10 -1
- package/dist/esm/defaultValues/internationalization.mjs.map +1 -1
- package/dist/esm/defaultValues/log.mjs +8 -1
- package/dist/esm/defaultValues/log.mjs.map +1 -1
- package/dist/esm/defaultValues/routing.mjs +11 -1
- package/dist/esm/defaultValues/routing.mjs.map +1 -1
- package/dist/esm/defaultValues/system.mjs +16 -1
- package/dist/esm/defaultValues/system.mjs.map +1 -1
- package/dist/esm/loadEnvFile.mjs +27 -1
- package/dist/esm/loadEnvFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/bundleFile.mjs +67 -1
- package/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/bundleJSFile.mjs +31 -1
- package/dist/esm/loadExternalFile/bundleJSFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/index.mjs +7 -1
- package/dist/esm/loadExternalFile/loadExternalFile.mjs +73 -1
- package/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/parseFileContent.mjs +73 -1
- package/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -1
- package/dist/esm/loadExternalFile/transpileTSToCJS.mjs +64 -1
- package/dist/esm/loadExternalFile/transpileTSToCJS.mjs.map +1 -1
- package/dist/esm/logger.mjs +118 -1
- package/dist/esm/logger.mjs.map +1 -1
- package/dist/esm/node.mjs +6 -1
- package/dist/esm/utils/ESMxCJSHelpers.mjs +25 -1
- package/dist/esm/utils/ESMxCJSHelpers.mjs.map +1 -0
- package/dist/esm/utils/alias.mjs +27 -1
- package/dist/esm/utils/alias.mjs.map +1 -1
- package/dist/esm/utils/cacheDisk.mjs +170 -1
- package/dist/esm/utils/cacheDisk.mjs.map +1 -1
- package/dist/esm/utils/cacheMemory.mjs +261 -1
- package/dist/esm/utils/cacheMemory.mjs.map +1 -1
- package/dist/esm/utils/clearModuleCache.mjs +25 -1
- package/dist/esm/utils/clearModuleCache.mjs.map +1 -1
- package/dist/esm/utils/compareVersions.mjs +36 -1
- package/dist/esm/utils/compareVersions.mjs.map +1 -1
- package/dist/esm/utils/extractErrorMessage.mjs +93 -1
- package/dist/esm/utils/extractErrorMessage.mjs.map +1 -1
- package/dist/esm/utils/getExtension.mjs +12 -1
- package/dist/esm/utils/getExtension.mjs.map +1 -1
- package/dist/esm/utils/getPackageJsonPath.mjs +31 -1
- package/dist/esm/utils/getPackageJsonPath.mjs.map +1 -1
- package/dist/esm/utils/index.mjs +19 -1
- package/dist/esm/utils/logStack.mjs +16 -1
- package/dist/esm/utils/logStack.mjs.map +1 -1
- package/dist/esm/utils/normalizePath.mjs +15 -1
- package/dist/esm/utils/normalizePath.mjs.map +1 -1
- package/dist/esm/utils/parseFilePathPattern.mjs +21 -1
- package/dist/esm/utils/parseFilePathPattern.mjs.map +1 -1
- package/dist/esm/utils/retryManager.mjs +44 -1
- package/dist/esm/utils/retryManager.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/camelCaseToKebabCase.mjs +11 -1
- package/dist/esm/utils/stringFormatter/camelCaseToKebabCase.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/camelCaseToSentence.mjs +14 -1
- package/dist/esm/utils/stringFormatter/camelCaseToSentence.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/index.mjs +6 -1
- package/dist/esm/utils/stringFormatter/kebabCaseToCamelCase.mjs +12 -1
- package/dist/esm/utils/stringFormatter/kebabCaseToCamelCase.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/toLowerCamelCase.mjs +17 -1
- package/dist/esm/utils/stringFormatter/toLowerCamelCase.mjs.map +1 -1
- package/dist/types/client.d.ts +4 -4
- package/dist/types/colors.d.ts +20 -2
- package/dist/types/colors.d.ts.map +1 -0
- package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
- package/dist/types/configFile/configurationSchema.d.ts +10 -10
- package/dist/types/configFile/getConfiguration.d.ts +2 -2
- package/dist/types/configFile/loadConfigurationFile.d.ts +1 -1
- package/dist/types/configFile/loadConfigurationFile.d.ts.map +1 -1
- package/dist/types/loadEnvFile.d.ts +10 -2
- package/dist/types/loadEnvFile.d.ts.map +1 -0
- package/dist/types/loadExternalFile/index.d.ts +3 -3
- package/dist/types/loadExternalFile/loadExternalFile.d.ts +25 -2
- package/dist/types/loadExternalFile/loadExternalFile.d.ts.map +1 -0
- package/dist/types/loadExternalFile/parseFileContent.d.ts +29 -2
- package/dist/types/loadExternalFile/parseFileContent.d.ts.map +1 -0
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts +19 -2
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts.map +1 -0
- package/dist/types/logger.d.ts +1 -1
- package/dist/types/utils/index.d.ts +4 -4
- package/dist/types/utils/stringFormatter/camelCaseToKebabCase.d.ts +9 -2
- package/dist/types/utils/stringFormatter/camelCaseToKebabCase.d.ts.map +1 -0
- package/dist/types/utils/stringFormatter/camelCaseToSentence.d.ts +9 -2
- package/dist/types/utils/stringFormatter/camelCaseToSentence.d.ts.map +1 -0
- package/dist/types/utils/stringFormatter/index.d.ts +4 -4
- package/dist/types/utils/stringFormatter/kebabCaseToCamelCase.d.ts +5 -2
- package/dist/types/utils/stringFormatter/kebabCaseToCamelCase.d.ts.map +1 -0
- package/dist/types/utils/stringFormatter/toLowerCamelCase.d.ts +10 -2
- package/dist/types/utils/stringFormatter/toLowerCamelCase.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/cjs/chunk-Bmb41Sf3.cjs +0 -1
- package/dist/esm/ESMxCJSHelpers-BAuqwNXV.mjs +0 -2
- package/dist/esm/ESMxCJSHelpers-BAuqwNXV.mjs.map +0 -1
- package/dist/types/camelCaseToKebabCase-BV_lLJHR.d.ts +0 -9
- package/dist/types/camelCaseToKebabCase-BV_lLJHR.d.ts.map +0 -1
- package/dist/types/camelCaseToSentence-DAbbkwe6.d.ts +0 -9
- package/dist/types/camelCaseToSentence-DAbbkwe6.d.ts.map +0 -1
- package/dist/types/colors-BbZeGWYU.d.ts +0 -20
- package/dist/types/colors-BbZeGWYU.d.ts.map +0 -1
- package/dist/types/kebabCaseToCamelCase-h9PkNVuO.d.ts +0 -5
- package/dist/types/kebabCaseToCamelCase-h9PkNVuO.d.ts.map +0 -1
- package/dist/types/loadEnvFile-BiTBX4fe.d.ts +0 -10
- package/dist/types/loadEnvFile-BiTBX4fe.d.ts.map +0 -1
- package/dist/types/loadExternalFile-DmM_TGcA.d.ts +0 -25
- package/dist/types/loadExternalFile-DmM_TGcA.d.ts.map +0 -1
- package/dist/types/parseFileContent--o_QlW5j.d.ts +0 -29
- package/dist/types/parseFileContent--o_QlW5j.d.ts.map +0 -1
- package/dist/types/toLowerCamelCase-DUdT00I1.d.ts +0 -10
- package/dist/types/toLowerCamelCase-DUdT00I1.d.ts.map +0 -1
- package/dist/types/transpileTSToCJS-OifpV3zk.d.ts +0 -19
- package/dist/types/transpileTSToCJS-OifpV3zk.d.ts.map +0 -1
|
@@ -1,2 +1,41 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/defaultValues/content.ts
|
|
4
|
+
const FILE_EXTENSIONS = [
|
|
5
|
+
".content.ts",
|
|
6
|
+
".content.js",
|
|
7
|
+
".content.cjs",
|
|
8
|
+
".content.mjs",
|
|
9
|
+
".content.json",
|
|
10
|
+
".content.json5",
|
|
11
|
+
".content.jsonc",
|
|
12
|
+
".content.tsx",
|
|
13
|
+
".content.jsx"
|
|
14
|
+
];
|
|
15
|
+
const EXCLUDED_PATHS = [
|
|
16
|
+
"**/node_modules/**",
|
|
17
|
+
"**/dist/**",
|
|
18
|
+
"**/build/**",
|
|
19
|
+
"**/.intlayer/**",
|
|
20
|
+
"**/.next/**",
|
|
21
|
+
"**/.nuxt/**",
|
|
22
|
+
"**/.expo/**",
|
|
23
|
+
"**/.vercel/**",
|
|
24
|
+
"**/.turbo/**",
|
|
25
|
+
"**/.tanstack/**"
|
|
26
|
+
];
|
|
27
|
+
const CONTENT_DIR = ["."];
|
|
28
|
+
const CODE_DIR = ["."];
|
|
29
|
+
const I18NEXT_DICTIONARIES_DIR = "i18next_resources";
|
|
30
|
+
const REACT_INTL_MESSAGES_DIR = "intl_messages";
|
|
31
|
+
const WATCH = true;
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.CODE_DIR = CODE_DIR;
|
|
35
|
+
exports.CONTENT_DIR = CONTENT_DIR;
|
|
36
|
+
exports.EXCLUDED_PATHS = EXCLUDED_PATHS;
|
|
37
|
+
exports.FILE_EXTENSIONS = FILE_EXTENSIONS;
|
|
38
|
+
exports.I18NEXT_DICTIONARIES_DIR = I18NEXT_DICTIONARIES_DIR;
|
|
39
|
+
exports.REACT_INTL_MESSAGES_DIR = REACT_INTL_MESSAGES_DIR;
|
|
40
|
+
exports.WATCH = WATCH;
|
|
2
41
|
//# sourceMappingURL=content.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.cjs","names":[],"sources":["../../../src/defaultValues/content.ts"],"sourcesContent":["export const FILE_EXTENSIONS = [\n '.content.ts',\n '.content.js',\n '.content.cjs',\n '.content.mjs',\n '.content.json',\n '.content.json5',\n '.content.jsonc',\n '.content.tsx',\n '.content.jsx',\n];\n\nexport const EXCLUDED_PATHS = [\n '**/node_modules/**',\n '**/dist/**',\n '**/build/**',\n '**/.intlayer/**',\n '**/.next/**',\n '**/.nuxt/**',\n '**/.expo/**',\n '**/.vercel/**',\n '**/.turbo/**',\n '**/.tanstack/**',\n];\n\nexport const CONTENT_DIR = ['.'];\n\nexport const CODE_DIR = ['.'];\n\nexport const I18NEXT_DICTIONARIES_DIR = 'i18next_resources';\n\nexport const REACT_INTL_MESSAGES_DIR = 'intl_messages';\n\nexport const WATCH = true;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"content.cjs","names":[],"sources":["../../../src/defaultValues/content.ts"],"sourcesContent":["export const FILE_EXTENSIONS = [\n '.content.ts',\n '.content.js',\n '.content.cjs',\n '.content.mjs',\n '.content.json',\n '.content.json5',\n '.content.jsonc',\n '.content.tsx',\n '.content.jsx',\n];\n\nexport const EXCLUDED_PATHS = [\n '**/node_modules/**',\n '**/dist/**',\n '**/build/**',\n '**/.intlayer/**',\n '**/.next/**',\n '**/.nuxt/**',\n '**/.expo/**',\n '**/.vercel/**',\n '**/.turbo/**',\n '**/.tanstack/**',\n];\n\nexport const CONTENT_DIR = ['.'];\n\nexport const CODE_DIR = ['.'];\n\nexport const I18NEXT_DICTIONARIES_DIR = 'i18next_resources';\n\nexport const REACT_INTL_MESSAGES_DIR = 'intl_messages';\n\nexport const WATCH = true;\n"],"mappings":";;;AAAA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,cAAc,CAAC,IAAI;AAEhC,MAAa,WAAW,CAAC,IAAI;AAE7B,MAAa,2BAA2B;AAExC,MAAa,0BAA0B;AAEvC,MAAa,QAAQ"}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/defaultValues/dictionary.ts
|
|
4
|
+
const FILL = true;
|
|
5
|
+
const LOCATION = "local";
|
|
6
|
+
const CONTENT_AUTO_TRANSFORMATION = false;
|
|
7
|
+
const IMPORT_MODE = "static";
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.CONTENT_AUTO_TRANSFORMATION = CONTENT_AUTO_TRANSFORMATION;
|
|
11
|
+
exports.FILL = FILL;
|
|
12
|
+
exports.IMPORT_MODE = IMPORT_MODE;
|
|
13
|
+
exports.LOCATION = LOCATION;
|
|
2
14
|
//# sourceMappingURL=dictionary.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.cjs","names":[],"sources":["../../../src/defaultValues/dictionary.ts"],"sourcesContent":["import type { DictionaryLocation } from '@intlayer/types/dictionary';\n\nexport const FILL = true;\nexport const LOCATION: DictionaryLocation = 'local';\nexport const CONTENT_AUTO_TRANSFORMATION = false;\nexport const IMPORT_MODE = 'static';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"dictionary.cjs","names":[],"sources":["../../../src/defaultValues/dictionary.ts"],"sourcesContent":["import type { DictionaryLocation } from '@intlayer/types/dictionary';\n\nexport const FILL = true;\nexport const LOCATION: DictionaryLocation = 'local';\nexport const CONTENT_AUTO_TRANSFORMATION = false;\nexport const IMPORT_MODE = 'static';\n"],"mappings":";;;AAEA,MAAa,OAAO;AACpB,MAAa,WAA+B;AAC5C,MAAa,8BAA8B;AAC3C,MAAa,cAAc"}
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/defaultValues/editor.ts
|
|
4
|
+
const APPLICATION_URL = void 0;
|
|
5
|
+
const EDITOR_URL = "http://localhost:8000";
|
|
6
|
+
const CMS_URL = "https://app.intlayer.org";
|
|
7
|
+
const BACKEND_URL = "https://back.intlayer.org";
|
|
8
|
+
const PORT = 8e3;
|
|
9
|
+
const IS_ENABLED = false;
|
|
10
|
+
const LIVE_SYNC = true;
|
|
11
|
+
const DICTIONARY_PRIORITY_STRATEGY = "local_first";
|
|
12
|
+
const LIVE_SYNC_PORT = 4e3;
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.APPLICATION_URL = APPLICATION_URL;
|
|
16
|
+
exports.BACKEND_URL = BACKEND_URL;
|
|
17
|
+
exports.CMS_URL = CMS_URL;
|
|
18
|
+
exports.DICTIONARY_PRIORITY_STRATEGY = DICTIONARY_PRIORITY_STRATEGY;
|
|
19
|
+
exports.EDITOR_URL = EDITOR_URL;
|
|
20
|
+
exports.IS_ENABLED = IS_ENABLED;
|
|
21
|
+
exports.LIVE_SYNC = LIVE_SYNC;
|
|
22
|
+
exports.LIVE_SYNC_PORT = LIVE_SYNC_PORT;
|
|
23
|
+
exports.PORT = PORT;
|
|
2
24
|
//# sourceMappingURL=editor.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.cjs","names":[],"sources":["../../../src/defaultValues/editor.ts"],"sourcesContent":["export const APPLICATION_URL = undefined;\nexport const EDITOR_URL = 'http://localhost:8000';\nexport const CMS_URL = 'https://app.intlayer.org';\nexport const BACKEND_URL = 'https://back.intlayer.org';\nexport const PORT = 8000;\nexport const IS_ENABLED = false;\nexport const LIVE_SYNC = true;\nexport const DICTIONARY_PRIORITY_STRATEGY = 'local_first';\nexport const LIVE_SYNC_PORT = 4000;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"editor.cjs","names":[],"sources":["../../../src/defaultValues/editor.ts"],"sourcesContent":["export const APPLICATION_URL = undefined;\nexport const EDITOR_URL = 'http://localhost:8000';\nexport const CMS_URL = 'https://app.intlayer.org';\nexport const BACKEND_URL = 'https://back.intlayer.org';\nexport const PORT = 8000;\nexport const IS_ENABLED = false;\nexport const LIVE_SYNC = true;\nexport const DICTIONARY_PRIORITY_STRATEGY = 'local_first';\nexport const LIVE_SYNC_PORT = 4000;\n"],"mappings":";;;AAAA,MAAa,kBAAkB;AAC/B,MAAa,aAAa;AAC1B,MAAa,UAAU;AACvB,MAAa,cAAc;AAC3B,MAAa,OAAO;AACpB,MAAa,aAAa;AAC1B,MAAa,YAAY;AACzB,MAAa,+BAA+B;AAC5C,MAAa,iBAAiB"}
|
|
@@ -1 +1,66 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_defaultValues_build = require('./build.cjs');
|
|
3
|
+
const require_defaultValues_compiler = require('./compiler.cjs');
|
|
4
|
+
const require_defaultValues_content = require('./content.cjs');
|
|
5
|
+
const require_defaultValues_dictionary = require('./dictionary.cjs');
|
|
6
|
+
const require_defaultValues_editor = require('./editor.cjs');
|
|
7
|
+
const require_defaultValues_internationalization = require('./internationalization.cjs');
|
|
8
|
+
const require_defaultValues_log = require('./log.cjs');
|
|
9
|
+
const require_defaultValues_routing = require('./routing.cjs');
|
|
10
|
+
const require_defaultValues_system = require('./system.cjs');
|
|
11
|
+
|
|
12
|
+
exports.APPLICATION_URL = require_defaultValues_editor.APPLICATION_URL;
|
|
13
|
+
exports.BACKEND_URL = require_defaultValues_editor.BACKEND_URL;
|
|
14
|
+
exports.BASE_PATH = require_defaultValues_routing.BASE_PATH;
|
|
15
|
+
exports.BUILD_MODE = require_defaultValues_build.BUILD_MODE;
|
|
16
|
+
exports.CACHE = require_defaultValues_build.CACHE;
|
|
17
|
+
exports.CACHE_DIR = require_defaultValues_system.CACHE_DIR;
|
|
18
|
+
exports.CMS_URL = require_defaultValues_editor.CMS_URL;
|
|
19
|
+
exports.CODE_DIR = require_defaultValues_content.CODE_DIR;
|
|
20
|
+
exports.COMPILER_DICTIONARY_KEY_PREFIX = require_defaultValues_compiler.COMPILER_DICTIONARY_KEY_PREFIX;
|
|
21
|
+
exports.COMPILER_ENABLED = require_defaultValues_compiler.COMPILER_ENABLED;
|
|
22
|
+
exports.COMPILER_NO_METADATA = require_defaultValues_compiler.COMPILER_NO_METADATA;
|
|
23
|
+
exports.COMPILER_SAVE_COMPONENTS = require_defaultValues_compiler.COMPILER_SAVE_COMPONENTS;
|
|
24
|
+
exports.CONFIG_DIR = require_defaultValues_system.CONFIG_DIR;
|
|
25
|
+
exports.CONTENT_AUTO_TRANSFORMATION = require_defaultValues_dictionary.CONTENT_AUTO_TRANSFORMATION;
|
|
26
|
+
exports.CONTENT_DIR = require_defaultValues_content.CONTENT_DIR;
|
|
27
|
+
exports.COOKIE_NAME = require_defaultValues_routing.COOKIE_NAME;
|
|
28
|
+
exports.DEFAULT_LOCALE = require_defaultValues_internationalization.DEFAULT_LOCALE;
|
|
29
|
+
exports.DICTIONARIES_DIR = require_defaultValues_system.DICTIONARIES_DIR;
|
|
30
|
+
exports.DICTIONARY_PRIORITY_STRATEGY = require_defaultValues_editor.DICTIONARY_PRIORITY_STRATEGY;
|
|
31
|
+
exports.DYNAMIC_DICTIONARIES_DIR = require_defaultValues_system.DYNAMIC_DICTIONARIES_DIR;
|
|
32
|
+
exports.EDITOR_URL = require_defaultValues_editor.EDITOR_URL;
|
|
33
|
+
exports.EXCLUDED_PATHS = require_defaultValues_content.EXCLUDED_PATHS;
|
|
34
|
+
exports.FETCH_DICTIONARIES_DIR = require_defaultValues_system.FETCH_DICTIONARIES_DIR;
|
|
35
|
+
exports.FILE_EXTENSIONS = require_defaultValues_content.FILE_EXTENSIONS;
|
|
36
|
+
exports.FILL = require_defaultValues_dictionary.FILL;
|
|
37
|
+
exports.HEADER_NAME = require_defaultValues_routing.HEADER_NAME;
|
|
38
|
+
exports.I18NEXT_DICTIONARIES_DIR = require_defaultValues_content.I18NEXT_DICTIONARIES_DIR;
|
|
39
|
+
exports.IMPORT_MODE = require_defaultValues_dictionary.IMPORT_MODE;
|
|
40
|
+
exports.IS_ENABLED = require_defaultValues_editor.IS_ENABLED;
|
|
41
|
+
exports.LIVE_SYNC = require_defaultValues_editor.LIVE_SYNC;
|
|
42
|
+
exports.LIVE_SYNC_PORT = require_defaultValues_editor.LIVE_SYNC_PORT;
|
|
43
|
+
exports.LOCALES = require_defaultValues_internationalization.LOCALES;
|
|
44
|
+
exports.LOCALE_STORAGE_NAME = require_defaultValues_routing.LOCALE_STORAGE_NAME;
|
|
45
|
+
exports.LOCATION = require_defaultValues_dictionary.LOCATION;
|
|
46
|
+
exports.MAIN_DIR = require_defaultValues_system.MAIN_DIR;
|
|
47
|
+
exports.MASKS_DIR = require_defaultValues_system.MASKS_DIR;
|
|
48
|
+
exports.MODE = require_defaultValues_log.MODE;
|
|
49
|
+
exports.MODULE_AUGMENTATION_DIR = require_defaultValues_system.MODULE_AUGMENTATION_DIR;
|
|
50
|
+
exports.OPTIMIZE = require_defaultValues_build.OPTIMIZE;
|
|
51
|
+
exports.OUTPUT_FORMAT = require_defaultValues_build.OUTPUT_FORMAT;
|
|
52
|
+
exports.PORT = require_defaultValues_editor.PORT;
|
|
53
|
+
exports.PREFIX = require_defaultValues_log.PREFIX;
|
|
54
|
+
exports.REACT_INTL_MESSAGES_DIR = require_defaultValues_content.REACT_INTL_MESSAGES_DIR;
|
|
55
|
+
exports.REMOTE_DICTIONARIES_DIR = require_defaultValues_system.REMOTE_DICTIONARIES_DIR;
|
|
56
|
+
exports.REQUIRED_LOCALES = require_defaultValues_internationalization.REQUIRED_LOCALES;
|
|
57
|
+
exports.ROUTING_MODE = require_defaultValues_routing.ROUTING_MODE;
|
|
58
|
+
exports.SERVER_SET_COOKIE = require_defaultValues_routing.SERVER_SET_COOKIE;
|
|
59
|
+
exports.STORAGE = require_defaultValues_routing.STORAGE;
|
|
60
|
+
exports.STRICT_MODE = require_defaultValues_internationalization.STRICT_MODE;
|
|
61
|
+
exports.TEMP_DIR = require_defaultValues_system.TEMP_DIR;
|
|
62
|
+
exports.TRAVERSE_PATTERN = require_defaultValues_build.TRAVERSE_PATTERN;
|
|
63
|
+
exports.TYPES_DIR = require_defaultValues_system.TYPES_DIR;
|
|
64
|
+
exports.TYPE_CHECKING = require_defaultValues_build.TYPE_CHECKING;
|
|
65
|
+
exports.UNMERGED_DICTIONARIES_DIR = require_defaultValues_system.UNMERGED_DICTIONARIES_DIR;
|
|
66
|
+
exports.WATCH = require_defaultValues_content.WATCH;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let _intlayer_types_locales = require("@intlayer/types/locales");
|
|
4
|
+
|
|
5
|
+
//#region src/defaultValues/internationalization.ts
|
|
6
|
+
const LOCALES = [_intlayer_types_locales.ENGLISH];
|
|
7
|
+
const REQUIRED_LOCALES = [];
|
|
8
|
+
const DEFAULT_LOCALE = _intlayer_types_locales.ENGLISH;
|
|
9
|
+
const STRICT_MODE = "inclusive";
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
|
|
13
|
+
exports.LOCALES = LOCALES;
|
|
14
|
+
exports.REQUIRED_LOCALES = REQUIRED_LOCALES;
|
|
15
|
+
exports.STRICT_MODE = STRICT_MODE;
|
|
2
16
|
//# sourceMappingURL=internationalization.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internationalization.cjs","names":["ENGLISH"],"sources":["../../../src/defaultValues/internationalization.ts"],"sourcesContent":["import type { Locale } from '@intlayer/types/allLocales';\nimport type { StrictMode } from '@intlayer/types/config';\nimport { ENGLISH } from '@intlayer/types/locales';\n\nexport const LOCALES: Locale[] = [ENGLISH];\n\nexport const REQUIRED_LOCALES: Locale[] = [];\n\nexport const DEFAULT_LOCALE: Locale = ENGLISH;\n\nexport const STRICT_MODE: StrictMode = 'inclusive';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"internationalization.cjs","names":["ENGLISH"],"sources":["../../../src/defaultValues/internationalization.ts"],"sourcesContent":["import type { Locale } from '@intlayer/types/allLocales';\nimport type { StrictMode } from '@intlayer/types/config';\nimport { ENGLISH } from '@intlayer/types/locales';\n\nexport const LOCALES: Locale[] = [ENGLISH];\n\nexport const REQUIRED_LOCALES: Locale[] = [];\n\nexport const DEFAULT_LOCALE: Locale = ENGLISH;\n\nexport const STRICT_MODE: StrictMode = 'inclusive';\n"],"mappings":";;;;;AAIA,MAAa,UAAoB,CAACA,gCAAQ;AAE1C,MAAa,mBAA6B,EAAE;AAE5C,MAAa,iBAAyBA;AAEtC,MAAa,cAA0B"}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_colors = require('../colors.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/defaultValues/log.ts
|
|
5
|
+
const MODE = "default";
|
|
6
|
+
const PREFIX = `${require_colors.GREY_DARK}[intlayer] ${require_colors.RESET}`;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.MODE = MODE;
|
|
10
|
+
exports.PREFIX = PREFIX;
|
|
2
11
|
//# sourceMappingURL=log.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.cjs","names":[],"sources":["../../../src/defaultValues/log.ts"],"sourcesContent":["import * as ANSIColors from '../colors';\n\nexport const MODE = 'default';\n\nexport const PREFIX = `${ANSIColors.GREY_DARK}[intlayer] ${ANSIColors.RESET}`;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"log.cjs","names":[],"sources":["../../../src/defaultValues/log.ts"],"sourcesContent":["import * as ANSIColors from '../colors';\n\nexport const MODE = 'default';\n\nexport const PREFIX = `${ANSIColors.GREY_DARK}[intlayer] ${ANSIColors.RESET}`;\n"],"mappings":";;;;AAEA,MAAa,OAAO;AAEpB,MAAa,SAAS,4BAAwB"}
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/defaultValues/routing.ts
|
|
4
|
+
const HEADER_NAME = "x-intlayer-locale";
|
|
5
|
+
const COOKIE_NAME = "INTLAYER_LOCALE";
|
|
6
|
+
const LOCALE_STORAGE_NAME = "INTLAYER_LOCALE";
|
|
7
|
+
const BASE_PATH = "";
|
|
8
|
+
const SERVER_SET_COOKIE = "always";
|
|
9
|
+
const ROUTING_MODE = "prefix-no-default";
|
|
10
|
+
const STORAGE = ["cookie", "header"];
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.BASE_PATH = BASE_PATH;
|
|
14
|
+
exports.COOKIE_NAME = COOKIE_NAME;
|
|
15
|
+
exports.HEADER_NAME = HEADER_NAME;
|
|
16
|
+
exports.LOCALE_STORAGE_NAME = LOCALE_STORAGE_NAME;
|
|
17
|
+
exports.ROUTING_MODE = ROUTING_MODE;
|
|
18
|
+
exports.SERVER_SET_COOKIE = SERVER_SET_COOKIE;
|
|
19
|
+
exports.STORAGE = STORAGE;
|
|
2
20
|
//# sourceMappingURL=routing.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.cjs","names":[],"sources":["../../../src/defaultValues/routing.ts"],"sourcesContent":["import type { RoutingConfig } from '@intlayer/types/config';\n\nexport const HEADER_NAME = 'x-intlayer-locale';\n\nexport const COOKIE_NAME = 'INTLAYER_LOCALE';\nexport const LOCALE_STORAGE_NAME = 'INTLAYER_LOCALE';\n\nexport const BASE_PATH = '';\n\nexport const SERVER_SET_COOKIE = 'always';\n\nexport const ROUTING_MODE = 'prefix-no-default';\n\nexport const STORAGE: RoutingConfig['storage'] = ['cookie', 'header'];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"routing.cjs","names":[],"sources":["../../../src/defaultValues/routing.ts"],"sourcesContent":["import type { RoutingConfig } from '@intlayer/types/config';\n\nexport const HEADER_NAME = 'x-intlayer-locale';\n\nexport const COOKIE_NAME = 'INTLAYER_LOCALE';\nexport const LOCALE_STORAGE_NAME = 'INTLAYER_LOCALE';\n\nexport const BASE_PATH = '';\n\nexport const SERVER_SET_COOKIE = 'always';\n\nexport const ROUTING_MODE = 'prefix-no-default';\n\nexport const STORAGE: RoutingConfig['storage'] = ['cookie', 'header'];\n"],"mappings":";;;AAEA,MAAa,cAAc;AAE3B,MAAa,cAAc;AAC3B,MAAa,sBAAsB;AAEnC,MAAa,YAAY;AAEzB,MAAa,oBAAoB;AAEjC,MAAa,eAAe;AAE5B,MAAa,UAAoC,CAAC,UAAU,SAAS"}
|
|
@@ -1,2 +1,30 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/defaultValues/system.ts
|
|
4
|
+
const MAIN_DIR = ".intlayer/main";
|
|
5
|
+
const DICTIONARIES_DIR = ".intlayer/dictionary";
|
|
6
|
+
const MASKS_DIR = ".intlayer/mask";
|
|
7
|
+
const REMOTE_DICTIONARIES_DIR = ".intlayer/remote_dictionary";
|
|
8
|
+
const UNMERGED_DICTIONARIES_DIR = ".intlayer/unmerged_dictionary";
|
|
9
|
+
const DYNAMIC_DICTIONARIES_DIR = ".intlayer/dynamic_dictionary";
|
|
10
|
+
const FETCH_DICTIONARIES_DIR = ".intlayer/fetch_dictionary";
|
|
11
|
+
const TYPES_DIR = ".intlayer/types";
|
|
12
|
+
const MODULE_AUGMENTATION_DIR = ".intlayer/types";
|
|
13
|
+
const CONFIG_DIR = ".intlayer/config";
|
|
14
|
+
const CACHE_DIR = ".intlayer/cache";
|
|
15
|
+
const TEMP_DIR = ".intlayer/tmp";
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.CACHE_DIR = CACHE_DIR;
|
|
19
|
+
exports.CONFIG_DIR = CONFIG_DIR;
|
|
20
|
+
exports.DICTIONARIES_DIR = DICTIONARIES_DIR;
|
|
21
|
+
exports.DYNAMIC_DICTIONARIES_DIR = DYNAMIC_DICTIONARIES_DIR;
|
|
22
|
+
exports.FETCH_DICTIONARIES_DIR = FETCH_DICTIONARIES_DIR;
|
|
23
|
+
exports.MAIN_DIR = MAIN_DIR;
|
|
24
|
+
exports.MASKS_DIR = MASKS_DIR;
|
|
25
|
+
exports.MODULE_AUGMENTATION_DIR = MODULE_AUGMENTATION_DIR;
|
|
26
|
+
exports.REMOTE_DICTIONARIES_DIR = REMOTE_DICTIONARIES_DIR;
|
|
27
|
+
exports.TEMP_DIR = TEMP_DIR;
|
|
28
|
+
exports.TYPES_DIR = TYPES_DIR;
|
|
29
|
+
exports.UNMERGED_DICTIONARIES_DIR = UNMERGED_DICTIONARIES_DIR;
|
|
2
30
|
//# sourceMappingURL=system.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.cjs","names":[],"sources":["../../../src/defaultValues/system.ts"],"sourcesContent":["export const MAIN_DIR = '.intlayer/main';\n\nexport const DICTIONARIES_DIR = '.intlayer/dictionary';\n\nexport const MASKS_DIR = '.intlayer/mask';\n\nexport const REMOTE_DICTIONARIES_DIR = '.intlayer/remote_dictionary';\n\nexport const UNMERGED_DICTIONARIES_DIR = '.intlayer/unmerged_dictionary';\n\nexport const DYNAMIC_DICTIONARIES_DIR = '.intlayer/dynamic_dictionary';\n\nexport const FETCH_DICTIONARIES_DIR = '.intlayer/fetch_dictionary';\n\nexport const TYPES_DIR = '.intlayer/types';\n\nexport const MODULE_AUGMENTATION_DIR = '.intlayer/types';\n\nexport const CONFIG_DIR = '.intlayer/config';\n\nexport const CACHE_DIR = '.intlayer/cache';\n\nexport const TEMP_DIR = '.intlayer/tmp';\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"system.cjs","names":[],"sources":["../../../src/defaultValues/system.ts"],"sourcesContent":["export const MAIN_DIR = '.intlayer/main';\n\nexport const DICTIONARIES_DIR = '.intlayer/dictionary';\n\nexport const MASKS_DIR = '.intlayer/mask';\n\nexport const REMOTE_DICTIONARIES_DIR = '.intlayer/remote_dictionary';\n\nexport const UNMERGED_DICTIONARIES_DIR = '.intlayer/unmerged_dictionary';\n\nexport const DYNAMIC_DICTIONARIES_DIR = '.intlayer/dynamic_dictionary';\n\nexport const FETCH_DICTIONARIES_DIR = '.intlayer/fetch_dictionary';\n\nexport const TYPES_DIR = '.intlayer/types';\n\nexport const MODULE_AUGMENTATION_DIR = '.intlayer/types';\n\nexport const CONFIG_DIR = '.intlayer/config';\n\nexport const CACHE_DIR = '.intlayer/cache';\n\nexport const TEMP_DIR = '.intlayer/tmp';\n"],"mappings":";;;AAAA,MAAa,WAAW;AAExB,MAAa,mBAAmB;AAEhC,MAAa,YAAY;AAEzB,MAAa,0BAA0B;AAEvC,MAAa,4BAA4B;AAEzC,MAAa,2BAA2B;AAExC,MAAa,yBAAyB;AAEtC,MAAa,YAAY;AAEzB,MAAa,0BAA0B;AAEvC,MAAa,aAAa;AAE1B,MAAa,YAAY;AAEzB,MAAa,WAAW"}
|
package/dist/cjs/loadEnvFile.cjs
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
|
+
let dotenv = require("dotenv");
|
|
5
|
+
dotenv = require_runtime.__toESM(dotenv);
|
|
6
|
+
|
|
7
|
+
//#region src/loadEnvFile.ts
|
|
8
|
+
const DEFAULT_ENV = process.env.NODE_ENV ?? "development";
|
|
9
|
+
const getEnvFilePath = (env = process.env.NODE_ENV ?? "development", envFile) => {
|
|
10
|
+
return (envFile ? [envFile] : [
|
|
11
|
+
`.env.${env}.local`,
|
|
12
|
+
`.env.${env}`,
|
|
13
|
+
".env.local",
|
|
14
|
+
".env"
|
|
15
|
+
]).find(node_fs.existsSync);
|
|
16
|
+
};
|
|
17
|
+
const loadEnvFile = (options) => {
|
|
18
|
+
const envFiles = getEnvFilePath(options?.env ?? DEFAULT_ENV, options?.envFile);
|
|
19
|
+
if (!envFiles) return {};
|
|
20
|
+
const result = {};
|
|
21
|
+
dotenv.default.config({
|
|
22
|
+
path: envFiles,
|
|
23
|
+
processEnv: result,
|
|
24
|
+
quiet: true
|
|
25
|
+
});
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
exports.getEnvFilePath = getEnvFilePath;
|
|
31
|
+
exports.loadEnvFile = loadEnvFile;
|
|
2
32
|
//# sourceMappingURL=loadEnvFile.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadEnvFile.cjs","names":["existsSync"],"sources":["../../src/loadEnvFile.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport dotenv from 'dotenv';\n\nconst DEFAULT_ENV = process.env.NODE_ENV ?? 'development';\n\nexport type LoadEnvFileOptions = {\n env?: string;\n envFile?: string;\n};\n\nexport const getEnvFilePath = (\n env: string = process.env.NODE_ENV ?? 'development',\n envFile?: string\n): string | undefined => {\n const envFiles = envFile\n ? [envFile]\n : [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env'];\n\n return envFiles.find(existsSync); // Returns the first existing env file\n};\n\nexport const loadEnvFile = (options?: Partial<LoadEnvFileOptions>) => {\n const env = options?.env ?? DEFAULT_ENV;\n\n const envFiles = getEnvFilePath(env, options?.envFile);\n\n if (!envFiles) {\n return {};\n }\n\n const result = {};\n\n dotenv.config({\n path: envFiles,\n processEnv: result,\n quiet: true,\n });\n\n return result; // Return the parsed env object\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadEnvFile.cjs","names":["existsSync"],"sources":["../../src/loadEnvFile.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport dotenv from 'dotenv';\n\nconst DEFAULT_ENV = process.env.NODE_ENV ?? 'development';\n\nexport type LoadEnvFileOptions = {\n env?: string;\n envFile?: string;\n};\n\nexport const getEnvFilePath = (\n env: string = process.env.NODE_ENV ?? 'development',\n envFile?: string\n): string | undefined => {\n const envFiles = envFile\n ? [envFile]\n : [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env'];\n\n return envFiles.find(existsSync); // Returns the first existing env file\n};\n\nexport const loadEnvFile = (options?: Partial<LoadEnvFileOptions>) => {\n const env = options?.env ?? DEFAULT_ENV;\n\n const envFiles = getEnvFilePath(env, options?.envFile);\n\n if (!envFiles) {\n return {};\n }\n\n const result = {};\n\n dotenv.config({\n path: envFiles,\n processEnv: result,\n quiet: true,\n });\n\n return result; // Return the parsed env object\n};\n"],"mappings":";;;;;;;AAGA,MAAM,cAAc,QAAQ,IAAI,YAAY;AAO5C,MAAa,kBACX,MAAc,QAAQ,IAAI,YAAY,eACtC,YACuB;AAKvB,SAJiB,UACb,CAAC,QAAQ,GACT;EAAC,QAAQ,IAAI;EAAS,QAAQ;EAAO;EAAc;EAAO,EAE9C,KAAKA,mBAAW;;AAGlC,MAAa,eAAe,YAA0C;CAGpE,MAAM,WAAW,eAFL,SAAS,OAAO,aAES,SAAS,QAAQ;AAEtD,KAAI,CAAC,SACH,QAAO,EAAE;CAGX,MAAM,SAAS,EAAE;AAEjB,gBAAO,OAAO;EACZ,MAAM;EACN,YAAY;EACZ,OAAO;EACR,CAAC;AAEF,QAAO"}
|
|
@@ -1,2 +1,72 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let node_path = require("node:path");
|
|
4
|
+
let esbuild = require("esbuild");
|
|
5
|
+
let node_url = require("node:url");
|
|
6
|
+
|
|
7
|
+
//#region src/loadExternalFile/bundleFile.ts
|
|
8
|
+
const getLoader = (extension) => {
|
|
9
|
+
switch (extension) {
|
|
10
|
+
case ".js": return "js";
|
|
11
|
+
case ".jsx": return "jsx";
|
|
12
|
+
case ".mjs": return "js";
|
|
13
|
+
case ".ts": return "ts";
|
|
14
|
+
case ".tsx": return "tsx";
|
|
15
|
+
case ".cjs": return "js";
|
|
16
|
+
case ".json": return "json";
|
|
17
|
+
case ".md": return "text";
|
|
18
|
+
case ".mdx": return "text";
|
|
19
|
+
default: return "js";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const getTransformationOptions = (filePath) => ({
|
|
23
|
+
loader: {
|
|
24
|
+
".js": "js",
|
|
25
|
+
".jsx": "jsx",
|
|
26
|
+
".mjs": "js",
|
|
27
|
+
".ts": "ts",
|
|
28
|
+
".tsx": "tsx",
|
|
29
|
+
".cjs": "js",
|
|
30
|
+
".json": "json",
|
|
31
|
+
".md": "text",
|
|
32
|
+
".mdx": "text"
|
|
33
|
+
},
|
|
34
|
+
format: "cjs",
|
|
35
|
+
target: "node16",
|
|
36
|
+
platform: "neutral",
|
|
37
|
+
write: false,
|
|
38
|
+
packages: "bundle",
|
|
39
|
+
external: ["esbuild"],
|
|
40
|
+
bundle: true,
|
|
41
|
+
define: { "import.meta.url": JSON.stringify((0, node_url.pathToFileURL)(filePath).href) }
|
|
42
|
+
});
|
|
43
|
+
const bundleFileSync = (code, filePath, options) => {
|
|
44
|
+
return (0, esbuild.buildSync)({
|
|
45
|
+
stdin: {
|
|
46
|
+
contents: code,
|
|
47
|
+
loader: getLoader((0, node_path.extname)(filePath)),
|
|
48
|
+
resolveDir: (0, node_path.dirname)(filePath),
|
|
49
|
+
sourcefile: filePath
|
|
50
|
+
},
|
|
51
|
+
...getTransformationOptions(filePath),
|
|
52
|
+
...options
|
|
53
|
+
}).outputFiles?.[0].text;
|
|
54
|
+
};
|
|
55
|
+
const bundleFile = async (code, filePath, options) => {
|
|
56
|
+
return (await (0, esbuild.build)({
|
|
57
|
+
stdin: {
|
|
58
|
+
contents: code,
|
|
59
|
+
loader: getLoader((0, node_path.extname)(filePath)),
|
|
60
|
+
resolveDir: (0, node_path.dirname)(filePath),
|
|
61
|
+
sourcefile: filePath
|
|
62
|
+
},
|
|
63
|
+
...getTransformationOptions(filePath),
|
|
64
|
+
...options
|
|
65
|
+
})).outputFiles?.[0].text;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
exports.bundleFile = bundleFile;
|
|
70
|
+
exports.bundleFileSync = bundleFileSync;
|
|
71
|
+
exports.getLoader = getLoader;
|
|
2
72
|
//# sourceMappingURL=bundleFile.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundleFile.cjs","names":[],"sources":["../../../src/loadExternalFile/bundleFile.ts"],"sourcesContent":["import { dirname, extname } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport {\n type BuildOptions,\n type BuildResult,\n build,\n buildSync,\n type Loader,\n type Plugin,\n} from 'esbuild';\n\nexport type ESBuildPlugin = Plugin;\n\nexport const getLoader = (extension: string): Loader => {\n switch (extension) {\n case '.js':\n return 'js';\n case '.jsx':\n return 'jsx';\n case '.mjs':\n return 'js';\n case '.ts':\n return 'ts';\n case '.tsx':\n return 'tsx';\n case '.cjs':\n return 'js';\n case '.json':\n return 'json';\n case '.md':\n return 'text';\n case '.mdx':\n return 'text';\n default:\n return 'js';\n }\n};\n\nconst getTransformationOptions = (filePath: string): BuildOptions => ({\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 format: 'cjs',\n target: 'node16',\n platform: 'neutral',\n write: false,\n packages: 'bundle',\n external: ['esbuild'],\n bundle: true,\n define: {\n 'import.meta.url': JSON.stringify(pathToFileURL(filePath).href),\n },\n});\n\nexport const bundleFileSync = (\n code: string,\n filePath: string,\n options?: BuildOptions\n): string | undefined => {\n const extension = extname(filePath);\n const loader = getLoader(extension);\n\n const moduleResult: BuildResult = buildSync({\n stdin: {\n contents: code,\n loader,\n resolveDir: dirname(filePath), // Add resolveDir to resolve imports relative to the file's location\n sourcefile: filePath, // Add sourcefile for better error messages\n },\n ...getTransformationOptions(filePath),\n ...options,\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n return moduleResultString;\n};\n\nexport const bundleFile = async (\n code: string,\n filePath: string,\n options?: BuildOptions\n): Promise<string | undefined> => {\n const extension = extname(filePath);\n const loader = getLoader(extension);\n\n const moduleResult: BuildResult = await build({\n stdin: {\n contents: code,\n loader,\n resolveDir: dirname(filePath), // Add resolveDir to resolve imports relative to the file's location\n sourcefile: filePath, // Add sourcefile for better error messages\n },\n ...getTransformationOptions(filePath),\n ...options,\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n return moduleResultString;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundleFile.cjs","names":[],"sources":["../../../src/loadExternalFile/bundleFile.ts"],"sourcesContent":["import { dirname, extname } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport {\n type BuildOptions,\n type BuildResult,\n build,\n buildSync,\n type Loader,\n type Plugin,\n} from 'esbuild';\n\nexport type ESBuildPlugin = Plugin;\n\nexport const getLoader = (extension: string): Loader => {\n switch (extension) {\n case '.js':\n return 'js';\n case '.jsx':\n return 'jsx';\n case '.mjs':\n return 'js';\n case '.ts':\n return 'ts';\n case '.tsx':\n return 'tsx';\n case '.cjs':\n return 'js';\n case '.json':\n return 'json';\n case '.md':\n return 'text';\n case '.mdx':\n return 'text';\n default:\n return 'js';\n }\n};\n\nconst getTransformationOptions = (filePath: string): BuildOptions => ({\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 format: 'cjs',\n target: 'node16',\n platform: 'neutral',\n write: false,\n packages: 'bundle',\n external: ['esbuild'],\n bundle: true,\n define: {\n 'import.meta.url': JSON.stringify(pathToFileURL(filePath).href),\n },\n});\n\nexport const bundleFileSync = (\n code: string,\n filePath: string,\n options?: BuildOptions\n): string | undefined => {\n const extension = extname(filePath);\n const loader = getLoader(extension);\n\n const moduleResult: BuildResult = buildSync({\n stdin: {\n contents: code,\n loader,\n resolveDir: dirname(filePath), // Add resolveDir to resolve imports relative to the file's location\n sourcefile: filePath, // Add sourcefile for better error messages\n },\n ...getTransformationOptions(filePath),\n ...options,\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n return moduleResultString;\n};\n\nexport const bundleFile = async (\n code: string,\n filePath: string,\n options?: BuildOptions\n): Promise<string | undefined> => {\n const extension = extname(filePath);\n const loader = getLoader(extension);\n\n const moduleResult: BuildResult = await build({\n stdin: {\n contents: code,\n loader,\n resolveDir: dirname(filePath), // Add resolveDir to resolve imports relative to the file's location\n sourcefile: filePath, // Add sourcefile for better error messages\n },\n ...getTransformationOptions(filePath),\n ...options,\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n return moduleResultString;\n};\n"],"mappings":";;;;;;;AAaA,MAAa,aAAa,cAA8B;AACtD,SAAQ,WAAR;EACE,KAAK,MACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,KAAK,MACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,QACE,QAAO;;;AAIb,MAAM,4BAA4B,cAAoC;CACpE,QAAQ;EACN,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,SAAS;EACT,OAAO;EACP,QAAQ;EACT;CACD,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,OAAO;CACP,UAAU;CACV,UAAU,CAAC,UAAU;CACrB,QAAQ;CACR,QAAQ,EACN,mBAAmB,KAAK,sCAAwB,SAAS,CAAC,KAAK,EAChE;CACF;AAED,MAAa,kBACX,MACA,UACA,YACuB;AAiBvB,+BAb4C;EAC1C,OAAO;GACL,UAAU;GACV,QALW,iCADW,SAAS,CACA;GAM/B,mCAAoB,SAAS;GAC7B,YAAY;GACb;EACD,GAAG,yBAAyB,SAAS;EACrC,GAAG;EACJ,CAAC,CAEsC,cAAc,GAAG;;AAK3D,MAAa,aAAa,OACxB,MACA,UACA,YACgC;AAiBhC,SAbkC,yBAAY;EAC5C,OAAO;GACL,UAAU;GACV,QALW,iCADW,SAAS,CACA;GAM/B,mCAAoB,SAAS;GAC7B,YAAY;GACb;EACD,GAAG,yBAAyB,SAAS;EACrC,GAAG;EACJ,CAAC,EAEsC,cAAc,GAAG"}
|
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
let esbuild = require("esbuild");
|
|
4
|
+
|
|
5
|
+
//#region src/loadExternalFile/bundleJSFile.ts
|
|
6
|
+
const commonBuildOptions = {
|
|
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
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const bundleJSFile = async (buildOptions) => await (0, esbuild.build)({
|
|
28
|
+
...commonBuildOptions,
|
|
29
|
+
...buildOptions
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.bundleJSFile = bundleJSFile;
|
|
2
34
|
//# sourceMappingURL=bundleJSFile.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundleJSFile.cjs","names":[],"sources":["../../../src/loadExternalFile/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":"
|
|
1
|
+
{"version":3,"file":"bundleJSFile.cjs","names":[],"sources":["../../../src/loadExternalFile/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"}
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_loadExternalFile_parseFileContent = require('./parseFileContent.cjs');
|
|
3
|
+
const require_loadExternalFile_bundleFile = require('./bundleFile.cjs');
|
|
4
|
+
const require_loadExternalFile_transpileTSToCJS = require('./transpileTSToCJS.cjs');
|
|
5
|
+
const require_loadExternalFile_loadExternalFile = require('./loadExternalFile.cjs');
|
|
6
|
+
const require_loadExternalFile_bundleJSFile = require('./bundleJSFile.cjs');
|
|
7
|
+
|
|
8
|
+
exports.bundleFile = require_loadExternalFile_bundleFile.bundleFile;
|
|
9
|
+
exports.bundleFileSync = require_loadExternalFile_bundleFile.bundleFileSync;
|
|
10
|
+
exports.bundleJSFile = require_loadExternalFile_bundleJSFile.bundleJSFile;
|
|
11
|
+
exports.getLoader = require_loadExternalFile_bundleFile.getLoader;
|
|
12
|
+
exports.getSandBoxContext = require_loadExternalFile_parseFileContent.getSandBoxContext;
|
|
13
|
+
exports.loadExternalFile = require_loadExternalFile_loadExternalFile.loadExternalFile;
|
|
14
|
+
exports.loadExternalFileSync = require_loadExternalFile_loadExternalFile.loadExternalFileSync;
|
|
15
|
+
exports.parseFileContent = require_loadExternalFile_parseFileContent.parseFileContent;
|
|
16
|
+
exports.transpileTSToCJS = require_loadExternalFile_transpileTSToCJS.transpileTSToCJS;
|
|
17
|
+
exports.transpileTSToCJSSync = require_loadExternalFile_transpileTSToCJS.transpileTSToCJSSync;
|
|
@@ -1,2 +1,78 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_logger = require('../logger.cjs');
|
|
4
|
+
const require_loadExternalFile_parseFileContent = require('./parseFileContent.cjs');
|
|
5
|
+
const require_loadExternalFile_transpileTSToCJS = require('./transpileTSToCJS.cjs');
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
|
+
let node_path = require("node:path");
|
|
8
|
+
let node_fs_promises = require("node:fs/promises");
|
|
9
|
+
let json5 = require("json5");
|
|
10
|
+
json5 = require_runtime.__toESM(json5);
|
|
11
|
+
|
|
12
|
+
//#region src/loadExternalFile/loadExternalFile.ts
|
|
13
|
+
const parseJSON5 = json5.default.parse || json5.default.default?.parse;
|
|
14
|
+
/**
|
|
15
|
+
* Load the content declaration from the given path
|
|
16
|
+
*
|
|
17
|
+
* Accepts JSON, JS, MJS and TS files as configuration
|
|
18
|
+
*/
|
|
19
|
+
const loadExternalFileSync = (filePath, options) => {
|
|
20
|
+
const fileExtension = (0, node_path.extname)(filePath) || ".json";
|
|
21
|
+
try {
|
|
22
|
+
if (fileExtension === ".json" || fileExtension === ".json5" || fileExtension === ".jsonc") return parseJSON5((0, node_fs.readFileSync)(filePath, "utf-8"));
|
|
23
|
+
const moduleResultString = require_loadExternalFile_transpileTSToCJS.transpileTSToCJSSync((0, node_fs.readFileSync)(filePath, "utf-8"), filePath, options?.buildOptions);
|
|
24
|
+
if (!moduleResultString) {
|
|
25
|
+
require_logger.logger("File could not be loaded.", { level: "error" });
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const fileContent = require_loadExternalFile_parseFileContent.parseFileContent(moduleResultString, {
|
|
29
|
+
projectRequire: options?.projectRequire,
|
|
30
|
+
envVarOptions: options?.envVarOptions,
|
|
31
|
+
additionalEnvVars: options?.additionalEnvVars,
|
|
32
|
+
mocks: options?.mocks,
|
|
33
|
+
aliases: options?.aliases
|
|
34
|
+
});
|
|
35
|
+
if (typeof fileContent === "undefined") {
|
|
36
|
+
require_logger.logger(`File could not be loaded. Path : ${filePath}`);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
return fileContent;
|
|
40
|
+
} catch (error) {
|
|
41
|
+
require_logger.logger([`Error: ${error.message} - `, JSON.stringify(error.stack, null, 2)], { level: "error" });
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Load the content declaration from the given path
|
|
46
|
+
*
|
|
47
|
+
* Accepts JSON, JS, MJS and TS files as configuration
|
|
48
|
+
*/
|
|
49
|
+
const loadExternalFile = async (filePath, options) => {
|
|
50
|
+
const fileExtension = (0, node_path.extname)(filePath);
|
|
51
|
+
try {
|
|
52
|
+
if (fileExtension === ".json" || fileExtension === ".json5" || fileExtension === ".jsonc") return parseJSON5(await (0, node_fs_promises.readFile)(filePath, "utf-8"));
|
|
53
|
+
const moduleResultString = await require_loadExternalFile_transpileTSToCJS.transpileTSToCJS(await (0, node_fs_promises.readFile)(filePath, "utf-8"), filePath, options?.buildOptions);
|
|
54
|
+
if (!moduleResultString) {
|
|
55
|
+
require_logger.logger("File could not be loaded.", { level: "error" });
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const fileContent = require_loadExternalFile_parseFileContent.parseFileContent(moduleResultString, {
|
|
59
|
+
projectRequire: options?.projectRequire,
|
|
60
|
+
envVarOptions: options?.envVarOptions,
|
|
61
|
+
additionalEnvVars: options?.additionalEnvVars,
|
|
62
|
+
mocks: options?.mocks,
|
|
63
|
+
aliases: options?.aliases
|
|
64
|
+
});
|
|
65
|
+
if (typeof fileContent === "undefined") {
|
|
66
|
+
require_logger.logger(`File could not be loaded. Path : ${require_logger.colorizePath(filePath)}`);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
return fileContent;
|
|
70
|
+
} catch (error) {
|
|
71
|
+
if (options?.logError ?? true) require_logger.logger([`Error: ${error.message} - `, JSON.stringify(error.stack, null, 2)], { level: "error" });
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
exports.loadExternalFile = loadExternalFile;
|
|
77
|
+
exports.loadExternalFileSync = loadExternalFileSync;
|
|
2
78
|
//# sourceMappingURL=loadExternalFile.cjs.map
|