#!/usr/bin/env node /** * Copies non-TypeScript assets into dist/. * * tsc emits only .js, so the .sql migrations would be missing at runtime — and * the failure is quiet, because the store degrades to live-only mode rather * than crashing. Keeping this in the build avoids that confusing outcome. */ import { cp, mkdir } from 'node:fs/promises'; const assets = [['src/store/migrations', 'dist/store/migrations']]; for (const [from, to] of assets) { await mkdir(to, { recursive: true }); await cp(from, to, { recursive: true }); console.log(`copied ${from} -> ${to}`); }