@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,145 +1,164 @@
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 globby = require("globby");
8
- const moment = require("moment");
9
- const path = require("path");
10
- const request = require("request-promise");
11
- const semver = require("semver");
12
- const replaceInFile = require('replace-in-file');
13
- const command_base_1 = require("../command.base");
14
- class Version extends command_base_1.default {
1
+ import { __awaiter } from "tslib";
2
+ import { Flags, Args, ux } from '@oclif/core';
3
+ import axios from 'axios';
4
+ import chalk from 'chalk';
5
+ import fs from 'fs-extra';
6
+ import { globby } from 'globby';
7
+ import moment from 'moment';
8
+ import path from 'path';
9
+ import semver from 'semver';
10
+ import replaceInFile from 'replace-in-file';
11
+ import CommandBase from '../command.base.js';
12
+ class Version extends CommandBase {
15
13
  /**
16
14
  * Update NPM packages with wsrun
15
+ * @param type Release type of NPM package
16
+ * @param version Version
17
+ * @param filter Regular Expression filter for packages
18
+ * @param excludeDirs Excluded directories
19
+ * @returns {Promise<void>} Void
17
20
  */
18
- async bumpNpm(type, version, filter, excludeDirs) {
19
- const currentPrereleaseDate = moment().format('YYYYMM');
20
- let bumpedPackageName = [];
21
- // Find all package.json files that are not in node modules
22
- let searchPattern = ['**/package.json', '!**/node_modules'];
23
- if (excludeDirs) {
24
- for (const exclude of excludeDirs) {
25
- searchPattern.push(`!${exclude}`);
26
- }
27
- }
28
- const paths = await globby(searchPattern);
29
- for (const path of paths) {
30
- try {
31
- // Read the data from it
32
- let data = await fs.readJSON(path);
33
- // Check if version exists
34
- if (!data.version || !data.name) {
35
- continue;
36
- }
37
- let regexp = new RegExp(filter);
38
- if (!regexp.test(data.name)) {
39
- continue;
40
- }
41
- // Increment the package version depending on the increment type
42
- if (type === 'new') {
43
- data.version = version;
44
- }
45
- else if (type === 'prerelease' && this.checkPrerelease(data.version, currentPrereleaseDate)) {
46
- data.version = semver.inc(data.version, type, true);
47
- }
48
- else {
49
- data.version = semver.inc(data.version, type, false, currentPrereleaseDate);
21
+ bumpNpm(type, version, filter, excludeDirs) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const currentPrereleaseDate = moment().format('YYYYMM');
24
+ const bumpedPackageName = [];
25
+ // Find all package.json files that are not in node modules
26
+ const searchPattern = ['**/package.json', '!**/node_modules'];
27
+ if (excludeDirs) {
28
+ for (const exclude of excludeDirs) {
29
+ searchPattern.push(`!${exclude}`);
50
30
  }
51
- bumpedPackageName.push(data.name);
52
- // Save file
53
- await fs.writeJSON(path, data, { spaces: 4, EOL: '\r\n' });
54
31
  }
55
- catch (err) {
56
- if (err instanceof SyntaxError) {
57
- this.warn(`Error reading package.json: ${chalk_1.default.yellow(err.message)}. Consider using '--exclude-dir'.`);
32
+ const paths = yield globby(searchPattern);
33
+ for (const path of paths) {
34
+ try {
35
+ // Read the data from it
36
+ const data = yield fs.readJSON(path);
37
+ // Check if version exists
38
+ if (!data.version || !data.name) {
39
+ continue;
40
+ }
41
+ const regexp = new RegExp(filter);
42
+ if (!regexp.test(data.name)) {
43
+ continue;
44
+ }
45
+ // Increment the package version depending on the increment type
46
+ if (type === 'new') {
47
+ data.version = version;
48
+ }
49
+ else if (type === 'prerelease' && this.checkPrerelease(data.version, currentPrereleaseDate)) {
50
+ data.version = semver.inc(data.version, type, true);
51
+ }
52
+ else {
53
+ data.version = semver.inc(data.version, type, false, currentPrereleaseDate);
54
+ }
55
+ bumpedPackageName.push(data.name);
56
+ // Save file
57
+ yield fs.writeJSON(path, data, { spaces: 4, EOL: '\r\n' });
58
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
59
  }
59
- else {
60
- return this.error(`Unknown error: ${chalk_1.default.red(err)}`);
60
+ catch (error) {
61
+ if (error instanceof SyntaxError) {
62
+ this.warn(`Error reading package.json: ${chalk.yellow(error.message)}. Consider using '--exclude-dir'.`);
63
+ }
64
+ else {
65
+ return this.error(`Unknown error: ${chalk.red(error)}`);
66
+ }
61
67
  }
62
68
  }
63
- }
64
- return bumpedPackageName;
69
+ return bumpedPackageName;
70
+ });
65
71
  }
66
72
  /**
67
73
  * Validate args and flags
68
74
  */
75
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
69
76
  validateOptions(args, flags) {
70
77
  if (args.type !== 'new' && flags.version) {
71
- this.error(`${chalk_1.default.red('Version flag can only be used with new type')}`);
78
+ this.error(`${chalk.red('Version flag can only be used with new type')}`);
72
79
  return false;
73
80
  }
74
- else if (args.type === 'new' && !flags.version) {
75
- this.error(`${chalk_1.default.red('Version flag is required with new type')}`);
81
+ if (args.type === 'new' && !flags.version) {
82
+ this.error(`${chalk.red('Version flag is required with new type')}`);
76
83
  return false;
77
84
  }
78
- else if (args.type === 'new' && flags.increment) {
79
- this.error(`${chalk_1.default.red('Increment flag not supported with new type')}`);
85
+ if (args.type === 'new' && flags.increment) {
86
+ this.error(`${chalk.red('Increment flag not supported with new type')}`);
80
87
  return false;
81
88
  }
82
89
  return true;
83
90
  }
84
91
  /**
85
92
  * Update dependencies in package.json files for @adinsure packages
93
+ * @param version Version
94
+ * @param updatedPackages Array of updated packages
95
+ * @returns {void}
86
96
  */
87
- async updateDependencies(version, updatedPackages) {
88
- // Find all package.json files that are not in node modules
89
- const paths = await globby(['**/package.json', '!**/node_modules']);
90
- for (const path of paths) {
91
- for (const packageName of updatedPackages) {
92
- let re = new RegExp('"' + packageName + '": "\\d+\\.\\d+\\..*"', 'g');
93
- await replaceInFile({
94
- files: path,
95
- from: re,
96
- to: `"${packageName}": "${version}"`
97
- });
97
+ updateDependencies(version, updatedPackages) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ // Find all package.json files that are not in node modules
100
+ const paths = yield globby(['**/package.json', '!**/node_modules']);
101
+ for (const path of paths) {
102
+ for (const packageName of updatedPackages) {
103
+ const re = new RegExp('"' + packageName + '": "\\d+\\.\\d+\\..*"', 'g');
104
+ yield replaceInFile({
105
+ files: path,
106
+ from: re,
107
+ to: `"${packageName}": "${version}"`,
108
+ });
109
+ }
98
110
  }
99
- }
111
+ });
100
112
  }
101
- async insertScriptRequest(token, version, prefix) {
102
- let options = {
103
- uri: `https://ops.adinsure.com/api/script`,
104
- headers: {
105
- Authorization: 'Bearer ' + token
106
- },
107
- body: {
108
- version,
109
- prefix
110
- },
111
- json: true
112
- };
113
- return request.post(options);
113
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
114
+ insertScriptRequest(token, version, prefix) {
115
+ return __awaiter(this, void 0, void 0, function* () {
116
+ return axios.post(`https://ops.adinsure.com/api/script`, {
117
+ headers: {
118
+ Authorization: 'Bearer ' + token,
119
+ 'Content-Type': 'application/json',
120
+ },
121
+ params: {
122
+ version,
123
+ prefix,
124
+ },
125
+ });
126
+ });
114
127
  }
115
- async insertScript(token, version, prefix, skip = false) {
116
- cli_ux_1.default.action.start('Inserting new script version', undefined, { stdout: true });
117
- if (skip) {
118
- cli_ux_1.default.action.stop(`${chalk_1.default.blue('skip')}`);
119
- }
120
- else if (token) {
121
- try {
122
- await this.insertScriptRequest(token, version, prefix);
128
+ insertScript(token, version, prefix, skip = false) {
129
+ return __awaiter(this, void 0, void 0, function* () {
130
+ ux.action.start('Inserting new script version', undefined, { stdout: true });
131
+ if (skip) {
132
+ ux.action.stop(`${chalk.blue('skip')}`);
123
133
  }
124
- catch (err) {
125
- switch (err.statusCode) {
126
- case 401: {
127
- this.error(`${chalk_1.default.red('You don\'t have permissions. If this was intentional command, please contact Operations for permissions, do git reset and rerun command.')}`);
128
- break;
129
- }
130
- default: {
131
- this.error(`${chalk_1.default.red(err)}`);
134
+ else if (token) {
135
+ try {
136
+ yield this.insertScriptRequest(token, version, prefix);
137
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
138
+ }
139
+ catch (error) {
140
+ switch (error.statusCode) {
141
+ case 401: {
142
+ this.error(`${chalk.red('You don\'t have permissions. If this was intentional command, please contact Operations for permissions, do git reset and rerun command.')}`);
143
+ break;
144
+ }
145
+ default: {
146
+ this.error(`${chalk.red(error)}`);
147
+ }
132
148
  }
133
149
  }
150
+ ux.action.stop(`${chalk.green('done')}`);
134
151
  }
135
- cli_ux_1.default.action.stop(`${chalk_1.default.green('done')}`);
136
- }
137
- else {
138
- cli_ux_1.default.action.stop(`${chalk_1.default.red('error')}`);
139
- }
152
+ else {
153
+ ux.action.stop(`${chalk.red('error')}`);
154
+ }
155
+ });
140
156
  }
141
157
  /**
142
158
  * Check if version has valid prerelease as 'rc' or '201910' (year month)
159
+ * @param version Version
160
+ * @param month Month of release
161
+ * @returns {boolean} True or false
143
162
  */
144
163
  checkPrerelease(version, month) {
145
164
  const prereleaseVersion = semver.prerelease(version, true);
@@ -153,115 +172,121 @@ class Version extends command_base_1.default {
153
172
  }
154
173
  /**
155
174
  * Write new version in VERSION file
175
+ * @param version The new version
176
+ * @returns {void}
156
177
  */
157
- async setVersion(version) {
158
- const versionPath = path.resolve(await this.getGitRoot(), 'VERSION');
159
- if (!await fs.pathExists(versionPath)) {
160
- throw new Error('VERSION file not found. File will not be updated.');
161
- }
162
- return fs.writeFileSync(versionPath, version, 'utf-8');
178
+ setVersion(version) {
179
+ return __awaiter(this, void 0, void 0, function* () {
180
+ const versionPath = path.resolve(yield this.getGitRoot(), 'VERSION');
181
+ if (!(yield fs.pathExists(versionPath))) {
182
+ throw new Error('VERSION file not found. File will not be updated.');
183
+ }
184
+ return fs.writeFileSync(versionPath, version, 'utf8');
185
+ });
163
186
  }
164
- async run() {
165
- const { args, flags } = this.parse(Version);
166
- const currentPrereleaseDate = moment().format('YYYYMM');
167
- // Check if token is correct and save it for later use
168
- let token = '';
169
- if (!flags['no-script']) {
170
- token = await this.security.getToken();
171
- }
172
- // exit if validation fails
173
- if (!this.validateOptions(args, flags)) {
174
- return;
175
- }
176
- let newVersion = null;
177
- if (args.type === 'new' && flags.version) {
178
- this.log(`Using 'new' command. VERSION file ignored.`);
179
- newVersion = semver.valid(flags.version);
180
- }
181
- else {
182
- // Get current version
183
- const fullVersion = await this.getVersion();
184
- this.log(`Current version is ${chalk_1.default.green(fullVersion)}`);
185
- // Calculate new version
186
- newVersion = semver.inc(fullVersion, args.type, true, currentPrereleaseDate);
187
- // Force prerelease if prerelease is in same month and increment RC correctly
188
- if (args.type === 'prerelease' && this.checkPrerelease(fullVersion, currentPrereleaseDate)) {
189
- newVersion = semver.inc(fullVersion, args.type, true);
187
+ run() {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ const { args, flags } = yield this.parse(Version);
190
+ const currentPrereleaseDate = moment().format('YYYYMM');
191
+ // Check if token is correct and save it for later use
192
+ let token = '';
193
+ if (!flags['no-script']) {
194
+ token = yield this.security.getToken();
190
195
  }
191
- // Allow npm packages to be versioned seperately. Ultimately we want to force npm package to have same verion as VERSION file.
192
- if (!flags.independent) {
193
- args.type = 'new';
196
+ // exit if validation fails
197
+ if (!this.validateOptions(args, flags)) {
198
+ return;
194
199
  }
195
- }
196
- // Stop if version invalid
197
- if (!newVersion) {
198
- return this.error(`${chalk_1.default.red('Version in incorrect format')}`);
199
- }
200
- this.log(`Setting new version to ${chalk_1.default.green(newVersion)}`);
201
- try {
202
- await this.setVersion(newVersion);
203
- }
204
- catch (err) {
205
- this.warn(`${chalk_1.default.yellow(err.message)}`);
206
- }
207
- cli_ux_1.default.action.start('Bumping NPM packages', undefined, { stdout: true });
208
- let packages = await this.bumpNpm(args.type, newVersion, flags['only-npm-packages'], flags['exclude-dir']);
209
- cli_ux_1.default.action.stop(`${chalk_1.default.green('done')}`);
210
- cli_ux_1.default.action.start('Updating NPM dependencies in package.json files', undefined, { stdout: true });
211
- if (flags['no-deps']) {
212
- cli_ux_1.default.action.stop(`${chalk_1.default.blue('skip')}`);
213
- }
214
- else {
215
- await this.updateDependencies(newVersion, packages);
216
- cli_ux_1.default.action.stop(`${chalk_1.default.green('done')}`);
217
- }
218
- await this.insertScript(token, newVersion, flags['script-prefix'], flags['no-script']);
200
+ let newVersion = null;
201
+ if (args.type === 'new' && flags.version) {
202
+ this.log(`Using 'new' command. VERSION file ignored.`);
203
+ newVersion = semver.valid(flags.version);
204
+ }
205
+ else {
206
+ // Get current version
207
+ const fullVersion = yield this.getVersion();
208
+ this.log(`Current version is ${chalk.green(fullVersion)}`);
209
+ // Calculate new version
210
+ newVersion = semver.inc(fullVersion, args.type, true, currentPrereleaseDate);
211
+ // Force prerelease if prerelease is in same month and increment RC correctly
212
+ if (args.type === 'prerelease' && this.checkPrerelease(fullVersion, currentPrereleaseDate)) {
213
+ newVersion = semver.inc(fullVersion, args.type, true);
214
+ }
215
+ // Allow npm packages to be versioned seperately. Ultimately we want to force npm package to have same verion as VERSION file.
216
+ if (!flags.independent) {
217
+ args.type = 'new';
218
+ }
219
+ }
220
+ // Stop if version invalid
221
+ if (!newVersion) {
222
+ return this.error(`${chalk.red('Version in incorrect format')}`);
223
+ }
224
+ this.log(`Setting new version to ${chalk.green(newVersion)}`);
225
+ try {
226
+ yield this.setVersion(newVersion);
227
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
228
+ }
229
+ catch (error) {
230
+ this.warn(`${chalk.yellow(error.message)}`);
231
+ }
232
+ ux.action.start('Bumping NPM packages', undefined, { stdout: true });
233
+ const packages = yield this.bumpNpm(args.type, newVersion, flags['only-npm-packages'], flags['exclude-dir']);
234
+ ux.action.stop(`${chalk.green('done')}`);
235
+ ux.action.start('Updating NPM dependencies in package.json files', undefined, { stdout: true });
236
+ if (flags['no-deps']) {
237
+ ux.action.stop(`${chalk.blue('skip')}`);
238
+ }
239
+ else {
240
+ yield this.updateDependencies(newVersion, packages);
241
+ ux.action.stop(`${chalk.green('done')}`);
242
+ }
243
+ yield this.insertScript(token, newVersion, flags['script-prefix'], flags['no-script']);
244
+ });
219
245
  }
220
246
  }
221
- exports.default = Version;
222
247
  Version.description = 'release new version';
223
248
  Version.usage = 'version <type> [flags]';
224
249
  Version.examples = [
225
250
  `$ ops version patch`,
226
251
  `$ ops version prerelease -i`,
227
- `$ ops version new -v 3.4.3`
252
+ `$ ops version new -v 3.4.3`,
228
253
  ];
229
- Version.args = [
230
- {
231
- name: 'type',
232
- required: true,
254
+ Version.args = {
255
+ type: Args.string({
233
256
  description: 'Type of release',
234
- options: ['patch', 'minor', 'major', 'prerelease', 'preminor', 'premajor', 'new']
235
- },
236
- ];
257
+ options: ['patch', 'minor', 'major', 'prerelease', 'preminor', 'premajor', 'new'],
258
+ required: true,
259
+ }),
260
+ };
237
261
  Version.flags = {
238
- independent: command_1.flags.boolean({
262
+ independent: Flags.boolean({
239
263
  char: 'i',
240
264
  description: 'increment npm packages independent of VERSION file',
241
- default: false
265
+ default: false,
242
266
  }),
243
- version: command_1.flags.string({
267
+ version: Flags.string({
244
268
  char: 'v',
245
- description: 'force version'
269
+ description: 'force version',
246
270
  }),
247
- 'script-prefix': command_1.flags.string({
271
+ 'script-prefix': Flags.string({
248
272
  description: 'prefix for db script version creation. (default: 7.10)',
249
- default: '7.10'
273
+ default: '7.10',
250
274
  }),
251
- 'no-deps': command_1.flags.boolean({
275
+ 'no-deps': Flags.boolean({
252
276
  description: 'skip dependency update',
253
- default: false
277
+ default: false,
254
278
  }),
255
- 'no-script': command_1.flags.boolean({
279
+ 'no-script': Flags.boolean({
256
280
  description: 'skip creation of script',
257
- default: false
281
+ default: false,
258
282
  }),
259
- 'only-npm-packages': command_1.flags.string({
283
+ 'only-npm-packages': Flags.string({
260
284
  description: 'regular expression for which NPM packages to include',
261
- default: '.*'
285
+ default: '.*',
262
286
  }),
263
- 'exclude-dir': command_1.flags.string({
287
+ 'exclude-dir': Flags.string({
264
288
  description: 'exclude directories where to search for package.json',
265
- multiple: true
266
- })
289
+ multiple: true,
290
+ }),
267
291
  };
292
+ export default Version;
package/lib/config.js CHANGED
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultConfig = void 0;
4
- exports.DefaultConfig = {
1
+ export const DefaultConfig = {
5
2
  changelogs: {
6
3
  file: 'CHANGELOG.md',
7
- unreleasedFolder: 'changelogs/unreleased'
8
- }
4
+ unreleasedFolder: 'changelogs/unreleased',
5
+ },
9
6
  };
@@ -1,2 +1,2 @@
1
- import { Hook } from '@oclif/config';
2
- export declare const versionOverride: Hook.Init;
1
+ import { Hook } from '@oclif/core';
2
+ export declare const versionOverride: Hook<'init'>;
@@ -1,15 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.versionOverride = void 0;
4
- const version_1 = require("../../commands/version");
5
- exports.versionOverride = async function () {
6
- if (process.argv[2] === 'version') {
7
- try {
8
- await version_1.default.run(process.argv.splice(3));
1
+ import { __awaiter } from "tslib";
2
+ import Version from '../../commands/version.js';
3
+ export const versionOverride = function () {
4
+ return __awaiter(this, void 0, void 0, function* () {
5
+ if (process.argv[2] === 'version') {
6
+ try {
7
+ yield Version.run(process.argv.splice(3));
8
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
+ }
10
+ catch (error) {
11
+ this.error(error);
12
+ }
13
+ // eslint-disable-next-line no-process-exit, unicorn/no-process-exit
14
+ return process.exit(0);
9
15
  }
10
- catch (err) {
11
- this.error(err);
12
- }
13
- return process.exit(0);
14
- }
16
+ });
15
17
  };
package/lib/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { run } from '@oclif/command';
1
+ export { run } from '@oclif/core';
package/lib/index.js CHANGED
@@ -1,4 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var command_1 = require("@oclif/command");
4
- Object.defineProperty(exports, "run", { enumerable: true, get: function () { return command_1.run; } });
1
+ export { run } from '@oclif/core';
@@ -1,6 +1,8 @@
1
1
  export default class ChildProcessCommand {
2
2
  /**
3
3
  * Only Windows supported at this point
4
+ * @param cmd Command to run
5
+ * @return {void}
4
6
  */
5
7
  runCommand(cmd: string[]): Promise<{
6
8
  data: string;