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
56 lines (43 loc) • 1.07 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Runtime = void 0;
function _bluebird() {
const data = require("bluebird");
_bluebird = function () {
return data;
};
return data;
}
function _context() {
const data = require("../context");
_context = function () {
return data;
};
return data;
}
class Runtime {
constructor(runtimeEnvs) {
this.runtimeEnvs = runtimeEnvs;
}
run(service) {
var _this = this;
return (0, _bluebird().coroutine)(function* () {
const contexts = yield Promise.all(_this.runtimeEnvs.map( /*#__PURE__*/function () {
var _ref = (0, _bluebird().coroutine)(function* (env) {
const res = yield service.run(new (_context().ExecutionContext)(env.id, _this, env.env, env.components));
return {
env: env.id,
res
};
});
return function (_x) {
return _ref.apply(this, arguments);
};
}()));
return contexts;
})();
}
}
exports.Runtime = Runtime;
;