@hydranium/protocol 1.0.0-next.123 → 1.0.0-next.127
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/client/data-connection.d.ts +35 -4
- package/lib/client/data-connection.d.ts.map +1 -1
- package/lib/client/data-connection.js +67 -5
- package/lib/client/data-connection.js.map +1 -1
- package/lib/client/data-events.d.ts +5 -1
- package/lib/client/data-events.d.ts.map +1 -1
- package/lib/client/data-events.js +7 -0
- package/lib/client/data-events.js.map +1 -1
- package/lib/client/data-session.d.ts +76 -8
- package/lib/client/data-session.d.ts.map +1 -1
- package/lib/client/data-session.js +108 -19
- package/lib/client/data-session.js.map +1 -1
- package/lib/client/index.d.ts +3 -1
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/index.js +3 -1
- package/lib/client/index.js.map +1 -1
- package/lib/client/message-relay.d.ts +1 -1
- package/lib/client/message-relay.js +1 -1
- package/lib/client/post-message-transport.d.ts +64 -3
- package/lib/client/post-message-transport.d.ts.map +1 -1
- package/lib/client/post-message-transport.js +175 -1
- package/lib/client/post-message-transport.js.map +1 -1
- package/lib/client/rpc-connection.d.ts +6 -0
- package/lib/client/rpc-connection.d.ts.map +1 -1
- package/lib/client/rpc-connection.js +9 -1
- package/lib/client/rpc-connection.js.map +1 -1
- package/lib/clock.d.ts +38 -0
- package/lib/clock.d.ts.map +1 -1
- package/lib/clock.js +36 -1
- package/lib/clock.js.map +1 -1
- package/lib/data/data-protocol-methods.d.ts +2 -2
- package/lib/data/data-protocol-methods.d.ts.map +1 -1
- package/lib/data/data-protocol-methods.js +1 -0
- package/lib/data/data-protocol-methods.js.map +1 -1
- package/lib/data/data-server-protocol.d.ts +11 -1
- package/lib/data/data-server-protocol.d.ts.map +1 -1
- package/lib/data/events.d.ts +14 -0
- package/lib/data/events.d.ts.map +1 -1
- package/lib/errors.d.ts +20 -9
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +18 -9
- package/lib/errors.js.map +1 -1
- package/lib/glsp-save-model-actions.d.ts +50 -0
- package/lib/glsp-save-model-actions.d.ts.map +1 -0
- package/lib/glsp-save-model-actions.js +28 -0
- package/lib/glsp-save-model-actions.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/messages/index.d.ts +1 -1
- package/lib/messages/index.d.ts.map +1 -1
- package/lib/messages/index.js +2 -1
- package/lib/messages/index.js.map +1 -1
- package/lib/testing/data-doubles.d.ts +3 -1
- package/lib/testing/data-doubles.d.ts.map +1 -1
- package/lib/testing/data-doubles.js +6 -1
- package/lib/testing/data-doubles.js.map +1 -1
- package/lib/testing/fake-clock.d.ts +9 -1
- package/lib/testing/fake-clock.d.ts.map +1 -1
- package/lib/testing/fake-clock.js +54 -45
- package/lib/testing/fake-clock.js.map +1 -1
- package/lib/testing/node/index.d.ts +1 -0
- package/lib/testing/node/index.d.ts.map +1 -1
- package/lib/testing/node/index.js +2 -2
- package/lib/testing/node/index.js.map +1 -1
- package/lib/testing/node/message-port-pair.d.ts +25 -0
- package/lib/testing/node/message-port-pair.d.ts.map +1 -0
- package/lib/testing/node/message-port-pair.js +26 -0
- package/lib/testing/node/message-port-pair.js.map +1 -0
- package/lib/transfer-document.d.ts +8 -0
- package/lib/transfer-document.d.ts.map +1 -1
- package/lib/transfer-document.js.map +1 -1
- package/package.json +1 -1
- package/src/client/data-connection.ts +72 -6
- package/src/client/data-events.ts +9 -0
- package/src/client/data-session.ts +125 -21
- package/src/client/index.ts +3 -1
- package/src/client/message-relay.ts +1 -1
- package/src/client/post-message-transport.ts +219 -4
- package/src/client/rpc-connection.ts +10 -1
- package/src/clock.ts +56 -0
- package/src/data/data-protocol-methods.ts +1 -0
- package/src/data/data-server-protocol.ts +12 -0
- package/src/data/events.ts +16 -0
- package/src/errors.ts +24 -9
- package/src/glsp-save-model-actions.ts +59 -0
- package/src/index.ts +1 -0
- package/src/messages/index.ts +1 -1
- package/src/testing/data-doubles.ts +10 -1
- package/src/testing/fake-clock.ts +62 -47
- package/src/testing/node/index.ts +2 -2
- package/src/testing/node/message-port-pair.ts +40 -0
- package/src/transfer-document.ts +8 -0
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
********************************************************************************/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.DataSession = exports.DATA_SESSION_UNSAVED_LOST = exports.DATA_SESSION_RESTORE_FAILED = void 0;
|
|
12
|
+
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
13
|
+
const clock_1 = require("../clock");
|
|
14
|
+
const errors_1 = require("../errors");
|
|
12
15
|
const primitives_1 = require("../messages/primitives");
|
|
13
16
|
/**
|
|
14
17
|
* A session could not re-open a document it had open after its connection
|
|
@@ -42,8 +45,9 @@ exports.DATA_SESSION_UNSAVED_LOST = (0, primitives_1.defineMessage)('hydranium/p
|
|
|
42
45
|
* otherwise reach the server after it, and fail as not open.
|
|
43
46
|
*
|
|
44
47
|
* After the connection drops, the session registers again under the same id,
|
|
45
|
-
* re-opens and re-watches what it had open,
|
|
46
|
-
*
|
|
48
|
+
* re-opens and re-watches what it had open, tells the client of their dirty
|
|
49
|
+
* state where it changed, and reports the documents whose unsaved edits did
|
|
50
|
+
* not survive; see {@link restore}. The connection does this at
|
|
47
51
|
* once for a session with documents open, and any session's next call does it
|
|
48
52
|
* too.
|
|
49
53
|
*
|
|
@@ -67,8 +71,20 @@ class DataSession {
|
|
|
67
71
|
* fails that save.
|
|
68
72
|
*/
|
|
69
73
|
settleBeforeCloseMs = 10_000;
|
|
74
|
+
/**
|
|
75
|
+
* The clock {@link settleBeforeCloseMs} runs on. {@link DataSessionHost}
|
|
76
|
+
* carries no {@link Clock}, so a subclass replaces this field as it
|
|
77
|
+
* replaces the bound.
|
|
78
|
+
*/
|
|
79
|
+
clock = new clock_1.SystemClock();
|
|
70
80
|
/** URIs this session has open, re-opened after a reconnect. */
|
|
71
81
|
openUris = new Set();
|
|
82
|
+
/**
|
|
83
|
+
* Per URI in {@link openUris}, the URI the server's last answer to its open
|
|
84
|
+
* or re-open named. The server keys its notifications by it, and so does
|
|
85
|
+
* the host's record of what its client was told.
|
|
86
|
+
*/
|
|
87
|
+
serverUris = new Map();
|
|
72
88
|
/**
|
|
73
89
|
* Per URI, how many opens of it this session has under way. Such a URI
|
|
74
90
|
* counts as open for {@link withOpenDocument}, which would otherwise close
|
|
@@ -82,6 +98,21 @@ class DataSession {
|
|
|
82
98
|
unsavedWrites = new Map();
|
|
83
99
|
/** Per URI, this session's calls still in flight on it, which a close waits for. */
|
|
84
100
|
inFlight = new Map();
|
|
101
|
+
/** This session's saves still in flight, which a host's exit waits for; see {@link hasSavesInFlight}. */
|
|
102
|
+
savesInFlight = new Set();
|
|
103
|
+
disposeEmitter = new vscode_jsonrpc_1.Emitter();
|
|
104
|
+
/**
|
|
105
|
+
* Fires once when the session ends, by {@link dispose} or {@link detach}, as
|
|
106
|
+
* soon as it rejects further calls and before any close is sent. For a
|
|
107
|
+
* session its connection created, the connection's listener runs first, so
|
|
108
|
+
* the id is free again on that connection by the time any other listener
|
|
109
|
+
* runs; the server still holds it until the close arrives, and refuses a new
|
|
110
|
+
* session under it until then.
|
|
111
|
+
*
|
|
112
|
+
* A listener subscribed once the session has ended is never called, so a
|
|
113
|
+
* late subscriber checks {@link isDisposed} first.
|
|
114
|
+
*/
|
|
115
|
+
onDidDispose = this.disposeEmitter.event;
|
|
85
116
|
/**
|
|
86
117
|
* Sent with every registration, so the server lets this session register
|
|
87
118
|
* its id again while the dropped connection's session is still live there:
|
|
@@ -175,6 +206,10 @@ class DataSession {
|
|
|
175
206
|
throw error;
|
|
176
207
|
}
|
|
177
208
|
this.openUris.add(uri);
|
|
209
|
+
this.serverUris.set(uri, document.uri);
|
|
210
|
+
// Keyed as the server keys its notifications, which may not be how the
|
|
211
|
+
// caller spelled the URI.
|
|
212
|
+
this.host.forgetDirty?.(document.uri);
|
|
178
213
|
return document;
|
|
179
214
|
}
|
|
180
215
|
/**
|
|
@@ -188,8 +223,11 @@ class DataSession {
|
|
|
188
223
|
// Forgotten before the close is sent, so a reconnect in between does not
|
|
189
224
|
// re-open a document the caller has closed; after the wait, so an open
|
|
190
225
|
// of it that was still in flight does not record it again.
|
|
226
|
+
const serverUri = this.serverUris.get(args.uri) ?? args.uri;
|
|
191
227
|
this.openUris.delete(args.uri);
|
|
228
|
+
this.serverUris.delete(args.uri);
|
|
192
229
|
this.unsavedWrites.delete(args.uri);
|
|
230
|
+
this.host.forgetDirty?.(serverUri);
|
|
193
231
|
const server = await this.connected();
|
|
194
232
|
await server.closeModelDocument({ ...args, clientId: this.clientId });
|
|
195
233
|
}
|
|
@@ -235,12 +273,36 @@ class DataSession {
|
|
|
235
273
|
}
|
|
236
274
|
/** Persist `args.model` to disk as this session. The session must have `args.uri` open. */
|
|
237
275
|
saveDocument(args) {
|
|
238
|
-
|
|
276
|
+
const saving = this.track([args.uri], async () => {
|
|
239
277
|
const server = await this.connected();
|
|
240
278
|
const document = await server.saveModelDocument({ ...args, clientId: this.clientId });
|
|
241
279
|
this.unsavedWrites.delete(args.uri);
|
|
242
280
|
return document;
|
|
243
281
|
});
|
|
282
|
+
this.savesInFlight.add(saving);
|
|
283
|
+
const done = () => this.savesInFlight.delete(saving);
|
|
284
|
+
saving.then(done, done);
|
|
285
|
+
return saving;
|
|
286
|
+
}
|
|
287
|
+
/** Whether the session has ended, by {@link dispose} or {@link detach}. */
|
|
288
|
+
get isDisposed() {
|
|
289
|
+
return this.disposed;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Whether a save of this session has not answered yet. Synchronous, for a
|
|
293
|
+
* host whose exit veto must decide within the tick, such as Theia's
|
|
294
|
+
* `onWillStop`.
|
|
295
|
+
*/
|
|
296
|
+
get hasSavesInFlight() {
|
|
297
|
+
return this.savesInFlight.size > 0;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Resolves once the saves in flight now have answered, or
|
|
301
|
+
* {@link settleBeforeCloseMs} has passed. Never rejects: a failed save has
|
|
302
|
+
* answered too.
|
|
303
|
+
*/
|
|
304
|
+
whenSavesSettled() {
|
|
305
|
+
return this.settle(this.savesInFlight);
|
|
244
306
|
}
|
|
245
307
|
/**
|
|
246
308
|
* Whether `sourceClientId` identifies this session's own write.
|
|
@@ -258,16 +320,17 @@ class DataSession {
|
|
|
258
320
|
* end it on the server, which closes everything it has open. Idempotent,
|
|
259
321
|
* and leaves the connection usable by its other sessions.
|
|
260
322
|
*
|
|
261
|
-
* Every later call rejects
|
|
262
|
-
*
|
|
263
|
-
*
|
|
323
|
+
* Every later call rejects, and so does a call made earlier in the same
|
|
324
|
+
* tick, which has not reached the wire yet and is never sent. The server
|
|
325
|
+
* close is not awaited, because a `Disposable` cannot be; a close that fails
|
|
326
|
+
* leaves the session to the server's connection-close cleanup.
|
|
264
327
|
*/
|
|
265
328
|
dispose() {
|
|
266
329
|
if (this.disposed) {
|
|
267
330
|
return;
|
|
268
331
|
}
|
|
269
332
|
this.disposed = true;
|
|
270
|
-
this.
|
|
333
|
+
this.fireDispose();
|
|
271
334
|
const pending = [...this.inFlight.values()].flatMap(calls => [...calls]);
|
|
272
335
|
void (async () => {
|
|
273
336
|
await this.settle(pending);
|
|
@@ -285,12 +348,26 @@ class DataSession {
|
|
|
285
348
|
* Sends nothing, unlike {@link dispose}: the server ends every session on a
|
|
286
349
|
* connection it sees close, and the close would travel over the very
|
|
287
350
|
* connection being disposed.
|
|
351
|
+
*
|
|
352
|
+
* Public because the connection calls it; anyone else ends a session with
|
|
353
|
+
* {@link dispose}. It fires {@link onDidDispose} only if the session has not
|
|
354
|
+
* already ended, and after {@link dispose} it still cancels the close that
|
|
355
|
+
* dispose has not sent yet.
|
|
288
356
|
*/
|
|
289
357
|
detach() {
|
|
290
|
-
this.disposed = true;
|
|
291
358
|
this.detached = true;
|
|
292
359
|
this.openUris.clear();
|
|
360
|
+
this.serverUris.clear();
|
|
293
361
|
this.unsavedWrites.clear();
|
|
362
|
+
if (!this.disposed) {
|
|
363
|
+
this.disposed = true;
|
|
364
|
+
this.fireDispose();
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
/** Fire {@link onDidDispose} and dispose its emitter, so a second call fires nothing. */
|
|
368
|
+
fireDispose() {
|
|
369
|
+
this.disposeEmitter.fire(undefined);
|
|
370
|
+
this.disposeEmitter.dispose();
|
|
294
371
|
}
|
|
295
372
|
/**
|
|
296
373
|
* Register again and restore now, after the connection dropped, instead of
|
|
@@ -331,6 +408,11 @@ class DataSession {
|
|
|
331
408
|
* naming every document whose unsaved text is gone, whose record is then
|
|
332
409
|
* dropped, and one per document that could not be re-opened, which is
|
|
333
410
|
* forgotten.
|
|
411
|
+
*
|
|
412
|
+
* Each document's dirty state goes to the host too, read once the watch is
|
|
413
|
+
* in place: a flip while the connection was down, or between the re-open
|
|
414
|
+
* and the watch, reached no one, and the re-open's own answer misses the
|
|
415
|
+
* second.
|
|
334
416
|
*/
|
|
335
417
|
async restore(server) {
|
|
336
418
|
const lost = [];
|
|
@@ -338,6 +420,21 @@ class DataSession {
|
|
|
338
420
|
try {
|
|
339
421
|
const document = await server.openModelDocument({ uri, clientId: this.clientId });
|
|
340
422
|
await server.watchModelDocument({ uri, clientId: this.clientId });
|
|
423
|
+
if (this.openUris.has(uri)) {
|
|
424
|
+
this.serverUris.set(uri, document.uri);
|
|
425
|
+
}
|
|
426
|
+
// A failed read leaves the client's dirty state as it was; the
|
|
427
|
+
// document is restored all the same.
|
|
428
|
+
const current = await server.getModelDocument({ uri }).catch(() => undefined);
|
|
429
|
+
if (current?.dirty !== undefined) {
|
|
430
|
+
try {
|
|
431
|
+
this.host.restoreDirty?.({ uri: current.uri, dirty: current.dirty });
|
|
432
|
+
}
|
|
433
|
+
catch {
|
|
434
|
+
// The client's listener failed, not the restore: the server
|
|
435
|
+
// has the document open and watched, so it stays restored.
|
|
436
|
+
}
|
|
437
|
+
}
|
|
341
438
|
const written = this.unsavedWrites.get(uri);
|
|
342
439
|
if (written !== undefined && written !== document.version) {
|
|
343
440
|
lost.push(uri);
|
|
@@ -346,6 +443,7 @@ class DataSession {
|
|
|
346
443
|
}
|
|
347
444
|
catch (error) {
|
|
348
445
|
this.openUris.delete(uri);
|
|
446
|
+
this.serverUris.delete(uri);
|
|
349
447
|
this.unsavedWrites.delete(uri);
|
|
350
448
|
this.host.reportError?.(error, (0, primitives_1.resolve)(exports.DATA_SESSION_RESTORE_FAILED, { uri, detail: (0, primitives_1.describeError)(error) }));
|
|
351
449
|
}
|
|
@@ -387,20 +485,11 @@ class DataSession {
|
|
|
387
485
|
if (pending.length === 0) {
|
|
388
486
|
return;
|
|
389
487
|
}
|
|
390
|
-
|
|
391
|
-
const bound = new Promise(resolveBound => {
|
|
392
|
-
timer = setTimeout(resolveBound, this.settleBeforeCloseMs);
|
|
393
|
-
});
|
|
394
|
-
try {
|
|
395
|
-
await Promise.race([Promise.allSettled(pending), bound]);
|
|
396
|
-
}
|
|
397
|
-
finally {
|
|
398
|
-
clearTimeout(timer);
|
|
399
|
-
}
|
|
488
|
+
await this.clock.raceTimer(Promise.allSettled(pending), this.settleBeforeCloseMs);
|
|
400
489
|
}
|
|
401
490
|
assertLive() {
|
|
402
491
|
if (this.disposed) {
|
|
403
|
-
throw new
|
|
492
|
+
throw new errors_1.SessionClosedError(this.clientId);
|
|
404
493
|
}
|
|
405
494
|
}
|
|
406
495
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-session.js","sourceRoot":"","sources":["../../src/client/data-session.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAIlF,uDAAqG;AAOrG;;;GAGG;AACU,QAAA,2BAA2B,GAAG,IAAA,0BAAa,EACrD,gDAAgD,EAChD,yEAAyE,CAC3E,CAAC;AAEF;;;;;;GAMG;AACU,QAAA,yBAAyB,GAAG,IAAA,0BAAa,EACnD,8CAA8C,EAC9C,8FAA8F,CAChG,CAAC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,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACrF,CAAC;IAES,UAAU;QACjB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACjB,MAAM,IAAI,2BAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/C,CAAC;IACJ,CAAC;CACH;AA7cD,kCA6cC"}
|
package/lib/client/index.d.ts
CHANGED
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
* identity, open/watch ordering, echo recognition), the inbound
|
|
18
18
|
* fan-out (`DataEvents`), and the two halves of the hop for hosts whose
|
|
19
19
|
* client cannot hold a socket — `createPostMessageTransport` on the client
|
|
20
|
-
* side and `relayToPostMessageChannel` on the side that does hold it
|
|
20
|
+
* side and `relayToPostMessageChannel` on the side that does hold it, and
|
|
21
|
+
* `createMessagePortTransport` for a head's worker `MessagePort`, at either
|
|
22
|
+
* end, which the GLSP worker head uses too.
|
|
21
23
|
*
|
|
22
24
|
* **Neutral, and gate-enforced so.** Nothing here imports a host package or a
|
|
23
25
|
* Node builtin, which is what lets one client tier serve a Theia frontend, a VS
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
|
package/lib/client/index.js
CHANGED
|
@@ -33,7 +33,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
33
33
|
* identity, open/watch ordering, echo recognition), the inbound
|
|
34
34
|
* fan-out (`DataEvents`), and the two halves of the hop for hosts whose
|
|
35
35
|
* client cannot hold a socket — `createPostMessageTransport` on the client
|
|
36
|
-
* side and `relayToPostMessageChannel` on the side that does hold it
|
|
36
|
+
* side and `relayToPostMessageChannel` on the side that does hold it, and
|
|
37
|
+
* `createMessagePortTransport` for a head's worker `MessagePort`, at either
|
|
38
|
+
* end, which the GLSP worker head uses too.
|
|
37
39
|
*
|
|
38
40
|
* **Neutral, and gate-enforced so.** Nothing here imports a host package or a
|
|
39
41
|
* Node builtin, which is what lets one client tier serve a Theia frontend, a VS
|
package/lib/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,oDAAkC;AAClC,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,kDAAgC;AAChC,2DAAyC;AACzC,mDAAiC"}
|
|
@@ -88,7 +88,7 @@ export interface MessageRelay extends Disposable {
|
|
|
88
88
|
* imports the entrypoint that frames its own transport (`vscode-jsonrpc/node`
|
|
89
89
|
* for a socket) and the RAL that comes with it; this tier stays neutral and is
|
|
90
90
|
* gated so by `npm run check:neutral`. Contrast
|
|
91
|
-
* `@hydranium/
|
|
91
|
+
* `@hydranium/client-theia`'s `SocketChannelForwarder`, which does build a
|
|
92
92
|
* connection only to borrow its `onClose`, and pays a Theia dependency for the
|
|
93
93
|
* byte coding this shape does not need.
|
|
94
94
|
*
|
|
@@ -35,7 +35,7 @@ exports.RELAY_REPLAY_FAILED = (0, primitives_1.defineMessage)('hydranium/protoco
|
|
|
35
35
|
* imports the entrypoint that frames its own transport (`vscode-jsonrpc/node`
|
|
36
36
|
* for a socket) and the RAL that comes with it; this tier stays neutral and is
|
|
37
37
|
* gated so by `npm run check:neutral`. Contrast
|
|
38
|
-
* `@hydranium/
|
|
38
|
+
* `@hydranium/client-theia`'s `SocketChannelForwarder`, which does build a
|
|
39
39
|
* connection only to borrow its `onClose`, and pays a Theia dependency for the
|
|
40
40
|
* byte coding this shape does not need.
|
|
41
41
|
*
|
|
@@ -25,7 +25,8 @@ export interface PostMessageChannel {
|
|
|
25
25
|
/**
|
|
26
26
|
* Hand one JSON-RPC message to the other side. Fire-and-forget: delivery
|
|
27
27
|
* failures surface through {@link onClose}, never as a rejection, because
|
|
28
|
-
* `postMessage` has no completion to report.
|
|
28
|
+
* `postMessage` has no completion to report. A value the pipe refuses may
|
|
29
|
+
* throw, and the writer turns that into a rejected write and a writer error.
|
|
29
30
|
*/
|
|
30
31
|
post(message: Message): void;
|
|
31
32
|
/** Register for messages arriving from the other side. */
|
|
@@ -53,12 +54,18 @@ export interface PostMessageChannel {
|
|
|
53
54
|
*
|
|
54
55
|
* Keeping the factory out of this module is also what lets the module stay
|
|
55
56
|
* browser-neutral: it touches only `AbstractMessageReader` /
|
|
56
|
-
* `AbstractMessageWriter` / `Emitter`, none of which need a RAL
|
|
57
|
+
* `AbstractMessageWriter` / `Emitter`, none of which need a RAL, and the RAL's
|
|
58
|
+
* timer, which {@link createMessagePortTransport} reads only once a message
|
|
59
|
+
* arrives, by when the host that built the connection has installed one in
|
|
60
|
+
* the same copy of `vscode-jsonrpc`.
|
|
57
61
|
*/
|
|
58
62
|
export interface PostMessageTransport {
|
|
59
63
|
readonly reader: MessageReader;
|
|
60
64
|
readonly writer: MessageWriter;
|
|
61
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Release the channel subscriptions. A {@link createMessagePortTransport}
|
|
67
|
+
* transport also signals its end to the other side.
|
|
68
|
+
*/
|
|
62
69
|
dispose(): void;
|
|
63
70
|
}
|
|
64
71
|
/**
|
|
@@ -74,4 +81,58 @@ export interface PostMessageTransport {
|
|
|
74
81
|
* discards the `as const satisfies keyof` allowlists, which cannot drift.
|
|
75
82
|
*/
|
|
76
83
|
export declare function createPostMessageTransport(channel: PostMessageChannel): PostMessageTransport;
|
|
84
|
+
/**
|
|
85
|
+
* A `MessagePort` the host transferred into or out of a worker, described
|
|
86
|
+
* structurally.
|
|
87
|
+
*
|
|
88
|
+
* This package compiles without the DOM lib, so `MessagePort` has no name here
|
|
89
|
+
* and the contract has to be spelled out.
|
|
90
|
+
*
|
|
91
|
+
* **The member set admits a `MessagePort` and REJECTS a `Worker` or the worker
|
|
92
|
+
* global**, both of which would otherwise fit a `postMessage` pipe. Only a port
|
|
93
|
+
* needs starting, so `start` is what tells the three apart, and naming it here
|
|
94
|
+
* turns "never bind a head to the global" into a compile error at the call
|
|
95
|
+
* site. A head on the global receives every other head's traffic.
|
|
96
|
+
*
|
|
97
|
+
* **That compile error happens at the ADOPTER, not here.** This package
|
|
98
|
+
* resolves neither `MessagePort` nor `Worker` as a type, so nothing here can
|
|
99
|
+
* demonstrate the rejection; a host compiling its worker against
|
|
100
|
+
* `lib.webworker` (or a page against `lib.dom`) is where the names resolve and
|
|
101
|
+
* the guard bites. Measured there: passing the worker global fails with
|
|
102
|
+
* `Property 'start' is missing in type 'DedicatedWorkerGlobalScope'`.
|
|
103
|
+
*/
|
|
104
|
+
export interface TransferredMessagePort {
|
|
105
|
+
postMessage(message: unknown): void;
|
|
106
|
+
addEventListener(type: 'message', listener: (event: unknown) => void, options?: unknown): void;
|
|
107
|
+
removeEventListener(type: 'message', listener: (event: unknown) => void, options?: unknown): void;
|
|
108
|
+
start(): void;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Build the reader/writer pair for a head's `MessagePort`, at either end.
|
|
112
|
+
*
|
|
113
|
+
* Disposing the writer (which the connection's own `dispose` does) posts a
|
|
114
|
+
* close signal after everything it wrote, and the other end's reader and writer
|
|
115
|
+
* then fire close, so a head tears down on its client's dispose as it does on a
|
|
116
|
+
* socket's close. For a connection at its default parallelism and message
|
|
117
|
+
* strategy, the close fires only once that end's connection has dispatched
|
|
118
|
+
* every message sent before the signal, under either `vscode-jsonrpc` runtime,
|
|
119
|
+
* so a `closeSession` sent just before the dispose still ends its session as
|
|
120
|
+
* closed. Nothing reports a page or a worker that dies, because the port
|
|
121
|
+
* cannot.
|
|
122
|
+
*
|
|
123
|
+
* **The transport and the connection must come from the same copy of
|
|
124
|
+
* `vscode-jsonrpc`.** The close is scheduled through the runtime abstraction
|
|
125
|
+
* layer of the copy this package imports. If the host builds its connection
|
|
126
|
+
* from another copy, that layer was never installed: the first message it
|
|
127
|
+
* delivers throws, and the peer's close never fires.
|
|
128
|
+
*
|
|
129
|
+
* **Both ends must use this.** A plain `BrowserMessageReader` peer hands the
|
|
130
|
+
* signal to its connection as a message it does not understand, and its own
|
|
131
|
+
* dispose posts nothing, so this end never learns that it went.
|
|
132
|
+
*
|
|
133
|
+
* Starts the port, because a listener added with `addEventListener` does not.
|
|
134
|
+
* From then on a message that arrives before the connection listens is dropped,
|
|
135
|
+
* so listen in the same task.
|
|
136
|
+
*/
|
|
137
|
+
export declare function createMessagePortTransport(port: TransferredMessagePort): PostMessageTransport;
|
|
77
138
|
//# sourceMappingURL=post-message-transport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-message-transport.d.ts","sourceRoot":"","sources":["../../src/client/post-message-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,
|
|
1
|
+
{"version":3,"file":"post-message-transport.d.ts","sourceRoot":"","sources":["../../src/client/post-message-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAMJ,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,aAA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
|
9
9
|
********************************************************************************/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.createPostMessageTransport = createPostMessageTransport;
|
|
12
|
+
exports.createMessagePortTransport = createMessagePortTransport;
|
|
12
13
|
const vscode_jsonrpc_1 = require("vscode-jsonrpc");
|
|
13
14
|
/**
|
|
14
15
|
* A `MessageReader` over a {@link PostMessageChannel}.
|
|
@@ -43,6 +44,7 @@ class PostMessageReader extends vscode_jsonrpc_1.AbstractMessageReader {
|
|
|
43
44
|
class PostMessageWriter extends vscode_jsonrpc_1.AbstractMessageWriter {
|
|
44
45
|
channel;
|
|
45
46
|
subscriptions = [];
|
|
47
|
+
errorCount = 0;
|
|
46
48
|
constructor(channel) {
|
|
47
49
|
super();
|
|
48
50
|
this.channel = channel;
|
|
@@ -52,7 +54,18 @@ class PostMessageWriter extends vscode_jsonrpc_1.AbstractMessageWriter {
|
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
write(message) {
|
|
55
|
-
|
|
57
|
+
try {
|
|
58
|
+
this.channel.post(message);
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
// `postMessage` throws synchronously on a value structured clone
|
|
62
|
+
// refuses. Thrown on, it would escape from the caller's
|
|
63
|
+
// `sendNotification` rather than reject it, and the connection would
|
|
64
|
+
// never see a write error.
|
|
65
|
+
this.errorCount++;
|
|
66
|
+
this.fireError(error, message, this.errorCount);
|
|
67
|
+
return Promise.reject(error);
|
|
68
|
+
}
|
|
56
69
|
// `postMessage` reports no completion, so the resolved promise means
|
|
57
70
|
// "handed over", not "delivered". vscode-jsonrpc only needs the former.
|
|
58
71
|
return Promise.resolve();
|
|
@@ -92,4 +105,165 @@ function createPostMessageTransport(channel) {
|
|
|
92
105
|
}
|
|
93
106
|
};
|
|
94
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* The value {@link createMessagePortTransport} posts in place of a JSON-RPC
|
|
110
|
+
* message to say its end is going away. A string, so no JSON-RPC message can
|
|
111
|
+
* be mistaken for it.
|
|
112
|
+
*/
|
|
113
|
+
const MESSAGE_PORT_CLOSE_SIGNAL = 'hydranium/message-port-closed';
|
|
114
|
+
/**
|
|
115
|
+
* A {@link PostMessageChannel} over a {@link TransferredMessagePort}, whose
|
|
116
|
+
* {@link close} posts {@link MESSAGE_PORT_CLOSE_SIGNAL}.
|
|
117
|
+
*
|
|
118
|
+
* **A port reports nothing when its peer goes away**: Chromium ships no `close`
|
|
119
|
+
* event on `MessagePort`, Firefox and WebKit have not committed to one, and
|
|
120
|
+
* `messageerror` fires only for a message that cannot be deserialized. So the
|
|
121
|
+
* end is signalled in band.
|
|
122
|
+
*
|
|
123
|
+
* The port is never `close()`d. A later transport can still be built on it, at
|
|
124
|
+
* both ends, and whether messages posted just before a `close()` are delivered
|
|
125
|
+
* is not something the platform settles.
|
|
126
|
+
*/
|
|
127
|
+
class MessagePortChannel {
|
|
128
|
+
port;
|
|
129
|
+
messageEmitter = new vscode_jsonrpc_1.Emitter();
|
|
130
|
+
closeEmitter = new vscode_jsonrpc_1.Emitter();
|
|
131
|
+
/** Set once either end has signalled; this end then delivers nothing more and never signals again. */
|
|
132
|
+
closed = false;
|
|
133
|
+
/** Set when the peer's signal has arrived and its close waits on {@link backlog}. */
|
|
134
|
+
closePending = false;
|
|
135
|
+
/** Messages handed to the connection that its queue may not have dispatched yet. */
|
|
136
|
+
backlog = 0;
|
|
137
|
+
// A `MessageEvent`, which the listener's type cannot name without the DOM lib.
|
|
138
|
+
listener = (event) => this.receive(event.data);
|
|
139
|
+
constructor(port) {
|
|
140
|
+
this.port = port;
|
|
141
|
+
port.addEventListener('message', this.listener);
|
|
142
|
+
}
|
|
143
|
+
post(message) {
|
|
144
|
+
if (!this.closed) {
|
|
145
|
+
this.port.postMessage(message);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
onMessage(listener) {
|
|
149
|
+
return this.messageEmitter.event(listener);
|
|
150
|
+
}
|
|
151
|
+
onClose(listener) {
|
|
152
|
+
return this.closeEmitter.event(listener);
|
|
153
|
+
}
|
|
154
|
+
/** Signal this end's close to the peer, once, after everything posted before it. */
|
|
155
|
+
close() {
|
|
156
|
+
if (this.closed) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this.end();
|
|
160
|
+
this.port.postMessage(MESSAGE_PORT_CLOSE_SIGNAL);
|
|
161
|
+
}
|
|
162
|
+
end() {
|
|
163
|
+
this.closed = true;
|
|
164
|
+
this.port.removeEventListener('message', this.listener);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Deliver one inbound value, or take the peer's signal.
|
|
168
|
+
*
|
|
169
|
+
* **The close waits until the connection has dispatched every message that
|
|
170
|
+
* came before it.** Firing it at once is safe under `vscode-jsonrpc`'s
|
|
171
|
+
* browser runtime, which drains the connection's queue on microtasks before
|
|
172
|
+
* the signal's own task runs. Under its Node runtime the queue gives out one
|
|
173
|
+
* message per `setImmediate` turn, so a close fired at once would overtake a
|
|
174
|
+
* `closeSession` still queued, and end that session as lost. So each
|
|
175
|
+
* delivered message is counted down on the same RAL timer, one per turn,
|
|
176
|
+
* scheduled after the connection's own, and the close fires when the count
|
|
177
|
+
* reaches zero: under either runtime, after the last dispatch.
|
|
178
|
+
*/
|
|
179
|
+
receive(data) {
|
|
180
|
+
if (this.closed) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (data === MESSAGE_PORT_CLOSE_SIGNAL) {
|
|
184
|
+
this.end();
|
|
185
|
+
this.closePending = true;
|
|
186
|
+
if (this.backlog === 0) {
|
|
187
|
+
this.closeEmitter.fire();
|
|
188
|
+
}
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
this.messageEmitter.fire(data);
|
|
192
|
+
this.backlog++;
|
|
193
|
+
if (this.backlog === 1) {
|
|
194
|
+
this.countDownBacklog();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// Mirrors the connection's queue at its default of one message per turn. A
|
|
198
|
+
// connection built with a `maxParallelism`, or with a `messageStrategy` that
|
|
199
|
+
// defers `next`, can hold messages longer than this counts, and its close
|
|
200
|
+
// can then overtake them.
|
|
201
|
+
countDownBacklog() {
|
|
202
|
+
(0, vscode_jsonrpc_1.RAL)().timer.setImmediate(() => {
|
|
203
|
+
this.backlog--;
|
|
204
|
+
if (this.backlog > 0) {
|
|
205
|
+
this.countDownBacklog();
|
|
206
|
+
}
|
|
207
|
+
else if (this.closePending) {
|
|
208
|
+
this.closeEmitter.fire();
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* A {@link PostMessageWriter} whose dispose, which a `MessageConnection`'s
|
|
215
|
+
* `dispose` and `end` both reach, signals this end's close to the peer.
|
|
216
|
+
*/
|
|
217
|
+
class MessagePortWriter extends PostMessageWriter {
|
|
218
|
+
channel;
|
|
219
|
+
constructor(channel) {
|
|
220
|
+
super(channel);
|
|
221
|
+
this.channel = channel;
|
|
222
|
+
}
|
|
223
|
+
dispose() {
|
|
224
|
+
this.channel.close();
|
|
225
|
+
super.dispose();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Build the reader/writer pair for a head's `MessagePort`, at either end.
|
|
230
|
+
*
|
|
231
|
+
* Disposing the writer (which the connection's own `dispose` does) posts a
|
|
232
|
+
* close signal after everything it wrote, and the other end's reader and writer
|
|
233
|
+
* then fire close, so a head tears down on its client's dispose as it does on a
|
|
234
|
+
* socket's close. For a connection at its default parallelism and message
|
|
235
|
+
* strategy, the close fires only once that end's connection has dispatched
|
|
236
|
+
* every message sent before the signal, under either `vscode-jsonrpc` runtime,
|
|
237
|
+
* so a `closeSession` sent just before the dispose still ends its session as
|
|
238
|
+
* closed. Nothing reports a page or a worker that dies, because the port
|
|
239
|
+
* cannot.
|
|
240
|
+
*
|
|
241
|
+
* **The transport and the connection must come from the same copy of
|
|
242
|
+
* `vscode-jsonrpc`.** The close is scheduled through the runtime abstraction
|
|
243
|
+
* layer of the copy this package imports. If the host builds its connection
|
|
244
|
+
* from another copy, that layer was never installed: the first message it
|
|
245
|
+
* delivers throws, and the peer's close never fires.
|
|
246
|
+
*
|
|
247
|
+
* **Both ends must use this.** A plain `BrowserMessageReader` peer hands the
|
|
248
|
+
* signal to its connection as a message it does not understand, and its own
|
|
249
|
+
* dispose posts nothing, so this end never learns that it went.
|
|
250
|
+
*
|
|
251
|
+
* Starts the port, because a listener added with `addEventListener` does not.
|
|
252
|
+
* From then on a message that arrives before the connection listens is dropped,
|
|
253
|
+
* so listen in the same task.
|
|
254
|
+
*/
|
|
255
|
+
function createMessagePortTransport(port) {
|
|
256
|
+
const channel = new MessagePortChannel(port);
|
|
257
|
+
const reader = new PostMessageReader(channel);
|
|
258
|
+
const writer = new MessagePortWriter(channel);
|
|
259
|
+
port.start();
|
|
260
|
+
return {
|
|
261
|
+
reader,
|
|
262
|
+
writer,
|
|
263
|
+
dispose() {
|
|
264
|
+
reader.dispose();
|
|
265
|
+
writer.dispose();
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
95
269
|
//# sourceMappingURL=post-message-transport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-message-transport.js","sourceRoot":"","sources":["../../src/client/post-message-transport.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;
|
|
1
|
+
{"version":3,"file":"post-message-transport.js","sourceRoot":"","sources":["../../src/client/post-message-transport.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;AAuKlF,gEAWC;AAuLD,gEAaC;AApXD,mDAUwB;AAmExB;;;;;GAKG;AACH,MAAM,iBAAkB,SAAQ,sCAAqB;IAC/B,cAAc,GAAG,IAAI,wBAAO,EAAW,CAAC;IACxC,aAAa,GAAiB,EAAE,CAAC;IAEpD,YAAY,OAA2B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CA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