@sentry/wizard
Version:
Sentry wizard helping you to configure your project
36 lines • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseIntegration = void 0;
const BaseStep_1 = require("../BaseStep");
class BaseIntegration extends BaseStep_1.BaseStep {
_argv;
type;
_shouldConfigure;
constructor(_argv) {
super(_argv);
this._argv = _argv;
this.type = this.constructor.name;
}
// eslint-disable-next-line @typescript-eslint/require-await
async uninstall(_answers) {
return {};
}
/**
* This can be used for example for platform:boolean to determine
* if we should configure iOS/Android.
* Basically this will be merged into answers so it can be checked by a later step.
*/
async shouldConfigure(_answers) {
// eslint-disable-next-line @typescript-eslint/no-misused-promises
if (this._shouldConfigure) {
return this._shouldConfigure;
}
this._shouldConfigure = Promise.resolve({ platform: true });
return this._shouldConfigure;
}
async shouldEmit(_answers) {
return Object.values(await this.shouldConfigure(_answers)).some((active) => active);
}
}
exports.BaseIntegration = BaseIntegration;
//# sourceMappingURL=BaseIntegration.js.map