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

64 lines (49 loc) 1.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _bluebird() { const data = require("bluebird"); _bluebird = function () { return data; }; return data; } function _capsule() { const data = require("../extensions/isolator/capsule"); _capsule = function () { return data; }; return data; } var _default = /*#__PURE__*/function () { var _createCapsule = (0, _bluebird().coroutine)(function* (type = 'fs', dir) { function getContainerFactory() { switch (type) { case 'fs': default: return { createContainer: function () { var _create = (0, _bluebird().coroutine)(function* () { return new (_capsule().FsContainer)(dir || ''); }); function create() { return _create.apply(this, arguments); } return create; }() }; } } const containerFactory = getContainerFactory(); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX! const capsule = yield _capsule().Capsule.create(containerFactory); yield capsule.start(); return capsule; }); function createCapsule() { return _createCapsule.apply(this, arguments); } return createCapsule; }(); exports.default = _default;