@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,135 +0,0 @@
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
- exports.GLSP_REPO_DEFAULTS = exports.CloneType = exports.ReleaseRepoType = exports.LinkType = exports.GlspRepoType = void 0;
19
- exports.validateRepoConfig = validateRepoConfig;
20
- exports.validateRepoOptions = validateRepoOptions;
21
- exports.GlspRepoType = [
22
- 'dev', //
23
- 'client',
24
- 'theia',
25
- 'vscode',
26
- 'eclipse',
27
- 'nodeServer',
28
- 'javaServer',
29
- 'playwright'
30
- ];
31
- exports.LinkType = ['none', 'yarnLink', 'resolutions'];
32
- exports.ReleaseRepoType = ['npm', 'm2', 'm2&p2', 'p2'];
33
- exports.CloneType = ['ssh', 'https', 'gh-cli'];
34
- exports.GLSP_REPO_DEFAULTS = {
35
- dev: {
36
- ghRepo: 'eclipse-glsp/glsp',
37
- releaseRepo: 'npm',
38
- cloneType: 'ssh',
39
- directory: 'glsp',
40
- dependencies: []
41
- },
42
- client: {
43
- ghRepo: 'eclipse-glsp/glsp-client',
44
- releaseRepo: 'npm',
45
- cloneType: 'ssh',
46
- directory: 'glsp-client',
47
- dependencies: ['dev']
48
- },
49
- theia: {
50
- ghRepo: 'eclipse-glsp/glsp-theia-integration',
51
- releaseRepo: 'npm',
52
- cloneType: 'ssh',
53
- directory: 'glsp-theia-integration',
54
- dependencies: ['dev', 'client', 'nodeServer']
55
- },
56
- vscode: {
57
- ghRepo: 'eclipse-glsp/glsp-vscode-integration',
58
- releaseRepo: 'npm',
59
- cloneType: 'ssh',
60
- directory: 'glsp-vscode-integration',
61
- dependencies: ['dev', 'client', 'nodeServer']
62
- },
63
- eclipse: {
64
- ghRepo: 'eclipse-glsp/glsp-eclipse-integration',
65
- releaseRepo: 'p2',
66
- cloneType: 'ssh',
67
- directory: 'glsp-eclipse-integration',
68
- dependencies: ['dev', 'client', 'javaServer']
69
- },
70
- nodeServer: {
71
- ghRepo: 'eclipse-glsp/glsp-server-node',
72
- releaseRepo: 'npm',
73
- cloneType: 'ssh',
74
- directory: 'glsp-server-node',
75
- dependencies: ['dev', 'client']
76
- },
77
- javaServer: {
78
- ghRepo: 'eclipse-glsp/glsp-server',
79
- releaseRepo: 'm2&p2',
80
- cloneType: 'ssh',
81
- directory: 'glsp-server',
82
- dependencies: []
83
- },
84
- playwright: {
85
- ghRepo: 'eclipse-glsp/glsp-playwright',
86
- releaseRepo: 'npm',
87
- cloneType: 'ssh',
88
- directory: 'glsp-playwright',
89
- dependencies: ['dev']
90
- }
91
- };
92
- function validateRepoConfig(input) {
93
- const errors = [];
94
- if ('baseDir' in input && typeof input.baseDir !== 'string') {
95
- errors.push('baseDir must be a string when defined');
96
- }
97
- if ('force' in input && typeof input.force !== 'boolean') {
98
- errors.push('force must be a boolean when defined');
99
- }
100
- if ('linkType' in input && (typeof input.linkType !== 'string' || !exports.LinkType.includes(input.linkType))) {
101
- errors.push('linkType must be one of "none", "yarnLink", or "resolutions" when defined');
102
- }
103
- if ('build' in input && typeof input.build !== 'boolean') {
104
- errors.push('build must be a boolean when defined');
105
- }
106
- // Validate GlspRepoType properties
107
- exports.GlspRepoType.forEach(repoType => {
108
- const config = input;
109
- if (repoType in config) {
110
- if (typeof config[repoType] !== 'boolean' && typeof config[repoType] !== 'object') {
111
- errors.push(`${repoType} must be a boolean or an object when defined`);
112
- }
113
- if (typeof config[repoType] === 'object') {
114
- validateRepoOptions(config[repoType], errors);
115
- }
116
- }
117
- });
118
- return errors;
119
- }
120
- function validateRepoOptions(input, errors = []) {
121
- if ('cloneType' in input && (typeof input.cloneType !== 'string' || !exports.CloneType.includes(input.cloneType))) {
122
- errors.push('cloneType must be one of "ssh", "https", or "gh-cli" when defined');
123
- }
124
- if ('directory' in input && typeof input.directory !== 'string') {
125
- errors.push('directory must be a string when defined');
126
- }
127
- if ('remote' in input && typeof input.remote !== 'string') {
128
- errors.push('remote must be a string when defined');
129
- }
130
- if ('branch' in input && typeof input.branch !== 'string') {
131
- errors.push('branch must be a string when defined');
132
- }
133
- return errors;
134
- }
135
- //# sourceMappingURL=glsp-repo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-repo.js","sourceRoot":"","sources":["../../src/common/glsp-repo.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAuGlF,gDAiCC;AAED,kDAiBC;AAzJY,QAAA,YAAY,GAAG;IACxB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C,IAAI,CAAC,sCAAsC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -1,17 +0,0 @@
1
- /********************************************************************************
2
- * Copyright (c) 2024 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 {};
17
- //# sourceMappingURL=glsp-repo.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-repo.spec.d.ts","sourceRoot":"","sources":["../../src/common/glsp-repo.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF"}
@@ -1,130 +0,0 @@
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
- const chai_1 = require("chai");
19
- const glsp_repo_1 = require("./glsp-repo");
20
- describe('RepoConfig', () => {
21
- describe('validateRepoConfig', () => {
22
- it('should return an empty array for an empty object', () => {
23
- const config = {};
24
- const result = (0, glsp_repo_1.validateRepoConfig)(config);
25
- (0, chai_1.expect)(result).to.be.deep.equal([]);
26
- });
27
- it('should return an empty array for a config with valid base properties', () => {
28
- const config = {
29
- baseDir: 'baseDir',
30
- build: true,
31
- linkType: 'none',
32
- force: true
33
- };
34
- const result = (0, glsp_repo_1.validateRepoConfig)(config);
35
- (0, chai_1.expect)(result).to.be.deep.equal([]);
36
- });
37
- it('should return an error message for an invalid baseDir property', () => {
38
- const config = {
39
- baseDir: false
40
- };
41
- const result = (0, glsp_repo_1.validateRepoConfig)(config);
42
- (0, chai_1.expect)(result.length).to.be.equal(1);
43
- (0, chai_1.expect)(result[0]).to.match(/baseDir/);
44
- });
45
- it('should return an error message for an invalid build property', () => {
46
- const config = {
47
- build: 'invalid'
48
- };
49
- const result = (0, glsp_repo_1.validateRepoConfig)(config);
50
- (0, chai_1.expect)(result.length).to.be.equal(1);
51
- (0, chai_1.expect)(result[0]).to.match(/build/);
52
- });
53
- it('should return an error message for an invalid linkType property', () => {
54
- const config = {
55
- linkType: 'invalid'
56
- };
57
- const result = (0, glsp_repo_1.validateRepoConfig)(config);
58
- (0, chai_1.expect)(result.length).to.be.equal(1);
59
- (0, chai_1.expect)(result[0]).to.match(/linkType/);
60
- });
61
- it('should return an error message for an invalid force property', () => {
62
- const config = {
63
- force: 'invalid'
64
- };
65
- const result = (0, glsp_repo_1.validateRepoConfig)(config);
66
- (0, chai_1.expect)(result.length).to.be.equal(1);
67
- (0, chai_1.expect)(result[0]).to.match(/force/);
68
- });
69
- });
70
- describe('validateRepoOptions', () => {
71
- it('should return an empty array for an empty object', () => {
72
- const options = {};
73
- const result = (0, glsp_repo_1.validateRepoOptions)(options);
74
- (0, chai_1.expect)(result).to.be.deep.equal([]);
75
- });
76
- it('should return an empty array for a options with valid properties', () => {
77
- const options = {
78
- branch: 'master',
79
- cloneType: 'ssh',
80
- directory: 'glsp',
81
- remote: 'git@github.com:eclipse-glsp/glsp.git'
82
- };
83
- const result = (0, glsp_repo_1.validateRepoOptions)(options);
84
- (0, chai_1.expect)(result).to.be.deep.equal([]);
85
- });
86
- it('should return an error message for an invalid branch property', () => {
87
- const options = {
88
- branch: false
89
- };
90
- const result = (0, glsp_repo_1.validateRepoOptions)(options);
91
- (0, chai_1.expect)(result.length).to.be.equal(1);
92
- (0, chai_1.expect)(result[0]).to.match(/branch/);
93
- });
94
- it('should return an error message for an invalid cloneType property', () => {
95
- const options = {
96
- cloneType: 'invalid'
97
- };
98
- const result = (0, glsp_repo_1.validateRepoOptions)(options);
99
- (0, chai_1.expect)(result.length).to.be.equal(1);
100
- (0, chai_1.expect)(result[0]).to.match(/cloneType/);
101
- });
102
- it('should return an error message for an invalid directory property', () => {
103
- const options = {
104
- directory: false
105
- };
106
- const result = (0, glsp_repo_1.validateRepoOptions)(options);
107
- (0, chai_1.expect)(result.length).to.be.equal(1);
108
- (0, chai_1.expect)(result[0]).to.match(/directory/);
109
- });
110
- it('should return an error message for an invalid remote property', () => {
111
- const options = {
112
- remote: false
113
- };
114
- const result = (0, glsp_repo_1.validateRepoOptions)(options);
115
- (0, chai_1.expect)(result.length).to.be.equal(1);
116
- (0, chai_1.expect)(result[0]).to.match(/remote/);
117
- });
118
- it('should return error messages for all invalid properties', () => {
119
- const options = {
120
- branch: false,
121
- cloneType: 'invalid',
122
- directory: false,
123
- remote: false
124
- };
125
- const result = (0, glsp_repo_1.validateRepoOptions)(options);
126
- (0, chai_1.expect)(result.length).to.be.equal(4);
127
- });
128
- });
129
- });
130
- //# sourceMappingURL=glsp-repo.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glsp-repo.spec.js","sourceRoot":"","sources":["../../src/common/glsp-repo.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,+BAA8B;AAC9B,2CAA+F;AAE/F,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IACxB,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAChC,EAAE,CA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AAC,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/lib/foo.spec.d.ts DELETED
@@ -1,17 +0,0 @@
1
- /********************************************************************************
2
- * Copyright (c) 2024 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 {};
17
- //# sourceMappingURL=foo.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"foo.spec.d.ts","sourceRoot":"","sources":["../src/foo.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF"}
package/lib/foo.spec.js DELETED
@@ -1,23 +0,0 @@
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
- describe('foo', () => {
19
- it('should do something', () => {
20
- // test
21
- });
22
- });
23
- //# sourceMappingURL=foo.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"foo.spec.js","sourceRoot":"","sources":["../src/foo.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;AAElF,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;IACjB,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC3B,OAAO;IACX,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/lib/index.d.ts DELETED
@@ -1,18 +0,0 @@
1
- /********************************************************************************
2
- * Copyright (c) 2024 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
- import { RepoConfig as ResolvedRepoConfig } from './common/glsp-repo';
17
- export type RepoConfig = Partial<ResolvedRepoConfig>;
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEtE,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC"}
package/lib/index.js DELETED
@@ -1,18 +0,0 @@
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 DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF"}
@@ -1,26 +0,0 @@
1
- /********************************************************************************
2
- * Copyright (c) 2022-2024 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
- import { Command } from 'commander';
17
- import sh from 'shelljs';
18
- export declare function baseCommand(cmd?: Command): Command;
19
- export type ShellConfig = sh.ExecOptions & {
20
- async: false;
21
- };
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;
26
- //# sourceMappingURL=command-util.d.ts.map
@@ -1 +0,0 @@
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,EAAE,MAAM,SAAS,CAAC;AAGzB,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"}
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
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;
11
- /********************************************************************************
12
- * Copyright (c) 2022-2024 EclipseSource and others.
13
- *
14
- * This program and the accompanying materials are made available under the
15
- * terms of the Eclipse Public License v. 2.0 which is available at
16
- * http://www.eclipse.org/legal/epl-2.0.
17
- *
18
- * This Source Code may also be made available under the following Secondary
19
- * Licenses when the conditions for such availability set forth in the Eclipse
20
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
21
- * with the GNU Classpath Exception which is available at
22
- * https://www.gnu.org/software/classpath/license.html.
23
- *
24
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
25
- ********************************************************************************/
26
- const commander_1 = require("commander");
27
- const shelljs_1 = __importDefault(require("shelljs"));
28
- // Commander.js utils
29
- function baseCommand(cmd = new commander_1.Command()) {
30
- return cmd //
31
- .showSuggestionAfterError(true)
32
- .showHelpAfterError(true)
33
- .allowUnknownOption(false);
34
- }
35
- exports.SH_CONFIG = {
36
- async: false,
37
- fatal: true,
38
- silent: false
39
- };
40
- function getShellConfig(options = {}) {
41
- return {
42
- ...exports.SH_CONFIG,
43
- ...options
44
- };
45
- }
46
- function configureShell(config) {
47
- shelljs_1.default.config.reset();
48
- getShellConfig({});
49
- exports.SH_CONFIG.silent = config.silent;
50
- exports.SH_CONFIG.fatal = config.fatal;
51
- }
52
- function fatalExec(command, fatalErrorMessage, options = {}) {
53
- const result = shelljs_1.default.exec(command, getShellConfig(options));
54
- if (result.code !== 0) {
55
- throw new Error(fatalErrorMessage);
56
- }
57
- return result;
58
- }
59
- //# sourceMappingURL=command-util.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-util.js","sourceRoot":"","sources":["../../src/util/command-util.ts"],"names":[],"mappings":";;;;;;AAmBA,kCAKC;AASD,wCAKC;AAED,wCAKC;AAED,8BAMC;AArDD;;;;;;;;;;;;;;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;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;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;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"}
@@ -1,42 +0,0 @@
1
- /********************************************************************************
2
- * Copyright (c) 2022-2024 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 declare function isGitRepository(path?: string): boolean;
17
- export declare function getGitRoot(path?: string): string;
18
- export declare function hasGitChanges(path?: string): boolean;
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
- export declare function getFilesOfCommit(commitHash: string, repoRoot?: string): string[];
38
- export declare function getLatestGithubRelease(path?: string): string;
39
- export declare function getLatestTag(path?: string): string;
40
- export declare function hasBranch(branch: string, path?: string): boolean;
41
- export declare function getRemoteUrl(path?: string): string;
42
- //# sourceMappingURL=git-util.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-util.d.ts","sourceRoot":"","sources":["../../src/util/git-util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAMlF,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAQtD;AAED,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,wBAAgB,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAW7D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAO9D;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAQvH;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAQhF;AAED,wBAAgB,sBAAsB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAI5D;AAED,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAGhE;AAED,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlD"}