feat(import): harden workbook parser boundaries
This commit is contained in:
@@ -2,14 +2,18 @@
|
||||
* Generate samples/CapaKrakenExamples.xlsx from the live database.
|
||||
*
|
||||
* Run from repo root:
|
||||
* DATABASE_URL=postgresql://capakraken:capakraken_dev@localhost:5433/capakraken \
|
||||
* pnpm --filter @capakraken/db tsx src/generate-excel.ts
|
||||
* pnpm --filter @capakraken/db db:excel
|
||||
*/
|
||||
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
import ExcelJS from "exceljs";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { loadWorkspaceEnv } from "./load-workspace-env.js";
|
||||
import { assertCapaKrakenDbTarget } from "./safe-destructive-env.js";
|
||||
|
||||
loadWorkspaceEnv();
|
||||
assertCapaKrakenDbTarget("db:excel");
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
Reference in New Issue
Block a user