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

{"version":3,"sources":["../../../../src/fields/hooks/afterChange/index.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from '../../../collections/config/types.js'\nimport type { SanitizedGlobalConfig } from '../../../globals/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 /**\n * The data before hooks\n */\n data: T\n /**\n * The data after hooks\n */\n doc: T\n global: null | SanitizedGlobalConfig\n operation: 'create' | 'update'\n previousDoc: T\n req: PayloadRequest\n}\n\n/**\n * This function is responsible for the following actions, in order:\n * - Execute field hooks\n */\nexport const afterChange = async <T extends JsonObject>({\n collection,\n context,\n data,\n doc: incomingDoc,\n global,\n operation,\n previousDoc,\n req,\n}: Args<T>): Promise<T> => {\n await traverseFields({\n collection,\n context,\n data,\n doc: incomingDoc,\n fields: (collection?.fields || global?.fields)!,\n global,\n operation,\n parentIndexPath: '',\n parentIsLocalized: false,\n parentPath: '',\n parentSchemaPath: '',\n previousDoc,\n previousSiblingDoc: previousDoc,\n req,\n siblingData: data,\n siblingDoc: incomingDoc,\n })\n\n return incomingDoc\n}\n"],"names":["traverseFields","afterChange","collection","context","data","doc","incomingDoc","global","operation","previousDoc","req","fields","parentIndexPath","parentIsLocalized","parentPath","parentSchemaPath","previousSiblingDoc","siblingData","siblingDoc"],"mappings":"AAKA,SAASA,cAAc,QAAQ,sBAAqB;AAmBpD;;;CAGC,GACD,OAAO,MAAMC,cAAc,OAA6B,EACtDC,UAAU,EACVC,OAAO,EACPC,IAAI,EACJC,KAAKC,WAAW,EAChBC,MAAM,EACNC,SAAS,EACTC,WAAW,EACXC,GAAG,EACK;IACR,MAAMV,eAAe;QACnBE;QACAC;QACAC;QACAC,KAAKC;QACLK,QAAST,YAAYS,UAAUJ,QAAQI;QACvCJ;QACAC;QACAI,iBAAiB;QACjBC,mBAAmB;QACnBC,YAAY;QACZC,kBAAkB;QAClBN;QACAO,oBAAoBP;QACpBC;QACAO,aAAab;QACbc,YAAYZ;IACd;IAEA,OAAOA;AACT,EAAC"}