feat(cli): add support for running import and API jobs

This commit is contained in:
Cory Dransfeldt 2025-06-08 15:47:09 -07:00
parent 75df36acc3
commit 8a12e83b13
No known key found for this signature in database
8 changed files with 272 additions and 65 deletions

View file

@ -7,13 +7,15 @@ import { initConfig, loadConfig } from '../lib/config.js';
import { downloadAsset } from '../lib/download.js';
import { runRootScript } from '../lib/runScript.js';
import { handleExitError } from '../lib/handlers.js';
import { runJobsMenu } from '../lib/jobs.js';
process.on('unhandledRejection', (err) => handleExitError(err, 'Unhandled rejection'));
process.on('uncaughtException', (err) => handleExitError(err, 'Uncaught exception'));
program.name('coryd').description('🪄 Run commands, download things and have fun.').version('1.1.0');
program.name('coryd').description('🪄 Run commands, jobs, download things and have fun.').version('2.0.0');
program.command('init').description('Initialize CLI and populate required config.').action(initConfig);
program.command('run [script]').description('Run site scripts and commands.').action(runRootScript);
program.command('jobs').description('Trigger jobs and tasks.').action(runJobsMenu);
program.command('download').description('Download, name and store image assets.').action(downloadAsset);
if (process.argv.length <= 2) {