@eclipse-glsp/cli 1.1.0-next.4c65907.114 → 1.1.0-next.73d6685.138
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/README.md +50 -6
- package/lib/app.d.ts +1 -17
- package/lib/app.d.ts.map +1 -1
- package/lib/app.js +10 -24
- package/lib/app.js.map +1 -1
- package/lib/commands/check-header.d.ts +24 -0
- package/lib/commands/check-header.d.ts.map +1 -0
- package/lib/commands/check-header.js +290 -0
- package/lib/commands/check-header.js.map +1 -0
- package/lib/commands/coverage-report.d.ts +29 -0
- package/lib/commands/coverage-report.d.ts.map +1 -0
- package/lib/commands/coverage-report.js +123 -0
- package/lib/commands/coverage-report.js.map +1 -0
- package/lib/{release → commands/release}/common.d.ts +1 -1
- package/lib/commands/release/common.d.ts.map +1 -0
- package/lib/{release → commands/release}/common.js +44 -18
- package/lib/commands/release/common.js.map +1 -0
- package/lib/commands/release/release-client.d.ts.map +1 -0
- package/lib/{release → commands/release}/release-client.js +30 -9
- package/lib/commands/release/release-client.js.map +1 -0
- package/lib/commands/release/release-eclipse-integration.d.ts.map +1 -0
- package/lib/{release → commands/release}/release-eclipse-integration.js +26 -3
- package/lib/commands/release/release-eclipse-integration.js.map +1 -0
- package/lib/commands/release/release-java-server.d.ts.map +1 -0
- package/lib/{release → commands/release}/release-java-server.js +28 -4
- package/lib/commands/release/release-java-server.js.map +1 -0
- package/lib/commands/release/release-server-node.d.ts.map +1 -0
- package/lib/{release → commands/release}/release-server-node.js +25 -2
- package/lib/commands/release/release-server-node.js.map +1 -0
- package/lib/commands/release/release-theia-integration.d.ts.map +1 -0
- package/lib/{release → commands/release}/release-theia-integration.js +27 -15
- package/lib/commands/release/release-theia-integration.js.map +1 -0
- package/lib/commands/release/release-vscode-integration.d.ts.map +1 -0
- package/lib/{release → commands/release}/release-vscode-integration.js +26 -3
- package/lib/commands/release/release-vscode-integration.js.map +1 -0
- package/lib/{release → commands/release}/release.d.ts +3 -2
- package/lib/commands/release/release.d.ts.map +1 -0
- package/lib/{release → commands/release}/release.js +73 -18
- package/lib/commands/release/release.js.map +1 -0
- package/lib/util/command-util.d.ts +6 -11
- package/lib/util/command-util.d.ts.map +1 -1
- package/lib/util/command-util.js +50 -12
- package/lib/util/command-util.js.map +1 -1
- package/lib/util/git-util.d.ts +43 -4
- package/lib/util/git-util.d.ts.map +1 -1
- package/lib/util/git-util.js +151 -39
- package/lib/util/git-util.js.map +1 -1
- package/lib/util/logger.d.ts +21 -7
- package/lib/util/logger.d.ts.map +1 -1
- package/lib/util/logger.js +29 -13
- package/lib/util/logger.js.map +1 -1
- package/lib/util/validation-util.d.ts +1 -0
- package/lib/util/validation-util.d.ts.map +1 -1
- package/lib/util/validation-util.js +40 -6
- package/lib/util/validation-util.js.map +1 -1
- package/package.json +31 -33
- package/src/app.ts +10 -28
- package/src/commands/check-header.ts +355 -0
- package/src/commands/coverage-report.ts +113 -0
- package/src/{release → commands/release}/common.ts +9 -9
- package/src/{release → commands/release}/release-client.ts +7 -11
- package/src/{release → commands/release}/release-eclipse-integration.ts +2 -2
- package/src/{release → commands/release}/release-java-server.ts +4 -3
- package/src/{release → commands/release}/release-server-node.ts +1 -1
- package/src/{release → commands/release}/release-theia-integration.ts +7 -19
- package/src/{release → commands/release}/release-vscode-integration.ts +3 -2
- package/src/{release → commands/release}/release.ts +59 -18
- package/src/util/command-util.ts +11 -20
- package/src/util/git-util.ts +128 -38
- package/src/util/logger.ts +36 -17
- package/src/util/validation-util.ts +17 -4
- package/lib/release/common.d.ts.map +0 -1
- package/lib/release/common.js.map +0 -1
- package/lib/release/release-client.d.ts.map +0 -1
- package/lib/release/release-client.js.map +0 -1
- package/lib/release/release-eclipse-integration.d.ts.map +0 -1
- package/lib/release/release-eclipse-integration.js.map +0 -1
- package/lib/release/release-java-server.d.ts.map +0 -1
- package/lib/release/release-java-server.js.map +0 -1
- package/lib/release/release-server-node.d.ts.map +0 -1
- package/lib/release/release-server-node.js.map +0 -1
- package/lib/release/release-theia-integration.d.ts.map +0 -1
- package/lib/release/release-theia-integration.js.map +0 -1
- package/lib/release/release-vscode-integration.d.ts.map +0 -1
- package/lib/release/release-vscode-integration.js.map +0 -1
- package/lib/release/release.d.ts.map +0 -1
- package/lib/release/release.js.map +0 -1
- /package/lib/{release → commands/release}/release-client.d.ts +0 -0
- /package/lib/{release → commands/release}/release-eclipse-integration.d.ts +0 -0
- /package/lib/{release → commands/release}/release-java-server.d.ts +0 -0
- /package/lib/{release → commands/release}/release-server-node.d.ts +0 -0
- /package/lib/{release → commands/release}/release-theia-integration.d.ts +0 -0
- /package/lib/{release → commands/release}/release-vscode-integration.d.ts +0 -0
|
@@ -14,10 +14,33 @@
|
|
|
14
14
|
*
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
17
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
41
|
exports.releaseVscodeIntegration = void 0;
|
|
19
|
-
const sh = require("shelljs");
|
|
20
|
-
const logger_1 = require("
|
|
42
|
+
const sh = __importStar(require("shelljs"));
|
|
43
|
+
const logger_1 = require("../../util/logger");
|
|
21
44
|
const common_1 = require("./common");
|
|
22
45
|
let REPO_ROOT;
|
|
23
46
|
async function releaseVscodeIntegration(options) {
|
|
@@ -38,7 +61,7 @@ exports.releaseVscodeIntegration = releaseVscodeIntegration;
|
|
|
38
61
|
function updateExternalGLSPDependencies(version) {
|
|
39
62
|
logger_1.LOGGER.info('Update external GLSP dependencies (Protocol)');
|
|
40
63
|
sh.cd(REPO_ROOT);
|
|
41
|
-
(0, common_1.updateVersion)({ name: '@eclipse-glsp/protocol', version }, { name: '@eclipse-glsp/client', version }, { name: '@eclipse-glsp-examples/workflow-glsp', version });
|
|
64
|
+
(0, common_1.updateVersion)({ name: '@eclipse-glsp/protocol', version }, { name: '@eclipse-glsp/client', version }, { name: '@eclipse-glsp-examples/workflow-glsp', version }, { name: '@eclipse-glsp-examples/workflow-server', version });
|
|
42
65
|
}
|
|
43
66
|
function build() {
|
|
44
67
|
logger_1.LOGGER.info('Install & Build with yarn');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-vscode-integration.js","sourceRoot":"","sources":["../../../src/commands/release/release-vscode-integration.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;;;;;;;;;;;;;;AAElF,4CAA8B;AAC9B,8CAA2C;AAC3C,qCASkB;AAElB,IAAI,SAAiB,CAAC;AAEf,KAAK,UAAU,wBAAwB,CAAC,OAAuB;IAClE,eAAM,CAAC,IAAI,CAAC,yCAAyC,CAA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seCmdOptions
|
|
2
|
+
interface ReleaseCmdOptions {
|
|
4
3
|
checkoutDir: string;
|
|
5
4
|
branch: string;
|
|
6
5
|
force: boolean;
|
|
7
6
|
publish: boolean;
|
|
8
7
|
npmDryRun: boolean;
|
|
9
8
|
draft: boolean;
|
|
9
|
+
verbose: boolean;
|
|
10
10
|
}
|
|
11
|
+
export declare const ReleaseCommand: import("commander").Command;
|
|
11
12
|
export declare function release(component: Component, releaseType: ReleaseType, customVersion: string | undefined, cliOptions: ReleaseCmdOptions): Promise<void>;
|
|
12
13
|
export {};
|
|
13
14
|
//# sourceMappingURL=release.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/commands/release/release.ts"],"names":[],"mappings":"AAyBA,OAAO,EACH,SAAS,EAET,WAAW,EAKd,MAAM,UAAU,CAAC;AAQlB,UAAU,iBAAiB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,6BAiBP,CAAC;AAIrB,wBAAsB,OAAO,CACzB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,UAAU,EAAE,iBAAiB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAuCf"}
|
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.release = void 0;
|
|
26
|
+
exports.release = exports.ReleaseCommand = void 0;
|
|
27
|
+
const commander_1 = require("commander");
|
|
4
28
|
const process_1 = require("process");
|
|
5
29
|
const readline_1 = require("readline");
|
|
6
|
-
const readline = require("readline-sync");
|
|
7
|
-
const semver = require("semver");
|
|
8
|
-
const sh = require("shelljs");
|
|
9
|
-
const command_util_1 = require("
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const validation_util_1 = require("../util/validation-util");
|
|
30
|
+
const readline = __importStar(require("readline-sync"));
|
|
31
|
+
const semver = __importStar(require("semver"));
|
|
32
|
+
const sh = __importStar(require("shelljs"));
|
|
33
|
+
const command_util_1 = require("../../util/command-util");
|
|
34
|
+
const logger_1 = require("../../util/logger");
|
|
35
|
+
const validation_util_1 = require("../../util/validation-util");
|
|
13
36
|
const common_1 = require("./common");
|
|
14
37
|
const release_client_1 = require("./release-client");
|
|
15
38
|
const release_eclipse_integration_1 = require("./release-eclipse-integration");
|
|
@@ -17,11 +40,26 @@ const release_java_server_1 = require("./release-java-server");
|
|
|
17
40
|
const release_server_node_1 = require("./release-server-node");
|
|
18
41
|
const release_theia_integration_1 = require("./release-theia-integration");
|
|
19
42
|
const release_vscode_integration_1 = require("./release-vscode-integration");
|
|
43
|
+
exports.ReleaseCommand = (0, command_util_1.baseCommand)()
|
|
44
|
+
.name('release')
|
|
45
|
+
.description('Prepare & publish a new release for a glsp component')
|
|
46
|
+
.addArgument(new commander_1.Argument('<component>', 'The glsp component to be released').choices(common_1.Component.CLI_CHOICES).argParser(common_1.Component.parse))
|
|
47
|
+
.addArgument(new commander_1.Argument('<releaseType>', 'The release type').choices(common_1.ReleaseType.CLI_CHOICES))
|
|
48
|
+
.argument('[customVersion]', 'Custom version number. Will be ignored if the release type is not "custom"', validation_util_1.validateVersion)
|
|
49
|
+
.option('-f, --force', 'Enable force mode', false)
|
|
50
|
+
.option('-d, --checkoutDir <checkoutDir>', 'The git checkout directory', validation_util_1.validateDirectory, process.cwd())
|
|
51
|
+
.option('-b, --branch <branch>', 'The git branch to checkout', 'master')
|
|
52
|
+
.option('-v, --verbose', 'Enable verbose (debug) log output', false)
|
|
53
|
+
.option('--no-publish', 'Only prepare release but do not publish to github', true)
|
|
54
|
+
.option('--draft', 'Publish github releases as drafts', false)
|
|
55
|
+
.option('--npm-dryRun', 'Execute a npm dry-run for inspection. Publishes to the local npm registry and does not publish to github', false)
|
|
56
|
+
.action(release);
|
|
20
57
|
let verdaccioChildProcess = undefined;
|
|
21
58
|
async function release(component, releaseType, customVersion, cliOptions) {
|
|
22
59
|
try {
|
|
23
60
|
logger_1.LOGGER.debug('Cli options:', cliOptions);
|
|
24
|
-
(0, command_util_1.
|
|
61
|
+
(0, command_util_1.configureShell)({ silent: !cliOptions.verbose });
|
|
62
|
+
(0, logger_1.configureLogger)(cliOptions.verbose);
|
|
25
63
|
checkGHCli();
|
|
26
64
|
const version = deriveVersion(releaseType, customVersion);
|
|
27
65
|
const options = Object.assign(Object.assign({}, cliOptions), { component, releaseType, version });
|
|
@@ -33,19 +71,19 @@ async function release(component, releaseType, customVersion, cliOptions) {
|
|
|
33
71
|
(0, common_1.checkIfMavenVersionExists)('org.eclipse.glsp', 'org.eclipse.glsp.server', (0, common_1.asMvnVersion)(version));
|
|
34
72
|
return (0, release_java_server_1.releaseJavaServer)(options);
|
|
35
73
|
case 'server-node':
|
|
36
|
-
await (0, common_1.
|
|
74
|
+
await (0, common_1.checkIfNpmVersionIsNew)('@eclipse-glsp/server-node', version);
|
|
37
75
|
return (0, release_server_node_1.releaseServerNode)(options);
|
|
38
76
|
case 'client':
|
|
39
|
-
await (0, common_1.
|
|
77
|
+
await (0, common_1.checkIfNpmVersionIsNew)('@eclipse-glsp/client', version);
|
|
40
78
|
return (0, release_client_1.releaseClient)(options);
|
|
41
79
|
case 'theia-integration':
|
|
42
|
-
await (0, common_1.
|
|
80
|
+
await (0, common_1.checkIfNpmVersionIsNew)('@eclipse-glsp/theia-integration', version);
|
|
43
81
|
return (0, release_theia_integration_1.releaseTheiaIntegration)(options);
|
|
44
82
|
case 'vscode-integration':
|
|
45
|
-
await (0, common_1.
|
|
83
|
+
await (0, common_1.checkIfNpmVersionIsNew)('@eclipse-glsp/vscode-integration', version);
|
|
46
84
|
return (0, release_vscode_integration_1.releaseVscodeIntegration)(options);
|
|
47
85
|
case 'eclipse-integration':
|
|
48
|
-
await (0, common_1.
|
|
86
|
+
await (0, common_1.checkIfNpmVersionIsNew)('@eclipse-glsp/ide', version);
|
|
49
87
|
return (0, release_eclipse_integration_1.releaseEclipseIntegration)(options);
|
|
50
88
|
}
|
|
51
89
|
}
|
|
@@ -62,10 +100,27 @@ async function release(component, releaseType, customVersion, cliOptions) {
|
|
|
62
100
|
exports.release = release;
|
|
63
101
|
function checkGHCli() {
|
|
64
102
|
logger_1.LOGGER.debug('Verify that Github CLI is configured correctly');
|
|
65
|
-
if (!
|
|
103
|
+
if (!isGithubCLIAuthenticated()) {
|
|
66
104
|
throw new Error("Github CLI is not configured properly. No user is logged in for host 'github.com'");
|
|
67
105
|
}
|
|
68
106
|
}
|
|
107
|
+
function isGithubCLIAuthenticated() {
|
|
108
|
+
logger_1.LOGGER.debug('Verify that Github CLI is installed');
|
|
109
|
+
(0, command_util_1.fatalExec)('which gh', 'Github CLI is not installed!');
|
|
110
|
+
const status = sh.exec('gh auth status', (0, command_util_1.getShellConfig)());
|
|
111
|
+
if (status.code !== 0) {
|
|
112
|
+
if (status.stderr.includes('You are not logged into any GitHub hosts')) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
throw new Error(status.stderr);
|
|
116
|
+
}
|
|
117
|
+
if (!status.stderr.trim().includes('Logged in to github.com')) {
|
|
118
|
+
logger_1.LOGGER.debug("No user is logged in for host 'github.com'");
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
logger_1.LOGGER.debug('Github CLI is authenticated and ready to use');
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
69
124
|
function launchVerdaccio() {
|
|
70
125
|
logger_1.LOGGER.debug('Verify that verdaccio is installed and start if necessary');
|
|
71
126
|
(0, command_util_1.fatalExec)('which verdaccio', 'Verdaccio is not installed!');
|
|
@@ -84,9 +139,9 @@ function launchVerdaccio() {
|
|
|
84
139
|
}
|
|
85
140
|
return Promise.resolve();
|
|
86
141
|
}
|
|
87
|
-
function deriveVersion(
|
|
142
|
+
function deriveVersion(releaseType, customVersion) {
|
|
88
143
|
logger_1.LOGGER.debug(`Derive version from release type: ${release}`);
|
|
89
|
-
switch (
|
|
144
|
+
switch (releaseType) {
|
|
90
145
|
case 'custom':
|
|
91
146
|
return getCustomVersion(customVersion);
|
|
92
147
|
case 'rc':
|
|
@@ -94,7 +149,7 @@ function deriveVersion(release, customVersion) {
|
|
|
94
149
|
case 'patch':
|
|
95
150
|
case 'major':
|
|
96
151
|
case 'minor':
|
|
97
|
-
return semverInc(
|
|
152
|
+
return semverInc(releaseType);
|
|
98
153
|
}
|
|
99
154
|
}
|
|
100
155
|
const REFERENCE_NPM_PACKAGE = '@eclipse-glsp/ide';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../../src/commands/release/release.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,yCAAqC;AACrC,qCAA+B;AAC/B,uCAA2C;AAC3C,wDAA0C;AAC1C,+CAAiC;AACjC,4CAA8B;AAC9B,0DAAiG;AACjG,8CAA4D;AAC5D,gEAAgF;AAChF,qCAQkB;AAClB,qDAAiD;AACjD,+EAA0E;AAC1E,+DAA0D;AAC1D,+DAA0D;AAC1D,2EAAsE;AACtE,6EAAwE;AAY3D,QAAA,cAAc,GAAG,IAAA,0BAAW,GAAE;KACtC,IAAI,CAAC,SAAS,CAAC;KACf,WAAW,CAAC,sDAAsD,CAAC;KACnE,WAAW,CAAC,IAAI,oBAAQ,CAAC,aAAa,EAAE,mCAAmC,CAAC,CAAC,OAAO,CAAC,kBAAS,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,kBAAS,CAAC,KAAK,CAAC,CAAC;KACvI,WAAW,CAAC,IAAI,oBAAQ,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,OAAO,CAAC,oBAAW,CAAC,WAAW,CAAC,CAAC;KAC/F,QAAQ,CAAC,iBAAiB,EAAE,4EAA4E,EAAE,iCAAe,CAAC;KAC1H,MAAM,CAAC,aAAa,EAAE,mBAAmB,EAAE,KAAK,CAAC;KACjD,MAAM,CAAC,iCAAiC,EAAE,4BAA4B,EAAE,mCAAiB,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;KACzG,MAAM,CAAC,uBAAuB,EAAE,4BAA4B,EAAE,QAAQ,CAAC;KACvE,MAAM,CAAC,eAAe,EAAE,mCAAmC,EAAE,KAAK,CAAC;KACnE,MAAM,CAAC,cAAc,EAAE,mDAAmD,EAAE,IAAI,CAAC;KAC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rD,eAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,+CAA+C,aAAa,EAAE,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC;IACjI,MAAM,OAAO,GAAG,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,QAAQ,CAAC,QAAQ,CAAC,gCAAgC,CAAC,CAAC;IACrF,OAAO,IAAA,iCAAe,EAAC,OAAO,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,iBAAiB;IACtB,eAAM,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;IAC9F,MAAM,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,qBAAqB,mBAAmB,EAAE,IAAA,6BAAc,GAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9G,OAAO,IAAA,iCAAe,EAAC,OAAO,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,WAA+B,EAAE,UAAmB;IACnE,MAAM,cAAc,GAAG,iBAAiB,EAAE,CAAC;IAC3C,eAAM,CAAC,KAAK,CAAC,wBAAwB,cAAc,MAAM,WAAW,KAAK,UAAU,GAAG,CAAC,CAAC;IACxF,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IACvE,IAAI,CAAC,UAAU,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,gCAAgC,cAAc,GAAG,CAAC,CAAC;KACtE;IACD,OAAO,UAAU,CAAC;AACtB,CAAC"}
|
|
@@ -15,17 +15,12 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Command } from 'commander';
|
|
17
17
|
import * as sh from 'shelljs';
|
|
18
|
-
export declare
|
|
19
|
-
export
|
|
20
|
-
export interface BaseCmdOptions {
|
|
21
|
-
verbose: boolean;
|
|
22
|
-
}
|
|
23
|
-
export declare const SH_CONFIG: sh.ExecOptions & {
|
|
18
|
+
export declare function baseCommand(cmd?: Command): Command;
|
|
19
|
+
export type ShellConfig = sh.ExecOptions & {
|
|
24
20
|
async: false;
|
|
25
21
|
};
|
|
26
|
-
export declare
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export declare function
|
|
30
|
-
export declare function fatalExec(command: string, fatalErrorMessage: string, options?: Partial<Omit<sh.ExecOptions, 'async'>>): sh.ShellString;
|
|
22
|
+
export declare const SH_CONFIG: ShellConfig;
|
|
23
|
+
export declare function getShellConfig(options?: Partial<Omit<ShellConfig, 'async'>>): ShellConfig;
|
|
24
|
+
export declare function configureShell(config: Partial<sh.ShellConfig>): void;
|
|
25
|
+
export declare function fatalExec(command: string, fatalErrorMessage: string, options?: Partial<Omit<ShellConfig, 'async'>>): sh.ShellString;
|
|
31
26
|
//# sourceMappingURL=command-util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-util.d.ts","sourceRoot":"","sources":["../../src/util/command-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"command-util.d.ts","sourceRoot":"","sources":["../../src/util/command-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAG9B,wBAAgB,WAAW,CAAC,GAAG,UAAgB,GAAG,OAAO,CAKxD;AAED,MAAM,MAAM,WAAW,GAAG,EAAE,CAAC,WAAW,GAAG;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAC5D,eAAO,MAAM,SAAS,EAAE,WAIvB,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,GAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAM,GAAG,WAAW,CAK7F;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,IAAI,CAKpE;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAM,GAAG,EAAE,CAAC,WAAW,CAMvI"}
|
package/lib/util/command-util.js
CHANGED
|
@@ -1,17 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fatalExec = exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
26
|
+
exports.fatalExec = exports.configureShell = exports.getShellConfig = exports.SH_CONFIG = exports.baseCommand = void 0;
|
|
27
|
+
/********************************************************************************
|
|
28
|
+
* Copyright (c) 2022 EclipseSource and others.
|
|
29
|
+
*
|
|
30
|
+
* This program and the accompanying materials are made available under the
|
|
31
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
32
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
33
|
+
*
|
|
34
|
+
* This Source Code may also be made available under the following Secondary
|
|
35
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
36
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
37
|
+
* with the GNU Classpath Exception which is available at
|
|
38
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
39
|
+
*
|
|
40
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
41
|
+
********************************************************************************/
|
|
42
|
+
const commander_1 = require("commander");
|
|
43
|
+
const sh = __importStar(require("shelljs"));
|
|
44
|
+
// Commander.js utils
|
|
45
|
+
function baseCommand(cmd = new commander_1.Command()) {
|
|
46
|
+
return cmd //
|
|
10
47
|
.showSuggestionAfterError(true)
|
|
11
48
|
.showHelpAfterError(true)
|
|
12
49
|
.allowUnknownOption(false);
|
|
13
50
|
}
|
|
14
|
-
exports.
|
|
51
|
+
exports.baseCommand = baseCommand;
|
|
15
52
|
exports.SH_CONFIG = {
|
|
16
53
|
async: false,
|
|
17
54
|
fatal: true,
|
|
@@ -21,12 +58,13 @@ function getShellConfig(options = {}) {
|
|
|
21
58
|
return Object.assign(Object.assign({}, exports.SH_CONFIG), options);
|
|
22
59
|
}
|
|
23
60
|
exports.getShellConfig = getShellConfig;
|
|
24
|
-
function
|
|
61
|
+
function configureShell(config) {
|
|
25
62
|
sh.config.reset();
|
|
26
|
-
|
|
27
|
-
|
|
63
|
+
getShellConfig({});
|
|
64
|
+
exports.SH_CONFIG.silent = config.silent;
|
|
65
|
+
exports.SH_CONFIG.fatal = config.fatal;
|
|
28
66
|
}
|
|
29
|
-
exports.
|
|
67
|
+
exports.configureShell = configureShell;
|
|
30
68
|
function fatalExec(command, fatalErrorMessage, options = {}) {
|
|
31
69
|
const result = sh.exec(command, getShellConfig(options));
|
|
32
70
|
if (result.code !== 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-util.js","sourceRoot":"","sources":["../../src/util/command-util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-util.js","sourceRoot":"","sources":["../../src/util/command-util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAAoC;AACpC,4CAA8B;AAE9B,qBAAqB;AACrB,SAAgB,WAAW,CAAC,GAAG,GAAG,IAAI,mBAAO,EAAE;IAC3C,OAAO,GAAG,CAAC,EAAE;SACR,wBAAwB,CAAC,IAAI,CAAC;SAC9B,kBAAkB,CAAC,IAAI,CAAC;SACxB,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AALD,kCAKC;AAGY,QAAA,SAAS,GAAgB;IAClC,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,KAAK;CAChB,CAAC;AAEF,SAAgB,cAAc,CAAC,UAA+C,EAAE;IAC5E,uCACO,iBAAS,GACT,OAAO,EACZ;AACN,CAAC;AALD,wCAKC;AAED,SAAgB,cAAc,CAAC,MAA+B;IAC1D,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,CAAC,CAAC;IACnB,iBAAS,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,iBAAS,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AACnC,CAAC;AALD,wCAKC;AAED,SAAgB,SAAS,CAAC,OAAe,EAAE,iBAAyB,EAAE,UAA+C,EAAE;IACnH,MAAM,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACtC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAND,8BAMC"}
|
package/lib/util/git-util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2022-2022 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,10 +13,49 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
16
|
+
export declare function isGitRepository(path?: string): boolean;
|
|
17
|
+
export declare function getGitRoot(path?: string): string;
|
|
18
18
|
export declare function hasGitChanges(path?: string): boolean;
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Returns the files that have uncommitted changes (staged, not staged and untracked) of a git repository.
|
|
21
|
+
* Filepaths are absolute.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getUncommittedChanges(path?: string): string[];
|
|
24
|
+
/**
|
|
25
|
+
* Returns the files tha have been changed with the last commit (also includes currently staged but uncommitted changes)
|
|
26
|
+
* Filepaths are absolute.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getChangesOfLastCommit(path?: string): string[];
|
|
29
|
+
/**
|
|
30
|
+
* Returns the last modification date of a file (or the last commit) in a git repo.
|
|
31
|
+
* @param filePath The file. If undefined the modification date of the last commit will be returned
|
|
32
|
+
* @param repoRoot The path to the repo root. If undefined the current working directory is used.
|
|
33
|
+
* @param excludeMessage Only consider commits that don`t match the excludeMessage
|
|
34
|
+
* @returns The date or undefined if the file is outside of the git repo.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getLastModificationDate(filePath?: string, repoRoot?: string, excludeMessage?: string): Date | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the last modification date of a file in a git repo.
|
|
39
|
+
* @param filePath The file
|
|
40
|
+
* @param repoRoot The path to the repo root. If undefined the current working directory is used.
|
|
41
|
+
* @param excludeMessage Only consider commits that don`t match the excludeMessage
|
|
42
|
+
* @returns The date or undefined if the file is outside of the git repo.
|
|
43
|
+
*/
|
|
44
|
+
export declare function getFirstModificationDate(filePath: string, repoRoot?: string, excludeMessage?: string): Date | undefined;
|
|
45
|
+
export declare function getFilesOfCommit(commitHash: string, repoRoot?: string): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Returns the commit hash of the initial commit of the given repository
|
|
48
|
+
* @param repoRoot The path to the repo root. If undefined the current working directory is used.
|
|
49
|
+
* @returns The commit hash or undefined if something went wrong.
|
|
50
|
+
*/
|
|
51
|
+
export declare function getInitialCommit(repoRoot?: string): string | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the commit hash of the first commit for a given file (across renames).
|
|
54
|
+
* @param repoRoot The path to the repo root. If undefined the current working directory is used.
|
|
55
|
+
* @returns The commit hash or undefined if something went wrong.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getFirstCommit(filePath: string, repoRoot?: string): string | undefined;
|
|
58
|
+
export declare function getLatestGithubRelease(path?: string): string;
|
|
20
59
|
export declare function getLatestTag(path?: string): string;
|
|
21
60
|
export declare function hasBranch(branch: string, path?: string): boolean;
|
|
22
61
|
export declare function getRemoteUrl(path?: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-util.d.ts","sourceRoot":"","sources":["../../src/util/git-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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