@intlayer/config 5.6.0 → 5.7.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.
Files changed (59) hide show
  1. package/dist/cjs/configFile/buildConfigurationFields.cjs +18 -9
  2. package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
  3. package/dist/cjs/configFile/loadConfigurationFile.cjs +1 -1
  4. package/dist/cjs/configFile/loadConfigurationFile.cjs.map +1 -1
  5. package/dist/cjs/defaultValues/build.cjs +3 -3
  6. package/dist/cjs/defaultValues/build.cjs.map +1 -1
  7. package/dist/cjs/defaultValues/content.cjs +8 -1
  8. package/dist/cjs/defaultValues/content.cjs.map +1 -1
  9. package/dist/cjs/envVariables/extractEnvVariable/next.cjs +1 -1
  10. package/dist/cjs/envVariables/extractEnvVariable/next.cjs.map +1 -1
  11. package/dist/cjs/envVariables/extractEnvVariable/react_app.cjs +1 -1
  12. package/dist/cjs/envVariables/extractEnvVariable/react_app.cjs.map +1 -1
  13. package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.cjs +1 -1
  14. package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.cjs.map +1 -1
  15. package/dist/cjs/envVariables/extractEnvVariable/vite.cjs +1 -1
  16. package/dist/cjs/envVariables/extractEnvVariable/vite.cjs.map +1 -1
  17. package/dist/cjs/envVariables/getConfiguration.cjs +1 -4
  18. package/dist/cjs/envVariables/getConfiguration.cjs.map +1 -1
  19. package/dist/cjs/loadExternalFile.cjs +4 -4
  20. package/dist/cjs/loadExternalFile.cjs.map +1 -1
  21. package/dist/cjs/types/config.cjs.map +1 -1
  22. package/dist/cjs/types/locales.cjs +12 -0
  23. package/dist/cjs/types/locales.cjs.map +1 -1
  24. package/dist/esm/configFile/buildConfigurationFields.mjs +19 -10
  25. package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
  26. package/dist/esm/configFile/loadConfigurationFile.mjs +1 -1
  27. package/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -1
  28. package/dist/esm/defaultValues/build.mjs +2 -2
  29. package/dist/esm/defaultValues/build.mjs.map +1 -1
  30. package/dist/esm/defaultValues/content.mjs +8 -1
  31. package/dist/esm/defaultValues/content.mjs.map +1 -1
  32. package/dist/esm/envVariables/extractEnvVariable/next.mjs +1 -1
  33. package/dist/esm/envVariables/extractEnvVariable/next.mjs.map +1 -1
  34. package/dist/esm/envVariables/extractEnvVariable/react_app.mjs +1 -1
  35. package/dist/esm/envVariables/extractEnvVariable/react_app.mjs.map +1 -1
  36. package/dist/esm/envVariables/extractEnvVariable/undefined_platform.mjs +1 -1
  37. package/dist/esm/envVariables/extractEnvVariable/undefined_platform.mjs.map +1 -1
  38. package/dist/esm/envVariables/extractEnvVariable/vite.mjs +1 -1
  39. package/dist/esm/envVariables/extractEnvVariable/vite.mjs.map +1 -1
  40. package/dist/esm/envVariables/getConfiguration.mjs +1 -4
  41. package/dist/esm/envVariables/getConfiguration.mjs.map +1 -1
  42. package/dist/esm/loadExternalFile.mjs +4 -4
  43. package/dist/esm/loadExternalFile.mjs.map +1 -1
  44. package/dist/esm/types/locales.mjs +12 -0
  45. package/dist/esm/types/locales.mjs.map +1 -1
  46. package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
  47. package/dist/types/configFile/loadConfigurationFile.d.ts.map +1 -1
  48. package/dist/types/defaultValues/build.d.ts +1 -1
  49. package/dist/types/defaultValues/build.d.ts.map +1 -1
  50. package/dist/types/defaultValues/content.d.ts.map +1 -1
  51. package/dist/types/envVariables/extractEnvVariable/next.d.ts.map +1 -1
  52. package/dist/types/envVariables/extractEnvVariable/react_app.d.ts.map +1 -1
  53. package/dist/types/envVariables/extractEnvVariable/vite.d.ts.map +1 -1
  54. package/dist/types/envVariables/getConfiguration.d.ts.map +1 -1
  55. package/dist/types/types/config.d.ts +17 -8
  56. package/dist/types/types/config.d.ts.map +1 -1
  57. package/dist/types/types/locales.d.ts +25 -1
  58. package/dist/types/types/locales.d.ts.map +1 -1
  59. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/types/config.ts"],"sourcesContent":["import type { Locales } from './locales';\n\nexport type StrictMode = 'strict' | 'inclusive' | 'loose';\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 * Locales required by TypeScript to ensure strong implementations of internationalized content using typescript.\n *\n * Default: []\n *\n * If empty, all locales are required in `strict` mode.\n *\n * Ensure required locales are also defined in the `locales` field.\n */\n requiredLocales: Locales[];\n\n /**\n * Ensure strong implementations of internationalized content using typescript.\n * - If set to \"strict\", the translation `t` function will require each declared locales to be defined. If one locale is missing, or if a locale is not declared in your config, it will throw an error.\n * - If set to \"inclusive\", the translation `t` function will require each declared locales to be defined. If one locale is missing, it will throw a warning. But will accept if a locale is not declared in your config, but exist.\n * - If set to \"loose\", the translation `t` function will accept any existing locale.\n *\n * Default: \"inclusive\"\n */\n strictMode: StrictMode;\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: 'INTLAYER_LOCALE'\n *\n * The cookie key where the locale information is stored.\n */\n cookieName: string;\n\n /**\n * Prefix default prefix the default locale to the path as other locales.\n *\n * Example with prefixDefault = true and defaultLocale = 'en':\n * path = /en/dashboard or /fr/dashboard\n *\n * Example with prefixDefault = false and defaultLocale = 'en':\n * path = /dashboard or /fr/dashboard\n *\n *\n * Default: false\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 * Configuration for intlayer editor\n */\nexport type EditorConfig = {\n /**\n * URL of the application. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: '*'\n */\n applicationURL: string;\n\n /**\n * URL of the editor server. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: 'http://localhost:8000'\n */\n editorURL: string;\n\n /**\n * URL of the CMS server. Used to restrict the origin of the editor for security reasons.\n *\n * Default: 'https://intlayer.org'\n */\n cmsURL: string;\n\n /**\n * URL of the backend\n *\n * Default: 'https://back.intlayer.org'\n *\n * The URL of the backend server.\n */\n backendURL: string;\n\n /**\n * Indicates if the application interact with the visual editor\n *\n * Default: true;\n *\n * If true, the editor will be able to interact with the application.\n * If false, the editor will not be able to interact with the application.\n * In any case, the editor can only be enabled by the visual editor.\n * Disabling the editor for specific environments is a way to enforce the security.\n *\n * Usage:\n * ```js\n * {\n * // Other configurations\n * editor: {\n * enabled: process.env.NODE_ENV !== 'production',\n * }\n * };\n * ```\n *\n */\n enabled: boolean;\n\n /** Port of the editor server\n *\n * Default: 8000\n */\n port: number;\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientId?: string;\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientSecret?: string;\n\n /**\n * Strategy for prioritizing dictionaries. If a dictionary is both present online and locally, the content will be merge.\n * However, is a field is defined in both dictionary, this setting determines which fields takes the priority over the other.\n *\n * Default: 'local_first'\n *\n * The strategy for prioritizing dictionaries. It can be either 'local_first' or 'distant_first'.\n * - 'local_first': The first dictionary found in the locale is used.\n * - 'distant_first': The first dictionary found in the distant locales is used.\n */\n dictionaryPriorityStrategy: 'local_first' | 'distant_first';\n\n /**\n * Indicates if the application should hot reload the locale configurations when a change is detected.\n * For example, when a new dictionary is added or updated, the application will update the content tu display in the page.\n *\n * The hot reload is only available for clients of the `enterprise` plan.\n *\n * Default: false\n */\n hotReload: boolean;\n};\n\nexport type AiConfig = {\n /**\n * Provider\n *\n * The provider to use for the AI features of Intlayer.\n *\n * Available providers:\n * - 'openai'\n * - 'anthropic'\n * - 'mistral'\n * - 'deepseek'\n * - 'gemini'\n *\n * Default: 'openai'\n */\n provider?: string;\n\n /**\n * API model\n *\n * The model to use for the AI features of Intlayer.\n *\n * Example: 'gpt-4o-2024-11-20'\n *\n */\n model?: string;\n\n /**\n * temperature\n *\n * The temperature to use for the AI features of Intlayer.\n * The temperature controls the randomness of the AI's responses.\n * A higher temperature will make the AI more creative and less predictable.\n *\n * Example: 0.1\n */\n temperature?: number;\n\n /**\n * API key\n *\n * Use your own OpenAI API key to use the AI features of Intlayer.\n * If you don't have an OpenAI API key, you can get one for free at https://openai.com/api/.\n *\n */\n apiKey?: string;\n\n /**\n * Application context\n *\n * The context of the application to use for the AI features of Intlayer.\n *\n * Example: 'This is a website for a company that sells products online.'\n */\n applicationContext?: string;\n};\n\nexport type BuildConfig = {\n /**\n * Indicates if the build should be optimized\n *\n * Default: process.env.NODE_ENV === 'production'\n *\n * If true, the build will be optimized.\n * If false, the build will not be optimized.\n *\n * Intlayer will replace all calls of dictionaries to optimize chunking. That way the final bundle will import only the dictionaries that are used.\n * All imports will stay as static import to avoid async processing when loading the dictionaries.\n *\n * Note:\n * - Intlayer will replace all call of `useIntlayer` with `useDictionary`, `getIntlayer` with `getDictionary`.\n * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.\n * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.\n */\n optimize: boolean;\n\n /**\n * Indicates if the dynamic import should be activated\n *\n * Default: false\n *\n * By default, when a dictionary is loaded, it imports content for all locales as it's imported statically.\n * If this option is set to true, only the current locale’s dictionary content\n * will be fetched via dynamic import. In that case, Intlayer will replace all\n * calls to `useIntlayer` with `useDynamicDictionary`.\n *\n * Note:\n * - Dynamic imports rely on React Suspense and may slightly impact rendering performance. But if desabled all locales will be loaded at once, even if they are not used.\n * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.\n * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.\n * - This option will be ignored if `optimize` is disabled.\n */\n activateDynamicImport: boolean;\n\n /**\n * Pattern to traverse the code to optimize.\n *\n * Allows to avoid to traverse the code that is not relevant to the optimization.\n * Improve build performance.\n *\n * Default: ['**\\/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx}', '!**\\/node_modules/**']\n *\n * Example: `['src/**\\/*.{ts,tsx}', '../ui-library/**\\/*.{ts,tsx}', '!**\\/node_modules/**']`\n *\n * Note:\n * - This option will be ignored if `optimize` is disabled.\n * - Use glob pattern.\n */\n traversePattern: string[];\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 * Custom editor configuration\n */\n editor?: Partial<EditorConfig>;\n\n /**\n * Custom middleware configuration\n */\n log?: Partial<LogConfig>;\n\n /**\n * Custom AI configuration\n */\n ai?: Partial<AiConfig>;\n\n /**\n * Custom build configuration\n */\n build?: Partial<BuildConfig>;\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 * Intlayer editor configuration\n */\n editor: EditorConfig;\n\n /**\n * Logger configuration\n */\n log: LogConfig;\n\n /**\n * AI configuration\n */\n ai?: Partial<AiConfig>;\n\n /**\n * Build configuration\n */\n build: BuildConfig;\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 * Directories to be excluded from content processing\n *\n * Default: ['node_modules', '.intlayer']\n *\n * A list of directories to exclude from content processing.\n */\n excludedPath: string[];\n\n /**\n * Indicates if Intlayer should watch for changes in the content declaration files in the app to rebuild the related dictionaries.\n *\n * Default: process.env.NODE_ENV === 'development'\n */\n watch: boolean;\n};\n\nexport type DictionaryOutput = 'intlayer' | 'i18next' | 'react-intl';\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: ['.']\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: .intlayer/dictionary\n *\n * Derived results directory based on the base configuration.\n */\n dictionariesDir: string;\n\n /**\n * Directory for module augmentation, relative to the base directory\n *\n * Default: .intlayer/types\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 unmerged dictionaries are stored, relative to the result directory\n *\n * Default: .intlayer/unmerged_dictionary\n *\n * Specifies the derived path for unmerged dictionaries relative to the result directory.\n */\n unmergedDictionariesDir: string;\n\n /**\n * Directory where final dictionaries are stored, relative to the result directory\n *\n * Default: .intlayer/dictionary\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n */\n dictionariesDir: string;\n\n /**\n * Directory where dynamic dictionaries are stored, relative to the result directory\n *\n * Default: .intlayer/dynamic_dictionary\n *\n * Specifies the derived path for dynamic dictionaries relative to the result directory.\n */\n dynamicDictionariesDir: string;\n\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: i18next_resources\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 i18nextResourcesDir: string;\n\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: intl_messages\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n *\n * Note:\n * - Ensure the dictionaries output includes 'react-intl' to build the dictionaries for react-intl\n */\n reactIntlMessagesDir: string;\n\n /**\n * Directory where dictionary types are stored, relative to the result directory\n *\n * Default: .intlayer/types\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: .intlayer/main\n *\n * Specifies the derived path for the main files relative to the result directory.\n */\n mainDir: string;\n\n /**\n * Directory where the configuration files are stored, relative to the result directory\n *\n * Default: .intlayer/config\n *\n * Specifies the derived path for the configuration files relative to the result directory.\n */\n configDir: 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: ['src/**\\/*.content.ts', 'src/**\\/*.content.js', 'src/**\\/*.content.json', 'src/**\\/*.content.cjs', 'src/**\\/*.content.mjs', 'src/**\\/*.content.tsx', 'src/**\\/*.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\nexport type LogConfig = {\n /**\n * Indicates if the logger is enabled\n *\n * Default: true\n *\n * If 'default', the logger is enabled and can be used.\n * If 'verbose', the logger will be enabled and can be used, but will log more information.\n * If 'disabled', the logger is disabled and cannot be used.\n */\n mode: 'default' | 'verbose' | 'disabled';\n\n /**\n * Prefix of the logger\n *\n * Default: '[intlayer]'\n *\n * The prefix of the logger.\n */\n prefix: string;\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../../src/types/config.ts"],"sourcesContent":["import type { Locales } from './locales';\n\nexport type StrictMode = 'strict' | 'inclusive' | 'loose';\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 * Locales required by TypeScript to ensure strong implementations of internationalized content using typescript.\n *\n * Default: []\n *\n * If empty, all locales are required in `strict` mode.\n *\n * Ensure required locales are also defined in the `locales` field.\n */\n requiredLocales: Locales[];\n\n /**\n * Ensure strong implementations of internationalized content using typescript.\n * - If set to \"strict\", the translation `t` function will require each declared locales to be defined. If one locale is missing, or if a locale is not declared in your config, it will throw an error.\n * - If set to \"inclusive\", the translation `t` function will require each declared locales to be defined. If one locale is missing, it will throw a warning. But will accept if a locale is not declared in your config, but exist.\n * - If set to \"loose\", the translation `t` function will accept any existing locale.\n *\n * Default: \"inclusive\"\n */\n strictMode: StrictMode;\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: 'INTLAYER_LOCALE'\n *\n * The cookie key where the locale information is stored.\n */\n cookieName: string;\n\n /**\n * Prefix default prefix the default locale to the path as other locales.\n *\n * Example with prefixDefault = true and defaultLocale = 'en':\n * path = /en/dashboard or /fr/dashboard\n *\n * Example with prefixDefault = false and defaultLocale = 'en':\n * path = /dashboard or /fr/dashboard\n *\n *\n * Default: false\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 * Configuration for intlayer editor\n */\nexport type EditorConfig = {\n /**\n * URL of the application. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: '*'\n */\n applicationURL: string;\n\n /**\n * URL of the editor server. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: 'http://localhost:8000'\n */\n editorURL: string;\n\n /**\n * URL of the CMS server. Used to restrict the origin of the editor for security reasons.\n *\n * Default: 'https://intlayer.org'\n */\n cmsURL: string;\n\n /**\n * URL of the backend\n *\n * Default: 'https://back.intlayer.org'\n *\n * The URL of the backend server.\n */\n backendURL: string;\n\n /**\n * Indicates if the application interact with the visual editor\n *\n * Default: true;\n *\n * If true, the editor will be able to interact with the application.\n * If false, the editor will not be able to interact with the application.\n * In any case, the editor can only be enabled by the visual editor.\n * Disabling the editor for specific environments is a way to enforce the security.\n *\n * Usage:\n * ```js\n * {\n * // Other configurations\n * editor: {\n * enabled: process.env.NODE_ENV !== 'production',\n * }\n * };\n * ```\n *\n */\n enabled: boolean;\n\n /** Port of the editor server\n *\n * Default: 8000\n */\n port: number;\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientId?: string;\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientSecret?: string;\n\n /**\n * Strategy for prioritizing dictionaries. If a dictionary is both present online and locally, the content will be merge.\n * However, is a field is defined in both dictionary, this setting determines which fields takes the priority over the other.\n *\n * Default: 'local_first'\n *\n * The strategy for prioritizing dictionaries. It can be either 'local_first' or 'distant_first'.\n * - 'local_first': The first dictionary found in the locale is used.\n * - 'distant_first': The first dictionary found in the distant locales is used.\n */\n dictionaryPriorityStrategy: 'local_first' | 'distant_first';\n\n /**\n * Indicates if the application should hot reload the locale configurations when a change is detected.\n * For example, when a new dictionary is added or updated, the application will update the content tu display in the page.\n *\n * The hot reload is only available for clients of the `enterprise` plan.\n *\n * Default: false\n */\n hotReload: boolean;\n};\n\nexport type AiConfig = {\n /**\n * Provider\n *\n * The provider to use for the AI features of Intlayer.\n *\n * Available providers:\n * - 'openai'\n * - 'anthropic'\n * - 'mistral'\n * - 'deepseek'\n * - 'gemini'\n *\n * Default: 'openai'\n */\n provider?: string;\n\n /**\n * API model\n *\n * The model to use for the AI features of Intlayer.\n *\n * Example: 'gpt-4o-2024-11-20'\n *\n */\n model?: string;\n\n /**\n * temperature\n *\n * The temperature to use for the AI features of Intlayer.\n * The temperature controls the randomness of the AI's responses.\n * A higher temperature will make the AI more creative and less predictable.\n *\n * Example: 0.1\n */\n temperature?: number;\n\n /**\n * API key\n *\n * Use your own OpenAI API key to use the AI features of Intlayer.\n * If you don't have an OpenAI API key, you can get one for free at https://openai.com/api/.\n *\n */\n apiKey?: string;\n\n /**\n * Application context\n *\n * The context of the application to use for the AI features of Intlayer.\n *\n * Example: 'This is a website for a company that sells products online.'\n */\n applicationContext?: string;\n};\n\nexport type BuildConfig = {\n /**\n * Indicates if the build should be optimized\n *\n * Default: process.env.NODE_ENV === 'production'\n *\n * If true, the build will be optimized.\n * If false, the build will not be optimized.\n *\n * Intlayer will replace all calls of dictionaries to optimize chunking. That way the final bundle will import only the dictionaries that are used.\n * All imports will stay as static import to avoid async processing when loading the dictionaries.\n *\n * Note:\n * - Intlayer will replace all call of `useIntlayer` with the defined mode by the `importMode` option.\n * - Intlayer will replace all call of `getIntlayer` with `getDictionary`.\n * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.\n * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.\n */\n optimize: boolean;\n\n /**\n * Indicates the mode of import to use for the dictionaries.\n *\n * Available modes:\n * - \"static\": The dictionaries are imported statically.\n * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionary`.\n * - \"dynamic\": The dictionaries are imported dynamically in a synchronous component using the suspense API.\n * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.\n * - \"async\": The dictionaries are imported dynamically in an asynchronous component.\n * In that case, Intlayer will replace all calls to `useIntlayer` with `await useDictionaryAsync`.\n *\n * Default: \"static\"\n *\n * By default, when a dictionary is loaded, it imports content for all locales as it's imported statically.\n *\n * Note:\n * - Dynamic imports rely on Suspense and may slightly impact rendering performance.\n * - If desabled all locales will be loaded at once, even if they are not used.\n * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.\n * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.\n * - This option will be ignored if `optimize` is disabled.\n * - In most cases, \"dynamic\" will be used for React applications, \"async\" for Vue.js applications.\n * - This option will not impact the `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` and `useDictionaryDynamic` functions. You can still use them to refine you code on manual optimization.\n */\n importMode: 'static' | 'dynamic' | 'async';\n\n /**\n * Pattern to traverse the code to optimize.\n *\n * Allows to avoid to traverse the code that is not relevant to the optimization.\n * Improve build performance.\n *\n * Default: ['**\\/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx}', '!**\\/node_modules/**']\n *\n * Example: `['src/**\\/*.{ts,tsx}', '../ui-library/**\\/*.{ts,tsx}', '!**\\/node_modules/**']`\n *\n * Note:\n * - This option will be ignored if `optimize` is disabled.\n * - Use glob pattern.\n */\n traversePattern: string[];\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 * Custom editor configuration\n */\n editor?: Partial<EditorConfig>;\n\n /**\n * Custom middleware configuration\n */\n log?: Partial<LogConfig>;\n\n /**\n * Custom AI configuration\n */\n ai?: Partial<AiConfig>;\n\n /**\n * Custom build configuration\n */\n build?: Partial<BuildConfig>;\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 * Intlayer editor configuration\n */\n editor: EditorConfig;\n\n /**\n * Logger configuration\n */\n log: LogConfig;\n\n /**\n * AI configuration\n */\n ai?: Partial<AiConfig>;\n\n /**\n * Build configuration\n */\n build: BuildConfig;\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 * Directories to be excluded from content processing\n *\n * Default: ['node_modules', '.intlayer']\n *\n * A list of directories to exclude from content processing.\n */\n excludedPath: string[];\n\n /**\n * Indicates if Intlayer should watch for changes in the content declaration files in the app to rebuild the related dictionaries.\n *\n * Default: process.env.NODE_ENV === 'development'\n */\n watch: boolean;\n};\n\nexport type DictionaryOutput = 'intlayer' | 'i18next' | 'react-intl';\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: ['.']\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: .intlayer/dictionary\n *\n * Derived results directory based on the base configuration.\n */\n dictionariesDir: string;\n\n /**\n * Directory for module augmentation, relative to the base directory\n *\n * Default: .intlayer/types\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 unmerged dictionaries are stored, relative to the result directory\n *\n * Default: .intlayer/unmerged_dictionary\n *\n * Specifies the derived path for unmerged dictionaries relative to the result directory.\n */\n unmergedDictionariesDir: string;\n\n /**\n * Directory where final dictionaries are stored, relative to the result directory\n *\n * Default: .intlayer/dictionary\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n */\n dictionariesDir: string;\n\n /**\n * Directory where dynamic dictionaries are stored, relative to the result directory\n *\n * Default: .intlayer/dynamic_dictionary\n *\n * Specifies the derived path for dynamic dictionaries relative to the result directory.\n */\n dynamicDictionariesDir: string;\n\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: i18next_resources\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 i18nextResourcesDir: string;\n\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: intl_messages\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n *\n * Note:\n * - Ensure the dictionaries output includes 'react-intl' to build the dictionaries for react-intl\n */\n reactIntlMessagesDir: string;\n\n /**\n * Directory where dictionary types are stored, relative to the result directory\n *\n * Default: .intlayer/types\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: .intlayer/main\n *\n * Specifies the derived path for the main files relative to the result directory.\n */\n mainDir: string;\n\n /**\n * Directory where the configuration files are stored, relative to the result directory\n *\n * Default: .intlayer/config\n *\n * Specifies the derived path for the configuration files relative to the result directory.\n */\n configDir: 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: ['src/**\\/*.content.ts', 'src/**\\/*.content.js', 'src/**\\/*.content.json', 'src/**\\/*.content.cjs', 'src/**\\/*.content.mjs', 'src/**\\/*.content.tsx', 'src/**\\/*.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\nexport type LogConfig = {\n /**\n * Indicates if the logger is enabled\n *\n * Default: true\n *\n * If 'default', the logger is enabled and can be used.\n * If 'verbose', the logger will be enabled and can be used, but will log more information.\n * If 'disabled', the logger is disabled and cannot be used.\n */\n mode: 'default' | 'verbose' | 'disabled';\n\n /**\n * Prefix of the logger\n *\n * Default: '[intlayer]'\n *\n * The prefix of the logger.\n */\n prefix: string;\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -256,6 +256,18 @@ var Locales = /* @__PURE__ */ ((Locales2) => {
256
256
  Locales2["BENGALI"] = "bn";
257
257
  Locales2["BENGALI_BANGLADESH"] = "bn-BD";
258
258
  Locales2["BENGALI_INDIA"] = "bn-IN";
259
+ Locales2["BENGALI_MYANMAR"] = "bn-MM";
260
+ Locales2["BURMESE"] = "my";
261
+ Locales2["BURMESE_MYANMAR"] = "my-MM";
262
+ Locales2["KHMER"] = "km";
263
+ Locales2["KHMER_CAMBODIA"] = "km-KH";
264
+ Locales2["LAO"] = "lo";
265
+ Locales2["LAO_LAOS"] = "lo-LA";
266
+ Locales2["YORUBA"] = "yo";
267
+ Locales2["YORUBA_NIGERIA"] = "yo-NG";
268
+ Locales2["AMHARIC"] = "am";
269
+ Locales2["AMHARIC_ETHIOPIA"] = "am-ET";
270
+ Locales2["NEPALI"] = "ne";
259
271
  return Locales2;
260
272
  })(Locales || {});
