← Files Flows by plugin.spaceARCHIVED FILE
scripts/validate.mjs
568 Bytes · Nov 30, 2026 · 00:17 UTC
#!/usr/bin/env node
import { launcherCommand } from '../lib/node-runtime.mjs';
import { readDocument } from '../lib/document.mjs';
const file = process.argv[2];
if (!file || file === '--help') {
console.log(`Usage: ${launcherCommand('validate')} /path/to/journey.flows.json`);
process.exitCode = file ? 0 : 1;
} else {
try { const { document } = await readDocument(file); console.log(`Valid: ${document.name} · ${document.nodes.length} nodes · ${document.edges.length} connections`); }
catch (error) { console.error(error.message); process.exitCode = 1; }
}
SHA-256: 298a02723736af902da92997cfb4326b1c70121ac2f7e3e561399f1f97957a5f