@eclipse-glsp/cli 2.2.1 → 2.3.0-next.17

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 (138) hide show
  1. package/README.md +143 -38
  2. package/dist/cli.js +21959 -0
  3. package/dist/cli.js.map +6 -0
  4. package/package.json +22 -29
  5. package/bin/glsp +0 -2
  6. package/lib/app.d.ts +0 -3
  7. package/lib/app.d.ts.map +0 -1
  8. package/lib/app.js +0 -36
  9. package/lib/app.js.map +0 -1
  10. package/lib/commands/check-header.d.ts +0 -21
  11. package/lib/commands/check-header.d.ts.map +0 -1
  12. package/lib/commands/check-header.js +0 -240
  13. package/lib/commands/check-header.js.map +0 -1
  14. package/lib/commands/checkout.d.ts +0 -27
  15. package/lib/commands/checkout.d.ts.map +0 -1
  16. package/lib/commands/checkout.js +0 -41
  17. package/lib/commands/checkout.js.map +0 -1
  18. package/lib/commands/coverage-report.d.ts +0 -29
  19. package/lib/commands/coverage-report.d.ts.map +0 -1
  20. package/lib/commands/coverage-report.js +0 -126
  21. package/lib/commands/coverage-report.js.map +0 -1
  22. package/lib/commands/generate-index.d.ts +0 -46
  23. package/lib/commands/generate-index.d.ts.map +0 -1
  24. package/lib/commands/generate-index.js +0 -172
  25. package/lib/commands/generate-index.js.map +0 -1
  26. package/lib/commands/release/common.d.ts +0 -68
  27. package/lib/commands/release/common.d.ts.map +0 -1
  28. package/lib/commands/release/common.js +0 -293
  29. package/lib/commands/release/common.js.map +0 -1
  30. package/lib/commands/release/release-client.d.ts +0 -3
  31. package/lib/commands/release/release-client.d.ts.map +0 -1
  32. package/lib/commands/release/release-client.js +0 -57
  33. package/lib/commands/release/release-client.js.map +0 -1
  34. package/lib/commands/release/release-eclipse-integration.d.ts +0 -18
  35. package/lib/commands/release/release-eclipse-integration.d.ts.map +0 -1
  36. package/lib/commands/release/release-eclipse-integration.js +0 -92
  37. package/lib/commands/release/release-eclipse-integration.js.map +0 -1
  38. package/lib/commands/release/release-java-server.d.ts +0 -3
  39. package/lib/commands/release/release-java-server.d.ts.map +0 -1
  40. package/lib/commands/release/release-java-server.js +0 -70
  41. package/lib/commands/release/release-java-server.js.map +0 -1
  42. package/lib/commands/release/release-server-node.d.ts +0 -18
  43. package/lib/commands/release/release-server-node.d.ts.map +0 -1
  44. package/lib/commands/release/release-server-node.js +0 -53
  45. package/lib/commands/release/release-server-node.js.map +0 -1
  46. package/lib/commands/release/release-theia-integration.d.ts +0 -18
  47. package/lib/commands/release/release-theia-integration.d.ts.map +0 -1
  48. package/lib/commands/release/release-theia-integration.js +0 -53
  49. package/lib/commands/release/release-theia-integration.js.map +0 -1
  50. package/lib/commands/release/release-vscode-integration.d.ts +0 -18
  51. package/lib/commands/release/release-vscode-integration.d.ts.map +0 -1
  52. package/lib/commands/release/release-vscode-integration.js +0 -53
  53. package/lib/commands/release/release-vscode-integration.js.map +0 -1
  54. package/lib/commands/release/release.d.ts +0 -14
  55. package/lib/commands/release/release.d.ts.map +0 -1
  56. package/lib/commands/release/release.js +0 -191
  57. package/lib/commands/release/release.js.map +0 -1
  58. package/lib/commands/repo/clone.d.ts +0 -28
  59. package/lib/commands/repo/clone.d.ts.map +0 -1
  60. package/lib/commands/repo/clone.js +0 -113
  61. package/lib/commands/repo/clone.js.map +0 -1
  62. package/lib/commands/repo/clone.spec.d.ts +0 -17
  63. package/lib/commands/repo/clone.spec.d.ts.map +0 -1
  64. package/lib/commands/repo/clone.spec.js +0 -126
  65. package/lib/commands/repo/clone.spec.js.map +0 -1
  66. package/lib/commands/repo/common.d.ts +0 -23
  67. package/lib/commands/repo/common.d.ts.map +0 -1
  68. package/lib/commands/repo/common.js +0 -18
  69. package/lib/commands/repo/common.js.map +0 -1
  70. package/lib/commands/repo/config.d.ts +0 -18
  71. package/lib/commands/repo/config.d.ts.map +0 -1
  72. package/lib/commands/repo/config.js +0 -28
  73. package/lib/commands/repo/config.js.map +0 -1
  74. package/lib/commands/repo/repo.d.ts +0 -17
  75. package/lib/commands/repo/repo.d.ts.map +0 -1
  76. package/lib/commands/repo/repo.js +0 -25
  77. package/lib/commands/repo/repo.js.map +0 -1
  78. package/lib/commands/update-next.d.ts +0 -20
  79. package/lib/commands/update-next.d.ts.map +0 -1
  80. package/lib/commands/update-next.js +0 -146
  81. package/lib/commands/update-next.js.map +0 -1
  82. package/lib/common/glsp-component.d.ts +0 -27
  83. package/lib/common/glsp-component.d.ts.map +0 -1
  84. package/lib/common/glsp-component.js +0 -13
  85. package/lib/common/glsp-component.js.map +0 -1
  86. package/lib/common/glsp-repo.d.ts +0 -44
  87. package/lib/common/glsp-repo.d.ts.map +0 -1
  88. package/lib/common/glsp-repo.js +0 -135
  89. package/lib/common/glsp-repo.js.map +0 -1
  90. package/lib/common/glsp-repo.spec.d.ts +0 -17
  91. package/lib/common/glsp-repo.spec.d.ts.map +0 -1
  92. package/lib/common/glsp-repo.spec.js +0 -130
  93. package/lib/common/glsp-repo.spec.js.map +0 -1
  94. package/lib/foo.spec.d.ts +0 -17
  95. package/lib/foo.spec.d.ts.map +0 -1
  96. package/lib/foo.spec.js +0 -23
  97. package/lib/foo.spec.js.map +0 -1
  98. package/lib/index.d.ts +0 -18
  99. package/lib/index.d.ts.map +0 -1
  100. package/lib/index.js +0 -18
  101. package/lib/index.js.map +0 -1
  102. package/lib/util/command-util.d.ts +0 -26
  103. package/lib/util/command-util.d.ts.map +0 -1
  104. package/lib/util/command-util.js +0 -59
  105. package/lib/util/command-util.js.map +0 -1
  106. package/lib/util/git-util.d.ts +0 -42
  107. package/lib/util/git-util.d.ts.map +0 -1
  108. package/lib/util/git-util.js +0 -124
  109. package/lib/util/git-util.js.map +0 -1
  110. package/lib/util/logger.d.ts +0 -23
  111. package/lib/util/logger.d.ts.map +0 -1
  112. package/lib/util/logger.js +0 -50
  113. package/lib/util/logger.js.map +0 -1
  114. package/lib/util/test-util.spec.d.ts +0 -2
  115. package/lib/util/test-util.spec.d.ts.map +0 -1
  116. package/lib/util/test-util.spec.js +0 -44
  117. package/lib/util/test-util.spec.js.map +0 -1
  118. package/lib/util/validation-util.d.ts +0 -5
  119. package/lib/util/validation-util.d.ts.map +0 -1
  120. package/lib/util/validation-util.js +0 -85
  121. package/lib/util/validation-util.js.map +0 -1
  122. package/src/app.ts +0 -35
  123. package/src/commands/check-header.ts +0 -280
  124. package/src/commands/coverage-report.ts +0 -113
  125. package/src/commands/generate-index.ts +0 -169
  126. package/src/commands/release/common.ts +0 -306
  127. package/src/commands/release/release-client.ts +0 -55
  128. package/src/commands/release/release-eclipse-integration.ts +0 -113
  129. package/src/commands/release/release-java-server.ts +0 -73
  130. package/src/commands/release/release-server-node.ts +0 -61
  131. package/src/commands/release/release-theia-integration.ts +0 -65
  132. package/src/commands/release/release-vscode-integration.ts +0 -67
  133. package/src/commands/release/release.ts +0 -215
  134. package/src/commands/update-next.ts +0 -129
  135. package/src/util/command-util.ts +0 -54
  136. package/src/util/git-util.ts +0 -123
  137. package/src/util/logger.ts +0 -57
  138. package/src/util/validation-util.ts +0 -62
