astro-i18n-aut
Version:
The i18n integration for Astro 🧑🚀
1 lines • 20.9 kB
Source Map (JSON)
{"version":3,"sources":["../../src/edge-runtime/index.ts","../../src/edge-runtime/config.ts","../../src/edge-runtime/filterCollectionByDefaultLocale.ts","../../src/edge-runtime/getCollectionParamsSlug.ts","../../src/edge-runtime/resolveTrailingSlash.ts","../../src/edge-runtime/removeTrailingSlash.ts","../../src/edge-runtime/removeHtmlExtension.ts","../../src/edge-runtime/getAllLocaleUrls.ts","../../src/edge-runtime/getLocale.ts","../../src/edge-runtime/getLocaleUrl.ts","../../src/edge-runtime/getLocaleUrlPrefix.ts","../../src/edge-runtime/getUrlWithoutLocale.ts","../../src/shared/configs.ts"],"sourcesContent":["export {\n defaultLocale,\n locales,\n localeKeys,\n trailingSlash,\n build,\n BASE_URL,\n} from \"./config\";\nexport { filterCollectionByDefaultLocale } from \"./filterCollectionByDefaultLocale\";\nexport { getCollectionParamsSlug } from \"./getCollectionParamsSlug\";\nexport { getAllLocaleUrls } from \"./getAllLocaleUrls\";\nexport { getLocale } from \"./getLocale\";\nexport { getLocaleUrl } from \"./getLocaleUrl\";\nexport { getLocaleUrlPrefix } from \"./getLocaleUrlPrefix\";\nexport { getUrlWithoutLocale } from \"./getUrlWithoutLocale\";\nexport { resolveTrailingSlash } from \"./resolveTrailingSlash\";\nexport { defaultI18nConfig } from \"../shared\";\nexport type {\n UserI18nConfig,\n UserFilterSitemapByDefaultLocaleConfig,\n} from \"../shared\";\n","import virtualConfig from \"virtual:astro-i18n-aut\";\n\nexport const trailingSlash = virtualConfig.trailingSlash;\nexport const BASE_URL = virtualConfig.BASE_URL ? virtualConfig.BASE_URL : \"/\";\nexport const defaultLocale = virtualConfig.defaultLocale;\nexport const locales = virtualConfig.locales;\nexport const localeKeys = Object.keys(virtualConfig.locales);\nexport const redirectDefaultLocale = virtualConfig.redirectDefaultLocale;\nexport const build = virtualConfig.build;\n","import { defaultLocale } from \"./config\";\n\nexport function filterCollectionByDefaultLocale(entry: unknown) {\n if (\n typeof entry === \"object\" &&\n entry !== null &&\n \"slug\" in entry &&\n typeof entry.slug === \"string\"\n ) {\n if (entry.slug.startsWith(defaultLocale + \"/\")) {\n return true;\n }\n }\n return false;\n}\n","import { defaultLocale } from \"./config\";\n\nexport function getCollectionParamsSlug(entries: unknown[]) {\n return entries.reduce<{ params: { slug: string } }[]>(\n (accumulator, entry) => {\n if (\n typeof entry === \"object\" &&\n entry !== null &&\n \"slug\" in entry &&\n typeof entry.slug === \"string\"\n ) {\n accumulator.push({\n params: { slug: entry.slug.replace(defaultLocale + \"/\", \"\") },\n });\n }\n return accumulator;\n },\n []\n );\n}\n","import { trailingSlash } from \"./config\";\n\nexport function resolveTrailingSlash(url: URL | string): string {\n let pathName = typeof url === \"string\" ? url : url.pathname;\n\n if (trailingSlash === \"always\") {\n if (pathName.at(-1) !== \"/\") {\n pathName = pathName + \"/\";\n }\n } else if (trailingSlash === \"never\") {\n if (pathName !== \"/\" && pathName.at(-1) === \"/\") {\n pathName = pathName.slice(0, -1);\n }\n }\n return pathName;\n}\n","export function removeTrailingSlash(url: string) {\n return url.at(-1) === \"/\" ? url.slice(0, -1) : url;\n}\n","export function removeHtmlExtension(url: string) {\n return url.endsWith(\".html\") ? url.slice(0, -\".html\".length) : url;\n}\n","import {\n // astro `BASE_URL` always starts with `/` and respects `config.trailingSlash`\n BASE_URL as baseUrl,\n defaultLocale,\n localeKeys,\n} from \"./config\";\nimport { resolveTrailingSlash } from \"./resolveTrailingSlash\";\nimport { removeTrailingSlash } from \"./removeTrailingSlash\";\nimport { removeHtmlExtension } from \"./removeHtmlExtension\";\n/**\n * @returns url with chosen locale prefix\n * * @example\n * ```ts\n * getAllLocaleUrls(\"/es/about\") // { en: \"/about\", \"es\": \"/es/about\" }\n * ```\n * @example\n * ```ts\n * getAllLocaleUrls(\"/about\") // { en: \"/about\", \"es\": \"/es/about\" }\n * ```\n */\nexport function getAllLocaleUrls(url: URL | string): Record<string, string> {\n // support both string and url objects\n const pathName = typeof url === \"string\" ? url : url.pathname;\n const pathNameWithoutHtmlExtension = removeHtmlExtension(pathName);\n\n const baseUrlWithoutTrailingSlash = removeTrailingSlash(baseUrl);\n\n // remove baseUrlWithoutTrailingSlash from pathNameWithoutBaseUrl\n let pathNameWithoutBaseUrl =\n baseUrl === \"/\"\n ? pathNameWithoutHtmlExtension\n : pathNameWithoutHtmlExtension.replace(baseUrlWithoutTrailingSlash, \"\");\n\n const possibleLocaleKey = pathNameWithoutBaseUrl.slice(1, 3);\n const pathNameWithoutBaseUrlStartsWithLocale = localeKeys\n .filter((key) => key !== defaultLocale)\n .includes(possibleLocaleKey);\n\n // avoid catching original urls that start with \"/en\" like \"/enigma\"\n if (\n pathNameWithoutBaseUrl.length === 3 &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n return {\n ...localeKeys.reduce<Record<string, string>>((record, locale) => {\n record[locale] = resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + \"/\" + locale + \"/\"\n );\n return record;\n }, {}),\n [defaultLocale]: resolveTrailingSlash(baseUrl),\n };\n }\n if (\n pathNameWithoutBaseUrl[0] === \"/\" &&\n pathNameWithoutBaseUrl[3] === \"/\" &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n // catch all \"/fr/**/*\" original urls\n return {\n ...localeKeys.reduce<Record<string, string>>((record, locale) => {\n record[locale] = resolveTrailingSlash(\n baseUrlWithoutTrailingSlash +\n \"/\" +\n locale +\n pathNameWithoutBaseUrl.slice(3)\n );\n return record;\n }, {}),\n [defaultLocale]: resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + pathNameWithoutBaseUrl.slice(3)\n ),\n };\n }\n\n // otherwise, original url must be a defaultLocale or other url\n return {\n ...localeKeys.reduce<Record<string, string>>((record, locale) => {\n record[locale] = resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + \"/\" + locale + pathNameWithoutBaseUrl\n );\n return record;\n }, {}),\n [defaultLocale]: resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + pathNameWithoutBaseUrl\n ),\n };\n}\n","import {\n // astro `BASE_URL` always starts with `/` and respects `config.trailingSlash`\n BASE_URL as baseUrl,\n defaultLocale,\n localeKeys,\n} from \"./config\";\nimport { removeHtmlExtension } from \"./removeHtmlExtension\";\nimport { removeTrailingSlash } from \"./removeTrailingSlash\";\n\n/**\n * @returns locale key\n * @example\n * ```ts\n * getLocale(\"/es/about\") // \"es\"\n * ```\n * @example\n * ```ts\n * getLocale(\"/about\") // \"en\"\n * ```\n */\nexport function getLocale(url: URL | string): string {\n // support both string and url objects\n const pathName = typeof url === \"string\" ? url : url.pathname;\n const pathNameWithoutHtmlExtension = removeHtmlExtension(pathName);\n // astro `BASE_URL` always starts with `/` and respects `config.trailingSlash`\n\n const baseUrlWithoutTrailingSlash = removeTrailingSlash(baseUrl);\n\n // remove baseUrlWithoutTrailingSlash from pathNameWithoutBaseUrl\n let pathNameWithoutBaseUrl =\n baseUrl === \"/\"\n ? pathNameWithoutHtmlExtension\n : pathNameWithoutHtmlExtension.replace(baseUrlWithoutTrailingSlash, \"\");\n\n const possibleLocaleKey = pathNameWithoutBaseUrl.slice(1, 3);\n const pathNameWithoutBaseUrlStartsWithLocale = localeKeys\n .filter((key) => key !== defaultLocale)\n .includes(possibleLocaleKey);\n\n // avoid catching urls that start with \"/en\" like \"/enigma\"\n if (\n pathNameWithoutBaseUrl.length === 3 &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n return possibleLocaleKey;\n }\n if (\n pathNameWithoutBaseUrl[0] === \"/\" &&\n pathNameWithoutBaseUrl[3] === \"/\" &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n // catch all \"/fr/**/*\" urls\n return possibleLocaleKey;\n }\n // otherwise, it must be a defaultLocale or other url\n return defaultLocale;\n}\n","import {\n // astro `BASE_URL` always starts with `/` and respects `config.trailingSlash`\n BASE_URL as baseUrl,\n defaultLocale,\n localeKeys,\n} from \"./config\";\nimport { resolveTrailingSlash } from \"./resolveTrailingSlash\";\nimport { removeTrailingSlash } from \"./removeTrailingSlash\";\nimport { removeHtmlExtension } from \"./removeHtmlExtension\";\n/**\n * @returns url with chosen locale prefix\n * * @example\n * ```ts\n * getLocaleUrl(\"/es/about\", \"en\") // \"/about\"\n * ```\n * * @example\n * ```ts\n * getLocaleUrl(\"/es/about\", \"fr\") // \"/fr/about\"\n * ```\n * @example\n * ```ts\n * getLocaleUrl(\"/about\", \"es\") // \"/es/about\"\n * ```\n */\n/**\n * @returns url with chosen locale prefix\n * * @example\n * ```ts\n * getLocaleUrl(\"/es/about\", \"en\") // \"/about\"\n * ```\n * * @example\n * ```ts\n * getLocaleUrl(\"/es/about\", \"fr\") // \"/fr/about\"\n * ```\n * @example\n * ```ts\n * getLocaleUrl(\"/about\", \"es\") // \"/es/about\"\n * ```\n */\nexport function getLocaleUrl(url: URL | string, locale: string): string {\n // support both string and url objects\n const pathName = typeof url === \"string\" ? url : url.pathname;\n const pathNameWithoutHtmlExtension = removeHtmlExtension(pathName);\n\n const baseUrlWithoutTrailingSlash = removeTrailingSlash(baseUrl);\n\n // remove baseUrlWithoutTrailingSlash from pathNameWithoutBaseUrl\n let pathNameWithoutBaseUrl =\n baseUrl === \"/\"\n ? pathNameWithoutHtmlExtension\n : pathNameWithoutHtmlExtension.replace(baseUrlWithoutTrailingSlash, \"\");\n\n const possibleLocaleKey = pathNameWithoutBaseUrl.slice(1, 3);\n const pathNameWithoutBaseUrlStartsWithLocale = localeKeys\n .filter((key) => key !== defaultLocale)\n .includes(possibleLocaleKey);\n\n // avoid catching original urls that start with \"/en\" like \"/enigma\"\n if (\n pathNameWithoutBaseUrl.length === 3 &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n if (locale === defaultLocale) {\n return resolveTrailingSlash(baseUrl);\n }\n\n return resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + \"/\" + locale + \"/\"\n );\n }\n if (\n pathNameWithoutBaseUrl[0] === \"/\" &&\n pathNameWithoutBaseUrl[3] === \"/\" &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n // catch all \"/fr/**/*\" original urls\n if (locale === defaultLocale) {\n return resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + pathNameWithoutBaseUrl.slice(3)\n );\n }\n return resolveTrailingSlash(\n baseUrlWithoutTrailingSlash +\n \"/\" +\n locale +\n pathNameWithoutBaseUrl.slice(3)\n );\n }\n // otherwise, original url must be a defaultLocale or other url\n if (locale === defaultLocale) {\n return resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + pathNameWithoutBaseUrl\n );\n }\n return resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + \"/\" + locale + pathNameWithoutBaseUrl\n );\n}\n","import {\n // astro `BASE_URL` always starts with `/` and respects `config.trailingSlash`\n BASE_URL as baseUrl,\n localeKeys,\n defaultLocale,\n} from \"./config\";\nimport { removeHtmlExtension } from \"./removeHtmlExtension\";\nimport { removeTrailingSlash } from \"./removeTrailingSlash\";\n\n/**\n * @returns locale prefix or an empty string if defaultLocale\n * @example\n * ```ts\n * getLocaleUrlPrefix(\"/es/about\") // \"/es\"\n * ```\n * @example\n * ```ts\n * getLocale(\"/about\") // \"\"\n * ```\n */\nexport function getLocaleUrlPrefix(url: URL | string): string {\n // support both string and url objects\n const pathName = typeof url === \"string\" ? url : url.pathname;\n const pathNameWithoutHtmlExtension = removeHtmlExtension(pathName);\n\n const baseUrlWithoutTrailingSlash = removeTrailingSlash(baseUrl);\n\n // remove baseUrlWithoutTrailingSlash from pathNameWithoutBaseUrl\n let pathNameWithoutBaseUrl =\n baseUrl === \"/\"\n ? pathNameWithoutHtmlExtension\n : pathNameWithoutHtmlExtension.replace(baseUrlWithoutTrailingSlash, \"\");\n\n const possibleLocaleKey = pathNameWithoutBaseUrl.slice(1, 3);\n const pathNameWithoutBaseUrlStartsWithLocale = localeKeys\n .filter((key) => key !== defaultLocale)\n .includes(possibleLocaleKey);\n\n // avoid catching urls that start with \"/en\" like \"/enigma\"\n if (\n pathNameWithoutBaseUrl.length === 3 &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n return \"/\" + possibleLocaleKey;\n }\n if (\n pathNameWithoutBaseUrl[0] === \"/\" &&\n pathNameWithoutBaseUrl[3] === \"/\" &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n // catch all \"/fr/**/*\" urls\n return \"/\" + possibleLocaleKey;\n }\n // otherwise, it must be a defaultLocale or other url\n return \"\";\n}\n","import {\n // astro `BASE_URL` always starts with `/` and respects `config.trailingSlash`\n BASE_URL as baseUrl,\n localeKeys,\n defaultLocale,\n} from \"./config\";\nimport { removeHtmlExtension } from \"./removeHtmlExtension\";\nimport { removeTrailingSlash } from \"./removeTrailingSlash\";\nimport { resolveTrailingSlash } from \"./resolveTrailingSlash\";\n/**\n * @returns url without locale prefix, \"/es/about\" => \"/about\"\n */\nexport function getUrlWithoutLocale(url: URL | string): string {\n // support both string and url objects\n const pathName = typeof url === \"string\" ? url : url.pathname;\n const pathNameWithoutHtmlExtension = removeHtmlExtension(pathName);\n\n const baseUrlWithoutTrailingSlash = removeTrailingSlash(baseUrl);\n\n // remove baseUrlWithoutTrailingSlash from pathNameWithoutBaseUrl\n let pathNameWithoutBaseUrl =\n baseUrl === \"/\"\n ? pathNameWithoutHtmlExtension\n : pathNameWithoutHtmlExtension.replace(baseUrlWithoutTrailingSlash, \"\");\n\n const possibleLocaleKey = pathNameWithoutBaseUrl.slice(1, 3);\n const pathNameWithoutBaseUrlStartsWithLocale = localeKeys\n .filter((key) => key !== defaultLocale)\n .includes(possibleLocaleKey);\n\n // avoid catching urls that start with \"/en\" like \"/enigma\"\n if (\n pathNameWithoutBaseUrl.length === 3 &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n return resolveTrailingSlash(baseUrl);\n }\n if (\n pathNameWithoutBaseUrl[0] === \"/\" &&\n pathNameWithoutBaseUrl[3] === \"/\" &&\n pathNameWithoutBaseUrlStartsWithLocale\n ) {\n // catch all \"/fr/**/*\" urls\n return resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + pathNameWithoutBaseUrl.slice(3)\n );\n }\n // otherwise, it must be a defaultLocale or other url\n return resolveTrailingSlash(\n baseUrlWithoutTrailingSlash + pathNameWithoutBaseUrl\n );\n}\n","import type { AstroConfig, ValidRedirectStatus } from \"astro\";\n\nexport interface UserI18nConfig {\n /**\n * glob pattern(s) to include\n * @defaultValue [\"pages\\/\\*\\*\\/\\*\"]\n */\n include?: string | string[];\n /**\n * glob pattern(s) to exclude\n * @defaultValue [\"pages\\/api\\/\\*\\*\\/\\*\"]\n */\n exclude?: string | string[];\n /**\n * all language locales\n *\n * @example\n * ```ts\n * const locales = {\n * en: \"en-US\", // the `defaultLocale` value must present in `locales` keys\n * es: \"es-ES\",\n * fr: \"fr-CA\",\n * };\n * ```\n */\n locales: Record<string, string>;\n /**\n * the default language locale\n *\n * the `defaultLocale` value must present in `locales` keys\n *\n * @example \"en\"\n */\n defaultLocale: string;\n /**\n * given the defaultLocale \"en\", whether\n * \"/en/about\" redirects to \"/about\"\n *\n * whether the url with the default locale\n * should redirect to the url without the locale\n *\n * if a status is given, such as 302,\n * redirectDefaultLocale will be truthy,\n * and all redirects will use that status\n *\n * @defaultValue true\n */\n redirectDefaultLocale?: boolean | ValidRedirectStatus;\n}\n\nexport type VirtualAstroi18nautConfig = Pick<\n UserI18nConfig,\n \"defaultLocale\" | \"locales\" | \"redirectDefaultLocale\"\n> & {\n BASE_URL: string;\n trailingSlash: AstroConfig[\"trailingSlash\"];\n build: {\n format: AstroConfig[\"build\"][\"format\"];\n };\n};\n\nexport type UserFilterSitemapByDefaultLocaleConfig = Pick<\n UserI18nConfig,\n \"defaultLocale\"\n> & {\n base?: string;\n};\n\nexport type I18nConfig = Required<UserI18nConfig>;\n\n// opposite of RequiredFieldsOnly https://stackoverflow.com/a/68261391\ntype PartialFieldsOnly<T> = {\n [K in keyof T as T[K] extends Required<T>[K] ? never : K]: T[K];\n};\n\n/**\n * The default values for I18nConfig\n */\nexport const defaultI18n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