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 (46 loc) 1.31 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 _scope() { const data = require("../../../scope"); _scope = function () { return data; }; return data; } function _modelComponent() { const data = _interopRequireDefault(require("../../../scope/models/model-component")); _modelComponent = function () { return data; }; return data; } function _symlink() { const data = _interopRequireDefault(require("../../../scope/models/symlink")); _symlink = function () { return data; }; return data; } var _default = /*#__PURE__*/function () { var _catScope = (0, _bluebird().coroutine)(function* (path, full) { const scope = yield (0, _scope().loadScope)(path); const bitObjects = yield scope.objects.list(); return full ? bitObjects : bitObjects.filter(obj => obj instanceof _modelComponent().default || obj instanceof _symlink().default); }); function catScope(_x, _x2) { return _catScope.apply(this, arguments); } return catScope; }(); exports.default = _default;