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

{"version":3,"sources":["../../../../src/fields/hooks/beforeDuplicate/index.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../../collections/config/types.js'\nimport type { RequestContext } from '../../../index.js'\nimport type { JsonObject, PayloadRequest } from '../../../types/index.js'\n\nimport { traverseFields } from './traverseFields.js'\n\ntype Args<T extends JsonObject> = {\n collection: null | SanitizedCollectionConfig\n context: RequestContext\n doc?: T\n id?: number | string\n overrideAccess: boolean\n req: PayloadRequest\n}\n\n/**\n * This function is responsible for running beforeDuplicate hooks\n * against a document including all locale data.\n * It will run each field's beforeDuplicate hook\n * and return the resulting docWithLocales.\n */\nexport const beforeDuplicate = async <T extends JsonObject>({\n id,\n collection,\n context,\n doc,\n overrideAccess,\n req,\n}: Args<T>): Promise<T> => {\n await traverseFields({\n id,\n collection,\n context,\n doc,\n fields: collection!.fields,\n overrideAccess,\n parentIndexPath: '',\n parentIsLocalized: false,\n parentPath: '',\n parentSchemaPath: '',\n req,\n siblingDoc: doc!,\n })\n\n return doc!\n}\n"],"names":["traverseFields","beforeDuplicate","id","collection","context","doc","overrideAccess","req","fields","parentIndexPath","parentIsLocalized","parentPath","parentSchemaPath","siblingDoc"],"mappings":"AAIA,SAASA,cAAc,QAAQ,sBAAqB;AAWpD;;;;;CAKC,GACD,OAAO,MAAMC,kBAAkB,OAA6B,EAC1DC,EAAE,EACFC,UAAU,EACVC,OAAO,EACPC,GAAG,EACHC,cAAc,EACdC,GAAG,EACK;IACR,MAAMP,eAAe;QACnBE;QACAC;QACAC;QACAC;QACAG,QAAQL,WAAYK,MAAM;QAC1BF;QACAG,iBAAiB;QACjBC,mBAAmB;QACnBC,YAAY;QACZC,kBAAkB;QAClBL;QACAM,YAAYR;IACd;IAEA,OAAOA;AACT,EAAC"}