UNPKG

@veecode-platform/safira-cli

Version:

Generate a microservice project from your spec.

18 lines (17 loc) 774 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SafiraBaseCommand = void 0; const tslib_1 = require("tslib"); const color_1 = tslib_1.__importDefault(require("@oclif/color")); const core_1 = require("@oclif/core"); const safira_utils_1 = require("../safira-project/safira-utils"); const exit_codes_1 = require("../command/exit-codes"); class SafiraBaseCommand extends core_1.Command { checkIfSafiraProject() { if (!safira_utils_1.SafiraUtils.isSafiraProject()) { this.log(color_1.default.bold(color_1.default.yellowBright("You need to run this command in a Safira project"))); process.exit(exit_codes_1.ExitCode.operationNotPermitted); } } } exports.SafiraBaseCommand = SafiraBaseCommand;