(callback, requireTeam, deprecationInfo)
| 98658 | } |
| 98659 | |
| 98660 | function wrapRequired(callback, requireTeam, deprecationInfo) { |
| 98661 | return (() => { |
| 98662 | var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { |
| 98663 | if (deprecationInfo) { |
| 98664 | warnDeprecation(reporter, deprecationInfo); |
| 98665 | } |
| 98666 | |
| 98667 | if (!args.length) { |
| 98668 | return false; |
| 98669 | } |
| 98670 | |
| 98671 | const parts = explodeScopeTeam(args[0], requireTeam, reporter); |
| 98672 | if (!parts) { |
| 98673 | return false; |
| 98674 | } |
| 98675 | |
| 98676 | reporter.step(1, 3, reporter.lang('loggingIn')); |
| 98677 | const revoke = yield (0, (_login || _load_login()).getToken)(config, reporter); |
| 98678 | |
| 98679 | const res = yield callback(parts, config, reporter, flags, args); |
| 98680 | if (!res) { |
| 98681 | return res; |
| 98682 | } |
| 98683 | |
| 98684 | reporter.step(3, 3, reporter.lang('revokingToken')); |
| 98685 | yield revoke(); |
| 98686 | return true; |
| 98687 | }); |
| 98688 | |
| 98689 | return function (_x, _x2, _x3, _x4) { |
| 98690 | return _ref.apply(this, arguments); |
| 98691 | }; |
| 98692 | })(); |
| 98693 | } |
| 98694 | |
| 98695 | function wrapRequiredTeam(callback, requireTeam = true, subCommandDeprecated) { |
| 98696 | return wrapRequired(function (parts, config, reporter, flags, args) { |
no test coverage detected