import "./_env"; import { importAll } from "../src/lib/content/import"; import { closeDb } from "../src/db"; import { join } from "node:path"; const args = process.argv.slice(2); const root = join(import.meta.dirname, "..", "content"); const report = await importAll({ root, publish: args.includes("--publish"), dryRun: args.includes("--dry-run"), force: args.includes("--force"), actor: process.env.IMPORT_ACTOR ?? "content-import", only: args.filter((a) => !a.startsWith("--")).length ? args.filter((a) => !a.startsWith("--")) : undefined }); console.log(JSON.stringify({ ...report, tools: { created: report.tools.created.length, updated: report.tools.updated.length, unchanged: report.tools.unchanged.length, published: report.tools.published.length, skipped: report.tools.skipped } }, null, 2)); await closeDb();