UNPKG

navy

Version:

Quick and powerful development environments using Docker and Docker Compose

32 lines (31 loc) 935 B
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.NavyNotInitialisedError = exports.NavyError = void 0; var _chalk = _interopRequireDefault(require("chalk")); class NavyError { constructor(message) { this.message = message; } prettyPrint() { console.log(); console.log(_chalk.default.bgRed(_chalk.default.bold(' ERROR '))); console.log(); console.log(' ' + this.message); console.log(); } } exports.NavyError = NavyError; class NavyNotInitialisedError extends NavyError { constructor(navyName) { super('Navy "' + navyName + '" not imported'); } prettyPrint() { super.prettyPrint(); console.log(' Make sure you\'ve imported the navy with ' + _chalk.default.bold('navy import')); console.log(); } } exports.NavyNotInitialisedError = NavyNotInitialisedError;