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
65 lines (48 loc) • 1.48 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.provide = provide;
function _bluebird() {
const data = require("bluebird");
_bluebird = function () {
return data;
};
return data;
}
function _coreInsightsGetter() {
const data = _interopRequireDefault(require("./core-insights-getter"));
_coreInsightsGetter = function () {
return data;
};
return data;
}
function _insightManager() {
const data = require("./insight-manager");
_insightManager = function () {
return data;
};
return data;
}
function _insights() {
const data = _interopRequireDefault(require("./insights.cmd"));
_insights = function () {
return data;
};
return data;
}
function provide(_x) {
return _provide.apply(this, arguments);
}
function _provide() {
_provide = (0, _bluebird().coroutine)(function* ([graphBuilder, cli]) {
// get all insights from registry
const initialInsights = (0, _coreInsightsGetter().default)(graphBuilder); // register all insights in cli
// TODO - get user-defined insights as well, and use them when instantiating InsightManager and InsightsCmd
const insightManager = new (_insightManager().InsightManager)(initialInsights);
const insightsCmd = new (_insights().default)(insightManager);
cli.register(insightsCmd);
});
return _provide.apply(this, arguments);
}