mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-06 23:44:36 +00:00
feat(agent): establish durable harness type contracts
This commit is contained in:
parent
40a3d8556a
commit
5aeb06bb11
78 changed files with 1211 additions and 12174 deletions
|
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import { cp, mkdir, rm } from "node:fs/promises";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||
const packageDir = resolve(scriptDir, "..");
|
||||
const distDir = resolve(packageDir, "dist");
|
||||
const migrationSourceDir = resolve(packageDir, "src/sqlite/migrations");
|
||||
const migrationDestDir = resolve(distDir, "sqlite/migrations");
|
||||
|
||||
async function clean() {
|
||||
await rm(distDir, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
async function copySqliteMigrations() {
|
||||
await mkdir(migrationDestDir, { recursive: true });
|
||||
await cp(migrationSourceDir, migrationDestDir, { recursive: true });
|
||||
}
|
||||
|
||||
const command = process.argv[2];
|
||||
|
||||
if (command === "clean") {
|
||||
await clean();
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (command === "copy-sqlite-migrations") {
|
||||
await copySqliteMigrations();
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
console.error("Usage: node scripts/prepare-dist.mjs <clean|copy-sqlite-migrations>");
|
||||
process.exit(1);
|
||||
Loading…
Add table
Add a link
Reference in a new issue