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

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 (89) hide show
  1. package/CHANGELOGS.md +52 -36
  2. package/LICENSE +1 -1
  3. package/README.md +32 -242
  4. package/bin/dev.cmd +3 -0
  5. package/bin/dev.js +6 -0
  6. package/bin/run.cmd +1 -1
  7. package/bin/run.js +8 -0
  8. package/lib/command.base.d.ts +9 -5
  9. package/lib/command.base.jira.d.ts +7 -8
  10. package/lib/command.base.jira.js +26 -24
  11. package/lib/command.base.js +69 -57
  12. package/lib/commands/docker/update-image-version.d.ts +6 -9
  13. package/lib/commands/docker/update-image-version.js +35 -34
  14. package/lib/commands/doctor.d.ts +15 -5
  15. package/lib/commands/doctor.js +219 -186
  16. package/lib/commands/download/client.d.ts +10 -7
  17. package/lib/commands/download/client.js +60 -52
  18. package/lib/commands/download/identity-server.d.ts +9 -7
  19. package/lib/commands/download/identity-server.js +59 -53
  20. package/lib/commands/download/jmeter.d.ts +5 -5
  21. package/lib/commands/download/jmeter.js +54 -49
  22. package/lib/commands/download/keycloak-scim.d.ts +6 -6
  23. package/lib/commands/download/keycloak-scim.js +56 -51
  24. package/lib/commands/download/platform.d.ts +9 -7
  25. package/lib/commands/download/platform.js +59 -53
  26. package/lib/commands/download/scheduler.d.ts +9 -7
  27. package/lib/commands/download/scheduler.js +59 -53
  28. package/lib/commands/download/server.d.ts +9 -7
  29. package/lib/commands/download/server.js +59 -53
  30. package/lib/commands/download/signalr.d.ts +9 -7
  31. package/lib/commands/download/signalr.js +59 -53
  32. package/lib/commands/download/studio.d.ts +12 -9
  33. package/lib/commands/download/studio.js +107 -82
  34. package/lib/commands/gitlab/get-tag-pipeline.d.ts +11 -14
  35. package/lib/commands/gitlab/get-tag-pipeline.js +95 -92
  36. package/lib/commands/gitlab/next-nightly-tag.d.ts +10 -12
  37. package/lib/commands/gitlab/next-nightly-tag.js +96 -98
  38. package/lib/commands/jira/issue.d.ts +6 -8
  39. package/lib/commands/jira/issue.js +25 -23
  40. package/lib/commands/jira/labels.d.ts +9 -12
  41. package/lib/commands/jira/labels.js +52 -51
  42. package/lib/commands/log/add.d.ts +6 -8
  43. package/lib/commands/log/add.js +92 -87
  44. package/lib/commands/log/generate.d.ts +9 -10
  45. package/lib/commands/log/generate.js +112 -107
  46. package/lib/commands/log/validate.d.ts +2 -2
  47. package/lib/commands/log/validate.js +47 -43
  48. package/lib/commands/login.d.ts +9 -10
  49. package/lib/commands/login.js +101 -97
  50. package/lib/commands/npm/check-publish.d.ts +7 -8
  51. package/lib/commands/npm/check-publish.js +59 -54
  52. package/lib/commands/npm/dependency-update.d.ts +14 -12
  53. package/lib/commands/npm/dependency-update.js +94 -86
  54. package/lib/commands/npm/publish.d.ts +8 -9
  55. package/lib/commands/npm/publish.js +154 -140
  56. package/lib/commands/nuget/dependency-update.d.ts +15 -10
  57. package/lib/commands/nuget/dependency-update.js +60 -49
  58. package/lib/commands/sql.d.ts +24 -20
  59. package/lib/commands/sql.js +245 -226
  60. package/lib/commands/translate.d.ts +15 -16
  61. package/lib/commands/translate.js +109 -104
  62. package/lib/commands/version.d.ts +29 -19
  63. package/lib/commands/version.js +215 -190
  64. package/lib/config.js +3 -6
  65. package/lib/hooks/init/version-override.d.ts +2 -2
  66. package/lib/hooks/init/version-override.js +15 -13
  67. package/lib/index.d.ts +1 -1
  68. package/lib/index.js +1 -4
  69. package/lib/lib/command.d.ts +2 -0
  70. package/lib/lib/command.js +65 -58
  71. package/lib/lib/gitlab.d.ts +8 -2
  72. package/lib/lib/gitlab.js +94 -82
  73. package/lib/lib/npm.d.ts +7 -3
  74. package/lib/lib/npm.js +72 -60
  75. package/lib/lib/npmrc.d.ts +5 -0
  76. package/lib/lib/npmrc.js +20 -13
  77. package/lib/lib/nuget.d.ts +2 -0
  78. package/lib/lib/nuget.js +20 -17
  79. package/lib/security/cache.js +31 -27
  80. package/lib/security/context.d.ts +2 -1
  81. package/lib/security/context.js +106 -103
  82. package/lib/types/changelog.types.js +1 -2
  83. package/lib/types/npm.types.d.ts +5 -5
  84. package/lib/types/npm.types.js +1 -2
  85. package/oclif.manifest.json +1223 -1
  86. package/package.json +50 -46
  87. package/bin/run +0 -5
  88. package/lib/commands/prepare-content.d.ts +0 -29
  89. package/lib/commands/prepare-content.js +0 -386
