Something went wrong. Try again.
Your trusty automation assistant in TLE Community misadventures!
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829// The real `super-cli` entry point. Reached only via a dynamic `import()` from// `super-cli.js` after the bootstrap has re-execed Node with the extensionless// loader hook in place, so the extension-less imports below (and those in// `@tlecommunity/super-tasks`) resolve. commander derives the `super-cli-<task>`// child executables from `process.argv[1]` (still `super-cli.js`), so the// `.main.js` filename does not affect subcommand lookup.
import program from 'commander'import _ from 'lodash'
import * as taskIndex from '@tlecommunity/super-tasks'const tasks = taskIndex.getTasksForPlatform('cli')
import pkgj from '../package.json' with { type: 'json' }
program .version(pkgj.version) .command('reset', 'clear config file and start again') .command('setup', 'set up a config file')
_.each(tasks, (task) => { // Make descriptions consistent. let description = task.description.replace(/\.$/, '').toLowerCase()
program.command(task.name, description)})
program.parse(process.argv)