UNPKG

@launchql/cli

Version:
22 lines (21 loc) 676 B
import { LaunchQLProject } from '@launchql/core'; import { Logger } from '@launchql/server-utils'; const log = new Logger('plan'); export default async (argv, prompter, _options) => { const questions = [ // optionally add CLI prompt questions here later ]; let { cwd } = await prompter.prompt(argv, questions); if (!cwd) { cwd = process.cwd(); log.info(`Using current directory: ${cwd}`); } const project = new LaunchQLProject(cwd); if (!project.isInModule()) { throw new Error('This command must be run inside a LaunchQL module.'); } project.writeModulePlan({ projects: true }); return argv; };