@@ -1,17 +1,19 @@
1
- import { flags } from '@oclif/command';
2
- import CommandBase from '../../command.base';
3
- export default class DownloadScheduler extends CommandBase {
1
+ import { AxiosResponse } from 'axios';
2
+ import CommandBase from '../../command.base.js';
3
+ export default class DownloadScheduler extends CommandBase<typeof DownloadScheduler> {
4
4
  static description: string;
5
5
  static usage: string;
6
6
  static examples: string[];
7
7
  static flags: {
8
- version: flags.IOptionFlag<string>;
9
- output: flags.IOptionFlag<string>;
8
+ version: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
+ output: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
10
  };
11
11
  private readonly url;
12
12
  /**
13
- * Get unique scriptID by specified version
13
+ * Get unique AdInsureScheduler zip by specified version
14
+ * @param {string} version The version of AdInsureScheduler
15
+ * @returns {Promise<AxiosResponse<any, any>>}
14
16
  */
15
- downloadFile(version: string): Promise<string>;
17
+ downloadFile(version: string): Promise<AxiosResponse<any, any>>;
16
18
  run(): Promise<void>;
17
19
  }
@@ -1,75 +1,81 @@
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 path = require("path");
8
- const request = require("request-promise");
9
- const command_base_1 = require("../../command.base");
10
- class DownloadScheduler extends command_base_1.default {
1
+ import { __awaiter } from "tslib";
2
+ import { Flags, ux } from '@oclif/core';
3
+ import axios from 'axios';
4
+ import chalk from 'chalk';
5
+ import fs from 'fs-extra';
6
+ import path from 'path';
7
+ import CommandBase from '../../command.base.js';
8
+ class DownloadScheduler extends CommandBase {
11
9
  constructor() {
12
10
  super(...arguments);
13
11
  this.url = 'https://ops.adinsure.com/api/storage/binaries/';
14
12
  }
15
13
  /**
16
- * Get unique scriptID by specified version
14
+ * Get unique AdInsureScheduler zip by specified version
15
+ * @param {string} version The version of AdInsureScheduler
16
+ * @returns {Promise<AxiosResponse<any, any>>}
17
17
  */
18
- async downloadFile(version) {
19
- let options = {
20
- uri: `${this.url}/AdInsureScheduler-${version}.zip`,
21
- encoding: 'binary',
22
- headers: {
23
- Authorization: 'Bearer ' + await this.security.getToken()
24
- }
25
- };
26
- return request.get(options);
27
- }
28
- async run() {
29
- const { flags } = this.parse(DownloadScheduler);
30
- let basePath = flags.output;
31
- const filename = `AdInsureScheduler-${flags.version}.zip`;
32
- let filePath = path.resolve(basePath, filename);
33
- cli_ux_1.default.action.start(`Downloading AdInsure Scheduler version ${flags.version} to ${filePath}`, undefined, { stdout: true });
34
- try {
35
- let file = await this.downloadFile(flags.version);
36
- let writeStream = fs.createWriteStream(filePath);
37
- writeStream.write(file, 'binary');
38
- writeStream.on('finish', () => {
39
- cli_ux_1.default.action.stop(`${chalk_1.default.green('OK')}`);
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+ downloadFile(version) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ return axios.get(`${this.url}/AdInsureScheduler-${version}.zip`, {
22
+ headers: {
23
+ Authorization: 'Bearer ' + (yield this.security.getToken()),
24
+ 'Content-Type': 'application/octet-stream',
25
+ },
40
26
  });
41
- writeStream.end();
42
- }
43
- catch (err) {
44
- switch (err.statusCode) {
45
- case 404:
46
- // cli.action.stop(`${chalk.red('Does not exists.')}`);
47
- this.error('Does not exists.', { exit: 1 });
48
- break;
49
- case 400:
50
- this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
51
- break;
52
- default:
53
- this.error(err.message);
27
+ });
28
+ }
29
+ run() {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ const { flags } = yield this.parse(DownloadScheduler);
32
+ const basePath = flags.output;
33
+ const filename = `AdInsureScheduler-${flags.version}.zip`;
34
+ const filePath = path.resolve(basePath, filename);
35
+ ux.action.start(`Downloading AdInsure Scheduler version ${flags.version} to ${filePath}`, undefined, { stdout: true });
36
+ try {
37
+ const file = yield this.downloadFile(flags.version);
38
+ const writeStream = fs.createWriteStream(filePath);
39
+ writeStream.write(file.data, 'binary');
40
+ writeStream.on('finish', () => {
41
+ ux.action.stop(`${chalk.green('OK')}`);
42
+ });
43
+ writeStream.end();
44
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
+ }
46
+ catch (error) {
47
+ switch (error.statusCode) {
48
+ case 404: {
49
+ this.error('Does not exists.', { exit: 1 });
50
+ break;
51
+ }
52
+ case 400: {
53
+ this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
54
+ break;
55
+ }
56
+ default: {
57
+ this.error(error.message);
58
+ }
59
+ }
54
60
  }
55
- }
61
+ });
56
62
  }
57
63
  }
58
- exports.default = DownloadScheduler;
59
64
  DownloadScheduler.description = 'download AdInsure Scheduler zip from azure storage';
60
65
  DownloadScheduler.usage = 'download:scheduler <flags>';
61
66
  DownloadScheduler.examples = [
62
- `$ ops download:scheduler -v 3.2.0 -o ~/Downloads`
67
+ `$ ops download:scheduler -v 3.2.0 -o ~/Downloads`,
63
68
  ];
64
69
  DownloadScheduler.flags = {
65
- version: command_1.flags.string({
70
+ version: Flags.string({
66
71
  char: 'v',
67
72
  description: 'version we want to download',
68
- required: true
73
+ required: true,
69
74
  }),
70
- output: command_1.flags.string({
75
+ output: Flags.string({
71
76
  char: 'o',
72
77
  description: 'output directory',
73
- default: './'
78
+ default: './',
74
79
  }),
75
80
  };
81
+ export default DownloadScheduler;
@@ -1,17 +1,19 @@
1
- import { flags } from '@oclif/command';
2
- import CommandBase from '../../command.base';
3
- export default class DownloadServer extends CommandBase {
1
+ import { AxiosResponse } from 'axios';
2
+ import CommandBase from '../../command.base.js';
3
+ export default class DownloadServer extends CommandBase<typeof DownloadServer> {
4
4
  static description: string;
5
5
  static usage: string;
6
6
  static examples: string[];
7
7
  static flags: {
8
- version: flags.IOptionFlag<string>;
9
- output: flags.IOptionFlag<string>;
8
+ version: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
+ output: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
10
  };
11
11
  private readonly url;
12
12
  /**
13
- * Get unique scriptID by specified version
13
+ * Get unique AdInsure Server zip by specified version
14
+ * @param {string} version The version of AdInsure Server
15
+ * @returns {Promise<AxiosResponse<any, any>>}
14
16
  */
15
- downloadFile(version: string): Promise<string>;
17
+ downloadFile(version: string): Promise<AxiosResponse<any, any>>;
16
18
  run(): Promise<void>;
17
19
  }
@@ -1,75 +1,81 @@
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 path = require("path");
8
- const request = require("request-promise");
9
- const command_base_1 = require("../../command.base");
10
- class DownloadServer extends command_base_1.default {
1
+ import { __awaiter } from "tslib";
2
+ import { Flags, ux } from '@oclif/core';
3
+ import axios from 'axios';
4
+ import chalk from 'chalk';
5
+ import fs from 'fs-extra';
6
+ import path from 'path';
7
+ import CommandBase from '../../command.base.js';
8
+ class DownloadServer extends CommandBase {
11
9
  constructor() {
12
10
  super(...arguments);
13
11
  this.url = 'https://ops.adinsure.com/api/storage/binaries/';
14
12
  }
15
13
  /**
16
- * Get unique scriptID by specified version
14
+ * Get unique AdInsure Server zip by specified version
15
+ * @param {string} version The version of AdInsure Server
16
+ * @returns {Promise<AxiosResponse<any, any>>}
17
17
  */
18
- async downloadFile(version) {
19
- let options = {
20
- uri: `${this.url}/AdInsure-server-${version}.zip`,
21
- encoding: 'binary',
22
- headers: {
23
- Authorization: 'Bearer ' + await this.security.getToken()
24
- }
25
- };
26
- return request.get(options);
27
- }
28
- async run() {
29
- const { flags } = this.parse(DownloadServer);
30
- let basePath = flags.output;
31
- const filename = `AdInsure-server-${flags.version}.zip`;
32
- let filePath = path.resolve(basePath, filename);
33
- cli_ux_1.default.action.start(`Downloading AdInsure Server version ${flags.version} to ${filePath}`, undefined, { stdout: true });
34
- try {
35
- let file = await this.downloadFile(flags.version);
36
- let writeStream = fs.createWriteStream(filePath);
37
- writeStream.write(file, 'binary');
38
- writeStream.on('finish', () => {
39
- cli_ux_1.default.action.stop(`${chalk_1.default.green('OK')}`);
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+ downloadFile(version) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ return axios.get(`${this.url}/AdInsure-server-${version}.zip`, {
22
+ headers: {
23
+ Authorization: 'Bearer ' + (yield this.security.getToken()),
24
+ 'Content-Type': 'application/octet-stream',
25
+ },
40
26
  });
41
- writeStream.end();
42
- }
43
- catch (err) {
44
- switch (err.statusCode) {
45
- case 404:
46
- // cli.action.stop(`${chalk.red('Does not exists.')}`);
47
- this.error('Does not exists.', { exit: 1 });
48
- break;
49
- case 400:
50
- this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
51
- break;
52
- default:
53
- this.error(err.message);
27
+ });
28
+ }
29
+ run() {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ const { flags } = yield this.parse(DownloadServer);
32
+ const basePath = flags.output;
33
+ const filename = `AdInsure-server-${flags.version}.zip`;
34
+ const filePath = path.resolve(basePath, filename);
35
+ ux.action.start(`Downloading AdInsure Server version ${flags.version} to ${filePath}`, undefined, { stdout: true });
36
+ try {
37
+ const file = yield this.downloadFile(flags.version);
38
+ const writeStream = fs.createWriteStream(filePath);
39
+ writeStream.write(file, 'binary');
40
+ writeStream.on('finish', () => {
41
+ ux.action.stop(`${chalk.green('OK')}`);
42
+ });
43
+ writeStream.end();
44
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
+ }
46
+ catch (error) {
47
+ switch (error.statusCode) {
48
+ case 404: {
49
+ this.error('Does not exists.', { exit: 1 });
50
+ break;
51
+ }
52
+ case 400: {
53
+ this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
54
+ break;
55
+ }
56
+ default: {
57
+ this.error(error.message);
58
+ }
59
+ }
54
60
  }
55
- }
61
+ });
56
62
  }
57
63
  }
58
- exports.default = DownloadServer;
59
64
  DownloadServer.description = 'download AdInsure Server zip from Azure storage';
60
65
  DownloadServer.usage = 'download:server <flags>';
61
66
  DownloadServer.examples = [
62
- `$ ops download:server -v 3.2.0 -o ~/Downloads`
67
+ `$ ops download:server -v 3.2.0 -o ~/Downloads`,
63
68
  ];
64
69
  DownloadServer.flags = {
65
- version: command_1.flags.string({
70
+ version: Flags.string({
66
71
  char: 'v',
67
72
  description: 'version we want to download',
68
- required: true
73
+ required: true,
69
74
  }),
70
- output: command_1.flags.string({
75
+ output: Flags.string({
71
76
  char: 'o',
72
77
  description: 'output directory',
73
- default: './'
78
+ default: './',
74
79
  }),
75
80
  };
81
+ export default DownloadServer;
@@ -1,17 +1,19 @@
1
- import { flags } from '@oclif/command';
2
- import CommandBase from '../../command.base';
3
- export default class DownloadSignalrServer extends CommandBase {
1
+ import { AxiosResponse } from 'axios';
2
+ import CommandBase from '../../command.base.js';
3
+ export default class DownloadSignalrServer extends CommandBase<typeof DownloadSignalrServer> {
4
4
  static description: string;
5
5
  static usage: string;
6
6
  static examples: string[];
7
7
  static flags: {
8
- version: flags.IOptionFlag<string>;
9
- output: flags.IOptionFlag<string>;
8
+ version: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
+ output: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
10
  };
11
11
  private readonly url;
12
12
  /**
13
- * Get unique scriptID by specified version
13
+ * Get unique AdInsure SignalR Server zip by specified version
14
+ * @param {string} version The version of AdInsure SignalR Server
15
+ * @returns {Promise<AxiosResponse<any, any>>}
14
16
  */
15
- downloadFile(version: string): Promise<string>;
17
+ downloadFile(version: string): Promise<AxiosResponse<any, any>>;
16
18
  run(): Promise<void>;
17
19
  }
@@ -1,75 +1,81 @@
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 path = require("path");
8
- const request = require("request-promise");
9
- const command_base_1 = require("../../command.base");
10
- class DownloadSignalrServer extends command_base_1.default {
1
+ import { __awaiter } from "tslib";
2
+ import { Flags, ux } from '@oclif/core';
3
+ import axios from 'axios';
4
+ import chalk from 'chalk';
5
+ import fs from 'fs-extra';
6
+ import path from 'path';
7
+ import CommandBase from '../../command.base.js';
8
+ class DownloadSignalrServer extends CommandBase {
11
9
  constructor() {
12
10
  super(...arguments);
13
11
  this.url = 'https://ops.adinsure.com/api/storage/binaries/';
14
12
  }
15
13
  /**
16
- * Get unique scriptID by specified version
14
+ * Get unique AdInsure SignalR Server zip by specified version
15
+ * @param {string} version The version of AdInsure SignalR Server
16
+ * @returns {Promise<AxiosResponse<any, any>>}
17
17
  */
18
- async downloadFile(version) {
19
- let options = {
20
- uri: `${this.url}/AdInsure-signalr-${version}.zip`,
21
- encoding: 'binary',
22
- headers: {
23
- Authorization: 'Bearer ' + await this.security.getToken()
24
- }
25
- };
26
- return request.get(options);
27
- }
28
- async run() {
29
- const { flags } = this.parse(DownloadSignalrServer);
30
- let basePath = flags.output;
31
- const filename = `AdInsure-signalr-${flags.version}.zip`;
32
- let filePath = path.resolve(basePath, filename);
33
- cli_ux_1.default.action.start(`Downloading AdInsure SignalR Server version ${flags.version} to ${filePath}`, undefined, { stdout: true });
34
- try {
35
- let file = await this.downloadFile(flags.version);
36
- let writeStream = fs.createWriteStream(filePath);
37
- writeStream.write(file, 'binary');
38
- writeStream.on('finish', () => {
39
- cli_ux_1.default.action.stop(`${chalk_1.default.green('OK')}`);
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+ downloadFile(version) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ return axios.get(`${this.url}/AdInsure-signalr-${version}.zip`, {
22
+ headers: {
23
+ Authorization: 'Bearer ' + (yield this.security.getToken()),
24
+ 'Content-Type': 'application/octet-stream',
25
+ },
40
26
  });
41
- writeStream.end();
42
- }
43
- catch (err) {
44
- switch (err.statusCode) {
45
- case 404:
46
- // cli.action.stop(`${chalk.red('Does not exists.')}`);
47
- this.error('Does not exists.', { exit: 1 });
48
- break;
49
- case 400:
50
- this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
51
- break;
52
- default:
53
- this.error(err.message);
27
+ });
28
+ }
29
+ run() {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ const { flags } = yield this.parse(DownloadSignalrServer);
32
+ const basePath = flags.output;
33
+ const filename = `AdInsure-signalr-${flags.version}.zip`;
34
+ const filePath = path.resolve(basePath, filename);
35
+ ux.action.start(`Downloading AdInsure SignalR Server version ${flags.version} to ${filePath}`, undefined, { stdout: true });
36
+ try {
37
+ const file = yield this.downloadFile(flags.version);
38
+ const writeStream = fs.createWriteStream(filePath);
39
+ writeStream.write(file.data, 'binary');
40
+ writeStream.on('finish', () => {
41
+ ux.action.stop(`${chalk.green('OK')}`);
42
+ });
43
+ writeStream.end();
44
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
+ }
46
+ catch (error) {
47
+ switch (error.statusCode) {
48
+ case 404: {
49
+ this.error('Does not exists.', { exit: 1 });
50
+ break;
51
+ }
52
+ case 400: {
53
+ this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
54
+ break;
55
+ }
56
+ default: {
57
+ this.error(error.message);
58
+ }
59
+ }
54
60
  }
55
- }
61
+ });
56
62
  }
57
63
  }
58
- exports.default = DownloadSignalrServer;
59
64
  DownloadSignalrServer.description = 'download AdInsure SignalR Server zip from Azure storage';
60
65
  DownloadSignalrServer.usage = 'download:signalr <flags>';
61
66
  DownloadSignalrServer.examples = [
62
- `$ ops download:signalr -v 18.0.0 -o ~/Downloads`
67
+ `$ ops download:signalr -v 18.0.0 -o ~/Downloads`,
63
68
  ];
64
69
  DownloadSignalrServer.flags = {
65
- version: command_1.flags.string({
70
+ version: Flags.string({
66
71
  char: 'v',
67
72
  description: 'version we want to download',
68
- required: true
73
+ required: true,
69
74
  }),
70
- output: command_1.flags.string({
75
+ output: Flags.string({
71
76
  char: 'o',
72
77
  description: 'output directory',
73
- default: './'
78
+ default: './',
74
79
  }),
75
80
  };
81
+ export default DownloadSignalrServer;
@@ -1,20 +1,23 @@
1
- import { flags } from '@oclif/command';
2
- import CommandBase from '../../command.base';
3
- export default class DownloadStudio extends CommandBase {
1
+ import { AxiosResponse } from 'axios';
2
+ import CommandBase from '../../command.base.js';
3
+ export default class DownloadStudio extends CommandBase<typeof DownloadStudio> {
4
4
  static description: string;
5
5
  static usage: string;
6
6
  static examples: string[];
7
7
  static flags: {
8
- version: flags.IOptionFlag<string>;
9
- output: flags.IOptionFlag<string>;
10
- install: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
11
- skip: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
8
+ version: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
+ output: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
+ install: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
11
+ skip: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
12
+ keep: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
12
13
  };
13
14
  private readonly url;
14
15
  /**
15
- * Get unique scriptID by specified version
16
+ * Get unique AdInsure Studio vsix zip by specified version
17
+ * @param {string} version The version of AdInsure Studio vsix
18
+ * @returns {Promise<AxiosResponse<any, any>>}
16
19
  */
17
- downloadFile(version: string): Promise<string>;
20
+ downloadFile(version: string): Promise<AxiosResponse<any, any>>;
18
21
  installExtension(extensionPath: string): Promise<void>;
19
22
  findExtensionIfEnabled(studioVersion: string, enabled: boolean): Promise<boolean>;
20
23
  run(): Promise<0 | undefined>;