Files
klz-cables.com/.pnpm-store/v10/files/63/ffb05bfe70422811c50bf136d7ffa01b729f2b6bf32d4cbec46400fec7515681dbd1d59c812641c4bd8db07d6399127387729ac8842d5d7f115a0a7611f63b
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
1.8 KiB
Plaintext

{"version":3,"file":"getNextRequestI18n.js","names":["initI18n","cookies","headers","getRequestLanguage","getNextRequestI18n","config","i18n","context","language"],"sources":["../../src/utilities/getNextRequestI18n.ts"],"sourcesContent":["import type { ClientTranslationsObject, I18nClient } from '@payloadcms/translations'\n\nimport { initI18n } from '@payloadcms/translations'\nimport { cookies, headers } from 'next/headers.js'\nimport { getRequestLanguage, type SanitizedConfig } from 'payload'\n\n/**\n * In the context of Next.js, this function initializes the i18n object for the current request.\n *\n * It must be called on the server side, and within the lifecycle of a request since it relies on the request headers and cookies.\n */\nexport const getNextRequestI18n = async <\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n TAdditionalTranslations = {},\n TAdditionalClientTranslationKeys extends string = never,\n>({\n config,\n}: {\n config: SanitizedConfig\n}): Promise<\n [TAdditionalClientTranslationKeys] extends [never]\n ? I18nClient\n : TAdditionalTranslations extends object\n ? I18nClient<TAdditionalTranslations, TAdditionalClientTranslationKeys>\n : I18nClient<ClientTranslationsObject, TAdditionalClientTranslationKeys>\n> => {\n return (await initI18n({\n config: config.i18n,\n context: 'client',\n language: getRequestLanguage({ config, cookies: await cookies(), headers: await headers() }),\n })) as any\n}\n"],"mappings":"AAEA,SAASA,QAAQ,QAAQ;AACzB,SAASC,OAAO,EAAEC,OAAO,QAAQ;AACjC,SAASC,kBAAkB,QAA8B;AAEzD;;;;;AAKA,OAAO,MAAMC,kBAAA,GAAqB,MAAAA,CAIhC;EACAC;AAAM,CAGP;EAOC,OAAQ,MAAML,QAAA,CAAS;IACrBK,MAAA,EAAQA,MAAA,CAAOC,IAAI;IACnBC,OAAA,EAAS;IACTC,QAAA,EAAUL,kBAAA,CAAmB;MAAEE,MAAA;MAAQJ,OAAA,EAAS,MAAMA,OAAA;MAAWC,OAAA,EAAS,MAAMA,OAAA;IAAU;EAC5F;AACF","ignoreList":[]}