@eclipse-glsp/cli 2.8.0-next.0 → 2.8.0-next.12
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 -10
- package/bin/glsp.js +31 -0
- package/dist/cli.js +12631 -2597
- package/dist/cli.js.map +3 -3
- package/package.json +28 -27
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The contributed `glsp`, is a command line tool that offers all contributed comma
|
|
|
8
8
|
Install `@eclipse-glsp/cli` as a dev dependency in your application.
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
11
|
+
pnpm add --save-dev @eclipse-glsp/cli
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
## Usage
|
|
@@ -63,7 +63,7 @@ Options:
|
|
|
63
63
|
|
|
64
64
|
## coverageReport
|
|
65
65
|
|
|
66
|
-
The `coverageReport` command can be used to create a full nyc test coverage report for a
|
|
66
|
+
The `coverageReport` command can be used to create a full nyc test coverage report for a pnpm mono repository.
|
|
67
67
|
Individual coverage reports for each package are created and then combined to a full report.
|
|
68
68
|
|
|
69
69
|
```console
|
|
@@ -142,14 +142,15 @@ Commands:
|
|
|
142
142
|
version [options] <versionType> [customVersion] Set the version of all packages in a GLSP repository
|
|
143
143
|
prepare [options] <versionType> [customVersion] Prepare a new release for a GLSP component (version bump, changelog, PR
|
|
144
144
|
creation ...)
|
|
145
|
+
publish [options] <distTag> Publish all workspace packages of a GLSP repository
|
|
145
146
|
help [command] display help for command
|
|
146
147
|
```
|
|
147
148
|
|
|
148
149
|
### version
|
|
149
150
|
|
|
150
151
|
Command to bump the version of all packages in a GLSP repository.
|
|
151
|
-
|
|
152
|
-
In addition, external GLSP dependencies are considered and bumped as well.
|
|
152
|
+
This bumps the version of all workspace packages (the root `package.json` version is the source of truth).
|
|
153
|
+
In addition, external GLSP dependencies are considered and bumped as well; `workspace:` ranges are preserved.
|
|
153
154
|
The glsp repository type ("glsp-client", "glsp-server-node" etc.) is auto detected from the given repository path.
|
|
154
155
|
If the command is invoked in a non-GLSP repository it will fail.
|
|
155
156
|
|
|
@@ -199,6 +200,36 @@ Options:
|
|
|
199
200
|
-h, --help display help for command
|
|
200
201
|
```
|
|
201
202
|
|
|
203
|
+
### publish
|
|
204
|
+
|
|
205
|
+
Publishes all (public) workspace packages of a GLSP repository via `pnpm publish -r` (replaces `lerna publish`).
|
|
206
|
+
|
|
207
|
+
- `next`: applies a canary version (`<root-version>.<commits-since-last-tag>`, e.g. `2.8.0-next.42`) to all
|
|
208
|
+
workspace packages and publishes them under the `next` dist-tag. Requires the full git history
|
|
209
|
+
(`fetch-depth: 0` in CI) to derive the commit count.
|
|
210
|
+
- `latest`: publishes the current package versions under the `latest` dist-tag. Packages whose version
|
|
211
|
+
already exists on the registry are skipped.
|
|
212
|
+
|
|
213
|
+
Publishing is delegated to `pnpm publish -r`, so `workspace:` dependency ranges are rewritten to exact
|
|
214
|
+
versions; npm provenance/trusted publishing (`NPM_CONFIG_PROVENANCE`) is preserved.
|
|
215
|
+
|
|
216
|
+
```console
|
|
217
|
+
$ glsp releng publish -h
|
|
218
|
+
Usage: glsp releng publish [options] <distTag>
|
|
219
|
+
|
|
220
|
+
Publish all workspace packages of a GLSP repository via `pnpm publish`
|
|
221
|
+
|
|
222
|
+
Arguments:
|
|
223
|
+
distTag The npm dist-tag to publish under (choices: "next", "latest")
|
|
224
|
+
|
|
225
|
+
Options:
|
|
226
|
+
-v, --verbose Enable verbose (debug) log output (default: false)
|
|
227
|
+
-r, --repoDir <repoDir> Path to the component repository (default: "<cwd>")
|
|
228
|
+
--dry-run Derive versions and run `pnpm publish` in dry-run mode without applying changes (default: false)
|
|
229
|
+
--registry <url> Publish to a custom npm registry (e.g. a local verdaccio for testing)
|
|
230
|
+
-h, --help display help for command
|
|
231
|
+
```
|
|
232
|
+
|
|
202
233
|
## repo
|
|
203
234
|
|
|
204
235
|
Multi-repository workspace management for GLSP development.
|
|
@@ -221,8 +252,8 @@ Commands:
|
|
|
221
252
|
clone [options] [repos...] Clone GLSP repositories
|
|
222
253
|
fork [options] <user> Add fork remotes to already-cloned repositories
|
|
223
254
|
build [options] Build repositories (dependency-ordered)
|
|
224
|
-
link [options] Interlink repositories via
|
|
225
|
-
unlink [options] Remove
|
|
255
|
+
link [options] Interlink repositories via pnpm-workspace.yaml link overrides
|
|
256
|
+
unlink [options] Remove the pnpm link overrides between repositories
|
|
226
257
|
pwd [options] Print resolved paths for all discovered repositories
|
|
227
258
|
log [options] Print the last commit for all discovered repositories
|
|
228
259
|
workspace Manage VS Code workspace files for GLSP projects
|
|
@@ -314,21 +345,30 @@ Options:
|
|
|
314
345
|
|
|
315
346
|
### link / unlink
|
|
316
347
|
|
|
317
|
-
Links (or unlinks) repositories
|
|
318
|
-
Repositories are processed in dependency order, and
|
|
319
|
-
are shared from `glsp-client`
|
|
348
|
+
Links (or unlinks) repositories for cross-repo development by injecting `link:` overrides into each
|
|
349
|
+
consumer's `pnpm-workspace.yaml` and reinstalling. Repositories are processed in dependency order, and
|
|
350
|
+
singleton dependencies (sprotty, sprotty-protocol, vscode-jsonrpc, inversify) are shared from `glsp-client`
|
|
351
|
+
to avoid duplicate instances. After linking a repo it is **built** so the `link:` overrides resolve to
|
|
352
|
+
compiled `lib/` output rather than empty source directories (pass `--no-build` to skip); only the npm/pnpm
|
|
353
|
+
side is built, so the `glsp-eclipse-integration` Maven server is left to a separate build. `unlink` removes
|
|
354
|
+
those overrides again and reinstalls.
|
|
355
|
+
|
|
356
|
+
For `glsp-eclipse-integration`, whose linkable pnpm workspace lives in a `client/` subdirectory, the
|
|
357
|
+
overrides are injected into `client/pnpm-workspace.yaml`.
|
|
320
358
|
|
|
321
359
|
```console
|
|
322
360
|
$ glsp repo link -h
|
|
323
361
|
Usage: glsp repo link [options]
|
|
324
362
|
|
|
325
|
-
Interlink repositories via
|
|
363
|
+
Interlink repositories via pnpm-workspace.yaml link overrides
|
|
326
364
|
|
|
327
365
|
Options:
|
|
328
366
|
-d, --dir <path> Target directory where repos are cloned
|
|
329
367
|
-r, --repo <name...> Link only these repos
|
|
330
368
|
--preset <name> Link repos from a preset (choices: "core", "theia", "vscode",
|
|
331
369
|
"eclipse", "playwright", "all")
|
|
370
|
+
--no-build Skip building the linked repos (links resolve to existing compiled output)
|
|
371
|
+
--electron Build the Theia electron variant instead of browser (default: false)
|
|
332
372
|
--no-fail-fast Continue after a failure
|
|
333
373
|
-v, --verbose Verbose output (default: false)
|
|
334
374
|
-h, --help display help for command
|
package/bin/glsp.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 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
|
+
// Stable launcher committed to the repository so the `glsp` bin symlink can
|
|
18
|
+
// always be created at install time. The actual CLI is the esbuild bundle in
|
|
19
|
+
// `dist/`, which is a build artifact and may not exist yet on a fresh checkout.
|
|
20
|
+
const path = require('path');
|
|
21
|
+
const distEntry = path.join(__dirname, '..', 'dist', 'cli.js');
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
require(distEntry);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
if (error && error.code === 'MODULE_NOT_FOUND' && error.message.includes(distEntry)) {
|
|
27
|
+
console.error("The GLSP CLI has not been built yet. Run 'pnpm build' in the @eclipse-glsp/cli package first.");
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
throw error;
|
|
31
|
+
}
|