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

{"version":3,"sources":["../../../src/database/migrations/getMigrations.ts"],"sourcesContent":["import type { Payload } from '../../index.js'\nimport type { MigrationData } from '../types.js'\n\n/**\n * Gets all existing migrations from the database, excluding the dev migration\n */\nexport async function getMigrations({\n payload,\n}: {\n payload: Payload\n}): Promise<{ existingMigrations: MigrationData[]; latestBatch: number }> {\n const migrationQuery = await payload.find({\n collection: 'payload-migrations',\n limit: 0,\n sort: ['-batch', '-name'],\n where: {\n batch: {\n not_equals: -1,\n },\n },\n })\n\n const existingMigrations = migrationQuery.docs as unknown as MigrationData[]\n\n // Get the highest batch number from existing migrations\n const latestBatch = Number(existingMigrations?.[0]?.batch) || 0\n\n return {\n existingMigrations,\n latestBatch,\n }\n}\n"],"names":["getMigrations","payload","migrationQuery","find","collection","limit","sort","where","batch","not_equals","existingMigrations","docs","latestBatch","Number"],"mappings":"AAGA;;CAEC,GACD,OAAO,eAAeA,cAAc,EAClCC,OAAO,EAGR;IACC,MAAMC,iBAAiB,MAAMD,QAAQE,IAAI,CAAC;QACxCC,YAAY;QACZC,OAAO;QACPC,MAAM;YAAC;YAAU;SAAQ;QACzBC,OAAO;YACLC,OAAO;gBACLC,YAAY,CAAC;YACf;QACF;IACF;IAEA,MAAMC,qBAAqBR,eAAeS,IAAI;IAE9C,wDAAwD;IACxD,MAAMC,cAAcC,OAAOH,oBAAoB,CAAC,EAAE,EAAEF,UAAU;IAE9D,OAAO;QACLE;QACAE;IACF;AACF"}