Files
klz-cables.com/.pnpm-store/v10/files/9c/06839653852a17f3394341ab4a60f45a627dd0fccd33bf692cfe463a07f3954b4b0cfc75d620e6a1f064d4b2f64d060869dfc389bfa54b150b3532d32d4456
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

33 lines
1.4 KiB
Plaintext

import { localizeStatus as mongoLocalizeStatus } from './mongo/index.js';
import { localizeStatus as sqlLocalizeStatus } from './sql/index.js';
/**
* Main entry point for localizeStatus migration.
* Detects database type and dispatches to appropriate implementation.
*/ export const localizeStatus = {
async up (args) {
// Detect database type by checking which parameters are present
if ('db' in args && 'sql' in args) {
// SQL database (Postgres, SQLite, etc.)
return sqlLocalizeStatus.up(args);
} else if ('payload' in args && !('db' in args)) {
// MongoDB
return mongoLocalizeStatus.up(args);
} else {
throw new Error('Unable to detect database type. Expected either { db, sql } for SQL databases ' + 'or { payload } for MongoDB.');
}
},
async down (args) {
// Detect database type by checking which parameters are present
if ('db' in args && 'sql' in args) {
// SQL database (Postgres, SQLite, etc.)
return sqlLocalizeStatus.down(args);
} else if ('payload' in args && !('db' in args)) {
// MongoDB
return mongoLocalizeStatus.down(args);
} else {
throw new Error('Unable to detect database type. Expected either { db, sql } for SQL databases ' + 'or { payload } for MongoDB.');
}
}
};
//# sourceMappingURL=index.js.map