@adinsure-ops/ops-cli 4.8.3 → 5.0.0-rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/CHANGELOGS.md +12 -0
  2. package/README.md +0 -211
  3. package/bin/dev.cmd +3 -0
  4. package/bin/dev.js +6 -0
  5. package/bin/run.cmd +1 -1
  6. package/bin/run.js +8 -0
  7. package/lib/command.base.d.ts +9 -5
  8. package/lib/command.base.jira.d.ts +7 -8
  9. package/lib/command.base.jira.js +26 -24
  10. package/lib/command.base.js +69 -57
  11. package/lib/commands/docker/update-image-version.d.ts +6 -9
  12. package/lib/commands/docker/update-image-version.js +35 -34
  13. package/lib/commands/doctor.d.ts +15 -5
  14. package/lib/commands/doctor.js +219 -186
  15. package/lib/commands/download/client.d.ts +10 -7
  16. package/lib/commands/download/client.js +60 -52
  17. package/lib/commands/download/identity-server.d.ts +9 -7
  18. package/lib/commands/download/identity-server.js +59 -53
  19. package/lib/commands/download/jmeter.d.ts +5 -5
  20. package/lib/commands/download/jmeter.js +54 -49
  21. package/lib/commands/download/keycloak-scim.d.ts +6 -6
  22. package/lib/commands/download/keycloak-scim.js +56 -51
  23. package/lib/commands/download/platform.d.ts +9 -7
  24. package/lib/commands/download/platform.js +59 -53
  25. package/lib/commands/download/scheduler.d.ts +9 -7
  26. package/lib/commands/download/scheduler.js +59 -53
  27. package/lib/commands/download/server.d.ts +9 -7
  28. package/lib/commands/download/server.js +59 -53
  29. package/lib/commands/download/signalr.d.ts +9 -7
  30. package/lib/commands/download/signalr.js +59 -53
  31. package/lib/commands/download/studio.d.ts +11 -9
  32. package/lib/commands/download/studio.js +92 -82
  33. package/lib/commands/gitlab/get-tag-pipeline.d.ts +11 -14
  34. package/lib/commands/gitlab/get-tag-pipeline.js +95 -92
  35. package/lib/commands/gitlab/next-nightly-tag.d.ts +10 -12
  36. package/lib/commands/gitlab/next-nightly-tag.js +96 -98
  37. package/lib/commands/jira/issue.d.ts +6 -8
  38. package/lib/commands/jira/issue.js +25 -23
  39. package/lib/commands/jira/labels.d.ts +9 -12
  40. package/lib/commands/jira/labels.js +52 -51
  41. package/lib/commands/log/add.d.ts +6 -8
  42. package/lib/commands/log/add.js +92 -87
  43. package/lib/commands/log/generate.d.ts +9 -10
  44. package/lib/commands/log/generate.js +112 -107
  45. package/lib/commands/log/validate.d.ts +2 -2
  46. package/lib/commands/log/validate.js +47 -43
  47. package/lib/commands/login.d.ts +9 -10
  48. package/lib/commands/login.js +101 -97
  49. package/lib/commands/npm/check-publish.d.ts +7 -8
  50. package/lib/commands/npm/check-publish.js +59 -54
  51. package/lib/commands/npm/dependency-update.d.ts +14 -12
  52. package/lib/commands/npm/dependency-update.js +94 -86
  53. package/lib/commands/npm/publish.d.ts +8 -9
  54. package/lib/commands/npm/publish.js +154 -140
  55. package/lib/commands/nuget/dependency-update.d.ts +15 -10
  56. package/lib/commands/nuget/dependency-update.js +60 -49
  57. package/lib/commands/sql.d.ts +24 -20
  58. package/lib/commands/sql.js +245 -226
  59. package/lib/commands/translate.d.ts +15 -16
  60. package/lib/commands/translate.js +109 -104
  61. package/lib/commands/version.d.ts +29 -19
  62. package/lib/commands/version.js +215 -190
  63. package/lib/config.js +3 -6
  64. package/lib/hooks/init/version-override.d.ts +2 -2
  65. package/lib/hooks/init/version-override.js +15 -13
  66. package/lib/index.d.ts +1 -1
  67. package/lib/index.js +1 -4
  68. package/lib/lib/command.d.ts +2 -0
  69. package/lib/lib/command.js +65 -58
  70. package/lib/lib/gitlab.d.ts +8 -2
  71. package/lib/lib/gitlab.js +94 -82
  72. package/lib/lib/npm.d.ts +7 -3
  73. package/lib/lib/npm.js +72 -60
  74. package/lib/lib/npmrc.d.ts +5 -0
  75. package/lib/lib/npmrc.js +20 -13
  76. package/lib/lib/nuget.d.ts +2 -0
  77. package/lib/lib/nuget.js +20 -17
  78. package/lib/security/cache.js +31 -27
  79. package/lib/security/context.d.ts +2 -1
  80. package/lib/security/context.js +106 -103
  81. package/lib/types/changelog.types.js +1 -2
  82. package/lib/types/npm.types.d.ts +5 -5
  83. package/lib/types/npm.types.js +1 -2
  84. package/oclif.manifest.json +1212 -1
  85. package/package.json +50 -46
  86. package/bin/run +0 -5
  87. package/lib/commands/prepare-content.d.ts +0 -29
  88. package/lib/commands/prepare-content.js +0 -386
