@adinsure-ops/ops-cli 4.8.2 → 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 +246 -225
  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 -79
  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 +52 -47
  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,20 +1,22 @@
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
12
  };
13
13
  private readonly url;
14
14
  /**
15
- * Get unique scriptID by specified version
15
+ * Get unique AdInsure Studio vsix zip by specified version
16
+ * @param {string} version The version of AdInsure Studio vsix
17
+ * @returns {Promise<AxiosResponse<any, any>>}
16
18
  */
17
- downloadFile(version: string): Promise<string>;
19
+ downloadFile(version: string): Promise<AxiosResponse<any, any>>;
18
20
  installExtension(extensionPath: string): Promise<void>;
19
21
  findExtensionIfEnabled(studioVersion: string, enabled: boolean): Promise<boolean>;
20
22
  run(): Promise<0 | undefined>;
@@ -1,116 +1,126 @@
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
- const command_2 = require("../../lib/command");
11
- class DownloadStudio 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
+ import ChildProcessCommand from '../../lib/command.js';
9
+ class DownloadStudio extends CommandBase {
12
10
  constructor() {
13
11
  super(...arguments);
14
12
  this.url = 'https://ops.adinsure.com/api/storage/extensions/';
15
13
  }
16
14
  /**
17
- * Get unique scriptID by specified version
15
+ * Get unique AdInsure Studio vsix zip by specified version
16
+ * @param {string} version The version of AdInsure Studio vsix
17
+ * @returns {Promise<AxiosResponse<any, any>>}
18
18
  */
19
- async downloadFile(version) {
20
- let options = {
21
- uri: `${this.url}/adinsure-studio-${version}.vsix`,
22
- encoding: 'binary',
23
- headers: {
24
- Authorization: 'Bearer ' + await this.security.getToken()
25
- }
26
- };
27
- return request.get(options);
19
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
+ downloadFile(version) {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ return axios.get(`${this.url}/adinsure-studio-${version}.vsix`, {
23
+ headers: {
24
+ Authorization: 'Bearer ' + (yield this.security.getToken()),
25
+ 'Content-Type': 'application/octet-stream',
26
+ },
27
+ });
28
+ });
28
29
  }
29
- async installExtension(extensionPath) {
30
- let cp = new command_2.default();
31
- await cp.runCommand(['code', '--install-extension', extensionPath, '--force']);
30
+ installExtension(extensionPath) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ const cp = new ChildProcessCommand();
33
+ yield cp.runCommand(['code', '--install-extension', extensionPath, '--force']);
34
+ });
32
35
  }
