feat(cli): add support for repeated directus tasks

This commit is contained in:
Cory Dransfeldt 2025-06-08 17:21:05 -07:00
parent 8a12e83b13
commit 1f9e2d856f
No known key found for this signature in database
11 changed files with 601 additions and 5 deletions

View file

@ -8,14 +8,16 @@ import { downloadAsset } from '../lib/download.js';
import { runRootScript } from '../lib/runScript.js';
import { handleExitError } from '../lib/handlers.js';
import { runJobsMenu } from '../lib/jobs.js';
import { runTasksMenu } from '../lib/tasks/index.js';
process.on('unhandledRejection', (err) => handleExitError(err, 'Unhandled rejection'));
process.on('uncaughtException', (err) => handleExitError(err, 'Uncaught exception'));
program.name('coryd').description('🪄 Run commands, jobs, download things and have fun.').version('2.0.0');
program.name('coryd').description('🪄 Run commands, jobs, download things and have fun.').version('3.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('tasks').description('Handle repeated tasks.').action(runTasksMenu);
program.command('jobs').description('Trigger jobs and scripts.').action(runJobsMenu);
program.command('download').description('Download, name and store image assets.').action(downloadAsset);
if (process.argv.length <= 2) {