1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.Plugin = undefined;
|
7 |
|
8 | var _keys = require('babel-runtime/core-js/object/keys');
|
9 |
|
10 | var _keys2 = _interopRequireDefault(_keys);
|
11 |
|
12 | var _regenerator = require('babel-runtime/regenerator');
|
13 |
|
14 | var _regenerator2 = _interopRequireDefault(_regenerator);
|
15 |
|
16 | var _stringify = require('babel-runtime/core-js/json/stringify');
|
17 |
|
18 | var _stringify2 = _interopRequireDefault(_stringify);
|
19 |
|
20 | var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
|
21 |
|
22 | var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
23 |
|
24 | var _getIterator2 = require('babel-runtime/core-js/get-iterator');
|
25 |
|
26 | var _getIterator3 = _interopRequireDefault(_getIterator2);
|
27 |
|
28 | var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
29 |
|
30 | var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
31 |
|
32 | var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
33 |
|
34 | var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
35 |
|
36 | var _createClass2 = require('babel-runtime/helpers/createClass');
|
37 |
|
38 | var _createClass3 = _interopRequireDefault(_createClass2);
|
39 |
|
40 | var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
41 |
|
42 | var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
43 |
|
44 | var _inherits2 = require('babel-runtime/helpers/inherits');
|
45 |
|
46 | var _inherits3 = _interopRequireDefault(_inherits2);
|
47 |
|
48 | var _cliEngineCommand = require('cli-engine-command');
|
49 |
|
50 | var _cliEngineCommand2 = _interopRequireDefault(_cliEngineCommand);
|
51 |
|
52 | var _path = require('path');
|
53 |
|
54 | var _path2 = _interopRequireDefault(_path);
|
55 |
|
56 | var _yarn = require('./yarn');
|
57 |
|
58 | var _yarn2 = _interopRequireDefault(_yarn);
|
59 |
|
60 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
61 |
|
62 | var Cache = function (_Base) {
|
63 | (0, _inherits3.default)(Cache, _Base);
|
64 |
|
65 | function Cache() {
|
66 | (0, _classCallCheck3.default)(this, Cache);
|
67 | return (0, _possibleConstructorReturn3.default)(this, (Cache.__proto__ || (0, _getPrototypeOf2.default)(Cache)).apply(this, arguments));
|
68 | }
|
69 |
|
70 | (0, _createClass3.default)(Cache, [{
|
71 | key: 'plugin',
|
72 | value: function plugin(path) {
|
73 | return this.cache.plugins[path];
|
74 | }
|
75 | }, {
|
76 | key: 'updatePlugin',
|
77 | value: function updatePlugin(path, plugin) {
|
78 | this.constructor.updated = true;
|
79 | this.cache.plugins[path] = plugin;
|
80 | }
|
81 | }, {
|
82 | key: 'save',
|
83 | value: function save() {
|
84 | if (!this.constructor.updated) return;
|
85 | try {
|
86 | this.fs.writeJSONSync(this.file, this.cache);
|
87 | } catch (err) {
|
88 | this.warn(err);
|
89 | }
|
90 | }
|
91 | }, {
|
92 | key: 'file',
|
93 | get: function get() {
|
94 | return _path2.default.join(this.config.dirs.cache, 'plugins.json');
|
95 | }
|
96 | }, {
|
97 | key: 'cache',
|
98 | get: function get() {
|
99 | if (this._cache) return this._cache;
|
100 | var initial = { version: this.config.version, plugins: {} };
|
101 | try {
|
102 | this._cache = this.fs.readJSONSync(this.file);
|
103 | } catch (err) {
|
104 | if (err.code !== 'ENOENT') throw err;
|
105 | this._cache = initial;
|
106 | }
|
107 | if (this._cache.version !== this.config.version) this._cache = initial;
|
108 | return this._cache;
|
109 | }
|
110 | }]);
|
111 | return Cache;
|
112 | }(_cliEngineCommand.Base);
|
113 | /* globals
|
114 | Class
|
115 | */
|
116 |
|
117 | Cache.updated = false;
|
118 |
|
119 |
|
120 | function undefaultTopic(t) {
|
121 | if (t.default) return t.default;
|
122 | return t;
|
123 | }
|
124 |
|
125 | function undefaultCommand(c) {
|
126 | if (c.default && typeof c.default !== 'boolean') return c.default;
|
127 | return c;
|
128 | }
|
129 |
|
130 | var Plugin = exports.Plugin = function (_Base2) {
|
131 | (0, _inherits3.default)(Plugin, _Base2);
|
132 |
|
133 | function Plugin(type, path, config, cache) {
|
134 | (0, _classCallCheck3.default)(this, Plugin);
|
135 |
|
136 | var _this2 = (0, _possibleConstructorReturn3.default)(this, (Plugin.__proto__ || (0, _getPrototypeOf2.default)(Plugin)).call(this, config));
|
137 |
|
138 | _this2.cache = cache;
|
139 | _this2.type = type;
|
140 | _this2.path = path;
|
141 | var p = _this2.fetch();
|
142 | _this2.name = p.name;
|
143 | _this2.version = p.version;
|
144 | _this2.commands = p.commands;
|
145 | _this2.topics = p.topics;
|
146 | return _this2;
|
147 | }
|
148 |
|
149 | (0, _createClass3.default)(Plugin, [{
|
150 | key: 'findCommand',
|
151 | value: function findCommand(cmd) {
|
152 | var c = this.commands.find(function (c) {
|
153 | return c.id === cmd || (c.aliases || []).includes(cmd);
|
154 | });
|
155 | if (!c) return;
|
156 | var topic = c.topic,
|
157 | command = c.command;
|
158 |
|
159 | var p = this.require();
|
160 | var Command = (p.commands || []).map(undefaultCommand).find(function (d) {
|
161 | return topic === d.topic && command === d.command;
|
162 | });
|
163 | return typeof Command === 'function' ? Command : this.buildCommand(Command);
|
164 | }
|
165 | }, {
|
166 | key: 'findTopic',
|
167 | value: function findTopic(name) {
|
168 | var t = this.topics.find(function (t) {
|
169 | return t.topic === name;
|
170 | });
|
171 | if (!t) return;
|
172 | var Topic = (this.require().topics || []).find(function (t) {
|
173 | return [t.topic, t.name].includes(name);
|
174 | });
|
175 | return typeof Topic === 'function' ? Topic : this.buildTopic(t);
|
176 | }
|
177 | }, {
|
178 | key: 'buildTopic',
|
179 | value: function buildTopic(t) {
|
180 | var _class, _temp;
|
181 |
|
182 | return _temp = _class = function (_Topic) {
|
183 | (0, _inherits3.default)(_class, _Topic);
|
184 |
|
185 | function _class() {
|
186 | (0, _classCallCheck3.default)(this, _class);
|
187 | return (0, _possibleConstructorReturn3.default)(this, (_class.__proto__ || (0, _getPrototypeOf2.default)(_class)).apply(this, arguments));
|
188 | }
|
189 |
|
190 | return _class;
|
191 | }(_cliEngineCommand.Topic), _class.topic = t.topic, _class.description = t.description, _class.hidden = t.hidden, _temp;
|
192 | }
|
193 | }, {
|
194 | key: 'buildCommand',
|
195 | value: function buildCommand(c) {
|
196 | var _class2, _temp2;
|
197 |
|
198 | if (!c.topic) throw new Error('command has no topic');
|
199 | var Base = c.needsApp || c.wantsApp ? _cliEngineCommand.mixins.app(_cliEngineCommand2.default, { required: !!c.needsApp }) : _cliEngineCommand2.default;
|
200 | return _temp2 = _class2 = function (_Base3) {
|
201 | (0, _inherits3.default)(_class2, _Base3);
|
202 |
|
203 | function _class2() {
|
204 | (0, _classCallCheck3.default)(this, _class2);
|
205 | return (0, _possibleConstructorReturn3.default)(this, (_class2.__proto__ || (0, _getPrototypeOf2.default)(_class2)).apply(this, arguments));
|
206 | }
|
207 |
|
208 | (0, _createClass3.default)(_class2, [{
|
209 | key: 'run',
|
210 | value: function run() {
|
211 | var ctx = {
|
212 | supportsColor: this.color.enabled,
|
213 | auth: {},
|
214 | debug: this.config.debug,
|
215 | flags: this.flags,
|
216 | args: this.args,
|
217 | // flow$ignore
|
218 | app: this.app
|
219 | };
|
220 | if (c.needsAuth) {
|
221 | ctx.auth.password = process.env.HEROKU_API_KEY;
|
222 | if (!ctx.auth.password) {
|
223 | var netrc = require('netrc')();
|
224 | var host = netrc['api.heroku.com'];
|
225 | if (host) ctx.auth.password = host.password;
|
226 | }
|
227 | if (!ctx.auth.password) throw new Error('Not logged in');
|
228 | }
|
229 | return c.run(ctx);
|
230 | }
|
231 | }]);
|
232 | return _class2;
|
233 | }(Base), _class2.topic = c.topic, _class2.command = c.command, _class2.description = c.description, _class2.hidden = c.hidden, _class2.args = c.args || [], _class2.flags = c.flags || [], _temp2;
|
234 | }
|
235 | }, {
|
236 | key: 'fetch',
|
237 | value: function fetch() {
|
238 | var c = this.cache.plugin(this.path);
|
239 | if (c) return c;
|
240 | try {
|
241 | return this.updatePlugin(this.require());
|
242 | } catch (err) {
|
243 | if (this.type === 'builtin') throw err;
|
244 | this.warn(err);
|
245 | return {
|
246 | name: this.path,
|
247 | version: '',
|
248 | commands: [],
|
249 | topics: []
|
250 | };
|
251 | }
|
252 | }
|
253 | }, {
|
254 | key: 'updatePlugin',
|
255 | value: function updatePlugin(plugin) {
|
256 | var name = this.type === 'builtin' ? 'builtin' : this.pjson().name;
|
257 | var version = this.type === 'builtin' ? this.config.version : this.pjson().version;
|
258 | if (!plugin.commands) throw new Error('no commands found');
|
259 | var commands = plugin.commands.map(undefaultCommand).map(function (c) {
|
260 | return {
|
261 | id: c.command ? c.topic + ':' + c.command : c.topic,
|
262 | topic: c.topic,
|
263 | command: c.command,
|
264 | description: c.description,
|
265 | args: c.args,
|
266 | flags: c.flags,
|
267 | help: c.help,
|
268 | usage: c.usage,
|
269 | hidden: !!c.hidden,
|
270 | aliases: c.aliases
|
271 | };
|
272 | });
|
273 | var topics = (plugin.topics || (plugin.topic ? [plugin.topic] : [])).map(undefaultTopic).map(function (t) {
|
274 | return {
|
275 | topic: t.topic || t.name || '',
|
276 | description: t.description,
|
277 | hidden: !!t.hidden
|
278 | };
|
279 | });
|
280 |
|
281 | var _iteratorNormalCompletion = true;
|
282 | var _didIteratorError = false;
|
283 | var _iteratorError = undefined;
|
284 |
|
285 | try {
|
286 | var _loop = function _loop() {
|
287 | var command = _step.value;
|
288 |
|
289 | if (topics.find(function (t) {
|
290 | return t.topic === command.topic;
|
291 | })) return 'continue';
|
292 | topics.push({
|
293 | topic: command.topic,
|
294 | hidden: true
|
295 | });
|
296 | };
|
297 |
|
298 | for (var _iterator = (0, _getIterator3.default)(commands), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
299 | var _ret = _loop();
|
300 |
|
301 | if (_ret === 'continue') continue;
|
302 | }
|
303 | } catch (err) {
|
304 | _didIteratorError = true;
|
305 | _iteratorError = err;
|
306 | } finally {
|
307 | try {
|
308 | if (!_iteratorNormalCompletion && _iterator.return) {
|
309 | _iterator.return();
|
310 | }
|
311 | } finally {
|
312 | if (_didIteratorError) {
|
313 | throw _iteratorError;
|
314 | }
|
315 | }
|
316 | }
|
317 |
|
318 | var cachedPlugin = { name: name, version: version, commands: commands, topics: topics };
|
319 | this.cache.updatePlugin(this.path, cachedPlugin);
|
320 | return cachedPlugin;
|
321 | }
|
322 |
|
323 | // flow$ignore
|
324 |
|
325 | }, {
|
326 | key: 'require',
|
327 | value: function (_require) {
|
328 | function require() {
|
329 | return _require.apply(this, arguments);
|
330 | }
|
331 |
|
332 | require.toString = function () {
|
333 | return _require.toString();
|
334 | };
|
335 |
|
336 | return require;
|
337 | }(function () {
|
338 | return require(this.path);
|
339 | })
|
340 | // flow$ignore
|
341 |
|
342 | }, {
|
343 | key: 'pjson',
|
344 | value: function pjson() {
|
345 | return require(_path2.default.join(this.path, 'package.json'));
|
346 | }
|
347 | }]);
|
348 | return Plugin;
|
349 | }(_cliEngineCommand.Base);
|
350 |
|
351 | var Plugins = function (_Base4) {
|
352 | (0, _inherits3.default)(Plugins, _Base4);
|
353 |
|
354 | function Plugins(config) {
|
355 | (0, _classCallCheck3.default)(this, Plugins);
|
356 |
|
357 | var _this5 = (0, _possibleConstructorReturn3.default)(this, (Plugins.__proto__ || (0, _getPrototypeOf2.default)(Plugins)).call(this, config));
|
358 |
|
359 | _this5.config = config;
|
360 | _this5.cache = new Cache(config);
|
361 | _this5.plugins = [new Plugin('builtin', './commands', config, _this5.cache)].concat(_this5.corePlugins).concat(_this5.userPlugins);
|
362 | _this5.cache.save();
|
363 | _this5.yarn = new _yarn2.default(_this5.config);
|
364 | return _this5;
|
365 | }
|
366 |
|
367 | (0, _createClass3.default)(Plugins, [{
|
368 | key: 'list',
|
369 | value: function list() {
|
370 | return this.plugins;
|
371 | }
|
372 | }, {
|
373 | key: 'findCommand',
|
374 | value: function findCommand(cmd) {
|
375 | var _iteratorNormalCompletion2 = true;
|
376 | var _didIteratorError2 = false;
|
377 | var _iteratorError2 = undefined;
|
378 |
|
379 | try {
|
380 | for (var _iterator2 = (0, _getIterator3.default)(this.plugins), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
381 | var plugin = _step2.value;
|
382 |
|
383 | var c = plugin.findCommand(cmd);
|
384 | if (c) return c;
|
385 | }
|
386 | } catch (err) {
|
387 | _didIteratorError2 = true;
|
388 | _iteratorError2 = err;
|
389 | } finally {
|
390 | try {
|
391 | if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
392 | _iterator2.return();
|
393 | }
|
394 | } finally {
|
395 | if (_didIteratorError2) {
|
396 | throw _iteratorError2;
|
397 | }
|
398 | }
|
399 | }
|
400 | }
|
401 | }, {
|
402 | key: 'commandsForTopic',
|
403 | value: function commandsForTopic(topic) {
|
404 | return this.plugins.reduce(function (t, p) {
|
405 | return t.concat(p.commands.filter(function (c) {
|
406 | return c.topic === topic;
|
407 | }).map(function (c) {
|
408 | return p.findCommand(c.id);
|
409 | }));
|
410 | }, []);
|
411 | }
|
412 | }, {
|
413 | key: 'findTopic',
|
414 | value: function findTopic(cmd) {
|
415 | var name = cmd.split(':')[0];
|
416 | var _iteratorNormalCompletion3 = true;
|
417 | var _didIteratorError3 = false;
|
418 | var _iteratorError3 = undefined;
|
419 |
|
420 | try {
|
421 | for (var _iterator3 = (0, _getIterator3.default)(this.plugins), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
422 | var plugin = _step3.value;
|
423 |
|
424 | var t = plugin.findTopic(name);
|
425 | if (t) return t;
|
426 | }
|
427 | } catch (err) {
|
428 | _didIteratorError3 = true;
|
429 | _iteratorError3 = err;
|
430 | } finally {
|
431 | try {
|
432 | if (!_iteratorNormalCompletion3 && _iterator3.return) {
|
433 | _iterator3.return();
|
434 | }
|
435 | } finally {
|
436 | if (_didIteratorError3) {
|
437 | throw _iteratorError3;
|
438 | }
|
439 | }
|
440 | }
|
441 | }
|
442 | }, {
|
443 | key: 'setupUserPlugins',
|
444 | value: function () {
|
445 | var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() {
|
446 | var pjson;
|
447 | return _regenerator2.default.wrap(function _callee$(_context) {
|
448 | while (1) {
|
449 | switch (_context.prev = _context.next) {
|
450 | case 0:
|
451 | pjson = _path2.default.join(this.userPluginsDir, 'package.json');
|
452 |
|
453 | this.fs.mkdirpSync(this.userPluginsDir);
|
454 | if (!this.fs.existsSync(pjson)) this.fs.writeFileSync(pjson, (0, _stringify2.default)({ private: true }));
|
455 | _context.next = 5;
|
456 | return this.yarn.exec();
|
457 |
|
458 | case 5:
|
459 | case 'end':
|
460 | return _context.stop();
|
461 | }
|
462 | }
|
463 | }, _callee, this);
|
464 | }));
|
465 |
|
466 | function setupUserPlugins() {
|
467 | return _ref.apply(this, arguments);
|
468 | }
|
469 |
|
470 | return setupUserPlugins;
|
471 | }()
|
472 | }, {
|
473 | key: 'install',
|
474 | value: function () {
|
475 | var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(name) {
|
476 | var plugin;
|
477 | return _regenerator2.default.wrap(function _callee2$(_context2) {
|
478 | while (1) {
|
479 | switch (_context2.prev = _context2.next) {
|
480 | case 0:
|
481 | _context2.next = 2;
|
482 | return this.setupUserPlugins();
|
483 |
|
484 | case 2:
|
485 | if (!this.config.debug) this.action.start('Installing plugin ' + name);
|
486 | _context2.next = 5;
|
487 | return this.yarn.exec('add', name);
|
488 |
|
489 | case 5:
|
490 | this.clearCache(name);
|
491 | _context2.prev = 6;
|
492 |
|
493 | // flow$ignore
|
494 | plugin = require(this.userPluginPath(name));
|
495 |
|
496 | if (plugin.commands) {
|
497 | _context2.next = 10;
|
498 | break;
|
499 | }
|
500 |
|
501 | throw new Error(name + ' does not appear to be a Heroku CLI plugin');
|
502 |
|
503 | case 10:
|
504 | _context2.next = 18;
|
505 | break;
|
506 |
|
507 | case 12:
|
508 | _context2.prev = 12;
|
509 | _context2.t0 = _context2['catch'](6);
|
510 |
|
511 | this.error(_context2.t0, false);
|
512 | _context2.next = 17;
|
513 | return this.uninstall(name);
|
514 |
|
515 | case 17:
|
516 | this.exit(1);
|
517 |
|
518 | case 18:
|
519 | this.action.stop();
|
520 |
|
521 | case 19:
|
522 | case 'end':
|
523 | return _context2.stop();
|
524 | }
|
525 | }
|
526 | }, _callee2, this, [[6, 12]]);
|
527 | }));
|
528 |
|
529 | function install(_x) {
|
530 | return _ref2.apply(this, arguments);
|
531 | }
|
532 |
|
533 | return install;
|
534 | }()
|
535 | }, {
|
536 | key: 'uninstall',
|
537 | value: function () {
|
538 | var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(name) {
|
539 | return _regenerator2.default.wrap(function _callee3$(_context3) {
|
540 | while (1) {
|
541 | switch (_context3.prev = _context3.next) {
|
542 | case 0:
|
543 | if (!this.config.debug) this.action.start('Uninstalling plugin ' + name);
|
544 | _context3.next = 3;
|
545 | return this.yarn.exec('remove', name);
|
546 |
|
547 | case 3:
|
548 | case 'end':
|
549 | return _context3.stop();
|
550 | }
|
551 | }
|
552 | }, _callee3, this);
|
553 | }));
|
554 |
|
555 | function uninstall(_x2) {
|
556 | return _ref3.apply(this, arguments);
|
557 | }
|
558 |
|
559 | return uninstall;
|
560 | }()
|
561 | }, {
|
562 | key: 'clearCache',
|
563 | value: function clearCache(name) {
|
564 | var _iteratorNormalCompletion4 = true;
|
565 | var _didIteratorError4 = false;
|
566 | var _iteratorError4 = undefined;
|
567 |
|
568 | try {
|
569 | for (var _iterator4 = (0, _getIterator3.default)((0, _keys2.default)(this.cache.cache.plugins)), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
|
570 | var k = _step4.value;
|
571 |
|
572 | if (this.cache.cache.plugins[k].name === name) delete this.cache.cache[k];
|
573 | }
|
574 | } catch (err) {
|
575 | _didIteratorError4 = true;
|
576 | _iteratorError4 = err;
|
577 | } finally {
|
578 | try {
|
579 | if (!_iteratorNormalCompletion4 && _iterator4.return) {
|
580 | _iterator4.return();
|
581 | }
|
582 | } finally {
|
583 | if (_didIteratorError4) {
|
584 | throw _iteratorError4;
|
585 | }
|
586 | }
|
587 | }
|
588 |
|
589 | this.cache.save();
|
590 | }
|
591 | }, {
|
592 | key: 'userPluginPath',
|
593 | value: function userPluginPath(name) {
|
594 | return _path2.default.join(this.userPluginsDir, 'node_modules', name);
|
595 | }
|
596 | }, {
|
597 | key: 'corePlugins',
|
598 | get: function get() {
|
599 | var _this6 = this;
|
600 |
|
601 | return (this.config._cli.plugins || []).map(function (name) {
|
602 | return new Plugin('core', _path2.default.join(_this6.config.root, 'node_modules', name), _this6.config, _this6.cache);
|
603 | });
|
604 | }
|
605 | }, {
|
606 | key: 'userPlugins',
|
607 | get: function get() {
|
608 | var _this7 = this;
|
609 |
|
610 | var pjson = this.userPluginsPJSON;
|
611 | return (0, _keys2.default)(pjson.dependencies || {}).map(function (name) {
|
612 | return new Plugin('user', _this7.userPluginPath(name), _this7.config, _this7.cache);
|
613 | });
|
614 | }
|
615 | }, {
|
616 | key: 'userPluginsPJSON',
|
617 | get: function get() {
|
618 | try {
|
619 | return this.fs.readJSONSync(_path2.default.join(this.userPluginsDir, 'package.json'));
|
620 | } catch (err) {
|
621 | return { dependencies: {} };
|
622 | }
|
623 | }
|
624 | }, {
|
625 | key: 'userPluginsDir',
|
626 | get: function get() {
|
627 | return _path2.default.join(this.config.dirs.data, 'plugins');
|
628 | }
|
629 | }, {
|
630 | key: 'topics',
|
631 | get: function get() {
|
632 | return this.plugins.reduce(function (t, p) {
|
633 | return t.concat(p.topics);
|
634 | }, []);
|
635 | }
|
636 | }]);
|
637 | return Plugins;
|
638 | }(_cliEngineCommand.Base);
|
639 |
|
640 | exports.default = Plugins;
|
641 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wbHVnaW5zLmpzIl0sIm5hbWVzIjpbIkNhY2hlIiwicGF0aCIsImNhY2hlIiwicGx1Z2lucyIsInBsdWdpbiIsImNvbnN0cnVjdG9yIiwidXBkYXRlZCIsImZzIiwid3JpdGVKU09OU3luYyIsImZpbGUiLCJlcnIiLCJ3YXJuIiwiam9pbiIsImNvbmZpZyIsImRpcnMiLCJfY2FjaGUiLCJpbml0aWFsIiwidmVyc2lvbiIsInJlYWRKU09OU3luYyIsImNvZGUiLCJ1bmRlZmF1bHRUb3BpYyIsInQiLCJkZWZhdWx0IiwidW5kZWZhdWx0Q29tbWFuZCIsImMiLCJQbHVnaW4iLCJ0eXBlIiwicCIsImZldGNoIiwibmFtZSIsImNvbW1hbmRzIiwidG9waWNzIiwiY21kIiwiZmluZCIsImlkIiwiYWxpYXNlcyIsImluY2x1ZGVzIiwidG9waWMiLCJjb21tYW5kIiwicmVxdWlyZSIsIkNvbW1hbmQiLCJtYXAiLCJkIiwiYnVpbGRDb21tYW5kIiwiVG9waWMiLCJidWlsZFRvcGljIiwiZGVzY3JpcHRpb24iLCJoaWRkZW4iLCJFcnJvciIsIkJhc2UiLCJuZWVkc0FwcCIsIndhbnRzQXBwIiwiYXBwIiwicmVxdWlyZWQiLCJjdHgiLCJzdXBwb3J0c0NvbG9yIiwiY29sb3IiLCJlbmFibGVkIiwiYXV0aCIsImRlYnVnIiwiZmxhZ3MiLCJhcmdzIiwibmVlZHNBdXRoIiwicGFzc3dvcmQiLCJwcm9jZXNzIiwiZW52IiwiSEVST0tVX0FQSV9LRVkiLCJuZXRyYyIsImhvc3QiLCJydW4iLCJ1cGRhdGVQbHVnaW4iLCJwanNvbiIsImhlbHAiLCJ1c2FnZSIsInB1c2giLCJjYWNoZWRQbHVnaW4iLCJQbHVnaW5zIiwiY29uY2F0IiwiY29yZVB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