33
- async findExtensionIfEnabled(studioVersion, enabled) {
36
+ findExtensionIfEnabled(studioVersion, enabled) {
34
37
  var _a;
35
- if (!enabled) {
36
- return false;
37
- }
38
- let cp = new command_2.default();
39
- let result = await cp.runCommand(['code', '--list-extensions', '--show-versions']);
40
- return (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.includes(studioVersion);
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ if (!enabled) {
40
+ return false;
41
+ }
42
+ const cp = new ChildProcessCommand();
43
+ const result = yield cp.runCommand(['code', '--list-extensions', '--show-versions']);
44
+ return (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.includes(studioVersion);
45
+ });
41
46
  }
42
- async run() {
43
- const { flags } = this.parse(DownloadStudio);
44
- let basePath = flags.output;
45
- const filename = `adinsure-studio-${flags.version}.vsix`;
46
- const studioVersion = `adacta-fintech.adinsure-studio@${flags.version}`;
47
- let filePath = path.resolve(basePath, filename);
48
- let skipInstallation = await this.findExtensionIfEnabled(studioVersion, flags.skip);
49
- if (skipInstallation) {
50
- this.log(`The ${studioVersion} already exists. Skipping install.`);
51
- return 0;
52
- }
53
- cli_ux_1.default.action.start(`Downloading AdInsure Studio version ${flags.version} to ${filePath}`, undefined, { stdout: true });
54
- try {
55
- let file = await this.downloadFile(flags.version);
56
- let writeStream = fs.createWriteStream(filePath);
57
- writeStream.write(file, 'binary');
58
- writeStream.on('finish', async () => {
59
- cli_ux_1.default.action.stop(`${chalk_1.default.green('OK')}`);
60
- if (flags.install) {
61
- cli_ux_1.default.action.start(`Installing into VSCode`, undefined, { stdout: true });
62
- await this.installExtension(filePath);
63
- cli_ux_1.default.action.stop(`${chalk_1.default.green('Done')}`);
64
- cli_ux_1.default.action.start(`Removing VSIX file`, undefined, { stdout: true });
65
- fs.removeSync(filePath);
66
- cli_ux_1.default.action.stop(`${chalk_1.default.green('Done')}`);
67
- this.log(`${chalk_1.default.yellow('Use \'CRTL + SHIFT + P\' and select reload windows to apply this studio version.')}`);
47
+ run() {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ const { flags } = yield this.parse(DownloadStudio);
50
+ const basePath = flags.output;
51
+ const filename = `adinsure-studio-${flags.version}.vsix`;
52
+ const studioVersion = `adacta-fintech.adinsure-studio@${flags.version}`;
53
+ const filePath = path.resolve(basePath, filename);
54
+ const skipInstallation = yield this.findExtensionIfEnabled(studioVersion, flags.skip);
55
+ if (skipInstallation) {
56
+ this.log(`The ${studioVersion} already exists. Skipping install.`);
57
+ return 0;
58
+ }
59
+ ux.action.start(`Downloading AdInsure Studio version ${flags.version} to ${filePath}`, undefined, { stdout: true });
60
+ try {
61
+ const file = yield this.downloadFile(flags.version);
62
+ const writeStream = fs.createWriteStream(filePath);
63
+ writeStream.write(file.data, 'binary');
64
+ writeStream.on('finish', () => __awaiter(this, void 0, void 0, function* () {
65
+ ux.action.stop(`${chalk.green('OK')}`);
66
+ if (flags.install) {
67
+ ux.action.start(`Installing into VSCode`, undefined, { stdout: true });
68
+ yield this.installExtension(filePath);
69
+ ux.action.stop(`${chalk.green('Done')}`);
70
+ ux.action.start(`Removing VSIX file`, undefined, { stdout: true });
71
+ fs.removeSync(filePath);
72
+ ux.action.stop(`${chalk.green('Done')}`);
73
+ this.log(`${chalk.yellow('Use \'CRTL + SHIFT + P\' and select reload windows to apply this studio version.')}`);
74
+ }
75
+ }));
76
+ writeStream.end();
77
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
78
+ }
79
+ catch (error) {
80
+ switch (error.statusCode) {
81
+ case 404: {
82
+ this.error('Does not exists.', { exit: 1 });
83
+ break;
84
+ }
85
+ case 400: {
86
+ this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
87
+ break;
88
+ }
89
+ default: {
90
+ this.error(error.message);
91
+ }
68
92
  }
69
- });
70
- writeStream.end();
71
- }
72
- catch (err) {
73
- switch (err.statusCode) {
74
- case 404:
75
- // cli.action.stop(`${chalk.red('Does not exists.')}`);
76
- this.error('Does not exists.', { exit: 1 });
77
- break;
78
- case 400:
79
- this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
80
- break;
81
- default:
82
- this.error(err.message);
83
93
  }
84
- }
94
+ });
85
95
  }
86
96
  }
87
- exports.default = DownloadStudio;
88
97
  DownloadStudio.description = 'download AdInsure Studio vsix from azure storage';
89
98
  DownloadStudio.usage = 'download:studio <flags>';
90
99
  DownloadStudio.examples = [
91
100
  `$ ops download:studio -v 15.0.0 -o ~/Downloads`,
92
101
  `$ ops download:studio -v 15.0.0 -i`,
93
- `$ ops download:studio -v 15.0.0 -i -s`
102
+ `$ ops download:studio -v 15.0.0 -i -s`,
94
103
  ];
95
104
  DownloadStudio.flags = {
96
- version: command_1.flags.string({
105
+ version: Flags.string({
97
106
  char: 'v',
98
107
  description: 'version we want to download',
99
- required: true
108
+ required: true,
100
109
  }),
101
- output: command_1.flags.string({
110
+ output: Flags.string({
102
111
  char: 'o',
103
112
  description: 'output directory',
104
- default: './'
113
+ default: './',
105
114
  }),
106
- install: command_1.flags.boolean({
115
+ install: Flags.boolean({
107
116
  char: 'i',
108
117
  description: 'install plugin to vscode. save to temp folder and remove vsix after.',
109
- default: false
118
+ default: false,
110
119
  }),
111
- skip: command_1.flags.boolean({
120
+ skip: Flags.boolean({
112
121
  char: 's',
113
122
  description: 'only with install. If passed, and desired version is installed it will skip it.',
114
- dependsOn: ['install']
123
+ dependsOn: ['install'],
115
124
  }),
116
125
  };
126
+ export default DownloadStudio;
@@ -1,22 +1,19 @@
1
- import { flags } from '@oclif/command';
2
- import CommandBase from '../../command.base';
3
- import GitLab from '../../lib/gitlab';
4
- export default class GitlabGetTagPipeline extends CommandBase {
1
+ import CommandBase from '../../command.base.js';
2
+ import GitLab from '../../lib/gitlab.js';
3
+ export default class GitlabGetTagPipeline extends CommandBase<typeof GitlabGetTagPipeline> {
5
4
  static description: string;
6
5
  static usage: string;
7
6
  static examples: string[];
8
7
  static args: {
9
- name: string;
10
- description: string;
11
- required: boolean;
12
- }[];
8
+ tag: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
9
+ };
13
10
  static flags: {
14
- pat: flags.IOptionFlag<string>;
15
- host: flags.IOptionFlag<string>;
16
- project: flags.IOptionFlag<string>;
17
- wait: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
18
- timeout: flags.IOptionFlag<string>;
19
- delay: flags.IOptionFlag<string>;
11
+ pat: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
12
+ host: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
13
+ project: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
14
+ wait: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
15
+ timeout: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
16
+ delay: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
20
17
  };
21
18
  waitPipelineStatus(gitlab: GitLab, tag: string, timeout: number, delay: number): Promise<string>;
22
19
  run(): Promise<void>;
@@ -1,143 +1,146 @@
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 command_base_1 = require("../../command.base");
6
- const gitlab_1 = require("../../lib/gitlab");
7
- class GitlabGetTagPipeline extends command_base_1.default {
8
- async waitPipelineStatus(gitlab, tag, timeout, delay) {
9
- return new Promise(async (resolve, reject) => {
10
- let time = 0;
11
- try {
12
- let status = await gitlab.getTagPipelineStatus(tag);
13
- switch (status) {
14
- case 'unknown': {
15
- reject(new Error(`Pipeline or tag does not exist!`));
16
- return;
17
- }
18
- case 'failed': {
19
- reject(new Error(`Pipeline failed!`));
20
- return;
21
- }
22
- case 'canceled': {
23
- reject(new Error(`Pipeline canceled!`));
24
- return;
25
- }
26
- case 'skipped': {
27
- reject(new Error(`Pipeline skipped!`));
28
- return;
29
- }
30
- case 'success': {
31
- resolve(`Pipeline passed successfully!`);
32
- return;
33
- }
34
- }
35
- }
36
- catch (err) {
37
- reject(new Error(err.message));
38
- return;
39
- }
40
- const interval = setInterval(async () => {
41
- if (time >= timeout) {
42
- reject(new Error('Timeout waiting pipeline'));
43
- clearInterval(interval);
44
- }
45
- time += delay;
1
+ import { __awaiter } from "tslib";
2
+ import { Args, Flags } from '@oclif/core';
3
+ import chalk from 'chalk';
4
+ import CommandBase from '../../command.base.js';
5
+ import GitLab from '../../lib/gitlab.js';
6
+ class GitlabGetTagPipeline extends CommandBase {
7
+ waitPipelineStatus(gitlab, tag, timeout, delay) {
8
+ return __awaiter(this, void 0, void 0, function* () {
9
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
10
+ let time = 0;
46
11
  try {
47
- let status = await gitlab.getTagPipelineStatus(tag);
12
+ const status = yield gitlab.getTagPipelineStatus(tag);
48
13
  switch (status) {
49
14
  case 'unknown': {
50
15
  reject(new Error(`Pipeline or tag does not exist!`));
51
- clearInterval(interval);
52
- break;
16
+ return;
53
17
  }
54
18
  case 'failed': {
55
19
  reject(new Error(`Pipeline failed!`));
56
- clearInterval(interval);
57
- break;
20
+ return;
58
21
  }
59
22
  case 'canceled': {
60
23
  reject(new Error(`Pipeline canceled!`));
61
- clearInterval(interval);
62
- break;
24
+ return;
63
25
  }
64
26
  case 'skipped': {
65
27
  reject(new Error(`Pipeline skipped!`));
66
- clearInterval(interval);
67
- break;
28
+ return;
68
29
  }
69
30
  case 'success': {
70
31
  resolve(`Pipeline passed successfully!`);
71
- clearInterval(interval);
32
+ return;
72
33
  }
73
34
  }
35
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
74
36
  }
75
- catch (err) {
76
- reject(new Error(err.message));
77
- clearInterval(interval);
37
+ catch (error) {
38
+ reject(new Error(error.message));
39
+ return;
78
40
  }
79
- }, delay * 1000);
41
+ const interval = setInterval(() => __awaiter(this, void 0, void 0, function* () {
42
+ if (time >= timeout) {
43
+ reject(new Error('Timeout waiting pipeline'));
44
+ clearInterval(interval);
45
+ }
46
+ time += delay;
47
+ try {
48
+ const status = yield gitlab.getTagPipelineStatus(tag);
49
+ switch (status) {
50
+ case 'unknown': {
51
+ reject(new Error(`Pipeline or tag does not exist!`));
52
+ clearInterval(interval);
53
+ break;
54
+ }
55
+ case 'failed': {
56
+ reject(new Error(`Pipeline failed!`));
57
+ clearInterval(interval);
58
+ break;
59
+ }
60
+ case 'canceled': {
61
+ reject(new Error(`Pipeline canceled!`));
62
+ clearInterval(interval);
63
+ break;
64
+ }
65
+ case 'skipped': {
66
+ reject(new Error(`Pipeline skipped!`));
67
+ clearInterval(interval);
68
+ break;
69
+ }
70
+ case 'success': {
71
+ resolve(`Pipeline passed successfully!`);
72
+ clearInterval(interval);
73
+ }
74
+ }
75
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
76
+ }
77
+ catch (error) {
78
+ reject(new Error(error.message));
79
+ clearInterval(interval);
80
+ }
81
+ }), delay * 1000);
82
+ }));
80
83
  });
81
84
  }
82
- async run() {
83
- const { args, flags } = this.parse(GitlabGetTagPipeline);
84
- const gitlab = new gitlab_1.default(flags.host, flags.project, flags.pat);
85
- if (!flags.wait) {
86
- let status = await gitlab.getTagPipelineStatus(args.tag);
87
- return this.log(`${chalk_1.default.green(status)}`);
88
- }
89
- else {
85
+ run() {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ const { args, flags } = yield this.parse(GitlabGetTagPipeline);
88
+ const gitlab = new GitLab(flags.host, flags.project, flags.pat);
89
+ if (!flags.wait) {
90
+ const status = yield gitlab.getTagPipelineStatus(args.tag);
91
+ return this.log(`${chalk.green(status)}`);
92
+ }
90
93
  try {
91
- let status = await this.waitPipelineStatus(gitlab, args.tag, parseInt(flags.timeout, 10), parseInt(flags.delay, 10));
94
+ const status = yield this.waitPipelineStatus(gitlab, args.tag, Number.parseInt(flags.timeout, 10), Number.parseInt(flags.delay, 10));
92
95
  this.log(status);
96
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
93
97
  }
94
- catch (err) {
95
- this.error(err.message);
98
+ catch (error) {
99
+ this.error(error.message);
96
100
  }
97
- }
101
+ });
98
102
  }
99
103
  }
100
- exports.default = GitlabGetTagPipeline;
101
104
  GitlabGetTagPipeline.description = 'get pipeline status for tag';
102
105
  GitlabGetTagPipeline.usage = 'gitlab:get-tag-pipeline <tag>';
103
106
  GitlabGetTagPipeline.examples = [
104
- `$ ops gitlab:get-tag-pipeline 17.0.0`
107
+ `$ ops gitlab:get-tag-pipeline 17.0.0`,
105
108
  ];
106
- GitlabGetTagPipeline.args = [
107
- {
108
- name: 'tag',
109
+ GitlabGetTagPipeline.args = {
110
+ tag: Args.string({
111
+ required: true,
109
112
  description: 'Tag',
110
- required: true
111
- }
112
- ];
113
+ }),
114
+ };
113
115
  GitlabGetTagPipeline.flags = {
114
- pat: command_1.flags.string({
116
+ pat: Flags.string({
115
117
  required: true,
116
118
  env: 'PRIVATE_TOKEN',
117
- description: 'Token from user that has permissions to list and create tags'
119
+ description: 'Token from user that has permissions to list and create tags',
118
120
  }),
119
- host: command_1.flags.string({
121
+ host: Flags.string({
120
122
  required: true,
121
123
  default: 'https://git.adacta-fintech.com',
122
124
  env: 'CI_SERVER_URL',
123
- description: 'Server hostname'
125
+ description: 'Server hostname',
124
126
  }),
125
- project: command_1.flags.string({
127
+ project: Flags.string({
126
128
  required: true,
127
129
  default: '413',
128
130
  env: 'CI_PROJECT_ID',
129
- description: 'Project ID'
131
+ description: 'Project ID',
130
132
  }),
131
- wait: command_1.flags.boolean({
133
+ wait: Flags.boolean({
132
134
  description: 'Wait for pipeline to finish',
133
- default: false
135
+ default: false,
134
136
  }),
135
- timeout: command_1.flags.string({
137
+ timeout: Flags.string({
136
138
  default: '120',
137
- description: 'Timeout for wait command in seconds (defaults to 120 seconds)'
139
+ description: 'Timeout for wait command in seconds (defaults to 120 seconds)',
138
140
  }),
139
- delay: command_1.flags.string({
141
+ delay: Flags.string({
140
142
  default: '5',
141
- description: 'Delay of check in seconds (defaults to 5 seconds)'
142
- })
143
+ description: 'Delay of check in seconds (defaults to 5 seconds)',
144
+ }),
143
145
  };
146
+ export default GitlabGetTagPipeline;
@@ -1,20 +1,18 @@
1
- import { flags } from '@oclif/command';
2
- import CommandBase from '../../command.base';
3
- export default class GitlabNextNightlyTag extends CommandBase {
1
+ import CommandBase from '../../command.base.js';
2
+ export default class GitlabNextNightlyTag extends CommandBase<typeof GitlabNextNightlyTag> {
4
3
  static description: string;
5
4
  static usage: string;
6
5
  static examples: string[];
7
6
  static args: {
8
- name: string;
9
- description: string;
10
- }[];
7
+ version: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
8
+ };
11
9
  static flags: {
12
- pat: flags.IOptionFlag<string>;
13
- host: flags.IOptionFlag<string>;
14
- project: flags.IOptionFlag<string>;
15
- reference: flags.IOptionFlag<string>;
16
- outputVersionOnly: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
17
- dryRun: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
10
+ pat: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
11
+ host: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
12
+ project: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
13
+ reference: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
14
+ outputVersionOnly: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
15
+ dryRun: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
18
16
  };
19
17
  run(): Promise<undefined>;
20
18
  }