bit-bin
Version:
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b
59 lines (43 loc) • 1.2 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _defineProperty2() {
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
_defineProperty2 = function () {
return data;
};
return data;
}
function _chalk() {
const data = _interopRequireDefault(require("chalk"));
_chalk = function () {
return data;
};
return data;
}
function _cli() {
const data = require("../../cli");
_cli = function () {
return data;
};
return data;
}
class InvalidConfigFile extends _cli().PaperError {
constructor(path) {
super(generateMessage(path));
this.path = path;
(0, _defineProperty2().default)(this, "showDoctorMessage", void 0);
this.showDoctorMessage = true;
}
report() {
return this.message;
}
}
exports.default = InvalidConfigFile;
function generateMessage(path) {
return `error: invalid workspace.jsonc: ${_chalk().default.bold(path)} is not a valid JSON file.
consider running ${_chalk().default.bold('bit init --reset')} to recreate the file`;
}
;