@intlayer/config 5.3.3 → 5.3.4
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/defaultValues/content.cjs +2 -0
- package/dist/cjs/defaultValues/content.cjs.map +1 -1
- package/dist/cjs/envVariables/index.cjs +2 -0
- package/dist/cjs/envVariables/index.cjs.map +1 -1
- package/dist/cjs/envVariables/loadEnvFile.cjs +7 -0
- package/dist/cjs/envVariables/loadEnvFile.cjs.map +1 -1
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/loadExternalFile.cjs +1 -0
- package/dist/cjs/loadExternalFile.cjs.map +1 -1
- package/dist/esm/defaultValues/content.mjs +2 -0
- package/dist/esm/defaultValues/content.mjs.map +1 -1
- package/dist/esm/envVariables/index.mjs +2 -1
- package/dist/esm/envVariables/index.mjs.map +1 -1
- package/dist/esm/envVariables/loadEnvFile.mjs +6 -0
- package/dist/esm/envVariables/loadEnvFile.mjs.map +1 -1
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/loadExternalFile.mjs +1 -0
- package/dist/esm/loadExternalFile.mjs.map +1 -1
- package/dist/types/defaultValues/content.d.ts.map +1 -1
- package/dist/types/envVariables/index.d.ts +1 -1
- package/dist/types/envVariables/index.d.ts.map +1 -1
- package/dist/types/envVariables/loadEnvFile.d.ts +1 -0
- package/dist/types/envVariables/loadEnvFile.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/loadExternalFile.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/defaultValues/content.ts"],"sourcesContent":["import type { DictionaryOutput } from '../types/config';\n\nexport const FILE_EXTENSIONS = [\n '.content.ts',\n '.content.js',\n '.content.cjs',\n '.content.mjs',\n '.content.json',\n '.content.tsx',\n '.content.jsx',\n];\nexport const EXCLUDED_PATHS = ['node_modules'];\n\nexport const CONTENT_DIR_NAME = 'src';\n\nexport const RESULT_DIR_NAME = '.intlayer';\n\nexport const MODULE_AUGMENTATION_DIR_NAME = '.intlayer/types';\n\nexport const DICTIONARY_OUTPUT: DictionaryOutput[] = ['intlayer'];\n\nexport const DICTIONARIES_DIR_NAME = 'dictionary';\n\nexport const I18NEXT_DICTIONARIES_DIR_NAME = 'i18next_resources';\n\nexport const REACT_INTL_MESSAGES_DIR_NAME = 'intl_messages';\n\nexport const TYPES_DIR_NAME = 'types';\n\nexport const MAIN_DIR_NAME = 'main';\n\nexport const CONFIG_DIR_NAME = 'config';\n\nexport const WATCH = process.env.NODE_ENV === 'development';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,iBAAiB,CAAC,cAAc;AAEtC,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;AAExB,MAAM,+BAA+B;AAErC,MAAM,oBAAwC,CAAC,UAAU;AAEzD,MAAM,wBAAwB;AAE9B,MAAM,gCAAgC;AAEtC,MAAM,+BAA+B;AAErC,MAAM,iBAAiB;AAEvB,MAAM,gBAAgB;AAEtB,MAAM,kBAAkB;AAExB,MAAM,QAAQ,QAAQ,IAAI,aAAa;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/defaultValues/content.ts"],"sourcesContent":["import type { DictionaryOutput } from '../types/config';\n\nexport const FILE_EXTENSIONS = [\n '.content.ts',\n '.content.js',\n '.content.cjs',\n '.content.cjx',\n '.content.mjs',\n '.content.mjx',\n '.content.json',\n '.content.tsx',\n '.content.jsx',\n];\nexport const EXCLUDED_PATHS = ['node_modules'];\n\nexport const CONTENT_DIR_NAME = 'src';\n\nexport const RESULT_DIR_NAME = '.intlayer';\n\nexport const MODULE_AUGMENTATION_DIR_NAME = '.intlayer/types';\n\nexport const DICTIONARY_OUTPUT: DictionaryOutput[] = ['intlayer'];\n\nexport const DICTIONARIES_DIR_NAME = 'dictionary';\n\nexport const I18NEXT_DICTIONARIES_DIR_NAME = 'i18next_resources';\n\nexport const REACT_INTL_MESSAGES_DIR_NAME = 'intl_messages';\n\nexport const TYPES_DIR_NAME = 'types';\n\nexport const MAIN_DIR_NAME = 'main';\n\nexport const CONFIG_DIR_NAME = 'config';\n\nexport const WATCH = process.env.NODE_ENV === 'development';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,iBAAiB,CAAC,cAAc;AAEtC,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;AAExB,MAAM,+BAA+B;AAErC,MAAM,oBAAwC,CAAC,UAAU;AAEzD,MAAM,wBAAwB;AAE9B,MAAM,gCAAgC;AAEtC,MAAM,+BAA+B;AAErC,MAAM,iBAAiB;AAEvB,MAAM,gBAAgB;AAEtB,MAAM,kBAAkB;AAExB,MAAM,QAAQ,QAAQ,IAAI,aAAa;","names":[]}
|
|
@@ -20,6 +20,7 @@ var envVariables_exports = {};
|
|
|
20
20
|
__export(envVariables_exports, {
|
|
21
21
|
formatEnvVariable: () => import_formatEnvVariable.formatEnvVariable,
|
|
22
22
|
getConfiguration: () => import_getConfiguration.getConfiguration,
|
|
23
|
+
getEnvFilePath: () => import_loadEnvFile.getEnvFilePath,
|
|
23
24
|
getPlatform: () => import_detectPlatform.getPlatform,
|
|
24
25
|
loadEnvFile: () => import_loadEnvFile.loadEnvFile
|
|
25
26
|
});
|
|
@@ -32,6 +33,7 @@ var import_detectPlatform = require('./detectPlatform.cjs');
|
|
|
32
33
|
0 && (module.exports = {
|
|
33
34
|
formatEnvVariable,
|
|
34
35
|
getConfiguration,
|
|
36
|
+
getEnvFilePath,
|
|
35
37
|
getPlatform,
|
|
36
38
|
loadEnvFile
|
|
37
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/envVariables/index.ts"],"sourcesContent":["export { getConfiguration } from './getConfiguration';\nexport { formatEnvVariable } from './formatEnvVariable';\nexport { loadEnvFile } from './loadEnvFile';\nexport { getPlatform } from './detectPlatform';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAiC;AACjC,+BAAkC;AAClC,
|
|
1
|
+
{"version":3,"sources":["../../../src/envVariables/index.ts"],"sourcesContent":["export { getConfiguration } from './getConfiguration';\nexport { formatEnvVariable } from './formatEnvVariable';\nexport { loadEnvFile, getEnvFilePath } from './loadEnvFile';\nexport { getPlatform } from './detectPlatform';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAAiC;AACjC,+BAAkC;AAClC,yBAA4C;AAC5C,4BAA4B;","names":[]}
|
|
@@ -28,11 +28,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var loadEnvFile_exports = {};
|
|
30
30
|
__export(loadEnvFile_exports, {
|
|
31
|
+
getEnvFilePath: () => getEnvFilePath,
|
|
31
32
|
loadEnvFile: () => loadEnvFile
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(loadEnvFile_exports);
|
|
34
35
|
var import_dotenv = __toESM(require("dotenv"));
|
|
36
|
+
var import_fs = require("fs");
|
|
35
37
|
const DEFAULT_ENV = process.env.NODE_ENV ?? "development";
|
|
38
|
+
const getEnvFilePath = (env = process.env.NODE_ENV ?? "development", envFile) => {
|
|
39
|
+
const envFiles = envFile ? [envFile] : [`.env.${env}.local`, `.env.${env}`, ".env.local", ".env"];
|
|
40
|
+
return envFiles.find(import_fs.existsSync);
|
|
41
|
+
};
|
|
36
42
|
const loadEnvFile = (options) => {
|
|
37
43
|
const env = options?.env ?? DEFAULT_ENV;
|
|
38
44
|
const envFiles = options?.envFile ? [options.envFile] : [`.env.${env}.local`, `.env.${env}`, ".env.local", ".env"];
|
|
@@ -45,6 +51,7 @@ const loadEnvFile = (options) => {
|
|
|
45
51
|
};
|
|
46
52
|
// Annotate the CommonJS export names for ESM import in node:
|
|
47
53
|
0 && (module.exports = {
|
|
54
|
+
getEnvFilePath,
|
|
48
55
|
loadEnvFile
|
|
49
56
|
});
|
|
50
57
|
//# sourceMappingURL=loadEnvFile.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/envVariables/loadEnvFile.ts"],"sourcesContent":["import 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 loadEnvFile = (options?: Partial<LoadEnvFileOptions>) => {\n const env = options?.env ?? DEFAULT_ENV;\n\n const envFiles = options?.envFile\n ? [options.envFile]\n : [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env'];\n\n const result = {};\n\n dotenv.config({\n path: envFiles,\n processEnv: result,\n });\n\n return result; // Return the parsed env object\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAmB;
|
|
1
|
+
{"version":3,"sources":["../../../src/envVariables/loadEnvFile.ts"],"sourcesContent":["import dotenv from 'dotenv';\nimport { existsSync } from 'fs';\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 = options?.envFile\n ? [options.envFile]\n : [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env'];\n\n const result = {};\n\n dotenv.config({\n path: envFiles,\n processEnv: result,\n });\n\n return result; // Return the parsed env object\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAmB;AACnB,gBAA2B;AAE3B,MAAM,cAAc,QAAQ,IAAI,YAAY;AAOrC,MAAM,iBAAiB,CAC5B,MAAc,QAAQ,IAAI,YAAY,eACtC,YACuB;AACvB,QAAM,WAAW,UACb,CAAC,OAAO,IACR,CAAC,QAAQ,GAAG,UAAU,QAAQ,GAAG,IAAI,cAAc,MAAM;AAE7D,SAAO,SAAS,KAAK,oBAAU;AACjC;AAEO,MAAM,cAAc,CAAC,YAA0C;AACpE,QAAM,MAAM,SAAS,OAAO;AAE5B,QAAM,WAAW,SAAS,UACtB,CAAC,QAAQ,OAAO,IAChB,CAAC,QAAQ,GAAG,UAAU,QAAQ,GAAG,IAAI,cAAc,MAAM;AAE7D,QAAM,SAAS,CAAC;AAEhB,gBAAAA,QAAO,OAAO;AAAA,IACZ,MAAM;AAAA,IACN,YAAY;AAAA,EACd,CAAC;AAED,SAAO;AACT;","names":["dotenv"]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
formatEnvVariable: () => import_envVariables.formatEnvVariable,
|
|
25
25
|
getClientConfiguration: () => import_envVariables.getConfiguration,
|
|
26
26
|
getConfiguration: () => import_getConfiguration.getConfiguration,
|
|
27
|
+
getEnvFilePath: () => import_envVariables.getEnvFilePath,
|
|
27
28
|
getPlatform: () => import_envVariables.getPlatform,
|
|
28
29
|
getSandBoxContext: () => import_getSandboxContext.getSandBoxContext,
|
|
29
30
|
loadEnvFile: () => import_envVariables.loadEnvFile,
|
|
@@ -47,6 +48,7 @@ var import_loadExternalFile = require('./loadExternalFile.cjs');
|
|
|
47
48
|
formatEnvVariable,
|
|
48
49
|
getClientConfiguration,
|
|
49
50
|
getConfiguration,
|
|
51
|
+
getEnvFilePath,
|
|
50
52
|
getPlatform,
|
|
51
53
|
getSandBoxContext,
|
|
52
54
|
loadEnvFile,
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n getConfiguration,\n type GetConfigurationOptions,\n} 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 LogConfig,\n StrictMode,\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 loadEnvFile,\n getPlatform,\n} from './envVariables/index';\nexport { ESMxCJSRequire } from './utils/ESMxCJSRequire';\nexport { logger } from './logger';\nexport { appLogger } from './appLoggerServer';\nexport { getSandBoxContext } from './getSandboxContext';\nexport { loadExternalFile } from './loadExternalFile';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAGO;AAiBP,qBAAwB;AACxB,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n getConfiguration,\n type GetConfigurationOptions,\n} 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 LogConfig,\n StrictMode,\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 getEnvFilePath,\n loadEnvFile,\n getPlatform,\n} from './envVariables/index';\nexport { ESMxCJSRequire } from './utils/ESMxCJSRequire';\nexport { logger } from './logger';\nexport { appLogger } from './appLoggerServer';\nexport { getSandBoxContext } from './getSandboxContext';\nexport { loadExternalFile } from './loadExternalFile';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAGO;AAiBP,qBAAwB;AACxB,0BAMO;AACP,4BAA+B;AAC/B,oBAAuB;AACvB,6BAA0B;AAC1B,+BAAkC;AAClC,8BAAiC;","names":[]}
|
|
@@ -57,6 +57,7 @@ const loadExternalFile = (filePath, envVarOptions) => {
|
|
|
57
57
|
const fileExtension = filePath.split(".").pop() ?? "";
|
|
58
58
|
try {
|
|
59
59
|
if (fileExtension === "json") {
|
|
60
|
+
delete import_ESMxCJSRequire.ESMxCJSRequire.cache[import_ESMxCJSRequire.ESMxCJSRequire.resolve(filePath)];
|
|
60
61
|
return (0, import_ESMxCJSRequire.ESMxCJSRequire)(filePath);
|
|
61
62
|
}
|
|
62
63
|
const moduleResult = (0, import_esbuild.buildSync)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/loadExternalFile.ts"],"sourcesContent":["import { runInNewContext } from 'vm';\nimport { type BuildOptions, buildSync, type BuildResult } from 'esbuild';\nimport { getSandBoxContext } from './getSandboxContext';\nimport { ESMxCJSRequire } from './utils/ESMxCJSRequire';\nimport { logger } from './logger';\nimport { LoadEnvFileOptions } from './envVariables/loadEnvFile';\nimport { dirname } from 'path';\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', // Output format as commonjs\n target: 'es2017',\n packages: 'external',\n write: false,\n bundle: true,\n banner: {\n js: `\n globalThis.intlayer_file_path = ${JSON.stringify(filePath)};\n globalThis.intlayer_file_dir = ${JSON.stringify(dirname(filePath))};\n `,\n },\n});\n\n/**\n * Load the content declaration from the given path\n *\n * Accepts JSON, JS, MJS and TS files as configuration\n */\nexport const loadExternalFile = (\n filePath: string,\n envVarOptions?: LoadEnvFileOptions\n): any | undefined => {\n let fileContent: any | undefined = undefined;\n\n const fileExtension = filePath.split('.').pop() ?? '';\n\n try {\n if (fileExtension === 'json') {\n // Assume JSON\n return ESMxCJSRequire(filePath);\n }\n\n // Rest is JS, MJS or TS\n\n const moduleResult: BuildResult = buildSync({\n entryPoints: [filePath],\n ...getTransformationOptions(filePath),\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n if (!moduleResultString) {\n logger('File could not be loaded.', { level: 'error' });\n return undefined;\n }\n\n const sandboxContext = getSandBoxContext(envVarOptions);\n\n runInNewContext(moduleResultString, sandboxContext);\n\n if (\n sandboxContext.exports.default &&\n Object.keys(sandboxContext.exports.default).length > 0\n ) {\n // ES Module\n fileContent = sandboxContext.exports.default;\n } else if (\n sandboxContext.module.exports.defaults &&\n Object.keys(sandboxContext.module.exports.defaults).length > 0\n ) {\n // CommonJS\n fileContent = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports.default &&\n Object.keys(sandboxContext.module.exports.default).length > 0\n ) {\n // ES Module\n fileContent = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports &&\n Object.keys(sandboxContext.module.exports).length > 0\n ) {\n // Other\n fileContent = sandboxContext.module.exports;\n }\n\n if (typeof fileContent === 'undefined') {\n logger(`File file could not be loaded. Path : ${filePath}`);\n return undefined;\n }\n\n return fileContent;\n } catch (error) {\n logger(\n `Error: ${error} ${JSON.stringify((error as Error).stack, null, 2)}`,\n {\n level: 'error',\n }\n );\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAgC;AAChC,qBAA+D;AAC/D,+BAAkC;AAClC,4BAA+B;AAC/B,oBAAuB;AAEvB,kBAAwB;AAExB,MAAM,2BAA2B,CAAC,cAAoC;AAAA,EACpE,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,IACN,IAAI;AAAA,sCAC8B,KAAK,UAAU,QAAQ,CAAC;AAAA,qCACzB,KAAK,cAAU,qBAAQ,QAAQ,CAAC,CAAC;AAAA;AAAA,EAEpE;AACF;AAOO,MAAM,mBAAmB,CAC9B,UACA,kBACoB;AACpB,MAAI,cAA+B;AAEnC,QAAM,gBAAgB,SAAS,MAAM,GAAG,EAAE,IAAI,KAAK;AAEnD,MAAI;AACF,QAAI,kBAAkB,QAAQ;AAE5B,iBAAO,sCAAe,QAAQ;AAAA,IAChC;AAIA,UAAM,mBAA4B,0BAAU;AAAA,MAC1C,aAAa,CAAC,QAAQ;AAAA,MACtB,GAAG,yBAAyB,QAAQ;AAAA,IACtC,CAAC;AAED,UAAM,qBAAqB,aAAa,cAAc,CAAC,EAAE;AAEzD,QAAI,CAAC,oBAAoB;AACvB,gCAAO,6BAA6B,EAAE,OAAO,QAAQ,CAAC;AACtD,aAAO;AAAA,IACT;AAEA,UAAM,qBAAiB,4CAAkB,aAAa;AAEtD,mCAAgB,oBAAoB,cAAc;AAElD,QACE,eAAe,QAAQ,WACvB,OAAO,KAAK,eAAe,QAAQ,OAAO,EAAE,SAAS,GACrD;AAEA,oBAAc,eAAe,QAAQ;AAAA,IACvC,WACE,eAAe,OAAO,QAAQ,YAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,QAAQ,EAAE,SAAS,GAC7D;AAEA,oBAAc,eAAe,OAAO,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,QAAQ,WAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,OAAO,EAAE,SAAS,GAC5D;AAEA,oBAAc,eAAe,OAAO,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,WACtB,OAAO,KAAK,eAAe,OAAO,OAAO,EAAE,SAAS,GACpD;AAEA,oBAAc,eAAe,OAAO;AAAA,IACtC;AAEA,QAAI,OAAO,gBAAgB,aAAa;AACtC,gCAAO,yCAAyC,QAAQ,EAAE;AAC1D,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd;AAAA,MACE,UAAU,KAAK,IAAI,KAAK,UAAW,MAAgB,OAAO,MAAM,CAAC,CAAC;AAAA,MAClE;AAAA,QACE,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/loadExternalFile.ts"],"sourcesContent":["import { runInNewContext } from 'vm';\nimport { type BuildOptions, buildSync, type BuildResult } from 'esbuild';\nimport { getSandBoxContext } from './getSandboxContext';\nimport { ESMxCJSRequire } from './utils/ESMxCJSRequire';\nimport { logger } from './logger';\nimport { LoadEnvFileOptions } from './envVariables/loadEnvFile';\nimport { dirname } from 'path';\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', // Output format as commonjs\n target: 'es2017',\n packages: 'external',\n write: false,\n bundle: true,\n banner: {\n js: `\n globalThis.intlayer_file_path = ${JSON.stringify(filePath)};\n globalThis.intlayer_file_dir = ${JSON.stringify(dirname(filePath))};\n `,\n },\n});\n\n/**\n * Load the content declaration from the given path\n *\n * Accepts JSON, JS, MJS and TS files as configuration\n */\nexport const loadExternalFile = (\n filePath: string,\n envVarOptions?: LoadEnvFileOptions\n): any | undefined => {\n let fileContent: any | undefined = undefined;\n\n const fileExtension = filePath.split('.').pop() ?? '';\n\n try {\n if (fileExtension === 'json') {\n // Remove cache to force reloading\n delete ESMxCJSRequire.cache[ESMxCJSRequire.resolve(filePath)];\n // Assume JSON\n return ESMxCJSRequire(filePath);\n }\n\n // Rest is JS, MJS or TS\n\n const moduleResult: BuildResult = buildSync({\n entryPoints: [filePath],\n ...getTransformationOptions(filePath),\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n if (!moduleResultString) {\n logger('File could not be loaded.', { level: 'error' });\n return undefined;\n }\n\n const sandboxContext = getSandBoxContext(envVarOptions);\n\n runInNewContext(moduleResultString, sandboxContext);\n\n if (\n sandboxContext.exports.default &&\n Object.keys(sandboxContext.exports.default).length > 0\n ) {\n // ES Module\n fileContent = sandboxContext.exports.default;\n } else if (\n sandboxContext.module.exports.defaults &&\n Object.keys(sandboxContext.module.exports.defaults).length > 0\n ) {\n // CommonJS\n fileContent = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports.default &&\n Object.keys(sandboxContext.module.exports.default).length > 0\n ) {\n // ES Module\n fileContent = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports &&\n Object.keys(sandboxContext.module.exports).length > 0\n ) {\n // Other\n fileContent = sandboxContext.module.exports;\n }\n\n if (typeof fileContent === 'undefined') {\n logger(`File file could not be loaded. Path : ${filePath}`);\n return undefined;\n }\n\n return fileContent;\n } catch (error) {\n logger(\n `Error: ${error} ${JSON.stringify((error as Error).stack, null, 2)}`,\n {\n level: 'error',\n }\n );\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAgC;AAChC,qBAA+D;AAC/D,+BAAkC;AAClC,4BAA+B;AAC/B,oBAAuB;AAEvB,kBAAwB;AAExB,MAAM,2BAA2B,CAAC,cAAoC;AAAA,EACpE,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,IACN,IAAI;AAAA,sCAC8B,KAAK,UAAU,QAAQ,CAAC;AAAA,qCACzB,KAAK,cAAU,qBAAQ,QAAQ,CAAC,CAAC;AAAA;AAAA,EAEpE;AACF;AAOO,MAAM,mBAAmB,CAC9B,UACA,kBACoB;AACpB,MAAI,cAA+B;AAEnC,QAAM,gBAAgB,SAAS,MAAM,GAAG,EAAE,IAAI,KAAK;AAEnD,MAAI;AACF,QAAI,kBAAkB,QAAQ;AAE5B,aAAO,qCAAe,MAAM,qCAAe,QAAQ,QAAQ,CAAC;AAE5D,iBAAO,sCAAe,QAAQ;AAAA,IAChC;AAIA,UAAM,mBAA4B,0BAAU;AAAA,MAC1C,aAAa,CAAC,QAAQ;AAAA,MACtB,GAAG,yBAAyB,QAAQ;AAAA,IACtC,CAAC;AAED,UAAM,qBAAqB,aAAa,cAAc,CAAC,EAAE;AAEzD,QAAI,CAAC,oBAAoB;AACvB,gCAAO,6BAA6B,EAAE,OAAO,QAAQ,CAAC;AACtD,aAAO;AAAA,IACT;AAEA,UAAM,qBAAiB,4CAAkB,aAAa;AAEtD,mCAAgB,oBAAoB,cAAc;AAElD,QACE,eAAe,QAAQ,WACvB,OAAO,KAAK,eAAe,QAAQ,OAAO,EAAE,SAAS,GACrD;AAEA,oBAAc,eAAe,QAAQ;AAAA,IACvC,WACE,eAAe,OAAO,QAAQ,YAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,QAAQ,EAAE,SAAS,GAC7D;AAEA,oBAAc,eAAe,OAAO,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,QAAQ,WAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,OAAO,EAAE,SAAS,GAC5D;AAEA,oBAAc,eAAe,OAAO,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,WACtB,OAAO,KAAK,eAAe,OAAO,OAAO,EAAE,SAAS,GACpD;AAEA,oBAAc,eAAe,OAAO;AAAA,IACtC;AAEA,QAAI,OAAO,gBAAgB,aAAa;AACtC,gCAAO,yCAAyC,QAAQ,EAAE;AAC1D,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd;AAAA,MACE,UAAU,KAAK,IAAI,KAAK,UAAW,MAAgB,OAAO,MAAM,CAAC,CAAC;AAAA,MAClE;AAAA,QACE,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/defaultValues/content.ts"],"sourcesContent":["import type { DictionaryOutput } from '../types/config';\n\nexport const FILE_EXTENSIONS = [\n '.content.ts',\n '.content.js',\n '.content.cjs',\n '.content.mjs',\n '.content.json',\n '.content.tsx',\n '.content.jsx',\n];\nexport const EXCLUDED_PATHS = ['node_modules'];\n\nexport const CONTENT_DIR_NAME = 'src';\n\nexport const RESULT_DIR_NAME = '.intlayer';\n\nexport const MODULE_AUGMENTATION_DIR_NAME = '.intlayer/types';\n\nexport const DICTIONARY_OUTPUT: DictionaryOutput[] = ['intlayer'];\n\nexport const DICTIONARIES_DIR_NAME = 'dictionary';\n\nexport const I18NEXT_DICTIONARIES_DIR_NAME = 'i18next_resources';\n\nexport const REACT_INTL_MESSAGES_DIR_NAME = 'intl_messages';\n\nexport const TYPES_DIR_NAME = 'types';\n\nexport const MAIN_DIR_NAME = 'main';\n\nexport const CONFIG_DIR_NAME = 'config';\n\nexport const WATCH = process.env.NODE_ENV === 'development';\n"],"mappings":"AAEO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,iBAAiB,CAAC,cAAc;AAEtC,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;AAExB,MAAM,+BAA+B;AAErC,MAAM,oBAAwC,CAAC,UAAU;AAEzD,MAAM,wBAAwB;AAE9B,MAAM,gCAAgC;AAEtC,MAAM,+BAA+B;AAErC,MAAM,iBAAiB;AAEvB,MAAM,gBAAgB;AAEtB,MAAM,kBAAkB;AAExB,MAAM,QAAQ,QAAQ,IAAI,aAAa;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/defaultValues/content.ts"],"sourcesContent":["import type { DictionaryOutput } from '../types/config';\n\nexport const FILE_EXTENSIONS = [\n '.content.ts',\n '.content.js',\n '.content.cjs',\n '.content.cjx',\n '.content.mjs',\n '.content.mjx',\n '.content.json',\n '.content.tsx',\n '.content.jsx',\n];\nexport const EXCLUDED_PATHS = ['node_modules'];\n\nexport const CONTENT_DIR_NAME = 'src';\n\nexport const RESULT_DIR_NAME = '.intlayer';\n\nexport const MODULE_AUGMENTATION_DIR_NAME = '.intlayer/types';\n\nexport const DICTIONARY_OUTPUT: DictionaryOutput[] = ['intlayer'];\n\nexport const DICTIONARIES_DIR_NAME = 'dictionary';\n\nexport const I18NEXT_DICTIONARIES_DIR_NAME = 'i18next_resources';\n\nexport const REACT_INTL_MESSAGES_DIR_NAME = 'intl_messages';\n\nexport const TYPES_DIR_NAME = 'types';\n\nexport const MAIN_DIR_NAME = 'main';\n\nexport const CONFIG_DIR_NAME = 'config';\n\nexport const WATCH = process.env.NODE_ENV === 'development';\n"],"mappings":"AAEO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,iBAAiB,CAAC,cAAc;AAEtC,MAAM,mBAAmB;AAEzB,MAAM,kBAAkB;AAExB,MAAM,+BAA+B;AAErC,MAAM,oBAAwC,CAAC,UAAU;AAEzD,MAAM,wBAAwB;AAE9B,MAAM,gCAAgC;AAEtC,MAAM,+BAA+B;AAErC,MAAM,iBAAiB;AAEvB,MAAM,gBAAgB;AAEtB,MAAM,kBAAkB;AAExB,MAAM,QAAQ,QAAQ,IAAI,aAAa;","names":[]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { getConfiguration } from "./getConfiguration.mjs";
|
|
2
2
|
import { formatEnvVariable } from "./formatEnvVariable.mjs";
|
|
3
|
-
import { loadEnvFile } from "./loadEnvFile.mjs";
|
|
3
|
+
import { loadEnvFile, getEnvFilePath } from "./loadEnvFile.mjs";
|
|
4
4
|
import { getPlatform } from "./detectPlatform.mjs";
|
|
5
5
|
export {
|
|
6
6
|
formatEnvVariable,
|
|
7
7
|
getConfiguration,
|
|
8
|
+
getEnvFilePath,
|
|
8
9
|
getPlatform,
|
|
9
10
|
loadEnvFile
|
|
10
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/envVariables/index.ts"],"sourcesContent":["export { getConfiguration } from './getConfiguration';\nexport { formatEnvVariable } from './formatEnvVariable';\nexport { loadEnvFile } from './loadEnvFile';\nexport { getPlatform } from './detectPlatform';\n"],"mappings":"AAAA,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAClC,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../../src/envVariables/index.ts"],"sourcesContent":["export { getConfiguration } from './getConfiguration';\nexport { formatEnvVariable } from './formatEnvVariable';\nexport { loadEnvFile, getEnvFilePath } from './loadEnvFile';\nexport { getPlatform } from './detectPlatform';\n"],"mappings":"AAAA,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAClC,SAAS,aAAa,sBAAsB;AAC5C,SAAS,mBAAmB;","names":[]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import dotenv from "dotenv";
|
|
2
|
+
import { existsSync } from "fs";
|
|
2
3
|
const DEFAULT_ENV = process.env.NODE_ENV ?? "development";
|
|
4
|
+
const getEnvFilePath = (env = process.env.NODE_ENV ?? "development", envFile) => {
|
|
5
|
+
const envFiles = envFile ? [envFile] : [`.env.${env}.local`, `.env.${env}`, ".env.local", ".env"];
|
|
6
|
+
return envFiles.find(existsSync);
|
|
7
|
+
};
|
|
3
8
|
const loadEnvFile = (options) => {
|
|
4
9
|
const env = options?.env ?? DEFAULT_ENV;
|
|
5
10
|
const envFiles = options?.envFile ? [options.envFile] : [`.env.${env}.local`, `.env.${env}`, ".env.local", ".env"];
|
|
@@ -11,6 +16,7 @@ const loadEnvFile = (options) => {
|
|
|
11
16
|
return result;
|
|
12
17
|
};
|
|
13
18
|
export {
|
|
19
|
+
getEnvFilePath,
|
|
14
20
|
loadEnvFile
|
|
15
21
|
};
|
|
16
22
|
//# sourceMappingURL=loadEnvFile.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/envVariables/loadEnvFile.ts"],"sourcesContent":["import 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 loadEnvFile = (options?: Partial<LoadEnvFileOptions>) => {\n const env = options?.env ?? DEFAULT_ENV;\n\n const envFiles = options?.envFile\n ? [options.envFile]\n : [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env'];\n\n const result = {};\n\n dotenv.config({\n path: envFiles,\n processEnv: result,\n });\n\n return result; // Return the parsed env object\n};\n"],"mappings":"AAAA,OAAO,YAAY;
|
|
1
|
+
{"version":3,"sources":["../../../src/envVariables/loadEnvFile.ts"],"sourcesContent":["import dotenv from 'dotenv';\nimport { existsSync } from 'fs';\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 = options?.envFile\n ? [options.envFile]\n : [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env'];\n\n const result = {};\n\n dotenv.config({\n path: envFiles,\n processEnv: result,\n });\n\n return result; // Return the parsed env object\n};\n"],"mappings":"AAAA,OAAO,YAAY;AACnB,SAAS,kBAAkB;AAE3B,MAAM,cAAc,QAAQ,IAAI,YAAY;AAOrC,MAAM,iBAAiB,CAC5B,MAAc,QAAQ,IAAI,YAAY,eACtC,YACuB;AACvB,QAAM,WAAW,UACb,CAAC,OAAO,IACR,CAAC,QAAQ,GAAG,UAAU,QAAQ,GAAG,IAAI,cAAc,MAAM;AAE7D,SAAO,SAAS,KAAK,UAAU;AACjC;AAEO,MAAM,cAAc,CAAC,YAA0C;AACpE,QAAM,MAAM,SAAS,OAAO;AAE5B,QAAM,WAAW,SAAS,UACtB,CAAC,QAAQ,OAAO,IAChB,CAAC,QAAQ,GAAG,UAAU,QAAQ,GAAG,IAAI,cAAc,MAAM;AAE7D,QAAM,SAAS,CAAC;AAEhB,SAAO,OAAO;AAAA,IACZ,MAAM;AAAA,IACN,YAAY;AAAA,EACd,CAAC;AAED,SAAO;AACT;","names":[]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { Locales } from "./types/locales.mjs";
|
|
|
5
5
|
import {
|
|
6
6
|
formatEnvVariable,
|
|
7
7
|
getConfiguration as getConfiguration2,
|
|
8
|
+
getEnvFilePath,
|
|
8
9
|
loadEnvFile,
|
|
9
10
|
getPlatform
|
|
10
11
|
} from "./envVariables/index.mjs";
|
|
@@ -20,6 +21,7 @@ export {
|
|
|
20
21
|
formatEnvVariable,
|
|
21
22
|
getConfiguration2 as getClientConfiguration,
|
|
22
23
|
getConfiguration,
|
|
24
|
+
getEnvFilePath,
|
|
23
25
|
getPlatform,
|
|
24
26
|
getSandBoxContext,
|
|
25
27
|
loadEnvFile,
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n getConfiguration,\n type GetConfigurationOptions,\n} 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 LogConfig,\n StrictMode,\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 loadEnvFile,\n getPlatform,\n} from './envVariables/index';\nexport { ESMxCJSRequire } from './utils/ESMxCJSRequire';\nexport { logger } from './logger';\nexport { appLogger } from './appLoggerServer';\nexport { getSandBoxContext } from './getSandboxContext';\nexport { loadExternalFile } from './loadExternalFile';\n"],"mappings":"AAAA;AAAA,EACE;AAAA,OAEK;AAiBP,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACoB,oBAApBA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;","names":["getConfiguration"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n getConfiguration,\n type GetConfigurationOptions,\n} 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 LogConfig,\n StrictMode,\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 getEnvFilePath,\n loadEnvFile,\n getPlatform,\n} from './envVariables/index';\nexport { ESMxCJSRequire } from './utils/ESMxCJSRequire';\nexport { logger } from './logger';\nexport { appLogger } from './appLoggerServer';\nexport { getSandBoxContext } from './getSandboxContext';\nexport { loadExternalFile } from './loadExternalFile';\n"],"mappings":"AAAA;AAAA,EACE;AAAA,OAEK;AAiBP,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACoB,oBAApBA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;","names":["getConfiguration"]}
|
|
@@ -34,6 +34,7 @@ const loadExternalFile = (filePath, envVarOptions) => {
|
|
|
34
34
|
const fileExtension = filePath.split(".").pop() ?? "";
|
|
35
35
|
try {
|
|
36
36
|
if (fileExtension === "json") {
|
|
37
|
+
delete ESMxCJSRequire.cache[ESMxCJSRequire.resolve(filePath)];
|
|
37
38
|
return ESMxCJSRequire(filePath);
|
|
38
39
|
}
|
|
39
40
|
const moduleResult = buildSync({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/loadExternalFile.ts"],"sourcesContent":["import { runInNewContext } from 'vm';\nimport { type BuildOptions, buildSync, type BuildResult } from 'esbuild';\nimport { getSandBoxContext } from './getSandboxContext';\nimport { ESMxCJSRequire } from './utils/ESMxCJSRequire';\nimport { logger } from './logger';\nimport { LoadEnvFileOptions } from './envVariables/loadEnvFile';\nimport { dirname } from 'path';\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', // Output format as commonjs\n target: 'es2017',\n packages: 'external',\n write: false,\n bundle: true,\n banner: {\n js: `\n globalThis.intlayer_file_path = ${JSON.stringify(filePath)};\n globalThis.intlayer_file_dir = ${JSON.stringify(dirname(filePath))};\n `,\n },\n});\n\n/**\n * Load the content declaration from the given path\n *\n * Accepts JSON, JS, MJS and TS files as configuration\n */\nexport const loadExternalFile = (\n filePath: string,\n envVarOptions?: LoadEnvFileOptions\n): any | undefined => {\n let fileContent: any | undefined = undefined;\n\n const fileExtension = filePath.split('.').pop() ?? '';\n\n try {\n if (fileExtension === 'json') {\n // Assume JSON\n return ESMxCJSRequire(filePath);\n }\n\n // Rest is JS, MJS or TS\n\n const moduleResult: BuildResult = buildSync({\n entryPoints: [filePath],\n ...getTransformationOptions(filePath),\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n if (!moduleResultString) {\n logger('File could not be loaded.', { level: 'error' });\n return undefined;\n }\n\n const sandboxContext = getSandBoxContext(envVarOptions);\n\n runInNewContext(moduleResultString, sandboxContext);\n\n if (\n sandboxContext.exports.default &&\n Object.keys(sandboxContext.exports.default).length > 0\n ) {\n // ES Module\n fileContent = sandboxContext.exports.default;\n } else if (\n sandboxContext.module.exports.defaults &&\n Object.keys(sandboxContext.module.exports.defaults).length > 0\n ) {\n // CommonJS\n fileContent = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports.default &&\n Object.keys(sandboxContext.module.exports.default).length > 0\n ) {\n // ES Module\n fileContent = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports &&\n Object.keys(sandboxContext.module.exports).length > 0\n ) {\n // Other\n fileContent = sandboxContext.module.exports;\n }\n\n if (typeof fileContent === 'undefined') {\n logger(`File file could not be loaded. Path : ${filePath}`);\n return undefined;\n }\n\n return fileContent;\n } catch (error) {\n logger(\n `Error: ${error} ${JSON.stringify((error as Error).stack, null, 2)}`,\n {\n level: 'error',\n }\n );\n }\n};\n"],"mappings":"AAAA,SAAS,uBAAuB;AAChC,SAA4B,iBAAmC;AAC/D,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AAEvB,SAAS,eAAe;AAExB,MAAM,2BAA2B,CAAC,cAAoC;AAAA,EACpE,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,IACN,IAAI;AAAA,sCAC8B,KAAK,UAAU,QAAQ,CAAC;AAAA,qCACzB,KAAK,UAAU,QAAQ,QAAQ,CAAC,CAAC;AAAA;AAAA,EAEpE;AACF;AAOO,MAAM,mBAAmB,CAC9B,UACA,kBACoB;AACpB,MAAI,cAA+B;AAEnC,QAAM,gBAAgB,SAAS,MAAM,GAAG,EAAE,IAAI,KAAK;AAEnD,MAAI;AACF,QAAI,kBAAkB,QAAQ;AAE5B,aAAO,eAAe,QAAQ;AAAA,IAChC;AAIA,UAAM,eAA4B,UAAU;AAAA,MAC1C,aAAa,CAAC,QAAQ;AAAA,MACtB,GAAG,yBAAyB,QAAQ;AAAA,IACtC,CAAC;AAED,UAAM,qBAAqB,aAAa,cAAc,CAAC,EAAE;AAEzD,QAAI,CAAC,oBAAoB;AACvB,aAAO,6BAA6B,EAAE,OAAO,QAAQ,CAAC;AACtD,aAAO;AAAA,IACT;AAEA,UAAM,iBAAiB,kBAAkB,aAAa;AAEtD,oBAAgB,oBAAoB,cAAc;AAElD,QACE,eAAe,QAAQ,WACvB,OAAO,KAAK,eAAe,QAAQ,OAAO,EAAE,SAAS,GACrD;AAEA,oBAAc,eAAe,QAAQ;AAAA,IACvC,WACE,eAAe,OAAO,QAAQ,YAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,QAAQ,EAAE,SAAS,GAC7D;AAEA,oBAAc,eAAe,OAAO,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,QAAQ,WAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,OAAO,EAAE,SAAS,GAC5D;AAEA,oBAAc,eAAe,OAAO,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,WACtB,OAAO,KAAK,eAAe,OAAO,OAAO,EAAE,SAAS,GACpD;AAEA,oBAAc,eAAe,OAAO;AAAA,IACtC;AAEA,QAAI,OAAO,gBAAgB,aAAa;AACtC,aAAO,yCAAyC,QAAQ,EAAE;AAC1D,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd;AAAA,MACE,UAAU,KAAK,IAAI,KAAK,UAAW,MAAgB,OAAO,MAAM,CAAC,CAAC;AAAA,MAClE;AAAA,QACE,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/loadExternalFile.ts"],"sourcesContent":["import { runInNewContext } from 'vm';\nimport { type BuildOptions, buildSync, type BuildResult } from 'esbuild';\nimport { getSandBoxContext } from './getSandboxContext';\nimport { ESMxCJSRequire } from './utils/ESMxCJSRequire';\nimport { logger } from './logger';\nimport { LoadEnvFileOptions } from './envVariables/loadEnvFile';\nimport { dirname } from 'path';\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', // Output format as commonjs\n target: 'es2017',\n packages: 'external',\n write: false,\n bundle: true,\n banner: {\n js: `\n globalThis.intlayer_file_path = ${JSON.stringify(filePath)};\n globalThis.intlayer_file_dir = ${JSON.stringify(dirname(filePath))};\n `,\n },\n});\n\n/**\n * Load the content declaration from the given path\n *\n * Accepts JSON, JS, MJS and TS files as configuration\n */\nexport const loadExternalFile = (\n filePath: string,\n envVarOptions?: LoadEnvFileOptions\n): any | undefined => {\n let fileContent: any | undefined = undefined;\n\n const fileExtension = filePath.split('.').pop() ?? '';\n\n try {\n if (fileExtension === 'json') {\n // Remove cache to force reloading\n delete ESMxCJSRequire.cache[ESMxCJSRequire.resolve(filePath)];\n // Assume JSON\n return ESMxCJSRequire(filePath);\n }\n\n // Rest is JS, MJS or TS\n\n const moduleResult: BuildResult = buildSync({\n entryPoints: [filePath],\n ...getTransformationOptions(filePath),\n });\n\n const moduleResultString = moduleResult.outputFiles?.[0].text;\n\n if (!moduleResultString) {\n logger('File could not be loaded.', { level: 'error' });\n return undefined;\n }\n\n const sandboxContext = getSandBoxContext(envVarOptions);\n\n runInNewContext(moduleResultString, sandboxContext);\n\n if (\n sandboxContext.exports.default &&\n Object.keys(sandboxContext.exports.default).length > 0\n ) {\n // ES Module\n fileContent = sandboxContext.exports.default;\n } else if (\n sandboxContext.module.exports.defaults &&\n Object.keys(sandboxContext.module.exports.defaults).length > 0\n ) {\n // CommonJS\n fileContent = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports.default &&\n Object.keys(sandboxContext.module.exports.default).length > 0\n ) {\n // ES Module\n fileContent = sandboxContext.module.exports.default;\n } else if (\n sandboxContext.module.exports &&\n Object.keys(sandboxContext.module.exports).length > 0\n ) {\n // Other\n fileContent = sandboxContext.module.exports;\n }\n\n if (typeof fileContent === 'undefined') {\n logger(`File file could not be loaded. Path : ${filePath}`);\n return undefined;\n }\n\n return fileContent;\n } catch (error) {\n logger(\n `Error: ${error} ${JSON.stringify((error as Error).stack, null, 2)}`,\n {\n level: 'error',\n }\n );\n }\n};\n"],"mappings":"AAAA,SAAS,uBAAuB;AAChC,SAA4B,iBAAmC;AAC/D,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AAEvB,SAAS,eAAe;AAExB,MAAM,2BAA2B,CAAC,cAAoC;AAAA,EACpE,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,QAAQ;AAAA;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,IACN,IAAI;AAAA,sCAC8B,KAAK,UAAU,QAAQ,CAAC;AAAA,qCACzB,KAAK,UAAU,QAAQ,QAAQ,CAAC,CAAC;AAAA;AAAA,EAEpE;AACF;AAOO,MAAM,mBAAmB,CAC9B,UACA,kBACoB;AACpB,MAAI,cAA+B;AAEnC,QAAM,gBAAgB,SAAS,MAAM,GAAG,EAAE,IAAI,KAAK;AAEnD,MAAI;AACF,QAAI,kBAAkB,QAAQ;AAE5B,aAAO,eAAe,MAAM,eAAe,QAAQ,QAAQ,CAAC;AAE5D,aAAO,eAAe,QAAQ;AAAA,IAChC;AAIA,UAAM,eAA4B,UAAU;AAAA,MAC1C,aAAa,CAAC,QAAQ;AAAA,MACtB,GAAG,yBAAyB,QAAQ;AAAA,IACtC,CAAC;AAED,UAAM,qBAAqB,aAAa,cAAc,CAAC,EAAE;AAEzD,QAAI,CAAC,oBAAoB;AACvB,aAAO,6BAA6B,EAAE,OAAO,QAAQ,CAAC;AACtD,aAAO;AAAA,IACT;AAEA,UAAM,iBAAiB,kBAAkB,aAAa;AAEtD,oBAAgB,oBAAoB,cAAc;AAElD,QACE,eAAe,QAAQ,WACvB,OAAO,KAAK,eAAe,QAAQ,OAAO,EAAE,SAAS,GACrD;AAEA,oBAAc,eAAe,QAAQ;AAAA,IACvC,WACE,eAAe,OAAO,QAAQ,YAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,QAAQ,EAAE,SAAS,GAC7D;AAEA,oBAAc,eAAe,OAAO,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,QAAQ,WAC9B,OAAO,KAAK,eAAe,OAAO,QAAQ,OAAO,EAAE,SAAS,GAC5D;AAEA,oBAAc,eAAe,OAAO,QAAQ;AAAA,IAC9C,WACE,eAAe,OAAO,WACtB,OAAO,KAAK,eAAe,OAAO,OAAO,EAAE,SAAS,GACpD;AAEA,oBAAc,eAAe,OAAO;AAAA,IACtC;AAEA,QAAI,OAAO,gBAAgB,aAAa;AACtC,aAAO,yCAAyC,QAAQ,EAAE;AAC1D,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd;AAAA,MACE,UAAU,KAAK,IAAI,KAAK,UAAW,MAAgB,OAAO,MAAM,CAAC,CAAC;AAAA,MAClE;AAAA,QACE,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/defaultValues/content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/defaultValues/content.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,eAAO,MAAM,eAAe,UAU3B,CAAC;AACF,eAAO,MAAM,cAAc,UAAmB,CAAC;AAE/C,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAEtC,eAAO,MAAM,eAAe,cAAc,CAAC;AAE3C,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAE9D,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,EAAiB,CAAC;AAElE,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD,eAAO,MAAM,6BAA6B,sBAAsB,CAAC;AAEjE,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D,eAAO,MAAM,cAAc,UAAU,CAAC;AAEtC,eAAO,MAAM,aAAa,SAAS,CAAC;AAEpC,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC,eAAO,MAAM,KAAK,SAAyC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { getConfiguration } from './getConfiguration';
|
|
2
2
|
export { formatEnvVariable } from './formatEnvVariable';
|
|
3
|
-
export { loadEnvFile } from './loadEnvFile';
|
|
3
|
+
export { loadEnvFile, getEnvFilePath } from './loadEnvFile';
|
|
4
4
|
export { getPlatform } from './detectPlatform';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/envVariables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/envVariables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -2,5 +2,6 @@ export type LoadEnvFileOptions = {
|
|
|
2
2
|
env?: string;
|
|
3
3
|
envFile?: string;
|
|
4
4
|
};
|
|
5
|
+
export declare const getEnvFilePath: (env?: string, envFile?: string) => string | undefined;
|
|
5
6
|
export declare const loadEnvFile: (options?: Partial<LoadEnvFileOptions>) => {};
|
|
6
7
|
//# sourceMappingURL=loadEnvFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadEnvFile.d.ts","sourceRoot":"","sources":["../../../src/envVariables/loadEnvFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadEnvFile.d.ts","sourceRoot":"","sources":["../../../src/envVariables/loadEnvFile.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,MAAK,MAA8C,EACnD,UAAU,MAAM,KACf,MAAM,GAAG,SAMX,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,UAAU,OAAO,CAAC,kBAAkB,CAAC,OAehE,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { getConfiguration, type GetConfigurationOptions, } from './configFile/ge
|
|
|
2
2
|
export type { InternationalizationConfig, ServerSetCookieRule, MiddlewareConfig, CustomIntlayerConfig, BaseContentConfig, BaseDerivedConfig, ResultDirDerivedConfig, PatternsContentConfig, ContentConfig, LogConfig, StrictMode, IntlayerConfig, } from './types/config';
|
|
3
3
|
export type { LocalesValues } from './types/locales';
|
|
4
4
|
export { Locales } from './types/locales';
|
|
5
|
-
export { formatEnvVariable, getConfiguration as getClientConfiguration, loadEnvFile, getPlatform, } from './envVariables/index';
|
|
5
|
+
export { formatEnvVariable, getConfiguration as getClientConfiguration, getEnvFilePath, loadEnvFile, getPlatform, } from './envVariables/index';
|
|
6
6
|
export { ESMxCJSRequire } from './utils/ESMxCJSRequire';
|
|
7
7
|
export { logger } from './logger';
|
|
8
8
|
export { appLogger } from './appLoggerServer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,IAAI,sBAAsB,EAC1C,WAAW,EACX,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,UAAU,EACV,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,IAAI,sBAAsB,EAC1C,cAAc,EACd,WAAW,EACX,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadExternalFile.d.ts","sourceRoot":"","sources":["../../src/loadExternalFile.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AA4BhE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,gBAAgB,kBAAkB,KACjC,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"loadExternalFile.d.ts","sourceRoot":"","sources":["../../src/loadExternalFile.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AA4BhE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,gBAAgB,kBAAkB,KACjC,GAAG,GAAG,SAuER,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/config",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.",
|
|
6
6
|
"keywords": [
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@utils/tsup-config": "1.0.4"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"intlayer": "5.3.
|
|
91
|
+
"intlayer": "5.3.4"
|
|
92
92
|
},
|
|
93
93
|
"engines": {
|
|
94
94
|
"node": ">=14.18"
|