UNPKG

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
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; 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 _generalError() { const data = _interopRequireDefault(require("../../../error/general-error")); _generalError = function () { return data; }; return data; } var _default = /*#__PURE__*/function () { var _injectConf = (0, _bluebird().coroutine)(function* (id, force) { if (!id) { throw new (_generalError().default)('please specify component id'); } const consumer = yield (0, _consumer().loadConsumer)(); const injectResults = yield consumer.injectConf(consumer.getParsedId(id), force); yield consumer.onDestroy(); return injectResults; }); function injectConf(_x, _x2) { return _injectConf.apply(this, arguments); } return injectConf; }(); exports.default = _default;