@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,67 +1,78 @@
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 fs = require("fs-extra");
6
- const semver = require("semver");
7
- const command_base_1 = require("../../command.base");
8
- const nuget_1 = require("../../lib/nuget");
9
- class NuGetDependencyUpdate extends command_base_1.default {
1
+ import { __awaiter } from "tslib";
2
+ import { Args, Command, Flags } from '@oclif/core';
3
+ import chalk from 'chalk';
4
+ import fs from 'fs-extra';
5
+ import semver from 'semver';
6
+ import NugetContext from '../../lib/nuget.js';
7
+ class NuGetDependencyUpdate extends Command {
10
8
  /**
11
9
  * Update dependencies in csproj files for @adinsure packages
10
+ * @param
12
11
  */
13
- async updateDependencies(newVersion, filter = '', packages) {
14
- // Find all package.json files that are not in node modules
15
- for (const path of packages) {
12
+ /**
13
+ * Update dependencies in csproj files for @adinsure packages
14
+ * @param {string} newVersion New version to update to
15
+ * @param {NpmPackage[]} packages Packages to update
16
+ * @param {string[]} filter Regular expressions filter for packages
17
+ * @returns {Prmoise<void>} Void Promise
18
+ */
19
+ updateDependencies(newVersion, packages, filter = '') {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ // Find all package.json files that are not in node modules
22
+ for (const path of packages) {
23
+ try {
24
+ const data = yield fs.readFile(path, 'utf8');
25
+ const re = new RegExp('(<PackageReference Include=".*' + filter + `.*" Version=)".*"( />)`, 'g');
26
+ const result = data.replace(re, '$1"' + newVersion + '"$2');
27
+ yield fs.writeFile(path, result, 'utf8');
28
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
+ }
30
+ catch (error) {
31
+ this.warn(error.message);
32
+ break;
33
+ }
34
+ }
35
+ });
36
+ }
37
+ run() {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const { args, flags } = yield this.parse(NuGetDependencyUpdate);
40
+ const newVersion = semver.valid(args.version);
41
+ const nugetContext = new NugetContext();
42
+ // Stop if version invalid
43
+ if (!newVersion) {
44
+ return this.error(`${chalk.red('Version in incorrect format')}`);
45
+ }
46
+ const packages = yield nugetContext.projectList(flags.exclude);
16
47
  try {
17
- let data = await fs.readFile(path, 'utf8');
18
- let re = new RegExp('(<PackageReference Include=\".*' + filter + '.*\" Version=)\".*\"( />)', 'g');
19
- let result = data.replace(re, '$1' + '\"' + newVersion + '\"' + '$2');
20
- await fs.writeFile(path, result, 'utf8');
48
+ yield this.updateDependencies(newVersion, packages, flags.filter);
49
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
50
  }
22
- catch (err) {
23
- this.warn(err.message);
24
- break;
51
+ catch (error) {
52
+ this.error(error.message);
25
53
  }
26
- }
27
- }
28
- async run() {
29
- const { args, flags } = this.parse(NuGetDependencyUpdate);
30
- let newVersion = semver.valid(args.version);
31
- let nugetContext = new nuget_1.default();
32
- // Stop if version invalid
33
- if (!newVersion) {
34
- return this.error(`${chalk_1.default.red('Version in incorrect format')}`);
35
- }
36
- const packages = await nugetContext.projectList(flags.exclude);
37
- try {
38
- await this.updateDependencies(newVersion, flags.filter, packages);
39
- }
40
- catch (err) {
41
- this.error(err.message);
42
- }
54
+ });
43
55
  }
44
56
  }
45
- exports.default = NuGetDependencyUpdate;
46
57
  NuGetDependencyUpdate.description = 'update nuget dependencies per package filter';
47
58
  NuGetDependencyUpdate.usage = 'nuget:dependency-update <type> [flags]';
48
59
  NuGetDependencyUpdate.examples = [
49
- `$ ops nuget:dependency-update 3.4.3 --filter Adacta.AdInsure --exclude Scheduler`
60
+ `$ ops nuget:dependency-update 3.4.3 --filter Adacta.AdInsure --exclude Scheduler`,
50
61
  ];
