UNPKG

mobile-cli-lib

Version:
30 lines (29 loc) 1.13 kB
"use strict"; var Future = require("fibers/future"); var PluginsSourceBase = (function () { function PluginsSourceBase($progressIndicator, $logger) { this.$progressIndicator = $progressIndicator; this.$logger = $logger; } PluginsSourceBase.prototype.initialize = function (projectDir, keywords) { var _this = this; return (function () { if (_this._isInitialized) { return; } _this.plugins = []; _this.projectDir = projectDir; _this._isInitialized = true; _this.$logger.printInfoMessageOnSameLine(_this.progressIndicatorMessage); _this.$progressIndicator.showProgressIndicator(_this.initializeCore(projectDir, keywords), 2000).wait(); }).future()(); }; PluginsSourceBase.prototype.hasPlugins = function () { return !!(this.plugins && this.plugins.length); }; PluginsSourceBase.prototype.getAllPlugins = function () { return Future.fromResult(this.plugins); }; return PluginsSourceBase; }()); exports.PluginsSourceBase = PluginsSourceBase;