Files
klz-cables.com/.pnpm-store/v10/files/93/b5c78dad64562e989c5b5044ff48d9a5cddc7ddabad06810460b084cccf96ad8dff369f012699c174aa455c093010ae39ffe7ccc61bd43c3fe762fc5f3f98e
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.0 KiB
Plaintext

{"version":3,"sources":["../../src/utilities/getTransaction.ts"],"sourcesContent":["import type { PayloadRequest } from 'payload'\n\nimport type { DrizzleAdapter } from '../types.js'\n\n/**\n * Returns current db transaction instance from req or adapter.drizzle itself\n *\n * If a transaction session doesn't exist (e.g., it was already committed/rolled back),\n * falls back to the default adapter.drizzle instance to prevent errors.\n */\nexport const getTransaction = async <T extends DrizzleAdapter = DrizzleAdapter>(\n adapter: T,\n req?: Partial<PayloadRequest>,\n): Promise<T['drizzle']> => {\n if (!req?.transactionID) {\n return adapter.drizzle\n }\n\n return (adapter.sessions[await req.transactionID]?.db as T['drizzle']) || adapter.drizzle\n}\n"],"names":["getTransaction","adapter","req","transactionID","drizzle","sessions","db"],"mappings":"AAIA;;;;;CAKC,GACD,OAAO,MAAMA,iBAAiB,OAC5BC,SACAC;IAEA,IAAI,CAACA,KAAKC,eAAe;QACvB,OAAOF,QAAQG,OAAO;IACxB;IAEA,OAAO,AAACH,QAAQI,QAAQ,CAAC,MAAMH,IAAIC,aAAa,CAAC,EAAEG,MAAuBL,QAAQG,OAAO;AAC3F,EAAC"}