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
70 lines (51 loc) • 1.47 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getComponentLogs;
function _bluebird() {
const data = require("bluebird");
_bluebird = function () {
return data;
};
return data;
}
function _consumer() {
const data = require("../../../consumer");
_consumer = function () {
return data;
};
return data;
}
function _bitId() {
const data = require("../../../bit-id");
_bitId = function () {
return data;
};
return data;
}
function _getRemoteByName() {
const data = _interopRequireDefault(require("../../../remotes/get-remote-by-name"));
_getRemoteByName = function () {
return data;
};
return data;
}
function getComponentLogs(_x, _x2) {
return _getComponentLogs.apply(this, arguments);
}
function _getComponentLogs() {
_getComponentLogs = (0, _bluebird().coroutine)(function* (id, isRemote) {
if (isRemote) {
const consumer = yield (0, _consumer().loadConsumerIfExist)();
const bitId = _bitId().BitId.parse(id, true);
const remote = yield (0, _getRemoteByName().default)(bitId.scope, consumer);
return remote.log(bitId);
}
const consumer = yield (0, _consumer().loadConsumer)();
const bitId = consumer.getParsedId(id);
return consumer.scope.loadComponentLogs(bitId);
});
return _getComponentLogs.apply(this, arguments);
}
;