deckhearth/scripts/run-unified-catalog-sync.js
Randall Stillwell c6cc637f8a
Some checks are pending
CI / Lint (push) Waiting to run
CI / Schema map up to date (push) Waiting to run
CI / Forbidden patterns (9 checks) (push) Waiting to run
CI / Migrations apply (node-pg-migrate) (push) Waiting to run
CI / Unit tests (vitest) (push) Waiting to run
fix(pricing): test fixes and post-merge tooling
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 11:51:08 -05:00

32 lines
695 B
JavaScript

#!/usr/bin/env node
/**
* Run MTG + Pokémon + Lorcana bulk syncs (with pricing ingest) against POSTGRES_URL.
*
* Usage:
* node --env-file=.env.local scripts/run-unified-catalog-sync.js
*/
import { runUnifiedCatalogSync } from '../lib/card-import/sync-catalog.js';
import { closeSqlPool } from '../lib/sql.js';
async function main() {
const summary = await runUnifiedCatalogSync();
console.log(JSON.stringify(summary, null, 2));
if (summary.errors?.length) {
process.exitCode = 1;
}
}
main()
.catch((err) => {
console.error(err);
process.exitCode = 1;
})
.finally(async () => {
try {
await closeSqlPool();
} catch {
// ignore
}
});