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

{"version":3,"sources":["../src/create.ts"],"sourcesContent":["import type { Create } from 'payload'\n\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter } from './types.js'\n\nimport { upsertRow } from './upsertRow/index.js'\nimport { getTransaction } from './utilities/getTransaction.js'\n\nexport const create: Create = async function create(\n this: DrizzleAdapter,\n { collection: collectionSlug, customID, data, req, returning, select },\n) {\n const collection = this.payload.collections[collectionSlug].config\n\n const tableName = this.tableNameMap.get(toSnakeCase(collection.slug))\n\n const db = await getTransaction(this, req)\n\n const result = await upsertRow({\n adapter: this,\n collectionSlug,\n customID,\n data,\n db,\n fields: collection.flattenedFields,\n ignoreResult: returning === false,\n operation: 'create',\n req,\n select,\n tableName,\n })\n\n if (returning === false) {\n return null\n }\n\n return result\n}\n"],"names":["toSnakeCase","upsertRow","getTransaction","create","collection","collectionSlug","customID","data","req","returning","select","payload","collections","config","tableName","tableNameMap","get","slug","db","result","adapter","fields","flattenedFields","ignoreResult","operation"],"mappings":"AAEA,OAAOA,iBAAiB,gBAAe;AAIvC,SAASC,SAAS,QAAQ,uBAAsB;AAChD,SAASC,cAAc,QAAQ,gCAA+B;AAE9D,OAAO,MAAMC,SAAiB,eAAeA,OAE3C,EAAEC,YAAYC,cAAc,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,GAAG,EAAEC,SAAS,EAAEC,MAAM,EAAE;IAEtE,MAAMN,aAAa,IAAI,CAACO,OAAO,CAACC,WAAW,CAACP,eAAe,CAACQ,MAAM;IAElE,MAAMC,YAAY,IAAI,CAACC,YAAY,CAACC,GAAG,CAAChB,YAAYI,WAAWa,IAAI;IAEnE,MAAMC,KAAK,MAAMhB,eAAe,IAAI,EAAEM;IAEtC,MAAMW,SAAS,MAAMlB,UAAU;QAC7BmB,SAAS,IAAI;QACbf;QACAC;QACAC;QACAW;QACAG,QAAQjB,WAAWkB,eAAe;QAClCC,cAAcd,cAAc;QAC5Be,WAAW;QACXhB;QACAE;QACAI;IACF;IAEA,IAAIL,cAAc,OAAO;QACvB,OAAO;IACT;IAEA,OAAOU;AACT,EAAC"}