Introduce devtoprod:release orchestrator, config file, CLI result footers on deploy scripts, auto-thumb regeneration on curator fixes, and updated deploy documentation. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
661 B
JavaScript
25 lines
661 B
JavaScript
/**
|
|
* Print a standardized final SUCCESS/FAILED banner and exit.
|
|
* Always the last stdout before process exit in deploy scripts.
|
|
*/
|
|
const WIDTH = 72;
|
|
|
|
function printCliResult({ script, ok, summary, details = [] }) {
|
|
const label = ok ? 'SUCCESS' : 'FAILED';
|
|
const banner = `===== ${label}: ${script} =====`;
|
|
const pad = Math.max(0, WIDTH - banner.length);
|
|
const line = banner + '='.repeat(pad);
|
|
|
|
console.log('');
|
|
console.log(line);
|
|
if (summary) console.log(summary);
|
|
for (const detail of details) {
|
|
if (detail) console.log(detail);
|
|
}
|
|
console.log('='.repeat(WIDTH));
|
|
|
|
process.exit(ok ? 0 : 1);
|
|
}
|
|
|
|
module.exports = { printCliResult };
|