Capture the current CyberLux UI, commerce, messaging, and Tor ops updates so local main can be pushed to the remote. Made-with: Cursor
33 lines
1.3 KiB
JavaScript
Executable File
33 lines
1.3 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
/**
|
|
* Local verification: generator, TypeScript, shell scripts, production build.
|
|
* Usage: npm run verify or node scripts/verify.cjs
|
|
*/
|
|
"use strict";
|
|
|
|
const { execSync } = require("node:child_process");
|
|
const path = require("node:path");
|
|
|
|
process.chdir(path.join(__dirname, ".."));
|
|
|
|
function run(label, cmd) {
|
|
console.log(`\n━━ ${label} ━━`);
|
|
execSync(cmd, { stdio: "inherit", shell: "/bin/bash" });
|
|
}
|
|
|
|
try {
|
|
run("onion config generator", "node scripts/generate-onion-config.cjs");
|
|
run("TypeScript (tsc --noEmit)", "npx tsc --noEmit");
|
|
run(
|
|
"bash syntax (start.sh, install, backup, restore, systemd, health)",
|
|
"bash -n start.sh && bash -n scripts/install-tor-onion.sh && bash -n scripts/install-systemd.sh && bash -n scripts/health-check-stack.sh && bash -n scripts/list-onion-urls.sh && bash -n scripts/export-onion-urls.sh && bash -n scripts/diagnose-onion-stack.sh && bash -n scripts/backup-onion-keys.sh && bash -n scripts/restore-onion-keys.sh",
|
|
);
|
|
run("node syntax (onion-status.cjs)", "node --check scripts/onion-status.cjs");
|
|
run("Next.js production build", "npm run build");
|
|
console.log("\n✓ verify: all checks passed.\n");
|
|
} catch {
|
|
console.error("\n✗ verify failed. If build hit EACCES on .next/, run:");
|
|
console.error(" sudo bash scripts/fix-next-perms.sh\n");
|
|
process.exit(1);
|
|
}
|