MCPcopy Create free account
hub / github.com/SethGammon/Citadel / main

Function main

scripts/deploy-steward.js:89–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87}
88
89function main() {
90 try {
91 const args = parseArgs(process.argv.slice(2));
92 if (args.help) {
93 process.stdout.write(`${usage()}\n`);
94 return;
95 }
96 const result = runDeploySteward(args.projectRoot, {
97 ...args,
98 command: process.argv.join(' '),
99 });
100 if (args.json) process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
101 else process.stdout.write(renderReport(result));
102 const hasRepair = result.events.some((event) => event.action === 'repair-needed');
103 const hasBlocked = result.queue.some((item) => ['blocked', 'stale'].includes(item.status));
104 process.exitCode = hasRepair || hasBlocked ? 1 : 0;
105 } catch (error) {
106 process.stderr.write(`${error.message}\n`);
107 process.exit(1);
108 }
109}
110
111if (require.main === module) main();
112

Callers 1

deploy-steward.jsFile · 0.70

Calls 4

runDeployStewardFunction · 0.85
parseArgsFunction · 0.70
usageFunction · 0.70
renderReportFunction · 0.70

Tested by

no test coverage detected