Add one-command dev-to-prod release with clear SUCCESS/FAILED banners.

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>
This commit is contained in:
Danila Khodjaef
2026-07-08 14:54:56 +03:00
co-authored by Cursor
parent 313666a4ab
commit 21e3e41e48
20 changed files with 839 additions and 86 deletions
+28 -1
View File
@@ -7,6 +7,7 @@ const path = require('path');
const sharp = require('sharp');
const pool = require('../server/db');
const { generateThumbnailFromFull } = require('./image-fetcher');
const { printCliResult } = require('./lib/cli-result');
const IMAGE_DIR = path.resolve(process.env.IMAGE_DIR || './data/images');
@@ -91,7 +92,33 @@ async function aspectRatio(filePath) {
}
await pool.end();
if (errors.length) {
printCliResult({
script: 'regenerate-thumbnails',
ok: false,
summary: `Painting thumbnail regeneration finished with ${errors.length} error(s).`,
details: [
`Regenerated: ${regenerated}, skipped: ${skipped}`,
...errors.slice(0, 5).map((e) => ` #${e.id} ${e.title}: ${e.error}`),
],
});
}
printCliResult({
script: 'regenerate-thumbnails',
ok: true,
summary: 'Painting thumbnail regeneration complete.',
details: [
`Regenerated: ${regenerated}, skipped: ${skipped}`,
`Aspect-ratio mismatches before fix: ${mismatchesBefore}`,
],
});
})().catch((err) => {
console.error(err);
process.exit(1);
printCliResult({
script: 'regenerate-thumbnails',
ok: false,
summary: err.message || String(err),
});
});