@intlayer/docs 7.1.4 → 7.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/dist/cjs/_virtual/rolldown_runtime.cjs +0 -25
- package/dist/cjs/packages/@intlayer/config/dist/esm/_virtual/rolldown_runtime.cjs +0 -10
- package/dist/cjs/packages/@intlayer/config/dist/esm/_virtual/rolldown_runtime.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/config/dist/esm/utils/ESMxCJSHelpers.cjs +0 -26
- package/dist/cjs/packages/@intlayer/config/dist/esm/utils/ESMxCJSHelpers.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/config/dist/esm/utils/cache.cjs +0 -262
- package/dist/cjs/packages/@intlayer/config/dist/esm/utils/cache.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/config/dist/esm/utils/getPackageJsonPath.cjs +0 -34
- package/dist/cjs/packages/@intlayer/config/dist/esm/utils/getPackageJsonPath.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/_virtual/rolldown_runtime.cjs +0 -10
- package/dist/cjs/packages/@intlayer/core/dist/esm/_virtual/rolldown_runtime.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/_virtual/rolldown_runtime.cjs +0 -21
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/_virtual/rolldown_runtime.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/built.cjs +0 -8
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/built.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/buildConfigurationFields.cjs +0 -119
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/buildConfigurationFields.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.cjs +0 -69
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.cjs +0 -26
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.cjs +0 -51
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.cjs +0 -24
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.cjs +0 -78
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.cjs +0 -7
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.cjs +0 -36
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.cjs +0 -21
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.cjs +0 -22
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.cjs +0 -16
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.cjs +0 -26
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.cjs +0 -26
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.cjs +0 -23
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.cjs +0 -48
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.cjs +0 -65
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs +0 -45
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/logger.cjs +0 -47
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/logger.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs +0 -15
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/locales.cjs +0 -1128
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/locales.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.cjs +0 -27
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/cache.cjs +0 -262
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/cache.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/getPackageJsonPath.cjs +0 -34
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/getPackageJsonPath.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/normalizePath.cjs +0 -17
- package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/utils/normalizePath.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getLocalizedUrl.cjs +0 -46
- package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getLocalizedUrl.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getMultilingualUrls.cjs +0 -70
- package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getMultilingualUrls.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getPathWithoutLocale.cjs +0 -53
- package/dist/cjs/packages/@intlayer/core/dist/esm/localization/getPathWithoutLocale.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/transpiler/markdown/getMarkdownMetadata.cjs +0 -23
- package/dist/cjs/packages/@intlayer/core/dist/esm/transpiler/markdown/getMarkdownMetadata.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/utils/checkIsURLAbsolute.cjs +0 -7
- package/dist/cjs/packages/@intlayer/core/dist/esm/utils/checkIsURLAbsolute.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/core/dist/esm/utils/parseYaml.cjs +0 -322
- package/dist/cjs/packages/@intlayer/core/dist/esm/utils/parseYaml.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/types/dist/esm/_virtual/rolldown_runtime.cjs +0 -15
- package/dist/cjs/packages/@intlayer/types/dist/esm/_virtual/rolldown_runtime.cjs.map +0 -1
- package/dist/cjs/packages/@intlayer/types/dist/esm/locales.cjs +0 -1128
- package/dist/cjs/packages/@intlayer/types/dist/esm/locales.cjs.map +0 -1
- package/dist/esm/_virtual/rolldown_runtime.mjs +0 -8
- package/dist/esm/packages/@intlayer/core/dist/esm/_virtual/rolldown_runtime.mjs +0 -11
- package/dist/esm/packages/@intlayer/core/dist/esm/_virtual/rolldown_runtime.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs +0 -20
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/_virtual/rolldown_runtime.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/built.mjs +0 -8
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/built.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs +0 -118
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.mjs +0 -67
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs +0 -26
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs +0 -50
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.mjs +0 -19
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.mjs +0 -64
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.mjs +0 -6
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.mjs +0 -27
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.mjs +0 -21
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.mjs +0 -18
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.mjs +0 -14
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.mjs +0 -23
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.mjs +0 -24
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs +0 -23
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs +0 -47
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs +0 -63
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/parseFileContent.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs +0 -44
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/transpileTSToMJS.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/logger.mjs +0 -45
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/logger.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs +0 -14
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/_virtual/rolldown_runtime.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/locales.mjs +0 -1128
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/types/dist/esm/locales.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs +0 -25
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/ESMxCJSHelpers.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/cache.mjs +0 -263
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/cache.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs +0 -33
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/getPackageJsonPath.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/normalizePath.mjs +0 -16
- package/dist/esm/packages/@intlayer/core/dist/esm/config/dist/esm/utils/normalizePath.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/localization/getLocalizedUrl.mjs +0 -46
- package/dist/esm/packages/@intlayer/core/dist/esm/localization/getLocalizedUrl.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/localization/getMultilingualUrls.mjs +0 -70
- package/dist/esm/packages/@intlayer/core/dist/esm/localization/getMultilingualUrls.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/localization/getPathWithoutLocale.mjs +0 -53
- package/dist/esm/packages/@intlayer/core/dist/esm/localization/getPathWithoutLocale.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs +0 -23
- package/dist/esm/packages/@intlayer/core/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/utils/checkIsURLAbsolute.mjs +0 -6
- package/dist/esm/packages/@intlayer/core/dist/esm/utils/checkIsURLAbsolute.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/core/dist/esm/utils/parseYaml.mjs +0 -321
- package/dist/esm/packages/@intlayer/core/dist/esm/utils/parseYaml.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/types/dist/esm/_virtual/rolldown_runtime.mjs +0 -14
- package/dist/esm/packages/@intlayer/types/dist/esm/_virtual/rolldown_runtime.mjs.map +0 -1
- package/dist/esm/packages/@intlayer/types/dist/esm/locales.mjs +0 -1128
- package/dist/esm/packages/@intlayer/types/dist/esm/locales.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildConfigurationFields.cjs","names":["LOCALES","REQUIRED_LOCALES","STRICT_MODE","DEFAULT_LOCALE","ROUTING_MODE","STORAGE","BASE_PATH","FILE_EXTENSIONS","EXCLUDED_PATHS","WATCH","CONTENT_DIR","MODULE_AUGMENTATION_DIR","UNMERGED_DICTIONARIES_DIR","REMOTE_DICTIONARIES_DIR","DICTIONARIES_DIR","DYNAMIC_DICTIONARIES_DIR","FETCH_DICTIONARIES_DIR","TYPES_DIR","MAIN_DIR","CONFIG_DIR","CACHE_DIR","normalizePath","APPLICATION_URL","EDITOR_URL","CMS_URL","BACKEND_URL","PORT","IS_ENABLED","DICTIONARY_PRIORITY_STRATEGY","LIVE_SYNC","LIVE_SYNC_PORT","MODE","PREFIX","OPTIMIZE","IMPORT_MODE","TRAVERSE_PATTERN","OUTPUT_FORMAT","CACHE","FILL"],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/buildConfigurationFields.mjs"],"sourcesContent":["import { CACHE, IMPORT_MODE, OPTIMIZE, OUTPUT_FORMAT, TRAVERSE_PATTERN } from \"../defaultValues/build.mjs\";\nimport { CACHE_DIR, CONFIG_DIR, CONTENT_DIR, DICTIONARIES_DIR, DYNAMIC_DICTIONARIES_DIR, EXCLUDED_PATHS, FETCH_DICTIONARIES_DIR, FILE_EXTENSIONS, MAIN_DIR, MODULE_AUGMENTATION_DIR, REMOTE_DICTIONARIES_DIR, TYPES_DIR, UNMERGED_DICTIONARIES_DIR, WATCH } from \"../defaultValues/content.mjs\";\nimport { APPLICATION_URL, BACKEND_URL, CMS_URL, DICTIONARY_PRIORITY_STRATEGY, EDITOR_URL, IS_ENABLED, LIVE_SYNC, LIVE_SYNC_PORT, PORT } from \"../defaultValues/editor.mjs\";\nimport { DEFAULT_LOCALE, LOCALES, REQUIRED_LOCALES, STRICT_MODE } from \"../defaultValues/internationalization.mjs\";\nimport { MODE, PREFIX } from \"../defaultValues/log.mjs\";\nimport { BASE_PATH, ROUTING_MODE, STORAGE } from \"../defaultValues/routing.mjs\";\nimport { normalizePath } from \"../utils/normalizePath.mjs\";\nimport { FILL } from \"../defaultValues/dictionary.mjs\";\nimport { isAbsolute, join } from \"node:path\";\n\n//#region ../config/dist/esm/configFile/buildConfigurationFields.mjs\nlet storedConfiguration;\nconst buildInternationalizationFields = (customConfiguration) => ({\n\tlocales: customConfiguration?.locales ?? LOCALES,\n\trequiredLocales: customConfiguration?.requiredLocales ?? customConfiguration?.locales ?? REQUIRED_LOCALES,\n\tstrictMode: customConfiguration?.strictMode ?? STRICT_MODE,\n\tdefaultLocale: customConfiguration?.defaultLocale ?? DEFAULT_LOCALE\n});\nconst buildRoutingFields = (customConfiguration) => ({\n\tmode: customConfiguration?.mode ?? ROUTING_MODE,\n\tstorage: customConfiguration?.storage ?? STORAGE,\n\tbasePath: customConfiguration?.basePath ?? BASE_PATH\n});\nconst buildContentFields = (customConfiguration, baseDir) => {\n\tconst notDerivedContentConfig = {\n\t\tfileExtensions: customConfiguration?.fileExtensions ?? FILE_EXTENSIONS,\n\t\tbaseDir: customConfiguration?.baseDir ?? baseDir ?? process.cwd(),\n\t\texcludedPath: customConfiguration?.excludedPath ?? EXCLUDED_PATHS,\n\t\twatch: customConfiguration?.watch ?? WATCH,\n\t\tformatCommand: customConfiguration?.formatCommand\n\t};\n\tconst optionalJoinBaseDir = (path) => {\n\t\tif (isAbsolute(path)) return path;\n\t\treturn join(notDerivedContentConfig.baseDir, path);\n\t};\n\tconst baseDirDerivedConfiguration = {\n\t\tcontentDir: (customConfiguration?.contentDir ?? CONTENT_DIR).map(optionalJoinBaseDir),\n\t\tmoduleAugmentationDir: optionalJoinBaseDir(customConfiguration?.moduleAugmentationDir ?? MODULE_AUGMENTATION_DIR),\n\t\tunmergedDictionariesDir: optionalJoinBaseDir(customConfiguration?.unmergedDictionariesDir ?? UNMERGED_DICTIONARIES_DIR),\n\t\tremoteDictionariesDir: optionalJoinBaseDir(customConfiguration?.remoteDictionariesDir ?? REMOTE_DICTIONARIES_DIR),\n\t\tdictionariesDir: optionalJoinBaseDir(customConfiguration?.dictionariesDir ?? DICTIONARIES_DIR),\n\t\tdynamicDictionariesDir: optionalJoinBaseDir(customConfiguration?.dynamicDictionariesDir ?? DYNAMIC_DICTIONARIES_DIR),\n\t\tfetchDictionariesDir: optionalJoinBaseDir(customConfiguration?.fetchDictionariesDir ?? FETCH_DICTIONARIES_DIR),\n\t\ttypesDir: optionalJoinBaseDir(customConfiguration?.typesDir ?? TYPES_DIR),\n\t\tmainDir: optionalJoinBaseDir(customConfiguration?.mainDir ?? MAIN_DIR),\n\t\tconfigDir: optionalJoinBaseDir(customConfiguration?.configDir ?? CONFIG_DIR),\n\t\tcacheDir: optionalJoinBaseDir(customConfiguration?.cacheDir ?? CACHE_DIR)\n\t};\n\tconst patternsConfiguration = {\n\t\twatchedFilesPattern: notDerivedContentConfig.fileExtensions.map((ext) => `/**/*${ext}`),\n\t\twatchedFilesPatternWithPath: notDerivedContentConfig.fileExtensions.flatMap((ext) => baseDirDerivedConfiguration.contentDir.map((contentDir) => `${normalizePath(contentDir)}/**/*${ext}`)),\n\t\toutputFilesPatternWithPath: `${normalizePath(baseDirDerivedConfiguration.dictionariesDir)}/**/*.json`\n\t};\n\treturn {\n\t\t...notDerivedContentConfig,\n\t\t...baseDirDerivedConfiguration,\n\t\t...patternsConfiguration\n\t};\n};\nconst buildEditorFields = (customConfiguration) => ({\n\tapplicationURL: customConfiguration?.applicationURL ?? APPLICATION_URL,\n\teditorURL: customConfiguration?.editorURL ?? EDITOR_URL,\n\tcmsURL: customConfiguration?.cmsURL ?? CMS_URL,\n\tbackendURL: customConfiguration?.backendURL ?? BACKEND_URL,\n\tport: customConfiguration?.port ?? PORT,\n\tenabled: customConfiguration?.enabled ?? IS_ENABLED,\n\tclientId: customConfiguration?.clientId ?? void 0,\n\tclientSecret: customConfiguration?.clientSecret ?? void 0,\n\tdictionaryPriorityStrategy: customConfiguration?.dictionaryPriorityStrategy ?? DICTIONARY_PRIORITY_STRATEGY,\n\tliveSync: customConfiguration?.liveSync ?? LIVE_SYNC,\n\tliveSyncPort: customConfiguration?.liveSyncPort ?? LIVE_SYNC_PORT,\n\tliveSyncURL: customConfiguration?.liveSyncURL ?? `http://localhost:${customConfiguration?.liveSyncPort ?? LIVE_SYNC_PORT}`\n});\nconst buildLogFields = (customConfiguration, logFunctions) => ({\n\tmode: customConfiguration?.mode ?? MODE,\n\tprefix: customConfiguration?.prefix ?? PREFIX,\n\terror: logFunctions?.error,\n\tlog: logFunctions?.log,\n\tinfo: logFunctions?.info,\n\twarn: logFunctions?.warn\n});\nconst buildAiFields = (customConfiguration) => ({\n\tprovider: customConfiguration?.provider,\n\tapiKey: customConfiguration?.apiKey,\n\tmodel: customConfiguration?.model,\n\ttemperature: customConfiguration?.temperature,\n\tapplicationContext: customConfiguration?.applicationContext\n});\nconst buildBuildFields = (customConfiguration) => ({\n\toptimize: customConfiguration?.optimize ?? OPTIMIZE,\n\timportMode: customConfiguration?.importMode ?? IMPORT_MODE,\n\ttraversePattern: customConfiguration?.traversePattern ?? TRAVERSE_PATTERN,\n\toutputFormat: customConfiguration?.outputFormat ?? OUTPUT_FORMAT,\n\tcache: customConfiguration?.cache ?? CACHE,\n\trequire: customConfiguration?.require\n});\nconst buildDictionaryFields = (customConfiguration) => ({ fill: customConfiguration?.fill ?? FILL });\n/**\n* Build the configuration fields by merging the default values with the custom configuration\n*/\nconst buildConfigurationFields = (customConfiguration, baseDir, logFunctions) => {\n\tstoredConfiguration = {\n\t\tinternationalization: buildInternationalizationFields(customConfiguration?.internationalization),\n\t\trouting: buildRoutingFields(customConfiguration?.routing),\n\t\tcontent: buildContentFields(customConfiguration?.content, baseDir),\n\t\teditor: buildEditorFields(customConfiguration?.editor),\n\t\tlog: buildLogFields(customConfiguration?.log, logFunctions),\n\t\tai: buildAiFields(customConfiguration?.ai),\n\t\tbuild: buildBuildFields(customConfiguration?.build),\n\t\tdictionary: buildDictionaryFields(customConfiguration?.dictionary),\n\t\tplugins: customConfiguration?.plugins\n\t};\n\treturn storedConfiguration;\n};\n\n//#endregion\nexport { buildConfigurationFields };\n//# sourceMappingURL=buildConfigurationFields.mjs.map"],"mappings":";;;;;;;;;;;;AAWA,IAAI;AACJ,MAAM,mCAAmC,yBAAyB;CACjE,SAAS,qBAAqB,WAAWA;CACzC,iBAAiB,qBAAqB,mBAAmB,qBAAqB,WAAWC;CACzF,YAAY,qBAAqB,cAAcC;CAC/C,eAAe,qBAAqB,iBAAiBC;CACrD;AACD,MAAM,sBAAsB,yBAAyB;CACpD,MAAM,qBAAqB,QAAQC;CACnC,SAAS,qBAAqB,WAAWC;CACzC,UAAU,qBAAqB,YAAYC;CAC3C;AACD,MAAM,sBAAsB,qBAAqB,YAAY;CAC5D,MAAM,0BAA0B;EAC/B,gBAAgB,qBAAqB,kBAAkBC;EACvD,SAAS,qBAAqB,WAAW,WAAW,QAAQ,KAAK;EACjE,cAAc,qBAAqB,gBAAgBC;EACnD,OAAO,qBAAqB,SAASC;EACrC,eAAe,qBAAqB;EACpC;CACD,MAAM,uBAAuB,SAAS;AACrC,gCAAe,KAAK,CAAE,QAAO;AAC7B,6BAAY,wBAAwB,SAAS,KAAK;;CAEnD,MAAM,8BAA8B;EACnC,aAAa,qBAAqB,cAAcC,6BAAa,IAAI,oBAAoB;EACrF,uBAAuB,oBAAoB,qBAAqB,yBAAyBC,wCAAwB;EACjH,yBAAyB,oBAAoB,qBAAqB,2BAA2BC,0CAA0B;EACvH,uBAAuB,oBAAoB,qBAAqB,yBAAyBC,wCAAwB;EACjH,iBAAiB,oBAAoB,qBAAqB,mBAAmBC,iCAAiB;EAC9F,wBAAwB,oBAAoB,qBAAqB,0BAA0BC,yCAAyB;EACpH,sBAAsB,oBAAoB,qBAAqB,wBAAwBC,uCAAuB;EAC9G,UAAU,oBAAoB,qBAAqB,YAAYC,0BAAU;EACzE,SAAS,oBAAoB,qBAAqB,WAAWC,yBAAS;EACtE,WAAW,oBAAoB,qBAAqB,aAAaC,2BAAW;EAC5E,UAAU,oBAAoB,qBAAqB,YAAYC,0BAAU;EACzE;CACD,MAAM,wBAAwB;EAC7B,qBAAqB,wBAAwB,eAAe,KAAK,QAAQ,QAAQ,MAAM;EACvF,6BAA6B,wBAAwB,eAAe,SAAS,QAAQ,4BAA4B,WAAW,KAAK,eAAe,GAAGC,oCAAc,WAAW,CAAC,OAAO,MAAM,CAAC;EAC3L,4BAA4B,GAAGA,oCAAc,4BAA4B,gBAAgB,CAAC;EAC1F;AACD,QAAO;EACN,GAAG;EACH,GAAG;EACH,GAAG;EACH;;AAEF,MAAM,qBAAqB,yBAAyB;CACnD,gBAAgB,qBAAqB,kBAAkBC;CACvD,WAAW,qBAAqB,aAAaC;CAC7C,QAAQ,qBAAqB,UAAUC;CACvC,YAAY,qBAAqB,cAAcC;CAC/C,MAAM,qBAAqB,QAAQC;CACnC,SAAS,qBAAqB,WAAWC;CACzC,UAAU,qBAAqB,YAAY,KAAK;CAChD,cAAc,qBAAqB,gBAAgB,KAAK;CACxD,4BAA4B,qBAAqB,8BAA8BC;CAC/E,UAAU,qBAAqB,YAAYC;CAC3C,cAAc,qBAAqB,gBAAgBC;CACnD,aAAa,qBAAqB,eAAe,oBAAoB,qBAAqB,gBAAgBA;CAC1G;AACD,MAAM,kBAAkB,qBAAqB,kBAAkB;CAC9D,MAAM,qBAAqB,QAAQC;CACnC,QAAQ,qBAAqB,UAAUC;CACvC,OAAO,cAAc;CACrB,KAAK,cAAc;CACnB,MAAM,cAAc;CACpB,MAAM,cAAc;CACpB;AACD,MAAM,iBAAiB,yBAAyB;CAC/C,UAAU,qBAAqB;CAC/B,QAAQ,qBAAqB;CAC7B,OAAO,qBAAqB;CAC5B,aAAa,qBAAqB;CAClC,oBAAoB,qBAAqB;CACzC;AACD,MAAM,oBAAoB,yBAAyB;CAClD,UAAU,qBAAqB,YAAYC;CAC3C,YAAY,qBAAqB,cAAcC;CAC/C,iBAAiB,qBAAqB,mBAAmBC;CACzD,cAAc,qBAAqB,gBAAgBC;CACnD,OAAO,qBAAqB,SAASC;CACrC,SAAS,qBAAqB;CAC9B;AACD,MAAM,yBAAyB,yBAAyB,EAAE,MAAM,qBAAqB,QAAQC,yBAAM;;;;AAInG,MAAM,4BAA4B,qBAAqB,SAAS,iBAAiB;AAChF,uBAAsB;EACrB,sBAAsB,gCAAgC,qBAAqB,qBAAqB;EAChG,SAAS,mBAAmB,qBAAqB,QAAQ;EACzD,SAAS,mBAAmB,qBAAqB,SAAS,QAAQ;EAClE,QAAQ,kBAAkB,qBAAqB,OAAO;EACtD,KAAK,eAAe,qBAAqB,KAAK,aAAa;EAC3D,IAAI,cAAc,qBAAqB,GAAG;EAC1C,OAAO,iBAAiB,qBAAqB,MAAM;EACnD,YAAY,sBAAsB,qBAAqB,WAAW;EAClE,SAAS,qBAAqB;EAC9B;AACD,QAAO"}
|
package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.cjs
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_logger = require('../logger.cjs');
|
|
3
|
-
const require_cache = require('../utils/cache.cjs');
|
|
4
|
-
const require_getPackageJsonPath = require('../utils/getPackageJsonPath.cjs');
|
|
5
|
-
const require_buildConfigurationFields = require('./buildConfigurationFields.cjs');
|
|
6
|
-
const require_searchConfigurationFile = require('./searchConfigurationFile.cjs');
|
|
7
|
-
const require_loadConfigurationFile = require('./loadConfigurationFile.cjs');
|
|
8
|
-
let node_path = require("node:path");
|
|
9
|
-
let deepmerge = require("deepmerge");
|
|
10
|
-
deepmerge = require_rolldown_runtime.__toESM(deepmerge);
|
|
11
|
-
|
|
12
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.mjs
|
|
13
|
-
/**
|
|
14
|
-
* Get the configuration for the intlayer by reading the configuration file (e.g. intlayer.config.js)
|
|
15
|
-
*/
|
|
16
|
-
const getConfigurationAndFilePath = (options) => {
|
|
17
|
-
let baseDir;
|
|
18
|
-
try {
|
|
19
|
-
baseDir = options?.baseDir ?? require_getPackageJsonPath.getPackageJsonPath().baseDir;
|
|
20
|
-
} catch (_err) {
|
|
21
|
-
return {
|
|
22
|
-
configuration: require_buildConfigurationFields.buildConfigurationFields({}, options?.baseDir, options?.logFunctions),
|
|
23
|
-
configurationFilePath: void 0
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const cachedConfiguration = require_cache.cache.get(options);
|
|
27
|
-
if (cachedConfiguration) return cachedConfiguration;
|
|
28
|
-
const { configurationFilePath, numCustomConfiguration } = require_searchConfigurationFile.searchConfigurationFile(baseDir);
|
|
29
|
-
if (options?.override?.log?.mode === "verbose") logConfigFileResult(baseDir, numCustomConfiguration, configurationFilePath);
|
|
30
|
-
let storedConfiguration;
|
|
31
|
-
if (configurationFilePath) storedConfiguration = require_buildConfigurationFields.buildConfigurationFields(require_loadConfigurationFile.loadConfigurationFile(configurationFilePath, {
|
|
32
|
-
projectRequire: options?.require,
|
|
33
|
-
envVarOptions: {
|
|
34
|
-
env: options?.env,
|
|
35
|
-
envFile: options?.envFile
|
|
36
|
-
},
|
|
37
|
-
additionalEnvVars: options?.additionalEnvVars,
|
|
38
|
-
aliases: options?.aliases
|
|
39
|
-
}), options?.baseDir, options?.logFunctions);
|
|
40
|
-
const projectRequireConfig = options?.require ? { build: {
|
|
41
|
-
require: options?.require,
|
|
42
|
-
cache: options?.cache
|
|
43
|
-
} } : {};
|
|
44
|
-
const configuration = (0, deepmerge.default)((0, deepmerge.default)(storedConfiguration ?? {}, projectRequireConfig), options?.override ?? {});
|
|
45
|
-
require_cache.cache.set(options, {
|
|
46
|
-
configuration,
|
|
47
|
-
configurationFilePath
|
|
48
|
-
});
|
|
49
|
-
return {
|
|
50
|
-
configuration,
|
|
51
|
-
configurationFilePath
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Get the configuration for the intlayer by reading the configuration file (e.g. intlayer.config.js)
|
|
56
|
-
*/
|
|
57
|
-
const getConfiguration = (options) => getConfigurationAndFilePath(options).configuration;
|
|
58
|
-
const logConfigFileResult = (baseDir, numCustomConfiguration, configurationFilePath) => {
|
|
59
|
-
if (numCustomConfiguration === 0) require_logger.logger("Configuration file not found, using default configuration.", { isVerbose: true });
|
|
60
|
-
else {
|
|
61
|
-
const relativeOutputPath = (0, node_path.relative)(baseDir, configurationFilePath);
|
|
62
|
-
if (numCustomConfiguration === 1) require_logger.logger(`Configuration file found: ${relativeOutputPath}.`, { isVerbose: true });
|
|
63
|
-
else require_logger.logger(`Multiple configuration files found, using ${relativeOutputPath}.`, { isVerbose: true });
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
//#endregion
|
|
68
|
-
exports.getConfiguration = getConfiguration;
|
|
69
|
-
//# sourceMappingURL=getConfiguration.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getConfiguration.cjs","names":["getPackageJsonPath","buildConfigurationFields","cache","searchConfigurationFile","loadConfigurationFile"],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/getConfiguration.mjs"],"sourcesContent":["import { logger } from \"../logger.mjs\";\nimport { cache } from \"../utils/cache.mjs\";\nimport { getPackageJsonPath } from \"../utils/getPackageJsonPath.mjs\";\nimport { buildConfigurationFields } from \"./buildConfigurationFields.mjs\";\nimport { searchConfigurationFile } from \"./searchConfigurationFile.mjs\";\nimport { loadConfigurationFile } from \"./loadConfigurationFile.mjs\";\nimport { relative } from \"node:path\";\nimport merge from \"deepmerge\";\n\n//#region ../config/dist/esm/configFile/getConfiguration.mjs\n/**\n* Get the configuration for the intlayer by reading the configuration file (e.g. intlayer.config.js)\n*/\nconst getConfigurationAndFilePath = (options) => {\n\tlet baseDir;\n\ttry {\n\t\tbaseDir = options?.baseDir ?? getPackageJsonPath().baseDir;\n\t} catch (_err) {\n\t\treturn {\n\t\t\tconfiguration: buildConfigurationFields({}, options?.baseDir, options?.logFunctions),\n\t\t\tconfigurationFilePath: void 0\n\t\t};\n\t}\n\tconst cachedConfiguration = cache.get(options);\n\tif (cachedConfiguration) return cachedConfiguration;\n\tconst { configurationFilePath, numCustomConfiguration } = searchConfigurationFile(baseDir);\n\tif (options?.override?.log?.mode === \"verbose\") logConfigFileResult(baseDir, numCustomConfiguration, configurationFilePath);\n\tlet storedConfiguration;\n\tif (configurationFilePath) storedConfiguration = buildConfigurationFields(loadConfigurationFile(configurationFilePath, {\n\t\tprojectRequire: options?.require,\n\t\tenvVarOptions: {\n\t\t\tenv: options?.env,\n\t\t\tenvFile: options?.envFile\n\t\t},\n\t\tadditionalEnvVars: options?.additionalEnvVars,\n\t\taliases: options?.aliases\n\t}), options?.baseDir, options?.logFunctions);\n\tconst projectRequireConfig = options?.require ? { build: {\n\t\trequire: options?.require,\n\t\tcache: options?.cache\n\t} } : {};\n\tconst configuration = merge(merge(storedConfiguration ?? {}, projectRequireConfig), options?.override ?? {});\n\tcache.set(options, {\n\t\tconfiguration,\n\t\tconfigurationFilePath\n\t});\n\treturn {\n\t\tconfiguration,\n\t\tconfigurationFilePath\n\t};\n};\n/**\n* Get the configuration for the intlayer by reading the configuration file (e.g. intlayer.config.js)\n*/\nconst getConfiguration = (options) => getConfigurationAndFilePath(options).configuration;\nconst logConfigFileResult = (baseDir, numCustomConfiguration, configurationFilePath) => {\n\tif (numCustomConfiguration === 0) logger(\"Configuration file not found, using default configuration.\", { isVerbose: true });\n\telse {\n\t\tconst relativeOutputPath = relative(baseDir, configurationFilePath);\n\t\tif (numCustomConfiguration === 1) logger(`Configuration file found: ${relativeOutputPath}.`, { isVerbose: true });\n\t\telse logger(`Multiple configuration files found, using ${relativeOutputPath}.`, { isVerbose: true });\n\t}\n};\n\n//#endregion\nexport { getConfiguration };\n//# sourceMappingURL=getConfiguration.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAM,+BAA+B,YAAY;CAChD,IAAI;AACJ,KAAI;AACH,YAAU,SAAS,WAAWA,+CAAoB,CAAC;UAC3C,MAAM;AACd,SAAO;GACN,eAAeC,0DAAyB,EAAE,EAAE,SAAS,SAAS,SAAS,aAAa;GACpF,uBAAuB,KAAK;GAC5B;;CAEF,MAAM,sBAAsBC,oBAAM,IAAI,QAAQ;AAC9C,KAAI,oBAAqB,QAAO;CAChC,MAAM,EAAE,uBAAuB,2BAA2BC,wDAAwB,QAAQ;AAC1F,KAAI,SAAS,UAAU,KAAK,SAAS,UAAW,qBAAoB,SAAS,wBAAwB,sBAAsB;CAC3H,IAAI;AACJ,KAAI,sBAAuB,uBAAsBF,0DAAyBG,oDAAsB,uBAAuB;EACtH,gBAAgB,SAAS;EACzB,eAAe;GACd,KAAK,SAAS;GACd,SAAS,SAAS;GAClB;EACD,mBAAmB,SAAS;EAC5B,SAAS,SAAS;EAClB,CAAC,EAAE,SAAS,SAAS,SAAS,aAAa;CAC5C,MAAM,uBAAuB,SAAS,UAAU,EAAE,OAAO;EACxD,SAAS,SAAS;EAClB,OAAO,SAAS;EAChB,EAAE,GAAG,EAAE;CACR,MAAM,8DAA4B,uBAAuB,EAAE,EAAE,qBAAqB,EAAE,SAAS,YAAY,EAAE,CAAC;AAC5G,qBAAM,IAAI,SAAS;EAClB;EACA;EACA,CAAC;AACF,QAAO;EACN;EACA;EACA;;;;;AAKF,MAAM,oBAAoB,YAAY,4BAA4B,QAAQ,CAAC;AAC3E,MAAM,uBAAuB,SAAS,wBAAwB,0BAA0B;AACvF,KAAI,2BAA2B,EAAG,uBAAO,8DAA8D,EAAE,WAAW,MAAM,CAAC;MACtH;EACJ,MAAM,6CAA8B,SAAS,sBAAsB;AACnE,MAAI,2BAA2B,EAAG,uBAAO,6BAA6B,mBAAmB,IAAI,EAAE,WAAW,MAAM,CAAC;MAC5G,uBAAO,6CAA6C,mBAAmB,IAAI,EAAE,WAAW,MAAM,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const require_ESMxCJSHelpers = require('../utils/ESMxCJSHelpers.cjs');
|
|
2
|
-
const require_loadExternalFile = require('../loadExternalFile/loadExternalFile.cjs');
|
|
3
|
-
|
|
4
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs
|
|
5
|
-
const filterValidConfiguration = (configuration) => {
|
|
6
|
-
return configuration;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Load the configuration file from the given path
|
|
10
|
-
* Example of configuration file: intlayer.config.js
|
|
11
|
-
*
|
|
12
|
-
* Accepts JSON, JS, MJS and TS files as configuration
|
|
13
|
-
*/
|
|
14
|
-
const loadConfigurationFile = (configFilePath, options) => {
|
|
15
|
-
return filterValidConfiguration(require_loadExternalFile.loadExternalFileSync(configFilePath, {
|
|
16
|
-
...options,
|
|
17
|
-
aliases: {
|
|
18
|
-
...options?.aliases,
|
|
19
|
-
intlayer: require_ESMxCJSHelpers.configESMxCJSRequire.resolve("@intlayer/types")
|
|
20
|
-
}
|
|
21
|
-
}));
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
exports.loadConfigurationFile = loadConfigurationFile;
|
|
26
|
-
//# sourceMappingURL=loadConfigurationFile.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loadConfigurationFile.cjs","names":["loadExternalFileSync","configESMxCJSRequire"],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/loadConfigurationFile.mjs"],"sourcesContent":["import { configESMxCJSRequire } from \"../utils/ESMxCJSHelpers.mjs\";\nimport { loadExternalFileSync } from \"../loadExternalFile/loadExternalFile.mjs\";\n\n//#region ../config/dist/esm/configFile/loadConfigurationFile.mjs\nconst filterValidConfiguration = (configuration) => {\n\treturn configuration;\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*/\nconst loadConfigurationFile = (configFilePath, options) => {\n\treturn filterValidConfiguration(loadExternalFileSync(configFilePath, {\n\t\t...options,\n\t\taliases: {\n\t\t\t...options?.aliases,\n\t\t\tintlayer: configESMxCJSRequire.resolve(\"@intlayer/types\")\n\t\t}\n\t}));\n};\n\n//#endregion\nexport { loadConfigurationFile };\n//# sourceMappingURL=loadConfigurationFile.mjs.map"],"mappings":";;;;AAIA,MAAM,4BAA4B,kBAAkB;AACnD,QAAO;;;;;;;;AAQR,MAAM,yBAAyB,gBAAgB,YAAY;AAC1D,QAAO,yBAAyBA,8CAAqB,gBAAgB;EACpE,GAAG;EACH,SAAS;GACR,GAAG,SAAS;GACZ,UAAUC,4CAAqB,QAAQ,kBAAkB;GACzD;EACD,CAAC,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_logger = require('../logger.cjs');
|
|
3
|
-
const require_getPackageJsonPath = require('../utils/getPackageJsonPath.cjs');
|
|
4
|
-
let node_path = require("node:path");
|
|
5
|
-
let node_fs = require("node:fs");
|
|
6
|
-
|
|
7
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs
|
|
8
|
-
const EXTENSION = [
|
|
9
|
-
"ts",
|
|
10
|
-
"js",
|
|
11
|
-
"json",
|
|
12
|
-
"cjs",
|
|
13
|
-
"mjs",
|
|
14
|
-
""
|
|
15
|
-
];
|
|
16
|
-
const CONFIGURATION_FILE_NAME_1 = "intlayer.config";
|
|
17
|
-
const CONFIGURATION_FILE_NAME_2 = ".intlayerrc";
|
|
18
|
-
const configurationFiles = [...EXTENSION.filter((extension) => extension !== "").map((ext) => `${CONFIGURATION_FILE_NAME_1}.${ext}`), CONFIGURATION_FILE_NAME_2];
|
|
19
|
-
/**
|
|
20
|
-
* Search for the configuration file in the given path
|
|
21
|
-
*
|
|
22
|
-
* List of detected configuration files:
|
|
23
|
-
* - intlayer.config.ts
|
|
24
|
-
* - intlayer.config.js
|
|
25
|
-
* - intlayer.config.json
|
|
26
|
-
* - intlayer.config.cjs
|
|
27
|
-
* - intlayer.config.mjs
|
|
28
|
-
* - .intlayerrc
|
|
29
|
-
*/
|
|
30
|
-
const searchConfigurationFile = (startDir) => {
|
|
31
|
-
let configurationFilePath;
|
|
32
|
-
let numCustomConfiguration = 0;
|
|
33
|
-
const { baseDir } = require_getPackageJsonPath.getPackageJsonPath(startDir);
|
|
34
|
-
for (const fileName of configurationFiles) try {
|
|
35
|
-
const filePath = (0, node_path.resolve)(baseDir, fileName);
|
|
36
|
-
if (!(0, node_fs.existsSync)(filePath)) {} else {
|
|
37
|
-
numCustomConfiguration += 1;
|
|
38
|
-
if (!configurationFilePath) configurationFilePath = filePath;
|
|
39
|
-
}
|
|
40
|
-
} catch (error) {
|
|
41
|
-
require_logger.logger(`${fileName}: ${error}`, { level: "error" });
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
configurationFilePath,
|
|
45
|
-
numCustomConfiguration
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
//#endregion
|
|
50
|
-
exports.searchConfigurationFile = searchConfigurationFile;
|
|
51
|
-
//# sourceMappingURL=searchConfigurationFile.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"searchConfigurationFile.cjs","names":["getPackageJsonPath"],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/configFile/searchConfigurationFile.mjs"],"sourcesContent":["import { logger } from \"../logger.mjs\";\nimport { getPackageJsonPath } from \"../utils/getPackageJsonPath.mjs\";\nimport { resolve } from \"node:path\";\nimport { existsSync } from \"node:fs\";\n\n//#region ../config/dist/esm/configFile/searchConfigurationFile.mjs\nconst EXTENSION = [\n\t\"ts\",\n\t\"js\",\n\t\"json\",\n\t\"cjs\",\n\t\"mjs\",\n\t\"\"\n];\nconst CONFIGURATION_FILE_NAME_1 = \"intlayer.config\";\nconst CONFIGURATION_FILE_NAME_2 = \".intlayerrc\";\nconst configurationFiles = [...EXTENSION.filter((extension) => extension !== \"\").map((ext) => `${CONFIGURATION_FILE_NAME_1}.${ext}`), CONFIGURATION_FILE_NAME_2];\n/**\n* Search for the configuration file in the given path\n*\n* List of detected configuration files:\n* - intlayer.config.ts\n* - intlayer.config.js\n* - intlayer.config.json\n* - intlayer.config.cjs\n* - intlayer.config.mjs\n* - .intlayerrc\n*/\nconst searchConfigurationFile = (startDir) => {\n\tlet configurationFilePath;\n\tlet numCustomConfiguration = 0;\n\tconst { baseDir } = getPackageJsonPath(startDir);\n\tfor (const fileName of configurationFiles) try {\n\t\tconst filePath = resolve(baseDir, fileName);\n\t\tif (!existsSync(filePath)) {} else {\n\t\t\tnumCustomConfiguration += 1;\n\t\t\tif (!configurationFilePath) configurationFilePath = filePath;\n\t\t}\n\t} catch (error) {\n\t\tlogger(`${fileName}: ${error}`, { level: \"error\" });\n\t}\n\treturn {\n\t\tconfigurationFilePath,\n\t\tnumCustomConfiguration\n\t};\n};\n\n//#endregion\nexport { searchConfigurationFile };\n//# sourceMappingURL=searchConfigurationFile.mjs.map"],"mappings":";;;;;;;AAMA,MAAM,YAAY;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,4BAA4B;AAClC,MAAM,4BAA4B;AAClC,MAAM,qBAAqB,CAAC,GAAG,UAAU,QAAQ,cAAc,cAAc,GAAG,CAAC,KAAK,QAAQ,GAAG,0BAA0B,GAAG,MAAM,EAAE,0BAA0B;;;;;;;;;;;;AAYhK,MAAM,2BAA2B,aAAa;CAC7C,IAAI;CACJ,IAAI,yBAAyB;CAC7B,MAAM,EAAE,YAAYA,8CAAmB,SAAS;AAChD,MAAK,MAAM,YAAY,mBAAoB,KAAI;EAC9C,MAAM,kCAAmB,SAAS,SAAS;AAC3C,MAAI,yBAAY,SAAS,EAAE,QAAQ;AAClC,6BAA0B;AAC1B,OAAI,CAAC,sBAAuB,yBAAwB;;UAE7C,OAAO;AACf,wBAAO,GAAG,SAAS,IAAI,SAAS,EAAE,OAAO,SAAS,CAAC;;AAEpD,QAAO;EACN;EACA;EACA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
|
|
3
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.mjs
|
|
4
|
-
var build_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
5
|
-
CACHE: () => CACHE,
|
|
6
|
-
IMPORT_MODE: () => IMPORT_MODE,
|
|
7
|
-
OPTIMIZE: () => OPTIMIZE,
|
|
8
|
-
OUTPUT_FORMAT: () => OUTPUT_FORMAT,
|
|
9
|
-
TRAVERSE_PATTERN: () => TRAVERSE_PATTERN
|
|
10
|
-
});
|
|
11
|
-
const OPTIMIZE = false;
|
|
12
|
-
const IMPORT_MODE = "static";
|
|
13
|
-
const TRAVERSE_PATTERN = ["**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}", "!**/node_modules/**"];
|
|
14
|
-
const OUTPUT_FORMAT = ["cjs", "esm"];
|
|
15
|
-
const CACHE = true;
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
exports.CACHE = CACHE;
|
|
19
|
-
exports.IMPORT_MODE = IMPORT_MODE;
|
|
20
|
-
exports.OPTIMIZE = OPTIMIZE;
|
|
21
|
-
exports.OUTPUT_FORMAT = OUTPUT_FORMAT;
|
|
22
|
-
exports.TRAVERSE_PATTERN = TRAVERSE_PATTERN;
|
|
23
|
-
exports.build_exports = build_exports;
|
|
24
|
-
//# sourceMappingURL=build.cjs.map
|
package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.cjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/build.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/build.mjs\nvar build_exports = /* @__PURE__ */ __export({\n\tCACHE: () => CACHE,\n\tIMPORT_MODE: () => IMPORT_MODE,\n\tOPTIMIZE: () => OPTIMIZE,\n\tOUTPUT_FORMAT: () => OUTPUT_FORMAT,\n\tTRAVERSE_PATTERN: () => TRAVERSE_PATTERN\n});\nconst OPTIMIZE = false;\nconst IMPORT_MODE = \"static\";\nconst TRAVERSE_PATTERN = [\"**/*.{js,ts,mjs,cjs,jsx,tsx,mjx,cjx,vue,svelte,svte}\", \"!**/node_modules/**\"];\nconst OUTPUT_FORMAT = [\"cjs\", \"esm\"];\nconst CACHE = true;\n\n//#endregion\nexport { CACHE, IMPORT_MODE, OPTIMIZE, OUTPUT_FORMAT, TRAVERSE_PATTERN, build_exports };\n//# sourceMappingURL=build.mjs.map"],"mappings":";;;AAGA,IAAI,gBAAgC,kDAAS;CAC5C,aAAa;CACb,mBAAmB;CACnB,gBAAgB;CAChB,qBAAqB;CACrB,wBAAwB;CACxB,CAAC;AACF,MAAM,WAAW;AACjB,MAAM,cAAc;AACpB,MAAM,mBAAmB,CAAC,wDAAwD,sBAAsB;AACxG,MAAM,gBAAgB,CAAC,OAAO,MAAM;AACpC,MAAM,QAAQ"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
|
|
3
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.mjs
|
|
4
|
-
var content_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
5
|
-
CACHE_DIR: () => CACHE_DIR,
|
|
6
|
-
CONFIG_DIR: () => CONFIG_DIR,
|
|
7
|
-
CONTENT_DIR: () => CONTENT_DIR,
|
|
8
|
-
DICTIONARIES_DIR: () => DICTIONARIES_DIR,
|
|
9
|
-
DYNAMIC_DICTIONARIES_DIR: () => DYNAMIC_DICTIONARIES_DIR,
|
|
10
|
-
EXCLUDED_PATHS: () => EXCLUDED_PATHS,
|
|
11
|
-
FETCH_DICTIONARIES_DIR: () => FETCH_DICTIONARIES_DIR,
|
|
12
|
-
FILE_EXTENSIONS: () => FILE_EXTENSIONS,
|
|
13
|
-
I18NEXT_DICTIONARIES_DIR: () => I18NEXT_DICTIONARIES_DIR,
|
|
14
|
-
MAIN_DIR: () => MAIN_DIR,
|
|
15
|
-
MASKS_DIR: () => MASKS_DIR,
|
|
16
|
-
MODULE_AUGMENTATION_DIR: () => MODULE_AUGMENTATION_DIR,
|
|
17
|
-
REACT_INTL_MESSAGES_DIR: () => REACT_INTL_MESSAGES_DIR,
|
|
18
|
-
REMOTE_DICTIONARIES_DIR: () => REMOTE_DICTIONARIES_DIR,
|
|
19
|
-
TYPES_DIR: () => TYPES_DIR,
|
|
20
|
-
UNMERGED_DICTIONARIES_DIR: () => UNMERGED_DICTIONARIES_DIR,
|
|
21
|
-
WATCH: () => WATCH
|
|
22
|
-
});
|
|
23
|
-
const FILE_EXTENSIONS = [
|
|
24
|
-
".content.ts",
|
|
25
|
-
".content.js",
|
|
26
|
-
".content.cjs",
|
|
27
|
-
".content.cjx",
|
|
28
|
-
".content.mjs",
|
|
29
|
-
".content.mjx",
|
|
30
|
-
".content.json",
|
|
31
|
-
".content.tsx",
|
|
32
|
-
".content.jsx"
|
|
33
|
-
];
|
|
34
|
-
const EXCLUDED_PATHS = [
|
|
35
|
-
"**/node_modules/**",
|
|
36
|
-
"**/dist/**",
|
|
37
|
-
"**/build/**",
|
|
38
|
-
"**/.intlayer/**",
|
|
39
|
-
"**/.next/**",
|
|
40
|
-
"**/.nuxt/**",
|
|
41
|
-
"**/.expo/**",
|
|
42
|
-
"**/.vercel/**",
|
|
43
|
-
"**/.turbo/**",
|
|
44
|
-
"**/.tanstack/**"
|
|
45
|
-
];
|
|
46
|
-
const CONTENT_DIR = ["."];
|
|
47
|
-
const MAIN_DIR = ".intlayer/main";
|
|
48
|
-
const DICTIONARIES_DIR = ".intlayer/dictionary";
|
|
49
|
-
const MASKS_DIR = ".intlayer/mask";
|
|
50
|
-
const REMOTE_DICTIONARIES_DIR = ".intlayer/remote_dictionary";
|
|
51
|
-
const UNMERGED_DICTIONARIES_DIR = ".intlayer/unmerged_dictionary";
|
|
52
|
-
const DYNAMIC_DICTIONARIES_DIR = ".intlayer/dynamic_dictionary";
|
|
53
|
-
const FETCH_DICTIONARIES_DIR = ".intlayer/fetch_dictionary";
|
|
54
|
-
const TYPES_DIR = ".intlayer/types";
|
|
55
|
-
const MODULE_AUGMENTATION_DIR = ".intlayer/types";
|
|
56
|
-
const I18NEXT_DICTIONARIES_DIR = "i18next_resources";
|
|
57
|
-
const REACT_INTL_MESSAGES_DIR = "intl_messages";
|
|
58
|
-
const CONFIG_DIR = ".intlayer/config";
|
|
59
|
-
const CACHE_DIR = ".intlayer/cache";
|
|
60
|
-
const WATCH = true;
|
|
61
|
-
|
|
62
|
-
//#endregion
|
|
63
|
-
exports.CACHE_DIR = CACHE_DIR;
|
|
64
|
-
exports.CONFIG_DIR = CONFIG_DIR;
|
|
65
|
-
exports.CONTENT_DIR = CONTENT_DIR;
|
|
66
|
-
exports.DICTIONARIES_DIR = DICTIONARIES_DIR;
|
|
67
|
-
exports.DYNAMIC_DICTIONARIES_DIR = DYNAMIC_DICTIONARIES_DIR;
|
|
68
|
-
exports.EXCLUDED_PATHS = EXCLUDED_PATHS;
|
|
69
|
-
exports.FETCH_DICTIONARIES_DIR = FETCH_DICTIONARIES_DIR;
|
|
70
|
-
exports.FILE_EXTENSIONS = FILE_EXTENSIONS;
|
|
71
|
-
exports.MAIN_DIR = MAIN_DIR;
|
|
72
|
-
exports.MODULE_AUGMENTATION_DIR = MODULE_AUGMENTATION_DIR;
|
|
73
|
-
exports.REMOTE_DICTIONARIES_DIR = REMOTE_DICTIONARIES_DIR;
|
|
74
|
-
exports.TYPES_DIR = TYPES_DIR;
|
|
75
|
-
exports.UNMERGED_DICTIONARIES_DIR = UNMERGED_DICTIONARIES_DIR;
|
|
76
|
-
exports.WATCH = WATCH;
|
|
77
|
-
exports.content_exports = content_exports;
|
|
78
|
-
//# sourceMappingURL=content.cjs.map
|
package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.cjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/content.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/content.mjs\nvar content_exports = /* @__PURE__ */ __export({\n\tCACHE_DIR: () => CACHE_DIR,\n\tCONFIG_DIR: () => CONFIG_DIR,\n\tCONTENT_DIR: () => CONTENT_DIR,\n\tDICTIONARIES_DIR: () => DICTIONARIES_DIR,\n\tDYNAMIC_DICTIONARIES_DIR: () => DYNAMIC_DICTIONARIES_DIR,\n\tEXCLUDED_PATHS: () => EXCLUDED_PATHS,\n\tFETCH_DICTIONARIES_DIR: () => FETCH_DICTIONARIES_DIR,\n\tFILE_EXTENSIONS: () => FILE_EXTENSIONS,\n\tI18NEXT_DICTIONARIES_DIR: () => I18NEXT_DICTIONARIES_DIR,\n\tMAIN_DIR: () => MAIN_DIR,\n\tMASKS_DIR: () => MASKS_DIR,\n\tMODULE_AUGMENTATION_DIR: () => MODULE_AUGMENTATION_DIR,\n\tREACT_INTL_MESSAGES_DIR: () => REACT_INTL_MESSAGES_DIR,\n\tREMOTE_DICTIONARIES_DIR: () => REMOTE_DICTIONARIES_DIR,\n\tTYPES_DIR: () => TYPES_DIR,\n\tUNMERGED_DICTIONARIES_DIR: () => UNMERGED_DICTIONARIES_DIR,\n\tWATCH: () => WATCH\n});\nconst FILE_EXTENSIONS = [\n\t\".content.ts\",\n\t\".content.js\",\n\t\".content.cjs\",\n\t\".content.cjx\",\n\t\".content.mjs\",\n\t\".content.mjx\",\n\t\".content.json\",\n\t\".content.tsx\",\n\t\".content.jsx\"\n];\nconst EXCLUDED_PATHS = [\n\t\"**/node_modules/**\",\n\t\"**/dist/**\",\n\t\"**/build/**\",\n\t\"**/.intlayer/**\",\n\t\"**/.next/**\",\n\t\"**/.nuxt/**\",\n\t\"**/.expo/**\",\n\t\"**/.vercel/**\",\n\t\"**/.turbo/**\",\n\t\"**/.tanstack/**\"\n];\nconst CONTENT_DIR = [\".\"];\nconst MAIN_DIR = \".intlayer/main\";\nconst DICTIONARIES_DIR = \".intlayer/dictionary\";\nconst MASKS_DIR = \".intlayer/mask\";\nconst REMOTE_DICTIONARIES_DIR = \".intlayer/remote_dictionary\";\nconst UNMERGED_DICTIONARIES_DIR = \".intlayer/unmerged_dictionary\";\nconst DYNAMIC_DICTIONARIES_DIR = \".intlayer/dynamic_dictionary\";\nconst FETCH_DICTIONARIES_DIR = \".intlayer/fetch_dictionary\";\nconst TYPES_DIR = \".intlayer/types\";\nconst MODULE_AUGMENTATION_DIR = \".intlayer/types\";\nconst I18NEXT_DICTIONARIES_DIR = \"i18next_resources\";\nconst REACT_INTL_MESSAGES_DIR = \"intl_messages\";\nconst CONFIG_DIR = \".intlayer/config\";\nconst CACHE_DIR = \".intlayer/cache\";\nconst WATCH = true;\n\n//#endregion\nexport { CACHE_DIR, CONFIG_DIR, CONTENT_DIR, DICTIONARIES_DIR, DYNAMIC_DICTIONARIES_DIR, EXCLUDED_PATHS, FETCH_DICTIONARIES_DIR, FILE_EXTENSIONS, MAIN_DIR, MODULE_AUGMENTATION_DIR, REMOTE_DICTIONARIES_DIR, TYPES_DIR, UNMERGED_DICTIONARIES_DIR, WATCH, content_exports };\n//# sourceMappingURL=content.mjs.map"],"mappings":";;;AAGA,IAAI,kBAAkC,kDAAS;CAC9C,iBAAiB;CACjB,kBAAkB;CAClB,mBAAmB;CACnB,wBAAwB;CACxB,gCAAgC;CAChC,sBAAsB;CACtB,8BAA8B;CAC9B,uBAAuB;CACvB,gCAAgC;CAChC,gBAAgB;CAChB,iBAAiB;CACjB,+BAA+B;CAC/B,+BAA+B;CAC/B,+BAA+B;CAC/B,iBAAiB;CACjB,iCAAiC;CACjC,aAAa;CACb,CAAC;AACF,MAAM,kBAAkB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,iBAAiB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,MAAM,cAAc,CAAC,IAAI;AACzB,MAAM,WAAW;AACjB,MAAM,mBAAmB;AACzB,MAAM,YAAY;AAClB,MAAM,0BAA0B;AAChC,MAAM,4BAA4B;AAClC,MAAM,2BAA2B;AACjC,MAAM,yBAAyB;AAC/B,MAAM,YAAY;AAClB,MAAM,0BAA0B;AAChC,MAAM,2BAA2B;AACjC,MAAM,0BAA0B;AAChC,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,QAAQ"}
|
package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.cjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/dictionary.mjs"],"sourcesContent":["//#region ../config/dist/esm/defaultValues/dictionary.mjs\nconst FILL = true;\n\n//#endregion\nexport { FILL };\n//# sourceMappingURL=dictionary.mjs.map"],"mappings":";;AACA,MAAM,OAAO"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
|
|
3
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.mjs
|
|
4
|
-
var editor_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
5
|
-
APPLICATION_URL: () => APPLICATION_URL,
|
|
6
|
-
BACKEND_URL: () => BACKEND_URL,
|
|
7
|
-
CMS_URL: () => CMS_URL,
|
|
8
|
-
DICTIONARY_PRIORITY_STRATEGY: () => DICTIONARY_PRIORITY_STRATEGY,
|
|
9
|
-
EDITOR_URL: () => EDITOR_URL,
|
|
10
|
-
IS_ENABLED: () => IS_ENABLED,
|
|
11
|
-
LIVE_SYNC: () => LIVE_SYNC,
|
|
12
|
-
LIVE_SYNC_PORT: () => LIVE_SYNC_PORT,
|
|
13
|
-
PORT: () => PORT
|
|
14
|
-
});
|
|
15
|
-
const APPLICATION_URL = "";
|
|
16
|
-
const EDITOR_URL = "http://localhost:8000";
|
|
17
|
-
const CMS_URL = "https://intlayer.org";
|
|
18
|
-
const PORT = 8e3;
|
|
19
|
-
const BACKEND_URL = "https://back.intlayer.org";
|
|
20
|
-
const IS_ENABLED = true;
|
|
21
|
-
const LIVE_SYNC = true;
|
|
22
|
-
const DICTIONARY_PRIORITY_STRATEGY = "local_first";
|
|
23
|
-
const LIVE_SYNC_PORT = 4e3;
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
exports.APPLICATION_URL = APPLICATION_URL;
|
|
27
|
-
exports.BACKEND_URL = BACKEND_URL;
|
|
28
|
-
exports.CMS_URL = CMS_URL;
|
|
29
|
-
exports.DICTIONARY_PRIORITY_STRATEGY = DICTIONARY_PRIORITY_STRATEGY;
|
|
30
|
-
exports.EDITOR_URL = EDITOR_URL;
|
|
31
|
-
exports.IS_ENABLED = IS_ENABLED;
|
|
32
|
-
exports.LIVE_SYNC = LIVE_SYNC;
|
|
33
|
-
exports.LIVE_SYNC_PORT = LIVE_SYNC_PORT;
|
|
34
|
-
exports.PORT = PORT;
|
|
35
|
-
exports.editor_exports = editor_exports;
|
|
36
|
-
//# sourceMappingURL=editor.cjs.map
|
package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor.cjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/editor.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/editor.mjs\nvar editor_exports = /* @__PURE__ */ __export({\n\tAPPLICATION_URL: () => APPLICATION_URL,\n\tBACKEND_URL: () => BACKEND_URL,\n\tCMS_URL: () => CMS_URL,\n\tDICTIONARY_PRIORITY_STRATEGY: () => DICTIONARY_PRIORITY_STRATEGY,\n\tEDITOR_URL: () => EDITOR_URL,\n\tIS_ENABLED: () => IS_ENABLED,\n\tLIVE_SYNC: () => LIVE_SYNC,\n\tLIVE_SYNC_PORT: () => LIVE_SYNC_PORT,\n\tPORT: () => PORT\n});\nconst APPLICATION_URL = \"\";\nconst EDITOR_URL = \"http://localhost:8000\";\nconst CMS_URL = \"https://intlayer.org\";\nconst PORT = 8e3;\nconst BACKEND_URL = \"https://back.intlayer.org\";\nconst IS_ENABLED = true;\nconst LIVE_SYNC = true;\nconst DICTIONARY_PRIORITY_STRATEGY = \"local_first\";\nconst LIVE_SYNC_PORT = 4e3;\n\n//#endregion\nexport { APPLICATION_URL, BACKEND_URL, CMS_URL, DICTIONARY_PRIORITY_STRATEGY, EDITOR_URL, IS_ENABLED, LIVE_SYNC, LIVE_SYNC_PORT, PORT, editor_exports };\n//# sourceMappingURL=editor.mjs.map"],"mappings":";;;AAGA,IAAI,iBAAiC,kDAAS;CAC7C,uBAAuB;CACvB,mBAAmB;CACnB,eAAe;CACf,oCAAoC;CACpC,kBAAkB;CAClB,kBAAkB;CAClB,iBAAiB;CACjB,sBAAsB;CACtB,YAAY;CACZ,CAAC;AACF,MAAM,kBAAkB;AACxB,MAAM,aAAa;AACnB,MAAM,UAAU;AAChB,MAAM,OAAO;AACb,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,+BAA+B;AACrC,MAAM,iBAAiB"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_build = require('./build.cjs');
|
|
3
|
-
const require_content = require('./content.cjs');
|
|
4
|
-
const require_editor = require('./editor.cjs');
|
|
5
|
-
const require_internationalization = require('./internationalization.cjs');
|
|
6
|
-
const require_log = require('./log.cjs');
|
|
7
|
-
const require_routing = require('./routing.cjs');
|
|
8
|
-
|
|
9
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.mjs
|
|
10
|
-
var defaultValues_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
11
|
-
Build: () => require_build.build_exports,
|
|
12
|
-
Content: () => require_content.content_exports,
|
|
13
|
-
Editor: () => require_editor.editor_exports,
|
|
14
|
-
Internationalization: () => require_internationalization.internationalization_exports,
|
|
15
|
-
Log: () => require_log.log_exports,
|
|
16
|
-
Routing: () => require_routing.routing_exports
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
exports.defaultValues_exports = defaultValues_exports;
|
|
21
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["build_exports","content_exports","editor_exports","internationalization_exports","log_exports","routing_exports"],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/index.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\nimport { build_exports } from \"./build.mjs\";\nimport { content_exports } from \"./content.mjs\";\nimport { editor_exports } from \"./editor.mjs\";\nimport { internationalization_exports } from \"./internationalization.mjs\";\nimport { log_exports } from \"./log.mjs\";\nimport { routing_exports } from \"./routing.mjs\";\n\n//#region ../config/dist/esm/defaultValues/index.mjs\nvar defaultValues_exports = /* @__PURE__ */ __export({\n\tBuild: () => build_exports,\n\tContent: () => content_exports,\n\tEditor: () => editor_exports,\n\tInternationalization: () => internationalization_exports,\n\tLog: () => log_exports,\n\tRouting: () => routing_exports\n});\n\n//#endregion\nexport { defaultValues_exports };\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;AASA,IAAI,wBAAwC,kDAAS;CACpD,aAAaA;CACb,eAAeC;CACf,cAAcC;CACd,4BAA4BC;CAC5B,WAAWC;CACX,eAAeC;CACf,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_locales = require('../types/dist/esm/locales.cjs');
|
|
3
|
-
|
|
4
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.mjs
|
|
5
|
-
var internationalization_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
6
|
-
DEFAULT_LOCALE: () => DEFAULT_LOCALE,
|
|
7
|
-
LOCALES: () => LOCALES,
|
|
8
|
-
REQUIRED_LOCALES: () => REQUIRED_LOCALES,
|
|
9
|
-
STRICT_MODE: () => STRICT_MODE
|
|
10
|
-
});
|
|
11
|
-
const LOCALES = [require_locales.locales_exports.ENGLISH];
|
|
12
|
-
const REQUIRED_LOCALES = [];
|
|
13
|
-
const DEFAULT_LOCALE = require_locales.locales_exports.ENGLISH;
|
|
14
|
-
const STRICT_MODE = "inclusive";
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
|
|
18
|
-
exports.LOCALES = LOCALES;
|
|
19
|
-
exports.REQUIRED_LOCALES = REQUIRED_LOCALES;
|
|
20
|
-
exports.STRICT_MODE = STRICT_MODE;
|
|
21
|
-
exports.internationalization_exports = internationalization_exports;
|
|
22
|
-
//# sourceMappingURL=internationalization.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internationalization.cjs","names":["locales_exports"],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/internationalization.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\nimport { locales_exports } from \"../types/dist/esm/locales.mjs\";\n\n//#region ../config/dist/esm/defaultValues/internationalization.mjs\nvar internationalization_exports = /* @__PURE__ */ __export({\n\tDEFAULT_LOCALE: () => DEFAULT_LOCALE,\n\tLOCALES: () => LOCALES,\n\tREQUIRED_LOCALES: () => REQUIRED_LOCALES,\n\tSTRICT_MODE: () => STRICT_MODE\n});\nconst LOCALES = [locales_exports.ENGLISH];\nconst REQUIRED_LOCALES = [];\nconst DEFAULT_LOCALE = locales_exports.ENGLISH;\nconst STRICT_MODE = \"inclusive\";\n\n//#endregion\nexport { DEFAULT_LOCALE, LOCALES, REQUIRED_LOCALES, STRICT_MODE, internationalization_exports };\n//# sourceMappingURL=internationalization.mjs.map"],"mappings":";;;;AAIA,IAAI,+BAA+C,kDAAS;CAC3D,sBAAsB;CACtB,eAAe;CACf,wBAAwB;CACxB,mBAAmB;CACnB,CAAC;AACF,MAAM,UAAU,CAACA,gCAAgB,QAAQ;AACzC,MAAM,mBAAmB,EAAE;AAC3B,MAAM,iBAAiBA,gCAAgB;AACvC,MAAM,cAAc"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_logger = require('../logger.cjs');
|
|
3
|
-
|
|
4
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.mjs
|
|
5
|
-
var log_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
6
|
-
MODE: () => MODE,
|
|
7
|
-
PREFIX: () => PREFIX
|
|
8
|
-
});
|
|
9
|
-
const MODE = "default";
|
|
10
|
-
const PREFIX = `${require_logger.ANSIColors.GREY_DARK}[intlayer] ${require_logger.ANSIColors.RESET}`;
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
exports.MODE = MODE;
|
|
14
|
-
exports.PREFIX = PREFIX;
|
|
15
|
-
exports.log_exports = log_exports;
|
|
16
|
-
//# sourceMappingURL=log.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.cjs","names":["ANSIColors"],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/log.mjs"],"sourcesContent":["import { ANSIColors } from \"../logger.mjs\";\nimport { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/log.mjs\nvar log_exports = /* @__PURE__ */ __export({\n\tMODE: () => MODE,\n\tPREFIX: () => PREFIX\n});\nconst MODE = \"default\";\nconst PREFIX = `${ANSIColors.GREY_DARK}[intlayer] ${ANSIColors.RESET}`;\n\n//#endregion\nexport { MODE, PREFIX, log_exports };\n//# sourceMappingURL=log.mjs.map"],"mappings":";;;;AAIA,IAAI,cAA8B,kDAAS;CAC1C,YAAY;CACZ,cAAc;CACd,CAAC;AACF,MAAM,OAAO;AACb,MAAM,SAAS,GAAGA,0BAAW,UAAU,aAAaA,0BAAW"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
|
|
3
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.mjs
|
|
4
|
-
var routing_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
5
|
-
BASE_PATH: () => BASE_PATH,
|
|
6
|
-
COOKIE_NAME: () => COOKIE_NAME,
|
|
7
|
-
HEADER_NAME: () => HEADER_NAME,
|
|
8
|
-
LOCALE_STORAGE_NAME: () => LOCALE_STORAGE_NAME,
|
|
9
|
-
ROUTING_MODE: () => ROUTING_MODE,
|
|
10
|
-
SERVER_SET_COOKIE: () => SERVER_SET_COOKIE,
|
|
11
|
-
STORAGE: () => STORAGE
|
|
12
|
-
});
|
|
13
|
-
const HEADER_NAME = "x-intlayer-locale";
|
|
14
|
-
const COOKIE_NAME = "INTLAYER_LOCALE";
|
|
15
|
-
const LOCALE_STORAGE_NAME = "INTLAYER_LOCALE";
|
|
16
|
-
const BASE_PATH = "";
|
|
17
|
-
const SERVER_SET_COOKIE = "always";
|
|
18
|
-
const ROUTING_MODE = "prefix-no-default";
|
|
19
|
-
const STORAGE = ["cookie", "header"];
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
exports.BASE_PATH = BASE_PATH;
|
|
23
|
-
exports.ROUTING_MODE = ROUTING_MODE;
|
|
24
|
-
exports.STORAGE = STORAGE;
|
|
25
|
-
exports.routing_exports = routing_exports;
|
|
26
|
-
//# sourceMappingURL=routing.cjs.map
|
package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routing.cjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/defaultValues/routing.mjs"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.mjs\";\n\n//#region ../config/dist/esm/defaultValues/routing.mjs\nvar routing_exports = /* @__PURE__ */ __export({\n\tBASE_PATH: () => BASE_PATH,\n\tCOOKIE_NAME: () => COOKIE_NAME,\n\tHEADER_NAME: () => HEADER_NAME,\n\tLOCALE_STORAGE_NAME: () => LOCALE_STORAGE_NAME,\n\tROUTING_MODE: () => ROUTING_MODE,\n\tSERVER_SET_COOKIE: () => SERVER_SET_COOKIE,\n\tSTORAGE: () => STORAGE\n});\nconst HEADER_NAME = \"x-intlayer-locale\";\nconst COOKIE_NAME = \"INTLAYER_LOCALE\";\nconst LOCALE_STORAGE_NAME = \"INTLAYER_LOCALE\";\nconst BASE_PATH = \"\";\nconst SERVER_SET_COOKIE = \"always\";\nconst ROUTING_MODE = \"prefix-no-default\";\nconst STORAGE = [\"cookie\", \"header\"];\n\n//#endregion\nexport { BASE_PATH, ROUTING_MODE, STORAGE, routing_exports };\n//# sourceMappingURL=routing.mjs.map"],"mappings":";;;AAGA,IAAI,kBAAkC,kDAAS;CAC9C,iBAAiB;CACjB,mBAAmB;CACnB,mBAAmB;CACnB,2BAA2B;CAC3B,oBAAoB;CACpB,yBAAyB;CACzB,eAAe;CACf,CAAC;AACF,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,sBAAsB;AAC5B,MAAM,YAAY;AAClB,MAAM,oBAAoB;AAC1B,MAAM,eAAe;AACrB,MAAM,UAAU,CAAC,UAAU,SAAS"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let node_fs = require("node:fs");
|
|
3
|
-
let dotenv = require("dotenv");
|
|
4
|
-
dotenv = require_rolldown_runtime.__toESM(dotenv);
|
|
5
|
-
|
|
6
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.mjs
|
|
7
|
-
const DEFAULT_ENV = "development";
|
|
8
|
-
const loadEnvFile = (options) => {
|
|
9
|
-
const env = options?.env ?? DEFAULT_ENV;
|
|
10
|
-
const envFiles = options?.envFile ? [options.envFile] : [
|
|
11
|
-
`.env.${env}.local`,
|
|
12
|
-
`.env.${env}`,
|
|
13
|
-
".env.local",
|
|
14
|
-
".env"
|
|
15
|
-
];
|
|
16
|
-
const result = {};
|
|
17
|
-
dotenv.default.config({
|
|
18
|
-
path: envFiles,
|
|
19
|
-
processEnv: result
|
|
20
|
-
});
|
|
21
|
-
return result;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
exports.loadEnvFile = loadEnvFile;
|
|
26
|
-
//# sourceMappingURL=loadEnvFile.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loadEnvFile.cjs","names":[],"sources":["../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/loadEnvFile.mjs"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport dotenv from \"dotenv\";\n\n//#region ../config/dist/esm/loadEnvFile.mjs\nconst DEFAULT_ENV = \"development\";\nconst loadEnvFile = (options) => {\n\tconst env = options?.env ?? DEFAULT_ENV;\n\tconst envFiles = options?.envFile ? [options.envFile] : [\n\t\t`.env.${env}.local`,\n\t\t`.env.${env}`,\n\t\t\".env.local\",\n\t\t\".env\"\n\t];\n\tconst result = {};\n\tdotenv.config({\n\t\tpath: envFiles,\n\t\tprocessEnv: result\n\t});\n\treturn result;\n};\n\n//#endregion\nexport { loadEnvFile };\n//# sourceMappingURL=loadEnvFile.mjs.map"],"mappings":";;;;;;AAIA,MAAM,cAAc;AACpB,MAAM,eAAe,YAAY;CAChC,MAAM,MAAM,SAAS,OAAO;CAC5B,MAAM,WAAW,SAAS,UAAU,CAAC,QAAQ,QAAQ,GAAG;EACvD,QAAQ,IAAI;EACZ,QAAQ;EACR;EACA;EACA;CACD,MAAM,SAAS,EAAE;AACjB,gBAAO,OAAO;EACb,MAAM;EACN,YAAY;EACZ,CAAC;AACF,QAAO"}
|
package/dist/cjs/packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.cjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
let node_path = require("node:path");
|
|
2
|
-
let esbuild = require("esbuild");
|
|
3
|
-
let node_url = require("node:url");
|
|
4
|
-
|
|
5
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs
|
|
6
|
-
const getLoader = (extension) => {
|
|
7
|
-
switch (extension) {
|
|
8
|
-
case ".js": return "js";
|
|
9
|
-
case ".jsx": return "jsx";
|
|
10
|
-
case ".mjs": return "js";
|
|
11
|
-
case ".ts": return "ts";
|
|
12
|
-
case ".tsx": return "tsx";
|
|
13
|
-
case ".cjs": return "js";
|
|
14
|
-
case ".json": return "json";
|
|
15
|
-
case ".md": return "text";
|
|
16
|
-
case ".mdx": return "text";
|
|
17
|
-
default: return "js";
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
exports.getLoader = getLoader;
|
|
23
|
-
//# sourceMappingURL=bundleFile.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundleFile.cjs","names":[],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/bundleFile.mjs"],"sourcesContent":["import { dirname, extname } from \"node:path\";\nimport { buildSync } from \"esbuild\";\nimport { pathToFileURL } from \"node:url\";\n\n//#region ../config/dist/esm/loadExternalFile/bundleFile.mjs\nconst getLoader = (extension) => {\n\tswitch (extension) {\n\t\tcase \".js\": return \"js\";\n\t\tcase \".jsx\": return \"jsx\";\n\t\tcase \".mjs\": return \"js\";\n\t\tcase \".ts\": return \"ts\";\n\t\tcase \".tsx\": return \"tsx\";\n\t\tcase \".cjs\": return \"js\";\n\t\tcase \".json\": return \"json\";\n\t\tcase \".md\": return \"text\";\n\t\tcase \".mdx\": return \"text\";\n\t\tdefault: return \"js\";\n\t}\n};\n\n//#endregion\nexport { getLoader };\n//# sourceMappingURL=bundleFile.mjs.map"],"mappings":";;;;;AAKA,MAAM,aAAa,cAAc;AAChC,SAAQ,WAAR;EACC,KAAK,MAAO,QAAO;EACnB,KAAK,OAAQ,QAAO;EACpB,KAAK,OAAQ,QAAO;EACpB,KAAK,MAAO,QAAO;EACnB,KAAK,OAAQ,QAAO;EACpB,KAAK,OAAQ,QAAO;EACpB,KAAK,QAAS,QAAO;EACrB,KAAK,MAAO,QAAO;EACnB,KAAK,OAAQ,QAAO;EACpB,QAAS,QAAO"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_logger = require('../logger.cjs');
|
|
3
|
-
const require_ESMxCJSHelpers = require('../utils/ESMxCJSHelpers.cjs');
|
|
4
|
-
const require_parseFileContent = require('./parseFileContent.cjs');
|
|
5
|
-
const require_transpileTSToMJS = require('./transpileTSToMJS.cjs');
|
|
6
|
-
let node_path = require("node:path");
|
|
7
|
-
let node_fs_promises = require("node:fs/promises");
|
|
8
|
-
let node_fs = require("node:fs");
|
|
9
|
-
|
|
10
|
-
//#region ../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs
|
|
11
|
-
/**
|
|
12
|
-
* Load the content declaration from the given path
|
|
13
|
-
*
|
|
14
|
-
* Accepts JSON, JS, MJS and TS files as configuration
|
|
15
|
-
*/
|
|
16
|
-
const loadExternalFileSync = (filePath, options) => {
|
|
17
|
-
const fileExtension = (0, node_path.extname)(filePath);
|
|
18
|
-
const safeProjectRequire = options?.projectRequire ?? require_ESMxCJSHelpers.getProjectRequire();
|
|
19
|
-
try {
|
|
20
|
-
if (fileExtension === "json") {
|
|
21
|
-
delete safeProjectRequire.cache[safeProjectRequire.resolve(filePath)];
|
|
22
|
-
return safeProjectRequire(filePath);
|
|
23
|
-
}
|
|
24
|
-
const moduleResultString = require_transpileTSToMJS.transpileTSToMJSSync((0, node_fs.readFileSync)(filePath, "utf-8"), filePath);
|
|
25
|
-
if (!moduleResultString) {
|
|
26
|
-
require_logger.logger("File could not be loaded.", { level: "error" });
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const fileContent = require_parseFileContent.parseFileContent(moduleResultString, {
|
|
30
|
-
projectRequire: options?.projectRequire,
|
|
31
|
-
envVarOptions: options?.envVarOptions,
|
|
32
|
-
additionalEnvVars: options?.additionalEnvVars,
|
|
33
|
-
mocks: options?.mocks,
|
|
34
|
-
aliases: options?.aliases
|
|
35
|
-
});
|
|
36
|
-
if (typeof fileContent === "undefined") {
|
|
37
|
-
require_logger.logger(`File file could not be loaded. Path : ${filePath}`);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
return fileContent;
|
|
41
|
-
} catch (error) {
|
|
42
|
-
require_logger.logger([`Error: ${error.message} - `, JSON.stringify(error.stack, null, 2)], { level: "error" });
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
//#endregion
|
|
47
|
-
exports.loadExternalFileSync = loadExternalFileSync;
|
|
48
|
-
//# sourceMappingURL=loadExternalFile.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loadExternalFile.cjs","names":["getProjectRequire","transpileTSToMJSSync","parseFileContent"],"sources":["../../../../../../../../../../../../packages/@intlayer/core/dist/esm/config/dist/esm/loadExternalFile/loadExternalFile.mjs"],"sourcesContent":["import { logger } from \"../logger.mjs\";\nimport { getProjectRequire } from \"../utils/ESMxCJSHelpers.mjs\";\nimport { parseFileContent } from \"./parseFileContent.mjs\";\nimport { transpileTSToMJSSync } from \"./transpileTSToMJS.mjs\";\nimport { extname } from \"node:path\";\nimport \"node:fs/promises\";\nimport { readFileSync } from \"node:fs\";\n\n//#region ../config/dist/esm/loadExternalFile/loadExternalFile.mjs\n/**\n* Load the content declaration from the given path\n*\n* Accepts JSON, JS, MJS and TS files as configuration\n*/\nconst loadExternalFileSync = (filePath, options) => {\n\tconst fileExtension = extname(filePath);\n\tconst safeProjectRequire = options?.projectRequire ?? getProjectRequire();\n\ttry {\n\t\tif (fileExtension === \"json\") {\n\t\t\tdelete safeProjectRequire.cache[safeProjectRequire.resolve(filePath)];\n\t\t\treturn safeProjectRequire(filePath);\n\t\t}\n\t\tconst moduleResultString = transpileTSToMJSSync(readFileSync(filePath, \"utf-8\"), filePath);\n\t\tif (!moduleResultString) {\n\t\t\tlogger(\"File could not be loaded.\", { level: \"error\" });\n\t\t\treturn;\n\t\t}\n\t\tconst fileContent = parseFileContent(moduleResultString, {\n\t\t\tprojectRequire: options?.projectRequire,\n\t\t\tenvVarOptions: options?.envVarOptions,\n\t\t\tadditionalEnvVars: options?.additionalEnvVars,\n\t\t\tmocks: options?.mocks,\n\t\t\taliases: options?.aliases\n\t\t});\n\t\tif (typeof fileContent === \"undefined\") {\n\t\t\tlogger(`File file could not be loaded. Path : ${filePath}`);\n\t\t\treturn;\n\t\t}\n\t\treturn fileContent;\n\t} catch (error) {\n\t\tlogger([`Error: ${error.message} - `, JSON.stringify(error.stack, null, 2)], { level: \"error\" });\n\t}\n};\n\n//#endregion\nexport { loadExternalFileSync };\n//# sourceMappingURL=loadExternalFile.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,wBAAwB,UAAU,YAAY;CACnD,MAAM,uCAAwB,SAAS;CACvC,MAAM,qBAAqB,SAAS,kBAAkBA,0CAAmB;AACzE,KAAI;AACH,MAAI,kBAAkB,QAAQ;AAC7B,UAAO,mBAAmB,MAAM,mBAAmB,QAAQ,SAAS;AACpE,UAAO,mBAAmB,SAAS;;EAEpC,MAAM,qBAAqBC,wEAAkC,UAAU,QAAQ,EAAE,SAAS;AAC1F,MAAI,CAAC,oBAAoB;AACxB,yBAAO,6BAA6B,EAAE,OAAO,SAAS,CAAC;AACvD;;EAED,MAAM,cAAcC,0CAAiB,oBAAoB;GACxD,gBAAgB,SAAS;GACzB,eAAe,SAAS;GACxB,mBAAmB,SAAS;GAC5B,OAAO,SAAS;GAChB,SAAS,SAAS;GAClB,CAAC;AACF,MAAI,OAAO,gBAAgB,aAAa;AACvC,yBAAO,yCAAyC,WAAW;AAC3D;;AAED,SAAO;UACC,OAAO;AACf,wBAAO,CAAC,UAAU,MAAM,QAAQ,MAAM,KAAK,UAAU,MAAM,OAAO,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,SAAS,CAAC"}
|