261
273
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/types/locales.ts"],"sourcesContent":["/** Can be imported from a shared config */\nexport enum Locales {\n /** Afrikaans language */\n AFRIKAANS = 'af',\n /** Afrikaans language as used in South Africa */\n AFRIKAANS_SOUTH_AFRICA = 'af-ZA',\n /** Arabic language */\n ARABIC = 'ar',\n /** Arabic language as used in the United Arab Emirates */\n ARABIC_UNITED_ARAB_EMIRATES = 'ar-AE',\n /** Arabic language as used in Bahrain */\n ARABIC_BAHRAIN = 'ar-BH',\n /** Arabic language as used in Algeria */\n ARABIC_ALGERIA = 'ar-DZ',\n /** Arabic language as used in Egypt */\n ARABIC_EGYPT = 'ar-EG',\n /** Arabic language as used in Iraq */\n ARABIC_IRAQ = 'ar-IQ',\n /** Arabic language as used in Jordan */\n ARABIC_JORDAN = 'ar-JO',\n /** Arabic language as used in Kuwait */\n ARABIC_KUWAIT = 'ar-KW',\n /** Arabic language as used in Lebanon */\n ARABIC_LEBANON = 'ar-LB',\n /** Arabic language as used in Libya */\n ARABIC_LIBYA = 'ar-LY',\n /** Arabic language as used in Morocco */\n ARABIC_MOROCCO = 'ar-MA',\n /** Arabic language as used in Oman */\n ARABIC_OMAN = 'ar-OM',\n /** Arabic language as used in Qatar */\n ARABIC_QATAR = 'ar-QA',\n /** Arabic language as used in Saudi Arabia */\n ARABIC_SAUDI_ARABIA = 'ar-SA',\n /** Arabic language as used in Syria */\n ARABIC_SYRIA = 'ar-SY',\n /** Arabic language as used in Tunisia */\n ARABIC_TUNISIA = 'ar-TN',\n /** Arabic language as used in Yemen */\n ARABIC_YEMEN = 'ar-YE',\n /** Azeri language (Latin script) */\n AZERI_LATIN = 'az',\n /** Azeri language (Latin script) as used in Azerbaijan */\n AZERI_LATIN_AZERBAIJAN = 'az-AZ',\n /** Belarusian language */\n BELARUSIAN = 'be',\n /** Belarusian language as used in Belarus */\n BELARUSIAN_BELARUS = 'be-BY',\n /** Bulgarian language */\n BULGARIAN = 'bg',\n /** Bulgarian language as used in Bulgaria */\n BULGARIAN_BULGARIA = 'bg-BG',\n /** Bosnian */\n BOSNIAN = 'bs',\n /** Bosnian language as used in Bosnia and Herzegovina */\n BOSNIAN_BOSNIA_AND_HERZEGOVINA = 'bs-BA',\n /** Catalan language */\n CATALAN = 'ca',\n /** Catalan language as used in Spain */\n CATALAN_SPAIN = 'ca-ES',\n /** Czech language */\n CZECH = 'cs',\n /** Czech language as used in Czech Republic */\n CZECH_CZECH_REPUBLIC = 'cs-CZ',\n /** Welsh language */\n WELSH = 'cy',\n /** Welsh language as used in the United Kingdom */\n WELSH_UNITED_KINGDOM = 'cy-GB',\n /** Danish language */\n DANISH = 'da',\n /** Danish language as used in Denmark */\n DANISH_DENMARK = 'da-DK',\n /** German language */\n GERMAN = 'de',\n /** German language as used in Austria */\n GERMAN_AUSTRIA = 'de-AT',\n /** German language as used in Switzerland */\n GERMAN_SWITZERLAND = 'de-CH',\n /** German language as used in Germany */\n GERMAN_GERMANY = 'de-DE',\n /** German language as used in Liechtenstein */\n GERMAN_LIECHTENSTEIN = 'de-LI',\n /** German language as used in Luxembourg */\n GERMAN_LUXEMBOURG = 'de-LU',\n /** Divehi language */\n DIVEHI = 'dv',\n /** Divehi language as used in Maldives */\n DIVEHI_MALDIVES = 'dv-MV',\n /** Greek language */\n GREEK = 'el',\n /** Greek language as used in Greece */\n GREEK_GREECE = 'el-GR',\n /** English language */\n ENGLISH = 'en',\n /** English language as used in Australia */\n ENGLISH_AUSTRALIA = 'en-AU',\n /** English language as used in Belize */\n ENGLISH_BELIZE = 'en-BZ',\n /** English language as used in Canada */\n ENGLISH_CANADA = 'en-CA',\n /** English language as used in Caribbean */\n ENGLISH_CARIBBEAN = 'en-CB',\n /** English language as used in the United Kingdom */\n ENGLISH_UNITED_KINGDOM = 'en-GB',\n /** English language as used in Ireland */\n ENGLISH_IRELAND = 'en-IE',\n /** English language as used in Jamaica */\n ENGLISH_JAMAICA = 'en-JM',\n /** English language as used in New Zealand */\n ENGLISH_NEW_ZEALAND = 'en-NZ',\n /** English language as used in Philippines */\n ENGLISH_PHILIPPINES = 'en-PH',\n /** English language as used in Trinidad and Tobago */\n ENGLISH_TRINIDAD_AND_TOBAGO = 'en-TT',\n /** English language as used in the United States */\n ENGLISH_UNITED_STATES = 'en-US',\n /** English language as used in South Africa */\n ENGLISH_SOUTH_AFRICA = 'en-ZA',\n /** English language as used in Zimbabwe */\n ENGLISH_ZIMBABWE = 'en-ZW',\n /** Esperanto language */\n ESPERANTO = 'eo',\n /** Spanish language */\n SPANISH = 'es',\n /** Spanish language as used in Argentina */\n SPANISH_ARGENTINA = 'es-AR',\n /** Spanish language as used in Bolivia */\n SPANISH_BOLIVIA = 'es-BO',\n /** Spanish language as used in Chile */\n SPANISH_CHILE = 'es-CL',\n /** Spanish language as used in Colombia */\n SPANISH_COLOMBIA = 'es-CO',\n /** Spanish language as used in Costa Rica */\n SPANISH_COSTA_RICA = 'es-CR',\n /** Spanish language as used in Dominican Republic */\n SPANISH_DOMINICAN_REPUBLIC = 'es-DO',\n /** Spanish language as used in Ecuador */\n SPANISH_ECUADOR = 'es-EC',\n /** Spanish language as used in Spain */\n SPANISH_SPAIN = 'es-ES',\n /** Spanish language as used in Guatemala */\n SPANISH_GUATEMALA = 'es-GT',\n /** Spanish language as used in Honduras */\n SPANISH_HONDURAS = 'es-HN',\n /** Spanish language as used in Mexico */\n SPANISH_MEXICO = 'es-MX',\n /** Spanish language as used in Nicaragua */\n SPANISH_NICARAGUA = 'es-NI',\n /** Spanish language as used in Panama */\n SPANISH_PANAMA = 'es-PA',\n /** Spanish language as used in Peru */\n SPANISH_PERU = 'es-PE',\n /** Spanish language as used in Puerto Rico */\n SPANISH_PUERTO_RICO = 'es-PR',\n /** Spanish language as used in Paraguay */\n SPANISH_PARAGUAY = 'es-PY',\n /** Spanish language as used in El Salvador */\n SPANISH_EL_SALVADOR = 'es-SV',\n /** Spanish language as used in Uruguay */\n SPANISH_URUGUAY = 'es-UY',\n /** Spanish language as used in Venezuela */\n SPANISH_VENEZUELA = 'es-VE',\n /** Estonian language */\n ESTONIAN = 'et',\n /** Estonian language as used in Estonia */\n ESTONIAN_ESTONIA = 'et-EE',\n /** Basque language */\n BASQUE = 'eu',\n /** Basque language as used in Spain */\n BASQUE_SPAIN = 'eu-ES',\n /** Farsi language */\n FARSI = 'fa',\n /** Farsi language as used in Iran */\n FARSI_IRAN = 'fa-IR',\n /** Finnish language */\n FINNISH = 'fi',\n /** Finnish language as used in Finland */\n FINNISH_FINLAND = 'fi-FI',\n /** Faroese language */\n FAROESE = 'fo',\n /** Faroese language as used in Faroe Islands */\n FAROESE_FAROE_ISLANDS = 'fo-FO',\n /** French language */\n FRENCH = 'fr',\n /** French language as used in Belgium */\n FRENCH_BELGIUM = 'fr-BE',\n /** French language as used in Canada */\n FRENCH_CANADA = 'fr-CA',\n /** French language as used in Switzerland */\n FRENCH_SWITZERLAND = 'fr-CH',\n /** French language as used in France */\n FRENCH_FRANCE = 'fr-FR',\n /** French language as used in Luxembourg */\n FRENCH_LUXEMBOURG = 'fr-LU',\n /** French language as used in the Principality of Monaco */\n FRENCH_PRINCIPALITY_OF_MONACO = 'fr-MC',\n /** Galician language */\n GALICIAN = 'gl',\n /** Galician language as used in Spain */\n GALICIAN_SPAIN = 'gl-ES',\n /** Gujarati language */\n GUJARATI = 'gu',\n /** Gujarati language as used in India */\n GUJARATI_INDIA = 'gu-IN',\n /** Hebrew language */\n HEBREW = 'he',\n /** Hebrew language as used in Israel */\n HEBREW_ISRAEL = 'he-IL',\n /** Hindi language */\n HINDI = 'hi',\n /** Hindi language as used in India */\n HINDI_INDIA = 'hi-IN',\n /** Croatian language */\n CROATIAN = 'hr',\n /** Croatian language as used in Bosnia and Herzegovina */\n CROATIAN_BOSNIA_AND_HERZEGOVINA = 'hr-BA',\n /** Croatian language as used in Croatia */\n CROATIAN_CROATIA = 'hr-HR',\n /** Hungarian language */\n HUNGARIAN = 'hu',\n /** Hungarian language as used in Hungary */\n HUNGARIAN_HUNGARY = 'hu-HU',\n /** Armenian language */\n ARMENIAN = 'hy',\n /** Armenian language as used in Armenia */\n ARMENIAN_ARMENIA = 'hy-AM',\n /** Indonesian language */\n INDONESIAN = 'id',\n /** Indonesian language as used in Indonesia */\n INDONESIAN_INDONESIA = 'id-ID',\n /** Icelandic language */\n ICELANDIC = 'is',\n /** Icelandic language as used in Iceland */\n ICELANDIC_ICELAND = 'is-IS',\n /** Italian language */\n ITALIAN = 'it',\n /** Italian language as used in Switzerland */\n ITALIAN_SWITZERLAND = 'it-CH',\n /** Italian language as used in Italy */\n ITALIAN_ITALY = 'it-IT',\n /** Japanese language */\n JAPANESE = 'ja',\n /** Japanese language as used in Japan */\n JAPANESE_JAPAN = 'ja-JP',\n /** Georgian language */\n GEORGIAN = 'ka',\n /** Georgian language as used in Georgia */\n GEORGIAN_GEORGIA = 'ka-GE',\n /** Kazakh language */\n KAZAKH = 'kk',\n /** Kazakh language as used in Kazakhstan */\n KAZAKH_KAZAKHSTAN = 'kk-KZ',\n /** Kannada language */\n KANNADA = 'kn',\n /** Kannada language as used in India */\n KANNADA_INDIA = 'kn-IN',\n /** Korean language */\n KOREAN = 'ko',\n /** Korean language as used in Korea */\n KOREAN_KOREA = 'ko-KR',\n /** Konkani language */\n KONKANI = 'kok',\n /** Konkani language as used in India */\n KONKANI_INDIA = 'kok-IN',\n /** Kyrgyz language */\n KYRGYZ = 'ky',\n /** Kyrgyz language as used in Kyrgyzstan */\n KYRGYZ_KYRGYZSTAN = 'ky-KG',\n /** Lithuanian language */\n LITHUANIAN = 'lt',\n /** Lithuanian language as used in Lithuania */\n LITHUANIAN_LITHUANIA = 'lt-LT',\n /** Latvian language */\n LATVIAN = 'lv',\n /** Latvian language as used in Latvia */\n LATVIAN_LATVIA = 'lv-LV',\n /** Maori language */\n MAORI = 'mi',\n /** Maori language as used in New Zealand */\n MAORI_NEW_ZEALAND = 'mi-NZ',\n /** Macedonian language (Former Yugoslav Republic of Macedonia) */\n FYRO_MACEDONIAN = 'mk',\n /** Macedonian language as used in Macedonia */\n FYRO_MACEDONIAN_MACEDONIA = 'mk-MK',\n /** Mongolian language */\n MONGOLIAN = 'mn',\n /** Mongolian language as used in Mongolia */\n MONGOLIAN_MONGOLIA = 'mn-MN',\n /** Marathi language */\n MARATHI = 'mr',\n /** Marathi language as used in India */\n MARATHI_INDIA = 'mr-IN',\n /** Malay language */\n MALAY = 'ms',\n /** Malay language as used in Brunei Darussalam */\n MALAY_BRUNEI_DARUSSALAM = 'ms-BN',\n /** Malay language as used in Malaysia */\n MALAY_MALAYSIA = 'ms-MY',\n /** Maltese language */\n MALTESE = 'mt',\n /** Maltese language as used in Malta */\n MALTESE_MALTA = 'mt-MT',\n /** Norwegian (Bokmål) language */\n NORWEGIAN_BOKMAL = 'nb',\n /** Norwegian (Bokmål) language as used in Norway */\n NORWEGIAN_BOKMAL_NORWAY = 'nb-NO',\n /** Dutch language */\n DUTCH = 'nl',\n /** Dutch language as used in Belgium */\n DUTCH_BELGIUM = 'nl-BE',\n /** Dutch language as used in the Netherlands */\n DUTCH_NETHERLANDS = 'nl-NL',\n /** Norwegian (Nynorsk) language as used in Norway */\n NORWEGIAN_NYNORSK_NORWAY = 'nn-NO',\n /** Northern Sotho language */\n NORTHERN_SOTHO = 'ns',\n /** Northern Sotho language as used in South Africa */\n NORTHERN_SOTHO_SOUTH_AFRICA = 'ns-ZA',\n /** Punjabi language */\n PUNJABI = 'pa',\n /** Punjabi language as used in India */\n PUNJABI_INDIA = 'pa-IN',\n /** Polish language */\n POLISH = 'pl',\n /** Polish language as used in Poland */\n POLISH_POLAND = 'pl-PL',\n /** Pashto language */\n PASHTO = 'ps',\n /** Pashto language as used in Afghanistan */\n PASHTO_AFGHANISTAN = 'ps-AR',\n /** Portuguese language */\n PORTUGUESE = 'pt',\n /** Portuguese language as used in Brazil */\n PORTUGUESE_BRAZIL = 'pt-BR',\n /** Portuguese language as used in Portugal */\n PORTUGUESE_PORTUGAL = 'pt-PT',\n /** Quechua language */\n QUECHUA = 'qu',\n /** Quechua language as used in Bolivia */\n QUECHUA_BOLIVIA = 'qu-BO',\n /** Quechua language as used in Ecuador */\n QUECHUA_ECUADOR = 'qu-EC',\n /** Quechua language as used in Peru */\n QUECHUA_PERU = 'qu-PE',\n /** Romanian language */\n ROMANIAN = 'ro',\n /** Romanian language as used in Romania */\n ROMANIAN_ROMANIA = 'ro-RO',\n /** Russian language */\n RUSSIAN = 'ru',\n /** Russian language as used in Russia */\n RUSSIAN_RUSSIA = 'ru-RU',\n /** Sanskrit language */\n SANSKRIT = 'sa',\n /** Sanskrit language as used in India */\n SANSKRIT_INDIA = 'sa-IN',\n /** Northern Sami language */\n SAMI_NORTHERN = 'se',\n /** Northern Sami language as used in Finland */\n SAMI_NORTHERN_FINLAND = 'se-FI',\n /** Northern Sami language as used in Norway */\n SAMI_NORTHERN_NORWAY = 'se-NO',\n /** Northern Sami language as used in Sweden */\n SAMI_NORTHERN_SWEDEN = 'se-SE',\n /** Slovak language */\n SLOVAK = 'sk',\n /** Slovak language as used in Slovakia */\n SLOVAK_SLOVAKIA = 'sk-SK',\n /** Slovenian language */\n SLOVENIAN = 'sl',\n /** Slovenian language as used in Slovenia */\n SLOVENIAN_SLOVENIA = 'sl-SI',\n /** Albanian language */\n ALBANIAN = 'sq',\n /** Albanian language as used in Albania */\n ALBANIAN_ALBANIA = 'sq-AL',\n /** Servian language (Latin script) */\n SERBIAN_LATIN = 'sr',\n /** Serbian language (Latin script) as used in Bosnia and Herzegovina */\n SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA = 'sr-BA',\n /** Serbian language (Latin script) as used in Serbia and Montenegro */\n SERBIAN_LATIN_SERBIA_AND_MONTENEGRO = 'sr-SP',\n /** Swedish language */\n SWEDISH = 'sv',\n /** Swedish language as used in Finland */\n SWEDISH_FINLAND = 'sv-FI',\n /** Swedish language as used in Sweden */\n SWEDISH_SWEDEN = 'sv-SE',\n /** Swahili language */\n SWAHILI = 'sw',\n /** Swahili language as used in Kenya */\n SWAHILI_KENYA = 'sw-KE',\n /** Syriac language */\n SYRIAC = 'syr',\n /** Syriac language as used in Syria */\n SYRIAC_SYRIA = 'syr-SY',\n /** Tamil language */\n TAMIL = 'ta',\n /** Tamil language as used in India */\n TAMIL_INDIA = 'ta-IN',\n /** Telugu language */\n TELUGU = 'te',\n /** Telugu language as used in India */\n TELUGU_INDIA = 'te-IN',\n /** Thai language */\n THAI = 'th',\n /** Thai language as used in Thailand */\n THAI_THAILAND = 'th-TH',\n /** Tagalog language */\n TAGALOG = 'tl',\n /** Tagalog language as used in Philippines */\n TAGALOG_PHILIPPINES = 'tl-PH',\n /** Tswana language */\n TSWANA = 'tn',\n /** Tswana language as used in South Africa */\n TSWANA_SOUTH_AFRICA = 'tn-ZA',\n /** Turkish language */\n TURKISH = 'tr',\n /** Turkish language as used in Turkey */\n TURKISH_TURKEY = 'tr-TR',\n /** Tatar language */\n TATAR = 'tt',\n /** Tatar language as used in Russia */\n TATAR_RUSSIA = 'tt-RU',\n /** Tsonga language */\n TSOGA = 'ts',\n /** Ukrainian language */\n UKRAINIAN = 'uk',\n /** Ukrainian language as used in Ukraine */\n UKRAINIAN_UKRAINE = 'uk-UA',\n /** Urdu language */\n URDU = 'ur',\n /** Urdu language as used in Islamic Republic of Pakistan */\n URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN = 'ur-PK',\n /** Uzbek language (Latin script) */\n UZBEK_LATIN = 'uz',\n /** Uzbek language (Latin script) as used in Uzbekistan */\n UZBEK_LATIN_UZBEKISTAN = 'uz-UZ',\n /** Vietnamese language */\n VIETNAMESE = 'vi',\n /** Vietnamese language as used in Viet Nam */\n VIETNAMESE_VIET_NAM = 'vi-VN',\n /** Xhosa language */\n XHOSA = 'xh',\n /** Xhosa language as used in South Africa */\n XHOSA_SOUTH_AFRICA = 'xh-ZA',\n /** Chinese language */\n CHINESE = 'zh',\n /** Chinese language (Simplified) */\n CHINESE_SIMPLIFIED = 'zh-Hans',\n /** Chinese language (Simplified, People's Republic of China) */\n CHINESE_SIMPLIFIED_CHINA = 'zh-CN',\n /** Chinese language as used in Hong Kong */\n CHINESE_HONG_KONG = 'zh-HK',\n /** Chinese language as used in Macau */\n CHINESE_MACAU = 'zh-MO',\n /** Chinese language as used in Singapore */\n CHINESE_SINGAPORE = 'zh-SG',\n /** Chinese language (Traditional script) */\n CHINESE_TRADITIONAL = 'zh-Hant',\n /** Zulu language */\n ZULU = 'zu',\n /** Zulu language as used in South Africa */\n ZULU_SOUTH_AFRICA = 'zu-ZA',\n /** Bengali / Bangla */\n BENGALI = 'bn',\n /** Bengali / Bangla as used in Bangladesh */\n BENGALI_BANGLADESH = 'bn-BD',\n /** Bengali / Bangla as used in India */\n BENGALI_INDIA = 'bn-IN',\n /** Bengali / Bangla as used in Myanmar */\n}\n\n/** Define MyType using the ValueOf utility type on Locales */\nexport type LocalesValues = Locales | `${Locales}`;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAK,UAAL,kBAAKA,aAAL;AAEL,EAAAA,SAAA,eAAY;AAEZ,EAAAA,SAAA,4BAAyB;AAEzB,EAAAA,SAAA,YAAS;AAET,EAAAA,SAAA,iCAA8B;AAE9B,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,iBAAc;AAEd,EAAAA,SAAA,mBAAgB;AAEhB,EAAAA,SAAA,mBAAgB;AAEhB,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,iBAAc;AAEd,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,yBAAsB;AAEtB,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,iBAAc;AAEd,EAAAA,SAAA,4BAAyB;AAEzB,EAAAA,SAAA,gBAAa;AAEb,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,eAAY;AAEZ,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,oCAAiC;AAEjC,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,mBAAgB;AAEhB,EAAAA,SAAA,WAAQ;AAER,EAAAA,SAAA,0BAAuB;AAEvB,EAAAA,SAAA,WAAQ;AAER,EAAAA,SAAA,0BAAuB;AAEvB,EAAAA,SAAA,YAAS;AAET,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,YAAS;AAET,EAAAA,SAAA,oBAAiB;AAEjB,E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AAA,4BAAyB;AAEzB,EAAAA,SAAA,gBAAa;AAEb,EAAAA,SAAA,yBAAsB;AAEtB,EAAAA,SAAA,WAAQ;AAER,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,8BAA2B;AAE3B,EAAAA,SAAA,uBAAoB;AAEpB,EAAAA,SAAA,mBAAgB;AAEhB,EAAAA,SAAA,uBAAoB;AAEpB,EAAAA,SAAA,yBAAsB;AAEtB,EAAAA,SAAA,UAAO;AAEP,EAAAA,SAAA,uBAAoB;AAEpB,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,mBAAgB;AApdN,SAAAA;AAAA,GAAA;","names":["Locales"]}
1
+ {"version":3,"sources":["../../../src/types/locales.ts"],"sourcesContent":["/** Can be imported from a shared config */\nexport enum Locales {\n /** Afrikaans language */\n AFRIKAANS = 'af',\n /** Afrikaans language as used in South Africa */\n AFRIKAANS_SOUTH_AFRICA = 'af-ZA',\n /** Arabic language */\n ARABIC = 'ar',\n /** Arabic language as used in the United Arab Emirates */\n ARABIC_UNITED_ARAB_EMIRATES = 'ar-AE',\n /** Arabic language as used in Bahrain */\n ARABIC_BAHRAIN = 'ar-BH',\n /** Arabic language as used in Algeria */\n ARABIC_ALGERIA = 'ar-DZ',\n /** Arabic language as used in Egypt */\n ARABIC_EGYPT = 'ar-EG',\n /** Arabic language as used in Iraq */\n ARABIC_IRAQ = 'ar-IQ',\n /** Arabic language as used in Jordan */\n ARABIC_JORDAN = 'ar-JO',\n /** Arabic language as used in Kuwait */\n ARABIC_KUWAIT = 'ar-KW',\n /** Arabic language as used in Lebanon */\n ARABIC_LEBANON = 'ar-LB',\n /** Arabic language as used in Libya */\n ARABIC_LIBYA = 'ar-LY',\n /** Arabic language as used in Morocco */\n ARABIC_MOROCCO = 'ar-MA',\n /** Arabic language as used in Oman */\n ARABIC_OMAN = 'ar-OM',\n /** Arabic language as used in Qatar */\n ARABIC_QATAR = 'ar-QA',\n /** Arabic language as used in Saudi Arabia */\n ARABIC_SAUDI_ARABIA = 'ar-SA',\n /** Arabic language as used in Syria */\n ARABIC_SYRIA = 'ar-SY',\n /** Arabic language as used in Tunisia */\n ARABIC_TUNISIA = 'ar-TN',\n /** Arabic language as used in Yemen */\n ARABIC_YEMEN = 'ar-YE',\n /** Azeri language (Latin script) */\n AZERI_LATIN = 'az',\n /** Azeri language (Latin script) as used in Azerbaijan */\n AZERI_LATIN_AZERBAIJAN = 'az-AZ',\n /** Belarusian language */\n BELARUSIAN = 'be',\n /** Belarusian language as used in Belarus */\n BELARUSIAN_BELARUS = 'be-BY',\n /** Bulgarian language */\n BULGARIAN = 'bg',\n /** Bulgarian language as used in Bulgaria */\n BULGARIAN_BULGARIA = 'bg-BG',\n /** Bosnian */\n BOSNIAN = 'bs',\n /** Bosnian language as used in Bosnia and Herzegovina */\n BOSNIAN_BOSNIA_AND_HERZEGOVINA = 'bs-BA',\n /** Catalan language */\n CATALAN = 'ca',\n /** Catalan language as used in Spain */\n CATALAN_SPAIN = 'ca-ES',\n /** Czech language */\n CZECH = 'cs',\n /** Czech language as used in Czech Republic */\n CZECH_CZECH_REPUBLIC = 'cs-CZ',\n /** Welsh language */\n WELSH = 'cy',\n /** Welsh language as used in the United Kingdom */\n WELSH_UNITED_KINGDOM = 'cy-GB',\n /** Danish language */\n DANISH = 'da',\n /** Danish language as used in Denmark */\n DANISH_DENMARK = 'da-DK',\n /** German language */\n GERMAN = 'de',\n /** German language as used in Austria */\n GERMAN_AUSTRIA = 'de-AT',\n /** German language as used in Switzerland */\n GERMAN_SWITZERLAND = 'de-CH',\n /** German language as used in Germany */\n GERMAN_GERMANY = 'de-DE',\n /** German language as used in Liechtenstein */\n GERMAN_LIECHTENSTEIN = 'de-LI',\n /** German language as used in Luxembourg */\n GERMAN_LUXEMBOURG = 'de-LU',\n /** Divehi language */\n DIVEHI = 'dv',\n /** Divehi language as used in Maldives */\n DIVEHI_MALDIVES = 'dv-MV',\n /** Greek language */\n GREEK = 'el',\n /** Greek language as used in Greece */\n GREEK_GREECE = 'el-GR',\n /** English language */\n ENGLISH = 'en',\n /** English language as used in Australia */\n ENGLISH_AUSTRALIA = 'en-AU',\n /** English language as used in Belize */\n ENGLISH_BELIZE = 'en-BZ',\n /** English language as used in Canada */\n ENGLISH_CANADA = 'en-CA',\n /** English language as used in Caribbean */\n ENGLISH_CARIBBEAN = 'en-CB',\n /** English language as used in the United Kingdom */\n ENGLISH_UNITED_KINGDOM = 'en-GB',\n /** English language as used in Ireland */\n ENGLISH_IRELAND = 'en-IE',\n /** English language as used in Jamaica */\n ENGLISH_JAMAICA = 'en-JM',\n /** English language as used in New Zealand */\n ENGLISH_NEW_ZEALAND = 'en-NZ',\n /** English language as used in Philippines */\n ENGLISH_PHILIPPINES = 'en-PH',\n /** English language as used in Trinidad and Tobago */\n ENGLISH_TRINIDAD_AND_TOBAGO = 'en-TT',\n /** English language as used in the United States */\n ENGLISH_UNITED_STATES = 'en-US',\n /** English language as used in South Africa */\n ENGLISH_SOUTH_AFRICA = 'en-ZA',\n /** English language as used in Zimbabwe */\n ENGLISH_ZIMBABWE = 'en-ZW',\n /** Esperanto language */\n ESPERANTO = 'eo',\n /** Spanish language */\n SPANISH = 'es',\n /** Spanish language as used in Argentina */\n SPANISH_ARGENTINA = 'es-AR',\n /** Spanish language as used in Bolivia */\n SPANISH_BOLIVIA = 'es-BO',\n /** Spanish language as used in Chile */\n SPANISH_CHILE = 'es-CL',\n /** Spanish language as used in Colombia */\n SPANISH_COLOMBIA = 'es-CO',\n /** Spanish language as used in Costa Rica */\n SPANISH_COSTA_RICA = 'es-CR',\n /** Spanish language as used in Dominican Republic */\n SPANISH_DOMINICAN_REPUBLIC = 'es-DO',\n /** Spanish language as used in Ecuador */\n SPANISH_ECUADOR = 'es-EC',\n /** Spanish language as used in Spain */\n SPANISH_SPAIN = 'es-ES',\n /** Spanish language as used in Guatemala */\n SPANISH_GUATEMALA = 'es-GT',\n /** Spanish language as used in Honduras */\n SPANISH_HONDURAS = 'es-HN',\n /** Spanish language as used in Mexico */\n SPANISH_MEXICO = 'es-MX',\n /** Spanish language as used in Nicaragua */\n SPANISH_NICARAGUA = 'es-NI',\n /** Spanish language as used in Panama */\n SPANISH_PANAMA = 'es-PA',\n /** Spanish language as used in Peru */\n SPANISH_PERU = 'es-PE',\n /** Spanish language as used in Puerto Rico */\n SPANISH_PUERTO_RICO = 'es-PR',\n /** Spanish language as used in Paraguay */\n SPANISH_PARAGUAY = 'es-PY',\n /** Spanish language as used in El Salvador */\n SPANISH_EL_SALVADOR = 'es-SV',\n /** Spanish language as used in Uruguay */\n SPANISH_URUGUAY = 'es-UY',\n /** Spanish language as used in Venezuela */\n SPANISH_VENEZUELA = 'es-VE',\n /** Estonian language */\n ESTONIAN = 'et',\n /** Estonian language as used in Estonia */\n ESTONIAN_ESTONIA = 'et-EE',\n /** Basque language */\n BASQUE = 'eu',\n /** Basque language as used in Spain */\n BASQUE_SPAIN = 'eu-ES',\n /** Farsi language */\n FARSI = 'fa',\n /** Farsi language as used in Iran */\n FARSI_IRAN = 'fa-IR',\n /** Finnish language */\n FINNISH = 'fi',\n /** Finnish language as used in Finland */\n FINNISH_FINLAND = 'fi-FI',\n /** Faroese language */\n FAROESE = 'fo',\n /** Faroese language as used in Faroe Islands */\n FAROESE_FAROE_ISLANDS = 'fo-FO',\n /** French language */\n FRENCH = 'fr',\n /** French language as used in Belgium */\n FRENCH_BELGIUM = 'fr-BE',\n /** French language as used in Canada */\n FRENCH_CANADA = 'fr-CA',\n /** French language as used in Switzerland */\n FRENCH_SWITZERLAND = 'fr-CH',\n /** French language as used in France */\n FRENCH_FRANCE = 'fr-FR',\n /** French language as used in Luxembourg */\n FRENCH_LUXEMBOURG = 'fr-LU',\n /** French language as used in the Principality of Monaco */\n FRENCH_PRINCIPALITY_OF_MONACO = 'fr-MC',\n /** Galician language */\n GALICIAN = 'gl',\n /** Galician language as used in Spain */\n GALICIAN_SPAIN = 'gl-ES',\n /** Gujarati language */\n GUJARATI = 'gu',\n /** Gujarati language as used in India */\n GUJARATI_INDIA = 'gu-IN',\n /** Hebrew language */\n HEBREW = 'he',\n /** Hebrew language as used in Israel */\n HEBREW_ISRAEL = 'he-IL',\n /** Hindi language */\n HINDI = 'hi',\n /** Hindi language as used in India */\n HINDI_INDIA = 'hi-IN',\n /** Croatian language */\n CROATIAN = 'hr',\n /** Croatian language as used in Bosnia and Herzegovina */\n CROATIAN_BOSNIA_AND_HERZEGOVINA = 'hr-BA',\n /** Croatian language as used in Croatia */\n CROATIAN_CROATIA = 'hr-HR',\n /** Hungarian language */\n HUNGARIAN = 'hu',\n /** Hungarian language as used in Hungary */\n HUNGARIAN_HUNGARY = 'hu-HU',\n /** Armenian language */\n ARMENIAN = 'hy',\n /** Armenian language as used in Armenia */\n ARMENIAN_ARMENIA = 'hy-AM',\n /** Indonesian language */\n INDONESIAN = 'id',\n /** Indonesian language as used in Indonesia */\n INDONESIAN_INDONESIA = 'id-ID',\n /** Icelandic language */\n ICELANDIC = 'is',\n /** Icelandic language as used in Iceland */\n ICELANDIC_ICELAND = 'is-IS',\n /** Italian language */\n ITALIAN = 'it',\n /** Italian language as used in Switzerland */\n ITALIAN_SWITZERLAND = 'it-CH',\n /** Italian language as used in Italy */\n ITALIAN_ITALY = 'it-IT',\n /** Japanese language */\n JAPANESE = 'ja',\n /** Japanese language as used in Japan */\n JAPANESE_JAPAN = 'ja-JP',\n /** Georgian language */\n GEORGIAN = 'ka',\n /** Georgian language as used in Georgia */\n GEORGIAN_GEORGIA = 'ka-GE',\n /** Kazakh language */\n KAZAKH = 'kk',\n /** Kazakh language as used in Kazakhstan */\n KAZAKH_KAZAKHSTAN = 'kk-KZ',\n /** Kannada language */\n KANNADA = 'kn',\n /** Kannada language as used in India */\n KANNADA_INDIA = 'kn-IN',\n /** Korean language */\n KOREAN = 'ko',\n /** Korean language as used in Korea */\n KOREAN_KOREA = 'ko-KR',\n /** Konkani language */\n KONKANI = 'kok',\n /** Konkani language as used in India */\n KONKANI_INDIA = 'kok-IN',\n /** Kyrgyz language */\n KYRGYZ = 'ky',\n /** Kyrgyz language as used in Kyrgyzstan */\n KYRGYZ_KYRGYZSTAN = 'ky-KG',\n /** Lithuanian language */\n LITHUANIAN = 'lt',\n /** Lithuanian language as used in Lithuania */\n LITHUANIAN_LITHUANIA = 'lt-LT',\n /** Latvian language */\n LATVIAN = 'lv',\n /** Latvian language as used in Latvia */\n LATVIAN_LATVIA = 'lv-LV',\n /** Maori language */\n MAORI = 'mi',\n /** Maori language as used in New Zealand */\n MAORI_NEW_ZEALAND = 'mi-NZ',\n /** Macedonian language (Former Yugoslav Republic of Macedonia) */\n FYRO_MACEDONIAN = 'mk',\n /** Macedonian language as used in Macedonia */\n FYRO_MACEDONIAN_MACEDONIA = 'mk-MK',\n /** Mongolian language */\n MONGOLIAN = 'mn',\n /** Mongolian language as used in Mongolia */\n MONGOLIAN_MONGOLIA = 'mn-MN',\n /** Marathi language */\n MARATHI = 'mr',\n /** Marathi language as used in India */\n MARATHI_INDIA = 'mr-IN',\n /** Malay language */\n MALAY = 'ms',\n /** Malay language as used in Brunei Darussalam */\n MALAY_BRUNEI_DARUSSALAM = 'ms-BN',\n /** Malay language as used in Malaysia */\n MALAY_MALAYSIA = 'ms-MY',\n /** Maltese language */\n MALTESE = 'mt',\n /** Maltese language as used in Malta */\n MALTESE_MALTA = 'mt-MT',\n /** Norwegian (Bokmål) language */\n NORWEGIAN_BOKMAL = 'nb',\n /** Norwegian (Bokmål) language as used in Norway */\n NORWEGIAN_BOKMAL_NORWAY = 'nb-NO',\n /** Dutch language */\n DUTCH = 'nl',\n /** Dutch language as used in Belgium */\n DUTCH_BELGIUM = 'nl-BE',\n /** Dutch language as used in the Netherlands */\n DUTCH_NETHERLANDS = 'nl-NL',\n /** Norwegian (Nynorsk) language as used in Norway */\n NORWEGIAN_NYNORSK_NORWAY = 'nn-NO',\n /** Northern Sotho language */\n NORTHERN_SOTHO = 'ns',\n /** Northern Sotho language as used in South Africa */\n NORTHERN_SOTHO_SOUTH_AFRICA = 'ns-ZA',\n /** Punjabi language */\n PUNJABI = 'pa',\n /** Punjabi language as used in India */\n PUNJABI_INDIA = 'pa-IN',\n /** Polish language */\n POLISH = 'pl',\n /** Polish language as used in Poland */\n POLISH_POLAND = 'pl-PL',\n /** Pashto language */\n PASHTO = 'ps',\n /** Pashto language as used in Afghanistan */\n PASHTO_AFGHANISTAN = 'ps-AR',\n /** Portuguese language */\n PORTUGUESE = 'pt',\n /** Portuguese language as used in Brazil */\n PORTUGUESE_BRAZIL = 'pt-BR',\n /** Portuguese language as used in Portugal */\n PORTUGUESE_PORTUGAL = 'pt-PT',\n /** Quechua language */\n QUECHUA = 'qu',\n /** Quechua language as used in Bolivia */\n QUECHUA_BOLIVIA = 'qu-BO',\n /** Quechua language as used in Ecuador */\n QUECHUA_ECUADOR = 'qu-EC',\n /** Quechua language as used in Peru */\n QUECHUA_PERU = 'qu-PE',\n /** Romanian language */\n ROMANIAN = 'ro',\n /** Romanian language as used in Romania */\n ROMANIAN_ROMANIA = 'ro-RO',\n /** Russian language */\n RUSSIAN = 'ru',\n /** Russian language as used in Russia */\n RUSSIAN_RUSSIA = 'ru-RU',\n /** Sanskrit language */\n SANSKRIT = 'sa',\n /** Sanskrit language as used in India */\n SANSKRIT_INDIA = 'sa-IN',\n /** Northern Sami language */\n SAMI_NORTHERN = 'se',\n /** Northern Sami language as used in Finland */\n SAMI_NORTHERN_FINLAND = 'se-FI',\n /** Northern Sami language as used in Norway */\n SAMI_NORTHERN_NORWAY = 'se-NO',\n /** Northern Sami language as used in Sweden */\n SAMI_NORTHERN_SWEDEN = 'se-SE',\n /** Slovak language */\n SLOVAK = 'sk',\n /** Slovak language as used in Slovakia */\n SLOVAK_SLOVAKIA = 'sk-SK',\n /** Slovenian language */\n SLOVENIAN = 'sl',\n /** Slovenian language as used in Slovenia */\n SLOVENIAN_SLOVENIA = 'sl-SI',\n /** Albanian language */\n ALBANIAN = 'sq',\n /** Albanian language as used in Albania */\n ALBANIAN_ALBANIA = 'sq-AL',\n /** Servian language (Latin script) */\n SERBIAN_LATIN = 'sr',\n /** Serbian language (Latin script) as used in Bosnia and Herzegovina */\n SERBIAN_LATIN_BOSNIA_AND_HERZEGOVINA = 'sr-BA',\n /** Serbian language (Latin script) as used in Serbia and Montenegro */\n SERBIAN_LATIN_SERBIA_AND_MONTENEGRO = 'sr-SP',\n /** Swedish language */\n SWEDISH = 'sv',\n /** Swedish language as used in Finland */\n SWEDISH_FINLAND = 'sv-FI',\n /** Swedish language as used in Sweden */\n SWEDISH_SWEDEN = 'sv-SE',\n /** Swahili language */\n SWAHILI = 'sw',\n /** Swahili language as used in Kenya */\n SWAHILI_KENYA = 'sw-KE',\n /** Syriac language */\n SYRIAC = 'syr',\n /** Syriac language as used in Syria */\n SYRIAC_SYRIA = 'syr-SY',\n /** Tamil language */\n TAMIL = 'ta',\n /** Tamil language as used in India */\n TAMIL_INDIA = 'ta-IN',\n /** Telugu language */\n TELUGU = 'te',\n /** Telugu language as used in India */\n TELUGU_INDIA = 'te-IN',\n /** Thai language */\n THAI = 'th',\n /** Thai language as used in Thailand */\n THAI_THAILAND = 'th-TH',\n /** Tagalog language */\n TAGALOG = 'tl',\n /** Tagalog language as used in Philippines */\n TAGALOG_PHILIPPINES = 'tl-PH',\n /** Tswana language */\n TSWANA = 'tn',\n /** Tswana language as used in South Africa */\n TSWANA_SOUTH_AFRICA = 'tn-ZA',\n /** Turkish language */\n TURKISH = 'tr',\n /** Turkish language as used in Turkey */\n TURKISH_TURKEY = 'tr-TR',\n /** Tatar language */\n TATAR = 'tt',\n /** Tatar language as used in Russia */\n TATAR_RUSSIA = 'tt-RU',\n /** Tsonga language */\n TSOGA = 'ts',\n /** Ukrainian language */\n UKRAINIAN = 'uk',\n /** Ukrainian language as used in Ukraine */\n UKRAINIAN_UKRAINE = 'uk-UA',\n /** Urdu language */\n URDU = 'ur',\n /** Urdu language as used in Islamic Republic of Pakistan */\n URDU_ISLAMIC_REPUBLIC_OF_PAKISTAN = 'ur-PK',\n /** Uzbek language (Latin script) */\n UZBEK_LATIN = 'uz',\n /** Uzbek language (Latin script) as used in Uzbekistan */\n UZBEK_LATIN_UZBEKISTAN = 'uz-UZ',\n /** Vietnamese language */\n VIETNAMESE = 'vi',\n /** Vietnamese language as used in Viet Nam */\n VIETNAMESE_VIET_NAM = 'vi-VN',\n /** Xhosa language */\n XHOSA = 'xh',\n /** Xhosa language as used in South Africa */\n XHOSA_SOUTH_AFRICA = 'xh-ZA',\n /** Chinese language */\n CHINESE = 'zh',\n /** Chinese language (Simplified) */\n CHINESE_SIMPLIFIED = 'zh-Hans',\n /** Chinese language (Simplified, People's Republic of China) */\n CHINESE_SIMPLIFIED_CHINA = 'zh-CN',\n /** Chinese language as used in Hong Kong */\n CHINESE_HONG_KONG = 'zh-HK',\n /** Chinese language as used in Macau */\n CHINESE_MACAU = 'zh-MO',\n /** Chinese language as used in Singapore */\n CHINESE_SINGAPORE = 'zh-SG',\n /** Chinese language (Traditional script) */\n CHINESE_TRADITIONAL = 'zh-Hant',\n /** Zulu language */\n ZULU = 'zu',\n /** Zulu language as used in South Africa */\n ZULU_SOUTH_AFRICA = 'zu-ZA',\n /** Bengali / Bangla */\n BENGALI = 'bn',\n /** Bengali / Bangla as used in Bangladesh */\n BENGALI_BANGLADESH = 'bn-BD',\n /** Bengali / Bangla as used in India */\n BENGALI_INDIA = 'bn-IN',\n /** Bengali / Bangla as used in Myanmar */\n BENGALI_MYANMAR = 'bn-MM',\n /** Burmese language */\n BURMESE = 'my',\n /** Burmese language as used in Myanmar */\n BURMESE_MYANMAR = 'my-MM',\n /** Khmer language */\n KHMER = 'km',\n /** Khmer language as used in Cambodia */\n KHMER_CAMBODIA = 'km-KH',\n /** Lao language */\n LAO = 'lo',\n /** Lao language as used in Laos */\n LAO_LAOS = 'lo-LA',\n /** Yoruba language */\n YORUBA = 'yo',\n /** Yoruba language as used in Nigeria */\n YORUBA_NIGERIA = 'yo-NG',\n /** Amharic language */\n AMHARIC = 'am',\n /** Amharic language as used in Ethiopia */\n AMHARIC_ETHIOPIA = 'am-ET',\n /** Nepali language */\n NEPALI = 'ne',\n}\n\n/** Define MyType using the ValueOf utility type on Locales */\nexport type LocalesValues = Locales | `${Locales}`;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAK,UAAL,kBAAKA,aAAL;AAEL,EAAAA,SAAA,eAAY;AAEZ,EAAAA,SAAA,4BAAyB;AAEzB,EAAAA,SAAA,YAAS;AAET,EAAAA,SAAA,iCAA8B;AAE9B,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,iBAAc;AAEd,EAAAA,SAAA,mBAAgB;AAEhB,EAAAA,SAAA,mBAAgB;AAEhB,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,iBAAc;AAEd,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,yBAAsB;AAEtB,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,kBAAe;AAEf,EAAAA,SAAA,iBAAc;AAEd,EAAAA,SAAA,4BAAyB;AAEzB,EAAAA,SAAA,gBAAa;AAEb,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,eAAY;AAEZ,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,oCAAiC;AAEjC,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,mBAAgB;AAEhB,EAAAA,SAAA,WAAQ;AAER,EAAAA,SAAA,0BAAuB;AAEvB,EAAAA,SAAA,WAAQ;AAER,EAAAA,SAAA,0BAAuB;AAEvB,E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,uBAAoB;AAEpB,EAAAA,SAAA,UAAO;AAEP,EAAAA,SAAA,uCAAoC;AAEpC,EAAAA,SAAA,iBAAc;AAEd,EAAAA,SAAA,4BAAyB;AAEzB,EAAAA,SAAA,gBAAa;AAEb,EAAAA,SAAA,yBAAsB;AAEtB,EAAAA,SAAA,WAAQ;AAER,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,8BAA2B;AAE3B,EAAAA,SAAA,uBAAoB;AAEpB,EAAAA,SAAA,mBAAgB;AAEhB,EAAAA,SAAA,uBAAoB;AAEpB,EAAAA,SAAA,yBAAsB;AAEtB,EAAAA,SAAA,UAAO;AAEP,EAAAA,SAAA,uBAAoB;AAEpB,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,wBAAqB;AAErB,EAAAA,SAAA,mBAAgB;AAEhB,EAAAA,SAAA,qBAAkB;AAElB,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,qBAAkB;AAElB,EAAAA,SAAA,WAAQ;AAER,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,SAAM;AAEN,EAAAA,SAAA,cAAW;AAEX,EAAAA,SAAA,YAAS;AAET,EAAAA,SAAA,oBAAiB;AAEjB,EAAAA,SAAA,aAAU;AAEV,EAAAA,SAAA,sBAAmB;AAEnB,EAAAA,SAAA,YAAS;AA5eC,SAAAA;AAAA,GAAA;","names":["Locales"]}
@@ -1,6 +1,6 @@
1
1
  import { join } from "path";
2
2
  import {
3
- ACTIVATE_DYNAMIC_IMPORT,
3
+ IMPORT_MODE,
4
4
  OPTIMIZE,
5
5
  TRAVERSE_PATTERN
6
6
  } from "../defaultValues/build.mjs";
@@ -64,7 +64,7 @@ const buildInternationalizationFields = (customConfiguration) => ({
64
64
  *
65
65
  * Ensure required locales are also defined in the `locales` field.
66
66
  */
67
- requiredLocales: customConfiguration?.requiredLocales ?? REQUIRED_LOCALES,
67
+ requiredLocales: customConfiguration?.requiredLocales ?? customConfiguration?.locales ?? REQUIRED_LOCALES,
68
68
  /**
69
69
  * Ensure strong implementations of internationalized content using typescript.
70
70
  * - If set to "strict", the translation `t` function will require each declared locales to be defined. If one locale is missing, or if a locale is not declared in your config, it will throw an error.
@@ -559,28 +559,37 @@ const buildBuildFields = (customConfiguration) => ({
559
559
  * All imports will stay as static import to avoid async processing when loading the dictionaries.
560
560
  *
561
561
  * Note:
562
- * - Intlayer will replace all call of `useIntlayer` with `useDictionary`, `getIntlayer` with `getDictionary`.
562
+ * - Intlayer will replace all call of `useIntlayer` with the defined mode by the `importMode` option.
563
+ * - Intlayer will replace all call of `getIntlayer` with `getDictionary`.
563
564
  * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
565
+ * - In most cases, "dynamic" will be used for React applications, "async" for Vue.js applications.
564
566
  * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.
565
567
  */
566
568
  optimize: customConfiguration?.optimize ?? OPTIMIZE,
567
569
  /**
568
- * Indicates if the dynamic import should be activated
570
+ * Indicates the mode of import to use for the dictionaries.
569
571
  *
570
- * Default: false
572
+ * Available modes:
573
+ * - "static": The dictionaries are imported statically.
574
+ * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionary`.
575
+ * - "dynamic": The dictionaries are imported dynamically in a synchronous component using the suspense API.
576
+ * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.
577
+ * - "async": The dictionaries are imported dynamically in an asynchronous component.
578
+ * In that case, Intlayer will replace all calls to `useIntlayer` with `await useDictionaryAsync`.
579
+ *
580
+ * Default: "static"
571
581
  *
572
582
  * By default, when a dictionary is loaded, it imports content for all locales as it's imported statically.
573
- * If this option is set to true, only the current locale's dictionary content
574
- * will be fetched via dynamic import. In that case, Intlayer will replace all
575
- * calls to `useIntlayer` with `useDynamicDictionary`.
576
583
  *
577
584
  * Note:
578
- * - Dynamic imports rely on React Suspense and may slightly impact rendering performance. But if desabled all locales will be loaded at once, even if they are not used.
585
+ * - Dynamic imports rely on Suspense and may slightly impact rendering performance.
586
+ * - If desabled all locales will be loaded at once, even if they are not used.
579
587
  * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.
580
588
  * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.
581
589
  * - This option will be ignored if `optimize` is disabled.
590
+ * - This option will not impact the `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` and `useDictionaryDynamic` functions. You can still use them to refine you code on manual optimization.
582
591
  */
583
- activateDynamicImport: customConfiguration?.activateDynamicImport ?? ACTIVATE_DYNAMIC_IMPORT,
592
+ importMode: customConfiguration?.importMode ?? IMPORT_MODE,
584
593
  /**
585
594
  * Pattern to traverse the code to optimize.
586
595
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/configFile/buildConfigurationFields.ts"],"sourcesContent":["import { join } from 'path';\nimport {\n ACTIVATE_DYNAMIC_IMPORT,\n OPTIMIZE,\n TRAVERSE_PATTERN,\n} from '../defaultValues/build';\nimport {\n CONFIG_DIR,\n CONTENT_DIR,\n DICTIONARIES_DIR,\n DICTIONARY_OUTPUT,\n DYNAMIC_DICTIONARIES_DIR,\n EXCLUDED_PATHS,\n FILE_EXTENSIONS,\n I18NEXT_DICTIONARIES_DIR,\n MAIN_DIR,\n MODULE_AUGMENTATION_DIR,\n REACT_INTL_MESSAGES_DIR,\n TYPES_DIR,\n UNMERGED_DICTIONARIES_DIR,\n WATCH,\n} from '../defaultValues/content';\nimport {\n APPLICATION_URL,\n BACKEND_URL,\n CMS_URL,\n DICTIONARY_PRIORITY_STRATEGY,\n EDITOR_URL,\n HOT_RELOAD,\n IS_ENABLED,\n PORT,\n} from '../defaultValues/editor';\nimport {\n DEFAULT_LOCALE,\n LOCALES,\n REQUIRED_LOCALES,\n STRICT_MODE,\n} from '../defaultValues/internationalization';\nimport { MODE, PREFIX } from '../defaultValues/log';\nimport {\n BASE_PATH,\n COOKIE_NAME,\n HEADER_NAME,\n NO_PREFIX,\n PREFIX_DEFAULT,\n SERVER_SET_COOKIE,\n} from '../defaultValues/middleware';\nimport type {\n AiConfig,\n BaseContentConfig,\n BaseDerivedConfig,\n BuildConfig,\n ContentConfig,\n CustomIntlayerConfig,\n EditorConfig,\n InternationalizationConfig,\n IntlayerConfig,\n LogConfig,\n MiddlewareConfig,\n PatternsContentConfig,\n ResultDirDerivedConfig,\n} from '../types/config';\nimport { normalizePath } from '../utils/normalizePath';\n\nlet storedConfiguration: IntlayerConfig;\n\n// @TODO - Add possibility of directories configurations to be arrays to allow multiple packages management\n\nconst buildInternationalizationFields = (\n customConfiguration?: Partial<InternationalizationConfig>\n): InternationalizationConfig => ({\n /**\n * Locales available in the application\n *\n * Default: ['en']\n *\n */\n locales: customConfiguration?.locales ?? LOCALES,\n\n /**\n * Locales required by TypeScript to ensure strong implementations of internationalized content using typescript.\n *\n * Default: []\n *\n * If empty, all locales are required in `strict` mode.\n *\n * Ensure required locales are also defined in the `locales` field.\n */\n requiredLocales: customConfiguration?.requiredLocales ?? REQUIRED_LOCALES,\n\n /**\n * Ensure strong implementations of internationalized content using typescript.\n * - If set to \"strict\", the translation `t` function will require each declared locales to be defined. If one locale is missing, or if a locale is not declared in your config, it will throw an error.\n * - If set to \"inclusive\", the translation `t` function will require each declared locales to be defined. If one locale is missing, it will throw a warning. But will accept if a locale is not declared in your config, but exist.\n * - If set to \"loose\", the translation `t` function will accept any existing locale.\n *\n * Default: \"inclusive\"\n */\n strictMode: customConfiguration?.strictMode ?? STRICT_MODE,\n\n /**\n * Default locale of the application for fallback\n *\n * Default: 'en'\n */\n defaultLocale: customConfiguration?.defaultLocale ?? DEFAULT_LOCALE,\n});\n\nconst buildMiddlewareFields = (\n customConfiguration?: Partial<MiddlewareConfig>\n): MiddlewareConfig => ({\n /**\n * Header name to get the locale\n *\n * Default: 'x-intlayer-locale'\n */\n headerName: customConfiguration?.headerName ?? HEADER_NAME,\n\n /**\n * Cookie name to get the locale\n *\n * Default: 'intlayer-locale'\n */\n cookieName: customConfiguration?.cookieName ?? COOKIE_NAME,\n\n /**\n * Prefix default prefix the default locale to the path as other locales.\n *\n * Example with prefixDefault = true and defaultLocale = 'en':\n * path = /en/dashboard or /fr/dashboard\n *\n * Example with prefixDefault = false and defaultLocale = 'en':\n * path = /dashboard or /fr/dashboard\n *\n *\n * Default: false\n */\n prefixDefault: customConfiguration?.prefixDefault ?? PREFIX_DEFAULT,\n\n /**\n * Base path of the application URL\n *\n * Default: ''\n *\n * Example:\n * - If the application is hosted at https://example.com/my-app\n * - The base path is '/my-app'\n * - The URL will be https://example.com/my-app/en\n * - If the base path is not set, the URL will be https://example.com/en\n */\n basePath: customConfiguration?.basePath ?? BASE_PATH,\n\n /**\n * Rule to set the cookie on the server\n * - 'always': Set the cookie on every request\n * - 'never': Never set the cookie\n */\n serverSetCookie: customConfiguration?.serverSetCookie ?? SERVER_SET_COOKIE,\n\n /**\n * No prefix in the URL\n * - true: No prefix in the URL\n * - false: Prefix in the URL\n *\n * Example:\n * - If the application is hosted at https://example.com/my-app\n * - The base path is '/my-app'\n * - The URL will be https://example.com/my-app/en\n * - If the base path is not set, the URL will be https://example.com/en\n * - If no prefix is set, the URL will be https://example.com/en\n * - If the no prefix is set to true, the URL will be https://example.com\n *\n * Default: false\n */\n noPrefix: customConfiguration?.noPrefix ?? NO_PREFIX,\n});\n\nconst buildContentFields = (\n customConfiguration?: Partial<ContentConfig>,\n baseDir?: string\n): ContentConfig => {\n const notDerivedContentConfig: BaseContentConfig = {\n /**\n * File extensions of content to look for to build the dictionaries\n *\n * - Default: ['.content.ts', '.content.js', '.content.cjs', '.content.mjs', '.content.json', '.content.tsx', '.content.jsx']\n *\n * - Example: ['.data.ts', '.data.js', '.data.json']\n *\n * Note:\n * - Can exclude unused file extensions to improve performance\n * - Avoid using common file extensions like '.ts', '.js', '.json' to avoid conflicts\n */\n fileExtensions: customConfiguration?.fileExtensions ?? FILE_EXTENSIONS,\n\n /**\n * Absolute path of the directory of the project\n * - Default: process.cwd()\n * - Example: '\n *\n * Will be used to resolve all intlayer directories\n *\n * Note:\n * - The base directory should be the root of the project\n * - Can be changed to a custom directory to externalize either the content used in the project, or the intlayer application from the project\n */\n baseDir: customConfiguration?.baseDir ?? baseDir ?? process.cwd(),\n\n /**\n * Should exclude some directories from the content search\n *\n * Default: ['node_modules']\n *\n * Not used yet\n * @TODO Implement the exclusion or remove it\n */\n excludedPath: customConfiguration?.excludedPath ?? EXCLUDED_PATHS,\n\n /**\n * Indicates if Intlayer should watch for changes in the content declaration files in the app to rebuild the related dictionaries.\n *\n * Default: process.env.NODE_ENV === 'development'\n */\n watch: customConfiguration?.watch ?? WATCH,\n };\n\n const baseDirDerivedConfiguration: BaseDerivedConfig = {\n /**\n * Directory where the content is stored\n *\n * Relative to the base directory of the project\n *\n * Default: ./src\n *\n * Example: 'src'\n *\n * Note:\n * - Can be changed to a custom directory to externalize the content used in the project\n * - If the content is not at the base directory level, update the contentDirName field instead\n */\n contentDir: (customConfiguration?.contentDir ?? CONTENT_DIR).map(\n (contentDir) => join(notDerivedContentConfig.baseDir, contentDir)\n ),\n\n /**\n * Directory where the result will be stored\n *\n * Relative to the base directory of the project\n *\n * Default: .intlayer/dictionary\n *\n * Example: '.intlayer'\n *\n * Note:\n * - Can be changed to a custom directory to externalize the intlayer application from the project\n * - If the result is not at the base directory level, update the dictionariesDirName field instead\n */\n dictionariesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.dictionariesDir ?? DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the module augmentation will be stored\n *\n * Module augmentation allow better IDE suggestions and type checking\n *\n * Relative to the base directory of the project\n *\n * Default: .intlayer/types\n *\n * Example: 'types'\n *\n * Note:\n * - If this path changed, be sure to include it from the tsconfig.json file\n * - If the module augmentation is not at the base directory level, update the moduleAugmentationDirName field instead\n *\n */\n moduleAugmentationDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.moduleAugmentationDir ?? MODULE_AUGMENTATION_DIR\n ),\n\n /**\n * Output format of the dictionary\n *\n * Default: ['intlayer']\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 dictionaryOutput:\n customConfiguration?.dictionaryOutput ?? DICTIONARY_OUTPUT,\n };\n\n const dictionariesDirDerivedConfiguration: ResultDirDerivedConfig = {\n /**\n * Directory where the unmerged dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: '.intlayer/unmerged_dictionary'\n *\n */\n unmergedDictionariesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.unmergedDictionariesDir ?? UNMERGED_DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the final dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/dictionary\n *\n * Example: '.intlayer/dictionary'\n *\n * Note:\n * - If the types are not at the result directory level, update the dictionariesDirName field instead\n * - The dictionaries are stored in JSON format\n * - The dictionaries are used to translate the content\n * - The dictionaries are built from the content files\n */\n dictionariesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.dictionariesDir ?? DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the dynamic dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/dynamic_dictionary\n */\n dynamicDictionariesDir: join(\n notDerivedContentConfig.baseDir,\n customConfiguration?.dynamicDictionariesDir ?? DYNAMIC_DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the 18n dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: i18next_resources\n *\n * Example: '.intlayer/dictionary/i18n'\n *\n * Note:\n * - If the types are not at the result directory level, update the i18nextResourcesDirName field instead\n */\n i18nextResourcesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.i18nextResourcesDir ?? I18NEXT_DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: intl_messages\n *\n * Example: '.intlayer/react-intl_dictionary'\n *\n * Note:\n * - If the types are not at the result directory level, update the dictionariesDirName field instead\n */\n reactIntlMessagesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.reactIntlMessagesDir ?? REACT_INTL_MESSAGES_DIR\n ),\n\n /**\n * Directory where the dictionaries types will be stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/types\n *\n * Example: 'types'\n *\n * Note:\n * - If the types are not at the result directory level, update the typesDirName field instead\n */\n typesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.typesDir ?? TYPES_DIR\n ),\n\n /**\n * Directory where the main files will be stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/main\n *\n * Example: '.intlayer/main'\n *\n * Note:\n *\n * - If the main files are not at the result directory level, update the mainDirName field instead\n */\n mainDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.mainDir ?? MAIN_DIR\n ),\n\n /**\n * Directory where the configuration files are stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/config\n *\n * Example: '.intlayer/config'\n *\n * Note:\n *\n * - If the configuration files are not at the result directory level, update the configDirName field instead\n */\n configDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.configDir ?? CONFIG_DIR\n ),\n };\n\n const patternsConfiguration: PatternsContentConfig = {\n /**\n * Pattern of files to watch\n *\n * Default: ['/**\\/*.content.ts', '/**\\/*.content.js', '/**\\/*.content.json', '/**\\/*.content.cjs', '/**\\/*.content.mjs', '/**\\/*.content.tsx', '/**\\/*.content.jsx']\n */\n watchedFilesPattern: notDerivedContentConfig.fileExtensions.map(\n (ext) => `/**/*${ext}`\n ),\n\n /**\n * Pattern of files to watch including the relative path\n *\n * Default: ['src/**\\/*.content.ts', 'src/**\\/*.content.js', 'src/**\\/*.content.json', 'src/**\\/*.content.cjs', 'src/**\\/*.content.mjs', 'src/**\\/*.content.tsx', 'src/**\\/*.content.jsx']\n */\n watchedFilesPatternWithPath: notDerivedContentConfig.fileExtensions.flatMap(\n (ext) =>\n baseDirDerivedConfiguration.contentDir.map(\n (contentDir) => `${normalizePath(contentDir)}/**/*${ext}`\n )\n ),\n\n /**\n * Pattern of dictionary to interpret\n *\n * Default: '.intlayer/dictionary/**\\/*.json'\n */\n outputFilesPatternWithPath: `${normalizePath(\n dictionariesDirDerivedConfiguration.dictionariesDir\n )}/**/*.json`,\n };\n\n return {\n ...notDerivedContentConfig,\n ...baseDirDerivedConfiguration,\n ...dictionariesDirDerivedConfiguration,\n ...patternsConfiguration,\n };\n};\n\nconst buildEditorFields = (\n customConfiguration?: Partial<EditorConfig>\n): EditorConfig => ({\n /**\n * URL of the application. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: '*'\n */\n applicationURL: customConfiguration?.applicationURL ?? APPLICATION_URL,\n\n /**\n * URL of the editor server. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: '*'\n */\n editorURL: customConfiguration?.editorURL ?? EDITOR_URL,\n\n /**\n * URL of the CMS server. Used to restrict the origin of the editor for security reasons.\n */\n cmsURL: customConfiguration?.cmsURL ?? CMS_URL,\n\n /**\n * URL of the editor server\n *\n * Default: 'https://back.intlayer.org'\n */\n backendURL: customConfiguration?.backendURL ?? BACKEND_URL,\n\n /** Port of the editor server\n *\n * Default: 8000\n */\n port: customConfiguration?.port ?? PORT,\n\n /**\n * Indicates if the application interact with the visual editor\n *\n * Default: true;\n *\n * If true, the editor will be able to interact with the application.\n * If false, the editor will not be able to interact with the application.\n * In any case, the editor can only be enabled by the visual editor.\n * Disabling the editor for specific environments is a way to enforce the security.\n *\n * Usage:\n * ```js\n * {\n * // Other configurations\n * editor: {\n * enabled: process.env.NODE_ENV !== 'production',\n * }\n * };\n * ```\n */\n enabled: customConfiguration?.enabled ?? IS_ENABLED,\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientId: customConfiguration?.clientId ?? undefined,\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientSecret: customConfiguration?.clientSecret ?? undefined,\n\n /**\n * Strategy for prioritizing dictionaries. If a dictionary is both present online and locally, the content will be merge.\n * However, is a field is defined in both dictionary, this setting determines which fields takes the priority over the other.\n *\n * Default: 'local_first'\n *\n * The strategy for prioritizing dictionaries. It can be either 'local_first' or 'distant_first'.\n * - 'local_first': The first dictionary found in the locale is used.\n * - 'distant_first': The first dictionary found in the distant locales is used.\n */\n dictionaryPriorityStrategy:\n customConfiguration?.dictionaryPriorityStrategy ??\n DICTIONARY_PRIORITY_STRATEGY,\n\n /**\n * Indicates if the application should hot reload the locale configurations when a change is detected.\n * For example, when a new dictionary is added or updated, the application will update the content tu display in the page.\n *\n * The hot reload is only available for clients of the `enterprise` plan.\n *\n * Default: false\n */\n hotReload: customConfiguration?.hotReload ?? HOT_RELOAD,\n});\n\nconst buildLogFields = (\n customConfiguration?: Partial<LogConfig>\n): LogConfig => ({\n /**\n * Indicates if the logger is enabled\n *\n * Default: 'default'\n *\n * If 'default', the logger is enabled and can be used.\n * If 'verbose', the logger will be enabled and can be used, but will log more information.\n * If 'disabled', the logger is disabled and cannot be used.\n */\n mode: customConfiguration?.mode ?? MODE,\n\n /**\n * Prefix of the logger\n *\n * Default: '[intlayer]'\n *\n * The prefix of the logger.\n */\n prefix: customConfiguration?.prefix ?? PREFIX,\n});\n\nconst buildAiFields = (customConfiguration?: Partial<AiConfig>): AiConfig => ({\n /**\n * AI configuration\n */\n provider: customConfiguration?.provider,\n\n /**\n * API key\n */\n apiKey: customConfiguration?.apiKey,\n\n /**\n * API model\n */\n model: customConfiguration?.model,\n\n /**\n * Temperature\n */\n temperature: customConfiguration?.temperature,\n\n /**\n * Application context\n */\n applicationContext: customConfiguration?.applicationContext,\n});\n\nconst buildBuildFields = (\n customConfiguration?: Partial<BuildConfig>\n): BuildConfig => ({\n /**\n * Indicates if the build should be optimized\n *\n * Default: process.env.NODE_ENV === 'production'\n *\n * If true, the build will be optimized.\n * If false, the build will not be optimized.\n *\n * Intlayer will replace all calls of dictionaries to optimize chunking. That way the final bundle will import only the dictionaries that are used.\n * All imports will stay as static import to avoid async processing when loading the dictionaries.\n *\n * Note:\n * - Intlayer will replace all call of `useIntlayer` with `useDictionary`, `getIntlayer` with `getDictionary`.\n * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.\n * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.\n */\n optimize: customConfiguration?.optimize ?? OPTIMIZE,\n\n /**\n * Indicates if the dynamic import should be activated\n *\n * Default: false\n *\n * By default, when a dictionary is loaded, it imports content for all locales as it's imported statically.\n * If this option is set to true, only the current locale's dictionary content\n * will be fetched via dynamic import. In that case, Intlayer will replace all\n * calls to `useIntlayer` with `useDynamicDictionary`.\n *\n * Note:\n * - Dynamic imports rely on React Suspense and may slightly impact rendering performance. But if desabled all locales will be loaded at once, even if they are not used.\n * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.\n * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.\n * - This option will be ignored if `optimize` is disabled.\n */\n activateDynamicImport:\n customConfiguration?.activateDynamicImport ?? ACTIVATE_DYNAMIC_IMPORT,\n\n /**\n * Pattern to traverse the code to optimize.\n *\n * Allows to avoid to traverse the code that is not relevant to the optimization.\n * Improve build performance.\n *\n * Default: ['**\\/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx}', '!**\\/node_modules/**']\n *\n * Example: `['src/**\\/*.{ts,tsx}', '../ui-library/**\\/*.{ts,tsx}']`\n *\n * Note:\n * - This option will be ignored if `optimize` is disabled.\n * - Use glob pattern.\n */\n traversePattern: customConfiguration?.traversePattern ?? TRAVERSE_PATTERN,\n});\n\n/**\n * Build the configuration fields by merging the default values with the custom configuration\n */\nexport const buildConfigurationFields = (\n customConfiguration?: CustomIntlayerConfig,\n baseDir?: string\n): IntlayerConfig => {\n const internationalizationConfig = buildInternationalizationFields(\n customConfiguration?.internationalization\n );\n\n const middlewareConfig = buildMiddlewareFields(\n customConfiguration?.middleware\n );\n\n const contentConfig = buildContentFields(\n customConfiguration?.content,\n baseDir\n );\n\n const editorConfig = buildEditorFields(customConfiguration?.editor);\n\n const logConfig = buildLogFields(customConfiguration?.log);\n\n const aiConfig = buildAiFields(customConfiguration?.ai);\n\n const buildConfig = buildBuildFields(customConfiguration?.build);\n\n storedConfiguration = {\n internationalization: internationalizationConfig,\n middleware: middlewareConfig,\n content: contentConfig,\n editor: editorConfig,\n log: logConfig,\n ai: aiConfig,\n build: buildConfig,\n };\n\n return storedConfiguration;\n};\n"],"mappings":"AAAA,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,MAAM,cAAc;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;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figurationFields.ts"],"sourcesContent":["import { join } from 'path';\nimport {\n IMPORT_MODE,\n OPTIMIZE,\n TRAVERSE_PATTERN,\n} from '../defaultValues/build';\nimport {\n CONFIG_DIR,\n CONTENT_DIR,\n DICTIONARIES_DIR,\n DICTIONARY_OUTPUT,\n DYNAMIC_DICTIONARIES_DIR,\n EXCLUDED_PATHS,\n FILE_EXTENSIONS,\n I18NEXT_DICTIONARIES_DIR,\n MAIN_DIR,\n MODULE_AUGMENTATION_DIR,\n REACT_INTL_MESSAGES_DIR,\n TYPES_DIR,\n UNMERGED_DICTIONARIES_DIR,\n WATCH,\n} from '../defaultValues/content';\nimport {\n APPLICATION_URL,\n BACKEND_URL,\n CMS_URL,\n DICTIONARY_PRIORITY_STRATEGY,\n EDITOR_URL,\n HOT_RELOAD,\n IS_ENABLED,\n PORT,\n} from '../defaultValues/editor';\nimport {\n DEFAULT_LOCALE,\n LOCALES,\n REQUIRED_LOCALES,\n STRICT_MODE,\n} from '../defaultValues/internationalization';\nimport { MODE, PREFIX } from '../defaultValues/log';\nimport {\n BASE_PATH,\n COOKIE_NAME,\n HEADER_NAME,\n NO_PREFIX,\n PREFIX_DEFAULT,\n SERVER_SET_COOKIE,\n} from '../defaultValues/middleware';\nimport type {\n AiConfig,\n BaseContentConfig,\n BaseDerivedConfig,\n BuildConfig,\n ContentConfig,\n CustomIntlayerConfig,\n EditorConfig,\n InternationalizationConfig,\n IntlayerConfig,\n LogConfig,\n MiddlewareConfig,\n PatternsContentConfig,\n ResultDirDerivedConfig,\n} from '../types/config';\nimport { normalizePath } from '../utils/normalizePath';\n\nlet storedConfiguration: IntlayerConfig;\n\n// @TODO - Add possibility of directories configurations to be arrays to allow multiple packages management\n\nconst buildInternationalizationFields = (\n customConfiguration?: Partial<InternationalizationConfig>\n): InternationalizationConfig => ({\n /**\n * Locales available in the application\n *\n * Default: ['en']\n *\n */\n locales: customConfiguration?.locales ?? LOCALES,\n\n /**\n * Locales required by TypeScript to ensure strong implementations of internationalized content using typescript.\n *\n * Default: []\n *\n * If empty, all locales are required in `strict` mode.\n *\n * Ensure required locales are also defined in the `locales` field.\n */\n requiredLocales:\n customConfiguration?.requiredLocales ??\n customConfiguration?.locales ??\n REQUIRED_LOCALES,\n\n /**\n * Ensure strong implementations of internationalized content using typescript.\n * - If set to \"strict\", the translation `t` function will require each declared locales to be defined. If one locale is missing, or if a locale is not declared in your config, it will throw an error.\n * - If set to \"inclusive\", the translation `t` function will require each declared locales to be defined. If one locale is missing, it will throw a warning. But will accept if a locale is not declared in your config, but exist.\n * - If set to \"loose\", the translation `t` function will accept any existing locale.\n *\n * Default: \"inclusive\"\n */\n strictMode: customConfiguration?.strictMode ?? STRICT_MODE,\n\n /**\n * Default locale of the application for fallback\n *\n * Default: 'en'\n */\n defaultLocale: customConfiguration?.defaultLocale ?? DEFAULT_LOCALE,\n});\n\nconst buildMiddlewareFields = (\n customConfiguration?: Partial<MiddlewareConfig>\n): MiddlewareConfig => ({\n /**\n * Header name to get the locale\n *\n * Default: 'x-intlayer-locale'\n */\n headerName: customConfiguration?.headerName ?? HEADER_NAME,\n\n /**\n * Cookie name to get the locale\n *\n * Default: 'intlayer-locale'\n */\n cookieName: customConfiguration?.cookieName ?? COOKIE_NAME,\n\n /**\n * Prefix default prefix the default locale to the path as other locales.\n *\n * Example with prefixDefault = true and defaultLocale = 'en':\n * path = /en/dashboard or /fr/dashboard\n *\n * Example with prefixDefault = false and defaultLocale = 'en':\n * path = /dashboard or /fr/dashboard\n *\n *\n * Default: false\n */\n prefixDefault: customConfiguration?.prefixDefault ?? PREFIX_DEFAULT,\n\n /**\n * Base path of the application URL\n *\n * Default: ''\n *\n * Example:\n * - If the application is hosted at https://example.com/my-app\n * - The base path is '/my-app'\n * - The URL will be https://example.com/my-app/en\n * - If the base path is not set, the URL will be https://example.com/en\n */\n basePath: customConfiguration?.basePath ?? BASE_PATH,\n\n /**\n * Rule to set the cookie on the server\n * - 'always': Set the cookie on every request\n * - 'never': Never set the cookie\n */\n serverSetCookie: customConfiguration?.serverSetCookie ?? SERVER_SET_COOKIE,\n\n /**\n * No prefix in the URL\n * - true: No prefix in the URL\n * - false: Prefix in the URL\n *\n * Example:\n * - If the application is hosted at https://example.com/my-app\n * - The base path is '/my-app'\n * - The URL will be https://example.com/my-app/en\n * - If the base path is not set, the URL will be https://example.com/en\n * - If no prefix is set, the URL will be https://example.com/en\n * - If the no prefix is set to true, the URL will be https://example.com\n *\n * Default: false\n */\n noPrefix: customConfiguration?.noPrefix ?? NO_PREFIX,\n});\n\nconst buildContentFields = (\n customConfiguration?: Partial<ContentConfig>,\n baseDir?: string\n): ContentConfig => {\n const notDerivedContentConfig: BaseContentConfig = {\n /**\n * File extensions of content to look for to build the dictionaries\n *\n * - Default: ['.content.ts', '.content.js', '.content.cjs', '.content.mjs', '.content.json', '.content.tsx', '.content.jsx']\n *\n * - Example: ['.data.ts', '.data.js', '.data.json']\n *\n * Note:\n * - Can exclude unused file extensions to improve performance\n * - Avoid using common file extensions like '.ts', '.js', '.json' to avoid conflicts\n */\n fileExtensions: customConfiguration?.fileExtensions ?? FILE_EXTENSIONS,\n\n /**\n * Absolute path of the directory of the project\n * - Default: process.cwd()\n * - Example: '\n *\n * Will be used to resolve all intlayer directories\n *\n * Note:\n * - The base directory should be the root of the project\n * - Can be changed to a custom directory to externalize either the content used in the project, or the intlayer application from the project\n */\n baseDir: customConfiguration?.baseDir ?? baseDir ?? process.cwd(),\n\n /**\n * Should exclude some directories from the content search\n *\n * Default: ['node_modules']\n *\n * Not used yet\n * @TODO Implement the exclusion or remove it\n */\n excludedPath: customConfiguration?.excludedPath ?? EXCLUDED_PATHS,\n\n /**\n * Indicates if Intlayer should watch for changes in the content declaration files in the app to rebuild the related dictionaries.\n *\n * Default: process.env.NODE_ENV === 'development'\n */\n watch: customConfiguration?.watch ?? WATCH,\n };\n\n const baseDirDerivedConfiguration: BaseDerivedConfig = {\n /**\n * Directory where the content is stored\n *\n * Relative to the base directory of the project\n *\n * Default: ./src\n *\n * Example: 'src'\n *\n * Note:\n * - Can be changed to a custom directory to externalize the content used in the project\n * - If the content is not at the base directory level, update the contentDirName field instead\n */\n contentDir: (customConfiguration?.contentDir ?? CONTENT_DIR).map(\n (contentDir) => join(notDerivedContentConfig.baseDir, contentDir)\n ),\n\n /**\n * Directory where the result will be stored\n *\n * Relative to the base directory of the project\n *\n * Default: .intlayer/dictionary\n *\n * Example: '.intlayer'\n *\n * Note:\n * - Can be changed to a custom directory to externalize the intlayer application from the project\n * - If the result is not at the base directory level, update the dictionariesDirName field instead\n */\n dictionariesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.dictionariesDir ?? DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the module augmentation will be stored\n *\n * Module augmentation allow better IDE suggestions and type checking\n *\n * Relative to the base directory of the project\n *\n * Default: .intlayer/types\n *\n * Example: 'types'\n *\n * Note:\n * - If this path changed, be sure to include it from the tsconfig.json file\n * - If the module augmentation is not at the base directory level, update the moduleAugmentationDirName field instead\n *\n */\n moduleAugmentationDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.moduleAugmentationDir ?? MODULE_AUGMENTATION_DIR\n ),\n\n /**\n * Output format of the dictionary\n *\n * Default: ['intlayer']\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 dictionaryOutput:\n customConfiguration?.dictionaryOutput ?? DICTIONARY_OUTPUT,\n };\n\n const dictionariesDirDerivedConfiguration: ResultDirDerivedConfig = {\n /**\n * Directory where the unmerged dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: '.intlayer/unmerged_dictionary'\n *\n */\n unmergedDictionariesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.unmergedDictionariesDir ?? UNMERGED_DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the final dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/dictionary\n *\n * Example: '.intlayer/dictionary'\n *\n * Note:\n * - If the types are not at the result directory level, update the dictionariesDirName field instead\n * - The dictionaries are stored in JSON format\n * - The dictionaries are used to translate the content\n * - The dictionaries are built from the content files\n */\n dictionariesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.dictionariesDir ?? DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the dynamic dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/dynamic_dictionary\n */\n dynamicDictionariesDir: join(\n notDerivedContentConfig.baseDir,\n customConfiguration?.dynamicDictionariesDir ?? DYNAMIC_DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the 18n dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: i18next_resources\n *\n * Example: '.intlayer/dictionary/i18n'\n *\n * Note:\n * - If the types are not at the result directory level, update the i18nextResourcesDirName field instead\n */\n i18nextResourcesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.i18nextResourcesDir ?? I18NEXT_DICTIONARIES_DIR\n ),\n\n /**\n * Directory where the dictionaries will be stored\n *\n * Relative to the result directory\n *\n * Default: intl_messages\n *\n * Example: '.intlayer/react-intl_dictionary'\n *\n * Note:\n * - If the types are not at the result directory level, update the dictionariesDirName field instead\n */\n reactIntlMessagesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.reactIntlMessagesDir ?? REACT_INTL_MESSAGES_DIR\n ),\n\n /**\n * Directory where the dictionaries types will be stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/types\n *\n * Example: 'types'\n *\n * Note:\n * - If the types are not at the result directory level, update the typesDirName field instead\n */\n typesDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.typesDir ?? TYPES_DIR\n ),\n\n /**\n * Directory where the main files will be stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/main\n *\n * Example: '.intlayer/main'\n *\n * Note:\n *\n * - If the main files are not at the result directory level, update the mainDirName field instead\n */\n mainDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.mainDir ?? MAIN_DIR\n ),\n\n /**\n * Directory where the configuration files are stored\n *\n * Relative to the result directory\n *\n * Default: .intlayer/config\n *\n * Example: '.intlayer/config'\n *\n * Note:\n *\n * - If the configuration files are not at the result directory level, update the configDirName field instead\n */\n configDir: join(\n notDerivedContentConfig.baseDir,\n\n customConfiguration?.configDir ?? CONFIG_DIR\n ),\n };\n\n const patternsConfiguration: PatternsContentConfig = {\n /**\n * Pattern of files to watch\n *\n * Default: ['/**\\/*.content.ts', '/**\\/*.content.js', '/**\\/*.content.json', '/**\\/*.content.cjs', '/**\\/*.content.mjs', '/**\\/*.content.tsx', '/**\\/*.content.jsx']\n */\n watchedFilesPattern: notDerivedContentConfig.fileExtensions.map(\n (ext) => `/**/*${ext}`\n ),\n\n /**\n * Pattern of files to watch including the relative path\n *\n * Default: ['src/**\\/*.content.ts', 'src/**\\/*.content.js', 'src/**\\/*.content.json', 'src/**\\/*.content.cjs', 'src/**\\/*.content.mjs', 'src/**\\/*.content.tsx', 'src/**\\/*.content.jsx']\n */\n watchedFilesPatternWithPath: notDerivedContentConfig.fileExtensions.flatMap(\n (ext) =>\n baseDirDerivedConfiguration.contentDir.map(\n (contentDir) => `${normalizePath(contentDir)}/**/*${ext}`\n )\n ),\n\n /**\n * Pattern of dictionary to interpret\n *\n * Default: '.intlayer/dictionary/**\\/*.json'\n */\n outputFilesPatternWithPath: `${normalizePath(\n dictionariesDirDerivedConfiguration.dictionariesDir\n )}/**/*.json`,\n };\n\n return {\n ...notDerivedContentConfig,\n ...baseDirDerivedConfiguration,\n ...dictionariesDirDerivedConfiguration,\n ...patternsConfiguration,\n };\n};\n\nconst buildEditorFields = (\n customConfiguration?: Partial<EditorConfig>\n): EditorConfig => ({\n /**\n * URL of the application. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: '*'\n */\n applicationURL: customConfiguration?.applicationURL ?? APPLICATION_URL,\n\n /**\n * URL of the editor server. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: '*'\n */\n editorURL: customConfiguration?.editorURL ?? EDITOR_URL,\n\n /**\n * URL of the CMS server. Used to restrict the origin of the editor for security reasons.\n */\n cmsURL: customConfiguration?.cmsURL ?? CMS_URL,\n\n /**\n * URL of the editor server\n *\n * Default: 'https://back.intlayer.org'\n */\n backendURL: customConfiguration?.backendURL ?? BACKEND_URL,\n\n /** Port of the editor server\n *\n * Default: 8000\n */\n port: customConfiguration?.port ?? PORT,\n\n /**\n * Indicates if the application interact with the visual editor\n *\n * Default: true;\n *\n * If true, the editor will be able to interact with the application.\n * If false, the editor will not be able to interact with the application.\n * In any case, the editor can only be enabled by the visual editor.\n * Disabling the editor for specific environments is a way to enforce the security.\n *\n * Usage:\n * ```js\n * {\n * // Other configurations\n * editor: {\n * enabled: process.env.NODE_ENV !== 'production',\n * }\n * };\n * ```\n */\n enabled: customConfiguration?.enabled ?? IS_ENABLED,\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientId: customConfiguration?.clientId ?? undefined,\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientSecret: customConfiguration?.clientSecret ?? undefined,\n\n /**\n * Strategy for prioritizing dictionaries. If a dictionary is both present online and locally, the content will be merge.\n * However, is a field is defined in both dictionary, this setting determines which fields takes the priority over the other.\n *\n * Default: 'local_first'\n *\n * The strategy for prioritizing dictionaries. It can be either 'local_first' or 'distant_first'.\n * - 'local_first': The first dictionary found in the locale is used.\n * - 'distant_first': The first dictionary found in the distant locales is used.\n */\n dictionaryPriorityStrategy:\n customConfiguration?.dictionaryPriorityStrategy ??\n DICTIONARY_PRIORITY_STRATEGY,\n\n /**\n * Indicates if the application should hot reload the locale configurations when a change is detected.\n * For example, when a new dictionary is added or updated, the application will update the content tu display in the page.\n *\n * The hot reload is only available for clients of the `enterprise` plan.\n *\n * Default: false\n */\n hotReload: customConfiguration?.hotReload ?? HOT_RELOAD,\n});\n\nconst buildLogFields = (\n customConfiguration?: Partial<LogConfig>\n): LogConfig => ({\n /**\n * Indicates if the logger is enabled\n *\n * Default: 'default'\n *\n * If 'default', the logger is enabled and can be used.\n * If 'verbose', the logger will be enabled and can be used, but will log more information.\n * If 'disabled', the logger is disabled and cannot be used.\n */\n mode: customConfiguration?.mode ?? MODE,\n\n /**\n * Prefix of the logger\n *\n * Default: '[intlayer]'\n *\n * The prefix of the logger.\n */\n prefix: customConfiguration?.prefix ?? PREFIX,\n});\n\nconst buildAiFields = (customConfiguration?: Partial<AiConfig>): AiConfig => ({\n /**\n * AI configuration\n */\n provider: customConfiguration?.provider,\n\n /**\n * API key\n */\n apiKey: customConfiguration?.apiKey,\n\n /**\n * API model\n */\n model: customConfiguration?.model,\n\n /**\n * Temperature\n */\n temperature: customConfiguration?.temperature,\n\n /**\n * Application context\n */\n applicationContext: customConfiguration?.applicationContext,\n});\n\nconst buildBuildFields = (\n customConfiguration?: Partial<BuildConfig>\n): BuildConfig => ({\n /**\n * Indicates if the build should be optimized\n *\n * Default: process.env.NODE_ENV === 'production'\n *\n * If true, the build will be optimized.\n * If false, the build will not be optimized.\n *\n * Intlayer will replace all calls of dictionaries to optimize chunking. That way the final bundle will import only the dictionaries that are used.\n * All imports will stay as static import to avoid async processing when loading the dictionaries.\n *\n * Note:\n * - Intlayer will replace all call of `useIntlayer` with the defined mode by the `importMode` option.\n * - Intlayer will replace all call of `getIntlayer` with `getDictionary`.\n * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.\n * - In most cases, \"dynamic\" will be used for React applications, \"async\" for Vue.js applications.\n * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.\n */\n optimize: customConfiguration?.optimize ?? OPTIMIZE,\n\n /**\n * Indicates the mode of import to use for the dictionaries.\n *\n * Available modes:\n * - \"static\": The dictionaries are imported statically.\n * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionary`.\n * - \"dynamic\": The dictionaries are imported dynamically in a synchronous component using the suspense API.\n * In that case, Intlayer will replace all calls to `useIntlayer` with `useDictionaryDynamic`.\n * - \"async\": The dictionaries are imported dynamically in an asynchronous component.\n * In that case, Intlayer will replace all calls to `useIntlayer` with `await useDictionaryAsync`.\n *\n * Default: \"static\"\n *\n * By default, when a dictionary is loaded, it imports content for all locales as it's imported statically.\n *\n * Note:\n * - Dynamic imports rely on Suspense and may slightly impact rendering performance.\n * - If desabled all locales will be loaded at once, even if they are not used.\n * - This option relies on the `@intlayer/babel` and `@intlayer/swc` plugins.\n * - Ensure all keys are declared statically in the `useIntlayer` calls. e.g. `useIntlayer('navbar')`.\n * - This option will be ignored if `optimize` is disabled.\n * - This option will not impact the `getIntlayer`, `getDictionary`, `useDictionary`, `useDictionaryAsync` and `useDictionaryDynamic` functions. You can still use them to refine you code on manual optimization.\n */\n importMode: customConfiguration?.importMode ?? IMPORT_MODE,\n\n /**\n * Pattern to traverse the code to optimize.\n *\n * Allows to avoid to traverse the code that is not relevant to the optimization.\n * Improve build performance.\n *\n * Default: ['**\\/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx}', '!**\\/node_modules/**']\n *\n * Example: `['src/**\\/*.{ts,tsx}', '../ui-library/**\\/*.{ts,tsx}']`\n *\n * Note:\n * - This option will be ignored if `optimize` is disabled.\n * - Use glob pattern.\n */\n traversePattern: customConfiguration?.traversePattern ?? TRAVERSE_PATTERN,\n});\n\n/**\n * Build the configuration fields by merging the default values with the custom configuration\n */\nexport const buildConfigurationFields = (\n customConfiguration?: CustomIntlayerConfig,\n baseDir?: string\n): IntlayerConfig => {\n const internationalizationConfig = buildInternationalizationFields(\n customConfiguration?.internationalization\n );\n\n const middlewareConfig = buildMiddlewareFields(\n customConfiguration?.middleware\n );\n\n const contentConfig = buildContentFields(\n customConfiguration?.content,\n baseDir\n );\n\n const editorConfig = buildEditorFields(customConfiguration?.editor);\n\n const logConfig = buildLogFields(customConfiguration?.log);\n\n const aiConfig = buildAiFields(customConfiguration?.ai);\n\n const buildConfig = buildBuildFields(customConfiguration?.build);\n\n storedConfiguration = {\n internationalization: internationalizationConfig,\n middleware: middlewareConfig,\n content: contentConfig,\n editor: editorConfig,\n log: logConfig,\n ai: aiConfig,\n build: buildConfig,\n };\n\n return storedConfiguration;\n};\n"],"mappings":"AAAA,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,MAAM,cAAc;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgBP,SAAS,qBAAqB;AAE9B,IAAI;AAIJ,MAAM,kCAAkC,CACtC,yBACgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOhC,SAAS,qBAAqB,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWzC,iBACE,qBAAqB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AqB;AAC3C;AAEA,MAAM,mBAAmB,CACvB,yBACiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBjB,UAAU,qBAAqB,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyB3C,YAAY,qBAAqB,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgB/C,iBAAiB,qBAAqB,mBAAmB;AAC3D;AAKO,MAAM,2BAA2B,CACtC,qBACA,YACmB;AACnB,QAAM,6BAA6B;AAAA,IACjC,qBAAqB;AAAA,EACvB;AAEA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,EACvB;AAEA,QAAM,gBAAgB;AAAA,IACpB,qBAAqB;AAAA,IACrB;AAAA,EACF;AAEA,QAAM,eAAe,kBAAkB,qBAAqB,MAAM;AAElE,QAAM,YAAY,eAAe,qBAAqB,GAAG;AAEzD,QAAM,WAAW,cAAc,qBAAqB,EAAE;AAEtD,QAAM,cAAc,iBAAiB,qBAAqB,KAAK;AAE/D,wBAAsB;AAAA,IACpB,sBAAsB;AAAA,IACtB,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAEA,SAAO;AACT;","names":[]}
@@ -1,5 +1,5 @@
1
- import { logger } from "../logger.mjs";
2
1
  import { loadExternalFile } from "../loadExternalFile.mjs";
