UNPKG

@launchql/cli

Version:
24 lines (23 loc) 779 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@launchql/core"); const server_utils_1 = require("@launchql/server-utils"); const log = new server_utils_1.Logger('plan'); exports.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 core_1.LaunchQLProject(cwd); if (!project.isInModule()) { throw new Error('This command must be run inside a LaunchQL module.'); } project.writeModulePlan({ projects: true }); return argv; };