@intlayer/config 9.0.0-canary.17 → 9.0.0-canary.19
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.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/callers/base.cjs.map +1 -1
- package/dist/cjs/callers/compat/i18next.cjs.map +1 -1
- package/dist/cjs/callers/compat/lingui.cjs.map +1 -1
- package/dist/cjs/callers/compat/nextIntl.cjs.map +1 -1
- package/dist/cjs/callers/compat/reactI18next.cjs.map +1 -1
- package/dist/cjs/callers/compat/reactIntl.cjs.map +1 -1
- package/dist/cjs/callers/compat/useIntl.cjs.map +1 -1
- package/dist/cjs/callers/compat/vueI18n.cjs.map +1 -1
- package/dist/cjs/callers/index.cjs.map +1 -1
- package/dist/cjs/callers/transform.cjs.map +1 -1
- package/dist/cjs/configFile/buildBrowserConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/buildConfigurationFields.cjs +0 -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 +0 -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 +0 -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 +4 -3
- package/dist/cjs/loadExternalFile/bundleFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/bundleJSFile.cjs +0 -1
- package/dist/cjs/loadExternalFile/bundleJSFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs +4 -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 +0 -1
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs.map +1 -1
- package/dist/cjs/logger.cjs +2 -1
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/cjs/utils/ESMxCJSHelpers.cjs +0 -1
- package/dist/cjs/utils/ESMxCJSHelpers.cjs.map +1 -1
- package/dist/cjs/utils/alias.cjs +0 -1
- package/dist/cjs/utils/alias.cjs.map +1 -1
- package/dist/cjs/utils/cacheDisk.cjs +2 -1
- package/dist/cjs/utils/cacheDisk.cjs.map +1 -1
- package/dist/cjs/utils/cacheMemory.cjs +0 -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/getDictionarySelectorUsage.cjs.map +1 -1
- package/dist/cjs/utils/getExtension.cjs.map +1 -1
- package/dist/cjs/utils/getPackageJsonPath.cjs +0 -1
- package/dist/cjs/utils/getPackageJsonPath.cjs.map +1 -1
- package/dist/cjs/utils/getStorageAttributes.cjs +2 -1
- package/dist/cjs/utils/getStorageAttributes.cjs.map +1 -1
- package/dist/cjs/utils/getUsedNodeTypes.cjs +0 -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 +0 -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.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/callers/base.mjs.map +1 -1
- package/dist/esm/callers/compat/i18next.mjs.map +1 -1
- package/dist/esm/callers/compat/lingui.mjs.map +1 -1
- package/dist/esm/callers/compat/nextIntl.mjs.map +1 -1
- package/dist/esm/callers/compat/reactI18next.mjs.map +1 -1
- package/dist/esm/callers/compat/reactIntl.mjs.map +1 -1
- package/dist/esm/callers/compat/useIntl.mjs.map +1 -1
- package/dist/esm/callers/compat/vueI18n.mjs.map +1 -1
- package/dist/esm/callers/index.mjs.map +1 -1
- package/dist/esm/callers/transform.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 +4 -2
- package/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/bundleJSFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/loadExternalFile.mjs +4 -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 +2 -1
- 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 +2 -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/getDictionarySelectorUsage.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 +2 -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.d.ts.map +1 -1
- package/dist/types/bundle/index.d.ts +2 -4
- package/dist/types/bundle/index.d.ts.map +1 -1
- package/dist/types/bundle/logBundle.d.ts +0 -1
- package/dist/types/bundle/logBundle.d.ts.map +1 -1
- package/dist/types/callers/base.d.ts +0 -1
- package/dist/types/callers/base.d.ts.map +1 -1
- package/dist/types/callers/compat/i18next.d.ts +0 -1
- package/dist/types/callers/compat/i18next.d.ts.map +1 -1
- package/dist/types/callers/compat/lingui.d.ts +0 -1
- package/dist/types/callers/compat/lingui.d.ts.map +1 -1
- package/dist/types/callers/compat/nextIntl.d.ts +0 -1
- package/dist/types/callers/compat/nextIntl.d.ts.map +1 -1
- package/dist/types/callers/compat/reactI18next.d.ts +0 -1
- package/dist/types/callers/compat/reactI18next.d.ts.map +1 -1
- package/dist/types/callers/compat/reactIntl.d.ts +0 -1
- package/dist/types/callers/compat/reactIntl.d.ts.map +1 -1
- package/dist/types/callers/compat/useIntl.d.ts +0 -1
- package/dist/types/callers/compat/useIntl.d.ts.map +1 -1
- package/dist/types/callers/compat/vueI18n.d.ts +0 -1
- package/dist/types/callers/compat/vueI18n.d.ts.map +1 -1
- package/dist/types/callers/index.d.ts +0 -1
- package/dist/types/callers/index.d.ts.map +1 -1
- package/dist/types/callers/transform.d.ts +7 -4
- package/dist/types/callers/transform.d.ts.map +1 -1
- package/dist/types/callers/types.d.ts +17 -9
- package/dist/types/callers/types.d.ts.map +1 -1
- package/dist/types/colors.d.ts +14 -14
- package/dist/types/colors.d.ts.map +1 -1
- package/dist/types/configFile/buildBrowserConfiguration.d.ts +0 -1
- package/dist/types/configFile/buildBrowserConfiguration.d.ts.map +1 -1
- package/dist/types/configFile/buildConfigurationFields.d.ts +0 -1
- package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
- package/dist/types/configFile/configurationSchema.d.ts +32 -33
- package/dist/types/configFile/configurationSchema.d.ts.map +1 -1
- package/dist/types/configFile/getConfiguration.d.ts +0 -1
- package/dist/types/configFile/getConfiguration.d.ts.map +1 -1
- package/dist/types/configFile/index.d.ts +1 -1
- package/dist/types/configFile/loadConfigurationFile.d.ts +1 -2
- package/dist/types/configFile/loadConfigurationFile.d.ts.map +1 -1
- package/dist/types/configFile/searchConfigurationFile.d.ts +1 -1
- package/dist/types/configFile/searchConfigurationFile.d.ts.map +1 -1
- package/dist/types/defaultValues/analytics.d.ts.map +1 -1
- package/dist/types/defaultValues/build.d.ts.map +1 -1
- package/dist/types/defaultValues/compiler.d.ts.map +1 -1
- package/dist/types/defaultValues/content.d.ts.map +1 -1
- package/dist/types/defaultValues/dictionary.d.ts +0 -1
- package/dist/types/defaultValues/dictionary.d.ts.map +1 -1
- package/dist/types/defaultValues/editor.d.ts.map +1 -1
- package/dist/types/defaultValues/internationalization.d.ts +0 -1
- package/dist/types/defaultValues/internationalization.d.ts.map +1 -1
- package/dist/types/defaultValues/log.d.ts.map +1 -1
- package/dist/types/defaultValues/routing.d.ts +0 -1
- package/dist/types/defaultValues/routing.d.ts.map +1 -1
- package/dist/types/defaultValues/system.d.ts.map +1 -1
- package/dist/types/envVars/envVars.d.ts +0 -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 +0 -1
- package/dist/types/loadExternalFile/bundleFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/bundleJSFile.d.ts +57 -59
- package/dist/types/loadExternalFile/bundleJSFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/loadExternalFile.d.ts +0 -1
- package/dist/types/loadExternalFile/loadExternalFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/parseFileContent.d.ts +0 -1
- package/dist/types/loadExternalFile/parseFileContent.d.ts.map +1 -1
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts +1 -3
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts.map +1 -1
- package/dist/types/logger.d.ts +2 -3
- 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 +1 -6
- package/dist/types/utils/alias.d.ts.map +1 -1
- package/dist/types/utils/cacheDisk.d.ts +22 -11
- package/dist/types/utils/cacheDisk.d.ts.map +1 -1
- package/dist/types/utils/cacheMemory.d.ts +3 -3
- package/dist/types/utils/cacheMemory.d.ts.map +1 -1
- package/dist/types/utils/clearModuleCache.d.ts.map +1 -1
- package/dist/types/utils/compareVersions.d.ts +1 -1
- package/dist/types/utils/compareVersions.d.ts.map +1 -1
- package/dist/types/utils/extractErrorMessage.d.ts.map +1 -1
- package/dist/types/utils/getDictionarySelectorUsage.d.ts +0 -1
- package/dist/types/utils/getDictionarySelectorUsage.d.ts.map +1 -1
- package/dist/types/utils/getExtension.d.ts +1 -2
- 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 +0 -1
- package/dist/types/utils/getStorageAttributes.d.ts.map +1 -1
- package/dist/types/utils/getUsedNodeTypes.d.ts +0 -1
- package/dist/types/utils/getUsedNodeTypes.d.ts.map +1 -1
- package/dist/types/utils/logStack.d.ts.map +1 -1
- package/dist/types/utils/normalizePath.d.ts.map +1 -1
- package/dist/types/utils/parseFilePathPattern.d.ts +0 -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 +8 -9
- 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 +5 -5
|
@@ -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;
|
|
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,CAAC,CACzD,WAAW,sBAAsB,QAAQ,OAAO,EAAE,CAAC,CACnD,WAAW,2BAA2B,QAAQ,YAAY,EAAE,CAAC,CAC7D,WAAW,4BAA4B,QAAQ,aAAa,EAAE,CAAC,CAC/D,WACC,oCACA,QAAQ,qBAAqB,EAC/B,CAAC,CACA,WACC,qCACA,QAAQ,sBAAsB,EAChC,CAAC,CACA,WAAW,yBAAyB,QAAQ,UAAU,EAAE,CAAC,CACzD,WAAW,kCAAkC,QAAQ,mBAAmB,EAAE,CAAC,CAC3E,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;
|
|
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;
|
|
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,CAAC,CACnC,QAAQ,wBAAwB,OAAO,CAAC,CACxC,QAAQ,WAAW,GAAG,CAAC,CACvB,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;
|
|
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,CAAC,CAEnC,QAAQ,yBAAyB,OAAO;CAG3C,OAAO,WAAW,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,WAAW,MAAM,CAAC,CAAC,CAAC,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;
|
|
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,CAAC,CACtB,OAAO,OAAO,CAAC,CACf,KAAK,SAAS;EAEb,MAAM,YAAY,KAAK,YAAY;EAGnC,IAAI,cAAc,UAAU,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,UAAU,MAAM,CAAC;EAGvE,cAAc,YAAY,QACxB,iBACC,GAAG,QAAQ,SAAS,SAAS,KAAK,YAAY,CACjD;EAEA,OAAO;CACT,CAAC,CAAC,CACD,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;
|
|
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,CAAC,CACV,KAAK,MAAM,UAAU;EACpB,IAAI,UAAU,GACZ,OAAO,KAAK,YAAY;EAE1B,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY;CAClE,CAAC,CAAC,CACD,KAAK,EAAE;CAIZ,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,IAAI,MAAM,CAAC;AAClD"}
|
|
@@ -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":";;;;;cAYa;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { GetConfigurationOptions } from "../configFile/getConfiguration.js";
|
|
2
|
-
import * as _$esbuild from "esbuild";
|
|
3
2
|
import { BuildOptions } from "esbuild";
|
|
4
|
-
|
|
5
3
|
//#region src/bundle/index.d.ts
|
|
6
|
-
declare const packageList: readonly [
|
|
4
|
+
declare const packageList: readonly ['next-intlayer', 'react-intlayer', 'vue-intlayer', 'svelte-intlayer', 'preact-intlayer', 'solid-intlayer', 'angular-intlayer', 'lit-intlayer', 'express-intlayer', 'hono-intlayer', 'fastify-intlayer', 'adonis-intlayer', 'vanilla-intlayer', 'intlayer'];
|
|
7
5
|
type BundleIntlayerOptions = {
|
|
8
6
|
outfile?: string;
|
|
9
7
|
configOptions?: GetConfigurationOptions;
|
|
@@ -17,7 +15,7 @@ type BundleIntlayerOptions = {
|
|
|
17
15
|
* @param options - Bundle options including entryPoint, outfile, and esbuild options.
|
|
18
16
|
* @returns The build result.
|
|
19
17
|
*/
|
|
20
|
-
declare const bundleIntlayer: (options: BundleIntlayerOptions) => Promise<
|
|
18
|
+
declare const bundleIntlayer: (options: BundleIntlayerOptions) => Promise<import("esbuild").BuildResult<BuildOptions>>;
|
|
21
19
|
//#endregion
|
|
22
20
|
export { BundleIntlayerOptions, bundleIntlayer, packageList };
|
|
23
21
|
//# 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;KAmBD;EACV;EACA,gBAAgB;EAChB;EACA;IACE;;;;;;;;cASS,iBAAc,SAAmB,0BAAqB,0BAAA,YAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logBundle.d.ts","names":[],"sources":["../../../src/bundle/logBundle.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"logBundle.d.ts","names":[],"sources":["../../../src/bundle/logBundle.ts"],"mappings":";;cAKa;UACH;UAEA;UACA;UACA;UACA;mBACS;UACT;UACA;EAER,YAAY,gBAAgB;EAI5B,UAAU;EAWV,SAAS;UAOD;UAQA;UAMA;UAMA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","names":[],"sources":["../../../src/callers/base.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.ts","names":[],"sources":["../../../src/callers/base.ts"],"mappings":";;;;;;;;;cASa,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18next.d.ts","names":[],"sources":["../../../../src/callers/compat/i18next.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"i18next.d.ts","names":[],"sources":["../../../../src/callers/compat/i18next.ts"],"mappings":";;;;;;;cAOa,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lingui.d.ts","names":[],"sources":["../../../../src/callers/compat/lingui.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"lingui.d.ts","names":[],"sources":["../../../../src/callers/compat/lingui.ts"],"mappings":";;cAwBa,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextIntl.d.ts","names":[],"sources":["../../../../src/callers/compat/nextIntl.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"nextIntl.d.ts","names":[],"sources":["../../../../src/callers/compat/nextIntl.ts"],"mappings":";;;;;;;;cAQa,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactI18next.d.ts","names":[],"sources":["../../../../src/callers/compat/reactI18next.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"reactI18next.d.ts","names":[],"sources":["../../../../src/callers/compat/reactI18next.ts"],"mappings":";;;;;;;;;;cAUa,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactIntl.d.ts","names":[],"sources":["../../../../src/callers/compat/reactIntl.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"reactIntl.d.ts","names":[],"sources":["../../../../src/callers/compat/reactIntl.ts"],"mappings":";;;;;;;;;;;cAWa,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../../src/callers/compat/useIntl.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../../src/callers/compat/useIntl.ts"],"mappings":";;;;;;;cAOa,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vueI18n.d.ts","names":[],"sources":["../../../../src/callers/compat/vueI18n.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"vueI18n.d.ts","names":[],"sources":["../../../../src/callers/compat/vueI18n.ts"],"mappings":";;;;;;;cAOa,kBAAkB"}
|
|
@@ -8,7 +8,6 @@ import { REACT_INTL_CALLERS } from "./compat/reactIntl.js";
|
|
|
8
8
|
import { USE_INTL_CALLERS } from "./compat/useIntl.js";
|
|
9
9
|
import { VUE_I18N_CALLERS } from "./compat/vueI18n.js";
|
|
10
10
|
import { SwcExtraCallerConfig, getRewritableCallers, toSwcExtraCallers } from "./transform.js";
|
|
11
|
-
|
|
12
11
|
//#region src/callers/index.d.ts
|
|
13
12
|
/**
|
|
14
13
|
* Compat-adapter callers, grouped in one list. Each compat package's bundler
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/callers/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/callers/index.ts"],"mappings":";;;;;;;;;;;;;;;;;cAmCa,gBAAgB;;cAWhB,aAAa;;;;;;cAUb,iBAAiB,YAAY;;;;;;;;cAuB7B;;;;;;;;;;;cAwBA,iBAAc,YACb,kBAAgB,mBACT"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CallerDescriptor } from "./types.js";
|
|
2
|
-
|
|
3
2
|
//#region src/callers/transform.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Wire format of an extra caller forwarded to the `@intlayer/swc` plugin.
|
|
@@ -8,7 +7,9 @@ import { CallerDescriptor } from "./types.js";
|
|
|
8
7
|
* `packages/@intlayer/swc/src/lib.rs` — both sides must stay in sync.
|
|
9
8
|
*/
|
|
10
9
|
type SwcExtraCallerConfig = {
|
|
11
|
-
/** The function name the user calls, e.g. `"useTranslation"`. */
|
|
10
|
+
/** The function name the user calls, e.g. `"useTranslation"`. */
|
|
11
|
+
callerName: string;
|
|
12
|
+
/** Module specifiers exporting the function (original + `@intlayer/*`). */
|
|
12
13
|
importSources: string[];
|
|
13
14
|
/**
|
|
14
15
|
* Zero-based index of the positional argument holding the namespace string.
|
|
@@ -28,8 +29,10 @@ type SwcExtraCallerConfig = {
|
|
|
28
29
|
namespaceOption?: {
|
|
29
30
|
argumentIndex: number;
|
|
30
31
|
property: string;
|
|
31
|
-
};
|
|
32
|
-
|
|
32
|
+
};
|
|
33
|
+
/** Replacement function name for static import mode, e.g. `"useDictionary"`. */
|
|
34
|
+
staticReplacement: string;
|
|
35
|
+
/** Replacement function name for dynamic/fetch mode, e.g. `"useDictionaryDynamic"`. */
|
|
33
36
|
dynamicReplacement: string;
|
|
34
37
|
};
|
|
35
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","names":[],"sources":["../../../src/callers/transform.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","names":[],"sources":["../../../src/callers/transform.ts"],"mappings":";;;;;;;;KAQY;;EAEV;;EAEA;;;;;EAKA;;;;;EAKA;;;;;;EAMA;IAAoB;IAAuB;;;EAE3C;;EAEA;;;;;;;;;cAUW,uBAAoB,aAClB,uBACZ;;;;;;;;;;;;cA6BU,oBAAiB,aACf,uBACZ"}
|
|
@@ -23,28 +23,32 @@
|
|
|
23
23
|
* Where a value (namespace/dictionary key, or key prefix) is read from a call
|
|
24
24
|
* expression.
|
|
25
25
|
*/
|
|
26
|
-
type CallerValueSource =
|
|
26
|
+
type CallerValueSource =
|
|
27
|
+
/** Positional argument holding a string literal, e.g. `useTranslations('ns')`. */
|
|
28
|
+
{
|
|
27
29
|
from: 'argument';
|
|
28
30
|
index: number;
|
|
29
|
-
}
|
|
31
|
+
} |
|
|
32
|
+
/** Property of an options-object argument, e.g. `useI18n({ namespace: 'ns' })`. */
|
|
33
|
+
{
|
|
30
34
|
from: 'option';
|
|
31
35
|
argumentIndex: number;
|
|
32
36
|
property: string;
|
|
33
|
-
}
|
|
37
|
+
} |
|
|
34
38
|
/**
|
|
35
39
|
* Compile-time constant — every call site reads the same dictionary.
|
|
36
40
|
* Used by single-catalog libraries such as lingui (`messages`).
|
|
37
41
|
*/
|
|
38
|
-
|
|
42
|
+
{
|
|
39
43
|
from: 'fixed';
|
|
40
44
|
value: string;
|
|
41
|
-
}
|
|
45
|
+
} |
|
|
42
46
|
/**
|
|
43
47
|
* The first dot-segment of the message id passed to the call itself.
|
|
44
48
|
* Used by react-intl where `formatMessage({ id: 'home.title' })` encodes
|
|
45
49
|
* both the dictionary key (`home`) and the field path (`title`).
|
|
46
50
|
*/
|
|
47
|
-
|
|
51
|
+
{
|
|
48
52
|
from: 'path-first-segment';
|
|
49
53
|
};
|
|
50
54
|
/**
|
|
@@ -68,7 +72,9 @@ type CallerResultShape = 'content' | 'return-value' | 'destructured-t' | 'self'
|
|
|
68
72
|
* Full description of a single caller.
|
|
69
73
|
*/
|
|
70
74
|
type CallerDescriptor = {
|
|
71
|
-
/** Function or JSX component name, e.g. `'useTranslation'`, `'FormattedMessage'`. */
|
|
75
|
+
/** Function or JSX component name, e.g. `'useTranslation'`, `'FormattedMessage'`. */
|
|
76
|
+
callerName: string;
|
|
77
|
+
/** Library identifier grouping related callers, e.g. `'react-i18next'`. */
|
|
72
78
|
library: string;
|
|
73
79
|
/**
|
|
74
80
|
* Module specifiers the caller may be imported from. Includes both the
|
|
@@ -87,7 +93,8 @@ type CallerDescriptor = {
|
|
|
87
93
|
* (`i18n.getFixedT(...)`, `intl.formatMessage(...)`) in addition to the
|
|
88
94
|
* bare-identifier form.
|
|
89
95
|
*/
|
|
90
|
-
matchAsMethod?: boolean;
|
|
96
|
+
matchAsMethod?: boolean;
|
|
97
|
+
/** When `true`, also match the tagged-template form, e.g. lingui's ``t`…` ``. */
|
|
91
98
|
matchAsTaggedTemplate?: boolean;
|
|
92
99
|
/**
|
|
93
100
|
* When set, the caller is also matched as a JSX element whose attribute of
|
|
@@ -123,7 +130,8 @@ type CallerDescriptor = {
|
|
|
123
130
|
* (`useTranslations()` root scope) — the dictionary key is then the first
|
|
124
131
|
* dot-segment of each message id passed to the returned `t()`.
|
|
125
132
|
*/
|
|
126
|
-
allowRootScope?: boolean;
|
|
133
|
+
allowRootScope?: boolean;
|
|
134
|
+
/** How translated content is obtained from the caller's result. */
|
|
127
135
|
translationFunction: CallerResultShape;
|
|
128
136
|
/**
|
|
129
137
|
* When `true`, the message id is a *flat* dictionary field that itself may
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/callers/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/callers/types.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;KAyBY;;;EAEN;EAAkB;;;;EAElB;EAAgB;EAAuB;;;;;;;EAKvC;EAAe;;;;;;;;EAMf;;;;;;;;;;;;;;;;;;KAkBM;;;;KAUA;;EAEV;;EAEA;;;;;;EAMA;;;;;;EAMA;;;;;;EAMA;;EAEA;;;;;;EAMA;;;;;EAKA;;;;;EAKA,kBAAkB;;;;;;EAMlB,mBAAmB;;;;;;;EAOnB;;;;;;EAMA;;EAEA,qBAAqB;;;;;;EAMrB;;;;;;;;;;EAUA;;;;;EAKA"}
|
package/dist/types/colors.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
declare namespace colors_d_exports {
|
|
2
2
|
export { BEIGE, BLUE, BOLD, CYAN, GREEN, GREY, GREY_DARK, GREY_LIGHT, MAGENTA, ORANGE, RED, RESET, WHITE, YELLOW };
|
|
3
3
|
}
|
|
4
|
-
declare const RESET:
|
|
5
|
-
declare const GREY:
|
|
6
|
-
declare const GREY_DARK:
|
|
7
|
-
declare const GREY_LIGHT:
|
|
8
|
-
declare const BLUE:
|
|
9
|
-
declare const RED:
|
|
10
|
-
declare const GREEN:
|
|
11
|
-
declare const YELLOW:
|
|
12
|
-
declare const MAGENTA:
|
|
13
|
-
declare const BEIGE:
|
|
14
|
-
declare const ORANGE:
|
|
15
|
-
declare const CYAN:
|
|
16
|
-
declare const WHITE:
|
|
17
|
-
declare const BOLD:
|
|
4
|
+
declare const RESET: '[0m';
|
|
5
|
+
declare const GREY: '[90m';
|
|
6
|
+
declare const GREY_DARK: '[38;5;239m';
|
|
7
|
+
declare const GREY_LIGHT: '[38;5;252m';
|
|
8
|
+
declare const BLUE: '[34m';
|
|
9
|
+
declare const RED: '[31m';
|
|
10
|
+
declare const GREEN: '[32m';
|
|
11
|
+
declare const YELLOW: '[38;5;226m';
|
|
12
|
+
declare const MAGENTA: '[35m';
|
|
13
|
+
declare const BEIGE: '[38;5;3m';
|
|
14
|
+
declare const ORANGE: '[38;5;208m';
|
|
15
|
+
declare const CYAN: '[36m';
|
|
16
|
+
declare const WHITE: '[37m';
|
|
17
|
+
declare const BOLD: '[1m';
|
|
18
18
|
//#endregion
|
|
19
19
|
export { BEIGE, BLUE, BOLD, CYAN, GREEN, GREY, GREY_DARK, GREY_LIGHT, MAGENTA, ORANGE, RED, RESET, WHITE, YELLOW, colors_d_exports };
|
|
20
20
|
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","names":[],"sources":["../../src/colors.ts"],"mappings":";;;cAAa
|
|
1
|
+
{"version":3,"file":"colors.d.ts","names":[],"sources":["../../src/colors.ts"],"mappings":";;;cAAa;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AnalyticsConfig, CustomIntlayerConfig, CustomRoutingConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LogConfig, LogFunctions, RoutingConfig } from "@intlayer/types/config";
|
|
2
|
-
|
|
3
2
|
//#region src/configFile/buildBrowserConfiguration.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Browser-safe subset of {@link IntlayerConfig}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildBrowserConfiguration.d.ts","names":[],"sources":["../../../src/configFile/buildBrowserConfiguration.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildBrowserConfiguration.d.ts","names":[],"sources":["../../../src/configFile/buildBrowserConfiguration.ts"],"mappings":";;;;;;;;;KAqDY;EACV,sBAAsB,KACpB;EAGF,SAAS;EACT,QAAQ,KAAK;EACb,WAAW;EACX,KAAK,KAAK;;QAGJ;YACI;;IAER,kBAAkB;;;;;;;;;cAiBT,kCAA+B,sBACpB,QAAQ,gCAC7B;;;;;;;cA+CU,qBAAkB,sBACP,QAAQ,yBAC7B;;;;;;;;;;;;;;;;;;;;cAwHU,oBAAiB,sBACN,QAAQ,eAAa,MACtC,OAAO,eACX;;;;;;;;;;;cAuIU,uBAAoB,sBACT,QAAQ,qBAC7B;;;;;;;;cA8BU,iBAAc,sBACH,QAAQ,YAAU,eACzB,iBACd;;;;;;;;;;;;;;;;;;;;;;;cAwDU,4BAAyB,eACrB,yBACd;;;;;;;;;;;;cAiCU,8BAA2B,QAC9B,mBACP"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BrowserIntlayerConfig, buildAnalyticsFields, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./buildBrowserConfiguration.js";
|
|
2
2
|
import { CustomIntlayerConfig, IntlayerConfig, LogFunctions } from "@intlayer/types/config";
|
|
3
|
-
|
|
4
3
|
//#region src/configFile/buildConfigurationFields.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Build the complete Intlayer configuration by merging user-supplied values
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildConfigurationFields.d.ts","names":[],"sources":["../../../src/configFile/buildConfigurationFields.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildConfigurationFields.d.ts","names":[],"sources":["../../../src/configFile/buildConfigurationFields.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cAivBa,2BAAwB,sBACb,sBAAoB,kBAC1B,eACD,cAAY,MACtB,OAAO,eACX"}
|