@intlayer/config 8.9.6 → 8.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/built.browser.cjs.map +1 -1
- package/dist/cjs/built.cjs.map +1 -1
- package/dist/cjs/bundle/index.cjs +1 -1
- package/dist/cjs/bundle/index.cjs.map +1 -1
- package/dist/cjs/bundle/logBundle.cjs.map +1 -1
- package/dist/cjs/configFile/buildBrowserConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
- package/dist/cjs/configFile/configurationSchema.cjs.map +1 -1
- package/dist/cjs/configFile/getConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/loadConfigurationFile.cjs.map +1 -1
- package/dist/cjs/configFile/searchConfigurationFile.cjs.map +1 -1
- package/dist/cjs/defaultValues/build.cjs.map +1 -1
- package/dist/cjs/defaultValues/content.cjs.map +1 -1
- package/dist/cjs/defaultValues/internationalization.cjs.map +1 -1
- package/dist/cjs/defaultValues/routing.cjs.map +1 -1
- package/dist/cjs/envVars/envVars.cjs.map +1 -1
- package/dist/cjs/loadEnvFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/bundleFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/bundleJSFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/parseFileContent.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs.map +1 -1
- package/dist/cjs/logger.cjs +34 -0
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/cjs/utils/ESMxCJSHelpers.cjs.map +1 -1
- package/dist/cjs/utils/alias.cjs.map +1 -1
- package/dist/cjs/utils/cacheDisk.cjs.map +1 -1
- package/dist/cjs/utils/cacheMemory.cjs.map +1 -1
- package/dist/cjs/utils/clearModuleCache.cjs.map +1 -1
- package/dist/cjs/utils/compareVersions.cjs.map +1 -1
- package/dist/cjs/utils/extractErrorMessage.cjs.map +1 -1
- package/dist/cjs/utils/getExtension.cjs.map +1 -1
- package/dist/cjs/utils/getPackageJsonPath.cjs.map +1 -1
- package/dist/cjs/utils/getStorageAttributes.cjs.map +1 -1
- package/dist/cjs/utils/getUsedNodeTypes.cjs.map +1 -1
- package/dist/cjs/utils/logStack.cjs.map +1 -1
- package/dist/cjs/utils/normalizePath.cjs.map +1 -1
- package/dist/cjs/utils/parseFilePathPattern.cjs.map +1 -1
- package/dist/cjs/utils/pathSecurity.cjs.map +1 -1
- package/dist/cjs/utils/retryManager.cjs.map +1 -1
- package/dist/cjs/utils/setIntlayerIdentifier.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/camelCaseToKebabCase.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/camelCaseToSentence.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/kebabCaseToCamelCase.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/toLowerCamelCase.cjs.map +1 -1
- package/dist/esm/built.browser.mjs.map +1 -1
- package/dist/esm/built.mjs.map +1 -1
- package/dist/esm/bundle/index.mjs +1 -1
- package/dist/esm/bundle/index.mjs.map +1 -1
- package/dist/esm/bundle/logBundle.mjs.map +1 -1
- package/dist/esm/configFile/buildBrowserConfiguration.mjs.map +1 -1
- package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
- package/dist/esm/configFile/configurationSchema.mjs.map +1 -1
- package/dist/esm/configFile/getConfiguration.mjs.map +1 -1
- package/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -1
- package/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -1
- package/dist/esm/defaultValues/build.mjs.map +1 -1
- package/dist/esm/defaultValues/content.mjs.map +1 -1
- package/dist/esm/defaultValues/internationalization.mjs.map +1 -1
- package/dist/esm/defaultValues/routing.mjs.map +1 -1
- package/dist/esm/envVars/envVars.mjs.map +1 -1
- package/dist/esm/loadEnvFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/bundleJSFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -1
- package/dist/esm/loadExternalFile/transpileTSToCJS.mjs.map +1 -1
- package/dist/esm/logger.mjs +35 -2
- package/dist/esm/logger.mjs.map +1 -1
- package/dist/esm/utils/ESMxCJSHelpers.mjs.map +1 -1
- package/dist/esm/utils/alias.mjs.map +1 -1
- package/dist/esm/utils/cacheDisk.mjs.map +1 -1
- package/dist/esm/utils/cacheMemory.mjs.map +1 -1
- package/dist/esm/utils/clearModuleCache.mjs.map +1 -1
- package/dist/esm/utils/compareVersions.mjs.map +1 -1
- package/dist/esm/utils/extractErrorMessage.mjs.map +1 -1
- package/dist/esm/utils/getExtension.mjs.map +1 -1
- package/dist/esm/utils/getPackageJsonPath.mjs.map +1 -1
- package/dist/esm/utils/getStorageAttributes.mjs.map +1 -1
- package/dist/esm/utils/getUsedNodeTypes.mjs.map +1 -1
- package/dist/esm/utils/logStack.mjs.map +1 -1
- package/dist/esm/utils/normalizePath.mjs.map +1 -1
- package/dist/esm/utils/parseFilePathPattern.mjs.map +1 -1
- package/dist/esm/utils/pathSecurity.mjs.map +1 -1
- package/dist/esm/utils/retryManager.mjs.map +1 -1
- package/dist/esm/utils/setIntlayerIdentifier.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/camelCaseToKebabCase.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/camelCaseToSentence.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/kebabCaseToCamelCase.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/toLowerCamelCase.mjs.map +1 -1
- package/dist/types/built.browser.d.ts +12 -14
- package/dist/types/built.browser.d.ts.map +1 -1
- package/dist/types/built.d.ts +12 -14
- package/dist/types/built.d.ts.map +1 -1
- package/dist/types/bundle/index.d.ts +1 -2
- package/dist/types/bundle/index.d.ts.map +1 -1
- package/dist/types/bundle/logBundle.d.ts.map +1 -1
- package/dist/types/configFile/buildBrowserConfiguration.d.ts.map +1 -1
- package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
- package/dist/types/configFile/configurationSchema.d.ts +9 -9
- package/dist/types/configFile/getConfiguration.d.ts.map +1 -1
- package/dist/types/configFile/index.d.ts +1 -1
- package/dist/types/configFile/searchConfigurationFile.d.ts.map +1 -1
- package/dist/types/defaultValues/dictionary.d.ts.map +1 -1
- package/dist/types/defaultValues/internationalization.d.ts.map +1 -1
- package/dist/types/defaultValues/routing.d.ts.map +1 -1
- package/dist/types/envVars/envVars.d.ts.map +1 -1
- package/dist/types/loadEnvFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/bundleFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/bundleJSFile.d.ts +12 -13
- package/dist/types/loadExternalFile/bundleJSFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/loadExternalFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/parseFileContent.d.ts.map +1 -1
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts +1 -2
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts.map +1 -1
- package/dist/types/logger.d.ts +2 -1
- package/dist/types/logger.d.ts.map +1 -1
- package/dist/types/node.d.ts +1 -1
- package/dist/types/utils/ESMxCJSHelpers.d.ts.map +1 -1
- package/dist/types/utils/alias.d.ts.map +1 -1
- package/dist/types/utils/cacheDisk.d.ts.map +1 -1
- package/dist/types/utils/cacheMemory.d.ts.map +1 -1
- package/dist/types/utils/extractErrorMessage.d.ts.map +1 -1
- package/dist/types/utils/getExtension.d.ts.map +1 -1
- package/dist/types/utils/getPackageJsonPath.d.ts.map +1 -1
- package/dist/types/utils/getStorageAttributes.d.ts.map +1 -1
- package/dist/types/utils/getUsedNodeTypes.d.ts.map +1 -1
- package/dist/types/utils/normalizePath.d.ts.map +1 -1
- package/dist/types/utils/parseFilePathPattern.d.ts.map +1 -1
- package/dist/types/utils/pathSecurity.d.ts.map +1 -1
- package/dist/types/utils/retryManager.d.ts.map +1 -1
- package/dist/types/utils/setIntlayerIdentifier.d.ts.map +1 -1
- package/dist/types/utils/stringFormatter/camelCaseToKebabCase.d.ts.map +1 -1
- package/dist/types/utils/stringFormatter/camelCaseToSentence.d.ts.map +1 -1
- package/dist/types/utils/stringFormatter/kebabCaseToCamelCase.d.ts.map +1 -1
- package/dist/types/utils/stringFormatter/toLowerCamelCase.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clearModuleCache.mjs","names":[],"sources":["../../../src/utils/clearModuleCache.ts"],"sourcesContent":["import { configESMxCJSRequire } from './ESMxCJSHelpers';\n\n/**\n * Recursively clears the require cache for a module and all its dependencies\n */\nexport const clearModuleCache = (\n modulePath: string,\n visited = new Set<string>()\n) => {\n // Avoid infinite loops\n if (visited.has(modulePath)) {\n return;\n }\n visited.add(modulePath);\n\n try {\n const resolvedPath = configESMxCJSRequire.resolve(modulePath);\n\n // Get the cached module\n const cachedModule = configESMxCJSRequire.cache[resolvedPath];\n\n if (cachedModule) {\n // Clear cache for all children (dependencies) first\n if (cachedModule.children) {\n cachedModule.children.forEach((child) => {\n clearModuleCache(child.filename, visited);\n });\n }\n\n // Clear the cache for this module\n delete configESMxCJSRequire.cache[resolvedPath];\n }\n } catch (error) {\n // Module might not exist or be resolvable, skip it\n console.warn(`Could not clear cache for module: ${modulePath}`, error);\n }\n};\n"],"mappings":";;;;;;AAKA,MAAa,oBACX,YACA,0BAAU,IAAI,
|
|
1
|
+
{"version":3,"file":"clearModuleCache.mjs","names":[],"sources":["../../../src/utils/clearModuleCache.ts"],"sourcesContent":["import { configESMxCJSRequire } from './ESMxCJSHelpers';\n\n/**\n * Recursively clears the require cache for a module and all its dependencies\n */\nexport const clearModuleCache = (\n modulePath: string,\n visited = new Set<string>()\n) => {\n // Avoid infinite loops\n if (visited.has(modulePath)) {\n return;\n }\n visited.add(modulePath);\n\n try {\n const resolvedPath = configESMxCJSRequire.resolve(modulePath);\n\n // Get the cached module\n const cachedModule = configESMxCJSRequire.cache[resolvedPath];\n\n if (cachedModule) {\n // Clear cache for all children (dependencies) first\n if (cachedModule.children) {\n cachedModule.children.forEach((child) => {\n clearModuleCache(child.filename, visited);\n });\n }\n\n // Clear the cache for this module\n delete configESMxCJSRequire.cache[resolvedPath];\n }\n } catch (error) {\n // Module might not exist or be resolvable, skip it\n console.warn(`Could not clear cache for module: ${modulePath}`, error);\n }\n};\n"],"mappings":";;;;;;AAKA,MAAa,oBACX,YACA,0BAAU,IAAI,IAAY,MACvB;CAEH,IAAI,QAAQ,IAAI,UAAU,GACxB;CAEF,QAAQ,IAAI,UAAU;CAEtB,IAAI;EACF,MAAM,eAAe,qBAAqB,QAAQ,UAAU;EAG5D,MAAM,eAAe,qBAAqB,MAAM;EAEhD,IAAI,cAAc;GAEhB,IAAI,aAAa,UACf,aAAa,SAAS,SAAS,UAAU;IACvC,iBAAiB,MAAM,UAAU,OAAO;GAC1C,CAAC;GAIH,OAAO,qBAAqB,MAAM;EACpC;CACF,SAAS,OAAO;EAEd,QAAQ,KAAK,qCAAqC,cAAc,KAAK;CACvE;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareVersions.mjs","names":[],"sources":["../../../src/utils/compareVersions.ts"],"sourcesContent":["/**\n * Compare two semver-like version strings (e.g. \"15.10.4\" vs \"15.3.5\").\n *\n * @param version1 - first version string\n * @param version2 - second version string\n * @param comparison - type of comparison: 'gt', 'lt', 'eq', 'gte', 'lte'\n * @returns boolean indicating if version1 meets the specified comparison condition vs version2\n */\nexport const compareVersions = (\n version1: string,\n comparison: '>' | '<' | '=' | '≥' | '≤',\n version2: string\n): boolean => {\n const v1Parts = version1.split('.').map(Number);\n const v2Parts = version2.split('.').map(Number);\n const maxLen = Math.max(v1Parts.length, v2Parts.length);\n\n // Compute a basic -1, 0, or 1 comparison\n let result = 0;\n for (let i = 0; i < maxLen; i++) {\n const part1 = v1Parts[i] || 0;\n const part2 = v2Parts[i] || 0;\n if (part1 > part2) {\n result = 1;\n break;\n } else if (part1 < part2) {\n result = -1;\n break;\n }\n }\n\n switch (comparison) {\n case '>':\n return result === 1;\n case '<':\n return result === -1;\n case '=':\n return result === 0;\n case '≥':\n return result === 0 || result === 1;\n case '≤':\n return result === 0 || result === -1;\n }\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,mBACX,UACA,YACA,aACY;CACZ,MAAM,UAAU,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"compareVersions.mjs","names":[],"sources":["../../../src/utils/compareVersions.ts"],"sourcesContent":["/**\n * Compare two semver-like version strings (e.g. \"15.10.4\" vs \"15.3.5\").\n *\n * @param version1 - first version string\n * @param version2 - second version string\n * @param comparison - type of comparison: 'gt', 'lt', 'eq', 'gte', 'lte'\n * @returns boolean indicating if version1 meets the specified comparison condition vs version2\n */\nexport const compareVersions = (\n version1: string,\n comparison: '>' | '<' | '=' | '≥' | '≤',\n version2: string\n): boolean => {\n const v1Parts = version1.split('.').map(Number);\n const v2Parts = version2.split('.').map(Number);\n const maxLen = Math.max(v1Parts.length, v2Parts.length);\n\n // Compute a basic -1, 0, or 1 comparison\n let result = 0;\n for (let i = 0; i < maxLen; i++) {\n const part1 = v1Parts[i] || 0;\n const part2 = v2Parts[i] || 0;\n if (part1 > part2) {\n result = 1;\n break;\n } else if (part1 < part2) {\n result = -1;\n break;\n }\n }\n\n switch (comparison) {\n case '>':\n return result === 1;\n case '<':\n return result === -1;\n case '=':\n return result === 0;\n case '≥':\n return result === 0 || result === 1;\n case '≤':\n return result === 0 || result === -1;\n }\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,mBACX,UACA,YACA,aACY;CACZ,MAAM,UAAU,SAAS,MAAM,GAAG,EAAE,IAAI,MAAM;CAC9C,MAAM,UAAU,SAAS,MAAM,GAAG,EAAE,IAAI,MAAM;CAC9C,MAAM,SAAS,KAAK,IAAI,QAAQ,QAAQ,QAAQ,MAAM;CAGtD,IAAI,SAAS;CACb,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,KAAK;EAC/B,MAAM,QAAQ,QAAQ,MAAM;EAC5B,MAAM,QAAQ,QAAQ,MAAM;EAC5B,IAAI,QAAQ,OAAO;GACjB,SAAS;GACT;EACF,OAAO,IAAI,QAAQ,OAAO;GACxB,SAAS;GACT;EACF;CACF;CAEA,QAAQ,YAAR;EACE,KAAK,KACH,OAAO,WAAW;EACpB,KAAK,KACH,OAAO,WAAW;EACpB,KAAK,KACH,OAAO,WAAW;EACpB,KAAK,KACH,OAAO,WAAW,KAAK,WAAW;EACpC,KAAK,KACH,OAAO,WAAW,KAAK,WAAW;CACtC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractErrorMessage.mjs","names":[],"sources":["../../../src/utils/extractErrorMessage.ts"],"sourcesContent":["export const extractErrorMessage = (error: unknown): string => {\n const trimToSingleLine = (text: string): string =>\n text\n .split(/\\r?\\n/)\n .map((stringValue) => stringValue.trim())\n .filter(Boolean)[0] ?? text.trim();\n\n const looksLikeJson = (value: string): boolean => {\n const stringValue = value.trim();\n\n if (!stringValue) return false;\n const first = stringValue[0];\n return first === '{' || first === '[' || first === '\"';\n };\n\n const sanitizeUnexpectedTokenMessage = (text: string): string => {\n // If the text mentions an invalid JSON parse, try to extract the meaningful part\n const t = text.trim();\n\n if (/Unexpected token/i.test(t) && /not valid JSON/i.test(t)) {\n const quoted = t.match(/\"([^\"]+)\"/);\n\n if (quoted?.[1]) return quoted[1];\n // Fallback: drop the leading parser error description\n const afterColon = t.split(':').slice(1).join(':').trim();\n\n if (afterColon) return afterColon;\n }\n return t;\n };\n\n const pickFieldsFromObject = (\n value: unknown,\n seen: Set<unknown>\n ): string | undefined => {\n if (!value || typeof value !== 'object') return undefined;\n\n if (seen.has(value)) return undefined;\n\n seen.add(value);\n\n // If the value itself is an array (e.g. ZodError.issues), iterate its items\n\n if (Array.isArray(value)) {\n for (const item of value) {\n const fromItem = pickFieldsFromObject(item, seen);\n\n if (fromItem) return fromItem;\n\n if (typeof (item as any)?.message === 'string')\n return (item as any).message;\n }\n return undefined;\n }\n\n const obj = value as Record<string, unknown>;\n\n // Check for message first (highest priority)\n\n if (typeof obj.message === 'string' && obj.message.trim()) {\n return obj.message;\n }\n\n // Check for error_description\n\n if (\n typeof obj.error_description === 'string' &&\n obj.error_description.trim()\n ) {\n return obj.error_description;\n }\n\n // Check for error\n\n if (typeof obj.error === 'string' && obj.error.trim()) {\n return obj.error;\n }\n\n // Handle title and code combination\n const title = typeof obj.title === 'string' ? obj.title.trim() : '';\n const code = typeof obj.code === 'string' ? obj.code.trim() : '';\n\n if (title && code) {\n return `${title} (${code})`;\n }\n\n if (title) {\n return title;\n }\n\n if (code) {\n return code;\n }\n\n // Check for statusText\n\n if (typeof obj.statusText === 'string' && obj.statusText.trim()) {\n return obj.statusText;\n }\n\n // Common nested structures (Axios/Fetch-like)\n const response = obj.response as Record<string, unknown> | undefined;\n\n if (response && typeof response === 'object') {\n const data = response.data as unknown;\n const fromData = pickFieldsFromObject(data, seen);\n\n if (fromData) return fromData;\n }\n\n const data = obj.data as unknown;\n const fromData = pickFieldsFromObject(data, seen);\n\n if (fromData) return fromData;\n\n // Nested cause chain\n const cause = (obj as { cause?: unknown }).cause;\n const fromCause =\n pickFieldsFromObject(cause, seen) ??\n (typeof (cause as any)?.message === 'string'\n ? (cause as any).message\n : undefined);\n\n if (fromCause) return fromCause;\n\n // Arrays of errors\n const errors = obj.errors as unknown;\n\n if (Array.isArray(errors)) {\n for (const item of errors) {\n const fromItem = pickFieldsFromObject(item, seen);\n\n if (fromItem) return fromItem;\n\n if (typeof (item as any)?.message === 'string')\n return (item as any).message;\n }\n }\n\n return undefined;\n };\n\n const tryParseJsonString = (maybeJson: string): string | undefined => {\n if (!looksLikeJson(maybeJson)) return undefined;\n try {\n const parsed = JSON.parse(maybeJson);\n const picked = pickFieldsFromObject(parsed, new Set());\n\n if (picked) return picked;\n\n if (typeof parsed === 'string') return parsed;\n return undefined;\n } catch {\n return undefined;\n }\n };\n\n if (typeof error === 'string') {\n const cleaned = sanitizeUnexpectedTokenMessage(error);\n return tryParseJsonString(cleaned) ?? trimToSingleLine(cleaned);\n }\n\n if (error && typeof error === 'object') {\n // Native Error instance\n\n if (error instanceof Error) {\n const cleaned = sanitizeUnexpectedTokenMessage(error.message);\n const fromMessage = tryParseJsonString(cleaned);\n\n if (fromMessage) return trimToSingleLine(fromMessage);\n // Dive into cause when present\n const fromCause = extractErrorMessage(error.cause as unknown);\n\n if (fromCause && fromCause !== 'An unknown error occurred')\n return trimToSingleLine(fromCause);\n return trimToSingleLine(cleaned);\n }\n\n // Generic object\n const seen = new Set<unknown>();\n const fromObject = pickFieldsFromObject(error, seen);\n\n if (fromObject) {\n const cleaned = sanitizeUnexpectedTokenMessage(fromObject);\n return tryParseJsonString(cleaned) ?? trimToSingleLine(cleaned);\n }\n\n try {\n const serialized = JSON.stringify(error);\n return trimToSingleLine(serialized);\n } catch {\n return trimToSingleLine(String(error));\n }\n }\n\n return 'An unknown error occurred';\n};\n"],"mappings":";AAAA,MAAa,uBAAuB,UAA2B;CAC7D,MAAM,oBAAoB,SACxB,KACG,MAAM,
|
|
1
|
+
{"version":3,"file":"extractErrorMessage.mjs","names":[],"sources":["../../../src/utils/extractErrorMessage.ts"],"sourcesContent":["export const extractErrorMessage = (error: unknown): string => {\n const trimToSingleLine = (text: string): string =>\n text\n .split(/\\r?\\n/)\n .map((stringValue) => stringValue.trim())\n .filter(Boolean)[0] ?? text.trim();\n\n const looksLikeJson = (value: string): boolean => {\n const stringValue = value.trim();\n\n if (!stringValue) return false;\n const first = stringValue[0];\n return first === '{' || first === '[' || first === '\"';\n };\n\n const sanitizeUnexpectedTokenMessage = (text: string): string => {\n // If the text mentions an invalid JSON parse, try to extract the meaningful part\n const t = text.trim();\n\n if (/Unexpected token/i.test(t) && /not valid JSON/i.test(t)) {\n const quoted = t.match(/\"([^\"]+)\"/);\n\n if (quoted?.[1]) return quoted[1];\n // Fallback: drop the leading parser error description\n const afterColon = t.split(':').slice(1).join(':').trim();\n\n if (afterColon) return afterColon;\n }\n return t;\n };\n\n const pickFieldsFromObject = (\n value: unknown,\n seen: Set<unknown>\n ): string | undefined => {\n if (!value || typeof value !== 'object') return undefined;\n\n if (seen.has(value)) return undefined;\n\n seen.add(value);\n\n // If the value itself is an array (e.g. ZodError.issues), iterate its items\n\n if (Array.isArray(value)) {\n for (const item of value) {\n const fromItem = pickFieldsFromObject(item, seen);\n\n if (fromItem) return fromItem;\n\n if (typeof (item as any)?.message === 'string')\n return (item as any).message;\n }\n return undefined;\n }\n\n const obj = value as Record<string, unknown>;\n\n // Check for message first (highest priority)\n\n if (typeof obj.message === 'string' && obj.message.trim()) {\n return obj.message;\n }\n\n // Check for error_description\n\n if (\n typeof obj.error_description === 'string' &&\n obj.error_description.trim()\n ) {\n return obj.error_description;\n }\n\n // Check for error\n\n if (typeof obj.error === 'string' && obj.error.trim()) {\n return obj.error;\n }\n\n // Handle title and code combination\n const title = typeof obj.title === 'string' ? obj.title.trim() : '';\n const code = typeof obj.code === 'string' ? obj.code.trim() : '';\n\n if (title && code) {\n return `${title} (${code})`;\n }\n\n if (title) {\n return title;\n }\n\n if (code) {\n return code;\n }\n\n // Check for statusText\n\n if (typeof obj.statusText === 'string' && obj.statusText.trim()) {\n return obj.statusText;\n }\n\n // Common nested structures (Axios/Fetch-like)\n const response = obj.response as Record<string, unknown> | undefined;\n\n if (response && typeof response === 'object') {\n const data = response.data as unknown;\n const fromData = pickFieldsFromObject(data, seen);\n\n if (fromData) return fromData;\n }\n\n const data = obj.data as unknown;\n const fromData = pickFieldsFromObject(data, seen);\n\n if (fromData) return fromData;\n\n // Nested cause chain\n const cause = (obj as { cause?: unknown }).cause;\n const fromCause =\n pickFieldsFromObject(cause, seen) ??\n (typeof (cause as any)?.message === 'string'\n ? (cause as any).message\n : undefined);\n\n if (fromCause) return fromCause;\n\n // Arrays of errors\n const errors = obj.errors as unknown;\n\n if (Array.isArray(errors)) {\n for (const item of errors) {\n const fromItem = pickFieldsFromObject(item, seen);\n\n if (fromItem) return fromItem;\n\n if (typeof (item as any)?.message === 'string')\n return (item as any).message;\n }\n }\n\n return undefined;\n };\n\n const tryParseJsonString = (maybeJson: string): string | undefined => {\n if (!looksLikeJson(maybeJson)) return undefined;\n try {\n const parsed = JSON.parse(maybeJson);\n const picked = pickFieldsFromObject(parsed, new Set());\n\n if (picked) return picked;\n\n if (typeof parsed === 'string') return parsed;\n return undefined;\n } catch {\n return undefined;\n }\n };\n\n if (typeof error === 'string') {\n const cleaned = sanitizeUnexpectedTokenMessage(error);\n return tryParseJsonString(cleaned) ?? trimToSingleLine(cleaned);\n }\n\n if (error && typeof error === 'object') {\n // Native Error instance\n\n if (error instanceof Error) {\n const cleaned = sanitizeUnexpectedTokenMessage(error.message);\n const fromMessage = tryParseJsonString(cleaned);\n\n if (fromMessage) return trimToSingleLine(fromMessage);\n // Dive into cause when present\n const fromCause = extractErrorMessage(error.cause as unknown);\n\n if (fromCause && fromCause !== 'An unknown error occurred')\n return trimToSingleLine(fromCause);\n return trimToSingleLine(cleaned);\n }\n\n // Generic object\n const seen = new Set<unknown>();\n const fromObject = pickFieldsFromObject(error, seen);\n\n if (fromObject) {\n const cleaned = sanitizeUnexpectedTokenMessage(fromObject);\n return tryParseJsonString(cleaned) ?? trimToSingleLine(cleaned);\n }\n\n try {\n const serialized = JSON.stringify(error);\n return trimToSingleLine(serialized);\n } catch {\n return trimToSingleLine(String(error));\n }\n }\n\n return 'An unknown error occurred';\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExtension.mjs","names":[],"sources":["../../../src/utils/getExtension.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/types/config';\n\nexport const getExtension = (\n configuration: IntlayerConfig,\n format?: 'esm' | 'cjs' | undefined\n) => {\n const outputFormats = configuration.build.outputFormat;\n\n if (format === 'cjs') return 'cjs';\n if (format === 'esm') return 'mjs';\n\n if (outputFormats.includes('cjs')) return 'cjs';\n if (outputFormats.includes('esm')) return 'mjs';\n\n return 'cjs';\n};\n"],"mappings":";AAEA,MAAa,gBACX,eACA,WACG;CACH,MAAM,gBAAgB,cAAc,MAAM;CAE1C,IAAI,WAAW,OAAO,OAAO;CAC7B,IAAI,WAAW,OAAO,OAAO;CAE7B,IAAI,cAAc,SAAS,
|
|
1
|
+
{"version":3,"file":"getExtension.mjs","names":[],"sources":["../../../src/utils/getExtension.ts"],"sourcesContent":["import type { IntlayerConfig } from '@intlayer/types/config';\n\nexport const getExtension = (\n configuration: IntlayerConfig,\n format?: 'esm' | 'cjs' | undefined\n) => {\n const outputFormats = configuration.build.outputFormat;\n\n if (format === 'cjs') return 'cjs';\n if (format === 'esm') return 'mjs';\n\n if (outputFormats.includes('cjs')) return 'cjs';\n if (outputFormats.includes('esm')) return 'mjs';\n\n return 'cjs';\n};\n"],"mappings":";AAEA,MAAa,gBACX,eACA,WACG;CACH,MAAM,gBAAgB,cAAc,MAAM;CAE1C,IAAI,WAAW,OAAO,OAAO;CAC7B,IAAI,WAAW,OAAO,OAAO;CAE7B,IAAI,cAAc,SAAS,KAAK,GAAG,OAAO;CAC1C,IAAI,cAAc,SAAS,KAAK,GAAG,OAAO;CAE1C,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPackageJsonPath.mjs","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { cacheMemory } from './cacheMemory';\n\nconst MAX_LEVELS = 15;\n\ntype PackageJsonPathCache = {\n packageJsonPath: string;\n baseDir: string;\n};\n\nexport const getPackageJsonPath = (\n startDir: string = process.cwd()\n): PackageJsonPathCache => {\n const checkedCache = cacheMemory.get<PackageJsonPathCache>(\n 'packageJsonPath',\n startDir\n );\n\n if (checkedCache) return checkedCache;\n\n let currentDir = startDir;\n\n for (let level = 0; level < MAX_LEVELS; level++) {\n const packageJsonPath = join(currentDir, 'package.json');\n\n if (existsSync(packageJsonPath)) {\n cacheMemory.set('packageJsonPath', startDir, {\n packageJsonPath,\n baseDir: currentDir,\n });\n\n return { packageJsonPath, baseDir: currentDir };\n }\n\n const parentDir = dirname(currentDir);\n\n // If we've reached the root directory, stop\n if (parentDir === currentDir) {\n break;\n }\n\n currentDir = parentDir;\n }\n\n throw new Error(\n `Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`\n );\n};\n"],"mappings":";;;;;AAIA,MAAM,aAAa;AAOnB,MAAa,sBACX,WAAmB,QAAQ,
|
|
1
|
+
{"version":3,"file":"getPackageJsonPath.mjs","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { cacheMemory } from './cacheMemory';\n\nconst MAX_LEVELS = 15;\n\ntype PackageJsonPathCache = {\n packageJsonPath: string;\n baseDir: string;\n};\n\nexport const getPackageJsonPath = (\n startDir: string = process.cwd()\n): PackageJsonPathCache => {\n const checkedCache = cacheMemory.get<PackageJsonPathCache>(\n 'packageJsonPath',\n startDir\n );\n\n if (checkedCache) return checkedCache;\n\n let currentDir = startDir;\n\n for (let level = 0; level < MAX_LEVELS; level++) {\n const packageJsonPath = join(currentDir, 'package.json');\n\n if (existsSync(packageJsonPath)) {\n cacheMemory.set('packageJsonPath', startDir, {\n packageJsonPath,\n baseDir: currentDir,\n });\n\n return { packageJsonPath, baseDir: currentDir };\n }\n\n const parentDir = dirname(currentDir);\n\n // If we've reached the root directory, stop\n if (parentDir === currentDir) {\n break;\n }\n\n currentDir = parentDir;\n }\n\n throw new Error(\n `Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`\n );\n};\n"],"mappings":";;;;;AAIA,MAAM,aAAa;AAOnB,MAAa,sBACX,WAAmB,QAAQ,IAAI,MACN;CACzB,MAAM,eAAe,YAAY,IAC/B,mBACA,QACF;CAEA,IAAI,cAAc,OAAO;CAEzB,IAAI,aAAa;CAEjB,KAAK,IAAI,QAAQ,GAAG,QAAQ,YAAY,SAAS;EAC/C,MAAM,kBAAkB,KAAK,YAAY,cAAc;EAEvD,IAAI,WAAW,eAAe,GAAG;GAC/B,YAAY,IAAI,mBAAmB,UAAU;IAC3C;IACA,SAAS;GACX,CAAC;GAED,OAAO;IAAE;IAAiB,SAAS;GAAW;EAChD;EAEA,MAAM,YAAY,QAAQ,UAAU;EAGpC,IAAI,cAAc,YAChB;EAGF,aAAa;CACf;CAEA,MAAM,IAAI,MACR,kEAAkE,WAAW,sCAAsC,UACrH;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStorageAttributes.mjs","names":[],"sources":["../../../src/utils/getStorageAttributes.ts"],"sourcesContent":["import type {\n CookiesAttributes,\n ProcessedStorageAttributes,\n RoutingStorageInput,\n StorageAttributes,\n} from '@intlayer/types/config';\nimport {\n COOKIE_NAME,\n HEADER_NAME,\n LOCALE_STORAGE_NAME,\n} from '../defaultValues/routing';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ntype CookieEntry = {\n name: string;\n attributes: Omit<CookiesAttributes, 'type' | 'name'>;\n};\n\ntype WebStorageEntry = {\n name: string;\n};\n\ntype HeaderEntry = {\n name: string;\n};\n\ntype StorageEntry =\n | 'cookie'\n | 'localStorage'\n | 'sessionStorage'\n | 'header'\n | CookiesAttributes\n | StorageAttributes;\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\nconst createCookieEntry = (\n options?: Partial<CookiesAttributes>\n): CookieEntry => {\n const { name, path, expires, domain, secure, sameSite, httpOnly } =\n options ?? {};\n return {\n name: name ?? COOKIE_NAME,\n attributes: { path, expires, domain, secure, sameSite, httpOnly },\n };\n};\n\nconst createWebStorageEntry = (\n options?: Partial<StorageAttributes>\n): WebStorageEntry => ({\n name: options?.name ?? LOCALE_STORAGE_NAME,\n});\n\nconst createHeaderEntry = (\n options?: Partial<StorageAttributes>\n): HeaderEntry => ({\n name: options?.name ?? HEADER_NAME,\n});\n\nconst isCookieEntry = (entry: unknown): boolean => {\n if (typeof entry !== 'object' || entry === null) return false;\n const e = entry as Record<string, unknown>;\n return (\n e['type'] === 'cookie' ||\n 'sameSite' in e ||\n 'httpOnly' in e ||\n 'secure' in e\n );\n};\n\nconst isStorageType = (\n value: string\n): value is 'cookie' | 'localStorage' | 'sessionStorage' | 'header' =>\n value === 'cookie' ||\n value === 'localStorage' ||\n value === 'sessionStorage' ||\n value === 'header';\n\n// ============================================================================\n// Main Function\n// ============================================================================\n\nconst processStorageEntry = (\n entry: StorageEntry\n): Partial<ProcessedStorageAttributes> => {\n if (typeof entry === 'string') {\n if (!isStorageType(entry)) {\n return { cookies: [], localStorage: [], sessionStorage: [], headers: [] };\n }\n if (entry === 'cookie') return { cookies: [createCookieEntry()] };\n if (entry === 'localStorage')\n return { localStorage: [createWebStorageEntry()] };\n if (entry === 'sessionStorage')\n return { sessionStorage: [createWebStorageEntry()] };\n if (entry === 'header') return { headers: [createHeaderEntry()] };\n }\n\n if (typeof entry === 'object' && entry !== null) {\n const typedEntry = entry as CookiesAttributes | StorageAttributes;\n\n if (isCookieEntry(typedEntry)) {\n return { cookies: [createCookieEntry(typedEntry as CookiesAttributes)] };\n }\n if ('type' in typedEntry && typedEntry.type === 'localStorage') {\n return {\n localStorage: [createWebStorageEntry(typedEntry as StorageAttributes)],\n };\n }\n if ('type' in typedEntry && typedEntry.type === 'sessionStorage') {\n return {\n sessionStorage: [\n createWebStorageEntry(typedEntry as StorageAttributes),\n ],\n };\n }\n if ('type' in typedEntry && typedEntry.type === 'header') {\n return { headers: [createHeaderEntry(typedEntry as StorageAttributes)] };\n }\n // Default to localStorage for ambiguous objects\n return {\n localStorage: [\n createWebStorageEntry(typedEntry as Omit<StorageAttributes, 'type'>),\n ],\n };\n }\n\n return { cookies: [], localStorage: [], sessionStorage: [], headers: [] };\n};\n\nconst mergeStorageAttributes = (\n accumulated: ProcessedStorageAttributes,\n partial: Partial<ProcessedStorageAttributes>\n): ProcessedStorageAttributes => ({\n cookies: [...(accumulated.cookies ?? []), ...(partial.cookies ?? [])],\n localStorage: [\n ...(accumulated.localStorage ?? []),\n ...(partial.localStorage ?? []),\n ],\n sessionStorage: [\n ...(accumulated.sessionStorage ?? []),\n ...(partial.sessionStorage ?? []),\n ],\n headers: [...(accumulated.headers ?? []), ...(partial.headers ?? [])],\n});\n\n/**\n * Extracts and normalizes storage configuration into separate arrays for each storage type.\n * Called at config-build time so the result is pre-computed and stored in the config.\n *\n * @param options - The storage configuration from IntlayerConfig\n * @returns An object containing arrays for cookies, localStorage, sessionStorage and headers\n */\nexport const getStorageAttributes = (\n options: RoutingStorageInput\n): ProcessedStorageAttributes => {\n const emptyResult: ProcessedStorageAttributes = {\n cookies: [],\n localStorage: [],\n sessionStorage: [],\n headers: [],\n };\n\n if (options === false || options === undefined) return {};\n\n const result = Array.isArray(options)\n ? options.reduce<ProcessedStorageAttributes>((acc, entry) => {\n const partial = processStorageEntry(entry);\n return mergeStorageAttributes(acc, partial);\n }, emptyResult)\n : mergeStorageAttributes(emptyResult, processStorageEntry(options));\n\n // Remove empty arrays\n const cleanedResult: ProcessedStorageAttributes = {};\n\n if (result.cookies && result.cookies.length > 0) {\n cleanedResult.cookies = result.cookies;\n }\n\n if (result.localStorage && result.localStorage.length > 0) {\n cleanedResult.localStorage = result.localStorage;\n }\n\n if (result.sessionStorage && result.sessionStorage.length > 0) {\n cleanedResult.sessionStorage = result.sessionStorage;\n }\n\n if (result.headers && result.headers.length > 0) {\n cleanedResult.headers = result.headers;\n }\n\n return cleanedResult;\n};\n"],"mappings":";;;AAyCA,MAAM,qBACJ,YACgB;CAChB,MAAM,EAAE,MAAM,MAAM,SAAS,QAAQ,QAAQ,UAAU,aACrD,WAAW,
|
|
1
|
+
{"version":3,"file":"getStorageAttributes.mjs","names":[],"sources":["../../../src/utils/getStorageAttributes.ts"],"sourcesContent":["import type {\n CookiesAttributes,\n ProcessedStorageAttributes,\n RoutingStorageInput,\n StorageAttributes,\n} from '@intlayer/types/config';\nimport {\n COOKIE_NAME,\n HEADER_NAME,\n LOCALE_STORAGE_NAME,\n} from '../defaultValues/routing';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ntype CookieEntry = {\n name: string;\n attributes: Omit<CookiesAttributes, 'type' | 'name'>;\n};\n\ntype WebStorageEntry = {\n name: string;\n};\n\ntype HeaderEntry = {\n name: string;\n};\n\ntype StorageEntry =\n | 'cookie'\n | 'localStorage'\n | 'sessionStorage'\n | 'header'\n | CookiesAttributes\n | StorageAttributes;\n\n// ============================================================================\n// Helper Functions\n// ============================================================================\n\nconst createCookieEntry = (\n options?: Partial<CookiesAttributes>\n): CookieEntry => {\n const { name, path, expires, domain, secure, sameSite, httpOnly } =\n options ?? {};\n return {\n name: name ?? COOKIE_NAME,\n attributes: { path, expires, domain, secure, sameSite, httpOnly },\n };\n};\n\nconst createWebStorageEntry = (\n options?: Partial<StorageAttributes>\n): WebStorageEntry => ({\n name: options?.name ?? LOCALE_STORAGE_NAME,\n});\n\nconst createHeaderEntry = (\n options?: Partial<StorageAttributes>\n): HeaderEntry => ({\n name: options?.name ?? HEADER_NAME,\n});\n\nconst isCookieEntry = (entry: unknown): boolean => {\n if (typeof entry !== 'object' || entry === null) return false;\n const e = entry as Record<string, unknown>;\n return (\n e['type'] === 'cookie' ||\n 'sameSite' in e ||\n 'httpOnly' in e ||\n 'secure' in e\n );\n};\n\nconst isStorageType = (\n value: string\n): value is 'cookie' | 'localStorage' | 'sessionStorage' | 'header' =>\n value === 'cookie' ||\n value === 'localStorage' ||\n value === 'sessionStorage' ||\n value === 'header';\n\n// ============================================================================\n// Main Function\n// ============================================================================\n\nconst processStorageEntry = (\n entry: StorageEntry\n): Partial<ProcessedStorageAttributes> => {\n if (typeof entry === 'string') {\n if (!isStorageType(entry)) {\n return { cookies: [], localStorage: [], sessionStorage: [], headers: [] };\n }\n if (entry === 'cookie') return { cookies: [createCookieEntry()] };\n if (entry === 'localStorage')\n return { localStorage: [createWebStorageEntry()] };\n if (entry === 'sessionStorage')\n return { sessionStorage: [createWebStorageEntry()] };\n if (entry === 'header') return { headers: [createHeaderEntry()] };\n }\n\n if (typeof entry === 'object' && entry !== null) {\n const typedEntry = entry as CookiesAttributes | StorageAttributes;\n\n if (isCookieEntry(typedEntry)) {\n return { cookies: [createCookieEntry(typedEntry as CookiesAttributes)] };\n }\n if ('type' in typedEntry && typedEntry.type === 'localStorage') {\n return {\n localStorage: [createWebStorageEntry(typedEntry as StorageAttributes)],\n };\n }\n if ('type' in typedEntry && typedEntry.type === 'sessionStorage') {\n return {\n sessionStorage: [\n createWebStorageEntry(typedEntry as StorageAttributes),\n ],\n };\n }\n if ('type' in typedEntry && typedEntry.type === 'header') {\n return { headers: [createHeaderEntry(typedEntry as StorageAttributes)] };\n }\n // Default to localStorage for ambiguous objects\n return {\n localStorage: [\n createWebStorageEntry(typedEntry as Omit<StorageAttributes, 'type'>),\n ],\n };\n }\n\n return { cookies: [], localStorage: [], sessionStorage: [], headers: [] };\n};\n\nconst mergeStorageAttributes = (\n accumulated: ProcessedStorageAttributes,\n partial: Partial<ProcessedStorageAttributes>\n): ProcessedStorageAttributes => ({\n cookies: [...(accumulated.cookies ?? []), ...(partial.cookies ?? [])],\n localStorage: [\n ...(accumulated.localStorage ?? []),\n ...(partial.localStorage ?? []),\n ],\n sessionStorage: [\n ...(accumulated.sessionStorage ?? []),\n ...(partial.sessionStorage ?? []),\n ],\n headers: [...(accumulated.headers ?? []), ...(partial.headers ?? [])],\n});\n\n/**\n * Extracts and normalizes storage configuration into separate arrays for each storage type.\n * Called at config-build time so the result is pre-computed and stored in the config.\n *\n * @param options - The storage configuration from IntlayerConfig\n * @returns An object containing arrays for cookies, localStorage, sessionStorage and headers\n */\nexport const getStorageAttributes = (\n options: RoutingStorageInput\n): ProcessedStorageAttributes => {\n const emptyResult: ProcessedStorageAttributes = {\n cookies: [],\n localStorage: [],\n sessionStorage: [],\n headers: [],\n };\n\n if (options === false || options === undefined) return {};\n\n const result = Array.isArray(options)\n ? options.reduce<ProcessedStorageAttributes>((acc, entry) => {\n const partial = processStorageEntry(entry);\n return mergeStorageAttributes(acc, partial);\n }, emptyResult)\n : mergeStorageAttributes(emptyResult, processStorageEntry(options));\n\n // Remove empty arrays\n const cleanedResult: ProcessedStorageAttributes = {};\n\n if (result.cookies && result.cookies.length > 0) {\n cleanedResult.cookies = result.cookies;\n }\n\n if (result.localStorage && result.localStorage.length > 0) {\n cleanedResult.localStorage = result.localStorage;\n }\n\n if (result.sessionStorage && result.sessionStorage.length > 0) {\n cleanedResult.sessionStorage = result.sessionStorage;\n }\n\n if (result.headers && result.headers.length > 0) {\n cleanedResult.headers = result.headers;\n }\n\n return cleanedResult;\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUsedNodeTypes.mjs","names":[],"sources":["../../../src/utils/getUsedNodeTypes.ts"],"sourcesContent":["import type { Dictionary } from '@intlayer/types/dictionary';\nimport {\n PLUGIN_NODE_TYPES,\n PREACT_NODE,\n REACT_NODE,\n SOLID_NODE,\n} from '@intlayer/types/nodeType';\n\nexport type PluginNodeType = (typeof PLUGIN_NODE_TYPES)[number];\n\n/**\n * Detect whether a plain object looks like a serialized React element.\n * React serializes JSX as: { key, props, _owner, _store }.\n * Preact serializes VNodes similarly with a `_store` field.\n */\nconst isReactLikeElement = (obj: Record<string, unknown>): boolean =>\n typeof obj.props !== 'undefined' &&\n 'key' in obj &&\n typeof obj._store !== 'undefined';\n\n/**\n * Detect whether a plain object looks like a serialized Solid element.\n * Solid JSX is serialized as: { type, props } without the React-specific\n * `_store` / `_owner` internal fields.\n */\nconst isSolidLikeElement = (obj: Record<string, unknown>): boolean =>\n typeof obj.props !== 'undefined' &&\n typeof obj._store === 'undefined' &&\n typeof obj.nodeType === 'undefined' &&\n 'type' in obj;\n\n/** Recursively collect every `nodeType` string found in a value. */\nconst collectNodeTypes = (value: unknown, result: Set<string>): void => {\n if (!value || typeof value !== 'object') return;\n\n if (Array.isArray(value)) {\n for (const item of value) collectNodeTypes(item, result);\n return;\n }\n\n const obj = value as Record<string, unknown>;\n\n if (typeof obj.nodeType === 'string') {\n result.add(obj.nodeType);\n } else if (isReactLikeElement(obj)) {\n // Serialized React / Preact JSX element — both use { key, props, _store }\n result.add(REACT_NODE);\n result.add(PREACT_NODE);\n } else if (isSolidLikeElement(obj)) {\n result.add(SOLID_NODE);\n }\n\n for (const key of Object.keys(obj)) {\n collectNodeTypes(obj[key], result);\n }\n};\n\n/**\n * Returns the set of NodeType strings actually used across the given\n * built dictionaries.\n *\n * @example\n * const used = getUsedNodeTypes(getDictionaries(config));\n * // Set { 'translation', 'enumeration' }\n */\nexport const getUsedNodeTypes = (\n dictionaries: Record<string, Dictionary> | Dictionary[]\n): PluginNodeType[] => {\n const result = new Set<PluginNodeType>();\n const dicts = Array.isArray(dictionaries)\n ? dictionaries\n : Object.values(dictionaries);\n\n for (const dict of dicts) {\n collectNodeTypes(dict.content, result);\n }\n\n return [...result];\n};\n\nexport const getUnusedNodeTypes = (\n dictionaries: Record<string, Dictionary> | Dictionary[]\n): PluginNodeType[] => {\n const usedNodeTypes = getUsedNodeTypes(dictionaries);\n\n return PLUGIN_NODE_TYPES.filter(\n (nodeType) => !usedNodeTypes.includes(nodeType)\n );\n};\n\nexport const getUsedNodeTypesAsync = async (\n dictionaries: Record<string, Dictionary> | Dictionary[]\n): Promise<PluginNodeType[]> => {\n const dictionariesArray = Array.isArray(dictionaries)\n ? dictionaries\n : Object.values(dictionaries);\n\n const results = await Promise.all(\n dictionariesArray.map(async (dictionary) => {\n const result = new Set<PluginNodeType>();\n\n collectNodeTypes(dictionary.content, result as Set<string>);\n\n return result;\n })\n );\n\n const finalResult = new Set<PluginNodeType>();\n\n for (const res of results) {\n for (const val of res) {\n finalResult.add(val);\n }\n }\n\n return [...finalResult];\n};\n\nexport const getUnusedNodeTypesAsync = async (\n dictionaries: Record<string, Dictionary> | Dictionary[]\n): Promise<PluginNodeType[]> => {\n const usedNodeTypes = await getUsedNodeTypesAsync(dictionaries);\n\n return PLUGIN_NODE_TYPES.filter(\n (nodeType) => !usedNodeTypes.includes(nodeType)\n );\n};\n"],"mappings":";;;;;;;;AAeA,MAAM,sBAAsB,QAC1B,OAAO,IAAI,UAAU,eACrB,SAAS,OACT,OAAO,IAAI,WAAW;;;;;;AAOxB,MAAM,sBAAsB,QAC1B,OAAO,IAAI,UAAU,eACrB,OAAO,IAAI,WAAW,eACtB,OAAO,IAAI,aAAa,eACxB,UAAU;;AAGZ,MAAM,oBAAoB,OAAgB,WAA8B;CACtE,IAAI,CAAC,SAAS,OAAO,UAAU,UAAU;CAEzC,IAAI,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"getUsedNodeTypes.mjs","names":[],"sources":["../../../src/utils/getUsedNodeTypes.ts"],"sourcesContent":["import type { Dictionary } from '@intlayer/types/dictionary';\nimport {\n PLUGIN_NODE_TYPES,\n PREACT_NODE,\n REACT_NODE,\n SOLID_NODE,\n} from '@intlayer/types/nodeType';\n\nexport type PluginNodeType = (typeof PLUGIN_NODE_TYPES)[number];\n\n/**\n * Detect whether a plain object looks like a serialized React element.\n * React serializes JSX as: { key, props, _owner, _store }.\n * Preact serializes VNodes similarly with a `_store` field.\n */\nconst isReactLikeElement = (obj: Record<string, unknown>): boolean =>\n typeof obj.props !== 'undefined' &&\n 'key' in obj &&\n typeof obj._store !== 'undefined';\n\n/**\n * Detect whether a plain object looks like a serialized Solid element.\n * Solid JSX is serialized as: { type, props } without the React-specific\n * `_store` / `_owner` internal fields.\n */\nconst isSolidLikeElement = (obj: Record<string, unknown>): boolean =>\n typeof obj.props !== 'undefined' &&\n typeof obj._store === 'undefined' &&\n typeof obj.nodeType === 'undefined' &&\n 'type' in obj;\n\n/** Recursively collect every `nodeType` string found in a value. */\nconst collectNodeTypes = (value: unknown, result: Set<string>): void => {\n if (!value || typeof value !== 'object') return;\n\n if (Array.isArray(value)) {\n for (const item of value) collectNodeTypes(item, result);\n return;\n }\n\n const obj = value as Record<string, unknown>;\n\n if (typeof obj.nodeType === 'string') {\n result.add(obj.nodeType);\n } else if (isReactLikeElement(obj)) {\n // Serialized React / Preact JSX element — both use { key, props, _store }\n result.add(REACT_NODE);\n result.add(PREACT_NODE);\n } else if (isSolidLikeElement(obj)) {\n result.add(SOLID_NODE);\n }\n\n for (const key of Object.keys(obj)) {\n collectNodeTypes(obj[key], result);\n }\n};\n\n/**\n * Returns the set of NodeType strings actually used across the given\n * built dictionaries.\n *\n * @example\n * const used = getUsedNodeTypes(getDictionaries(config));\n * // Set { 'translation', 'enumeration' }\n */\nexport const getUsedNodeTypes = (\n dictionaries: Record<string, Dictionary> | Dictionary[]\n): PluginNodeType[] => {\n const result = new Set<PluginNodeType>();\n const dicts = Array.isArray(dictionaries)\n ? dictionaries\n : Object.values(dictionaries);\n\n for (const dict of dicts) {\n collectNodeTypes(dict.content, result);\n }\n\n return [...result];\n};\n\nexport const getUnusedNodeTypes = (\n dictionaries: Record<string, Dictionary> | Dictionary[]\n): PluginNodeType[] => {\n const usedNodeTypes = getUsedNodeTypes(dictionaries);\n\n return PLUGIN_NODE_TYPES.filter(\n (nodeType) => !usedNodeTypes.includes(nodeType)\n );\n};\n\nexport const getUsedNodeTypesAsync = async (\n dictionaries: Record<string, Dictionary> | Dictionary[]\n): Promise<PluginNodeType[]> => {\n const dictionariesArray = Array.isArray(dictionaries)\n ? dictionaries\n : Object.values(dictionaries);\n\n const results = await Promise.all(\n dictionariesArray.map(async (dictionary) => {\n const result = new Set<PluginNodeType>();\n\n collectNodeTypes(dictionary.content, result as Set<string>);\n\n return result;\n })\n );\n\n const finalResult = new Set<PluginNodeType>();\n\n for (const res of results) {\n for (const val of res) {\n finalResult.add(val);\n }\n }\n\n return [...finalResult];\n};\n\nexport const getUnusedNodeTypesAsync = async (\n dictionaries: Record<string, Dictionary> | Dictionary[]\n): Promise<PluginNodeType[]> => {\n const usedNodeTypes = await getUsedNodeTypesAsync(dictionaries);\n\n return PLUGIN_NODE_TYPES.filter(\n (nodeType) => !usedNodeTypes.includes(nodeType)\n );\n};\n"],"mappings":";;;;;;;;AAeA,MAAM,sBAAsB,QAC1B,OAAO,IAAI,UAAU,eACrB,SAAS,OACT,OAAO,IAAI,WAAW;;;;;;AAOxB,MAAM,sBAAsB,QAC1B,OAAO,IAAI,UAAU,eACrB,OAAO,IAAI,WAAW,eACtB,OAAO,IAAI,aAAa,eACxB,UAAU;;AAGZ,MAAM,oBAAoB,OAAgB,WAA8B;CACtE,IAAI,CAAC,SAAS,OAAO,UAAU,UAAU;CAEzC,IAAI,MAAM,QAAQ,KAAK,GAAG;EACxB,KAAK,MAAM,QAAQ,OAAO,iBAAiB,MAAM,MAAM;EACvD;CACF;CAEA,MAAM,MAAM;CAEZ,IAAI,OAAO,IAAI,aAAa,UAC1B,OAAO,IAAI,IAAI,QAAQ;MAClB,IAAI,mBAAmB,GAAG,GAAG;EAElC,OAAO,IAAI,UAAU;EACrB,OAAO,IAAI,WAAW;CACxB,OAAO,IAAI,mBAAmB,GAAG,GAC/B,OAAO,IAAI,UAAU;CAGvB,KAAK,MAAM,OAAO,OAAO,KAAK,GAAG,GAC/B,iBAAiB,IAAI,MAAM,MAAM;AAErC;;;;;;;;;AAUA,MAAa,oBACX,iBACqB;CACrB,MAAM,yBAAS,IAAI,IAAoB;CACvC,MAAM,QAAQ,MAAM,QAAQ,YAAY,IACpC,eACA,OAAO,OAAO,YAAY;CAE9B,KAAK,MAAM,QAAQ,OACjB,iBAAiB,KAAK,SAAS,MAAM;CAGvC,OAAO,CAAC,GAAG,MAAM;AACnB;AAEA,MAAa,sBACX,iBACqB;CACrB,MAAM,gBAAgB,iBAAiB,YAAY;CAEnD,OAAO,kBAAkB,QACtB,aAAa,CAAC,cAAc,SAAS,QAAQ,CAChD;AACF;AAEA,MAAa,wBAAwB,OACnC,iBAC8B;CAC9B,MAAM,oBAAoB,MAAM,QAAQ,YAAY,IAChD,eACA,OAAO,OAAO,YAAY;CAE9B,MAAM,UAAU,MAAM,QAAQ,IAC5B,kBAAkB,IAAI,OAAO,eAAe;EAC1C,MAAM,yBAAS,IAAI,IAAoB;EAEvC,iBAAiB,WAAW,SAAS,MAAqB;EAE1D,OAAO;CACT,CAAC,CACH;CAEA,MAAM,8BAAc,IAAI,IAAoB;CAE5C,KAAK,MAAM,OAAO,SAChB,KAAK,MAAM,OAAO,KAChB,YAAY,IAAI,GAAG;CAIvB,OAAO,CAAC,GAAG,WAAW;AACxB;AAEA,MAAa,0BAA0B,OACrC,iBAC8B;CAC9B,MAAM,gBAAgB,MAAM,sBAAsB,YAAY;CAE9D,OAAO,kBAAkB,QACtB,aAAa,CAAC,cAAc,SAAS,QAAQ,CAChD;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logStack.mjs","names":["ANSIColors.YELLOW","ANSIColors.BLUE"],"sources":["../../../src/utils/logStack.ts"],"sourcesContent":["import * as ANSIColors from '../colors';\nimport { colorize } from '../logger';\n\nexport const logStack = (\n message: string,\n options: { limit: number } = { limit: 50 }\n) => {\n Error.stackTraceLimit = options.limit;\n\n try {\n throw new Error('test');\n } catch (error) {\n console.log(colorize(message, ANSIColors.YELLOW));\n console.log(colorize((error as Error).stack ?? '', ANSIColors.BLUE));\n }\n};\n"],"mappings":";;;;AAGA,MAAa,YACX,SACA,UAA6B,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"logStack.mjs","names":["ANSIColors.YELLOW","ANSIColors.BLUE"],"sources":["../../../src/utils/logStack.ts"],"sourcesContent":["import * as ANSIColors from '../colors';\nimport { colorize } from '../logger';\n\nexport const logStack = (\n message: string,\n options: { limit: number } = { limit: 50 }\n) => {\n Error.stackTraceLimit = options.limit;\n\n try {\n throw new Error('test');\n } catch (error) {\n console.log(colorize(message, ANSIColors.YELLOW));\n console.log(colorize((error as Error).stack ?? '', ANSIColors.BLUE));\n }\n};\n"],"mappings":";;;;AAGA,MAAa,YACX,SACA,UAA6B,EAAE,OAAO,GAAG,MACtC;CACH,MAAM,kBAAkB,QAAQ;CAEhC,IAAI;EACF,MAAM,IAAI,MAAM,MAAM;CACxB,SAAS,OAAO;EACd,QAAQ,IAAI,SAAS,SAASA,MAAiB,CAAC;EAChD,QAAQ,IAAI,SAAU,MAAgB,SAAS,IAAIC,IAAe,CAAC;CACrE;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePath.mjs","names":[],"sources":["../../../src/utils/normalizePath.ts"],"sourcesContent":["/**\n * Normalize a path for glob by replacing backslashes with forward slashes\n *\n * Utils for Windows compatibility, as Glob pattern as `**\\\\*.js` is not supported\n *\n * C:\\\\Users\\\\John\\\\Desktop\\\\test.txt -> C:/Users/John/Desktop/test.txt\n *\n * @param path - The path to normalize\n * @returns The normalized path\n */\nexport const normalizePath = (path: string): string => path.replace(/\\\\/g, '/');\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,iBAAiB,SAAyB,KAAK,QAAQ,OAAO,
|
|
1
|
+
{"version":3,"file":"normalizePath.mjs","names":[],"sources":["../../../src/utils/normalizePath.ts"],"sourcesContent":["/**\n * Normalize a path for glob by replacing backslashes with forward slashes\n *\n * Utils for Windows compatibility, as Glob pattern as `**\\\\*.js` is not supported\n *\n * C:\\\\Users\\\\John\\\\Desktop\\\\test.txt -> C:/Users/John/Desktop/test.txt\n *\n * @param path - The path to normalize\n * @returns The normalized path\n */\nexport const normalizePath = (path: string): string => path.replace(/\\\\/g, '/');\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,iBAAiB,SAAyB,KAAK,QAAQ,OAAO,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseFilePathPattern.mjs","names":[],"sources":["../../../src/utils/parseFilePathPattern.ts"],"sourcesContent":["import type {\n FilePathPattern,\n FilePathPatternContext,\n} from '@intlayer/types/filePathPattern';\n\n/**\n * Parses a FilePathPattern configuration string or function to a final string path.\n * Resolves context variables like `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`.\n */\nexport const parseFilePathPattern = async (\n pattern: FilePathPattern,\n context: FilePathPatternContext\n): Promise<string> => {\n if (typeof pattern === 'function') {\n return await (pattern as any)(context);\n }\n\n if (typeof pattern === 'object' && pattern !== null && context.locale) {\n const localePattern = (pattern as any)[context.locale];\n\n if (localePattern) {\n if (typeof localePattern === 'function') {\n return await localePattern(context);\n }\n return parseStringPattern(localePattern, context);\n }\n }\n\n if (typeof pattern === 'string') {\n return parseStringPattern(pattern, context);\n }\n\n return '';\n};\n\nexport const parseStringPattern = (\n pattern: string,\n context: FilePathPatternContext\n): string =>\n pattern\n .replaceAll(/\\{\\{\\s*locale\\s*\\}\\}/g, context.locale ?? '')\n .replaceAll(/\\{\\{\\s*key\\s*\\}\\}/g, context.key ?? '')\n .replaceAll(/\\{\\{\\s*fileName\\s*\\}\\}/g, context.fileName ?? '')\n .replaceAll(/\\{\\{\\s*extension\\s*\\}\\}/g, context.extension ?? '')\n .replaceAll(\n /\\{\\{\\s*componentFileName\\s*\\}\\}/g,\n context.componentFileName ?? ''\n )\n .replaceAll(\n /\\{\\{\\s*componentExtension\\s*\\}\\}/g,\n context.componentExtension ?? ''\n )\n .replaceAll(/\\{\\{\\s*format\\s*\\}\\}/g, context.format ?? '')\n .replaceAll(/\\{\\{\\s*componentFormat\\s*\\}\\}/g, context.componentFormat ?? '')\n .replaceAll(\n /\\{\\{\\s*componentDirPath\\s*\\}\\}/g,\n context.componentDirPath ?? ''\n );\n"],"mappings":";;;;;AASA,MAAa,uBAAuB,OAClC,SACA,YACoB;CACpB,IAAI,OAAO,YAAY,YACrB,OAAO,MAAO,QAAgB,
|
|
1
|
+
{"version":3,"file":"parseFilePathPattern.mjs","names":[],"sources":["../../../src/utils/parseFilePathPattern.ts"],"sourcesContent":["import type {\n FilePathPattern,\n FilePathPatternContext,\n} from '@intlayer/types/filePathPattern';\n\n/**\n * Parses a FilePathPattern configuration string or function to a final string path.\n * Resolves context variables like `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`.\n */\nexport const parseFilePathPattern = async (\n pattern: FilePathPattern,\n context: FilePathPatternContext\n): Promise<string> => {\n if (typeof pattern === 'function') {\n return await (pattern as any)(context);\n }\n\n if (typeof pattern === 'object' && pattern !== null && context.locale) {\n const localePattern = (pattern as any)[context.locale];\n\n if (localePattern) {\n if (typeof localePattern === 'function') {\n return await localePattern(context);\n }\n return parseStringPattern(localePattern, context);\n }\n }\n\n if (typeof pattern === 'string') {\n return parseStringPattern(pattern, context);\n }\n\n return '';\n};\n\nexport const parseStringPattern = (\n pattern: string,\n context: FilePathPatternContext\n): string =>\n pattern\n .replaceAll(/\\{\\{\\s*locale\\s*\\}\\}/g, context.locale ?? '')\n .replaceAll(/\\{\\{\\s*key\\s*\\}\\}/g, context.key ?? '')\n .replaceAll(/\\{\\{\\s*fileName\\s*\\}\\}/g, context.fileName ?? '')\n .replaceAll(/\\{\\{\\s*extension\\s*\\}\\}/g, context.extension ?? '')\n .replaceAll(\n /\\{\\{\\s*componentFileName\\s*\\}\\}/g,\n context.componentFileName ?? ''\n )\n .replaceAll(\n /\\{\\{\\s*componentExtension\\s*\\}\\}/g,\n context.componentExtension ?? ''\n )\n .replaceAll(/\\{\\{\\s*format\\s*\\}\\}/g, context.format ?? '')\n .replaceAll(/\\{\\{\\s*componentFormat\\s*\\}\\}/g, context.componentFormat ?? '')\n .replaceAll(\n /\\{\\{\\s*componentDirPath\\s*\\}\\}/g,\n context.componentDirPath ?? ''\n );\n"],"mappings":";;;;;AASA,MAAa,uBAAuB,OAClC,SACA,YACoB;CACpB,IAAI,OAAO,YAAY,YACrB,OAAO,MAAO,QAAgB,OAAO;CAGvC,IAAI,OAAO,YAAY,YAAY,YAAY,QAAQ,QAAQ,QAAQ;EACrE,MAAM,gBAAiB,QAAgB,QAAQ;EAE/C,IAAI,eAAe;GACjB,IAAI,OAAO,kBAAkB,YAC3B,OAAO,MAAM,cAAc,OAAO;GAEpC,OAAO,mBAAmB,eAAe,OAAO;EAClD;CACF;CAEA,IAAI,OAAO,YAAY,UACrB,OAAO,mBAAmB,SAAS,OAAO;CAG5C,OAAO;AACT;AAEA,MAAa,sBACX,SACA,YAEA,QACG,WAAW,yBAAyB,QAAQ,UAAU,EAAE,EACxD,WAAW,sBAAsB,QAAQ,OAAO,EAAE,EAClD,WAAW,2BAA2B,QAAQ,YAAY,EAAE,EAC5D,WAAW,4BAA4B,QAAQ,aAAa,EAAE,EAC9D,WACC,oCACA,QAAQ,qBAAqB,EAC/B,EACC,WACC,qCACA,QAAQ,sBAAsB,EAChC,EACC,WAAW,yBAAyB,QAAQ,UAAU,EAAE,EACxD,WAAW,kCAAkC,QAAQ,mBAAmB,EAAE,EAC1E,WACC,mCACA,QAAQ,oBAAoB,EAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathSecurity.mjs","names":[],"sources":["../../../src/utils/pathSecurity.ts"],"sourcesContent":["import { resolve, sep } from 'node:path';\n\n/**\n * Throws if `resolvedPath` escapes `baseDir`.\n * Use this before any file operation whose path is derived from user-controlled\n * input (e.g. dictionary keys, filePath fields from dictionary data) to prevent\n * path-traversal attacks.\n */\nexport const assertPathWithin = (\n resolvedPath: string,\n baseDir: string\n): void => {\n const normalizedBase = resolve(baseDir);\n const normalizedPath = resolve(resolvedPath);\n if (\n normalizedPath !== normalizedBase &&\n !normalizedPath.startsWith(normalizedBase + sep)\n ) {\n throw new Error(\n `Path traversal detected: \"${resolvedPath}\" escapes the base directory \"${baseDir}\"`\n );\n }\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,oBACX,cACA,YACS;CACT,MAAM,iBAAiB,QAAQ,
|
|
1
|
+
{"version":3,"file":"pathSecurity.mjs","names":[],"sources":["../../../src/utils/pathSecurity.ts"],"sourcesContent":["import { resolve, sep } from 'node:path';\n\n/**\n * Throws if `resolvedPath` escapes `baseDir`.\n * Use this before any file operation whose path is derived from user-controlled\n * input (e.g. dictionary keys, filePath fields from dictionary data) to prevent\n * path-traversal attacks.\n */\nexport const assertPathWithin = (\n resolvedPath: string,\n baseDir: string\n): void => {\n const normalizedBase = resolve(baseDir);\n const normalizedPath = resolve(resolvedPath);\n if (\n normalizedPath !== normalizedBase &&\n !normalizedPath.startsWith(normalizedBase + sep)\n ) {\n throw new Error(\n `Path traversal detected: \"${resolvedPath}\" escapes the base directory \"${baseDir}\"`\n );\n }\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,oBACX,cACA,YACS;CACT,MAAM,iBAAiB,QAAQ,OAAO;CACtC,MAAM,iBAAiB,QAAQ,YAAY;CAC3C,IACE,mBAAmB,kBACnB,CAAC,eAAe,WAAW,iBAAiB,GAAG,GAE/C,MAAM,IAAI,MACR,6BAA6B,aAAa,gCAAgC,QAAQ,EACpF;AAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retryManager.mjs","names":[],"sources":["../../../src/utils/retryManager.ts"],"sourcesContent":["import { logger } from '../logger';\nimport { extractErrorMessage } from './extractErrorMessage';\n\nexport type RetryManagerOptions = {\n /** maximum number of retries before giving up */\n maxRetry?: number;\n /** delay between attempts, in milliseconds */\n delay?: number;\n /** function to call when an error occurs */\n onError?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n /** function to call when the maximum number of retries is reached */\n onMaxTryReached?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n};\n\nconst DEFAULT_MAX_RETRY = 3;\nconst DEFAULT_DELAY = 0;\n\n/**\n * Wrap an async function `fn` so it’s retried on failure.\n *\n * @param fn The async function to wrap\n * @param options { maxRetry, delay }\n * @returns A new function with the same signature as `fn`\n */\nexport const retryManager =\n <Args extends any[], R>(\n fn: (...args: Args) => Promise<R>,\n {\n maxRetry = DEFAULT_MAX_RETRY,\n delay = DEFAULT_DELAY,\n onError,\n onMaxTryReached,\n }: RetryManagerOptions = {}\n ): ((...args: Args) => Promise<R>) =>\n // ───────────────────────────────^ returned wrapper function\n async (...args: Args): Promise<R> => {\n let lastError: unknown;\n\n for (let attempt = 0; attempt <= maxRetry; attempt++) {\n try {\n return await fn(...args);\n } catch (err) {\n lastError = err;\n const error = extractErrorMessage(err);\n\n // If this was the last attempt, handle max retry reached\n if (attempt >= maxRetry) {\n if (onMaxTryReached) {\n onMaxTryReached?.({ error, attempt, maxRetry });\n return null as R;\n }\n\n // Otherwise, throw the error\n throw err;\n }\n\n if (onError) {\n onError?.({ error, attempt, maxRetry });\n } else {\n logger(error, {\n level: 'error',\n });\n }\n\n // Wait before retrying\n if (delay > 0) {\n await new Promise((res) => setTimeout(res, delay));\n }\n }\n }\n\n // This should never be reached, but TypeScript needs it\n throw (\n lastError ?? new Error('Unexpected: retry loop completed without result')\n );\n };\n"],"mappings":";;;;AAsBA,MAAM,oBAAoB;AAC1B,MAAM,gBAAgB;;;;;;;;AAStB,MAAa,gBAET,IACA,EACE,WAAW,mBACX,QAAQ,eACR,SACA,oBACuB,
|
|
1
|
+
{"version":3,"file":"retryManager.mjs","names":[],"sources":["../../../src/utils/retryManager.ts"],"sourcesContent":["import { logger } from '../logger';\nimport { extractErrorMessage } from './extractErrorMessage';\n\nexport type RetryManagerOptions = {\n /** maximum number of retries before giving up */\n maxRetry?: number;\n /** delay between attempts, in milliseconds */\n delay?: number;\n /** function to call when an error occurs */\n onError?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n /** function to call when the maximum number of retries is reached */\n onMaxTryReached?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n};\n\nconst DEFAULT_MAX_RETRY = 3;\nconst DEFAULT_DELAY = 0;\n\n/**\n * Wrap an async function `fn` so it’s retried on failure.\n *\n * @param fn The async function to wrap\n * @param options { maxRetry, delay }\n * @returns A new function with the same signature as `fn`\n */\nexport const retryManager =\n <Args extends any[], R>(\n fn: (...args: Args) => Promise<R>,\n {\n maxRetry = DEFAULT_MAX_RETRY,\n delay = DEFAULT_DELAY,\n onError,\n onMaxTryReached,\n }: RetryManagerOptions = {}\n ): ((...args: Args) => Promise<R>) =>\n // ───────────────────────────────^ returned wrapper function\n async (...args: Args): Promise<R> => {\n let lastError: unknown;\n\n for (let attempt = 0; attempt <= maxRetry; attempt++) {\n try {\n return await fn(...args);\n } catch (err) {\n lastError = err;\n const error = extractErrorMessage(err);\n\n // If this was the last attempt, handle max retry reached\n if (attempt >= maxRetry) {\n if (onMaxTryReached) {\n onMaxTryReached?.({ error, attempt, maxRetry });\n return null as R;\n }\n\n // Otherwise, throw the error\n throw err;\n }\n\n if (onError) {\n onError?.({ error, attempt, maxRetry });\n } else {\n logger(error, {\n level: 'error',\n });\n }\n\n // Wait before retrying\n if (delay > 0) {\n await new Promise((res) => setTimeout(res, delay));\n }\n }\n }\n\n // This should never be reached, but TypeScript needs it\n throw (\n lastError ?? new Error('Unexpected: retry loop completed without result')\n );\n };\n"],"mappings":";;;;AAsBA,MAAM,oBAAoB;AAC1B,MAAM,gBAAgB;;;;;;;;AAStB,MAAa,gBAET,IACA,EACE,WAAW,mBACX,QAAQ,eACR,SACA,oBACuB,CAAC,MAG5B,OAAO,GAAG,SAA2B;CACnC,IAAI;CAEJ,KAAK,IAAI,UAAU,GAAG,WAAW,UAAU,WACzC,IAAI;EACF,OAAO,MAAM,GAAG,GAAG,IAAI;CACzB,SAAS,KAAK;EACZ,YAAY;EACZ,MAAM,QAAQ,oBAAoB,GAAG;EAGrC,IAAI,WAAW,UAAU;GACvB,IAAI,iBAAiB;IACnB,kBAAkB;KAAE;KAAO;KAAS;IAAS,CAAC;IAC9C,OAAO;GACT;GAGA,MAAM;EACR;EAEA,IAAI,SACF,UAAU;GAAE;GAAO;GAAS;EAAS,CAAC;OAEtC,OAAO,OAAO,EACZ,OAAO,QACT,CAAC;EAIH,IAAI,QAAQ,GACV,MAAM,IAAI,SAAS,QAAQ,WAAW,KAAK,KAAK,CAAC;CAErD;CAIF,MACE,6BAAa,IAAI,MAAM,iDAAiD;AAE5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setIntlayerIdentifier.mjs","names":[],"sources":["../../../src/utils/setIntlayerIdentifier.ts"],"sourcesContent":["type Meta = {\n enabled: true;\n};\n\nexport type WindowsWithIntlayer = typeof window & {\n intlayer?: Meta;\n};\n\n/**\n * Sets the version of Intlayer in the window object.\n * This is used for Intlayer detection in the browser.\n */\nexport const setIntlayerIdentifier = (): void => {\n if (typeof window !== 'undefined') {\n (window as WindowsWithIntlayer).intlayer = {\n enabled: true,\n };\n }\n};\n"],"mappings":";;;;;AAYA,MAAa,8BAAoC;CAC/C,IAAI,OAAO,WAAW,aACpB,AAAC,OAA+B,WAAW,EACzC,SAAS,
|
|
1
|
+
{"version":3,"file":"setIntlayerIdentifier.mjs","names":[],"sources":["../../../src/utils/setIntlayerIdentifier.ts"],"sourcesContent":["type Meta = {\n enabled: true;\n};\n\nexport type WindowsWithIntlayer = typeof window & {\n intlayer?: Meta;\n};\n\n/**\n * Sets the version of Intlayer in the window object.\n * This is used for Intlayer detection in the browser.\n */\nexport const setIntlayerIdentifier = (): void => {\n if (typeof window !== 'undefined') {\n (window as WindowsWithIntlayer).intlayer = {\n enabled: true,\n };\n }\n};\n"],"mappings":";;;;;AAYA,MAAa,8BAAoC;CAC/C,IAAI,OAAO,WAAW,aACpB,AAAC,OAA+B,WAAW,EACzC,SAAS,KACX;AAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camelCaseToKebabCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToKebabCase.ts"],"sourcesContent":["/**\n * Convert a string to kebab-case\n * e.g. \"MyNewComponent\" => \"my-new-component\"\n */\nexport const camelCaseToKebabCase = (str: string): string => {\n // Split on transition from lower->upper: \"MyNewComponent\" => [\"My\", \"New\", \"Component\"]\n // Then lowercase each chunk and join by \"-\"\n return str\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .toLowerCase();\n};\n"],"mappings":";;;;;AAIA,MAAa,wBAAwB,QAAwB;CAG3D,OAAO,IACJ,QAAQ,mBAAmB,
|
|
1
|
+
{"version":3,"file":"camelCaseToKebabCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToKebabCase.ts"],"sourcesContent":["/**\n * Convert a string to kebab-case\n * e.g. \"MyNewComponent\" => \"my-new-component\"\n */\nexport const camelCaseToKebabCase = (str: string): string => {\n // Split on transition from lower->upper: \"MyNewComponent\" => [\"My\", \"New\", \"Component\"]\n // Then lowercase each chunk and join by \"-\"\n return str\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .toLowerCase();\n};\n"],"mappings":";;;;;AAIA,MAAa,wBAAwB,QAAwB;CAG3D,OAAO,IACJ,QAAQ,mBAAmB,OAAO,EAClC,QAAQ,wBAAwB,OAAO,EACvC,QAAQ,WAAW,GAAG,EACtB,YAAY;AACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camelCaseToSentence.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToSentence.ts"],"sourcesContent":["/**\n * Convert a string to sentence case\n * e.g. 'my-new-component' → 'My new component'\n */\nexport const camelCaseToSentence = (value: string): string => {\n if (!value) return '';\n if (typeof value !== 'string') return '';\n\n // Insert space before all caps that follow lowercase letters\n const withSpaces = value\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n // Insert space between sequences like \"XMLParser\" → \"XML Parser\"\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2');\n\n // Lowercase everything except the first character\n return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase();\n};\n"],"mappings":";;;;;AAIA,MAAa,uBAAuB,UAA0B;CAC5D,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI,OAAO,UAAU,UAAU,OAAO;CAGtC,MAAM,aAAa,MAChB,QAAQ,mBAAmB,
|
|
1
|
+
{"version":3,"file":"camelCaseToSentence.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToSentence.ts"],"sourcesContent":["/**\n * Convert a string to sentence case\n * e.g. 'my-new-component' → 'My new component'\n */\nexport const camelCaseToSentence = (value: string): string => {\n if (!value) return '';\n if (typeof value !== 'string') return '';\n\n // Insert space before all caps that follow lowercase letters\n const withSpaces = value\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n // Insert space between sequences like \"XMLParser\" → \"XML Parser\"\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2');\n\n // Lowercase everything except the first character\n return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase();\n};\n"],"mappings":";;;;;AAIA,MAAa,uBAAuB,UAA0B;CAC5D,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI,OAAO,UAAU,UAAU,OAAO;CAGtC,MAAM,aAAa,MAChB,QAAQ,mBAAmB,OAAO,EAElC,QAAQ,yBAAyB,OAAO;CAG3C,OAAO,WAAW,OAAO,CAAC,EAAE,YAAY,IAAI,WAAW,MAAM,CAAC,EAAE,YAAY;AAC9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kebabCaseToCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/kebabCaseToCamelCase.ts"],"sourcesContent":["export const kebabCaseToCamelCase = (name: string): string => {\n return name\n .split(/[^a-zA-Z0-9]+/) // Split on any non-alphanumeric character\n .filter(Boolean) // Remove any empty strings\n .map((word) => {\n // Convert the entire word to lowercase first\n const lowerWord = word.toLowerCase();\n\n // Capitalize the first character\n let capitalized = lowerWord.charAt(0).toUpperCase() + lowerWord.slice(1);\n\n // Capitalize any letter that follows a number\n capitalized = capitalized.replace(\n /(\\d)([a-z])/g,\n (_, number, char) => number + char.toUpperCase()\n );\n\n return capitalized;\n })\n .join(''); // Concatenate all parts into a single string\n};\n"],"mappings":";AAAA,MAAa,wBAAwB,SAAyB;CAC5D,OAAO,KACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"kebabCaseToCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/kebabCaseToCamelCase.ts"],"sourcesContent":["export const kebabCaseToCamelCase = (name: string): string => {\n return name\n .split(/[^a-zA-Z0-9]+/) // Split on any non-alphanumeric character\n .filter(Boolean) // Remove any empty strings\n .map((word) => {\n // Convert the entire word to lowercase first\n const lowerWord = word.toLowerCase();\n\n // Capitalize the first character\n let capitalized = lowerWord.charAt(0).toUpperCase() + lowerWord.slice(1);\n\n // Capitalize any letter that follows a number\n capitalized = capitalized.replace(\n /(\\d)([a-z])/g,\n (_, number, char) => number + char.toUpperCase()\n );\n\n return capitalized;\n })\n .join(''); // Concatenate all parts into a single string\n};\n"],"mappings":";AAAA,MAAa,wBAAwB,SAAyB;CAC5D,OAAO,KACJ,MAAM,eAAe,EACrB,OAAO,OAAO,EACd,KAAK,SAAS;EAEb,MAAM,YAAY,KAAK,YAAY;EAGnC,IAAI,cAAc,UAAU,OAAO,CAAC,EAAE,YAAY,IAAI,UAAU,MAAM,CAAC;EAGvE,cAAc,YAAY,QACxB,iBACC,GAAG,QAAQ,SAAS,SAAS,KAAK,YAAY,CACjD;EAEA,OAAO;CACT,CAAC,EACA,KAAK,EAAE;AACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toLowerCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/toLowerCamelCase.ts"],"sourcesContent":["/**\n * Convert a string to lowerCamelCase\n * e.g. \"MyComponent\" => \"myComponent\"\n * e.g. \"auth-middleware\" => \"authMiddleware\"\n */\nexport const toLowerCamelCase = (str: string): string => {\n if (!str) {\n return '';\n }\n\n // Handle kebab-case: \"auth-middleware\" => \"authMiddleware\"\n if (str.includes('-')) {\n return str\n .split('-')\n .map((word, index) => {\n if (index === 0) {\n return word.toLowerCase();\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n }\n\n // Handle PascalCase: \"MyComponent\" => \"myComponent\"\n return str.charAt(0).toLowerCase() + str.slice(1);\n};\n"],"mappings":";;;;;;AAKA,MAAa,oBAAoB,QAAwB;CACvD,IAAI,CAAC,KACH,OAAO;CAIT,IAAI,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"toLowerCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/toLowerCamelCase.ts"],"sourcesContent":["/**\n * Convert a string to lowerCamelCase\n * e.g. \"MyComponent\" => \"myComponent\"\n * e.g. \"auth-middleware\" => \"authMiddleware\"\n */\nexport const toLowerCamelCase = (str: string): string => {\n if (!str) {\n return '';\n }\n\n // Handle kebab-case: \"auth-middleware\" => \"authMiddleware\"\n if (str.includes('-')) {\n return str\n .split('-')\n .map((word, index) => {\n if (index === 0) {\n return word.toLowerCase();\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n }\n\n // Handle PascalCase: \"MyComponent\" => \"myComponent\"\n return str.charAt(0).toLowerCase() + str.slice(1);\n};\n"],"mappings":";;;;;;AAKA,MAAa,oBAAoB,QAAwB;CACvD,IAAI,CAAC,KACH,OAAO;CAIT,IAAI,IAAI,SAAS,GAAG,GAClB,OAAO,IACJ,MAAM,GAAG,EACT,KAAK,MAAM,UAAU;EACpB,IAAI,UAAU,GACZ,OAAO,KAAK,YAAY;EAE1B,OAAO,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,EAAE,YAAY;CAClE,CAAC,EACA,KAAK,EAAE;CAIZ,OAAO,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AAClD"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import * as _$_intlayer_types_config0 from "@intlayer/types/config";
|
|
2
1
|
import { IntlayerConfig } from "@intlayer/types/config";
|
|
3
|
-
import * as _$_intlayer_types_plugin0 from "@intlayer/types/plugin";
|
|
4
2
|
|
|
5
3
|
//#region src/built.browser.d.ts
|
|
6
4
|
/**
|
|
@@ -10,18 +8,18 @@ import * as _$_intlayer_types_plugin0 from "@intlayer/types/plugin";
|
|
|
10
8
|
* only read when a property is first accessed.
|
|
11
9
|
*/
|
|
12
10
|
declare const configuration: IntlayerConfig;
|
|
13
|
-
declare const internationalization:
|
|
14
|
-
declare const dictionary: Partial<
|
|
15
|
-
declare const routing:
|
|
16
|
-
declare const content:
|
|
17
|
-
declare const system:
|
|
18
|
-
declare const editor:
|
|
19
|
-
declare const log:
|
|
20
|
-
declare const ai: Partial<
|
|
21
|
-
declare const build:
|
|
22
|
-
declare const compiler:
|
|
23
|
-
declare const schemas: Record<string,
|
|
24
|
-
declare const plugins:
|
|
11
|
+
declare const internationalization: import("@intlayer/types/config").InternationalizationConfig;
|
|
12
|
+
declare const dictionary: Partial<import("@intlayer/types/config").DictionaryConfig>;
|
|
13
|
+
declare const routing: import("@intlayer/types/config").RoutingConfig;
|
|
14
|
+
declare const content: import("@intlayer/types/config").ContentConfig;
|
|
15
|
+
declare const system: import("@intlayer/types/config").SystemConfig;
|
|
16
|
+
declare const editor: import("@intlayer/types/config").EditorConfig;
|
|
17
|
+
declare const log: import("@intlayer/types/config").LogConfig;
|
|
18
|
+
declare const ai: Partial<import("@intlayer/types/config").AiConfig>;
|
|
19
|
+
declare const build: import("@intlayer/types/config").BuildConfig;
|
|
20
|
+
declare const compiler: import("@intlayer/types/config").CompilerConfig;
|
|
21
|
+
declare const schemas: Record<string, import("@intlayer/types/config").ConfigSchema>;
|
|
22
|
+
declare const plugins: import("@intlayer/types/plugin").Plugin[];
|
|
25
23
|
//#endregion
|
|
26
24
|
export { ai, build, compiler, content, configuration as default, dictionary, editor, internationalization, log, plugins, routing, schemas, system };
|
|
27
25
|
//# sourceMappingURL=built.browser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built.browser.d.ts","names":[],"sources":["../../src/built.browser.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"built.browser.d.ts","names":[],"sources":["../../src/built.browser.ts"],"mappings":";;;;;AAsCuB;AACvB;;;cAfM,aAAA,EAAa,cAWjB;AAAA,cAEW,oBAAA,mCAAoB,0BAAqC;AAAA,cACzD,UAAA,EAAU,OAAA,kCAAA,gBAAA;AAAA,cACV,OAAA,mCAAO,aAAwB;AAAA,cAC/B,OAAA,mCAAO,aAAwB;AAAA,cAC/B,MAAA,mCAAM,YAAuB;AAAA,cAC7B,MAAA,mCAAM,YAAuB;AAAA,cAC7B,GAAA,mCAAG,SAAoB;AAAA,cACvB,EAAA,EAAE,OAAA,kCAAA,QAAA;AAAA,cACF,KAAA,mCAAK,WAAsB;AAAA,cAC3B,QAAA,mCAAQ,cAAyB;AAAA,cACjC,OAAA,EAAO,MAAA,0CAAA,YAAA;AAAA,cACP,OAAA,mCAAO,MAAA"}
|
package/dist/types/built.d.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import * as _$_intlayer_types_config0 from "@intlayer/types/config";
|
|
2
1
|
import { IntlayerConfig } from "@intlayer/types/config";
|
|
3
|
-
import * as _$_intlayer_types_plugin0 from "@intlayer/types/plugin";
|
|
4
2
|
|
|
5
3
|
//#region src/built.d.ts
|
|
6
4
|
declare const configuration: IntlayerConfig;
|
|
7
|
-
declare const internationalization:
|
|
8
|
-
declare const dictionary: Partial<
|
|
9
|
-
declare const routing:
|
|
10
|
-
declare const content:
|
|
11
|
-
declare const system:
|
|
12
|
-
declare const editor:
|
|
13
|
-
declare const log:
|
|
14
|
-
declare const ai: Partial<
|
|
15
|
-
declare const build:
|
|
16
|
-
declare const compiler:
|
|
17
|
-
declare const schemas: Record<string,
|
|
18
|
-
declare const plugins:
|
|
5
|
+
declare const internationalization: import("@intlayer/types/config").InternationalizationConfig;
|
|
6
|
+
declare const dictionary: Partial<import("@intlayer/types/config").DictionaryConfig>;
|
|
7
|
+
declare const routing: import("@intlayer/types/config").RoutingConfig;
|
|
8
|
+
declare const content: import("@intlayer/types/config").ContentConfig;
|
|
9
|
+
declare const system: import("@intlayer/types/config").SystemConfig;
|
|
10
|
+
declare const editor: import("@intlayer/types/config").EditorConfig;
|
|
11
|
+
declare const log: import("@intlayer/types/config").LogConfig;
|
|
12
|
+
declare const ai: Partial<import("@intlayer/types/config").AiConfig>;
|
|
13
|
+
declare const build: import("@intlayer/types/config").BuildConfig;
|
|
14
|
+
declare const compiler: import("@intlayer/types/config").CompilerConfig;
|
|
15
|
+
declare const schemas: Record<string, import("@intlayer/types/config").ConfigSchema>;
|
|
16
|
+
declare const plugins: import("@intlayer/types/plugin").Plugin[];
|
|
19
17
|
//#endregion
|
|
20
18
|
export { ai, build, compiler, content, configuration as default, dictionary, editor, internationalization, log, plugins, routing, schemas, system };
|
|
21
19
|
//# sourceMappingURL=built.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built.d.ts","names":[],"sources":["../../src/built.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"built.d.ts","names":[],"sources":["../../src/built.ts"],"mappings":";;;cAQM,aAAA,EAAe,cAAmC;AAAA,cAE3C,oBAAA,mCAAoB,0BAAqC;AAAA,cACzD,UAAA,EAAU,OAAA,kCAAA,gBAAA;AAAA,cACV,OAAA,mCAAO,aAAwB;AAAA,cAC/B,OAAA,mCAAO,aAAwB;AAAA,cAC/B,MAAA,mCAAM,YAAuB;AAAA,cAC7B,MAAA,mCAAM,YAAuB;AAAA,cAC7B,GAAA,mCAAG,SAAoB;AAAA,cACvB,EAAA,EAAE,OAAA,kCAAA,QAAA;AAAA,cACF,KAAA,mCAAK,WAAsB;AAAA,cAC3B,QAAA,mCAAQ,cAAyB;AAAA,cACjC,OAAA,EAAO,MAAA,0CAAA,YAAA;AAAA,cACP,OAAA,mCAAO,MAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { GetConfigurationOptions } from "../configFile/getConfiguration.js";
|
|
2
|
-
import * as _$esbuild from "esbuild";
|
|
3
2
|
import { BuildOptions } from "esbuild";
|
|
4
3
|
|
|
5
4
|
//#region src/bundle/index.d.ts
|
|
@@ -17,7 +16,7 @@ type BundleIntlayerOptions = {
|
|
|
17
16
|
* @param options - Bundle options including entryPoint, outfile, and esbuild options.
|
|
18
17
|
* @returns The build result.
|
|
19
18
|
*/
|
|
20
|
-
declare const bundleIntlayer: (options: BundleIntlayerOptions) => Promise<
|
|
19
|
+
declare const bundleIntlayer: (options: BundleIntlayerOptions) => Promise<import("esbuild").BuildResult<BuildOptions>>;
|
|
21
20
|
//#endregion
|
|
22
21
|
export { BundleIntlayerOptions, bundleIntlayer, packageList };
|
|
23
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/bundle/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/bundle/index.ts"],"mappings":";;;;cAgBa,WAAA;AAAA,KAmBD,qBAAA;EACV,OAAA;EACA,aAAA,GAAgB,uBAAA;EAChB,cAAA;EACA,OAAA;AAAA,IACE,YAAY;AALhB;;;;;;;AAAA,cAca,cAAA,GAAwB,OAAA,EAAS,qBAAA,KAAqB,OAAA,mBAAA,WAAA,CAAA,YAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logBundle.d.ts","names":[],"sources":["../../../src/bundle/logBundle.ts"],"mappings":";;;cAKa,YAAA;EAAA,QACH,MAAA;EAAA,QAEA,YAAA;EAAA,QACA,YAAA;EAAA,QACA,aAAA;EAAA,QACA,UAAA;EAAA,iBACS,MAAA;EAAA,QACT,iBAAA;EAAA,QACA,KAAA;cAEI,aAAA,GAAgB,
|
|
1
|
+
{"version":3,"file":"logBundle.d.ts","names":[],"sources":["../../../src/bundle/logBundle.ts"],"mappings":";;;cAKa,YAAA;EAAA,QACH,MAAA;EAAA,QAEA,YAAA;EAAA,QACA,YAAA;EAAA,QACA,aAAA;EAAA,QACA,UAAA;EAAA,iBACS,MAAA;EAAA,QACT,iBAAA;EAAA,QACA,KAAA;cAEI,aAAA,GAAgB,cAAc;EAI1C,SAAA,CAAU,MAAA;EAWV,QAAA,CAAS,KAAA;EAAA,QAOD,YAAA;EAAA,QAQA,WAAA;EAAA,QAMA,MAAA;EAAA,QAMA,MAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildBrowserConfiguration.d.ts","names":[],"sources":["../../../src/configFile/buildBrowserConfiguration.ts"],"mappings":";;;;;AA0CA;;;;;KAAY,qBAAA;EACV,oBAAA,EAAsB,IAAA,CACpB,0BAAA;EAGF,OAAA,EAAS,aAAA;EACT,MAAA,EAAQ,IAAA,CAAK,YAAA;EACb,GAAA,EAAK,IAAA,CAAK,SAAA;AAAA;AAAA,QAGJ,MAAA;EAAA,UACI,MAAA;IAVY;IAYpB,eAAA,GAAkB,
|
|
1
|
+
{"version":3,"file":"buildBrowserConfiguration.d.ts","names":[],"sources":["../../../src/configFile/buildBrowserConfiguration.ts"],"mappings":";;;;;AA0CA;;;;;KAAY,qBAAA;EACV,oBAAA,EAAsB,IAAA,CACpB,0BAAA;EAGF,OAAA,EAAS,aAAA;EACT,MAAA,EAAQ,IAAA,CAAK,YAAA;EACb,GAAA,EAAK,IAAA,CAAK,SAAA;AAAA;AAAA,QAGJ,MAAA;EAAA,UACI,MAAA;IAVY;IAYpB,eAAA,GAAkB,qBAAqB;EAAA;AAAA;;;;;;;cAiB9B,+BAAA,GACX,mBAAA,GAAsB,OAAA,CAAQ,0BAAA,MAC7B,0BAAA;AAzBkB;AACnB;;;;;AADmB,cAwER,kBAAA,GACX,mBAAA,GAAsB,OAAA,CAAQ,mBAAA,MAC7B,aAAA;;;;;AApEwC;AAiB3C;;;;;cAuJa,iBAAA,GACX,mBAAA,GAAsB,OAAA,CAAQ,YAAA,MAC7B,YAAA;;;;;;;;cAmIU,cAAA,GACX,mBAAA,GAAsB,OAAA,CAAQ,SAAA,GAC9B,YAAA,GAAe,YAAA,KACd,SAAA;AA9OH;;;;;;;;;;;;;AA0FC;AAYD;;;;;;;;AAtGA,cAsSa,yBAAA,GACX,YAAA,GAAe,oBAAA,KACd,qBAkBF;;;;;AAxFA;AASD;;;;;;cA4Fa,2BAAA,GACX,MAAA,EAAQ,cAAA,KACP,qBA2BD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildConfigurationFields.d.ts","names":[],"sources":["../../../src/configFile/buildConfigurationFields.ts"],"mappings":";;;;;;AAqsBA
|
|
1
|
+
{"version":3,"file":"buildConfigurationFields.d.ts","names":[],"sources":["../../../src/configFile/buildConfigurationFields.ts"],"mappings":";;;;;;AAqsBA;;;;;;;;;;;;;;;AAwDC;cAxDY,wBAAA,GACX,mBAAA,GAAsB,oBAAA,EACtB,OAAA,WACA,YAAA,GAAe,YAAA,KACd,cAAA"}
|
|
@@ -20,9 +20,9 @@ declare const cookiesAttributesSchema: z.ZodObject<{
|
|
|
20
20
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
22
22
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
none: "none";
|
|
23
24
|
strict: "strict";
|
|
24
25
|
lax: "lax";
|
|
25
|
-
none: "none";
|
|
26
26
|
}>>;
|
|
27
27
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodNumber]>>;
|
|
28
28
|
}, z.core.$strip>;
|
|
@@ -47,9 +47,9 @@ declare const storageSchema: z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodEnum
|
|
|
47
47
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
48
48
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
49
49
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
none: "none";
|
|
50
51
|
strict: "strict";
|
|
51
52
|
lax: "lax";
|
|
52
|
-
none: "none";
|
|
53
53
|
}>>;
|
|
54
54
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodNumber]>>;
|
|
55
55
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -72,9 +72,9 @@ declare const storageSchema: z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodEnum
|
|
|
72
72
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
73
73
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
74
74
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
none: "none";
|
|
75
76
|
strict: "strict";
|
|
76
77
|
lax: "lax";
|
|
77
|
-
none: "none";
|
|
78
78
|
}>>;
|
|
79
79
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodNumber]>>;
|
|
80
80
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -155,9 +155,9 @@ declare const routingSchema: z.ZodObject<{
|
|
|
155
155
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
156
156
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
157
157
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
158
|
+
none: "none";
|
|
158
159
|
strict: "strict";
|
|
159
160
|
lax: "lax";
|
|
160
|
-
none: "none";
|
|
161
161
|
}>>;
|
|
162
162
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodNumber]>>;
|
|
163
163
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -180,9 +180,9 @@ declare const routingSchema: z.ZodObject<{
|
|
|
180
180
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
181
181
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
182
182
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
none: "none";
|
|
183
184
|
strict: "strict";
|
|
184
185
|
lax: "lax";
|
|
185
|
-
none: "none";
|
|
186
186
|
}>>;
|
|
187
187
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodNumber]>>;
|
|
188
188
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -272,8 +272,8 @@ declare const buildSchema: z.ZodObject<{
|
|
|
272
272
|
}>>;
|
|
273
273
|
traversePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
274
274
|
outputFormat: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
275
|
-
esm: "esm";
|
|
276
275
|
cjs: "cjs";
|
|
276
|
+
esm: "esm";
|
|
277
277
|
}>>>;
|
|
278
278
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
279
279
|
require: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -350,9 +350,9 @@ declare const intlayerConfigSchema: z.ZodObject<{
|
|
|
350
350
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
351
351
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
352
352
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
353
|
+
none: "none";
|
|
353
354
|
strict: "strict";
|
|
354
355
|
lax: "lax";
|
|
355
|
-
none: "none";
|
|
356
356
|
}>>;
|
|
357
357
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodNumber]>>;
|
|
358
358
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -375,9 +375,9 @@ declare const intlayerConfigSchema: z.ZodObject<{
|
|
|
375
375
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
376
376
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
377
377
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
378
|
+
none: "none";
|
|
378
379
|
strict: "strict";
|
|
379
380
|
lax: "lax";
|
|
380
|
-
none: "none";
|
|
381
381
|
}>>;
|
|
382
382
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodNumber]>>;
|
|
383
383
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -467,8 +467,8 @@ declare const intlayerConfigSchema: z.ZodObject<{
|
|
|
467
467
|
}>>;
|
|
468
468
|
traversePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
469
469
|
outputFormat: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
470
|
-
esm: "esm";
|
|
471
470
|
cjs: "cjs";
|
|
471
|
+
esm: "esm";
|
|
472
472
|
}>>>;
|
|
473
473
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
474
474
|
require: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getConfiguration.d.ts","names":[],"sources":["../../../src/configFile/getConfiguration.ts"],"mappings":";;;;;KAcY,uBAAA;EACV,OAAA;EACA,QAAA,GAAW,oBAAA;EAEX,GAAA;EACA,OAAA;EAEA,YAAA,GAAe,YAAA;EAEf,OAAA,GAAU,MAAA,CAAO,OAAA;EAEjB,KAAA;EAEA,YAAA,GAAe,uBAAA;AAAA,IACb,IAAA,CAAK,qBAAA;AAAA,KAEG,iCAAA;EACV,aAAA,EAAe,cAAA;EACf,mBAAA,EAAqB,
|
|
1
|
+
{"version":3,"file":"getConfiguration.d.ts","names":[],"sources":["../../../src/configFile/getConfiguration.ts"],"mappings":";;;;;KAcY,uBAAA;EACV,OAAA;EACA,QAAA,GAAW,oBAAA;EAEX,GAAA;EACA,OAAA;EAEA,YAAA,GAAe,YAAA;EAEf,OAAA,GAAU,MAAA,CAAO,OAAA;EAEjB,KAAA;EAEA,YAAA,GAAe,uBAAA;AAAA,IACb,IAAA,CAAK,qBAAA;AAAA,KAEG,iCAAA;EACV,aAAA,EAAe,cAAA;EACf,mBAAA,EAAqB,oBAAoB;EACzC,sBAAA;EACA,qBAAA;AAAA;;;;cAMW,2BAAA,GACX,OAAA,GAAU,uBAAA,KACT,iCAgGF;;;;cAKY,gBAAA,GACX,OAAA,GAAU,uBAAA,KACT,cAAoE"}
|
|
@@ -3,4 +3,4 @@ import { BrowserIntlayerConfig, buildBrowserConfiguration, buildEditorFields, bu
|
|
|
3
3
|
import { buildConfigurationFields } from "./buildConfigurationFields.js";
|
|
4
4
|
import { aiSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema } from "./configurationSchema.js";
|
|
5
5
|
import { configurationFilesCandidates, searchConfigurationFile } from "./searchConfigurationFile.js";
|
|
6
|
-
export { BrowserIntlayerConfig, GetConfigurationAndFilePathResult, GetConfigurationOptions, aiSchema, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, buildSchema, compilerSchema, configurationFilesCandidates, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, extractBrowserConfiguration, getConfiguration, getConfigurationAndFilePath, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, searchConfigurationFile, storageAttributesSchema, storageSchema, systemSchema };
|
|
6
|
+
export { type BrowserIntlayerConfig, GetConfigurationAndFilePathResult, GetConfigurationOptions, aiSchema, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, buildSchema, compilerSchema, configurationFilesCandidates, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, extractBrowserConfiguration, getConfiguration, getConfigurationAndFilePath, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, searchConfigurationFile, storageAttributesSchema, storageSchema, systemSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchConfigurationFile.d.ts","names":[],"sources":["../../../src/configFile/searchConfigurationFile.ts"],"mappings":";cAKa,4BAAA;AAAA,KAWR,6BAAA;EACH,qBAAA;EACA,
|
|
1
|
+
{"version":3,"file":"searchConfigurationFile.d.ts","names":[],"sources":["../../../src/configFile/searchConfigurationFile.ts"],"mappings":";cAKa,4BAAA;AAAA,KAWR,6BAAA;EACH,qBAAA;EACA,sBAAsB;AAAA;AAJd;AAAC;;;;AAIa;AAiBxB;;;;AAiCC;AAtDS,cAqBG,uBAAA,GACX,QAAA,aACC,6BA+BF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.d.ts","names":[],"sources":["../../../src/defaultValues/dictionary.ts"],"mappings":";;;cAEa,IAAA;AAAA,cACA,QAAA,EAAU,
|
|
1
|
+
{"version":3,"file":"dictionary.d.ts","names":[],"sources":["../../../src/defaultValues/dictionary.ts"],"mappings":";;;cAEa,IAAA;AAAA,cACA,QAAA,EAAU,kBAA4B;AAAA,cACtC,2BAAA;AAAA,cACA,WAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internationalization.d.ts","names":[],"sources":["../../../src/defaultValues/internationalization.ts"],"mappings":";;;;cAGa,OAAA,EAAS,
|
|
1
|
+
{"version":3,"file":"internationalization.d.ts","names":[],"sources":["../../../src/defaultValues/internationalization.ts"],"mappings":";;;;cAGa,OAAA,EAAS,MAAM;AAAA,cAEf,gBAAA,EAAkB,MAAM;AAAA,cAExB,cAAA,EAAgB,MAAa;AAAA,cAE7B,WAAA,EAAa,UAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","names":[],"sources":["../../../src/defaultValues/routing.ts"],"mappings":";;;cAEa,WAAA;AAAA,cAEA,WAAA;AAAA,cACA,mBAAA;AAAA,cAEA,SAAA;AAAA,cAEA,iBAAA;AAAA,cAEA,YAAA;AAAA,cAEA,OAAA,EAAS,
|
|
1
|
+
{"version":3,"file":"routing.d.ts","names":[],"sources":["../../../src/defaultValues/routing.ts"],"mappings":";;;cAEa,WAAA;AAAA,cAEA,WAAA;AAAA,cACA,mBAAA;AAAA,cAEA,SAAA;AAAA,cAEA,iBAAA;AAAA,cAEA,YAAA;AAAA,cAEA,OAAA,EAAS,mBAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envVars.d.ts","names":[],"sources":["../../../src/envVars/envVars.ts"],"mappings":";;;;;AA2BA;;;;;;;;;cAAa,sBAAA,GACX,SAAA,YACA,OAAA,IAAW,GAAA,qBACX,SAAA,IAAa,KAAA,wBACZ,
|
|
1
|
+
{"version":3,"file":"envVars.d.ts","names":[],"sources":["../../../src/envVars/envVars.ts"],"mappings":";;;;;AA2BA;;;;;;;;;cAAa,sBAAA,GACX,SAAA,YACA,OAAA,IAAW,GAAA,qBACX,SAAA,IAAa,KAAA,wBACZ,MAAM;;AAAA;AAsBT;;;;;;;;;;cAAa,gBAAA,GACX,MAAA,EAAQ,cAAA,EACR,OAAA,IAAW,GAAA,qBACX,SAAA,IAAa,KAAA,wBACZ,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadEnvFile.d.ts","names":[],"sources":["../../src/loadEnvFile.ts"],"mappings":";KAKY,kBAAA;EACV,GAAA;EACA,
|
|
1
|
+
{"version":3,"file":"loadEnvFile.d.ts","names":[],"sources":["../../src/loadEnvFile.ts"],"mappings":";KAKY,kBAAA;EACV,GAAA;EACA,OAAO;AAAA;AAAA,cAGI,cAAA,GACX,GAAA,WACA,OAAgB;AAAA,cASL,WAAA,GAAe,OAAA,GAAU,OAAO,CAAC,kBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundleFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/bundleFile.ts"],"mappings":";;;KAWY,aAAA,GAAgB,
|
|
1
|
+
{"version":3,"file":"bundleFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/bundleFile.ts"],"mappings":";;;KAWY,aAAA,GAAgB,MAAM;AAAA,cAErB,SAAA,GAAa,SAAA,aAAoB,MAuB7C;AAAA,cA0BY,cAAA,GACX,IAAA,UACA,QAAA,UACA,OAAA,GAAU,YAAY;AAAA,cAqBX,UAAA,GACX,IAAA,UACA,QAAA,UACA,OAAA,GAAU,YAAA,KACT,OAAO"}
|