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

52 lines (39 loc) 979 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getRemoteByName; function _bluebird() { const data = require("bluebird"); _bluebird = function () { return data; }; return data; } function _() { const data = require("."); _ = function () { return data; }; return data; } function _scopeRemotes() { const data = require("../scope/scope-remotes"); _scopeRemotes = function () { return data; }; return data; } function getRemoteByName(_x, _x2) { return _getRemoteByName.apply(this, arguments); } function _getRemoteByName() { _getRemoteByName = (0, _bluebird().coroutine)(function* (remoteName, consumer) { if (consumer) { const remotes = yield (0, _scopeRemotes().getScopeRemotes)(consumer.scope); return remotes.resolve(remoteName, consumer.scope); } return _().Remotes.getScopeRemote(remoteName); }); return _getRemoteByName.apply(this, arguments); }