@eclipse-glsp/cli 2.3.0-next.172 → 2.3.0
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/lib/commands/check-header.js +10 -20
- package/lib/commands/check-header.js.map +1 -1
- package/lib/commands/checkout.d.ts +27 -0
- package/lib/commands/checkout.d.ts.map +1 -0
- package/lib/commands/checkout.js +41 -0
- package/lib/commands/checkout.js.map +1 -0
- package/lib/commands/coverage-report.js +11 -21
- package/lib/commands/coverage-report.js.map +1 -1
- package/lib/commands/generate-index.js +20 -30
- package/lib/commands/generate-index.js.map +1 -1
- package/lib/commands/release/common.js +21 -31
- package/lib/commands/release/common.js.map +1 -1
- package/lib/commands/release/release-client.js +2 -1
- package/lib/commands/release/release-client.js.map +1 -1
- package/lib/commands/release/release-eclipse-integration.js +2 -1
- package/lib/commands/release/release-eclipse-integration.js.map +1 -1
- package/lib/commands/release/release-java-server.js +2 -1
- package/lib/commands/release/release-java-server.js.map +1 -1
- package/lib/commands/release/release-server-node.js +2 -1
- package/lib/commands/release/release-server-node.js.map +1 -1
- package/lib/commands/release/release-theia-integration.js +2 -1
- package/lib/commands/release/release-theia-integration.js.map +1 -1
- package/lib/commands/release/release-vscode-integration.js +2 -1
- package/lib/commands/release/release-vscode-integration.js.map +1 -1
- package/lib/commands/release/release.js +9 -19
- package/lib/commands/release/release.js.map +1 -1
- package/lib/commands/repo/clone.d.ts +28 -0
- package/lib/commands/repo/clone.d.ts.map +1 -0
- package/lib/commands/repo/clone.js +113 -0
- package/lib/commands/repo/clone.js.map +1 -0
- package/lib/commands/repo/clone.spec.d.ts +17 -0
- package/lib/commands/repo/clone.spec.d.ts.map +1 -0
- package/lib/commands/repo/clone.spec.js +126 -0
- package/lib/commands/repo/clone.spec.js.map +1 -0
- package/lib/commands/repo/common.d.ts +23 -0
- package/lib/commands/repo/common.d.ts.map +1 -0
- package/lib/commands/repo/common.js +18 -0
- package/lib/commands/repo/common.js.map +1 -0
- package/lib/commands/repo/config.d.ts +18 -0
- package/lib/commands/repo/config.d.ts.map +1 -0
- package/lib/commands/repo/config.js +28 -0
- package/lib/commands/repo/config.js.map +1 -0
- package/lib/commands/repo/repo.d.ts +17 -0
- package/lib/commands/repo/repo.d.ts.map +1 -0
- package/lib/commands/repo/repo.js +25 -0
- package/lib/commands/repo/repo.js.map +1 -0
- package/lib/commands/update-next.js +9 -19
- package/lib/commands/update-next.js.map +1 -1
- package/lib/common/glsp-component.d.ts +27 -0
- package/lib/common/glsp-component.d.ts.map +1 -0
- package/lib/common/glsp-component.js +13 -0
- package/lib/common/glsp-component.js.map +1 -0
- package/lib/common/glsp-repo.d.ts +44 -0
- package/lib/common/glsp-repo.d.ts.map +1 -0
- package/lib/common/glsp-repo.js +135 -0
- package/lib/common/glsp-repo.js.map +1 -0
- package/lib/common/glsp-repo.spec.d.ts +17 -0
- package/lib/common/glsp-repo.spec.d.ts.map +1 -0
- package/lib/common/glsp-repo.spec.js +130 -0
- package/lib/common/glsp-repo.spec.js.map +1 -0
- package/lib/foo.spec.d.ts +17 -0
- package/lib/foo.spec.d.ts.map +1 -0
- package/lib/foo.spec.js +23 -0
- package/lib/foo.spec.js.map +1 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/lib/util/command-util.js +5 -5
- package/lib/util/command-util.js.map +1 -1
- package/lib/util/git-util.js +12 -11
- package/lib/util/git-util.js.map +1 -1
- package/lib/util/logger.js +2 -2
- package/lib/util/logger.js.map +1 -1
- package/lib/util/test-util.spec.d.ts +2 -0
- package/lib/util/test-util.spec.d.ts.map +1 -0
- package/lib/util/test-util.spec.js +44 -0
- package/lib/util/test-util.spec.js.map +1 -0
- package/lib/util/validation-util.js +12 -21
- package/lib/util/validation-util.js.map +1 -1
- package/package.json +3 -3
package/lib/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF"}
|
package/lib/util/command-util.js
CHANGED
|
@@ -3,11 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SH_CONFIG = void 0;
|
|
7
|
-
exports.baseCommand = baseCommand;
|
|
8
|
-
exports.getShellConfig = getShellConfig;
|
|
9
|
-
exports.configureShell = configureShell;
|
|
10
|
-
exports.fatalExec = fatalExec;
|
|
6
|
+
exports.fatalExec = exports.configureShell = exports.getShellConfig = exports.SH_CONFIG = exports.baseCommand = void 0;
|
|
11
7
|
/********************************************************************************
|
|
12
8
|
* Copyright (c) 2022-2024 EclipseSource and others.
|
|
13
9
|
*
|
|
@@ -32,6 +28,7 @@ function baseCommand(cmd = new commander_1.Command()) {
|
|
|
32
28
|
.showHelpAfterError(true)
|
|
33
29
|
.allowUnknownOption(false);
|
|
34
30
|
}
|
|
31
|
+
exports.baseCommand = baseCommand;
|
|
35
32
|
exports.SH_CONFIG = {
|
|
36
33
|
async: false,
|
|
37
34
|
fatal: true,
|
|
@@ -43,12 +40,14 @@ function getShellConfig(options = {}) {
|
|
|
43
40
|
...options
|
|
44
41
|
};
|
|
45
42
|
}
|
|
43
|
+
exports.getShellConfig = getShellConfig;
|
|
46
44
|
function configureShell(config) {
|
|
47
45
|
shelljs_1.default.config.reset();
|
|
48
46
|
getShellConfig({});
|
|
49
47
|
exports.SH_CONFIG.silent = config.silent;
|
|
50
48
|
exports.SH_CONFIG.fatal = config.fatal;
|
|
51
49
|
}
|
|
50
|
+
exports.configureShell = configureShell;
|
|
52
51
|
function fatalExec(command, fatalErrorMessage, options = {}) {
|
|
53
52
|
const result = shelljs_1.default.exec(command, getShellConfig(options));
|
|
54
53
|
if (result.code !== 0) {
|
|
@@ -56,4 +55,5 @@ function fatalExec(command, fatalErrorMessage, options = {}) {
|
|
|
56
55
|
}
|
|
57
56
|
return result;
|
|
58
57
|
}
|
|
58
|
+
exports.fatalExec = fatalExec;
|
|
59
59
|
//# sourceMappingURL=command-util.js.map
|
|
@@ -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,sDAAyB;AAEzB,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,OAAO;QACH,GAAG,iBAAS;QACZ,GAAG,OAAO;KACb,CAAC;AACN,CAAC;AALD,wCAKC;AAED,SAAgB,cAAc,CAAC,MAA+B;IAC1D,iBAAE,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,iBAAE,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACzD,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAND,8BAMC"}
|
package/lib/util/git-util.js
CHANGED
|
@@ -18,17 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.isGitRepository =
|
|
22
|
-
exports.getGitRoot = getGitRoot;
|
|
23
|
-
exports.hasGitChanges = hasGitChanges;
|
|
24
|
-
exports.getUncommittedChanges = getUncommittedChanges;
|
|
25
|
-
exports.getChangesOfLastCommit = getChangesOfLastCommit;
|
|
26
|
-
exports.getLastModificationDate = getLastModificationDate;
|
|
27
|
-
exports.getFilesOfCommit = getFilesOfCommit;
|
|
28
|
-
exports.getLatestGithubRelease = getLatestGithubRelease;
|
|
29
|
-
exports.getLatestTag = getLatestTag;
|
|
30
|
-
exports.hasBranch = hasBranch;
|
|
31
|
-
exports.getRemoteUrl = getRemoteUrl;
|
|
21
|
+
exports.getRemoteUrl = exports.hasBranch = exports.getLatestTag = exports.getLatestGithubRelease = exports.getFilesOfCommit = exports.getLastModificationDate = exports.getChangesOfLastCommit = exports.getUncommittedChanges = exports.hasGitChanges = exports.getGitRoot = exports.isGitRepository = void 0;
|
|
32
22
|
const path_1 = require("path");
|
|
33
23
|
const shelljs_1 = __importDefault(require("shelljs"));
|
|
34
24
|
const command_util_1 = require("./command-util");
|
|
@@ -40,14 +30,17 @@ function isGitRepository(path) {
|
|
|
40
30
|
.toLocaleLowerCase() === 'true';
|
|
41
31
|
return isGitRepo;
|
|
42
32
|
}
|
|
33
|
+
exports.isGitRepository = isGitRepository;
|
|
43
34
|
function getGitRoot(path) {
|
|
44
35
|
cdIfPresent(path);
|
|
45
36
|
const fileString = shelljs_1.default.exec('git rev-parse --show-toplevel', (0, command_util_1.getShellConfig)()).stdout.trim();
|
|
46
37
|
return (0, path_1.resolve)(fileString);
|
|
47
38
|
}
|
|
39
|
+
exports.getGitRoot = getGitRoot;
|
|
48
40
|
function hasGitChanges(path) {
|
|
49
41
|
return getUncommittedChanges(path).length > 0;
|
|
50
42
|
}
|
|
43
|
+
exports.hasGitChanges = hasGitChanges;
|
|
51
44
|
/**
|
|
52
45
|
* Returns the files that have uncommitted changes (staged, not staged and untracked) of a git repository.
|
|
53
46
|
* Filepaths are absolute.
|
|
@@ -63,6 +56,7 @@ function getUncommittedChanges(path) {
|
|
|
63
56
|
// Extract relative file path from the info string and convert to absolute path
|
|
64
57
|
return (0, path_1.resolve)(path !== null && path !== void 0 ? path : process.cwd(), (_a = fileInfo.trim().split(' ').pop()) !== null && _a !== void 0 ? _a : ''); });
|
|
65
58
|
}
|
|
59
|
+
exports.getUncommittedChanges = getUncommittedChanges;
|
|
66
60
|
/**
|
|
67
61
|
* Returns the files tha have been changed with the last commit (also includes currently staged but uncommitted changes)
|
|
68
62
|
* Filepaths are absolute.
|
|
@@ -75,6 +69,7 @@ function getChangesOfLastCommit(path) {
|
|
|
75
69
|
.split('\n')
|
|
76
70
|
.map(file => (0, path_1.resolve)(path !== null && path !== void 0 ? path : process.cwd(), file));
|
|
77
71
|
}
|
|
72
|
+
exports.getChangesOfLastCommit = getChangesOfLastCommit;
|
|
78
73
|
/**
|
|
79
74
|
* Returns the last modification date of a file (or the last commit) in a git repo.
|
|
80
75
|
* @param filePath The file. If undefined the modification date of the last commit will be returned
|
|
@@ -91,6 +86,7 @@ function getLastModificationDate(filePath, repoRoot, excludeMessage) {
|
|
|
91
86
|
}
|
|
92
87
|
return new Date(result.stdout.trim());
|
|
93
88
|
}
|
|
89
|
+
exports.getLastModificationDate = getLastModificationDate;
|
|
94
90
|
function getFilesOfCommit(commitHash, repoRoot) {
|
|
95
91
|
cdIfPresent(repoRoot);
|
|
96
92
|
const result = shelljs_1.default.exec(`git show --pretty="" --name-only ${commitHash}`, (0, command_util_1.getShellConfig)());
|
|
@@ -99,23 +95,28 @@ function getFilesOfCommit(commitHash, repoRoot) {
|
|
|
99
95
|
}
|
|
100
96
|
return result.stdout.trim().split('\n');
|
|
101
97
|
}
|
|
98
|
+
exports.getFilesOfCommit = getFilesOfCommit;
|
|
102
99
|
function getLatestGithubRelease(path) {
|
|
103
100
|
cdIfPresent(path);
|
|
104
101
|
const release = shelljs_1.default.exec('gh release list --exclude-drafts -L 1', (0, command_util_1.getShellConfig)()).stdout.trim().split('\t');
|
|
105
102
|
return release[release.length - 2];
|
|
106
103
|
}
|
|
104
|
+
exports.getLatestGithubRelease = getLatestGithubRelease;
|
|
107
105
|
function getLatestTag(path) {
|
|
108
106
|
cdIfPresent(path);
|
|
109
107
|
return shelljs_1.default.exec('git describe --abbrev=0 --tags', (0, command_util_1.getShellConfig)()).stdout.trim();
|
|
110
108
|
}
|
|
109
|
+
exports.getLatestTag = getLatestTag;
|
|
111
110
|
function hasBranch(branch, path) {
|
|
112
111
|
cdIfPresent(path);
|
|
113
112
|
return shelljs_1.default.exec(`git branch --list ${branch}`, (0, command_util_1.getShellConfig)()).stdout.trim().length !== 0;
|
|
114
113
|
}
|
|
114
|
+
exports.hasBranch = hasBranch;
|
|
115
115
|
function getRemoteUrl(path) {
|
|
116
116
|
cdIfPresent(path);
|
|
117
117
|
return shelljs_1.default.exec('git config --get remote.origin.url', (0, command_util_1.getShellConfig)()).stdout.trim();
|
|
118
118
|
}
|
|
119
|
+
exports.getRemoteUrl = getRemoteUrl;
|
|
119
120
|
function cdIfPresent(path) {
|
|
120
121
|
if (path) {
|
|
121
122
|
shelljs_1.default.cd(path);
|
package/lib/util/git-util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-util.js","sourceRoot":"","sources":["../../src/util/git-util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"git-util.js","sourceRoot":"","sources":["../../src/util/git-util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;AAElF,+BAA+B;AAC/B,sDAAyB;AACzB,iDAAgD;AAEhD,SAAgB,eAAe,CAAC,IAAa;IACzC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClB,MAAM,SAAS,GACX,iBAAE;SACG,IAAI,CAAC,qCAAqC,EAAE,IAAA,6BAAc,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;SAC7E,MAAM,CAAC,IAAI,EAAE;SACb,iBAAiB,EAAE,KAAK,MAAM,CAAC;IACxC,OAAO,SAAS,CAAC;AACrB,CAAC;AARD,0CAQC;AAED,SAAgB,UAAU,CAAC,IAAa;IACpC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClB,MAAM,UAAU,GAAG,iBA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C,IAAI,CAAC,CAAC;IAC7G,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACvC,CAAC;AAJD,wDAIC;AAED,SAAgB,YAAY,CAAC,IAAa;IACtC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,iBAAE,CAAC,IAAI,CAAC,gCAAgC,EAAE,IAAA,6BAAc,GAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AACrF,CAAC;AAHD,oCAGC;AAED,SAAgB,SAAS,CAAC,MAAc,EAAE,IAAa;IACnD,WAAW,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,iBAAE,CAAC,IAAI,CAAC,qBAAqB,MAAM,EAAE,EAAE,IAAA,6BAAc,GAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AAC/F,CAAC;AAHD,8BAGC;AAED,SAAgB,YAAY,CAAC,IAAa;IACtC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,iBAAE,CAAC,IAAI,CAAC,oCAAoC,EAAE,IAAA,6BAAc,GAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AACzF,CAAC;AAHD,oCAGC;AAED,SAAS,WAAW,CAAC,IAAa;IAC9B,IAAI,IAAI,EAAE,CAAC;QACP,iBAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;AACL,CAAC"}
|
package/lib/util/logger.js
CHANGED
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.LOGGER = void 0;
|
|
19
|
-
exports.configureLogger = configureLogger;
|
|
18
|
+
exports.configureLogger = exports.LOGGER = void 0;
|
|
20
19
|
const levels = {
|
|
21
20
|
error: { threshold: 0, color: '\x1b[31m' }, // red
|
|
22
21
|
warn: { threshold: 1, color: '\x1b[33m' }, // yellow
|
|
@@ -47,4 +46,5 @@ function configureLogger(levelOrVerbose) {
|
|
|
47
46
|
levelThreshold = levels[levelOrVerbose].threshold;
|
|
48
47
|
}
|
|
49
48
|
}
|
|
49
|
+
exports.configureLogger = configureLogger;
|
|
50
50
|
//# sourceMappingURL=logger.js.map
|
package/lib/util/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAQlF,MAAM,MAAM,GAA2D;IACnE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,MAAM;IAClD,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,SAAS;IACpD,IAAI,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,yBAAyB;IACnE,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,QAAQ;CACtD,CAAC;AAEF,IAAI,cAAc,GAAW,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;AAEtC,QAAA,MAAM,GAAW;IAC1B,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;IACvC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;IACzC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;IACvC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;IACzC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;CACxB,CAAC;AAEX,SAAS,GAAG,CAAC,KAAe,EAAE,GAAG,IAAW;IACxC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,cAAc,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC;QACvC,OAAO;IACX,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,IAAI,EAAE,SAAS,CAAC,CAAC;AACxD,CAAC;AAID,SAAgB,eAAe,CAAC,cAAkC;IAC9D,IAAI,OAAO,cAAc,KAAK,SAAS,EAAE,CAAC;QACtC,MAAM,KAAK,GAAa,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QAC1D,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC;IAC7C,CAAC;SAAM,CAAC;QACJ,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC;IACtD,CAAC;AACL,CAAC;AAPD,0CAOC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-util.spec.d.ts","sourceRoot":"","sources":["../../src/util/test-util.spec.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,kBAAkB,QAAwD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.TEST_RESOURCE_PATH = void 0;
|
|
27
|
+
/********************************************************************************
|
|
28
|
+
* Copyright (c) 2024 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 path = __importStar(require("path"));
|
|
43
|
+
exports.TEST_RESOURCE_PATH = path.resolve(__dirname, '..', '..', 'test-resources');
|
|
44
|
+
//# sourceMappingURL=test-util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-util.spec.js","sourceRoot":"","sources":["../../src/util/test-util.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,2CAA6B;AAEhB,QAAA,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC"}
|
|
@@ -15,28 +15,15 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
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
|
+
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.validateDirectory =
|
|
37
|
-
exports.validateFile = validateFile;
|
|
38
|
-
exports.validateVersion = validateVersion;
|
|
39
|
-
exports.validateGitDirectory = validateGitDirectory;
|
|
26
|
+
exports.validateGitDirectory = exports.validateVersion = exports.validateFile = exports.validateDirectory = void 0;
|
|
40
27
|
/********************************************************************************
|
|
41
28
|
* Copyright (c) 2022-2024 EclipseSource and others.
|
|
42
29
|
*
|
|
@@ -68,6 +55,7 @@ function validateDirectory(rootDir) {
|
|
|
68
55
|
}
|
|
69
56
|
return path;
|
|
70
57
|
}
|
|
58
|
+
exports.validateDirectory = validateDirectory;
|
|
71
59
|
function validateFile(filePath, hasToExist = false) {
|
|
72
60
|
const path = (0, path_1.resolve)(filePath);
|
|
73
61
|
if (hasToExist && !fs.existsSync(path)) {
|
|
@@ -78,6 +66,7 @@ function validateFile(filePath, hasToExist = false) {
|
|
|
78
66
|
}
|
|
79
67
|
return path;
|
|
80
68
|
}
|
|
69
|
+
exports.validateFile = validateFile;
|
|
81
70
|
function validateVersion(version) {
|
|
82
71
|
logger_1.LOGGER.debug(`Validate version format of: ${version}`);
|
|
83
72
|
if (!semver.valid(version)) {
|
|
@@ -85,6 +74,7 @@ function validateVersion(version) {
|
|
|
85
74
|
}
|
|
86
75
|
return version;
|
|
87
76
|
}
|
|
77
|
+
exports.validateVersion = validateVersion;
|
|
88
78
|
function validateGitDirectory(repository) {
|
|
89
79
|
const repoPath = validateDirectory(repository);
|
|
90
80
|
if (!(0, git_util_1.isGitRepository)(repoPath)) {
|
|
@@ -92,4 +82,5 @@ function validateGitDirectory(repository) {
|
|
|
92
82
|
}
|
|
93
83
|
return (0, git_util_1.getGitRoot)(repository);
|
|
94
84
|
}
|
|
85
|
+
exports.validateGitDirectory = validateGitDirectory;
|
|
95
86
|
//# sourceMappingURL=validation-util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-util.js","sourceRoot":"","sources":["../../src/util/validation-util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validation-util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AAE,CAAC;QACzB,MAAM,IAAI,gCAAoB,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAND,0CAMC;AAED,SAAgB,oBAAoB,CAAC,UAAkB;IACnD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC/C,IAAI,CAAC,IAAA,0BAAe,EAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,gCAAoB,CAAC,4BAA4B,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,IAAA,qBAAU,EAAC,UAAU,CAAC,CAAC;AAClC,CAAC;AAPD,oDAOC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/cli",
|
|
3
|
-
"version": "2.3.0
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "CLI Tooling & scripts for GLSP components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"shelljs": "^0.8.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@eclipse-glsp/config": "2.3.0
|
|
53
|
+
"@eclipse-glsp/config": "2.3.0",
|
|
54
54
|
"@types/glob": "^8.1.0",
|
|
55
55
|
"@types/node-fetch": "^2.6.6",
|
|
56
56
|
"@types/readline-sync": "^1.4.5",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "e431246446f7b2a97b8737655fd1ae79869e64ff"
|
|
64
64
|
}
|