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

{"version":3,"sources":["../../../../src/fields/hooks/beforeValidate/traverseFields.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'\nimport type { Field, TabAsField } from '../../config/types.js'\n\nimport { promise } from './promise.js'\n\ntype Args<T> = {\n /**\n * Data of the nearest parent block. If no parent block exists, this will be the `undefined`\n */\n blockData?: JsonObject\n collection: null | SanitizedCollectionConfig\n context: RequestContext\n data: T\n /**\n * The original data (not modified by any hooks)\n */\n doc: T\n fields: (Field | TabAsField)[]\n global: null | SanitizedGlobalConfig\n id?: number | string\n operation: 'create' | 'update'\n overrideAccess: boolean\n parentIndexPath: string\n /**\n * @todo make required in v4.0\n */\n parentIsLocalized?: boolean\n parentPath: string\n parentSchemaPath: string\n req: PayloadRequest\n siblingData: JsonObject\n /**\n * The original siblingData (not modified by any hooks)\n */\n siblingDoc: JsonObject\n}\n\nexport const traverseFields = async <T>({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n fields,\n global,\n operation,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized,\n parentPath,\n parentSchemaPath,\n req,\n siblingData,\n siblingDoc,\n}: Args<T>): Promise<void> => {\n const promises: Promise<void>[] = []\n\n fields.forEach((field, fieldIndex) => {\n promises.push(\n promise({\n id,\n blockData,\n collection,\n context,\n data,\n doc,\n field,\n fieldIndex,\n global,\n operation,\n overrideAccess,\n parentIndexPath,\n parentIsLocalized: parentIsLocalized!,\n parentPath,\n parentSchemaPath,\n req,\n siblingData,\n siblingDoc,\n siblingFields: fields,\n }),\n )\n })\n\n await Promise.all(promises)\n}\n"],"names":["promise","traverseFields","id","blockData","collection","context","data","doc","fields","global","operation","overrideAccess","parentIndexPath","parentIsLocalized","parentPath","parentSchemaPath","req","siblingData","siblingDoc","promises","forEach","field","fieldIndex","push","siblingFields","Promise","all"],"mappings":"AAMA,SAASA,OAAO,QAAQ,eAAc;AAkCtC,OAAO,MAAMC,iBAAiB,OAAU,EACtCC,EAAE,EACFC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,IAAI,EACJC,GAAG,EACHC,MAAM,EACNC,MAAM,EACNC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,GAAG,EACHC,WAAW,EACXC,UAAU,EACF;IACR,MAAMC,WAA4B,EAAE;IAEpCX,OAAOY,OAAO,CAAC,CAACC,OAAOC;QACrBH,SAASI,IAAI,CACXvB,QAAQ;YACNE;YACAC;YACAC;YACAC;YACAC;YACAC;YACAc;YACAC;YACAb;YACAC;YACAC;YACAC;YACAC,mBAAmBA;YACnBC;YACAC;YACAC;YACAC;YACAC;YACAM,eAAehB;QACjB;IAEJ;IAEA,MAAMiB,QAAQC,GAAG,CAACP;AACpB,EAAC"}