51
- NuGetDependencyUpdate.args = [
52
- {
53
- name: 'version',
62
+ NuGetDependencyUpdate.args = {
63
+ version: Args.string({
54
64
  required: true,
55
- description: 'Type of release'
56
- }
57
- ];
65
+ description: 'Type of release',
66
+ }),
67
+ };
58
68
  NuGetDependencyUpdate.flags = {
59
- filter: command_1.flags.string({
69
+ filter: Flags.string({
60
70
  description: 'regular expression for which NuGet packages to update',
61
- required: true
71
+ required: true,
62
72
  }),
63
- exclude: command_1.flags.string({
73
+ exclude: Flags.string({
64
74
  description: 'exclude directories where to search for csproj files',
65
- multiple: true
66
- })
75
+ multiple: true,
76
+ }),
67
77
  };
78
+ export default NuGetDependencyUpdate;
@@ -1,38 +1,42 @@
1
- import { flags } from '@oclif/command';
2
- import CommandBase from '../command.base';
3
- export default class Sql extends CommandBase {
1
+ import { AxiosResponse } from 'axios';
2
+ import CommandBase from '../command.base.js';
3
+ export default class Sql extends CommandBase<typeof Sql> {
4
4
  static description: string;
5
5
  static usage: string;
6
6
  static examples: string[];
7
7
  static args: {
8
- name: string;
9
- description: string;
10
- options: string[];
11
- }[];
8
+ type: import("@oclif/core/lib/interfaces/parser.js").Arg<string, Record<string, unknown>>;
9
+ module: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
10
+ };
12
11
  static flags: {
13
- version: flags.IOptionFlag<string | undefined>;
14
- layer: flags.IOptionFlag<string | undefined>;
15
- offline: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
16
- description: flags.IOptionFlag<string | undefined>;
17
- major: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
18
- 'table-schema': flags.IOptionFlag<string | undefined>;
19
- 'table-name': flags.IOptionFlag<string | undefined>;
20
- 'column-name': flags.IOptionFlag<string | undefined>;
21
- 'column-type': flags.IOptionFlag<string | undefined>;
12
+ version: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
13
+ layer: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
14
+ offline: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
15
+ description: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
16
+ major: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
17
+ 'table-schema': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
18
+ 'table-name': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
19
+ 'column-name': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
20
+ 'column-type': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
22
21
  };
23
22
  private readonly _moduleTypes;
24
23
  private readonly _dbmsType;
25
24
  /**
26
- * Get unique scriptID by specified version
25
+ * Get unique Script ID zip by specified version
26
+ * @param {string} version The version of Identity Server
27
+ * @returns {Promise<AxiosResponse<any, any>>}
27
28
  */
28
- getScriptId(version: string): Promise<string>;
29
+ getScriptId(version: string): Promise<AxiosResponse<any, any>>;
29
30
  /**
30
31
  * Get unique scriptID by specified version
32
+ * @param {string} version Specified version
33
+ * @param {string} description Description
34
+ * @returns {Promise<string>} Promise to scriptID
31
35
  */
32
36
  getOfflineScriptId(version: string, description: string | undefined): Promise<string>;
33
37
  handleLayer(scriptDbmsFolder: string, scriptLayer: string, scriptType: string, dbmsFormat: string): Promise<string>;
34
- sqlExtendScriptGeneration(table_schema: string | undefined, table_name: string | undefined, column_name: string | undefined, column_type: string | undefined): Promise<string>;
35
- oradcExtendScriptGeneration(table_schema: string | undefined, table_name: string | undefined, column_name: string | undefined, column_type: string | undefined): Promise<string>;
38
+ sqlExtendScriptGeneration(tableSchema: string | undefined, tableName: string | undefined, columnName: string | undefined, columnType: string | undefined): Promise<string>;
39
+ oradcExtendScriptGeneration(tableSchema: string | undefined, tableName: string | undefined, columnName: string | undefined, columnType: string | undefined): Promise<string>;
36
40
  checkExtendParameters(): Promise<string[]>;
37
41
  run(): Promise<void>;
38
42
  }