@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.
- package/CHANGELOGS.md +12 -0
- package/README.md +0 -211
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +6 -0
- package/bin/run.cmd +1 -1
- package/bin/run.js +8 -0
- package/lib/command.base.d.ts +9 -5
- package/lib/command.base.jira.d.ts +7 -8
- package/lib/command.base.jira.js +26 -24
- package/lib/command.base.js +69 -57
- package/lib/commands/docker/update-image-version.d.ts +6 -9
- package/lib/commands/docker/update-image-version.js +35 -34
- package/lib/commands/doctor.d.ts +15 -5
- package/lib/commands/doctor.js +219 -186
- package/lib/commands/download/client.d.ts +10 -7
- package/lib/commands/download/client.js +60 -52
- package/lib/commands/download/identity-server.d.ts +9 -7
- package/lib/commands/download/identity-server.js +59 -53
- package/lib/commands/download/jmeter.d.ts +5 -5
- package/lib/commands/download/jmeter.js +54 -49
- package/lib/commands/download/keycloak-scim.d.ts +6 -6
- package/lib/commands/download/keycloak-scim.js +56 -51
- package/lib/commands/download/platform.d.ts +9 -7
- package/lib/commands/download/platform.js +59 -53
- package/lib/commands/download/scheduler.d.ts +9 -7
- package/lib/commands/download/scheduler.js +59 -53
- package/lib/commands/download/server.d.ts +9 -7
- package/lib/commands/download/server.js +59 -53
- package/lib/commands/download/signalr.d.ts +9 -7
- package/lib/commands/download/signalr.js +59 -53
- package/lib/commands/download/studio.d.ts +11 -9
- package/lib/commands/download/studio.js +92 -82
- package/lib/commands/gitlab/get-tag-pipeline.d.ts +11 -14
- package/lib/commands/gitlab/get-tag-pipeline.js +95 -92
- package/lib/commands/gitlab/next-nightly-tag.d.ts +10 -12
- package/lib/commands/gitlab/next-nightly-tag.js +96 -98
- package/lib/commands/jira/issue.d.ts +6 -8
- package/lib/commands/jira/issue.js +25 -23
- package/lib/commands/jira/labels.d.ts +9 -12
- package/lib/commands/jira/labels.js +52 -51
- package/lib/commands/log/add.d.ts +6 -8
- package/lib/commands/log/add.js +92 -87
- package/lib/commands/log/generate.d.ts +9 -10
- package/lib/commands/log/generate.js +112 -107
- package/lib/commands/log/validate.d.ts +2 -2
- package/lib/commands/log/validate.js +47 -43
- package/lib/commands/login.d.ts +9 -10
- package/lib/commands/login.js +101 -97
- package/lib/commands/npm/check-publish.d.ts +7 -8
- package/lib/commands/npm/check-publish.js +59 -54
- package/lib/commands/npm/dependency-update.d.ts +14 -12
- package/lib/commands/npm/dependency-update.js +94 -86
- package/lib/commands/npm/publish.d.ts +8 -9
- package/lib/commands/npm/publish.js +154 -140
- package/lib/commands/nuget/dependency-update.d.ts +15 -10
- package/lib/commands/nuget/dependency-update.js +60 -49
- package/lib/commands/sql.d.ts +24 -20
- package/lib/commands/sql.js +245 -226
- package/lib/commands/translate.d.ts +15 -16
- package/lib/commands/translate.js +109 -104
- package/lib/commands/version.d.ts +29 -19
- package/lib/commands/version.js +215 -190
- package/lib/config.js +3 -6
- package/lib/hooks/init/version-override.d.ts +2 -2
- package/lib/hooks/init/version-override.js +15 -13
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -4
- package/lib/lib/command.d.ts +2 -0
- package/lib/lib/command.js +65 -58
- package/lib/lib/gitlab.d.ts +8 -2
- package/lib/lib/gitlab.js +94 -82
- package/lib/lib/npm.d.ts +7 -3
- package/lib/lib/npm.js +72 -60
- package/lib/lib/npmrc.d.ts +5 -0
- package/lib/lib/npmrc.js +20 -13
- package/lib/lib/nuget.d.ts +2 -0
- package/lib/lib/nuget.js +20 -17
- package/lib/security/cache.js +31 -27
- package/lib/security/context.d.ts +2 -1
- package/lib/security/context.js +106 -103
- package/lib/types/changelog.types.js +1 -2
- package/lib/types/npm.types.d.ts +5 -5
- package/lib/types/npm.types.js +1 -2
- package/oclif.manifest.json +1212 -1
- package/package.json +50 -46
- package/bin/run +0 -5
- package/lib/commands/prepare-content.d.ts +0 -29
- package/lib/commands/prepare-content.js +0 -386
|
@@ -1,67 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
18
|
-
|
|
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 (
|
|
23
|
-
this.
|
|
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:
|
|
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:
|
|
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;
|
package/lib/commands/sql.d.ts
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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:
|
|
14
|
-
layer:
|
|
15
|
-
offline: import("@oclif/
|
|
16
|
-
description:
|
|
17
|
-
major: import("@oclif/
|
|
18
|
-
'table-schema':
|
|
19
|
-
'table-name':
|
|
20
|
-
'column-name':
|
|
21
|
-
'column-type':
|
|
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
|
|
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<
|
|
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(
|
|
35
|
-
oradcExtendScriptGeneration(
|
|
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
|
}
|