123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- 'use strict';
- const pkgInfo = require('../package.json');
- const helper = require('./helper');
- const Releases = require('./releases');
- const install = require('./install');
- class SentryCli {
-
- constructor(configFile, options) {
- if (typeof configFile === 'string') {
- this.configFile = configFile;
- }
- this.options = options || { silent: false };
- this.releases = new Releases({ ...this.options, configFile });
- }
-
- static getVersion() {
- return pkgInfo.version;
- }
-
- static getPath() {
- return helper.getPath();
- }
-
- static downloadBinary(logger) {
- return install.downloadBinary(logger);
- }
-
- execute(args, live) {
- return helper.execute(args, live, this.options.silent, this.configFile, this.options);
- }
- }
- module.exports = SentryCli;
|