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

{"version":3,"sources":["../../src/queries/buildAndOrConditions.ts"],"sourcesContent":["import type { SQL, Table } from 'drizzle-orm'\nimport type { FlattenedField, Where } from 'payload'\n\nimport type { DrizzleAdapter, GenericColumn } from '../types.js'\nimport type { BuildQueryJoinAliases } from './buildQuery.js'\nimport type { QueryContext } from './parseParams.js'\n\nimport { parseParams } from './parseParams.js'\n\nexport function buildAndOrConditions({\n adapter,\n aliasTable,\n context,\n fields,\n joins,\n locale,\n parentIsLocalized,\n selectFields,\n selectLocale,\n tableName,\n where,\n}: {\n adapter: DrizzleAdapter\n aliasTable?: Table\n collectionSlug?: string\n context: QueryContext\n fields: FlattenedField[]\n globalSlug?: string\n joins: BuildQueryJoinAliases\n locale?: string\n parentIsLocalized: boolean\n selectFields: Record<string, GenericColumn>\n selectLocale?: boolean\n tableName: string\n where: Where[]\n}): SQL[] {\n const completedConditions = []\n // Loop over all AND / OR operations and add them to the AND / OR query param\n // Operations should come through as an array\n\n for (const condition of where) {\n // If the operation is properly formatted as an object\n if (typeof condition === 'object') {\n const result = parseParams({\n adapter,\n aliasTable,\n context,\n fields,\n joins,\n locale,\n parentIsLocalized,\n selectFields,\n selectLocale,\n tableName,\n where: condition,\n })\n if (result && Object.keys(result).length > 0) {\n completedConditions.push(result)\n }\n }\n }\n return completedConditions\n}\n"],"names":["parseParams","buildAndOrConditions","adapter","aliasTable","context","fields","joins","locale","parentIsLocalized","selectFields","selectLocale","tableName","where","completedConditions","condition","result","Object","keys","length","push"],"mappings":"AAOA,SAASA,WAAW,QAAQ,mBAAkB;AAE9C,OAAO,SAASC,qBAAqB,EACnCC,OAAO,EACPC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,KAAK,EACLC,MAAM,EACNC,iBAAiB,EACjBC,YAAY,EACZC,YAAY,EACZC,SAAS,EACTC,KAAK,EAeN;IACC,MAAMC,sBAAsB,EAAE;IAC9B,6EAA6E;IAC7E,6CAA6C;IAE7C,KAAK,MAAMC,aAAaF,MAAO;QAC7B,sDAAsD;QACtD,IAAI,OAAOE,cAAc,UAAU;YACjC,MAAMC,SAASf,YAAY;gBACzBE;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC,OAAOE;YACT;YACA,IAAIC,UAAUC,OAAOC,IAAI,CAACF,QAAQG,MAAM,GAAG,GAAG;gBAC5CL,oBAAoBM,IAAI,CAACJ;YAC3B;QACF;IACF;IACA,OAAOF;AACT"}