2
+ import { logger } from "../logger.mjs";
3
3
  const filterValidConfiguration = (configuration) => {
4
4
  return configuration;
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/configFile/loadConfigurationFile.ts"],"sourcesContent":["import { type LoadEnvFileOptions } from '../envVariables/loadEnvFile';\nimport { logger } from '../logger';\nimport type { CustomIntlayerConfig } from '../types/config';\nimport { loadExternalFile } from '../loadExternalFile';\n\nconst filterValidConfiguration = (\n configuration: CustomIntlayerConfig\n): CustomIntlayerConfig => {\n // @TODO Implement filtering of valid configuration\n return configuration;\n};\n\n/**\n * Load the configuration file from the given path\n * Example of configuration file: intlayer.config.js\n *\n * Accepts JSON, JS, MJS and TS files as configuration\n */\nexport const loadConfigurationFile = (\n configFilePath: string,\n envVarOptions?: LoadEnvFileOptions\n): CustomIntlayerConfig | undefined => {\n try {\n const fileContent = loadExternalFile(configFilePath, envVarOptions);\n\n return filterValidConfiguration(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":"AACA,SAAS,cAAc;AAEvB,SAAS,wBAAwB;AAEjC,MAAM,2BAA2B,CAC/B,kBACyB;AAEzB,SAAO;AACT;AAQO,MAAM,wBAAwB,CACnC,gBACA,kBACqC;AACrC,MAAI;AACF,UAAM,cAAc,iBAAiB,gBAAgB,aAAa;AAElE,WAAO,yBAAyB,WAAW;AAAA,EAC7C,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/configFile/loadConfigurationFile.ts"],"sourcesContent":["import { type LoadEnvFileOptions } from '../envVariables/loadEnvFile';\nimport { loadExternalFile } from '../loadExternalFile';\nimport { logger } from '../logger';\nimport type { CustomIntlayerConfig } from '../types/config';\n\nconst filterValidConfiguration = (\n configuration: CustomIntlayerConfig\n): CustomIntlayerConfig => {\n // @TODO Implement filtering of valid configuration\n return configuration;\n};\n\n/**\n * Load the configuration file from the given path\n * Example of configuration file: intlayer.config.js\n *\n * Accepts JSON, JS, MJS and TS files as configuration\n */\nexport const loadConfigurationFile = (\n configFilePath: string,\n envVarOptions?: LoadEnvFileOptions\n): CustomIntlayerConfig | undefined => {\n try {\n const fileContent = loadExternalFile(configFilePath, envVarOptions);\n\n return filterValidConfiguration(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":"AACA,SAAS,wBAAwB;AACjC,SAAS,cAAc;AAGvB,MAAM,2BAA2B,CAC/B,kBACyB;AAEzB,SAAO;AACT;AAQO,MAAM,wBAAwB,CACnC,gBACA,kBACqC;AACrC,MAAI;AACF,UAAM,cAAc,iBAAiB,gBAAgB,aAAa;AAElE,WAAO,yBAAyB,WAAW;AAAA,EAC7C,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,11 +1,11 @@
1
1
  const OPTIMIZE = process.env.NODE_ENV === "production";
2
- const ACTIVATE_DYNAMIC_IMPORT = false;
2
+ const IMPORT_MODE = "static";
3
3
  const TRAVERSE_PATTERN = [
4
4
  "**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}",
5
5
  "!**/node_modules/**"
6
6
  ];
7
7
  export {
8
- ACTIVATE_DYNAMIC_IMPORT,
8
+ IMPORT_MODE,
9
9
  OPTIMIZE,
10
10
  TRAVERSE_PATTERN
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/defaultValues/build.ts"],"sourcesContent":["export const OPTIMIZE = process.env.NODE_ENV === 'production';\n\nexport const ACTIVATE_DYNAMIC_IMPORT = false;\n\nexport const TRAVERSE_PATTERN = [\n '**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}',\n '!**/node_modules/**',\n];\n"],"mappings":"AAAO,MAAM,WAAW,QAAQ,IAAI,aAAa;AAE1C,MAAM,0BAA0B;AAEhC,MAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/defaultValues/build.ts"],"sourcesContent":["export const OPTIMIZE = process.env.NODE_ENV === 'production';\n\nexport const IMPORT_MODE = 'static';\n\nexport const TRAVERSE_PATTERN = [\n '**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}',\n '!**/node_modules/**',\n];\n"],"mappings":"AAAO,MAAM,WAAW,QAAQ,IAAI,aAAa;AAE1C,MAAM,cAAc;AAEpB,MAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AACF;","names":[]}
@@ -9,7 +9,14 @@ const FILE_EXTENSIONS = [
9
9
  ".content.tsx",
10
10
  ".content.jsx"
11
11
  ];
12
- const EXCLUDED_PATHS = ["node_modules", ".intlayer"];
12
+ const EXCLUDED_PATHS = [
13
+ "node_modules",
14
+ ".intlayer",
15
+ ".next",
16
+ ".nuxt",
17
+ ".expo",
18
+ "dist"
19
+ ];
13
20
  const CONTENT_DIR = ["."];
14
21
  const MAIN_DIR = ".intlayer/main";
15
22
  const DICTIONARIES_DIR = ".intlayer/dictionary";
@@ -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.cjx',\n '.content.mjs',\n '.content.mjx',\n '.content.json',\n '.content.tsx',\n '.content.jsx',\n];\nexport const EXCLUDED_PATHS = ['node_modules', '.intlayer'];\n\nexport const CONTENT_DIR = ['.'];\n\nexport const MAIN_DIR = '.intlayer/main';\n\nexport const DICTIONARIES_DIR = '.intlayer/dictionary';\n\nexport const UNMERGED_DICTIONARIES_DIR = '.intlayer/unmerged_dictionary';\n\nexport const DYNAMIC_DICTIONARIES_DIR = '.intlayer/dynamic_dictionary';\n\nexport const TYPES_DIR = '.intlayer/types';\n\nexport const MODULE_AUGMENTATION_DIR = '.intlayer/types';\n\nexport const DICTIONARY_OUTPUT: DictionaryOutput[] = ['intlayer'];\n\nexport const I18NEXT_DICTIONARIES_DIR = 'i18next_resources';\n\nexport const REACT_INTL_MESSAGES_DIR = 'intl_messages';\n\nexport const CONFIG_DIR = '.intlayer/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,gBAAgB,WAAW;AAEnD,MAAM,cAAc,CAAC,GAAG;AAExB,MAAM,WAAW;AAEjB,MAAM,mBAAmB;AAEzB,MAAM,4BAA4B;AAElC,MAAM,2BAA2B;AAEjC,MAAM,YAAY;AAElB,MAAM,0BAA0B;AAEhC,MAAM,oBAAwC,CAAC,UAAU;AAEzD,MAAM,2BAA2B;AAEjC,MAAM,0BAA0B;AAEhC,MAAM,aAAa;AAEnB,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 = [\n 'node_modules',\n '.intlayer',\n '.next',\n '.nuxt',\n '.expo',\n 'dist',\n];\n\nexport const CONTENT_DIR = ['.'];\n\nexport const MAIN_DIR = '.intlayer/main';\n\nexport const DICTIONARIES_DIR = '.intlayer/dictionary';\n\nexport const UNMERGED_DICTIONARIES_DIR = '.intlayer/unmerged_dictionary';\n\nexport const DYNAMIC_DICTIONARIES_DIR = '.intlayer/dynamic_dictionary';\n\nexport const TYPES_DIR = '.intlayer/types';\n\nexport const MODULE_AUGMENTATION_DIR = '.intlayer/types';\n\nexport const DICTIONARY_OUTPUT: DictionaryOutput[] = ['intlayer'];\n\nexport const I18NEXT_DICTIONARIES_DIR = 'i18next_resources';\n\nexport const REACT_INTL_MESSAGES_DIR = 'intl_messages';\n\nexport const CONFIG_DIR = '.intlayer/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;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,cAAc,CAAC,GAAG;AAExB,MAAM,WAAW;AAEjB,MAAM,mBAAmB;AAEzB,MAAM,4BAA4B;AAElC,MAAM,2BAA2B;AAEjC,MAAM,YAAY;AAElB,MAAM,0BAA0B;AAEhC,MAAM,oBAAwC,CAAC,UAAU;AAEzD,MAAM,2BAA2B;AAEjC,MAAM,0BAA0B;AAEhC,MAAM,aAAa;AAEnB,MAAM,QAAQ,QAAQ,IAAI,aAAa;","names":[]}
@@ -58,7 +58,7 @@ const extractNextEnvVariable = () => {
58
58
  };
59
59
  const build = {
60
60
  optimize: process.env.NEXT_PUBLIC_INTLAYER_BUILD_OPTIMIZE,
61
- activateDynamicImport: process.env.NEXT_PUBLIC_INTLAYER_BUILD_ACTIVATE_DYNAMIC_IMPORT,
61
+ importMode: process.env.NEXT_PUBLIC_INTLAYER_BUILD_IMPORT_MODE,
62
62
  traversePattern: process.env.NEXT_PUBLIC_INTLAYER_BUILD_TRAVERSE_PATTERN
63
63
  };
64
64
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/envVariables/extractEnvVariable/next.ts"],"sourcesContent":["import type {\n AiConfig,\n BuildConfig,\n ContentConfig,\n EditorConfig,\n InternationalizationConfig,\n LogConfig,\n MiddlewareConfig,\n} from '../../types/config';\nimport type { IntlayerConfigEnvVariable, ReplaceValue } from './types';\n\nexport const extractNextEnvVariable = (): IntlayerConfigEnvVariable => {\n const internationalization: ReplaceValue<InternationalizationConfig> = {\n locales: process.env.NEXT_PUBLIC_INTLAYER_LOCALES,\n requiredLocales: process.env.NEXT_PUBLIC_INTLAYER_REQUIRED_LOCALES,\n strictMode: process.env.NEXT_PUBLIC_INTLAYER_STRICT_MODE,\n defaultLocale: process.env.NEXT_PUBLIC_INTLAYER_DEFAULT_LOCALE,\n };\n\n const middleware: ReplaceValue<MiddlewareConfig> = {\n headerName: process.env.NEXT_PUBLIC_INTLAYER_HEADER_NAME,\n cookieName: process.env.NEXT_PUBLIC_INTLAYER_COOKIE_NAME,\n prefixDefault: process.env.NEXT_PUBLIC_INTLAYER_PREFIX_DEFAULT,\n basePath: process.env.NEXT_PUBLIC_INTLAYER_BASE_PATH,\n serverSetCookie: process.env.NEXT_PUBLIC_INTLAYER_SERVER_SET_COOKIE,\n noPrefix: process.env.NEXT_PUBLIC_INTLAYER_NO_PREFIX,\n };\n\n const content: ReplaceValue<ContentConfig> = {\n fileExtensions: process.env.NEXT_PUBLIC_INTLAYER_FILE_EXTENSIONS,\n baseDir: process.env.NEXT_PUBLIC_INTLAYER_BASE_DIR,\n contentDir: process.env.NEXT_PUBLIC_INTLAYER_CONTENT_DIR,\n excludedPath: process.env.NEXT_PUBLIC_INTLAYER_EXCLUDED_PATH,\n dictionariesDir: process.env.NEXT_PUBLIC_INTLAYER_RESULT_DIR,\n dynamicDictionariesDir:\n process.env.NEXT_PUBLIC_INTLAYER_DYNAMIC_DICTIONARIES_DIR,\n unmergedDictionariesDir:\n process.env.NEXT_PUBLIC_INTLAYER_UNMERGED_DICTIONARIES_DIR,\n moduleAugmentationDir:\n process.env.NEXT_PUBLIC_INTLAYER_MODULE_AUGMENTATION_DIR,\n i18nextResourcesDir: process.env.NEXT_PUBLIC_INTLAYER_I18N_RESOURCES_DIR,\n reactIntlMessagesDir:\n process.env.NEXT_PUBLIC_INTLAYER_REACT_INTL_MESSAGES_DIR,\n mainDir: process.env.NEXT_PUBLIC_INTLAYER_MAIN_DIR,\n configDir: process.env.NEXT_PUBLIC_INTLAYER_CONFIG_DIR,\n typesDir: process.env.NEXT_PUBLIC_INTLAYER_TYPE_DIR,\n watchedFilesPattern: process.env.NEXT_PUBLIC_INTLAYER_WATCHED_FILES_PATTERN,\n watchedFilesPatternWithPath:\n process.env.NEXT_PUBLIC_INTLAYER_WATCHED_FILES_PATTERN_WITH_PATH,\n outputFilesPatternWithPath:\n process.env.NEXT_PUBLIC_INTLAYER_OUTPUT_FILES_PATTERN_WITH_PATH,\n dictionaryOutput: process.env.NEXT_PUBLIC_INTLAYER_DICTIONARY_OUTPUT,\n watch: process.env.NEXT_PUBLIC_INTLAYER_WATCH,\n };\n\n const editor: ReplaceValue<EditorConfig> = {\n applicationURL: process.env.NEXT_PUBLIC_INTLAYER_APPLICATION_URL,\n editorURL: process.env.NEXT_PUBLIC_INTLAYER_EDITOR_URL,\n cmsURL: process.env.NEXT_PUBLIC_INTLAYER_CMS_URL,\n backendURL: process.env.NEXT_PUBLIC_INTLAYER_BACKEND_URL,\n enabled: process.env.NEXT_PUBLIC_INTLAYER_ENABLED,\n port: process.env.NEXT_PUBLIC_INTLAYER_PORT,\n clientId: process.env.NEXT_PUBLIC_INTLAYER_CLIENT_ID,\n clientSecret: process.env.NEXT_PUBLIC_INTLAYER_CLIENT_SECRET,\n dictionaryPriorityStrategy:\n process.env.NEXT_PUBLIC_INTLAYER_DICTIONARY_PRIORITY_STRATEGY,\n hotReload: process.env.NEXT_PUBLIC_INTLAYER_HOT_RELOAD,\n };\n\n const ai: ReplaceValue<AiConfig> = {\n provider: process.env.NEXT_PUBLIC_INTLAYER_AI_PROVIDER,\n model: process.env.NEXT_PUBLIC_INTLAYER_AI_MODEL,\n temperature: process.env.NEXT_PUBLIC_INTLAYER_AI_TEMPERATURE,\n apiKey: process.env.NEXT_PUBLIC_INTLAYER_AI_API_KEY,\n applicationContext: process.env.NEXT_PUBLIC_INTLAYER_AI_APPLICATION_CONTEXT,\n };\n\n const log: ReplaceValue<LogConfig> = {\n mode: process.env.NEXT_PUBLIC_INTLAYER_LOG_MODE,\n prefix: process.env.NEXT_PUBLIC_INTLAYER_LOG_PREFIX,\n };\n\n const build: ReplaceValue<BuildConfig> = {\n optimize: process.env.NEXT_PUBLIC_INTLAYER_BUILD_OPTIMIZE,\n activateDynamicImport:\n process.env.NEXT_PUBLIC_INTLAYER_BUILD_ACTIVATE_DYNAMIC_IMPORT,\n traversePattern: process.env.NEXT_PUBLIC_INTLAYER_BUILD_TRAVERSE_PATTERN,\n };\n\n return {\n internationalization,\n middleware,\n content,\n editor,\n log,\n ai,\n build,\n };\n};\n"],"mappings":"AAWO,MAAM,yBAAyB,MAAiC;AACrE,QAAM,uBAAiE;AAAA,IACrE,SAAS,QAAQ,IAAI;AAAA,IACrB,iBAAiB,QAAQ,IAAI;AAAA,IAC7B,YAAY,QAAQ,IAAI;AAAA,IACxB,eAAe,QAAQ,IAAI;AAAA,EAC7B;AAEA,QAAM,aAA6C;AAAA,IACjD,YAAY,QAAQ,IAAI;AAAA,IACxB,YAAY,QAAQ,IAAI;AAAA,IACxB,eAAe,QAAQ,IAAI;AAAA,IAC3B,UAAU,QAAQ,IAAI;AAAA,IACtB,iBAAiB,QAAQ,IAAI;AAAA,IAC7B,UAAU,QAAQ,IAAI;AAAA,EACxB;AAEA,QAAM,UAAuC;AAAA,IAC3C,gBAAgB,QAAQ,IAAI;AAAA,IAC5B,SAAS,QAAQ,IAAI;AAAA,IACrB,YAAY,QAAQ,IAAI;AAAA,IACxB,cAAc,QAAQ,IAAI;AAAA,IAC1B,iBAAiB,QAAQ,IAAI;AAAA,IAC7B,wBACE,QAAQ,I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;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../../src/envVariables/extractEnvVariable/next.ts"],"sourcesContent":["import type {\n AiConfig,\n BuildConfig,\n ContentConfig,\n EditorConfig,\n InternationalizationConfig,\n LogConfig,\n MiddlewareConfig,\n} from '../../types/config';\nimport type { IntlayerConfigEnvVariable, ReplaceValue } from './types';\n\nexport const extractNextEnvVariable = (): IntlayerConfigEnvVariable => {\n const internationalization: ReplaceValue<InternationalizationConfig> = {\n locales: process.env.NEXT_PUBLIC_INTLAYER_LOCALES,\n requiredLocales: process.env.NEXT_PUBLIC_INTLAYER_REQUIRED_LOCALES,\n strictMode: process.env.NEXT_PUBLIC_INTLAYER_STRICT_MODE,\n defaultLocale: process.env.NEXT_PUBLIC_INTLAYER_DEFAULT_LOCALE,\n };\n\n const middleware: ReplaceValue<MiddlewareConfig> = {\n headerName: process.env.NEXT_PUBLIC_INTLAYER_HEADER_NAME,\n cookieName: process.env.NEXT_PUBLIC_INTLAYER_COOKIE_NAME,\n prefixDefault: process.env.NEXT_PUBLIC_INTLAYER_PREFIX_DEFAULT,\n basePath: process.env.NEXT_PUBLIC_INTLAYER_BASE_PATH,\n serverSetCookie: process.env.NEXT_PUBLIC_INTLAYER_SERVER_SET_COOKIE,\n noPrefix: process.env.NEXT_PUBLIC_INTLAYER_NO_PREFIX,\n };\n\n const content: ReplaceValue<ContentConfig> = {\n fileExtensions: process.env.NEXT_PUBLIC_INTLAYER_FILE_EXTENSIONS,\n baseDir: process.env.NEXT_PUBLIC_INTLAYER_BASE_DIR,\n contentDir: process.env.NEXT_PUBLIC_INTLAYER_CONTENT_DIR,\n excludedPath: process.env.NEXT_PUBLIC_INTLAYER_EXCLUDED_PATH,\n dictionariesDir: process.env.NEXT_PUBLIC_INTLAYER_RESULT_DIR,\n dynamicDictionariesDir:\n process.env.NEXT_PUBLIC_INTLAYER_DYNAMIC_DICTIONARIES_DIR,\n unmergedDictionariesDir:\n process.env.NEXT_PUBLIC_INTLAYER_UNMERGED_DICTIONARIES_DIR,\n moduleAugmentationDir:\n process.env.NEXT_PUBLIC_INTLAYER_MODULE_AUGMENTATION_DIR,\n i18nextResourcesDir: process.env.NEXT_PUBLIC_INTLAYER_I18N_RESOURCES_DIR,\n reactIntlMessagesDir:\n process.env.NEXT_PUBLIC_INTLAYER_REACT_INTL_MESSAGES_DIR,\n mainDir: process.env.NEXT_PUBLIC_INTLAYER_MAIN_DIR,\n configDir: process.env.NEXT_PUBLIC_INTLAYER_CONFIG_DIR,\n typesDir: process.env.NEXT_PUBLIC_INTLAYER_TYPE_DIR,\n watchedFilesPattern: process.env.NEXT_PUBLIC_INTLAYER_WATCHED_FILES_PATTERN,\n watchedFilesPatternWithPath:\n process.env.NEXT_PUBLIC_INTLAYER_WATCHED_FILES_PATTERN_WITH_PATH,\n outputFilesPatternWithPath:\n process.env.NEXT_PUBLIC_INTLAYER_OUTPUT_FILES_PATTERN_WITH_PATH,\n dictionaryOutput: process.env.NEXT_PUBLIC_INTLAYER_DICTIONARY_OUTPUT,\n watch: process.env.NEXT_PUBLIC_INTLAYER_WATCH,\n };\n\n const editor: ReplaceValue<EditorConfig> = {\n applicationURL: process.env.NEXT_PUBLIC_INTLAYER_APPLICATION_URL,\n editorURL: process.env.NEXT_PUBLIC_INTLAYER_EDITOR_URL,\n cmsURL: process.env.NEXT_PUBLIC_INTLAYER_CMS_URL,\n backendURL: process.env.NEXT_PUBLIC_INTLAYER_BACKEND_URL,\n enabled: process.env.NEXT_PUBLIC_INTLAYER_ENABLED,\n port: process.env.NEXT_PUBLIC_INTLAYER_PORT,\n clientId: process.env.NEXT_PUBLIC_INTLAYER_CLIENT_ID,\n clientSecret: process.env.NEXT_PUBLIC_INTLAYER_CLIENT_SECRET,\n dictionaryPriorityStrategy:\n process.env.NEXT_PUBLIC_INTLAYER_DICTIONARY_PRIORITY_STRATEGY,\n hotReload: process.env.NEXT_PUBLIC_INTLAYER_HOT_RELOAD,\n };\n\n const ai: ReplaceValue<AiConfig> = {\n provider: process.env.NEXT_PUBLIC_INTLAYER_AI_PROVIDER,\n model: process.env.NEXT_PUBLIC_INTLAYER_AI_MODEL,\n temperature: process.env.NEXT_PUBLIC_INTLAYER_AI_TEMPERATURE,\n apiKey: process.env.NEXT_PUBLIC_INTLAYER_AI_API_KEY,\n applicationContext: process.env.NEXT_PUBLIC_INTLAYER_AI_APPLICATION_CONTEXT,\n };\n\n const log: ReplaceValue<LogConfig> = {\n mode: process.env.NEXT_PUBLIC_INTLAYER_LOG_MODE,\n prefix: process.env.NEXT_PUBLIC_INTLAYER_LOG_PREFIX,\n };\n\n const build: ReplaceValue<BuildConfig> = {\n optimize: process.env.NEXT_PUBLIC_INTLAYER_BUILD_OPTIMIZE,\n importMode: process.env.NEXT_PUBLIC_INTLAYER_BUILD_IMPORT_MODE,\n traversePattern: process.env.NEXT_PUBLIC_INTLAYER_BUILD_TRAVERSE_PATTERN,\n };\n\n return {\n internationalization,\n middleware,\n content,\n editor,\n log,\n ai,\n build,\n };\n};\n"],"mappings":"AAWO,MAAM,yBAAyB,MAAiC;AACrE,QAAM,uBAAiE;AAAA,IACrE,SAAS,QAAQ,IAAI;AAAA,IACrB,iBAAiB,QAAQ,IAAI;AAAA,IAC7B,YAAY,QAAQ,IAAI;AAAA,IACxB,eAAe,QAAQ,IAAI;AAAA,EAC7B;AAEA,QAAM,aAA6C;AAAA,IACjD,YAAY,QAAQ,IAAI;AAAA,IACxB,YAAY,QAAQ,IAAI;AAAA,IACxB,eAAe,QAAQ,IAAI;AAAA,IAC3B,UAAU,QAAQ,IAAI;AAAA,IACtB,iBAAiB,QAAQ,IAAI;AAAA,IAC7B,UAAU,QAAQ,IAAI;AAAA,EACxB;AAEA,QAAM,UAAuC;AAAA,IAC3C,gBAAgB,QAAQ,IAAI;AAAA,IAC5B,SAAS,QAAQ,IAAI;AAAA,IACrB,YAAY,QAAQ,IAAI;AAAA,IACxB,cAAc,QAAQ,IAAI;AAAA,IAC1B,iBAAiB,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AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -58,7 +58,7 @@ const extractReactAppEnvVariable = () => {
58
58
  };
59
59
  const build = {
60
60
  optimize: process.env.REACT_APP_INTLAYER_BUILD_OPTIMIZE,
61
- activateDynamicImport: process.env.REACT_APP_INTLAYER_BUILD_ACTIVATE_DYNAMIC_IMPORT,
61
+ importMode: process.env.REACT_APP_INTLAYER_BUILD_IMPORT_MODE,
62
62
  traversePattern: process.env.REACT_APP_INTLAYER_BUILD_TRAVERSE_PATTERN
63
63
  };
64
64
  return {