UNPKG

@intlayer/config

Version:

Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.

101 lines 4.62 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var react_app_exports = {}; __export(react_app_exports, { extractReactAppEnvVariable: () => extractReactAppEnvVariable }); module.exports = __toCommonJS(react_app_exports); const extractReactAppEnvVariable = () => { const internationalization = { locales: process.env.REACT_APP_INTLAYER_LOCALES, requiredLocales: process.env.REACT_APP_INTLAYER_REQUIRED_LOCALES, strictMode: process.env.REACT_APP_INTLAYER_STRICT_MODE, defaultLocale: process.env.REACT_APP_INTLAYER_DEFAULT_LOCALE }; const middleware = { headerName: process.env.REACT_APP_INTLAYER_HEADER_NAME, cookieName: process.env.REACT_APP_INTLAYER_COOKIE_NAME, prefixDefault: process.env.REACT_APP_INTLAYER_PREFIX_DEFAULT, basePath: process.env.REACT_APP_INTLAYER_BASE_PATH, serverSetCookie: process.env.REACT_APP_INTLAYER_SERVER_SET_COOKIE, noPrefix: process.env.REACT_APP_INTLAYER_NO_PREFIX }; const content = { fileExtensions: process.env.REACT_APP_INTLAYER_FILE_EXTENSIONS, baseDir: process.env.REACT_APP_INTLAYER_BASE_DIR, contentDir: process.env.REACT_APP_INTLAYER_CONTENT_DIR, excludedPath: process.env.REACT_APP_INTLAYER_EXCLUDED_PATH, dictionariesDir: process.env.REACT_APP_INTLAYER_RESULT_DIR, unmergedDictionariesDir: process.env.REACT_APP_INTLAYER_UNMERGED_DICTIONARIES_DIR, dynamicDictionariesDir: process.env.REACT_APP_INTLAYER_DYNAMIC_DICTIONARIES_DIR, moduleAugmentationDir: process.env.REACT_APP_INTLAYER_MODULE_AUGMENTATION_DIR, i18nextResourcesDir: process.env.REACT_APP_INTLAYER_I18N_DICTIONARIES_DIR, reactIntlMessagesDir: process.env.REACT_APP_INTLAYER_REACT_INTL_DICTIONARIES_DIR, typesDir: process.env.REACT_APP_INTLAYER_TYPE_DIR, mainDir: process.env.REACT_APP_INTLAYER_MAIN_DIR, configDir: process.env.REACT_APP_INTLAYER_CONFIG_DIR, watchedFilesPattern: process.env.REACT_APP_INTLAYER_WATCHED_FILES_PATTERN, watchedFilesPatternWithPath: process.env.REACT_APP_INTLAYER_WATCHED_FILES_PATTERN_WITH_PATH, outputFilesPatternWithPath: process.env.REACT_APP_INTLAYER_OUTPUT_FILES_PATTERN_WITH_PATH, dictionaryOutput: process.env.REACT_APP_INTLAYER_DICTIONARY_OUTPUT, watch: process.env.REACT_APP_INTLAYER_WATCH }; const editor = { applicationURL: process.env.REACT_APP_INTLAYER_APPLICATION_URL, editorURL: process.env.REACT_APP_INTLAYER_EDITOR_URL, cmsURL: process.env.REACT_APP_INTLAYER_CMS_URL, backendURL: process.env.REACT_APP_INTLAYER_BACKEND_URL, port: process.env.REACT_APP_INTLAYER_PORT, enabled: process.env.REACT_APP_INTLAYER_ENABLED, clientId: process.env.REACT_APP_INTLAYER_CLIENT_ID, clientSecret: process.env.REACT_APP_INTLAYER_CLIENT_SECRET, dictionaryPriorityStrategy: process.env.REACT_APP_INTLAYER_DICTIONARY_PRIORITY_STRATEGY, hotReload: process.env.REACT_APP_INTLAYER_HOT_RELOAD }; const log = { mode: process.env.REACT_APP_INTLAYER_LOG_MODE, prefix: process.env.REACT_APP_INTLAYER_LOG_PREFIX }; const ai = { provider: process.env.REACT_APP_INTLAYER_AI_PROVIDER, model: process.env.REACT_APP_INTLAYER_AI_MODEL, temperature: process.env.REACT_APP_INTLAYER_AI_TEMPERATURE, apiKey: process.env.REACT_APP_INTLAYER_AI_API_KEY, applicationContext: process.env.REACT_APP_INTLAYER_AI_APPLICATION_CONTEXT }; const build = { optimize: process.env.REACT_APP_INTLAYER_BUILD_OPTIMIZE, activateDynamicImport: process.env.REACT_APP_INTLAYER_BUILD_ACTIVATE_DYNAMIC_IMPORT, traversePattern: process.env.REACT_APP_INTLAYER_BUILD_TRAVERSE_PATTERN }; return { internationalization, middleware, content, editor, log, ai, build }; }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { extractReactAppEnvVariable }); //# sourceMappingURL=react_app.cjs.map