@intlayer/config 1.0.2 → 1.2.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/client.cjs +2 -10
- package/dist/cjs/client.cjs.map +1 -1
- package/dist/cjs/client.d.ts +1 -1
- package/dist/cjs/configFile/buildConfigurationFields.cjs +295 -39
- package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
- package/dist/cjs/configFile/buildConfigurationFields.d.ts +3 -0
- package/dist/cjs/configFile/getConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/getConfiguration.d.ts +3 -0
- package/dist/cjs/configFile/index.cjs +3 -1
- package/dist/cjs/configFile/index.cjs.map +1 -1
- package/dist/cjs/configFile/index.d.ts +1 -0
- package/dist/cjs/configFile/loadConfigurationFile.cjs +8 -1
- package/dist/cjs/configFile/loadConfigurationFile.cjs.map +1 -1
- package/dist/cjs/configFile/loadConfigurationFile.d.ts +6 -0
- package/dist/cjs/configFile/searchConfigurationFile.cjs.map +1 -1
- package/dist/cjs/configFile/searchConfigurationFile.d.ts +11 -0
- package/dist/cjs/defaultValues/internationalization.cjs +1 -5
- package/dist/cjs/defaultValues/internationalization.cjs.map +1 -1
- package/dist/cjs/defaultValues/internationalization.d.ts +1 -1
- package/dist/cjs/defaultValues/server.cjs +15 -7
- package/dist/cjs/defaultValues/server.cjs.map +1 -1
- package/dist/cjs/defaultValues/server.d.ts +6 -3
- package/dist/cjs/envVariables/detectPlatform.cjs +56 -0
- package/dist/cjs/envVariables/detectPlatform.cjs.map +1 -0
- package/dist/cjs/envVariables/detectPlatform.d.ts +8 -0
- package/dist/cjs/envVariables/extractEnvVariable/index.cjs +44 -0
- package/dist/cjs/envVariables/extractEnvVariable/index.cjs.map +1 -0
- package/dist/cjs/envVariables/extractEnvVariable/index.d.ts +7 -0
- package/dist/cjs/envVariables/extractEnvVariable/next.cjs +70 -0
- package/dist/cjs/envVariables/extractEnvVariable/next.cjs.map +1 -0
- package/dist/cjs/envVariables/extractEnvVariable/next.d.ts +7 -0
- package/dist/cjs/envVariables/extractEnvVariable/react_app.cjs +70 -0
- package/dist/cjs/envVariables/extractEnvVariable/react_app.cjs.map +1 -0
- package/dist/cjs/envVariables/extractEnvVariable/react_app.d.ts +7 -0
- package/dist/cjs/envVariables/extractEnvVariable/types.cjs +17 -0
- package/dist/cjs/envVariables/extractEnvVariable/types.cjs.map +1 -0
- package/dist/cjs/envVariables/extractEnvVariable/types.d.ts +11 -0
- package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.cjs +70 -0
- package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.cjs.map +1 -0
- package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.d.ts +7 -0
- package/dist/cjs/envVariables/extractEnvVariable/vite.cjs +78 -0
- package/dist/cjs/envVariables/extractEnvVariable/vite.cjs.map +1 -0
- package/dist/cjs/envVariables/extractEnvVariable/vite.d.ts +7 -0
- package/dist/cjs/envVariables/extractEnvVariable/vite_env.d.cjs +2 -0
- package/dist/cjs/envVariables/extractEnvVariable/vite_env.d.cjs.map +1 -0
- package/dist/cjs/envVariables/extractEnvVariable/vite_env.d.d.ts +2 -0
- package/dist/cjs/envVariables/formatEnvVariable.cjs +6 -4
- package/dist/cjs/envVariables/formatEnvVariable.cjs.map +1 -1
- package/dist/cjs/envVariables/formatEnvVariable.d.ts +6 -1
- package/dist/cjs/envVariables/getConfiguration.cjs +79 -116
- package/dist/cjs/envVariables/getConfiguration.cjs.map +1 -1
- package/dist/cjs/envVariables/getConfiguration.d.ts +7 -6
- package/dist/cjs/envVariables/index.cjs +2 -10
- package/dist/cjs/envVariables/index.cjs.map +1 -1
- package/dist/cjs/envVariables/index.d.ts +2 -1
- package/dist/cjs/envVariables/utils.cjs +7 -6
- package/dist/cjs/envVariables/utils.cjs.map +1 -1
- package/dist/cjs/envVariables/utils.d.ts +5 -5
- package/dist/cjs/index.cjs +2 -10
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/types/config.cjs.map +1 -1
- package/dist/cjs/types/config.d.ts +253 -7
- package/dist/cjs/types/locales.cjs.map +1 -1
- package/dist/cjs/types/locales.d.ts +233 -0
- package/dist/esm/client.d.mts +1 -1
- package/dist/esm/client.mjs +2 -12
- package/dist/esm/client.mjs.map +1 -1
- package/dist/esm/configFile/buildConfigurationFields.d.mts +3 -0
- package/dist/esm/configFile/buildConfigurationFields.mjs +298 -42
- package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
- package/dist/esm/configFile/getConfiguration.d.mts +3 -0
- package/dist/esm/configFile/getConfiguration.mjs.map +1 -1
- package/dist/esm/configFile/index.d.mts +1 -0
- package/dist/esm/configFile/index.mjs +1 -0
- package/dist/esm/configFile/index.mjs.map +1 -1
- package/dist/esm/configFile/loadConfigurationFile.d.mts +6 -0
- package/dist/esm/configFile/loadConfigurationFile.mjs +8 -1
- package/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -1
- package/dist/esm/configFile/searchConfigurationFile.d.mts +11 -0
- package/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -1
- package/dist/esm/defaultValues/internationalization.d.mts +1 -1
- package/dist/esm/defaultValues/internationalization.mjs +1 -5
- package/dist/esm/defaultValues/internationalization.mjs.map +1 -1
- package/dist/esm/defaultValues/server.d.mts +6 -3
- package/dist/esm/defaultValues/server.mjs +13 -5
- package/dist/esm/defaultValues/server.mjs.map +1 -1
- package/dist/esm/envVariables/detectPlatform.d.mts +8 -0
- package/dist/esm/envVariables/detectPlatform.mjs +30 -0
- package/dist/esm/envVariables/detectPlatform.mjs.map +1 -0
- package/dist/esm/envVariables/extractEnvVariable/index.d.mts +7 -0
- package/dist/esm/envVariables/extractEnvVariable/index.mjs +20 -0
- package/dist/esm/envVariables/extractEnvVariable/index.mjs.map +1 -0
- package/dist/esm/envVariables/extractEnvVariable/next.d.mts +7 -0
- package/dist/esm/envVariables/extractEnvVariable/next.mjs +46 -0
- package/dist/esm/envVariables/extractEnvVariable/next.mjs.map +1 -0
- package/dist/esm/envVariables/extractEnvVariable/react_app.d.mts +7 -0
- package/dist/esm/envVariables/extractEnvVariable/react_app.mjs +46 -0
- package/dist/esm/envVariables/extractEnvVariable/react_app.mjs.map +1 -0
- package/dist/esm/envVariables/extractEnvVariable/types.d.mts +11 -0
- package/dist/esm/envVariables/extractEnvVariable/types.mjs +1 -0
- package/dist/esm/envVariables/extractEnvVariable/types.mjs.map +1 -0
- package/dist/esm/envVariables/extractEnvVariable/undefined_platform.d.mts +7 -0
- package/dist/esm/envVariables/extractEnvVariable/undefined_platform.mjs +46 -0
- package/dist/esm/envVariables/extractEnvVariable/undefined_platform.mjs.map +1 -0
- package/dist/esm/envVariables/extractEnvVariable/vite.d.mts +7 -0
- package/dist/esm/envVariables/extractEnvVariable/vite.mjs +53 -0
- package/dist/esm/envVariables/extractEnvVariable/vite.mjs.map +1 -0
- package/dist/esm/envVariables/extractEnvVariable/vite_env.d.d.mts +2 -0
- package/dist/esm/envVariables/extractEnvVariable/vite_env.d.mjs +1 -0
- package/dist/esm/envVariables/extractEnvVariable/vite_env.d.mjs.map +1 -0
- package/dist/esm/envVariables/formatEnvVariable.d.mts +6 -1
- package/dist/esm/envVariables/formatEnvVariable.mjs +6 -4
- package/dist/esm/envVariables/formatEnvVariable.mjs.map +1 -1
- package/dist/esm/envVariables/getConfiguration.d.mts +7 -6
- package/dist/esm/envVariables/getConfiguration.mjs +78 -111
- package/dist/esm/envVariables/getConfiguration.mjs.map +1 -1
- package/dist/esm/envVariables/index.d.mts +2 -1
- package/dist/esm/envVariables/index.mjs +2 -12
- package/dist/esm/envVariables/index.mjs.map +1 -1
- package/dist/esm/envVariables/utils.d.mts +5 -5
- package/dist/esm/envVariables/utils.mjs +7 -6
- package/dist/esm/envVariables/utils.mjs.map +1 -1
- package/dist/esm/index.d.mts +2 -1
- package/dist/esm/index.mjs +1 -9
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/types/config.d.mts +253 -7
- package/dist/esm/types/locales.d.mts +233 -0
- package/dist/esm/types/locales.mjs.map +1 -1
- package/package.json +7 -7
- package/src/client.ts +1 -7
- package/src/configFile/buildConfigurationFields.ts +306 -46
- package/src/configFile/getConfiguration.ts +3 -0
- package/src/configFile/index.ts +1 -0
- package/src/configFile/loadConfigurationFile.ts +19 -1
- package/src/configFile/searchConfigurationFile.ts +11 -0
- package/src/defaultValues/server.ts +14 -4
- package/src/envVariables/detectPlatform.ts +41 -0
- package/src/envVariables/extractEnvVariable/index.ts +20 -0
- package/src/envVariables/extractEnvVariable/next.ts +57 -0
- package/src/envVariables/extractEnvVariable/react_app.ts +57 -0
- package/src/envVariables/extractEnvVariable/types.ts +10 -0
- package/src/envVariables/extractEnvVariable/undefined_platform.ts +52 -0
- package/src/envVariables/extractEnvVariable/vite.ts +65 -0
- package/src/envVariables/extractEnvVariable/vite_env.d.ts +9 -0
- package/src/envVariables/formatEnvVariable.ts +17 -11
- package/src/envVariables/getConfiguration.ts +85 -113
- package/src/envVariables/index.ts +1 -7
- package/src/envVariables/utils.ts +30 -14
- package/src/index.ts +0 -4
- package/src/types/config.ts +279 -63
- package/src/types/locales.ts +233 -233
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
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 vite_exports = {};
|
|
20
|
+
__export(vite_exports, {
|
|
21
|
+
extractViteEnvVariable: () => extractViteEnvVariable
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(vite_exports);
|
|
24
|
+
var import_undefined_platform = require('./undefined_platform.cjs');
|
|
25
|
+
const import_meta = {};
|
|
26
|
+
const extractViteEnvVariable = () => {
|
|
27
|
+
if (!import_meta.env) {
|
|
28
|
+
console.error(
|
|
29
|
+
"Vite env variables cannot be loaded on a commonjs environment."
|
|
30
|
+
);
|
|
31
|
+
return (0, import_undefined_platform.extractEmptyEnvVariable)();
|
|
32
|
+
}
|
|
33
|
+
const internationalization = {
|
|
34
|
+
locales: import_meta.env.VITE_INTLAYER_LOCALES,
|
|
35
|
+
defaultLocale: import_meta.env.VITE_INTLAYER_DEFAULT_LOCALE
|
|
36
|
+
};
|
|
37
|
+
const middleware = {
|
|
38
|
+
headerName: import_meta.env.VITE_INTLAYER_HEADER_NAME,
|
|
39
|
+
cookieName: import_meta.env.VITE_INTLAYER_COOKIE_NAME,
|
|
40
|
+
prefixDefault: import_meta.env.VITE_INTLAYER_PREFIX_DEFAULT,
|
|
41
|
+
basePath: import_meta.env.VITE_INTLAYER_BASE_PATH,
|
|
42
|
+
serverSetCookie: import_meta.env.VITE_INTLAYER_SERVER_SET_COOKIE,
|
|
43
|
+
noPrefix: import_meta.env.VITE_INTLAYER_NO_PREFIX
|
|
44
|
+
};
|
|
45
|
+
const content = {
|
|
46
|
+
fileExtensions: import_meta.env.VITE_INTLAYER_FILE_EXTENSIONS,
|
|
47
|
+
baseDir: import_meta.env.VITE_INTLAYER_BASE_DIR,
|
|
48
|
+
contentDirName: import_meta.env.VITE_INTLAYER_CONTENT_DIR_NAME,
|
|
49
|
+
contentDir: import_meta.env.VITE_INTLAYER_CONTENT_DIR,
|
|
50
|
+
excludedPath: import_meta.env.VITE_INTLAYER_EXCLUDED_PATH,
|
|
51
|
+
resultDirName: import_meta.env.VITE_INTLAYER_RESULT_DIR_NAME,
|
|
52
|
+
moduleAugmentationDirName: import_meta.env.VITE_INTLAYER_MODULE_AUGMENTATION_DIR_NAME,
|
|
53
|
+
dictionariesDirName: import_meta.env.VITE_INTLAYER_DICTIONARIES_DIR_NAME,
|
|
54
|
+
i18nDictionariesDirName: import_meta.env.VITE_INTLAYER_I18N_DICTIONARIES_DIR_NAME,
|
|
55
|
+
typeDirName: import_meta.env.VITE_INTLAYER_TYPE_DIR_NAME,
|
|
56
|
+
mainDirName: import_meta.env.VITE_INTLAYER_MAIN_DIR_NAME,
|
|
57
|
+
resultDir: import_meta.env.VITE_INTLAYER_RESULT_DIR,
|
|
58
|
+
moduleAugmentationDir: import_meta.env.VITE_INTLAYER_MODULE_AUGMENTATION_DIR,
|
|
59
|
+
dictionariesDir: import_meta.env.VITE_INTLAYER_DICTIONARIES_DIR,
|
|
60
|
+
i18nDictionariesDir: import_meta.env.VITE_INTLAYER_I18N_DICTIONARIES_DIR,
|
|
61
|
+
typesDir: import_meta.env.VITE_INTLAYER_TYPE_DIR,
|
|
62
|
+
mainDir: import_meta.env.VITE_INTLAYER_MAIN_DIR,
|
|
63
|
+
watchedFilesPattern: import_meta.env.VITE_INTLAYER_WATCHED_FILES_PATTERN,
|
|
64
|
+
watchedFilesPatternWithPath: import_meta.env.VITE_INTLAYER_WATCHED_FILES_PATTERN_WITH_PATH,
|
|
65
|
+
outputFilesPatternWithPath: import_meta.env.VITE_INTLAYER_OUTPUT_FILES_PATTERN_WITH_PATH,
|
|
66
|
+
dictionaryOutput: import_meta.env.VITE_INTLAYER_DICTIONARY_OUTPUT
|
|
67
|
+
};
|
|
68
|
+
return {
|
|
69
|
+
internationalization,
|
|
70
|
+
middleware,
|
|
71
|
+
content
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
+
0 && (module.exports = {
|
|
76
|
+
extractViteEnvVariable
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=vite.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/envVariables/extractEnvVariable/vite.ts"],"sourcesContent":["import type {\n InternationalizationConfig,\n MiddlewareConfig,\n ContentConfig,\n} from '../../types/config';\nimport type { IntlayerConfigEnvVariable, ReplaceValue } from './types';\nimport { extractEmptyEnvVariable } from './undefined_platform';\n\nexport const extractViteEnvVariable = (): IntlayerConfigEnvVariable => {\n if (!import.meta.env) {\n console.error(\n 'Vite env variables cannot be loaded on a commonjs environment.'\n );\n return extractEmptyEnvVariable();\n }\n\n const internationalization: ReplaceValue<InternationalizationConfig> = {\n locales: import.meta.env.VITE_INTLAYER_LOCALES,\n defaultLocale: import.meta.env.VITE_INTLAYER_DEFAULT_LOCALE,\n };\n\n const middleware: ReplaceValue<MiddlewareConfig> = {\n headerName: import.meta.env.VITE_INTLAYER_HEADER_NAME,\n cookieName: import.meta.env.VITE_INTLAYER_COOKIE_NAME,\n prefixDefault: import.meta.env.VITE_INTLAYER_PREFIX_DEFAULT,\n basePath: import.meta.env.VITE_INTLAYER_BASE_PATH,\n serverSetCookie: import.meta.env.VITE_INTLAYER_SERVER_SET_COOKIE,\n noPrefix: import.meta.env.VITE_INTLAYER_NO_PREFIX,\n };\n\n const content: ReplaceValue<ContentConfig> = {\n fileExtensions: import.meta.env.VITE_INTLAYER_FILE_EXTENSIONS,\n baseDir: import.meta.env.VITE_INTLAYER_BASE_DIR,\n contentDirName: import.meta.env.VITE_INTLAYER_CONTENT_DIR_NAME,\n contentDir: import.meta.env.VITE_INTLAYER_CONTENT_DIR,\n excludedPath: import.meta.env.VITE_INTLAYER_EXCLUDED_PATH,\n resultDirName: import.meta.env.VITE_INTLAYER_RESULT_DIR_NAME,\n moduleAugmentationDirName: import.meta.env\n .VITE_INTLAYER_MODULE_AUGMENTATION_DIR_NAME,\n dictionariesDirName: import.meta.env.VITE_INTLAYER_DICTIONARIES_DIR_NAME,\n i18nDictionariesDirName: import.meta.env\n .VITE_INTLAYER_I18N_DICTIONARIES_DIR_NAME,\n typeDirName: import.meta.env.VITE_INTLAYER_TYPE_DIR_NAME,\n mainDirName: import.meta.env.VITE_INTLAYER_MAIN_DIR_NAME,\n resultDir: import.meta.env.VITE_INTLAYER_RESULT_DIR,\n moduleAugmentationDir: import.meta.env\n .VITE_INTLAYER_MODULE_AUGMENTATION_DIR,\n dictionariesDir: import.meta.env.VITE_INTLAYER_DICTIONARIES_DIR,\n i18nDictionariesDir: import.meta.env.VITE_INTLAYER_I18N_DICTIONARIES_DIR,\n typesDir: import.meta.env.VITE_INTLAYER_TYPE_DIR,\n mainDir: import.meta.env.VITE_INTLAYER_MAIN_DIR,\n watchedFilesPattern: import.meta.env.VITE_INTLAYER_WATCHED_FILES_PATTERN,\n watchedFilesPatternWithPath: import.meta.env\n .VITE_INTLAYER_WATCHED_FILES_PATTERN_WITH_PATH,\n outputFilesPatternWithPath: import.meta.env\n .VITE_INTLAYER_OUTPUT_FILES_PATTERN_WITH_PATH,\n dictionaryOutput: import.meta.env.VITE_INTLAYER_DICTIONARY_OUTPUT,\n };\n\n return {\n internationalization,\n middleware,\n content,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,gCAAwC;AANxC;AAQO,MAAM,yBAAyB,MAAiC;AACrE,MAAI,CAAC,YAAY,KAAK;AACpB,YAAQ;AAAA,MACN;AAAA,IACF;AACA,eAAO,mDAAwB;AAAA,EACjC;AAEA,QAAM,uBAAiE;AAAA,IACrE,SAAS,YAAY,IAAI;AAAA,IACzB,eAAe,YAAY,IAAI;AAAA,EACjC;AAEA,QAAM,aAA6C;AAAA,IACjD,YAAY,YAAY,IAAI;AAAA,IAC5B,YAAY,YAAY,IAAI;AAAA,IAC5B,eAAe,YAAY,IAAI;AAAA,IAC/B,UAAU,YAAY,IAAI;AAAA,IAC1B,iBAAiB,YAAY,IAAI;AAAA,IACjC,UAAU,YAAY,IAAI;AAAA,EAC5B;AAEA,QAAM,UAAuC;AAAA,IAC3C,gBAAgB,YAAY,IAAI;AAAA,IAChC,SAAS,YAAY,IAAI;AAAA,IACzB,gBAAgB,YAAY,IAAI;AAAA,IAChC,YAAY,YAAY,IAAI;AAAA,IAC5B,cAAc,YAAY,IAAI;AAAA,IAC9B,eAAe,YAAY,IAAI;AAAA,IAC/B,2BAA2B,YAAY,IACpC;AAAA,IACH,qBAAqB,YAAY,IAAI;AAAA,IACrC,yBAAyB,YAAY,IAClC;AAAA,IACH,aAAa,YAAY,IAAI;AAAA,IAC7B,aAAa,YAAY,IAAI;AAAA,IAC7B,WAAW,YAAY,IAAI;AAAA,IAC3B,uBAAuB,YAAY,IAChC;AAAA,IACH,iBAAiB,YAAY,IAAI;AAAA,IACjC,qBAAqB,YAAY,IAAI;AAAA,IACrC,UAAU,YAAY,IAAI;AAAA,IAC1B,SAAS,YAAY,IAAI;AAAA,IACzB,qBAAqB,YAAY,IAAI;AAAA,IACrC,6BAA6B,YAAY,IACtC;AAAA,IACH,4BAA4B,YAAY,IACrC;AAAA,IACH,kBAAkB,YAAY,IAAI;AAAA,EACpC;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -22,9 +22,11 @@ __export(formatEnvVariable_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(formatEnvVariable_exports);
|
|
24
24
|
var import_getConfiguration = require('../configFile/getConfiguration.cjs');
|
|
25
|
-
|
|
25
|
+
var import_detectPlatform = require('./detectPlatform.cjs');
|
|
26
|
+
const formatEnvName = (key, prefix) => prefix + key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toUpperCase();
|
|
27
|
+
const formatEnvVariable = (platform) => {
|
|
26
28
|
const intlayerConfig = (0, import_getConfiguration.getConfiguration)();
|
|
27
|
-
const
|
|
29
|
+
const prefix = (0, import_detectPlatform.getPrefix)(platform);
|
|
28
30
|
const env = {};
|
|
29
31
|
for (const [key, value] of Object.entries({
|
|
30
32
|
...intlayerConfig.content,
|
|
@@ -32,9 +34,9 @@ const formatEnvVariable = (prefix = "NEXT_PUBLIC_INTLAYER_") => {
|
|
|
32
34
|
...intlayerConfig.middleware
|
|
33
35
|
})) {
|
|
34
36
|
if (typeof value === "string") {
|
|
35
|
-
env[formatEnvName(key)] = value;
|
|
37
|
+
env[formatEnvName(key, prefix)] = value;
|
|
36
38
|
} else {
|
|
37
|
-
env[formatEnvName(key)] = JSON.stringify(value);
|
|
39
|
+
env[formatEnvName(key, prefix)] = JSON.stringify(value);
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
return env;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/envVariables/formatEnvVariable.ts"],"sourcesContent":["import { getConfiguration } from '../configFile/getConfiguration';\
|
|
1
|
+
{"version":3,"sources":["../../../src/envVariables/formatEnvVariable.ts"],"sourcesContent":["import { getConfiguration } from '../configFile/getConfiguration';\nimport { getPrefix, type Platform } from './detectPlatform';\n\n/**\n * Format a key to corresponding environment variable name\n *\n * Example:\n * toEnvVariable('mainDir') => 'INTLAYER_MAIN_DIR'\n */\nconst formatEnvName = (key: string, prefix: string): string =>\n prefix + key.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toUpperCase();\n\n/**\n * Format all configuration values as environment variables\n */\nexport const formatEnvVariable = (\n platform: Platform\n): Record<string, string> => {\n const intlayerConfig = getConfiguration();\n\n const prefix = getPrefix(platform);\n\n // Set all configuration values as environment variables\n const env: Record<string, string> = {};\n for (const [key, value] of Object.entries({\n ...intlayerConfig.content,\n ...intlayerConfig.internationalization,\n ...intlayerConfig.middleware,\n })) {\n if (typeof value === 'string') {\n env[formatEnvName(key, prefix)] = value;\n } else {\n env[formatEnvName(key, prefix)] = JSON.stringify(value);\n }\n }\n\n return env;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAiC;AACjC,4BAAyC;AAQzC,MAAM,gBAAgB,CAAC,KAAa,WAClC,SAAS,IAAI,QAAQ,sBAAsB,OAAO,EAAE,YAAY;AAK3D,MAAM,oBAAoB,CAC/B,aAC2B;AAC3B,QAAM,qBAAiB,0CAAiB;AAExC,QAAM,aAAS,iCAAU,QAAQ;AAGjC,QAAM,MAA8B,CAAC;AACrC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ;AAAA,IACxC,GAAG,eAAe;AAAA,IAClB,GAAG,eAAe;AAAA,IAClB,GAAG,eAAe;AAAA,EACpB,CAAC,GAAG;AACF,QAAI,OAAO,UAAU,UAAU;AAC7B,UAAI,cAAc,KAAK,MAAM,CAAC,IAAI;AAAA,IACpC,OAAO;AACL,UAAI,cAAc,KAAK,MAAM,CAAC,IAAI,KAAK,UAAU,KAAK;AAAA,IACxD;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { Platform } from './detectPlatform.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Format all configuration values as environment variables
|
|
5
|
+
*/
|
|
6
|
+
declare const formatEnvVariable: (platform: Platform) => Record<string, string>;
|
|
2
7
|
|
|
3
8
|
export { formatEnvVariable };
|
|
@@ -18,127 +18,90 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var getConfiguration_exports = {};
|
|
20
20
|
__export(getConfiguration_exports, {
|
|
21
|
-
getConfiguration: () => getConfiguration
|
|
22
|
-
intlayerConfiguration: () => intlayerConfiguration,
|
|
23
|
-
intlayerContentConfiguration: () => intlayerContentConfiguration,
|
|
24
|
-
intlayerIntlConfiguration: () => intlayerIntlConfiguration,
|
|
25
|
-
intlayerMiddlewareConfiguration: () => intlayerMiddlewareConfiguration
|
|
21
|
+
getConfiguration: () => getConfiguration
|
|
26
22
|
});
|
|
27
23
|
module.exports = __toCommonJS(getConfiguration_exports);
|
|
24
|
+
var import_extractEnvVariable = require('./extractEnvVariable/index.cjs');
|
|
28
25
|
var import_utils = require('./utils.cjs');
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"array"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
const getConfiguration = () => {
|
|
27
|
+
const env = (0, import_extractEnvVariable.extractEnvVariable)();
|
|
28
|
+
const intlayerIntlConfiguration = {
|
|
29
|
+
locales: (0, import_utils.getEnvValue)(env.internationalization.locales, "array"),
|
|
30
|
+
defaultLocale: (0, import_utils.getEnvValue)(
|
|
31
|
+
env?.internationalization.defaultLocale,
|
|
32
|
+
"string"
|
|
33
|
+
)
|
|
34
|
+
};
|
|
35
|
+
const intlayerMiddlewareConfiguration = {
|
|
36
|
+
headerName: (0, import_utils.getEnvValue)(env.middleware.headerName, "string"),
|
|
37
|
+
cookieName: (0, import_utils.getEnvValue)(env.middleware.cookieName, "string"),
|
|
38
|
+
prefixDefault: (0, import_utils.getEnvValue)(env.middleware.prefixDefault, "boolean"),
|
|
39
|
+
basePath: (0, import_utils.getEnvValue)(env.middleware.basePath, "string"),
|
|
40
|
+
serverSetCookie: (0, import_utils.getEnvValue)(
|
|
41
|
+
env.middleware.serverSetCookie,
|
|
42
|
+
"string"
|
|
43
|
+
),
|
|
44
|
+
noPrefix: (0, import_utils.getEnvValue)(env.middleware.noPrefix, "boolean")
|
|
45
|
+
};
|
|
46
|
+
const intlayerContentConfiguration = {
|
|
47
|
+
fileExtensions: (0, import_utils.getEnvValue)(env.content.fileExtensions, "array"),
|
|
48
|
+
baseDir: (0, import_utils.getEnvValue)(env.content.baseDir, "string"),
|
|
49
|
+
contentDirName: (0, import_utils.getEnvValue)(env.content.contentDirName, "string"),
|
|
50
|
+
contentDir: (0, import_utils.getEnvValue)(env.content.contentDir, "string"),
|
|
51
|
+
excludedPath: (0, import_utils.getEnvValue)(env.content.excludedPath, "array"),
|
|
52
|
+
resultDirName: (0, import_utils.getEnvValue)(env.content.resultDirName, "string"),
|
|
53
|
+
resultDir: (0, import_utils.getEnvValue)(env.content.resultDir, "string"),
|
|
54
|
+
moduleAugmentationDirName: (0, import_utils.getEnvValue)(
|
|
55
|
+
env.content.moduleAugmentationDirName,
|
|
56
|
+
"string"
|
|
57
|
+
),
|
|
58
|
+
moduleAugmentationDir: (0, import_utils.getEnvValue)(
|
|
59
|
+
env.content.moduleAugmentationDir,
|
|
60
|
+
"string"
|
|
61
|
+
),
|
|
62
|
+
dictionaryOutput: (0, import_utils.getEnvValue)(
|
|
63
|
+
env.content.dictionaryOutput,
|
|
64
|
+
"array"
|
|
65
|
+
),
|
|
66
|
+
dictionariesDirName: (0, import_utils.getEnvValue)(
|
|
67
|
+
env.content.dictionariesDirName,
|
|
68
|
+
"string"
|
|
69
|
+
),
|
|
70
|
+
dictionariesDir: (0, import_utils.getEnvValue)(env.content.dictionariesDir, "string"),
|
|
71
|
+
i18nDictionariesDirName: (0, import_utils.getEnvValue)(
|
|
72
|
+
env.content.i18nDictionariesDirName,
|
|
73
|
+
"string"
|
|
74
|
+
),
|
|
75
|
+
i18nDictionariesDir: (0, import_utils.getEnvValue)(
|
|
76
|
+
env.content.i18nDictionariesDir,
|
|
77
|
+
"string"
|
|
78
|
+
),
|
|
79
|
+
typeDirName: (0, import_utils.getEnvValue)(env.content.typeDirName, "string"),
|
|
80
|
+
typesDir: (0, import_utils.getEnvValue)(env.content.typesDir, "string"),
|
|
81
|
+
mainDirName: (0, import_utils.getEnvValue)(env.content.mainDirName, "string"),
|
|
82
|
+
mainDir: (0, import_utils.getEnvValue)(env.content.mainDir, "string"),
|
|
83
|
+
watchedFilesPattern: (0, import_utils.getEnvValue)(
|
|
84
|
+
env.content.watchedFilesPattern,
|
|
85
|
+
"array"
|
|
86
|
+
),
|
|
87
|
+
watchedFilesPatternWithPath: (0, import_utils.getEnvValue)(
|
|
88
|
+
env.content.watchedFilesPatternWithPath,
|
|
89
|
+
"array"
|
|
90
|
+
),
|
|
91
|
+
outputFilesPatternWithPath: (0, import_utils.getEnvValue)(
|
|
92
|
+
env.content.outputFilesPatternWithPath,
|
|
93
|
+
"string"
|
|
94
|
+
)
|
|
95
|
+
};
|
|
96
|
+
const intlayerConfiguration = {
|
|
97
|
+
internationalization: intlayerIntlConfiguration,
|
|
98
|
+
middleware: intlayerMiddlewareConfiguration,
|
|
99
|
+
content: intlayerContentConfiguration
|
|
100
|
+
};
|
|
101
|
+
return intlayerConfiguration;
|
|
38
102
|
};
|
|
39
|
-
const intlayerMiddlewareConfiguration = {
|
|
40
|
-
headerName: (0, import_utils.getEnvValue)(
|
|
41
|
-
process.env.NEXT_PUBLIC_INTLAYER_HEADER_NAME,
|
|
42
|
-
"string"
|
|
43
|
-
),
|
|
44
|
-
cookieName: (0, import_utils.getEnvValue)(
|
|
45
|
-
process.env.NEXT_PUBLIC_INTLAYER_COOKIE_NAME,
|
|
46
|
-
"string"
|
|
47
|
-
),
|
|
48
|
-
prefixDefault: (0, import_utils.getEnvValue)(
|
|
49
|
-
process.env.NEXT_PUBLIC_INTLAYER_PREFIX_DEFAULT,
|
|
50
|
-
"boolean"
|
|
51
|
-
),
|
|
52
|
-
basePath: (0, import_utils.getEnvValue)(process.env.NEXT_PUBLIC_INTLAYER_BASE_PATH, "string"),
|
|
53
|
-
serverSetCookie: (0, import_utils.getEnvValue)(
|
|
54
|
-
process.env.NEXT_PUBLIC_INTLAYER_SERVER_SET_COOKIE,
|
|
55
|
-
"string"
|
|
56
|
-
),
|
|
57
|
-
noPrefix: (0, import_utils.getEnvValue)(process.env.NEXT_PUBLIC_INTLAYER_NO_PREFIX, "boolean")
|
|
58
|
-
};
|
|
59
|
-
const intlayerContentConfiguration = {
|
|
60
|
-
fileExtensions: (0, import_utils.getEnvValue)(
|
|
61
|
-
process.env.NEXT_PUBLIC_INTLAYER_FILE_EXTENSIONS,
|
|
62
|
-
"array"
|
|
63
|
-
),
|
|
64
|
-
baseDir: (0, import_utils.getEnvValue)("NEXT_PUBLIC_INTLAYER_BASE_DIR", "string"),
|
|
65
|
-
contentDirName: (0, import_utils.getEnvValue)(
|
|
66
|
-
process.env.NEXT_PUBLIC_INTLAYER_CONTENT_DIR_NAME,
|
|
67
|
-
"string"
|
|
68
|
-
),
|
|
69
|
-
contentDir: (0, import_utils.getEnvValue)("NEXT_PUBLIC_INTLAYER_CONTENT_DIR", "string"),
|
|
70
|
-
excludedPath: (0, import_utils.getEnvValue)(
|
|
71
|
-
process.env.NEXT_PUBLIC_INTLAYER_EXCLUDED_PATH,
|
|
72
|
-
"array"
|
|
73
|
-
),
|
|
74
|
-
resultDirName: (0, import_utils.getEnvValue)(
|
|
75
|
-
process.env.NEXT_PUBLIC_INTLAYER_RESULT_DIR_NAME,
|
|
76
|
-
"string"
|
|
77
|
-
),
|
|
78
|
-
resultDir: (0, import_utils.getEnvValue)("NEXT_PUBLIC_INTLAYER_RESULT_DIR", "string"),
|
|
79
|
-
moduleAugmentationDirName: (0, import_utils.getEnvValue)(
|
|
80
|
-
process.env.NEXT_PUBLIC_INTLAYER_MODULE_AUGMENTATION_DIR_NAME,
|
|
81
|
-
"string"
|
|
82
|
-
),
|
|
83
|
-
moduleAugmentationDir: (0, import_utils.getEnvValue)(
|
|
84
|
-
process.env.NEXT_PUBLIC_INTLAYER_MODULE_AUGMENTATION_DIR,
|
|
85
|
-
"string"
|
|
86
|
-
),
|
|
87
|
-
bundleDirName: (0, import_utils.getEnvValue)(
|
|
88
|
-
process.env.NEXT_PUBLIC_INTLAYER_BUNDLE_DIR_NAME,
|
|
89
|
-
"string"
|
|
90
|
-
),
|
|
91
|
-
bundleDir: (0, import_utils.getEnvValue)(
|
|
92
|
-
process.env.NEXT_PUBLIC_INTLAYER_BUNDLE_DIR,
|
|
93
|
-
"string"
|
|
94
|
-
),
|
|
95
|
-
bundleFileExtension: (0, import_utils.getEnvValue)(
|
|
96
|
-
process.env.NEXT_PUBLIC_INTLAYER_BUNDLE_FILE_EXTENSION,
|
|
97
|
-
"string"
|
|
98
|
-
),
|
|
99
|
-
dictionariesDirName: (0, import_utils.getEnvValue)(
|
|
100
|
-
process.env.NEXT_PUBLIC_INTLAYER_DICTIONARIES_DIR_NAME,
|
|
101
|
-
"string"
|
|
102
|
-
),
|
|
103
|
-
dictionariesDir: (0, import_utils.getEnvValue)(
|
|
104
|
-
process.env.NEXT_PUBLIC_INTLAYER_DICTIONARIES_DIR,
|
|
105
|
-
"string"
|
|
106
|
-
),
|
|
107
|
-
typeDirName: (0, import_utils.getEnvValue)(
|
|
108
|
-
process.env.NEXT_PUBLIC_INTLAYER_TYPES_DIR_NAME,
|
|
109
|
-
"string"
|
|
110
|
-
),
|
|
111
|
-
typesDir: (0, import_utils.getEnvValue)(process.env.NEXT_PUBLIC_INTLAYER_TYPES_DIR, "string"),
|
|
112
|
-
mainDirName: (0, import_utils.getEnvValue)(
|
|
113
|
-
process.env.NEXT_PUBLIC_INTLAYER_MAIN_DIR_NAME,
|
|
114
|
-
"string"
|
|
115
|
-
),
|
|
116
|
-
mainDir: (0, import_utils.getEnvValue)(process.env.NEXT_PUBLIC_INTLAYER_MAIN_DIR, "string"),
|
|
117
|
-
watchedFilesPattern: (0, import_utils.getEnvValue)(
|
|
118
|
-
process.env.NEXT_PUBLIC_INTLAYER_WATCHED_FILES_PATTERN,
|
|
119
|
-
"array"
|
|
120
|
-
),
|
|
121
|
-
watchedFilesPatternWithPath: (0, import_utils.getEnvValue)(
|
|
122
|
-
process.env.NEXT_PUBLIC_INTLAYER_WATCHED_FILES_PATTERN_WITH_PATH,
|
|
123
|
-
"array"
|
|
124
|
-
),
|
|
125
|
-
outputFilesPatternWithPath: (0, import_utils.getEnvValue)(
|
|
126
|
-
process.env.NEXT_PUBLIC_INTLAYER_OUTPUT_FILES_PATTERN,
|
|
127
|
-
"string"
|
|
128
|
-
)
|
|
129
|
-
};
|
|
130
|
-
const intlayerConfiguration = {
|
|
131
|
-
internationalization: intlayerIntlConfiguration,
|
|
132
|
-
middleware: intlayerMiddlewareConfiguration,
|
|
133
|
-
content: intlayerContentConfiguration
|
|
134
|
-
};
|
|
135
|
-
const getConfiguration = () => intlayerConfiguration;
|
|
136
103
|
// Annotate the CommonJS export names for ESM import in node:
|
|
137
104
|
0 && (module.exports = {
|
|
138
|
-
getConfiguration
|
|
139
|
-
intlayerConfiguration,
|
|
140
|
-
intlayerContentConfiguration,
|
|
141
|
-
intlayerIntlConfiguration,
|
|
142
|
-
intlayerMiddlewareConfiguration
|
|
105
|
+
getConfiguration
|
|
143
106
|
});
|
|
144
107
|
//# sourceMappingURL=getConfiguration.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/envVariables/getConfiguration.ts"],"sourcesContent":["import type {\n ContentConfig,\n InternationalizationConfig,\n IntlayerConfig,\n MiddlewareConfig,\n ServerSetCookieRule,\n} from '../types/config';\nimport type { Locales } from '../types/locales';\nimport { getEnvValue } from './utils';\n\nexport const intlayerIntlConfiguration: InternationalizationConfig = {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/envVariables/getConfiguration.ts"],"sourcesContent":["import type {\n ContentConfig,\n DictionaryOutput,\n InternationalizationConfig,\n IntlayerConfig,\n MiddlewareConfig,\n ServerSetCookieRule,\n} from '../types/config';\nimport type { Locales } from '../types/locales';\nimport { extractEnvVariable } from './extractEnvVariable/index';\nimport { getEnvValue } from './utils';\n\n/**\n * Get all configuration values using environment variables\n * Can be used in the client side as the server side\n * To use it, be sure to have the environment variables set\n */\nexport const getConfiguration = (): IntlayerConfig => {\n const env = extractEnvVariable();\n\n const intlayerIntlConfiguration: InternationalizationConfig = {\n locales: getEnvValue<Locales>(env.internationalization.locales, 'array')!,\n defaultLocale: getEnvValue<Locales>(\n env?.internationalization.defaultLocale,\n 'string'\n )!,\n };\n\n const intlayerMiddlewareConfiguration: MiddlewareConfig = {\n headerName: getEnvValue(env.middleware.headerName, 'string')!,\n cookieName: getEnvValue(env.middleware.cookieName, 'string')!,\n prefixDefault: getEnvValue(env.middleware.prefixDefault, 'boolean')!,\n basePath: getEnvValue(env.middleware.basePath, 'string')!,\n serverSetCookie: getEnvValue<ServerSetCookieRule>(\n env.middleware.serverSetCookie,\n 'string'\n )!,\n noPrefix: getEnvValue(env.middleware.noPrefix, 'boolean')!,\n };\n\n const intlayerContentConfiguration: ContentConfig = {\n fileExtensions: getEnvValue<string>(env.content.fileExtensions, 'array')!,\n baseDir: getEnvValue(env.content.baseDir, 'string')!,\n contentDirName: getEnvValue(env.content.contentDirName, 'string')!,\n contentDir: getEnvValue(env.content.contentDir, 'string')!,\n excludedPath: getEnvValue<string>(env.content.excludedPath, 'array')!,\n resultDirName: getEnvValue(env.content.resultDirName, 'string')!,\n resultDir: getEnvValue(env.content.resultDir, 'string')!,\n moduleAugmentationDirName: getEnvValue(\n env.content.moduleAugmentationDirName,\n 'string'\n )!,\n moduleAugmentationDir: getEnvValue(\n env.content.moduleAugmentationDir,\n 'string'\n )!,\n dictionaryOutput: getEnvValue<DictionaryOutput>(\n env.content.dictionaryOutput,\n 'array'\n )!,\n dictionariesDirName: getEnvValue(\n env.content.dictionariesDirName,\n 'string'\n )!,\n dictionariesDir: getEnvValue(env.content.dictionariesDir, 'string')!,\n i18nDictionariesDirName: getEnvValue(\n env.content.i18nDictionariesDirName,\n 'string'\n )!,\n i18nDictionariesDir: getEnvValue(\n env.content.i18nDictionariesDir,\n 'string'\n )!,\n typeDirName: getEnvValue(env.content.typeDirName, 'string')!,\n typesDir: getEnvValue(env.content.typesDir, 'string')!,\n mainDirName: getEnvValue(env.content.mainDirName, 'string')!,\n mainDir: getEnvValue(env.content.mainDir, 'string')!,\n watchedFilesPattern: getEnvValue<string>(\n env.content.watchedFilesPattern,\n 'array'\n )!,\n watchedFilesPatternWithPath: getEnvValue<string>(\n env.content.watchedFilesPatternWithPath,\n 'array'\n )!,\n outputFilesPatternWithPath: getEnvValue(\n env.content.outputFilesPatternWithPath,\n 'string'\n )!,\n };\n\n const intlayerConfiguration: IntlayerConfig = {\n internationalization: intlayerIntlConfiguration,\n middleware: intlayerMiddlewareConfiguration,\n content: intlayerContentConfiguration,\n };\n\n return intlayerConfiguration;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,gCAAmC;AACnC,mBAA4B;AAOrB,MAAM,mBAAmB,MAAsB;AACpD,QAAM,UAAM,8CAAmB;AAE/B,QAAM,4BAAwD;AAAA,IAC5D,aAAS,0BAAqB,IAAI,qBAAqB,SAAS,OAAO;AAAA,IACvE,mBAAe;AAAA,MACb,KAAK,qBAAqB;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAEA,QAAM,kCAAoD;AAAA,IACxD,gBAAY,0BAAY,IAAI,WAAW,YAAY,QAAQ;AAAA,IAC3D,gBAAY,0BAAY,IAAI,WAAW,YAAY,QAAQ;AAAA,IAC3D,mBAAe,0BAAY,IAAI,WAAW,eAAe,SAAS;AAAA,IAClE,cAAU,0BAAY,IAAI,WAAW,UAAU,QAAQ;AAAA,IACvD,qBAAiB;AAAA,MACf,IAAI,WAAW;AAAA,MACf;AAAA,IACF;AAAA,IACA,cAAU,0BAAY,IAAI,WAAW,UAAU,SAAS;AAAA,EAC1D;AAEA,QAAM,+BAA8C;AAAA,IAClD,oBAAgB,0BAAoB,IAAI,QAAQ,gBAAgB,OAAO;AAAA,IACvE,aAAS,0BAAY,IAAI,QAAQ,SAAS,QAAQ;AAAA,IAClD,oBAAgB,0BAAY,IAAI,QAAQ,gBAAgB,QAAQ;AAAA,IAChE,gBAAY,0BAAY,IAAI,QAAQ,YAAY,QAAQ;AAAA,IACxD,kBAAc,0BAAoB,IAAI,QAAQ,cAAc,OAAO;AAAA,IACnE,mBAAe,0BAAY,IAAI,QAAQ,eAAe,QAAQ;AAAA,IAC9D,eAAW,0BAAY,IAAI,QAAQ,WAAW,QAAQ;AAAA,IACtD,+BAA2B;AAAA,MACzB,IAAI,QAAQ;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAAuB;AAAA,MACrB,IAAI,QAAQ;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAkB;AAAA,MAChB,IAAI,QAAQ;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAqB;AAAA,MACnB,IAAI,QAAQ;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAiB,0BAAY,IAAI,QAAQ,iBAAiB,QAAQ;AAAA,IAClE,6BAAyB;AAAA,MACvB,IAAI,QAAQ;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAqB;AAAA,MACnB,IAAI,QAAQ;AAAA,MACZ;AAAA,IACF;AAAA,IACA,iBAAa,0BAAY,IAAI,QAAQ,aAAa,QAAQ;AAAA,IAC1D,cAAU,0BAAY,IAAI,QAAQ,UAAU,QAAQ;AAAA,IACpD,iBAAa,0BAAY,IAAI,QAAQ,aAAa,QAAQ;AAAA,IAC1D,aAAS,0BAAY,IAAI,QAAQ,SAAS,QAAQ;AAAA,IAClD,yBAAqB;AAAA,MACnB,IAAI,QAAQ;AAAA,MACZ;AAAA,IACF;AAAA,IACA,iCAA6B;AAAA,MAC3B,IAAI,QAAQ;AAAA,MACZ;AAAA,IACF;AAAA,IACA,gCAA4B;AAAA,MAC1B,IAAI,QAAQ;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,QAAM,wBAAwC;AAAA,IAC5C,sBAAsB;AAAA,IACtB,YAAY;AAAA,IACZ,SAAS;AAAA,EACX;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IntlayerConfig } from '../types/config.js';
|
|
2
2
|
import '../types/locales.js';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Get all configuration values using environment variables
|
|
6
|
+
* Can be used in the client side as the server side
|
|
7
|
+
* To use it, be sure to have the environment variables set
|
|
8
|
+
*/
|
|
8
9
|
declare const getConfiguration: () => IntlayerConfig;
|
|
9
10
|
|
|
10
|
-
export { getConfiguration
|
|
11
|
+
export { getConfiguration };
|
|
@@ -19,11 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var envVariables_exports = {};
|
|
20
20
|
__export(envVariables_exports, {
|
|
21
21
|
formatEnvVariable: () => import_formatEnvVariable.formatEnvVariable,
|
|
22
|
-
getConfiguration: () => import_getConfiguration.getConfiguration
|
|
23
|
-
intlayerConfiguration: () => import_getConfiguration.intlayerConfiguration,
|
|
24
|
-
intlayerContentConfiguration: () => import_getConfiguration.intlayerContentConfiguration,
|
|
25
|
-
intlayerIntlConfiguration: () => import_getConfiguration.intlayerIntlConfiguration,
|
|
26
|
-
intlayerMiddlewareConfiguration: () => import_getConfiguration.intlayerMiddlewareConfiguration
|
|
22
|
+
getConfiguration: () => import_getConfiguration.getConfiguration
|
|
27
23
|
});
|
|
28
24
|
module.exports = __toCommonJS(envVariables_exports);
|
|
29
25
|
var import_getConfiguration = require('./getConfiguration.cjs');
|
|
@@ -31,10 +27,6 @@ var import_formatEnvVariable = require('./formatEnvVariable.cjs');
|
|
|
31
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
32
28
|
0 && (module.exports = {
|
|
33
29
|
formatEnvVariable,
|
|
34
|
-
getConfiguration
|
|
35
|
-
intlayerConfiguration,
|
|
36
|
-
intlayerContentConfiguration,
|
|
37
|
-
intlayerIntlConfiguration,
|
|
38
|
-
intlayerMiddlewareConfiguration
|
|
30
|
+
getConfiguration
|
|
39
31
|
});
|
|
40
32
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/envVariables/index.ts"],"sourcesContent":["export {
|
|
1
|
+
{"version":3,"sources":["../../../src/envVariables/index.ts"],"sourcesContent":["export { getConfiguration } from './getConfiguration';\nexport { formatEnvVariable } from './formatEnvVariable';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAiC;AACjC,+BAAkC;","names":[]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { getConfiguration
|
|
1
|
+
export { getConfiguration } from './getConfiguration.js';
|
|
2
2
|
export { formatEnvVariable } from './formatEnvVariable.js';
|
|
3
3
|
import '../types/config.js';
|
|
4
4
|
import '../types/locales.js';
|
|
5
|
+
import './detectPlatform.js';
|
|
@@ -21,10 +21,7 @@ __export(utils_exports, {
|
|
|
21
21
|
getEnvValue: () => getEnvValue
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(utils_exports);
|
|
24
|
-
function getEnvValue(value, type) {
|
|
25
|
-
if (value === void 0) {
|
|
26
|
-
return void 0;
|
|
27
|
-
}
|
|
24
|
+
function getEnvValue(value, type, verbose = false) {
|
|
28
25
|
try {
|
|
29
26
|
switch (type) {
|
|
30
27
|
case "boolean":
|
|
@@ -32,7 +29,7 @@ function getEnvValue(value, type) {
|
|
|
32
29
|
case "number":
|
|
33
30
|
return Number(value);
|
|
34
31
|
case "string":
|
|
35
|
-
return value;
|
|
32
|
+
return value ?? "";
|
|
36
33
|
case "object":
|
|
37
34
|
case "array":
|
|
38
35
|
return JSON.parse(value);
|
|
@@ -40,7 +37,11 @@ function getEnvValue(value, type) {
|
|
|
40
37
|
return void 0;
|
|
41
38
|
}
|
|
42
39
|
} catch (error) {
|
|
43
|
-
|
|
40
|
+
if (verbose) {
|
|
41
|
+
console.error(
|
|
42
|
+
`Error parsing environment variable, parsing : ${(value ?? "").toString()}`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
44
45
|
return void 0;
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/envVariables/utils.ts"],"sourcesContent":["function getEnvValue(value: unknown
|
|
1
|
+
{"version":3,"sources":["../../../src/envVariables/utils.ts"],"sourcesContent":["function getEnvValue(\n value: unknown,\n type: 'boolean',\n verbose?: boolean\n): boolean | undefined;\nfunction getEnvValue(\n value: unknown,\n type: 'number',\n verbose?: boolean\n): number | undefined;\nfunction getEnvValue<T extends string>(\n value: unknown,\n type: 'string',\n verbose?: boolean\n): T | undefined;\nfunction getEnvValue<T>(\n value: unknown,\n type: 'object',\n verbose?: boolean\n): T | undefined;\nfunction getEnvValue<T>(\n value: unknown,\n type: 'array',\n verbose?: boolean\n): T[] | undefined;\nfunction getEnvValue(\n value: unknown,\n type: 'string' | 'boolean' | 'number' | 'object' | 'array',\n verbose = false\n) {\n try {\n switch (type) {\n case 'boolean':\n // Convert string to boolean explicitly\n return value === 'true' || value === '1';\n\n case 'number':\n // Convert string to number, return undefined if conversion fails\n return Number(value);\n\n case 'string':\n // Return the string directly\n return value ?? '';\n\n case 'object':\n case 'array':\n // Attempt to parse the value as JSON\n return JSON.parse(value as string);\n\n default:\n return undefined;\n }\n } catch (error) {\n // Log error and return undefined if any error occurs during parsing\n if (verbose) {\n console.error(\n `Error parsing environment variable, parsing : ${((value ?? '') as string).toString()}`\n );\n }\n return undefined;\n }\n}\n\nexport { getEnvValue };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBA,SAAS,YACP,OACA,MACA,UAAU,OACV;AACA,MAAI;AACF,YAAQ,MAAM;AAAA,MACZ,KAAK;AAEH,eAAO,UAAU,UAAU,UAAU;AAAA,MAEvC,KAAK;AAEH,eAAO,OAAO,KAAK;AAAA,MAErB,KAAK;AAEH,eAAO,SAAS;AAAA,MAElB,KAAK;AAAA,MACL,KAAK;AAEH,eAAO,KAAK,MAAM,KAAe;AAAA,MAEnC;AACE,eAAO;AAAA,IACX;AAAA,EACF,SAAS,OAAO;AAEd,QAAI,SAAS;AACX,cAAQ;AAAA,QACN,kDAAmD,SAAS,IAAe,SAAS,CAAC;AAAA,MACvF;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare function getEnvValue(value: unknown, type: 'boolean'): boolean | undefined;
|
|
2
|
-
declare function getEnvValue(value: unknown, type: 'number'): number | undefined;
|
|
3
|
-
declare function getEnvValue<T extends string>(value: unknown, type: 'string'): T | undefined;
|
|
4
|
-
declare function getEnvValue<T>(value: unknown, type: 'object'): T | undefined;
|
|
5
|
-
declare function getEnvValue<T>(value: unknown, type: 'array'): T[] | undefined;
|
|
1
|
+
declare function getEnvValue(value: unknown, type: 'boolean', verbose?: boolean): boolean | undefined;
|
|
2
|
+
declare function getEnvValue(value: unknown, type: 'number', verbose?: boolean): number | undefined;
|
|
3
|
+
declare function getEnvValue<T extends string>(value: unknown, type: 'string', verbose?: boolean): T | undefined;
|
|
4
|
+
declare function getEnvValue<T>(value: unknown, type: 'object', verbose?: boolean): T | undefined;
|
|
5
|
+
declare function getEnvValue<T>(value: unknown, type: 'array', verbose?: boolean): T[] | undefined;
|
|
6
6
|
|
|
7
7
|
export { getEnvValue };
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -21,11 +21,7 @@ __export(src_exports, {
|
|
|
21
21
|
Locales: () => import_locales.Locales,
|
|
22
22
|
formatEnvVariable: () => import_envVariables.formatEnvVariable,
|
|
23
23
|
getClientConfiguration: () => import_envVariables.getConfiguration,
|
|
24
|
-
getConfiguration: () => import_getConfiguration.getConfiguration
|
|
25
|
-
intlayerConfiguration: () => import_envVariables.intlayerConfiguration,
|
|
26
|
-
intlayerContentConfiguration: () => import_envVariables.intlayerContentConfiguration,
|
|
27
|
-
intlayerIntlConfiguration: () => import_envVariables.intlayerIntlConfiguration,
|
|
28
|
-
intlayerMiddlewareConfiguration: () => import_envVariables.intlayerMiddlewareConfiguration
|
|
24
|
+
getConfiguration: () => import_getConfiguration.getConfiguration
|
|
29
25
|
});
|
|
30
26
|
module.exports = __toCommonJS(src_exports);
|
|
31
27
|
var import_getConfiguration = require('./configFile/getConfiguration.cjs');
|
|
@@ -36,10 +32,6 @@ var import_envVariables = require('./envVariables/index.cjs');
|
|
|
36
32
|
Locales,
|
|
37
33
|
formatEnvVariable,
|
|
38
34
|
getClientConfiguration,
|
|
39
|
-
getConfiguration
|
|
40
|
-
intlayerConfiguration,
|
|
41
|
-
intlayerContentConfiguration,
|
|
42
|
-
intlayerIntlConfiguration,
|
|
43
|
-
intlayerMiddlewareConfiguration
|
|
35
|
+
getConfiguration
|
|
44
36
|
});
|
|
45
37
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export { getConfiguration } from './configFile/getConfiguration';\n\nexport type {\n InternationalizationConfig,\n ServerSetCookieRule,\n MiddlewareConfig,\n CustomIntlayerConfig,\n BaseContentConfig,\n BaseDerivedConfig,\n ResultDirDerivedConfig,\n PatternsContentConfig,\n ContentConfig,\n IntlayerConfig,\n} from './types/config';\nexport type { LocalesValues } from './types/locales';\nexport { Locales } from './types/locales';\nexport {\n formatEnvVariable,\n
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export { getConfiguration } from './configFile/getConfiguration';\n\nexport type {\n InternationalizationConfig,\n ServerSetCookieRule,\n MiddlewareConfig,\n CustomIntlayerConfig,\n BaseContentConfig,\n BaseDerivedConfig,\n ResultDirDerivedConfig,\n PatternsContentConfig,\n ContentConfig,\n IntlayerConfig,\n} from './types/config';\nexport type { LocalesValues } from './types/locales';\nexport { Locales } from './types/locales';\nexport {\n formatEnvVariable,\n getConfiguration as getClientConfiguration,\n} from './envVariables/index';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAiC;AAejC,qBAAwB;AACxB,0BAGO;","names":[]}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { getConfiguration } from './configFile/getConfiguration.js';
|
|
2
2
|
export { BaseContentConfig, BaseDerivedConfig, ContentConfig, CustomIntlayerConfig, InternationalizationConfig, IntlayerConfig, MiddlewareConfig, PatternsContentConfig, ResultDirDerivedConfig, ServerSetCookieRule } from './types/config.js';
|
|
3
3
|
export { Locales, LocalesValues } from './types/locales.js';
|
|
4
|
-
export { getConfiguration as getClientConfiguration
|
|
4
|
+
export { getConfiguration as getClientConfiguration } from './envVariables/getConfiguration.js';
|
|
5
5
|
export { formatEnvVariable } from './envVariables/formatEnvVariable.js';
|
|
6
|
+
import './envVariables/detectPlatform.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/config.ts"],"sourcesContent":["import type { Locales } from './locales';\n\nexport type InternationalizationConfig = {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/types/config.ts"],"sourcesContent":["import type { Locales } from './locales';\n\n/**\n * Configuration for internationalization settings\n */\nexport type InternationalizationConfig = {\n /**\n * Locales available in the application\n *\n * Default: [Locales.ENGLISH]\n *\n * You can define a list of available locales to support in the application.\n */\n locales: Locales[];\n\n /**\n * Default locale of the application for fallback\n *\n * Default: Locales.ENGLISH\n *\n * Used to specify a fallback locale in case no other locale is set.\n */\n defaultLocale: Locales;\n};\n\nexport type ServerSetCookieRule = 'always' | 'never';\n\n/**\n * Configuration for middleware behaviors\n */\nexport type MiddlewareConfig = {\n /**\n * Header name to get the locale from the request\n *\n * Default: 'x-intlayer-locale'\n *\n * The HTTP header key used to determine the current locale.\n */\n headerName: string;\n\n /**\n * Cookie name to store the locale information\n *\n * Default: 'NEXT_LOCALE'\n *\n * The cookie key where the locale information is stored.\n */\n cookieName: string;\n\n /**\n * Whether to prefix the default locale in the URL\n *\n * Default: false\n *\n * When set to true, the default locale is prefixed in the URL for localization purposes.\n */\n prefixDefault: boolean;\n\n /**\n * Base path for application URLs\n *\n * Default: ''\n *\n * Defines the base path where the application is accessible from.\n */\n basePath: string;\n\n /**\n * Strategy for setting the locale cookie on the server\n *\n * Default: 'always'\n *\n * This setting controls when the server sets the locale cookie. It can either set the cookie on every request or never set it.\n */\n serverSetCookie: ServerSetCookieRule;\n\n /**\n * Indicates if no prefix should be used in the URL for locale\n *\n * Default: false\n *\n * If true, no locale-based prefix is used in the URL.\n */\n noPrefix: boolean;\n};\n\n/**\n * Custom configuration that can be provided to override default settings\n */\nexport type CustomIntlayerConfig = {\n /**\n * Custom internationalization configuration\n */\n internationalization?: Partial<InternationalizationConfig>;\n\n /**\n * Custom middleware configuration\n */\n middleware?: Partial<MiddlewareConfig>;\n\n /**\n * Custom content configuration\n */\n content?: Partial<ContentConfig>;\n};\n\n/**\n * Combined configuration for internationalization, middleware, and content\n */\nexport type IntlayerConfig = {\n /**\n * Internationalization configuration\n */\n internationalization: InternationalizationConfig;\n\n /**\n * Middleware configuration\n */\n middleware: MiddlewareConfig;\n\n /**\n * Content configuration\n */\n content: ContentConfig;\n};\n\n/**\n * Base configuration for content handling\n */\nexport type BaseContentConfig = {\n /**\n * File extensions of content to look for\n *\n * Default: ['.content.ts', '.content.js', '.content.cjs', '.content.mjs', '.content.json', '.content.tsx', '.content.jsx']\n *\n * List of file extensions to scan for content.\n */\n fileExtensions: string[];\n\n /**\n * Absolute path of the project's base directory\n *\n * Default: process.cwd()\n *\n * The root directory of the project, typically used for resolving other paths.\n */\n baseDir: string;\n\n /**\n * Name of the directory where the content is stored\n *\n * Default: 'src'\n *\n * Specifies the directory where the primary content is stored.\n */\n contentDirName: string;\n\n /**\n * Directories to be excluded from content processing\n *\n * Default: ['node_modules']\n *\n * A list of directories to exclude from content processing.\n */\n excludedPath: string[];\n\n /**\n * Name of the directory where results are stored\n *\n * Default: '.intlayer'\n *\n * The directory for storing intermediate or output results.\n */\n resultDirName: string;\n\n /**\n * Name of the directory for module augmentation\n *\n * Default: 'types'\n *\n * Defines the directory for additional module types.\n */\n moduleAugmentationDirName: string;\n\n /**\n * Name of the directory where dictionaries are stored\n *\n * Default: 'dictionary'\n *\n * The directory for storing localization dictionaries.\n *\n * Note:\n * - Ensure the dictionaries output includes intlayer to build the dictionaries for intlayer\n */\n dictionariesDirName: string;\n\n /**\n * Name of the directory where dictionaries are stored\n *\n * Default: 'i18n_dictionary'\n *\n * The directory for storing localization dictionaries.\n *\n * Note:\n * - Ensure the dictionaries output includes 'i18next' to build the dictionaries for i18next\n */\n i18nDictionariesDirName: string;\n\n /**\n * Name of the directory where dictionary types are stored\n *\n * Default: 'types'\n *\n * The directory for storing dictionary type definitions.\n */\n typeDirName: string;\n\n /**\n * Name of the directory where the main files are stored\n *\n * Default: 'main'\n *\n * Specifies the directory for storing main application files.\n */\n mainDirName: string;\n};\n\nexport type DictionaryOutput = 'intlayer' | 'i18next';\n\n/**\n * Configuration derived based on the base content configuration\n */\nexport type BaseDerivedConfig = {\n /**\n * Directory where the content is stored, relative to the base directory\n *\n * Default: {{baseDir}} / {{contentDirName}}\n *\n * Derived content directory based on the base configuration.\n */\n contentDir: string;\n\n /**\n * Directory where the results are stored, relative to the base directory\n *\n * Default: {{baseDir}} / {{resultDirName}}\n *\n * Derived results directory based on the base configuration.\n */\n resultDir: string;\n\n /**\n * Directory for module augmentation, relative to the base directory\n *\n * Default: {{baseDir}} / {{moduleAugmentationDirName}}\n *\n * Defines the derived path for module augmentation.\n */\n moduleAugmentationDir: string;\n\n /**\n * Type of dictionary to use as an output\n *\n * Default: ['intlayer']\n *\n * The type of dictionary to use as an output. It can be either 'intlayer' or 'i18next'.\n *\n * Note:\n * - 'i18next' is not yet ensure a 1:1 mapping with the i18next library.\n * - Removing 'intlayer' will break the compatibility with react-intlayer or next-intlayer\n *\n */\n dictionaryOutput: DictionaryOutput[];\n};\n\n/**\n * Configuration derived based on the result directory\n */\nexport type ResultDirDerivedConfig = {\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{dictionariesDirName}}\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n */\n dictionariesDir: string;\n\n /**\n *\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{i18nDictionariesDirName}}\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n *\n * Note:\n * - Ensure the i18n dictionaries output includes i18next to build the dictionaries for i18next\n */\n i18nDictionariesDir: string;\n\n /**\n * Directory where dictionary types are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{typeDirName}}\n *\n * Specifies the derived path for dictionary types relative to the result directory.\n */\n typesDir: string;\n\n /**\n * Directory where the main files are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{mainDirName}}\n *\n * Specifies the derived path for the main files relative to the result directory.\n */\n mainDir: string;\n};\n\n/**\n * Configuration for content patterns\n */\nexport type PatternsContentConfig = {\n /**\n * Patterns of files to watch for changes\n *\n * Default: ['/**\\/*.content.ts', '/**\\/*.content.js', '/**\\/*.content.json', '/**\\/*.content.cjs', '/**\\/*.content.mjs', '/**\\/*.content.tsx', '/**\\/*.content.jsx']\n *\n * Defines file patterns for content to watch for changes.\n */\n watchedFilesPattern: string[];\n\n /**\n * Patterns of files to watch for changes including the relative path\n *\n * Default: ['{{contentDir}}/**\\/*.content.ts', '{{contentDir}}/**\\/*.content.js', '{{contentDir}}/**\\/*.content.json', '{{contentDir}}/**\\/*.content.cjs', '{{contentDir}}/**\\/*.content.mjs', '{{contentDir}}/**\\/*.content.tsx', '{{contentDir}}/**\\/*.content.jsx']\n *\n * Specifies the file patterns for content to watch, including relative paths.\n */\n watchedFilesPatternWithPath: string[];\n\n /**\n * Pattern for output files including the relative path\n *\n * Default: '{{dictionariesDir}}/**\\/*.json'\n *\n * Defines the pattern for output files, including the relative path.\n */\n outputFilesPatternWithPath: string;\n};\n\n// @TODO: Implement exclusion of non configurable fields, to not allow them to be set in the config\n/**\n * General configuration derived from the config file\n */\nexport type ContentConfig = BaseContentConfig &\n BaseDerivedConfig &\n ResultDirDerivedConfig &\n PatternsContentConfig;\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|