@@ -1,18 +1,20 @@
1
- import CommandBase from '../command.base';
2
- export default class Doctor extends CommandBase {
1
+ import CommandBase from '../command.base.js';
2
+ export default class Doctor extends CommandBase<typeof Doctor> {
3
3
  static description: string;
4
4
  static usage: string;
5
5
  static examples: string[];
6
6
  static flags: {
7
- fix: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
7
+ fix: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
8
8
  };
9
9
  private readonly cp;
10
10
  private nvm;
11
11
  private yarn;
12
12
  private node;
13
- private missing_packages;
13
+ private missingPackages;
14
14
  /**
15
- * Check if nvm is installed
15
+ * Check if Git is installed
16
+ * @param {boolean} fix Try to install Git if found missing
17
+ * @returns {void}
16
18
  */
17
19
  gitCheck(fix: boolean): Promise<void>;
18
20
  gitInstall(): Promise<void>;
@@ -20,26 +22,34 @@ export default class Doctor extends CommandBase {
20
22
  gitWindowsInstall(): Promise<void>;
21
23
  /**
22
24
  * Check if nvm is installed
25
+ * @returns {void}
23
26
  */
24
27
  nvmCheck(): Promise<void>;
25
28
  /**
26
29
  * Check which node is installed
30
+ * @param {boolean} fix Try to install Node if found missing
31
+ * @returns {void}
27
32
  */
28
33
  nodeCheck(fix: boolean): Promise<void>;
29
34
  /**
30
35
  * Check which node is installed
36
+ * @returns {void}
31
37
  */
32
38
  nodeInstall(): Promise<void>;
33
39
  /**
34
40
  * Check which yarn is installed
41
+ * @param {boolean} fix Try to install yarn if found missing
42
+ * @returns {void}
35
43
  */
36
44
  yarnCheck(fix: boolean): Promise<void>;
37
45
  /**
38
46
  * Check which yarn is installed
47
+ * @returns {void}
39
48
  */
40
49
  yarnInstall(): Promise<void>;
41
50
  /**
42
51
  * Check which VSCode is installed
52
+ * @returns {void}
43
53
  */
44
54
  vscodeCheck(): Promise<void>;
45
55
  run(): Promise<void>;
@@ -1,257 +1,290 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@oclif/command");
4
- const chalk_1 = require("chalk");
5
- const cli_ux_1 = require("cli-ux");
6
- const fs = require("fs-extra");
7
- const command_base_1 = require("../command.base");
8
- const command_2 = require("../lib/command");
9
- class Doctor extends command_base_1.default {
1
+ import { __awaiter } from "tslib";
2
+ import { Flags, ux } from '@oclif/core';
3
+ import chalk from 'chalk';
4
+ import fs from 'fs-extra';
5
+ import CommandBase from '../command.base.js';
6
+ import ChildProcessCommand from '../lib/command.js';
7
+ class Doctor extends CommandBase {
10
8
  constructor() {
11
9
  super(...arguments);
12
- this.cp = new command_2.default();
10
+ this.cp = new ChildProcessCommand();
13
11
  this.nvm = false;
14
12
  this.yarn = false;
15
13
  this.node = false;
16
- this.missing_packages = 0;
14
+ this.missingPackages = 0;
17
15
  }
18
16
  /**
19
- * Check if nvm is installed
17
+ * Check if Git is installed
18
+ * @param {boolean} fix Try to install Git if found missing
19
+ * @returns {void}
20
20
  */
21
- async gitCheck(fix) {
22
- cli_ux_1.default.action.start('Checking git', undefined, { stdout: true });
23
- try {
24
- let output = await this.cp.runCommand(['git', '--version']);
25
- if (output.error) {
26
- cli_ux_1.default.action.stop(`${chalk_1.default.red(output.error)}`);
27
- }
28
- else {
29
- let version = output.data.split(' ')[2].split('\n')[0];
30
- cli_ux_1.default.action.stop(`${chalk_1.default.green(version)}`);
31
- }
32
- }
33
- catch (_a) {
34
- cli_ux_1.default.action.stop(`${chalk_1.default.red('git is missing')}`);
35
- if (fix) {
36
- await this.gitInstall();
21
+ gitCheck(fix) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ ux.action.start('Checking git', undefined, { stdout: true });
24
+ try {
25
+ const output = yield this.cp.runCommand(['git', '--version']);
26
+ if (output.error) {
27
+ ux.action.stop(`${chalk.red(output.error)}`);
28
+ }
29
+ else {
30
+ const version = output.data.split(' ')[2].split('\n')[0];
31
+ ux.action.stop(`${chalk.green(version)}`);
32
+ }
37
33
  }
38
- else {
39
- this.missing_packages++;
40
- this.warn(`Looks like git is missing.
34
+ catch (_a) {
35
+ ux.action.stop(`${chalk.red('git is missing')}`);
36
+ if (fix) {
37
+ yield this.gitInstall();
38
+ }
39
+ else {
40
+ this.missingPackages++;
41
+ this.warn(`Looks like git is missing.
41
42
  Official documentation on how to install git can be found here: (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)`);
43
+ }
42
44
  }
43
- }
45
+ });
44
46
  }
45
- async gitInstall() {
46
- switch (process.platform) {
47
- case 'linux':
48
- await this.gitLinuxInstall();
49
- break;
50
- case 'win32':
51
- break;
52
- default:
53
- this.warn('unsupported platform. skipping git install.');
54
- }
47
+ gitInstall() {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ switch (process.platform) {
50
+ case 'linux': {
51
+ yield this.gitLinuxInstall();
52
+ break;
53
+ }
54
+ case 'win32': {
55
+ break;
56
+ }
57
+ default: {
58
+ this.warn('unsupported platform. skipping git install.');
59
+ }
60
+ }
61
+ });
55
62
  }
56
- async gitLinuxInstall() {
57
- this.log(`Try to install git on ubuntu. Sudo is required`);
58
- try {
59
- await this.cp.runCommand(['sudo', 'apt', 'update']);
60
- await this.cp.runCommand(['sudo', 'apt', 'install', 'git']);
61
- await this.gitCheck(false);
62
- }
63
- catch (_a) {
64
- cli_ux_1.default.action.stop(`${chalk_1.default.red('error installing git.')}`);
65
- }
63
+ gitLinuxInstall() {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ this.log(`Try to install git on ubuntu. Sudo is required`);
66
+ try {
67
+ yield this.cp.runCommand(['sudo', 'apt', 'update']);
68
+ yield this.cp.runCommand(['sudo', 'apt', 'install', 'git']);
69
+ yield this.gitCheck(false);
70
+ }
71
+ catch (_a) {
72
+ ux.action.stop(`${chalk.red('error installing git.')}`);
73
+ }
74
+ });
66
75
  }
67
- async gitWindowsInstall() {
68
- // https://github.com/git-for-windows/git/releases/download/v2.33.1.windows.1/Git-2.33.1-64-bit.exe
69
- // %USERPROFILE%\Downloads
76
+ gitWindowsInstall() {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ // https://github.com/git-for-windows/git/releases/download/v2.33.1.windows.1/Git-2.33.1-64-bit.exe
79
+ // %USERPROFILE%\Downloads
80
+ });
70
81
  }
71
82
  /**
72
83
  * Check if nvm is installed
84
+ * @returns {void}
73
85
  */
74
- async nvmCheck() {
75
- cli_ux_1.default.action.start('Checking nvm', undefined, { stdout: true });
76
- if (process.platform !== 'win32') {
77
- if (process.env.NVM_DIR) {
78
- try {
79
- let data = await fs.readJSON(`${process.env.NVM_DIR}/package.json`);
80
- cli_ux_1.default.action.stop(`${chalk_1.default.green(data.version)}`);
81
- this.nvm = true;
86
+ nvmCheck() {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ ux.action.start('Checking nvm', undefined, { stdout: true });
89
+ if (process.platform !== 'win32') {
90
+ if (process.env.NVM_DIR) {
91
+ try {
92
+ const data = yield fs.readJSON(`${process.env.NVM_DIR}/package.json`);
93
+ ux.action.stop(`${chalk.green(data.version)}`);
94
+ this.nvm = true;
95
+ }
96
+ catch (_a) {
97
+ ux.action.stop(`${chalk.red('not installed')}`);
98
+ }
82
99
  }
83
- catch (_a) {
84
- cli_ux_1.default.action.stop(`${chalk_1.default.red('not installed')}`);
100
+ else {
101
+ ux.action.stop(`${chalk.red('nvm is missing (install manually from https://github.com/nvm-sh/nvm#installing-and-updating')}`);
85
102
  }
103
+ return;
86
104
  }
87
- else {
88
- cli_ux_1.default.action.stop(`${chalk_1.default.red('nvm is missing (install manually from https://github.com/nvm-sh/nvm#installing-and-updating')}`);
89
- }
90
- return;
91
- }
92
- try {
93
- let output = await this.cp.runCommand(['nvm', 'version']);
94
- if (output.error) {
95
- cli_ux_1.default.action.stop(`${chalk_1.default.red(output.error)}`);
105
+ try {
106
+ const output = yield this.cp.runCommand(['nvm', 'version']);
107
+ if (output.error) {
108
+ ux.action.stop(`${chalk.red(output.error)}`);
109
+ }
110
+ else {
111
+ const version = output.data.split('\n')[0];
112
+ this.nvm = true;
113
+ ux.action.stop(`${chalk.green(version)}`);
114
+ }
96
115
  }
97
- else {
98
- let version = output.data.split('\n')[0];
99
- this.nvm = true;
100
- cli_ux_1.default.action.stop(`${chalk_1.default.green(version)}`);
116
+ catch (_b) {
117
+ ux.action.stop(`${chalk.red('nvm is missing (install manually from https://github.com/coreybutler/nvm-windows/releases)')}`);
101
118
  }
102
- }
103
- catch (_b) {
104
- cli_ux_1.default.action.stop(`${chalk_1.default.red('nvm is missing (install manually from https://github.com/coreybutler/nvm-windows/releases)')}`);
105
- }
119
+ });
106
120
  }
107
121
  /**
108
122
  * Check which node is installed
123
+ * @param {boolean} fix Try to install Node if found missing
124
+ * @returns {void}
109
125
  */
110
- async nodeCheck(fix) {
111
- cli_ux_1.default.action.start('Checking node', undefined, { stdout: true });
112
- try {
113
- let output = await this.cp.runCommand(['node', '--version']);
114
- if (output.error) {
115
- cli_ux_1.default.action.stop(`${chalk_1.default.red(output.error)}`);
116
- }
117
- else {
118
- let version = output.data.split('\n')[0];
119
- if (version) {
120
- cli_ux_1.default.action.stop(`${chalk_1.default.green(version)}`);
121
- this.node = true;
122
- // only check yarn if node is installed
123
- await this.yarnCheck(fix);
126
+ nodeCheck(fix) {
127
+ return __awaiter(this, void 0, void 0, function* () {
128
+ ux.action.start('Checking node', undefined, { stdout: true });
129
+ try {
130
+ const output = yield this.cp.runCommand(['node', '--version']);
131
+ if (output.error) {
132
+ ux.action.stop(`${chalk.red(output.error)}`);
124
133
  }
125
134
  else {
126
- cli_ux_1.default.action.stop(`${chalk_1.default.red('failed getting version')}`);
135
+ const version = output.data.split('\n')[0];
136
+ if (version) {
137
+ ux.action.stop(`${chalk.green(version)}`);
138
+ this.node = true;
139
+ // only check yarn if node is installed
140
+ yield this.yarnCheck(fix);
141
+ }
142
+ else {
143
+ ux.action.stop(`${chalk.red('failed getting version')}`);
144
+ }
127
145
  }
128
146
  }
129
- }
130
- catch (_a) {
131
- cli_ux_1.default.action.stop(`${chalk_1.default.red('node is missing')}`);
132
- if (fix && this.nvm) {
133
- await this.nodeInstall();
134
- }
135
- else {
136
- this.missing_packages++;
147
+ catch (_a) {
148
+ ux.action.stop(`${chalk.red('node is missing')}`);
149
+ if (fix && this.nvm) {
150
+ yield this.nodeInstall();
151
+ }
152
+ else {
153
+ this.missingPackages++;
154
+ }
137
155
  }
138
- }
156
+ });
139
157
  }
140
158
  /**
141
159
  * Check which node is installed
160
+ * @returns {void}
142
161
  */
143
- async nodeInstall() {
144
- cli_ux_1.default.action.start('installing node 15.6.0', undefined, { stdout: true });
145
- if (!this.nvm) {
146
- return cli_ux_1.default.action.stop(`${chalk_1.default.red('only works with nvm isntalled')}`);
147
- }
148
- try {
149
- let output = await this.cp.runCommand(['nvm', 'install', '15.6.0']);
150
- if (output.error) {
151
- cli_ux_1.default.action.stop(`${chalk_1.default.red(output.error)}`);
162
+ nodeInstall() {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ ux.action.start('installing node 15.6.0', undefined, { stdout: true });
165
+ if (!this.nvm) {
166
+ return ux.action.stop(`${chalk.red('only works with nvm isntalled')}`);
152
167
  }
153
- else {
154
- let nvmUserOutput = await this.cp.runCommand(['nvm', 'use', '15.6.0']);
155
- if (nvmUserOutput.error) {
156
- cli_ux_1.default.action.stop(`${chalk_1.default.red(output.error)}`);
168
+ try {
169
+ const output = yield this.cp.runCommand(['nvm', 'install', '15.6.0']);
170
+ if (output.error) {
171
+ ux.action.stop(`${chalk.red(output.error)}`);
172
+ }
173
+ else {
174
+ const nvmUserOutput = yield this.cp.runCommand(['nvm', 'use', '15.6.0']);
175
+ if (nvmUserOutput.error) {
176
+ ux.action.stop(`${chalk.red(output.error)}`);
177
+ }
178
+ ux.action.stop(`${chalk.green('Done')}`);
157
179
  }
158
- cli_ux_1.default.action.stop(`${chalk_1.default.green('Done')}`);
159
180
  }
160
- }
161
- catch (_a) {
162
- cli_ux_1.default.action.stop(`${chalk_1.default.red('failed')}`);
163
- }
181
+ catch (_a) {
182
+ ux.action.stop(`${chalk.red('failed')}`);
183
+ }
184
+ });
164
185
  }
165
186
  /**
166
187
  * Check which yarn is installed
188
+ * @param {boolean} fix Try to install yarn if found missing
189
+ * @returns {void}
167
190
  */
168
- async yarnCheck(fix) {
169
- cli_ux_1.default.action.start('Checking yarn', undefined, { stdout: true });
170
- try {
171
- let output = await this.cp.runCommand(['yarn', '--version']);
172
- if (output.error) {
173
- cli_ux_1.default.action.stop(`${chalk_1.default.red(output.error)}`);
174
- }
175
- else {
176
- let version = output.data.split('\n')[0];
177
- if (version) {
178
- this.yarn = true;
179
- cli_ux_1.default.action.stop(`${chalk_1.default.green(version)}`);
191
+ yarnCheck(fix) {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ ux.action.start('Checking yarn', undefined, { stdout: true });
194
+ try {
195
+ const output = yield this.cp.runCommand(['yarn', '--version']);
196
+ if (output.error) {
197
+ ux.action.stop(`${chalk.red(output.error)}`);
180
198
  }
181
199
  else {
182
- cli_ux_1.default.action.stop(`${chalk_1.default.red('yarn is missing')}`);
200
+ const version = output.data.split('\n')[0];
201
+ if (version) {
202
+ this.yarn = true;
203
+ ux.action.stop(`${chalk.green(version)}`);
204
+ }
205
+ else {
206
+ ux.action.stop(`${chalk.red('yarn is missing')}`);
207
+ }
183
208
  }
184
209
  }
185
- }
186
- catch (_a) {
187
- this.missing_packages++;
188
- cli_ux_1.default.action.stop(`${chalk_1.default.red('yarn is missing')}`);
189
- if (fix) {
190
- await this.yarnInstall();
210
+ catch (_a) {
211
+ this.missingPackages++;
212
+ ux.action.stop(`${chalk.red('yarn is missing')}`);
213
+ if (fix) {
214
+ yield this.yarnInstall();
215
+ }
191
216
  }
192
- }
217
+ });
193
218
  }
194
219
  /**
195
220
  * Check which yarn is installed
221
+ * @returns {void}
196
222
  */
197
- async yarnInstall() {
198
- cli_ux_1.default.action.start('Install yarn', undefined, { stdout: true });
199
- try {
200
- let output = await this.cp.runCommand(['npm', '-g', 'install', 'yarn']);
201
- if (output.error) {
202
- cli_ux_1.default.action.stop(`${chalk_1.default.red(output.error)}`);
223
+ yarnInstall() {
224
+ return __awaiter(this, void 0, void 0, function* () {
225
+ ux.action.start('Install yarn', undefined, { stdout: true });
226
+ try {
227
+ const output = yield this.cp.runCommand(['npm', '-g', 'install', 'yarn']);
228
+ if (output.error) {
229
+ ux.action.stop(`${chalk.red(output.error)}`);
230
+ }
231
+ else {
232
+ this.yarn = true;
233
+ ux.action.stop(`${chalk.green('yarn installed')}`);
234
+ }
203
235
  }
204
- else {
205
- this.yarn = true;
206
- cli_ux_1.default.action.stop(`${chalk_1.default.green('yarn installed')}`);
236
+ catch (_a) {
237
+ this.missingPackages++;
238
+ ux.action.stop(`${chalk.red('yarn failed to install')}`);
207
239
  }
208
- }
209
- catch (_a) {
210
- this.missing_packages++;
211
- cli_ux_1.default.action.stop(`${chalk_1.default.red('yarn failed to install')}`);
212
- }
240
+ });
213
241
  }
214
242
  /**
215
243
  * Check which VSCode is installed
244
+ * @returns {void}
216
245
  */
217
- async vscodeCheck() {
218
- cli_ux_1.default.action.start('Checking vscode', undefined, { stdout: true });
219
- try {
220
- let output = await this.cp.runCommand(['code', '--version']);
221
- if (output.error) {
222
- cli_ux_1.default.action.stop(`${chalk_1.default.red(output.error)}`);
246
+ vscodeCheck() {
247
+ return __awaiter(this, void 0, void 0, function* () {
248
+ ux.action.start('Checking vscode', undefined, { stdout: true });
249
+ try {
250
+ const output = yield this.cp.runCommand(['code', '--version']);
251
+ if (output.error) {
252
+ ux.action.stop(`${chalk.red(output.error)}`);
253
+ }
254
+ else {
255
+ const version = output.data.split('\n')[0];
256
+ ux.action.stop(`${chalk.green(version)}`);
257
+ }
223
258
  }
224
- else {
225
- let version = output.data.split('\n')[0];
226
- cli_ux_1.default.action.stop(`${chalk_1.default.green(version)}`);
259
+ catch (_a) {
260
+ this.missingPackages++;
261
+ ux.action.stop(`${chalk.red('VSCode not installed')}`);
227
262
  }
228
- }
229
- catch (_a) {
230
- this.missing_packages++;
231
- cli_ux_1.default.action.stop(`${chalk_1.default.red('VSCode not installed')}`);
232
- }
263
+ });
233
264
  }
234
- async run() {
235
- const { flags } = this.parse(Doctor);
236
- await this.gitCheck(flags.fix);
237
- await this.nvmCheck();
238
- await this.nodeCheck(flags.fix);
239
- await this.vscodeCheck();
240
- if (this.missing_packages > 0) {
241
- this.warn(`${chalk_1.default.yellow('Some packages are missing. Try --fix to automatically install.')}`);
242
- }
265
+ run() {
266
+ return __awaiter(this, void 0, void 0, function* () {
267
+ const { flags } = yield this.parse(Doctor);
268
+ yield this.gitCheck(flags.fix);
269
+ yield this.nvmCheck();
270
+ yield this.nodeCheck(flags.fix);
271
+ yield this.vscodeCheck();
272
+ if (this.missingPackages > 0) {
273
+ this.warn(`${chalk.yellow('Some packages are missing. Try --fix to automatically install.')}`);
274
+ }
275
+ });
243
276
  }
244
277
  }
245
- exports.default = Doctor;
246
278
  Doctor.description = 'check if everything is installed';
247
279
  Doctor.usage = 'doctor';
248
280
  Doctor.examples = [
249
- `$ ops doctor`
281
+ `$ ops doctor`,
250
282
  ];
251
283
  Doctor.flags = {
252
- fix: command_1.flags.boolean({
284
+ fix: Flags.boolean({
253
285
  char: 'p',
254
286
  description: 'try to install missing packages',
255
- default: false
256
- })
287
+ default: false,
288
+ }),
257
289
  };
290
+ export default Doctor;
@@ -1,17 +1,20 @@
1
- import { flags } from '@oclif/command';
2
- import CommandBase from '../../command.base';
3
- export default class DownloadClient extends CommandBase {
1
+ import { AxiosResponse } from 'axios';
2
+ import CommandBase from '../../command.base.js';
3
+ export default class DownloadClient extends CommandBase<typeof DownloadClient> {
4
+ static aliases: string[];
4
5
  static description: string;
5
6
  static usage: string;
6
7
  static examples: string[];
7
8
  static flags: {
8
- version: flags.IOptionFlag<string>;
9
- output: flags.IOptionFlag<string>;
9
+ version: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
+ output: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
11
  };
11
12
  private readonly url;
12
13
  /**
13
- * Get unique scriptID by specified version
14
+ * Get unique AdInsure Client zip by specified version
15
+ * @param {string} version The version of AdInsure Client
16
+ * @returns {Promise<AxiosResponse<any, any>>}
14
17
  */
15
- downloadFile(version: string): Promise<string>;
18
+ downloadFile(version: string): Promise<AxiosResponse<any, any>>;
16
19
  run(): Promise<void>;
17
20
  }