Files
videoreg.ru/web-front/scripts/importCatalogExport.ts
huncode 2ce58fcbc0
Master Production Deploy / production (push) Failing after 49s
feat: complete dashcam catalog ingestion demo
2026-07-31 02:01:58 +03:00

24 lines
596 B
TypeScript

import { importCatalogExport } from '../src/entities/dashcam-catalog/api/importCatalogExport.ts';
const exportDir = process.env.DASHCAM_CATALOG_EXPORT_DIR ?? process.argv[2];
if (!exportDir) {
throw new Error('Set DASHCAM_CATALOG_EXPORT_DIR or pass the shared export directory as the first argument');
}
const result = await importCatalogExport({ exportDir });
console.log(
JSON.stringify(
{
status: 'imported',
exportId: result.exportId,
itemCount: result.itemCount,
sha256: result.sha256,
dbFilePath: result.dbFilePath,
},
null,
2,
),
);