Files
klz-cables.com/.pnpm-store/v10/files/a7/d42557a0d5f8c8d85a7390740941f0c452f30c2e13245a67fdc7c5e77928ca6464eb5de3d28fdf78a85376b23c43cfa49ff6fc08c8fb1ab2098c3b9fa14952
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.9 KiB
Plaintext

{"version":3,"file":"isPublicAdminRoute.js","names":["getRouteWithoutAdmin","publicAdminRoutes","isPublicAdminRoute","adminRoute","config","route","some","routeSegment","segment","admin","routes","routeWithoutAdmin","startsWith","includes"],"sources":["../../src/utilities/isPublicAdminRoute.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport { getRouteWithoutAdmin } from './getRouteWithoutAdmin.js'\n\n// Routes that require admin authentication\nconst publicAdminRoutes: (keyof Pick<\n SanitizedConfig['admin']['routes'],\n 'createFirstUser' | 'forgot' | 'inactivity' | 'login' | 'logout' | 'reset' | 'unauthorized'\n>)[] = [\n 'createFirstUser',\n 'forgot',\n 'login',\n 'logout',\n 'forgot',\n 'inactivity',\n 'unauthorized',\n 'reset',\n]\n\nexport const isPublicAdminRoute = ({\n adminRoute,\n config,\n route,\n}: {\n adminRoute: string\n config: SanitizedConfig\n route: string\n}): boolean => {\n const isPublicAdminRoute = publicAdminRoutes.some((routeSegment) => {\n const segment = config.admin?.routes?.[routeSegment] || routeSegment\n const routeWithoutAdmin = getRouteWithoutAdmin({ adminRoute, route })\n\n if (routeWithoutAdmin.startsWith(segment)) {\n return true\n } else if (routeWithoutAdmin.includes('/verify/')) {\n return true\n } else {\n return false\n }\n })\n\n return isPublicAdminRoute\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAErC;AACA,MAAMC,iBAAA,GAGC,CACL,mBACA,UACA,SACA,UACA,UACA,cACA,gBACA,QACD;AAED,OAAO,MAAMC,kBAAA,GAAqBA,CAAC;EACjCC,UAAU;EACVC,MAAM;EACNC;AAAK,CAKN;EACC,MAAMH,kBAAA,GAAqBD,iBAAA,CAAkBK,IAAI,CAAEC,YAAA;IACjD,MAAMC,OAAA,GAAUJ,MAAA,CAAOK,KAAK,EAAEC,MAAA,GAASH,YAAA,CAAa,IAAIA,YAAA;IACxD,MAAMI,iBAAA,GAAoBX,oBAAA,CAAqB;MAAEG,UAAA;MAAYE;IAAM;IAEnE,IAAIM,iBAAA,CAAkBC,UAAU,CAACJ,OAAA,GAAU;MACzC,OAAO;IACT,OAAO,IAAIG,iBAAA,CAAkBE,QAAQ,CAAC,aAAa;MACjD,OAAO;IACT,OAAO;MACL,OAAO;IACT;EACF;EAEA,OAAOX,kBAAA;AACT","ignoreList":[]}