@intlayer/config 9.7.0 → 9.7.2
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/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/cjs/built.cjs +2 -3
- package/dist/cjs/bundle/index.cjs +6 -7
- package/dist/cjs/bundle/logBundle.cjs +4 -5
- package/dist/cjs/callers/base.cjs +1 -2
- package/dist/cjs/callers/compat/i18next.cjs +1 -2
- package/dist/cjs/callers/compat/lingui.cjs +1 -2
- package/dist/cjs/callers/compat/nextIntl.cjs +1 -2
- package/dist/cjs/callers/compat/ngxTranslate.cjs +1 -2
- package/dist/cjs/callers/compat/nuxtjsI18n.cjs +1 -2
- package/dist/cjs/callers/compat/reactI18next.cjs +1 -2
- package/dist/cjs/callers/compat/reactIntl.cjs +1 -2
- package/dist/cjs/callers/compat/svelteI18n.cjs +1 -2
- package/dist/cjs/callers/compat/useIntl.cjs +1 -2
- package/dist/cjs/callers/compat/vueI18n.cjs +1 -2
- package/dist/cjs/callers/index.cjs +13 -14
- package/dist/cjs/callers/transform.cjs +1 -2
- package/dist/cjs/client.cjs +15 -9
- package/dist/cjs/colors.cjs +1 -2
- package/dist/cjs/configFile/buildBrowserConfiguration.cjs +7 -8
- package/dist/cjs/configFile/buildConfigurationFields.cjs +10 -11
- package/dist/cjs/configFile/configurationSchema.cjs +2 -3
- package/dist/cjs/configFile/editorServerOverride.cjs +1 -2
- package/dist/cjs/configFile/getConfiguration.cjs +7 -8
- package/dist/cjs/configFile/index.cjs +6 -6
- package/dist/cjs/configFile/loadConfigurationFile.cjs +3 -4
- package/dist/cjs/configFile/searchConfigurationFile.cjs +3 -4
- package/dist/cjs/defaultValues/analytics.cjs +1 -2
- package/dist/cjs/defaultValues/build.cjs +1 -2
- package/dist/cjs/defaultValues/compiler.cjs +1 -2
- package/dist/cjs/defaultValues/content.cjs +1 -2
- package/dist/cjs/defaultValues/dictionary.cjs +1 -2
- package/dist/cjs/defaultValues/editor.cjs +1 -2
- package/dist/cjs/defaultValues/index.cjs +10 -10
- package/dist/cjs/defaultValues/internationalization.cjs +1 -2
- package/dist/cjs/defaultValues/log.cjs +2 -3
- package/dist/cjs/defaultValues/routing.cjs +1 -2
- package/dist/cjs/defaultValues/system.cjs +1 -2
- package/dist/cjs/dictionaryPreload.cjs +2 -3
- package/dist/cjs/envVars/envVars.cjs +1 -2
- package/dist/cjs/envVars/index.cjs +1 -1
- package/dist/cjs/extract/constants.cjs +1 -2
- package/dist/cjs/extract/index.cjs +2 -2
- package/dist/cjs/extract/shouldExtract.cjs +1 -2
- package/dist/cjs/loadEnvFile.cjs +2 -3
- package/dist/cjs/loadExternalFile/bundleFile.cjs +1 -2
- package/dist/cjs/loadExternalFile/bundleJSFile.cjs +1 -2
- package/dist/cjs/loadExternalFile/index.cjs +5 -5
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs +5 -6
- package/dist/cjs/loadExternalFile/parseFileContent.cjs +4 -5
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs +4 -5
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs.map +1 -1
- package/dist/cjs/logger.cjs +2 -3
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/cjs/node.cjs +6 -6
- package/dist/cjs/secrets.browser.cjs +1 -2
- package/dist/cjs/secrets.cjs +1 -2
- package/dist/cjs/utils/ESMxCJSHelpers.cjs +2 -3
- package/dist/cjs/utils/alias.cjs +3 -4
- package/dist/cjs/utils/alias.cjs.map +1 -1
- package/dist/cjs/utils/builtConfigKeys.cjs +1 -2
- package/dist/cjs/utils/cacheDisk.cjs +3 -4
- package/dist/cjs/utils/cacheDisk.cjs.map +1 -1
- package/dist/cjs/utils/cacheMemory.cjs +1 -2
- package/dist/cjs/utils/chunkArray.cjs +22 -0
- package/dist/cjs/utils/chunkArray.cjs.map +1 -0
- package/dist/cjs/utils/clearModuleCache.cjs +2 -3
- package/dist/cjs/utils/compareVersions.cjs +1 -2
- package/dist/cjs/utils/extractErrorMessage.cjs +1 -2
- package/dist/cjs/utils/getDictionarySelectorUsage.cjs +1 -2
- package/dist/cjs/utils/getExtension.cjs +1 -2
- package/dist/cjs/utils/getPackageJsonPath.cjs +2 -3
- package/dist/cjs/utils/getStorageAttributes.cjs +2 -3
- package/dist/cjs/utils/getUsedNodeTypes.cjs +1 -2
- package/dist/cjs/utils/index.cjs +31 -24
- package/dist/cjs/utils/isPackageInstalled.cjs +2 -3
- package/dist/cjs/utils/logStack.cjs +3 -4
- package/dist/cjs/utils/normalizePath.cjs +1 -2
- package/dist/cjs/utils/pLimit.cjs +132 -0
- package/dist/cjs/utils/pLimit.cjs.map +1 -0
- package/dist/cjs/utils/parallelize.cjs +11 -0
- package/dist/cjs/utils/parallelize.cjs.map +1 -0
- package/dist/cjs/utils/parseFilePathPattern.cjs +1 -2
- package/dist/cjs/utils/pathSecurity.cjs +1 -2
- package/dist/cjs/utils/retryManager.cjs +3 -4
- package/dist/cjs/utils/setIntlayerIdentifier.cjs +1 -2
- package/dist/cjs/utils/stringFormatter/camelCaseToKebabCase.cjs +1 -2
- package/dist/cjs/utils/stringFormatter/camelCaseToSentence.cjs +1 -2
- package/dist/cjs/utils/stringFormatter/index.cjs +4 -4
- package/dist/cjs/utils/stringFormatter/kebabCaseToCamelCase.cjs +1 -2
- package/dist/cjs/utils/stringFormatter/toLowerCamelCase.cjs +1 -2
- package/dist/esm/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/esm/built.mjs +1 -2
- package/dist/esm/bundle/index.mjs +2 -3
- package/dist/esm/bundle/logBundle.mjs +2 -3
- package/dist/esm/callers/base.mjs +1 -2
- package/dist/esm/callers/compat/i18next.mjs +1 -2
- package/dist/esm/callers/compat/lingui.mjs +1 -2
- package/dist/esm/callers/compat/nextIntl.mjs +1 -2
- package/dist/esm/callers/compat/ngxTranslate.mjs +1 -2
- package/dist/esm/callers/compat/nuxtjsI18n.mjs +1 -2
- package/dist/esm/callers/compat/reactI18next.mjs +1 -2
- package/dist/esm/callers/compat/reactIntl.mjs +1 -2
- package/dist/esm/callers/compat/svelteI18n.mjs +1 -2
- package/dist/esm/callers/compat/useIntl.mjs +1 -2
- package/dist/esm/callers/compat/vueI18n.mjs +1 -2
- package/dist/esm/callers/index.mjs +1 -2
- package/dist/esm/callers/transform.mjs +1 -2
- package/dist/esm/client.mjs +4 -1
- package/dist/esm/colors.mjs +1 -2
- package/dist/esm/configFile/buildBrowserConfiguration.mjs +1 -2
- package/dist/esm/configFile/buildConfigurationFields.mjs +2 -3
- package/dist/esm/configFile/configurationSchema.mjs +1 -2
- package/dist/esm/configFile/editorServerOverride.mjs +1 -2
- package/dist/esm/configFile/getConfiguration.mjs +1 -2
- package/dist/esm/configFile/index.mjs +2 -2
- package/dist/esm/configFile/loadConfigurationFile.mjs +2 -3
- package/dist/esm/configFile/searchConfigurationFile.mjs +1 -2
- package/dist/esm/defaultValues/analytics.mjs +1 -2
- package/dist/esm/defaultValues/build.mjs +1 -2
- package/dist/esm/defaultValues/compiler.mjs +1 -2
- package/dist/esm/defaultValues/content.mjs +1 -2
- package/dist/esm/defaultValues/dictionary.mjs +1 -2
- package/dist/esm/defaultValues/editor.mjs +1 -2
- package/dist/esm/defaultValues/index.mjs +4 -4
- package/dist/esm/defaultValues/internationalization.mjs +1 -2
- package/dist/esm/defaultValues/log.mjs +1 -2
- package/dist/esm/defaultValues/routing.mjs +1 -2
- package/dist/esm/defaultValues/system.mjs +1 -2
- package/dist/esm/dictionaryPreload.mjs +1 -2
- package/dist/esm/envVars/envVars.mjs +1 -2
- package/dist/esm/extract/constants.mjs +1 -2
- package/dist/esm/extract/shouldExtract.mjs +1 -2
- package/dist/esm/loadEnvFile.mjs +1 -2
- package/dist/esm/loadExternalFile/bundleFile.mjs +1 -2
- package/dist/esm/loadExternalFile/bundleJSFile.mjs +1 -2
- package/dist/esm/loadExternalFile/index.mjs +3 -3
- package/dist/esm/loadExternalFile/loadExternalFile.mjs +1 -2
- package/dist/esm/loadExternalFile/parseFileContent.mjs +1 -2
- package/dist/esm/loadExternalFile/transpileTSToCJS.mjs +1 -2
- package/dist/esm/loadExternalFile/transpileTSToCJS.mjs.map +1 -1
- package/dist/esm/logger.mjs +1 -2
- package/dist/esm/logger.mjs.map +1 -1
- package/dist/esm/node.mjs +2 -2
- package/dist/esm/secrets.browser.mjs +1 -2
- package/dist/esm/secrets.mjs +1 -2
- package/dist/esm/utils/ESMxCJSHelpers.mjs +1 -2
- package/dist/esm/utils/alias.mjs +2 -3
- package/dist/esm/utils/alias.mjs.map +1 -1
- package/dist/esm/utils/builtConfigKeys.mjs +1 -2
- package/dist/esm/utils/cacheDisk.mjs +1 -2
- package/dist/esm/utils/cacheDisk.mjs.map +1 -1
- package/dist/esm/utils/cacheMemory.mjs +1 -2
- package/dist/esm/utils/chunkArray.mjs +21 -0
- package/dist/esm/utils/chunkArray.mjs.map +1 -0
- package/dist/esm/utils/clearModuleCache.mjs +1 -2
- package/dist/esm/utils/compareVersions.mjs +1 -2
- package/dist/esm/utils/extractErrorMessage.mjs +1 -2
- package/dist/esm/utils/getDictionarySelectorUsage.mjs +1 -2
- package/dist/esm/utils/getExtension.mjs +1 -2
- package/dist/esm/utils/getPackageJsonPath.mjs +1 -2
- package/dist/esm/utils/getStorageAttributes.mjs +1 -2
- package/dist/esm/utils/getUsedNodeTypes.mjs +1 -2
- package/dist/esm/utils/index.mjs +17 -14
- package/dist/esm/utils/isPackageInstalled.mjs +1 -2
- package/dist/esm/utils/logStack.mjs +1 -2
- package/dist/esm/utils/normalizePath.mjs +1 -2
- package/dist/esm/utils/pLimit.mjs +130 -0
- package/dist/esm/utils/pLimit.mjs.map +1 -0
- package/dist/esm/utils/parallelize.mjs +10 -0
- package/dist/esm/utils/parallelize.mjs.map +1 -0
- package/dist/esm/utils/parseFilePathPattern.mjs +1 -2
- package/dist/esm/utils/pathSecurity.mjs +1 -2
- package/dist/esm/utils/retryManager.mjs +2 -3
- package/dist/esm/utils/setIntlayerIdentifier.mjs +1 -2
- package/dist/esm/utils/stringFormatter/camelCaseToKebabCase.mjs +1 -2
- package/dist/esm/utils/stringFormatter/camelCaseToSentence.mjs +1 -2
- package/dist/esm/utils/stringFormatter/kebabCaseToCamelCase.mjs +1 -2
- package/dist/esm/utils/stringFormatter/toLowerCamelCase.mjs +1 -2
- package/dist/types/built.d.ts +0 -2
- package/dist/types/built.d.ts.map +1 -1
- package/dist/types/bundle/index.d.ts +0 -2
- package/dist/types/bundle/index.d.ts.map +1 -1
- package/dist/types/bundle/logBundle.d.ts +0 -2
- package/dist/types/bundle/logBundle.d.ts.map +1 -1
- package/dist/types/callers/base.d.ts +0 -2
- package/dist/types/callers/base.d.ts.map +1 -1
- package/dist/types/callers/compat/i18next.d.ts +0 -2
- package/dist/types/callers/compat/i18next.d.ts.map +1 -1
- package/dist/types/callers/compat/lingui.d.ts +0 -2
- package/dist/types/callers/compat/lingui.d.ts.map +1 -1
- package/dist/types/callers/compat/nextIntl.d.ts +0 -2
- package/dist/types/callers/compat/nextIntl.d.ts.map +1 -1
- package/dist/types/callers/compat/ngxTranslate.d.ts +0 -2
- package/dist/types/callers/compat/ngxTranslate.d.ts.map +1 -1
- package/dist/types/callers/compat/nuxtjsI18n.d.ts +0 -2
- package/dist/types/callers/compat/nuxtjsI18n.d.ts.map +1 -1
- package/dist/types/callers/compat/reactI18next.d.ts +0 -2
- package/dist/types/callers/compat/reactI18next.d.ts.map +1 -1
- package/dist/types/callers/compat/reactIntl.d.ts +0 -2
- package/dist/types/callers/compat/reactIntl.d.ts.map +1 -1
- package/dist/types/callers/compat/svelteI18n.d.ts +0 -2
- package/dist/types/callers/compat/svelteI18n.d.ts.map +1 -1
- package/dist/types/callers/compat/useIntl.d.ts +0 -2
- package/dist/types/callers/compat/useIntl.d.ts.map +1 -1
- package/dist/types/callers/compat/vueI18n.d.ts +0 -2
- package/dist/types/callers/compat/vueI18n.d.ts.map +1 -1
- package/dist/types/callers/index.d.ts +0 -2
- package/dist/types/callers/index.d.ts.map +1 -1
- package/dist/types/callers/transform.d.ts +0 -2
- package/dist/types/callers/transform.d.ts.map +1 -1
- package/dist/types/callers/types.d.ts +0 -2
- package/dist/types/callers/types.d.ts.map +1 -1
- package/dist/types/client.d.ts +5 -1
- package/dist/types/colors.d.ts +0 -1
- package/dist/types/configFile/buildBrowserConfiguration.d.ts +0 -2
- package/dist/types/configFile/buildBrowserConfiguration.d.ts.map +1 -1
- package/dist/types/configFile/buildConfigurationFields.d.ts +0 -2
- package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
- package/dist/types/configFile/configurationSchema.d.ts +0 -2
- package/dist/types/configFile/configurationSchema.d.ts.map +1 -1
- package/dist/types/configFile/editorServerOverride.d.ts +0 -2
- package/dist/types/configFile/editorServerOverride.d.ts.map +1 -1
- package/dist/types/configFile/getConfiguration.d.ts +1 -3
- 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 +0 -2
- package/dist/types/configFile/loadConfigurationFile.d.ts.map +1 -1
- package/dist/types/configFile/searchConfigurationFile.d.ts +1 -2
- package/dist/types/configFile/searchConfigurationFile.d.ts.map +1 -1
- package/dist/types/defaultValues/analytics.d.ts +0 -2
- package/dist/types/defaultValues/analytics.d.ts.map +1 -1
- package/dist/types/defaultValues/build.d.ts +0 -2
- package/dist/types/defaultValues/build.d.ts.map +1 -1
- package/dist/types/defaultValues/compiler.d.ts +0 -2
- package/dist/types/defaultValues/compiler.d.ts.map +1 -1
- package/dist/types/defaultValues/content.d.ts +0 -2
- package/dist/types/defaultValues/content.d.ts.map +1 -1
- package/dist/types/defaultValues/dictionary.d.ts +0 -2
- package/dist/types/defaultValues/dictionary.d.ts.map +1 -1
- package/dist/types/defaultValues/editor.d.ts +0 -2
- package/dist/types/defaultValues/editor.d.ts.map +1 -1
- package/dist/types/defaultValues/internationalization.d.ts +1 -3
- package/dist/types/defaultValues/internationalization.d.ts.map +1 -1
- package/dist/types/defaultValues/log.d.ts +0 -2
- package/dist/types/defaultValues/log.d.ts.map +1 -1
- package/dist/types/defaultValues/routing.d.ts +0 -2
- package/dist/types/defaultValues/routing.d.ts.map +1 -1
- package/dist/types/defaultValues/system.d.ts +0 -2
- package/dist/types/defaultValues/system.d.ts.map +1 -1
- package/dist/types/dictionaryPreload.d.ts +0 -2
- package/dist/types/dictionaryPreload.d.ts.map +1 -1
- package/dist/types/envVars/envVars.d.ts +0 -2
- package/dist/types/envVars/envVars.d.ts.map +1 -1
- package/dist/types/extract/constants.d.ts +0 -2
- package/dist/types/extract/constants.d.ts.map +1 -1
- package/dist/types/extract/index.d.ts +11 -0
- package/dist/types/extract/shouldExtract.d.ts +0 -2
- package/dist/types/extract/shouldExtract.d.ts.map +1 -1
- package/dist/types/loadEnvFile.d.ts +0 -2
- package/dist/types/loadEnvFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/bundleFile.d.ts +0 -2
- package/dist/types/loadExternalFile/bundleFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/bundleJSFile.d.ts +0 -2
- package/dist/types/loadExternalFile/bundleJSFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/index.d.ts +3 -3
- package/dist/types/loadExternalFile/loadExternalFile.d.ts +0 -2
- package/dist/types/loadExternalFile/loadExternalFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/parseFileContent.d.ts +0 -2
- package/dist/types/loadExternalFile/parseFileContent.d.ts.map +1 -1
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts +0 -2
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts.map +1 -1
- package/dist/types/logger.d.ts +1 -3
- package/dist/types/logger.d.ts.map +1 -1
- package/dist/types/node.d.ts +1 -1
- package/dist/types/secrets.browser.d.ts +0 -2
- package/dist/types/secrets.browser.d.ts.map +1 -1
- package/dist/types/secrets.d.ts +0 -2
- package/dist/types/secrets.d.ts.map +1 -1
- package/dist/types/utils/ESMxCJSHelpers.d.ts +0 -2
- package/dist/types/utils/ESMxCJSHelpers.d.ts.map +1 -1
- package/dist/types/utils/alias.d.ts +0 -2
- package/dist/types/utils/alias.d.ts.map +1 -1
- package/dist/types/utils/builtConfigKeys.d.ts +0 -2
- package/dist/types/utils/builtConfigKeys.d.ts.map +1 -1
- package/dist/types/utils/cacheDisk.d.ts +1 -2
- package/dist/types/utils/cacheDisk.d.ts.map +1 -1
- package/dist/types/utils/cacheMemory.d.ts +1 -2
- package/dist/types/utils/cacheMemory.d.ts.map +1 -1
- package/dist/types/utils/chunkArray.d.ts +13 -0
- package/dist/types/utils/chunkArray.d.ts.map +1 -0
- package/dist/types/utils/clearModuleCache.d.ts +0 -2
- package/dist/types/utils/clearModuleCache.d.ts.map +1 -1
- package/dist/types/utils/compareVersions.d.ts +0 -2
- package/dist/types/utils/compareVersions.d.ts.map +1 -1
- package/dist/types/utils/extractErrorMessage.d.ts +0 -2
- package/dist/types/utils/extractErrorMessage.d.ts.map +1 -1
- package/dist/types/utils/getDictionarySelectorUsage.d.ts +1 -2
- package/dist/types/utils/getDictionarySelectorUsage.d.ts.map +1 -1
- package/dist/types/utils/getExtension.d.ts +0 -2
- package/dist/types/utils/getExtension.d.ts.map +1 -1
- package/dist/types/utils/getPackageJsonPath.d.ts +1 -2
- package/dist/types/utils/getPackageJsonPath.d.ts.map +1 -1
- package/dist/types/utils/getStorageAttributes.d.ts +0 -2
- package/dist/types/utils/getStorageAttributes.d.ts.map +1 -1
- package/dist/types/utils/getUsedNodeTypes.d.ts +0 -2
- package/dist/types/utils/getUsedNodeTypes.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +15 -11
- package/dist/types/utils/isPackageInstalled.d.ts +0 -2
- package/dist/types/utils/isPackageInstalled.d.ts.map +1 -1
- package/dist/types/utils/logStack.d.ts +0 -2
- package/dist/types/utils/logStack.d.ts.map +1 -1
- package/dist/types/utils/normalizePath.d.ts +0 -2
- package/dist/types/utils/normalizePath.d.ts.map +1 -1
- package/dist/types/utils/pLimit.d.ts +13 -0
- package/dist/types/utils/pLimit.d.ts.map +1 -0
- package/dist/types/utils/parallelize.d.ts +2 -0
- package/dist/types/utils/parallelize.d.ts.map +1 -0
- package/dist/types/utils/parseFilePathPattern.d.ts +0 -2
- package/dist/types/utils/parseFilePathPattern.d.ts.map +1 -1
- package/dist/types/utils/pathSecurity.d.ts +0 -2
- package/dist/types/utils/pathSecurity.d.ts.map +1 -1
- package/dist/types/utils/retryManager.d.ts +0 -2
- package/dist/types/utils/retryManager.d.ts.map +1 -1
- package/dist/types/utils/setIntlayerIdentifier.d.ts +1 -2
- package/dist/types/utils/setIntlayerIdentifier.d.ts.map +1 -1
- package/dist/types/utils/stringFormatter/camelCaseToKebabCase.d.ts +0 -2
- package/dist/types/utils/stringFormatter/camelCaseToKebabCase.d.ts.map +1 -1
- package/dist/types/utils/stringFormatter/camelCaseToSentence.d.ts +0 -2
- package/dist/types/utils/stringFormatter/camelCaseToSentence.d.ts.map +1 -1
- package/dist/types/utils/stringFormatter/kebabCaseToCamelCase.d.ts +0 -2
- package/dist/types/utils/stringFormatter/kebabCaseToCamelCase.d.ts.map +1 -1
- package/dist/types/utils/stringFormatter/toLowerCamelCase.d.ts +0 -2
- package/dist/types/utils/stringFormatter/toLowerCamelCase.d.ts.map +1 -1
- package/package.json +73 -73
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/utils/chunkArray.ts
|
|
2
|
+
/**
|
|
3
|
+
* Splits an array into consecutive chunks of at most `chunkSize` items.
|
|
4
|
+
*
|
|
5
|
+
* The last chunk holds the remainder and may be smaller. An empty input, or a
|
|
6
|
+
* `chunkSize` lower than 1, returns an empty list of chunks.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* chunkArray(['a', 'b', 'c', 'd', 'e'], 2); // [['a', 'b'], ['c', 'd'], ['e']]
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
const chunkArray = (items, chunkSize) => {
|
|
14
|
+
if (chunkSize < 1) return [];
|
|
15
|
+
const chunks = [];
|
|
16
|
+
for (let index = 0; index < items.length; index += chunkSize) chunks.push(items.slice(index, index + chunkSize));
|
|
17
|
+
return chunks;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { chunkArray };
|
|
21
|
+
//# sourceMappingURL=chunkArray.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunkArray.mjs","names":[],"sources":["../../../src/utils/chunkArray.ts"],"sourcesContent":["/**\n * Splits an array into consecutive chunks of at most `chunkSize` items.\n *\n * The last chunk holds the remainder and may be smaller. An empty input, or a\n * `chunkSize` lower than 1, returns an empty list of chunks.\n *\n * @example\n * ```ts\n * chunkArray(['a', 'b', 'c', 'd', 'e'], 2); // [['a', 'b'], ['c', 'd'], ['e']]\n * ```\n */\nexport const chunkArray = <T>(items: T[], chunkSize: number): T[][] => {\n if (chunkSize < 1) return [];\n\n const chunks: T[][] = [];\n\n for (let index = 0; index < items.length; index += chunkSize) {\n chunks.push(items.slice(index, index + chunkSize));\n }\n\n return chunks;\n};\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,cAAiB,OAAY,cAA6B;CACrE,IAAI,YAAY,GAAG,OAAO,CAAC;CAE3B,MAAM,SAAgB,CAAC;CAEvB,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS,WACjD,OAAO,KAAK,MAAM,MAAM,OAAO,QAAQ,SAAS,CAAC;CAGnD,OAAO;AACT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { configESMxCJSRequire } from "./ESMxCJSHelpers.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/utils/clearModuleCache.ts
|
|
4
4
|
/**
|
|
5
5
|
* Recursively clears the require cache for a module and all its dependencies
|
|
6
6
|
*/
|
|
@@ -21,6 +21,5 @@ const clearModuleCache = (modulePath, visited = /* @__PURE__ */ new Set()) => {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
//#endregion
|
|
25
24
|
export { clearModuleCache };
|
|
26
25
|
//# sourceMappingURL=clearModuleCache.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/compareVersions.ts
|
|
2
2
|
/**
|
|
3
3
|
* Compare two semver-like version strings (e.g. "15.10.4" vs "15.3.5").
|
|
4
4
|
*
|
|
@@ -32,6 +32,5 @@ const compareVersions = (version1, comparison, version2) => {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
//#endregion
|
|
36
35
|
export { compareVersions };
|
|
37
36
|
//# sourceMappingURL=compareVersions.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/extractErrorMessage.ts
|
|
2
2
|
const extractErrorMessage = (error) => {
|
|
3
3
|
const trimToSingleLine = (text) => text.split(/\r?\n/).map((stringValue) => stringValue.trim()).filter(Boolean)[0] ?? text.trim();
|
|
4
4
|
const looksLikeJson = (value) => {
|
|
@@ -97,6 +97,5 @@ const extractErrorMessage = (error) => {
|
|
|
97
97
|
return "An unknown error occurred";
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
//#endregion
|
|
101
100
|
export { extractErrorMessage };
|
|
102
101
|
//# sourceMappingURL=extractErrorMessage.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/getDictionarySelectorUsage.ts
|
|
2
2
|
/**
|
|
3
3
|
* Detects whether any built dictionary declares qualifier dimensions
|
|
4
4
|
* (collections or variants).
|
|
@@ -21,6 +21,5 @@ const getHasDictionarySelector = (dictionaries) => {
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
//#endregion
|
|
25
24
|
export { getHasDictionarySelector };
|
|
26
25
|
//# sourceMappingURL=getDictionarySelectorUsage.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/getExtension.ts
|
|
2
2
|
const getExtension = (configuration, format) => {
|
|
3
3
|
const outputFormats = configuration.build.outputFormat;
|
|
4
4
|
if (format === "cjs") return "cjs";
|
|
@@ -8,6 +8,5 @@ const getExtension = (configuration, format) => {
|
|
|
8
8
|
return "cjs";
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
//#endregion
|
|
12
11
|
export { getExtension };
|
|
13
12
|
//# sourceMappingURL=getExtension.mjs.map
|
|
@@ -2,7 +2,7 @@ import { cacheMemory } from "./cacheMemory.mjs";
|
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/utils/getPackageJsonPath.ts
|
|
6
6
|
const MAX_LEVELS = 15;
|
|
7
7
|
const getPackageJsonPath = (startDir = process.cwd()) => {
|
|
8
8
|
const checkedCache = cacheMemory.get("packageJsonPath", startDir);
|
|
@@ -27,6 +27,5 @@ const getPackageJsonPath = (startDir = process.cwd()) => {
|
|
|
27
27
|
throw new Error(`Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
//#endregion
|
|
31
30
|
export { getPackageJsonPath };
|
|
32
31
|
//# sourceMappingURL=getPackageJsonPath.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { COOKIE_NAME, HEADER_NAME, LOCALE_STORAGE_NAME } from "../defaultValues/routing.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/utils/getStorageAttributes.ts
|
|
4
4
|
/** Number of seconds in a day, used to convert a `number` of days. */
|
|
5
5
|
const SECONDS_PER_DAY = 86400;
|
|
6
6
|
/**
|
|
@@ -108,6 +108,5 @@ const getStorageAttributes = (options) => {
|
|
|
108
108
|
return cleanedResult;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
//#endregion
|
|
112
111
|
export { getStorageAttributes };
|
|
113
112
|
//# sourceMappingURL=getStorageAttributes.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PLUGIN_NODE_TYPES, PREACT_NODE, REACT_NODE, SOLID_NODE } from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/utils/getUsedNodeTypes.ts
|
|
4
4
|
/**
|
|
5
5
|
* Detect whether a plain object looks like a serialized React element.
|
|
6
6
|
* React serializes JSX as: { key, props, _owner, _store }.
|
|
@@ -62,6 +62,5 @@ const getUnusedNodeTypesAsync = async (dictionaries) => {
|
|
|
62
62
|
return PLUGIN_NODE_TYPES.filter((nodeType) => !usedNodeTypes.includes(nodeType));
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
//#endregion
|
|
66
65
|
export { getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync };
|
|
67
66
|
//# sourceMappingURL=getUsedNodeTypes.mjs.map
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import { getStorageAttributes } from "./getStorageAttributes.mjs";
|
|
2
|
-
import { extractErrorMessage } from "./extractErrorMessage.mjs";
|
|
3
|
-
import { logStack } from "./logStack.mjs";
|
|
4
|
-
import { normalizePath } from "./normalizePath.mjs";
|
|
5
|
-
import { setIntlayerIdentifier } from "./setIntlayerIdentifier.mjs";
|
|
6
|
-
import { camelCaseToKebabCase } from "./stringFormatter/camelCaseToKebabCase.mjs";
|
|
7
|
-
import { camelCaseToSentence } from "./stringFormatter/camelCaseToSentence.mjs";
|
|
8
|
-
import { kebabCaseToCamelCase } from "./stringFormatter/kebabCaseToCamelCase.mjs";
|
|
9
|
-
import { toLowerCamelCase } from "./stringFormatter/toLowerCamelCase.mjs";
|
|
10
|
-
import { getExtension } from "./getExtension.mjs";
|
|
11
1
|
import { getAlias } from "./alias.mjs";
|
|
12
2
|
import { BUILT_CONFIG_KEYS } from "./builtConfigKeys.mjs";
|
|
13
|
-
import { cacheMemory, clearAllCache, clearCache, computeKeyId, getCache, setCache, stableStringify } from "./cacheMemory.mjs";
|
|
14
3
|
import { cacheDisk, clearDiskCacheMemory } from "./cacheDisk.mjs";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
4
|
+
import { cacheMemory, clearAllCache, clearCache, computeKeyId, getCache, setCache, stableStringify } from "./cacheMemory.mjs";
|
|
5
|
+
import { chunkArray } from "./chunkArray.mjs";
|
|
17
6
|
import { clearModuleCache } from "./clearModuleCache.mjs";
|
|
18
7
|
import { compareVersions } from "./compareVersions.mjs";
|
|
8
|
+
import { configESMxCJSRequire, getProjectRequire, isESModule } from "./ESMxCJSHelpers.mjs";
|
|
9
|
+
import { camelCaseToKebabCase } from "./stringFormatter/camelCaseToKebabCase.mjs";
|
|
10
|
+
import { camelCaseToSentence } from "./stringFormatter/camelCaseToSentence.mjs";
|
|
11
|
+
import { kebabCaseToCamelCase } from "./stringFormatter/kebabCaseToCamelCase.mjs";
|
|
12
|
+
import { toLowerCamelCase } from "./stringFormatter/toLowerCamelCase.mjs";
|
|
13
|
+
import { extractErrorMessage } from "./extractErrorMessage.mjs";
|
|
19
14
|
import { getHasDictionarySelector } from "./getDictionarySelectorUsage.mjs";
|
|
15
|
+
import { getExtension } from "./getExtension.mjs";
|
|
16
|
+
import { getPackageJsonPath } from "./getPackageJsonPath.mjs";
|
|
17
|
+
import { getStorageAttributes } from "./getStorageAttributes.mjs";
|
|
20
18
|
import { getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync } from "./getUsedNodeTypes.mjs";
|
|
21
19
|
import { isPackageInstalled } from "./isPackageInstalled.mjs";
|
|
20
|
+
import { logStack } from "./logStack.mjs";
|
|
21
|
+
import { normalizePath } from "./normalizePath.mjs";
|
|
22
|
+
import { parallelize } from "./parallelize.mjs";
|
|
22
23
|
import { parseFilePathPattern, parseStringPattern } from "./parseFilePathPattern.mjs";
|
|
23
24
|
import { assertPathWithin } from "./pathSecurity.mjs";
|
|
25
|
+
import { Queue, pLimit } from "./pLimit.mjs";
|
|
24
26
|
import { retryManager } from "./retryManager.mjs";
|
|
27
|
+
import { setIntlayerIdentifier } from "./setIntlayerIdentifier.mjs";
|
|
25
28
|
|
|
26
|
-
export { BUILT_CONFIG_KEYS, assertPathWithin, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearDiskCacheMemory, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getHasDictionarySelector, getPackageJsonPath, getProjectRequire, getStorageAttributes, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync, isESModule, isPackageInstalled, kebabCaseToCamelCase, logStack, normalizePath, parseFilePathPattern, parseStringPattern, retryManager, setCache, setIntlayerIdentifier, stableStringify, toLowerCamelCase };
|
|
29
|
+
export { BUILT_CONFIG_KEYS, Queue, assertPathWithin, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, chunkArray, clearAllCache, clearCache, clearDiskCacheMemory, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getHasDictionarySelector, getPackageJsonPath, getProjectRequire, getStorageAttributes, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync, isESModule, isPackageInstalled, kebabCaseToCamelCase, logStack, normalizePath, pLimit, parallelize, parseFilePathPattern, parseStringPattern, retryManager, setCache, setIntlayerIdentifier, stableStringify, toLowerCamelCase };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getProjectRequire } from "./ESMxCJSHelpers.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/utils/isPackageInstalled.ts
|
|
4
4
|
/**
|
|
5
5
|
* Checks whether a package can be resolved from the user project.
|
|
6
6
|
*
|
|
@@ -33,6 +33,5 @@ const isPackageInstalled = (packageName, baseDir) => {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
//#endregion
|
|
37
36
|
export { isPackageInstalled };
|
|
38
37
|
//# sourceMappingURL=isPackageInstalled.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BLUE, YELLOW } from "../colors.mjs";
|
|
2
2
|
import { colorize } from "../logger.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/utils/logStack.ts
|
|
5
5
|
const logStack = (message, options = { limit: 50 }) => {
|
|
6
6
|
Error.stackTraceLimit = options.limit;
|
|
7
7
|
try {
|
|
@@ -12,6 +12,5 @@ const logStack = (message, options = { limit: 50 }) => {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
//#endregion
|
|
16
15
|
export { logStack };
|
|
17
16
|
//# sourceMappingURL=logStack.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/normalizePath.ts
|
|
2
2
|
/**
|
|
3
3
|
* Normalize a path for glob by replacing backslashes with forward slashes
|
|
4
4
|
*
|
|
@@ -11,6 +11,5 @@
|
|
|
11
11
|
*/
|
|
12
12
|
const normalizePath = (path) => path.replace(/\\/g, "/");
|
|
13
13
|
|
|
14
|
-
//#endregion
|
|
15
14
|
export { normalizePath };
|
|
16
15
|
//# sourceMappingURL=normalizePath.mjs.map
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// src/utils/pLimit.ts
|
|
2
|
+
var Node = class {
|
|
3
|
+
value;
|
|
4
|
+
next;
|
|
5
|
+
constructor(value) {
|
|
6
|
+
this.value = value;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
var Queue = class {
|
|
10
|
+
#head;
|
|
11
|
+
#tail;
|
|
12
|
+
#size;
|
|
13
|
+
constructor() {
|
|
14
|
+
this.clear();
|
|
15
|
+
}
|
|
16
|
+
enqueue(value) {
|
|
17
|
+
const node = new Node(value);
|
|
18
|
+
if (this.#head) {
|
|
19
|
+
this.#tail.next = node;
|
|
20
|
+
this.#tail = node;
|
|
21
|
+
} else {
|
|
22
|
+
this.#head = node;
|
|
23
|
+
this.#tail = node;
|
|
24
|
+
}
|
|
25
|
+
this.#size++;
|
|
26
|
+
}
|
|
27
|
+
dequeue() {
|
|
28
|
+
const current = this.#head;
|
|
29
|
+
if (!current) return;
|
|
30
|
+
this.#head = current.next;
|
|
31
|
+
this.#size--;
|
|
32
|
+
return current.value;
|
|
33
|
+
}
|
|
34
|
+
peek() {
|
|
35
|
+
if (!this.#head) return;
|
|
36
|
+
return this.#head.value;
|
|
37
|
+
}
|
|
38
|
+
clear() {
|
|
39
|
+
this.#head = void 0;
|
|
40
|
+
this.#tail = void 0;
|
|
41
|
+
this.#size = 0;
|
|
42
|
+
}
|
|
43
|
+
get size() {
|
|
44
|
+
return this.#size;
|
|
45
|
+
}
|
|
46
|
+
*[Symbol.iterator]() {
|
|
47
|
+
let current = this.#head;
|
|
48
|
+
while (current) {
|
|
49
|
+
yield current.value;
|
|
50
|
+
current = current.next;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
*drain() {
|
|
54
|
+
while (this.#head) yield this.dequeue();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const pLimit = (concurrency) => {
|
|
58
|
+
validateConcurrency(concurrency);
|
|
59
|
+
const queue = new Queue();
|
|
60
|
+
let activeCount = 0;
|
|
61
|
+
const idleWaiters = [];
|
|
62
|
+
const notifyIdleIfNeeded = () => {
|
|
63
|
+
if (activeCount === 0 && queue.size === 0) while (idleWaiters.length) idleWaiters.pop()?.();
|
|
64
|
+
};
|
|
65
|
+
const resumeNext = () => {
|
|
66
|
+
if (activeCount < concurrency && queue.size > 0) {
|
|
67
|
+
activeCount++;
|
|
68
|
+
queue.dequeue()?.();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const next = () => {
|
|
72
|
+
activeCount--;
|
|
73
|
+
resumeNext();
|
|
74
|
+
};
|
|
75
|
+
const run = async (fn, resolve, arguments_) => {
|
|
76
|
+
const result = (async () => fn(...arguments_))();
|
|
77
|
+
resolve(result);
|
|
78
|
+
try {
|
|
79
|
+
await result;
|
|
80
|
+
} catch {}
|
|
81
|
+
next();
|
|
82
|
+
};
|
|
83
|
+
const enqueue = (fn, resolve, arguments_) => {
|
|
84
|
+
new Promise((internalResolve) => {
|
|
85
|
+
queue.enqueue(internalResolve);
|
|
86
|
+
}).then(run.bind(void 0, fn, resolve, arguments_));
|
|
87
|
+
if (activeCount < concurrency) resumeNext();
|
|
88
|
+
};
|
|
89
|
+
const generator = (fn, ...arguments_) => new Promise((resolve) => {
|
|
90
|
+
enqueue(fn, resolve, arguments_);
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperties(generator, {
|
|
93
|
+
activeCount: { get: () => activeCount },
|
|
94
|
+
pendingCount: { get: () => queue.size },
|
|
95
|
+
clearQueue: { value() {
|
|
96
|
+
queue.clear();
|
|
97
|
+
notifyIdleIfNeeded();
|
|
98
|
+
} },
|
|
99
|
+
concurrency: {
|
|
100
|
+
get: () => concurrency,
|
|
101
|
+
set(newConcurrency) {
|
|
102
|
+
validateConcurrency(newConcurrency);
|
|
103
|
+
concurrency = newConcurrency;
|
|
104
|
+
queueMicrotask(() => {
|
|
105
|
+
while (activeCount < concurrency && queue.size > 0) resumeNext();
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
map: { async value(array, fn) {
|
|
110
|
+
const promises = array.map((value, index) => this(fn, value, index));
|
|
111
|
+
return Promise.all(promises);
|
|
112
|
+
} },
|
|
113
|
+
onIdle: {
|
|
114
|
+
/**
|
|
115
|
+
* Resolves when `activeCount === 0` and the queue is empty.
|
|
116
|
+
* Use this to wait for completion without holding a list of Promises.
|
|
117
|
+
*/
|
|
118
|
+
value() {
|
|
119
|
+
if (activeCount === 0 && queue.size === 0) return Promise.resolve();
|
|
120
|
+
return new Promise((resolve) => idleWaiters.push(resolve));
|
|
121
|
+
} }
|
|
122
|
+
});
|
|
123
|
+
return generator;
|
|
124
|
+
};
|
|
125
|
+
const validateConcurrency = (concurrency) => {
|
|
126
|
+
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export { Queue, pLimit };
|
|
130
|
+
//# sourceMappingURL=pLimit.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pLimit.mjs","names":[],"sources":["../../../src/utils/pLimit.ts"],"sourcesContent":["/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node<T> {\n value: T;\n next: Node<T> | undefined;\n\n constructor(value: T) {\n this.value = value;\n }\n}\n\nexport class Queue<T> {\n #head: Node<T> | undefined;\n #tail: Node<T> | undefined;\n #size!: number;\n\n constructor() {\n this.clear();\n }\n\n enqueue(value: T): void {\n const node = new Node(value);\n\n if (this.#head) {\n this.#tail!.next = node;\n this.#tail = node;\n } else {\n this.#head = node;\n this.#tail = node;\n }\n\n this.#size++;\n }\n\n dequeue(): T | undefined {\n const current = this.#head;\n if (!current) {\n return;\n }\n\n this.#head = current.next;\n this.#size--;\n return current.value;\n }\n\n peek(): T | undefined {\n if (!this.#head) {\n return;\n }\n\n return this.#head.value;\n\n // TODO: Node.js 18.\n // return this.#head?.value;\n }\n\n clear(): void {\n this.#head = undefined;\n this.#tail = undefined;\n this.#size = 0;\n }\n\n get size(): number {\n return this.#size;\n }\n\n *[Symbol.iterator](): Generator<T, void, unknown> {\n let current = this.#head;\n\n while (current) {\n yield current.value;\n current = current.next;\n }\n }\n\n *drain(): Generator<T | undefined, void, unknown> {\n while (this.#head) {\n yield this.dequeue();\n }\n }\n}\n\nexport const pLimit = (concurrency: number) => {\n validateConcurrency(concurrency);\n\n const queue = new Queue<() => void>();\n let activeCount = 0;\n\n const idleWaiters: Array<() => void> = [];\n const notifyIdleIfNeeded = (): void => {\n if (activeCount === 0 && queue.size === 0) {\n while (idleWaiters.length) idleWaiters.pop()?.();\n }\n };\n\n const resumeNext = (): void => {\n // Process the next queued function if we're under the concurrency limit\n if (activeCount < concurrency && queue.size > 0) {\n activeCount++;\n queue.dequeue()?.();\n }\n };\n\n const next = (): void => {\n activeCount--;\n resumeNext();\n };\n\n const run = async (\n fn: (...args: any[]) => Promise<any>,\n resolve: (value: Promise<any>) => void,\n arguments_: any[]\n ): Promise<void> => {\n // Execute the function and capture the result promise\n const result = (async () => fn(...arguments_))();\n\n // Resolve immediately with the promise (don't wait for completion)\n resolve(result);\n\n // Wait for the function to complete (success or failure)\n // We catch errors here to prevent unhandled rejections,\n // but the original promise rejection is preserved for the caller\n try {\n await result;\n } catch {}\n\n // Decrement active count and process next queued function\n next();\n };\n\n const enqueue = (\n fn: (...args: any[]) => Promise<any>,\n resolve: (value: Promise<any>) => void,\n arguments_: any[]\n ): void => {\n // Queue the internal resolve function instead of the run function\n // to preserve the asynchronous execution context.\n new Promise<void>((internalResolve) => {\n queue.enqueue(internalResolve);\n }).then(run.bind(undefined, fn, resolve, arguments_));\n\n // Start processing immediately if we haven't reached the concurrency limit\n if (activeCount < concurrency) {\n resumeNext();\n }\n };\n\n const generator = (\n fn: (...args: any[]) => Promise<any>,\n ...arguments_: any[]\n ): Promise<any> =>\n new Promise<any>((resolve) => {\n enqueue(fn, resolve, arguments_);\n });\n\n Object.defineProperties(generator, {\n activeCount: {\n get: () => activeCount,\n },\n pendingCount: {\n get: () => queue.size,\n },\n clearQueue: {\n value() {\n queue.clear();\n notifyIdleIfNeeded();\n },\n },\n concurrency: {\n get: () => concurrency,\n\n set(newConcurrency: number) {\n validateConcurrency(newConcurrency);\n concurrency = newConcurrency;\n\n queueMicrotask(() => {\n while (activeCount < concurrency && queue.size > 0) {\n resumeNext();\n }\n });\n },\n },\n map: {\n async value<T, R>(\n array: T[],\n fn: (value: T, index: number) => Promise<R>\n ): Promise<R[]> {\n const promises = array.map((value, index) => this(fn, value, index));\n return Promise.all(promises);\n },\n },\n onIdle: {\n /**\n * Resolves when `activeCount === 0` and the queue is empty.\n * Use this to wait for completion without holding a list of Promises.\n */\n value(): Promise<void> {\n if (activeCount === 0 && queue.size === 0) return Promise.resolve();\n return new Promise<void>((resolve) => idleWaiters.push(resolve));\n },\n },\n });\n\n return generator;\n};\n\nconst validateConcurrency = (concurrency: number): void => {\n if (\n !(\n (Number.isInteger(concurrency) ||\n concurrency === Number.POSITIVE_INFINITY) &&\n concurrency > 0\n )\n ) {\n throw new TypeError('Expected `concurrency` to be a number from 1 and up');\n }\n};\n"],"mappings":";AAKA,IAAM,OAAN,MAAc;CACZ;CACA;CAEA,YAAY,OAAU;EACpB,KAAK,QAAQ;CACf;AACF;AAEA,IAAa,QAAb,MAAsB;CACpB;CACA;CACA;CAEA,cAAc;EACZ,KAAK,MAAM;CACb;CAEA,QAAQ,OAAgB;EACtB,MAAM,OAAO,IAAI,KAAK,KAAK;EAE3B,IAAI,KAAK,OAAO;GACd,KAAK,MAAO,OAAO;GACnB,KAAK,QAAQ;EACf,OAAO;GACL,KAAK,QAAQ;GACb,KAAK,QAAQ;EACf;EAEA,KAAK;CACP;CAEA,UAAyB;EACvB,MAAM,UAAU,KAAK;EACrB,IAAI,CAAC,SACH;EAGF,KAAK,QAAQ,QAAQ;EACrB,KAAK;EACL,OAAO,QAAQ;CACjB;CAEA,OAAsB;EACpB,IAAI,CAAC,KAAK,OACR;EAGF,OAAO,KAAK,MAAM;CAIpB;CAEA,QAAc;EACZ,KAAK,QAAQ;EACb,KAAK,QAAQ;EACb,KAAK,QAAQ;CACf;CAEA,IAAI,OAAe;EACjB,OAAO,KAAK;CACd;CAEA,EAAE,OAAO,YAAyC;EAChD,IAAI,UAAU,KAAK;EAEnB,OAAO,SAAS;GACd,MAAM,QAAQ;GACd,UAAU,QAAQ;EACpB;CACF;CAEA,CAAC,QAAiD;EAChD,OAAO,KAAK,OACV,MAAM,KAAK,QAAQ;CAEvB;AACF;AAEA,MAAa,UAAU,gBAAwB;CAC7C,oBAAoB,WAAW;CAE/B,MAAM,QAAQ,IAAI,MAAkB;CACpC,IAAI,cAAc;CAElB,MAAM,cAAiC,CAAC;CACxC,MAAM,2BAAiC;EACrC,IAAI,gBAAgB,KAAK,MAAM,SAAS,GACtC,OAAO,YAAY,QAAQ,YAAY,IAAI,CAAC,GAAG;CAEnD;CAEA,MAAM,mBAAyB;EAE7B,IAAI,cAAc,eAAe,MAAM,OAAO,GAAG;GAC/C;GACA,MAAM,QAAQ,CAAC,GAAG;EACpB;CACF;CAEA,MAAM,aAAmB;EACvB;EACA,WAAW;CACb;CAEA,MAAM,MAAM,OACV,IACA,SACA,eACkB;EAElB,MAAM,UAAU,YAAY,GAAG,GAAG,UAAU,EAAC,CAAE;EAG/C,QAAQ,MAAM;EAKd,IAAI;GACF,MAAM;EACR,QAAQ,CAAC;EAGT,KAAK;CACP;CAEA,MAAM,WACJ,IACA,SACA,eACS;EAGT,IAAI,SAAe,oBAAoB;GACrC,MAAM,QAAQ,eAAe;EAC/B,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,QAAW,IAAI,SAAS,UAAU,CAAC;EAGpD,IAAI,cAAc,aAChB,WAAW;CAEf;CAEA,MAAM,aACJ,IACA,GAAG,eAEH,IAAI,SAAc,YAAY;EAC5B,QAAQ,IAAI,SAAS,UAAU;CACjC,CAAC;CAEH,OAAO,iBAAiB,WAAW;EACjC,aAAa,EACX,WAAW,YACb;EACA,cAAc,EACZ,WAAW,MAAM,KACnB;EACA,YAAY,EACV,QAAQ;GACN,MAAM,MAAM;GACZ,mBAAmB;EACrB,EACF;EACA,aAAa;GACX,WAAW;GAEX,IAAI,gBAAwB;IAC1B,oBAAoB,cAAc;IAClC,cAAc;IAEd,qBAAqB;KACnB,OAAO,cAAc,eAAe,MAAM,OAAO,GAC/C,WAAW;IAEf,CAAC;GACH;EACF;EACA,KAAK,EACH,MAAM,MACJ,OACA,IACc;GACd,MAAM,WAAW,MAAM,KAAK,OAAO,UAAU,KAAK,IAAI,OAAO,KAAK,CAAC;GACnE,OAAO,QAAQ,IAAI,QAAQ;EAC7B,EACF;EACA,QAAQ;;;;;AAKN,QAAuB;GACrB,IAAI,gBAAgB,KAAK,MAAM,SAAS,GAAG,OAAO,QAAQ,QAAQ;GAClE,OAAO,IAAI,SAAe,YAAY,YAAY,KAAK,OAAO,CAAC;EACjE,EACF;CACF,CAAC;CAED,OAAO;AACT;AAEA,MAAM,uBAAuB,gBAA8B;CACzD,IACE,GACG,OAAO,UAAU,WAAW,KAC3B,gBAAgB,OAAO,sBACzB,cAAc,IAGhB,MAAM,IAAI,UAAU,qDAAqD;AAE7E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { pLimit } from "./pLimit.mjs";
|
|
2
|
+
|
|
3
|
+
// src/utils/parallelize.ts
|
|
4
|
+
const parallelize = async (items, callback = async (item) => item, parallelLimit = 10) => {
|
|
5
|
+
const limit = pLimit(parallelLimit);
|
|
6
|
+
return Promise.all(items.map((item) => limit(() => callback(item))));
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { parallelize };
|
|
10
|
+
//# sourceMappingURL=parallelize.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parallelize.mjs","names":[],"sources":["../../../src/utils/parallelize.ts"],"sourcesContent":["import { pLimit } from './pLimit';\n\nexport const parallelize = async <T, R>(\n items: T[],\n callback: (item: T) => Promise<R> = async (item) =>\n item as unknown as Promise<R>,\n parallelLimit: number = 10\n): Promise<R[]> => {\n const limit = pLimit(parallelLimit);\n return Promise.all(items.map((item) => limit(() => callback(item))));\n};\n"],"mappings":";;;AAEA,MAAa,cAAc,OACzB,OACA,WAAoC,OAAO,SACzC,MACF,gBAAwB,OACP;CACjB,MAAM,QAAQ,OAAO,aAAa;CAClC,OAAO,QAAQ,IAAI,MAAM,KAAK,SAAS,YAAY,SAAS,IAAI,CAAC,CAAC,CAAC;AACrE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/parseFilePathPattern.ts
|
|
2
2
|
/**
|
|
3
3
|
* Parses a FilePathPattern configuration string or function to a final string path.
|
|
4
4
|
* Resolves context variables like `{{locale}}`, `{{key}}`, `{{fileName}}`, `{{extension}}`.
|
|
@@ -17,6 +17,5 @@ const parseFilePathPattern = async (pattern, context) => {
|
|
|
17
17
|
};
|
|
18
18
|
const parseStringPattern = (pattern, context) => pattern.replaceAll(/\{\{\s*locale\s*\}\}/g, context.locale ?? "").replaceAll(/\{\{\s*key\s*\}\}/g, context.key ?? "").replaceAll(/\{\{\s*fileName\s*\}\}/g, context.fileName ?? "").replaceAll(/\{\{\s*extension\s*\}\}/g, context.extension ?? "").replaceAll(/\{\{\s*componentFileName\s*\}\}/g, context.componentFileName ?? "").replaceAll(/\{\{\s*componentExtension\s*\}\}/g, context.componentExtension ?? "").replaceAll(/\{\{\s*format\s*\}\}/g, context.format ?? "").replaceAll(/\{\{\s*componentFormat\s*\}\}/g, context.componentFormat ?? "").replaceAll(/\{\{\s*componentDirPath\s*\}\}/g, context.componentDirPath ?? "");
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { parseFilePathPattern, parseStringPattern };
|
|
22
21
|
//# sourceMappingURL=parseFilePathPattern.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve, sep } from "node:path";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/utils/pathSecurity.ts
|
|
4
4
|
/**
|
|
5
5
|
* Throws if `resolvedPath` escapes `baseDir`.
|
|
6
6
|
* Use this before any file operation whose path is derived from user-controlled
|
|
@@ -13,6 +13,5 @@ const assertPathWithin = (resolvedPath, baseDir) => {
|
|
|
13
13
|
if (normalizedPath !== normalizedBase && !normalizedPath.startsWith(normalizedBase + sep)) throw new Error(`Path traversal detected: "${resolvedPath}" escapes the base directory "${baseDir}"`);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { assertPathWithin };
|
|
18
17
|
//# sourceMappingURL=pathSecurity.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { extractErrorMessage } from "./extractErrorMessage.mjs";
|
|
2
1
|
import { logger } from "../logger.mjs";
|
|
2
|
+
import { extractErrorMessage } from "./extractErrorMessage.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/utils/retryManager.ts
|
|
5
5
|
const DEFAULT_MAX_RETRY = 3;
|
|
6
6
|
const DEFAULT_DELAY = 0;
|
|
7
7
|
/**
|
|
@@ -51,6 +51,5 @@ const retryManager = (fn, { maxRetry = DEFAULT_MAX_RETRY, delay = DEFAULT_DELAY,
|
|
|
51
51
|
throw lastError ?? /* @__PURE__ */ new Error("Unexpected: retry loop completed without result");
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
//#endregion
|
|
55
54
|
export { retryManager };
|
|
56
55
|
//# sourceMappingURL=retryManager.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/setIntlayerIdentifier.ts
|
|
2
2
|
/**
|
|
3
3
|
* Sets the version of Intlayer in the window object.
|
|
4
4
|
* This is used for Intlayer detection in the browser.
|
|
@@ -7,6 +7,5 @@ const setIntlayerIdentifier = () => {
|
|
|
7
7
|
if (typeof window !== "undefined") window.intlayer = { enabled: true };
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
//#endregion
|
|
11
10
|
export { setIntlayerIdentifier };
|
|
12
11
|
//# sourceMappingURL=setIntlayerIdentifier.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/stringFormatter/camelCaseToKebabCase.ts
|
|
2
2
|
/**
|
|
3
3
|
* Convert a string to kebab-case
|
|
4
4
|
* e.g. "MyNewComponent" => "my-new-component"
|
|
@@ -7,6 +7,5 @@ const camelCaseToKebabCase = (str) => {
|
|
|
7
7
|
return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
//#endregion
|
|
11
10
|
export { camelCaseToKebabCase };
|
|
12
11
|
//# sourceMappingURL=camelCaseToKebabCase.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/stringFormatter/camelCaseToSentence.ts
|
|
2
2
|
/**
|
|
3
3
|
* Convert a string to sentence case
|
|
4
4
|
* e.g. 'my-new-component' → 'My new component'
|
|
@@ -10,6 +10,5 @@ const camelCaseToSentence = (value) => {
|
|
|
10
10
|
return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase();
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
//#endregion
|
|
14
13
|
export { camelCaseToSentence };
|
|
15
14
|
//# sourceMappingURL=camelCaseToSentence.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/stringFormatter/kebabCaseToCamelCase.ts
|
|
2
2
|
const kebabCaseToCamelCase = (name) => {
|
|
3
3
|
return name.split(/[^a-zA-Z0-9]+/).filter(Boolean).map((word) => {
|
|
4
4
|
const lowerWord = word.toLowerCase();
|
|
@@ -8,6 +8,5 @@ const kebabCaseToCamelCase = (name) => {
|
|
|
8
8
|
}).join("");
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
//#endregion
|
|
12
11
|
export { kebabCaseToCamelCase };
|
|
13
12
|
//# sourceMappingURL=kebabCaseToCamelCase.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/stringFormatter/toLowerCamelCase.ts
|
|
2
2
|
/**
|
|
3
3
|
* Convert a string to lowerCamelCase
|
|
4
4
|
* e.g. "MyComponent" => "myComponent"
|
|
@@ -13,6 +13,5 @@ const toLowerCamelCase = (str) => {
|
|
|
13
13
|
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { toLowerCamelCase };
|
|
18
17
|
//# sourceMappingURL=toLowerCamelCase.mjs.map
|
package/dist/types/built.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/built.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* @intlayer/config/built is a package that only returns the configuration file as a JSON object.
|
|
4
3
|
* Using an external package allow to alias it in the bundle configuration (such as webpack).
|
|
@@ -16,5 +15,4 @@ export declare const build: import("@intlayer/types/config").BuildConfig;
|
|
|
16
15
|
export declare const compiler: import("@intlayer/types/config").CompilerConfig;
|
|
17
16
|
export declare const schemas: Record<string, import("@intlayer/types/config").ConfigSchema>;
|
|
18
17
|
export declare const plugins: import("@intlayer/types/plugin").Plugin[];
|
|
19
|
-
//#endregion
|
|
20
18
|
//# 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":";;;;qBAea,uDAAoB;qBACpB,YAAU,yCAAA;qBACV,0CAAO;qBACP,0CAAO;qBACP,yCAAM;qBACN,yCAAM;qBACN,4CAAS;qBACT,sCAAG;qBACH,IAAE,yCAAA;qBACF,wCAAK;qBACL,2CAAQ;qBACR,SAAO,gDAAA;qBACP,0CAAO"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GetConfigurationOptions } from "../configFile/getConfiguration.js";
|
|
2
2
|
import { BuildOptions } from "esbuild";
|
|
3
|
-
//#region src/bundle/index.d.ts
|
|
4
3
|
export 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'];
|
|
5
4
|
export type BundleIntlayerOptions = {
|
|
6
5
|
outfile?: string;
|
|
@@ -16,5 +15,4 @@ export type BundleIntlayerOptions = {
|
|
|
16
15
|
* @returns The build result.
|
|
17
16
|
*/
|
|
18
17
|
export declare const bundleIntlayer: (options: BundleIntlayerOptions) => Promise<import("esbuild").BuildResult<BuildOptions>>;
|
|
19
|
-
//#endregion
|
|
20
18
|
//# 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":";;qBAgBa;YAmBD;EACV;EACA,gBAAgB;EAChB;EACA;IACE;;;;;;;;qBASS,iBAAc,SAAmB,0BAAqB,0BAAA,YAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IntlayerConfig } from "@intlayer/types/config";
|
|
2
|
-
//#region src/bundle/logBundle.d.ts
|
|
3
2
|
export declare class BundleLogger {
|
|
4
3
|
private status;
|
|
5
4
|
private spinnerTimer;
|
|
@@ -17,5 +16,4 @@ export declare class BundleLogger {
|
|
|
17
16
|
private finish;
|
|
18
17
|
private render;
|
|
19
18
|
}
|
|
20
|
-
//#endregion
|
|
21
19
|
//# sourceMappingURL=logBundle.d.ts.map
|
|
@@ -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":";qBAKa;UACH;UAEA;UACA;UACA;UACA;mBACS;UACT;UACA;EAER,YAAY,gBAAgB;EAI5B,UAAU;EAWV,SAAS;UAOD;UAQA;UAMA;UAMA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CallerDescriptor } from "./types.js";
|
|
2
|
-
//#region src/callers/base.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Base intlayer getters — always active, independent of any compat library.
|
|
5
4
|
*
|
|
@@ -8,5 +7,4 @@ import { CallerDescriptor } from "./types.js";
|
|
|
8
7
|
* (`const { title } = useIntlayer('home')`).
|
|
9
8
|
*/
|
|
10
9
|
export declare const BASE_CALLERS: CallerDescriptor[];
|
|
11
|
-
//#endregion
|
|
12
10
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -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":";;;;;;;;qBASa,cAAc"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { CallerDescriptor } from "../types.js";
|
|
2
|
-
//#region src/callers/compat/i18next.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* i18next — `@intlayer/i18next` compat adapter.
|
|
5
4
|
*
|
|
6
5
|
* Mirrors `compat/i18next/src/plugin/index.ts` (`I18NEXT_COMPAT_CALLERS`).
|
|
7
6
|
*/
|
|
8
7
|
export declare const I18NEXT_CALLERS: CallerDescriptor[];
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=i18next.d.ts.map
|
|
@@ -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":";;;;;;qBAOa,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":";qBAwCa,gBAAgB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CallerDescriptor } from "../types.js";
|
|
2
|
-
//#region src/callers/compat/nextIntl.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* next-intl — `@intlayer/next-intl` compat adapter.
|
|
5
4
|
*
|
|
@@ -7,5 +6,4 @@ import { CallerDescriptor } from "../types.js";
|
|
|
7
6
|
* adding the `getTranslations({ locale, namespace })` object overload.
|
|
8
7
|
*/
|
|
9
8
|
export declare const NEXT_INTL_CALLERS: CallerDescriptor[];
|
|
10
|
-
//#endregion
|
|
11
9
|
//# sourceMappingURL=nextIntl.d.ts.map
|
|
@@ -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":";;;;;;;qBAQa,mBAAmB"}
|