@@ -1,124 +0,0 @@
1
- "use strict";
2
- /********************************************************************************
3
- * Copyright (c) 2022-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
- var __importDefault = (this && this.__importDefault) || function (mod) {
18
- return (mod && mod.__esModule) ? mod : { "default": mod };
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.isGitRepository = 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;
32
- const path_1 = require("path");
33
- const shelljs_1 = __importDefault(require("shelljs"));
34
- const command_util_1 = require("./command-util");
35
- function isGitRepository(path) {
36
- cdIfPresent(path);
37
- const isGitRepo = shelljs_1.default
38
- .exec('git rev-parse --is-inside-work-tree', (0, command_util_1.getShellConfig)({ silent: true }))
39
- .stdout.trim()
40
- .toLocaleLowerCase() === 'true';
41
- return isGitRepo;
42
- }
43
- function getGitRoot(path) {
44
- cdIfPresent(path);
45
- const fileString = shelljs_1.default.exec('git rev-parse --show-toplevel', (0, command_util_1.getShellConfig)()).stdout.trim();
46
- return (0, path_1.resolve)(fileString);
47
- }
48
- function hasGitChanges(path) {
49
- return getUncommittedChanges(path).length > 0;
50
- }
51
- /**
52
- * Returns the files that have uncommitted changes (staged, not staged and untracked) of a git repository.
53
- * Filepaths are absolute.
54
- */
55
- function getUncommittedChanges(path) {
56
- cdIfPresent(path);
57
- return shelljs_1.default
58
- .exec('git status --porcelain', (0, command_util_1.getShellConfig)())
59
- .stdout.trim()
60
- .split('\n')
61
- .filter(value => value.trim().length !== 0)
62
- .map(fileInfo => { var _a;
63
- // Extract relative file path from the info string and convert to absolute path
64
- return (0, path_1.resolve)(path !== null && path !== void 0 ? path : process.cwd(), (_a = fileInfo.trim().split(' ').pop()) !== null && _a !== void 0 ? _a : ''); });
65
- }
66
- /**
67
- * Returns the files tha have been changed with the last commit (also includes currently staged but uncommitted changes)
68
- * Filepaths are absolute.
69
- */
70
- function getChangesOfLastCommit(path) {
71
- cdIfPresent(path);
72
- return shelljs_1.default
73
- .exec('git diff --name-only HEAD^', (0, command_util_1.getShellConfig)())
74
- .stdout.trim()
75
- .split('\n')
76
- .map(file => (0, path_1.resolve)(path !== null && path !== void 0 ? path : process.cwd(), file));
77
- }
78
- /**
79
- * Returns the last modification date of a file (or the last commit) in a git repo.
80
- * @param filePath The file. If undefined the modification date of the last commit will be returned
81
- * @param repoRoot The path to the repo root. If undefined the current working directory is used.
82
- * @param excludeMessage Only consider commits that don`t match the excludeMessage
83
- * @returns The date or undefined if the file is outside of the git repo.
84
- */
85
- function getLastModificationDate(filePath, repoRoot, excludeMessage) {
86
- cdIfPresent(repoRoot);
87
- const additionalArgs = excludeMessage ? `--grep="${excludeMessage}" --invert-grep` : '';
88
- const result = shelljs_1.default.exec(`git log -1 ${additionalArgs} --pretty="format:%ci" ${filePath !== null && filePath !== void 0 ? filePath : ''}`, (0, command_util_1.getShellConfig)());
89
- if (result.code !== 0) {
90
- return undefined;
91
- }
92
- return new Date(result.stdout.trim());
93
- }
94
- function getFilesOfCommit(commitHash, repoRoot) {
95
- cdIfPresent(repoRoot);
96
- const result = shelljs_1.default.exec(`git show --pretty="" --name-only ${commitHash}`, (0, command_util_1.getShellConfig)());
97
- if (result.code !== 0) {
98
- return [];
99
- }
100
- return result.stdout.trim().split('\n');
101
- }
102
- function getLatestGithubRelease(path) {
103
- cdIfPresent(path);
104
- const release = shelljs_1.default.exec('gh release list --exclude-drafts -L 1', (0, command_util_1.getShellConfig)()).stdout.trim().split('\t');
105
- return release[release.length - 2];
106
- }
107
- function getLatestTag(path) {
108
- cdIfPresent(path);
109
- return shelljs_1.default.exec('git describe --abbrev=0 --tags', (0, command_util_1.getShellConfig)()).stdout.trim();
110
- }
111
- function hasBranch(branch, path) {
112
- cdIfPresent(path);
113
- return shelljs_1.default.exec(`git branch --list ${branch}`, (0, command_util_1.getShellConfig)()).stdout.trim().length !== 0;
114
- }
115
- function getRemoteUrl(path) {
116
- cdIfPresent(path);
117
- return shelljs_1.default.exec('git config --get remote.origin.url', (0, command_util_1.getShellConfig)()).stdout.trim();
118
- }
119
- function cdIfPresent(path) {
120
- if (path) {
121
- shelljs_1.default.cd(path);
122
- }
123
- }
124
- //# sourceMappingURL=git-util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-util.js","sourceRoot":"","sources":["../../src/util/git-util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;AAMlF,0CAQC;AAED,gCAIC;AAED,sCAEC;AAMD,sDAWC;AAMD,wDAOC;AASD,0DAQC;AAED,4CAQC;AAED,wDAIC;AAED,oCAGC;AAED,8BAGC;AAED,oCAGC;AApGD,+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;AAED,SAAgB,UAAU,CAAC,IAAa;IACpC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClB,MAAM,UAAU,GAAG,iBAAE,CAAC,IAAI,CAAC,+BAA+B,EAAE,IAAA,6BAAc,GAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC5F,OAAO,IAAA,cAAO,EAAC,UAAU,CAAC,CAAC;AAC/B,CAAC;AAED,SAAgB,aAAa,CAAC,IAAa;IACvC,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,IAAa;IAC/C,WAAW,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,iBAAE;SACJ,IAAI,CAAC,wBAAwB,EAAE,IAAA,6BAAc,GAAE,CAAC;SAChD,MAAM,CAAC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,CAAC;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;AAED,SAAS,WAAW,CAAC,IAAa;IAC9B,IAAI,IAAI,EAAE,CAAC;QACP,iBAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;AACL,CAAC"}
@@ -1,23 +0,0 @@
1
- /********************************************************************************
2
- * Copyright (c) 2022-2023 EclipseSource and others.
3
- *
4
- * This program and the accompanying materials are made available under the
5
- * terms of the Eclipse Public License v. 2.0 which is available at
6
- * http://www.eclipse.org/legal/epl-2.0.
7
- *
8
- * This Source Code may also be made available under the following Secondary
9
- * Licenses when the conditions for such availability set forth in the Eclipse
10
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- * with the GNU Classpath Exception which is available at
12
- * https://www.gnu.org/software/classpath/license.html.
13
- *
14
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
- ********************************************************************************/
16
- export interface Logger extends Pick<Console, LogLevel> {
17
- newLine(): void;
18
- }
19
- export type LogLevel = 'info' | 'debug' | 'error' | 'warn';
20
- export declare const LOGGER: Logger;
21
- export declare function configureLogger(level: LogLevel): void;
22
- export declare function configureLogger(verbose: boolean): void;
23
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,MAAM,WAAW,MAAO,SAAQ,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC;IACnD,OAAO,IAAI,IAAI,CAAC;CACnB;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAW3D,eAAO,MAAM,MAAM,EAAE,MAMX,CAAC;AAUX,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;AACvD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- /********************************************************************************
3
- * Copyright (c) 2022-2023 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
- exports.LOGGER = void 0;
19
- exports.configureLogger = configureLogger;
20
- const levels = {
21
- error: { threshold: 0, color: '\x1b[31m' }, // red
22
- warn: { threshold: 1, color: '\x1b[33m' }, // yellow
23
- info: { threshold: 2, color: '\x1b[0m' }, // default terminal color
24
- debug: { threshold: 3, color: '\x1b[32m' } // green
25
- };
26
- let levelThreshold = levels.info.threshold;
27
- exports.LOGGER = {
28
- info: (...args) => log('info', ...args),
29
- error: (...args) => log('error', ...args),
30
- warn: (...args) => log('warn', ...args),
31
- debug: (...args) => log('debug', ...args),
32
- newLine: () => console.log('')
33
- };
34
- function log(level, ...args) {
35
- const levelData = levels[level];
36
- if (levelThreshold < levelData.threshold) {
37
- return;
38
- }
39
- console[level](levelData.color, ...args, '\x1b[0m');
40
- }
41
- function configureLogger(levelOrVerbose) {
42
- if (typeof levelOrVerbose === 'boolean') {
43
- const level = levelOrVerbose ? 'debug' : 'info';
44
- levelThreshold = levels[level].threshold;
45
- }
46
- else {
47
- levelThreshold = levels[levelOrVerbose].threshold;
48
- }
49
- }
50
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAmClF,0CAOC;AAlCD,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"}
@@ -1,2 +0,0 @@
1
- export declare const TEST_RESOURCE_PATH: string;
2
- //# sourceMappingURL=test-util.spec.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,44 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,5 +0,0 @@
1
- export declare function validateDirectory(rootDir: string): string;
2
- export declare function validateFile(filePath: string, hasToExist?: boolean): string;
3
- export declare function validateVersion(version: string): string;
4
- export declare function validateGitDirectory(repository: string): string;
5
- //# sourceMappingURL=validation-util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation-util.d.ts","sourceRoot":"","sources":["../../src/util/validation-util.ts"],"names":[],"mappings":"AAsBA,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUzD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,UAAQ,GAAG,MAAM,CAUzE;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAO/D"}
@@ -1,85 +0,0 @@
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.validateDirectory = validateDirectory;
27
- exports.validateFile = validateFile;
28
- exports.validateVersion = validateVersion;
29
- exports.validateGitDirectory = validateGitDirectory;
30
- /********************************************************************************
31
- * Copyright (c) 2022-2024 EclipseSource and others.
32
- *
33
- * This program and the accompanying materials are made available under the
34
- * terms of the Eclipse Public License v. 2.0 which is available at
35
- * http://www.eclipse.org/legal/epl-2.0.
36
- *
37
- * This Source Code may also be made available under the following Secondary
38
- * Licenses when the conditions for such availability set forth in the Eclipse
39
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
40
- * with the GNU Classpath Exception which is available at
41
- * https://www.gnu.org/software/classpath/license.html.
42
- *
43
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
44
- ********************************************************************************/
45
- const commander_1 = require("commander");
46
- const fs = __importStar(require("fs"));
47
- const path_1 = require("path");
48
- const semver = __importStar(require("semver"));
49
- const git_util_1 = require("./git-util");
50
- const logger_1 = require("./logger");
51
- function validateDirectory(rootDir) {
52
- const path = (0, path_1.resolve)(rootDir);
53
- if (!fs.existsSync(path)) {
54
- throw new commander_1.InvalidArgumentError('Not a valid file path!');
55
- }
56
- if (!fs.statSync(path).isDirectory()) {
57
- throw new commander_1.InvalidArgumentError('Not a directory!');
58
- }
59
- return path;
60
- }
61
- function validateFile(filePath, hasToExist = false) {
62
- const path = (0, path_1.resolve)(filePath);
63
- if (hasToExist && !fs.existsSync(path)) {
64
- throw new commander_1.InvalidArgumentError('Not a valid file path!');
65
- }
66
- if (!fs.statSync(path).isFile()) {
67
- throw new commander_1.InvalidArgumentError('Not a file!');
68
- }
69
- return path;
70
- }
71
- function validateVersion(version) {
72
- logger_1.LOGGER.debug(`Validate version format of: ${version}`);
73
- if (!semver.valid(version)) {
74
- throw new commander_1.InvalidArgumentError(`Not a valid version: ${version}`);
75
- }
76
- return version;
77
- }
78
- function validateGitDirectory(repository) {
79
- const repoPath = validateDirectory(repository);
80
- if (!(0, git_util_1.isGitRepository)(repoPath)) {
81
- throw new commander_1.InvalidArgumentError('Not a valid git repository');
82
- }
83
- return (0, git_util_1.getGitRoot)(repository);
84
- }
85
- //# sourceMappingURL=validation-util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation-util.js","sourceRoot":"","sources":["../../src/util/validation-util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,8CAUC;AAED,oCAUC;AAED,0CAMC;AAED,oD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AO,CAAC;AACnB,CAAC;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"}
package/src/app.ts DELETED
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env node
2
- /********************************************************************************
3
- * Copyright (c) 2022 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
- import { CheckHeaderCommand } from './commands/check-header';
18
- import { CoverageReportCommand } from './commands/coverage-report';
19
- import { GenerateIndex } from './commands/generate-index';
20
- import { ReleaseCommand } from './commands/release/release';
21
- import { UpdateNextCommand } from './commands/update-next';
22
- import { baseCommand } from './util/command-util';
23
-
24
- export const COMMAND_VERSION = '1.1.0-next';
25
-
26
- const app = baseCommand() //
27
- .version(COMMAND_VERSION)
28
- .name('glsp')
29
- .addCommand(CoverageReportCommand)
30
- .addCommand(ReleaseCommand)
31
- .addCommand(CheckHeaderCommand)
32
- .addCommand(UpdateNextCommand)
33
- .addCommand(GenerateIndex);
34
-
35
- app.parse(process.argv);