@hydranium/cli 1.0.0-next.381 → 1.0.0-next.384
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hydranium/cli",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.384",
|
|
4
4
|
"description": "Build-time codegen tools + data-server subcommands for the hydranium framework.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -78,19 +78,19 @@
|
|
|
78
78
|
"@eclipse-glsp/theia-integration": "2.8.0",
|
|
79
79
|
"@eclipse-glsp/vscode-integration": "2.8.0",
|
|
80
80
|
"@eclipse-glsp/vscode-integration-webview": "2.8.0",
|
|
81
|
-
"@hydranium/client-browser": "1.0.0-next.
|
|
82
|
-
"@hydranium/client-theia": "1.0.0-next.
|
|
83
|
-
"@hydranium/client-vscode": "1.0.0-next.
|
|
84
|
-
"@hydranium/core": "1.0.0-next.
|
|
85
|
-
"@hydranium/data-client-theia": "1.0.0-next.
|
|
86
|
-
"@hydranium/data-client-vscode": "1.0.0-next.
|
|
87
|
-
"@hydranium/data-server": "1.0.0-next.
|
|
88
|
-
"@hydranium/glsp-client": "1.0.0-next.
|
|
89
|
-
"@hydranium/glsp-client-theia": "1.0.0-next.
|
|
90
|
-
"@hydranium/glsp-client-vscode": "1.0.0-next.
|
|
91
|
-
"@hydranium/glsp-server": "1.0.0-next.
|
|
92
|
-
"@hydranium/langium": "1.0.0-next.
|
|
93
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
81
|
+
"@hydranium/client-browser": "1.0.0-next.384",
|
|
82
|
+
"@hydranium/client-theia": "1.0.0-next.384",
|
|
83
|
+
"@hydranium/client-vscode": "1.0.0-next.384",
|
|
84
|
+
"@hydranium/core": "1.0.0-next.384",
|
|
85
|
+
"@hydranium/data-client-theia": "1.0.0-next.384",
|
|
86
|
+
"@hydranium/data-client-vscode": "1.0.0-next.384",
|
|
87
|
+
"@hydranium/data-server": "1.0.0-next.384",
|
|
88
|
+
"@hydranium/glsp-client": "1.0.0-next.384",
|
|
89
|
+
"@hydranium/glsp-client-theia": "1.0.0-next.384",
|
|
90
|
+
"@hydranium/glsp-client-vscode": "1.0.0-next.384",
|
|
91
|
+
"@hydranium/glsp-server": "1.0.0-next.384",
|
|
92
|
+
"@hydranium/langium": "1.0.0-next.384",
|
|
93
|
+
"@hydranium/protocol": "1.0.0-next.384",
|
|
94
94
|
"@playwright/test": "^1.55.0",
|
|
95
95
|
"@theia/cli": "1.74.3",
|
|
96
96
|
"@theia/core": "1.74.3",
|
|
@@ -129,10 +129,10 @@
|
|
|
129
129
|
"vscode-languageserver-types": "3.18.0"
|
|
130
130
|
},
|
|
131
131
|
"peerDependencies": {
|
|
132
|
-
"@hydranium/core": "1.0.0-next.
|
|
133
|
-
"@hydranium/data-server": "1.0.0-next.
|
|
134
|
-
"@hydranium/langium": "1.0.0-next.
|
|
135
|
-
"@hydranium/protocol": "1.0.0-next.
|
|
132
|
+
"@hydranium/core": "1.0.0-next.384",
|
|
133
|
+
"@hydranium/data-server": "1.0.0-next.384",
|
|
134
|
+
"@hydranium/langium": "1.0.0-next.384",
|
|
135
|
+
"@hydranium/protocol": "1.0.0-next.384",
|
|
136
136
|
"@memlab/core": "^2.0.3",
|
|
137
137
|
"@memlab/heap-analysis": "^2.0.3",
|
|
138
138
|
"vscode-jsonrpc": "^9.0.0"
|
|
@@ -83,8 +83,11 @@ export async function mountDiagram(
|
|
|
83
83
|
let switching: Promise<void> = Promise.resolve();
|
|
84
84
|
const follow = (uri: string): Promise<void> => {
|
|
85
85
|
const shown = switching.then(() => show(uri));
|
|
86
|
+
// Derived, so a dropped failure is reported, and before the catch below,
|
|
87
|
+
// so the caller resumes before the next switch starts.
|
|
88
|
+
const handed = shown.then(() => undefined);
|
|
86
89
|
switching = shown.catch(() => undefined);
|
|
87
|
-
return
|
|
90
|
+
return handed;
|
|
88
91
|
};
|
|
89
92
|
// Before the first mount, since the page can switch while it loads.
|
|
90
93
|
shownFile.onDidChange(uri => {
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
UndoAction
|
|
25
25
|
} from '@eclipse-glsp/server';
|
|
26
26
|
import { initializeWorkspaceProgrammatically } from '@hydranium/core';
|
|
27
|
-
import { makeScratchWorkspace, type ScratchWorkspace } from '@hydranium/core/testing/node';
|
|
27
|
+
import { disposeScratchWorkspace, makeScratchWorkspace, type ScratchWorkspace } from '@hydranium/core/testing/node';
|
|
28
28
|
import { HydraniumGlspAppModule } from '@hydranium/glsp-server';
|
|
29
29
|
import { type GlspHarness, makeGlspHarness } from '@hydranium/glsp-server/testing';
|
|
30
30
|
import { URI } from '@hydranium/langium';
|
|
@@ -43,13 +43,16 @@ import { is__ENTRY_RULE__ } from '../src/language-server/ast.js';
|
|
|
43
43
|
import { createServices } from '../src/node/services.js';
|
|
44
44
|
|
|
45
45
|
let workspace: ScratchWorkspace | undefined;
|
|
46
|
+
let serverShared: ReturnType<typeof createServices>['shared'] | undefined;
|
|
46
47
|
let diagram: GlspHarness<__GRAMMAR__GlspState> | undefined;
|
|
47
48
|
|
|
48
|
-
afterEach(() => {
|
|
49
|
+
afterEach(async () => {
|
|
49
50
|
diagram?.dispose();
|
|
50
|
-
workspace
|
|
51
|
+
const disposing = disposeScratchWorkspace(workspace, serverShared);
|
|
52
|
+
serverShared = undefined;
|
|
51
53
|
diagram = undefined;
|
|
52
54
|
workspace = undefined;
|
|
55
|
+
await disposing;
|
|
53
56
|
});
|
|
54
57
|
|
|
55
58
|
/** Send `action` and wait for the dirty state the server answers it with, which it sends once the edit is written. */
|
|
@@ -67,6 +70,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
67
70
|
const original = '// keep this comment\nnode first -> second\n// about second\nnode second';
|
|
68
71
|
const file = workspace.write('model.__EXTENSION__', original);
|
|
69
72
|
const { shared } = createServices();
|
|
73
|
+
serverShared = shared;
|
|
70
74
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
71
75
|
diagram = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
72
76
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -96,6 +100,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
96
100
|
const original = 'node first -> second\nnode second\nnode third -> first';
|
|
97
101
|
const file = workspace.write('model.__EXTENSION__', original);
|
|
98
102
|
const { shared } = createServices();
|
|
103
|
+
serverShared = shared;
|
|
99
104
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
100
105
|
const harness = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
101
106
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -127,6 +132,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
127
132
|
workspace = makeScratchWorkspace({ prefix: '__GRAMMAR_ID__-diagram-' });
|
|
128
133
|
const file = workspace.write('model.__EXTENSION__', 'node first -> second\nnode first\nnode second -> first');
|
|
129
134
|
const { shared } = createServices();
|
|
135
|
+
serverShared = shared;
|
|
130
136
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
131
137
|
const harness = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
132
138
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -147,6 +153,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
147
153
|
workspace.write('other.__EXTENSION__', 'node second');
|
|
148
154
|
const file = workspace.write('model.__EXTENSION__', 'node first -> second\nnode second');
|
|
149
155
|
const { shared } = createServices();
|
|
156
|
+
serverShared = shared;
|
|
150
157
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
151
158
|
const harness = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
152
159
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -166,6 +173,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
166
173
|
workspace = makeScratchWorkspace({ prefix: '__GRAMMAR_ID__-diagram-' });
|
|
167
174
|
const file = workspace.write('model.__EXTENSION__', 'node a\nnode a -> b\nnode b');
|
|
168
175
|
const { shared } = createServices();
|
|
176
|
+
serverShared = shared;
|
|
169
177
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
170
178
|
diagram = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
171
179
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -187,6 +195,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
187
195
|
workspace = makeScratchWorkspace({ prefix: '__GRAMMAR_ID__-diagram-' });
|
|
188
196
|
const file = workspace.write('model.__EXTENSION__', 'node a -> b\nnode b\nnode a_name\nnode a_target');
|
|
189
197
|
const { shared } = createServices();
|
|
198
|
+
serverShared = shared;
|
|
190
199
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
191
200
|
diagram = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
192
201
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -210,6 +219,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
210
219
|
workspace.write('declaring.__EXTENSION__', 'node second');
|
|
211
220
|
const file = workspace.write('referencing.__EXTENSION__', 'node first -> second\nnode third -> second');
|
|
212
221
|
const { shared } = createServices();
|
|
222
|
+
serverShared = shared;
|
|
213
223
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
214
224
|
diagram = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
215
225
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -245,6 +255,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
245
255
|
workspace.write('two.__EXTENSION__', 'node second');
|
|
246
256
|
const file = workspace.write('referencing.__EXTENSION__', 'node first -> second\nnode third -> second');
|
|
247
257
|
const { shared } = createServices();
|
|
258
|
+
serverShared = shared;
|
|
248
259
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
249
260
|
const harness = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
250
261
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -283,6 +294,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
283
294
|
workspace = makeScratchWorkspace({ prefix: '__GRAMMAR_ID__-diagram-' });
|
|
284
295
|
const file = workspace.write('cycle.__EXTENSION__', 'node a -> b\nnode b -> a\nnode c -> a');
|
|
285
296
|
const { shared } = createServices();
|
|
297
|
+
serverShared = shared;
|
|
286
298
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
287
299
|
diagram = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
288
300
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -316,6 +328,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
316
328
|
workspace = makeScratchWorkspace({ prefix: '__GRAMMAR_ID__-diagram-' });
|
|
317
329
|
const file = workspace.write('loop.__EXTENSION__', 'node a -> a');
|
|
318
330
|
const { shared } = createServices();
|
|
331
|
+
serverShared = shared;
|
|
319
332
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
320
333
|
const harness = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
321
334
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -344,6 +357,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
344
357
|
workspace = makeScratchWorkspace({ prefix: '__GRAMMAR_ID__-diagram-' });
|
|
345
358
|
const file = workspace.write('duplicate.__EXTENSION__', 'node first\nnode first');
|
|
346
359
|
const { shared } = createServices();
|
|
360
|
+
serverShared = shared;
|
|
347
361
|
await initializeWorkspaceProgrammatically(shared, workspace.root);
|
|
348
362
|
diagram = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
349
363
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
@@ -369,6 +383,7 @@ describe('__GRAMMAR__ diagram', () => {
|
|
|
369
383
|
workspace.write('declaring.__EXTENSION__', 'node second');
|
|
370
384
|
const file = workspace.write('referencing.__EXTENSION__', 'node first -> second');
|
|
371
385
|
const { shared } = createServices();
|
|
386
|
+
serverShared = shared;
|
|
372
387
|
diagram = makeGlspHarness<__GRAMMAR__GlspState>({
|
|
373
388
|
serverModule: new ServerModule().configureDiagramModule(new __GRAMMAR__DiagramModule()),
|
|
374
389
|
diagramType: __GRAMMAR_ID_CONST___DIAGRAM_TYPE,
|