- replace default Convex control-plane wording with Rust SQLite control-plane across architecture, AGENTS, Reasonix, and design docs - retire root Convex functions source and deploy script into recycle while keeping explicit cloud/compat/sync-replica boundaries - add control-plane migration guard/docs and keep CodeGraph refreshed after the SQLite control-plane cutover
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
#!/usr/bin/env node
|
|
const { spawn } = require("child_process");
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
process.env.CONVEX_TMPDIR = "/mnt/Data1T/mnote/.convex-tmp";
|
|
|
|
const adminKey = "mnote-local|01cedce68c51e168c6aacb282a90f7d233f56eddfabb07944a1d9dd9506f73ba888fc7daff";
|
|
const repoRoot = "/mnt/Data1T/mnote";
|
|
const rootConvexDir = path.join(repoRoot, "convex");
|
|
const requiredRootFiles = ["schema.ts", "aiSessions.ts"];
|
|
|
|
for (const fileName of requiredRootFiles) {
|
|
const filePath = path.join(rootConvexDir, fileName);
|
|
if (!fs.existsSync(filePath)) {
|
|
console.error(`[convex-deploy] 缺少当前 active Convex 文件:${filePath}`);
|
|
console.error("[convex-deploy] 不允许从 recycle/wolai-frontend/convex 回退部署;需要的函数必须迁回 root convex/ 或明确退役。");
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
const args = [
|
|
"deploy",
|
|
"--url", "http://127.0.0.1:3210", // Backend port, NOT HTTP actions (3211)
|
|
"--admin-key", adminKey,
|
|
"--typecheck", "disable",
|
|
"--codegen", "disable",
|
|
];
|
|
|
|
const child = spawn("npx", ["convex", ...args], {
|
|
cwd: repoRoot,
|
|
stdio: "inherit",
|
|
env: { ...process.env, CONVEX_TMPDIR: "/mnt/Data1T/mnote/.convex-tmp" },
|
|
});
|
|
|
|
child.on("close", (code) => {
|
|
process.exit(code || 0);
|
|
});
|