@hydranium/protocol 1.0.0-next.19 → 1.0.0-next.192
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 +35 -1
- package/lib/abstract-logger.d.ts.map +1 -1
- package/lib/abstract-logger.js.map +1 -1
- package/lib/client/data-connection.d.ts +157 -0
- package/lib/client/data-connection.d.ts.map +1 -0
- package/lib/client/data-connection.js +236 -0
- package/lib/client/data-connection.js.map +1 -0
- package/lib/client/data-events.d.ts +13 -1
- package/lib/client/data-events.d.ts.map +1 -1
- package/lib/client/data-events.js +21 -0
- package/lib/client/data-events.js.map +1 -1
- package/lib/client/data-port.d.ts +24 -22
- package/lib/client/data-port.d.ts.map +1 -1
- package/lib/client/data-session.d.ts +461 -81
- package/lib/client/data-session.d.ts.map +1 -1
- package/lib/client/data-session.js +725 -108
- package/lib/client/data-session.js.map +1 -1
- package/lib/client/index.d.ts +14 -9
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/index.js +14 -9
- package/lib/client/index.js.map +1 -1
- package/lib/client/message-relay.d.ts +9 -3
- package/lib/client/message-relay.d.ts.map +1 -1
- package/lib/client/message-relay.js +11 -5
- package/lib/client/message-relay.js.map +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 +149 -0
- package/lib/client/rpc-connection.d.ts.map +1 -0
- package/lib/client/rpc-connection.js +202 -0
- package/lib/client/rpc-connection.js.map +1 -0
- package/lib/client-ids.d.ts +45 -0
- package/lib/client-ids.d.ts.map +1 -0
- package/lib/client-ids.js +48 -0
- package/lib/client-ids.js.map +1 -0
- 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 +4 -4
- package/lib/data/data-protocol-methods.d.ts.map +1 -1
- package/lib/data/data-protocol-methods.js +11 -1
- package/lib/data/data-protocol-methods.js.map +1 -1
- package/lib/data/data-server-protocol.d.ts +117 -36
- package/lib/data/data-server-protocol.d.ts.map +1 -1
- package/lib/data/events.d.ts +110 -15
- package/lib/data/events.d.ts.map +1 -1
- package/lib/data/requests.d.ts +67 -11
- package/lib/data/requests.d.ts.map +1 -1
- package/lib/debouncer.d.ts.map +1 -1
- package/lib/debouncer.js.map +1 -1
- package/lib/errors.d.ts +181 -29
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +261 -29
- 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 +4 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -1
- package/lib/latency-collector.d.ts +8 -4
- package/lib/latency-collector.d.ts.map +1 -1
- package/lib/latency-collector.js.map +1 -1
- package/lib/logger.d.ts +22 -1
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js +31 -3
- package/lib/logger.js.map +1 -1
- package/lib/messages/index.d.ts +29 -0
- package/lib/messages/index.d.ts.map +1 -0
- package/lib/messages/index.js +59 -0
- package/lib/messages/index.js.map +1 -0
- package/lib/messages/primitives.d.ts +188 -0
- package/lib/messages/primitives.d.ts.map +1 -0
- package/lib/messages/primitives.js +161 -0
- package/lib/messages/primitives.js.map +1 -0
- package/lib/model-server.d.ts +60 -13
- package/lib/model-server.d.ts.map +1 -1
- package/lib/model-server.js +4 -2
- package/lib/model-server.js.map +1 -1
- package/lib/model-service/base-version.d.ts +64 -0
- package/lib/model-service/base-version.d.ts.map +1 -0
- package/lib/model-service/base-version.js +43 -0
- package/lib/model-service/base-version.js.map +1 -0
- package/lib/model-service/index.d.ts +1 -1
- package/lib/model-service/index.d.ts.map +1 -1
- package/lib/model-service/index.js +4 -5
- package/lib/model-service/index.js.map +1 -1
- package/lib/model-service/reference-candidate.d.ts +5 -3
- package/lib/model-service/reference-candidate.d.ts.map +1 -1
- package/lib/noop-logger.d.ts.map +1 -1
- package/lib/noop-logger.js.map +1 -1
- package/lib/observable-value.js.map +1 -1
- package/lib/patch-merge.d.ts +35 -32
- package/lib/patch-merge.d.ts.map +1 -1
- package/lib/patch-merge.js +67 -23
- package/lib/patch-merge.js.map +1 -1
- package/lib/profile-session.d.ts +8 -4
- package/lib/profile-session.d.ts.map +1 -1
- package/lib/profile-session.js.map +1 -1
- package/lib/reconcile-write.d.ts +65 -0
- package/lib/reconcile-write.d.ts.map +1 -0
- package/lib/reconcile-write.js +67 -0
- package/lib/reconcile-write.js.map +1 -0
- package/lib/rpc/bind-rpc-methods.d.ts +29 -3
- package/lib/rpc/bind-rpc-methods.d.ts.map +1 -1
- package/lib/rpc/bind-rpc-methods.js +22 -3
- package/lib/rpc/bind-rpc-methods.js.map +1 -1
- package/lib/rpc/create-rpc-proxy.d.ts +10 -0
- package/lib/rpc/create-rpc-proxy.d.ts.map +1 -1
- package/lib/rpc/create-rpc-proxy.js +12 -2
- package/lib/rpc/create-rpc-proxy.js.map +1 -1
- package/lib/rpc/wire-prefix.js.map +1 -1
- package/lib/testing/catalogue-audit.d.ts +80 -0
- package/lib/testing/catalogue-audit.d.ts.map +1 -0
- package/lib/testing/catalogue-audit.js +94 -0
- package/lib/testing/catalogue-audit.js.map +1 -0
- package/lib/testing/data-doubles.d.ts +13 -12
- package/lib/testing/data-doubles.d.ts.map +1 -1
- package/lib/testing/data-doubles.js +19 -5
- 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/index.d.ts +1 -0
- package/lib/testing/index.d.ts.map +1 -1
- package/lib/testing/index.js +5 -2
- package/lib/testing/index.js.map +1 -1
- package/lib/testing/node/duplex-connection.js.map +1 -1
- package/lib/testing/node/duplex-stream.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/testing/wait-for.js.map +1 -1
- package/lib/tracer.d.ts.map +1 -1
- package/lib/tracer.js.map +1 -1
- package/lib/transfer-diagnostic.d.ts +33 -0
- package/lib/transfer-diagnostic.d.ts.map +1 -1
- package/lib/transfer-diagnostic.js +23 -0
- package/lib/transfer-diagnostic.js.map +1 -1
- package/lib/transfer-document.d.ts +59 -32
- package/lib/transfer-document.d.ts.map +1 -1
- package/lib/transfer-document.js +17 -9
- package/lib/transfer-document.js.map +1 -1
- package/lib/uri.d.ts.map +1 -1
- package/lib/uri.js.map +1 -1
- package/lib/util.d.ts +8 -0
- package/lib/util.d.ts.map +1 -1
- package/lib/util.js +32 -0
- package/lib/util.js.map +1 -1
- package/package.json +27 -18
- package/src/client/data-connection.ts +314 -0
- package/src/client/data-events.ts +33 -1
- package/src/client/data-port.ts +25 -23
- package/src/client/data-session.ts +922 -126
- package/src/client/index.ts +14 -9
- package/src/client/message-relay.ts +29 -7
- package/src/client/post-message-transport.ts +219 -4
- package/src/client/rpc-connection.ts +268 -0
- package/src/client-ids.ts +49 -0
- package/src/clock.ts +56 -0
- package/src/data/data-protocol-methods.ts +12 -4
- package/src/data/data-server-protocol.ts +140 -36
- package/src/data/events.ts +116 -15
- package/src/data/requests.ts +71 -11
- package/src/errors.ts +311 -36
- package/src/glsp-save-model-actions.ts +59 -0
- package/src/index.ts +7 -0
- package/src/latency-collector.ts +8 -3
- package/src/logger.ts +28 -2
- package/src/messages/index.ts +36 -0
- package/src/messages/primitives.ts +271 -0
- package/src/model-server.ts +63 -18
- package/src/model-service/base-version.ts +72 -0
- package/src/model-service/index.ts +4 -5
- package/src/model-service/reference-candidate.ts +5 -3
- package/src/patch-merge.ts +97 -42
- package/src/profile-session.ts +9 -4
- package/src/reconcile-write.ts +124 -0
- package/src/rpc/bind-rpc-methods.ts +49 -4
- package/src/rpc/create-rpc-proxy.ts +20 -2
- package/src/testing/catalogue-audit.ts +111 -0
- package/src/testing/data-doubles.ts +42 -17
- package/src/testing/fake-clock.ts +62 -47
- package/src/testing/index.ts +5 -2
- package/src/testing/node/index.ts +2 -2
- package/src/testing/node/message-port-pair.ts +40 -0
- package/src/transfer-diagnostic.ts +40 -0
- package/src/transfer-document.ts +74 -34
- package/src/util.ts +33 -0
- package/lib/model-service/args.d.ts +0 -64
- package/lib/model-service/args.d.ts.map +0 -1
- package/lib/model-service/args.js +0 -11
- package/lib/model-service/args.js.map +0 -1
- package/src/model-service/args.ts +0 -67
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer-document.d.ts","sourceRoot":"","sources":["../src/transfer-document.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"transfer-document.d.ts","sourceRoot":"","sources":["../src/transfer-document.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAkB,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEnG,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB,CAAC,KAAK,SAAS,eAAe,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AW,CAAC,GAClD,sBAAsB,CAAC,SAAS,EAAE,WAAW,CAAC,CAKhD;IAED,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,SAAS,SAAS,eAAe,EAAE,WAAW,GAAG,kBAAkB,EACvF,GAAG,EAAE,MAAM,GACX,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAE1C;IAED;;;OAGG;IACH,SAAgB,MAAM,CAAC,SAAS,SAAS,eAAe,EAAE,WAAW,GAAG,kBAAkB,EACvF,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,WAAW,EAAE,EAC3B,IAAI,CAAC,EAAE,SAAS,GAChB,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAM1C;CACH"}
|
package/lib/transfer-document.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
********************************************************************************/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.TransferDocument = void 0;
|
|
12
|
+
const base_version_1 = require("./model-service/base-version");
|
|
12
13
|
var TransferDocument;
|
|
13
14
|
(function (TransferDocument) {
|
|
14
15
|
/**
|
|
@@ -16,13 +17,13 @@ var TransferDocument;
|
|
|
16
17
|
* ordinary state — a view bound to a file that may not exist yet.
|
|
17
18
|
*/
|
|
18
19
|
function isLoaded(document) {
|
|
19
|
-
return document.
|
|
20
|
+
return document.model !== undefined;
|
|
20
21
|
}
|
|
21
22
|
TransferDocument.isLoaded = isLoaded;
|
|
22
23
|
/**
|
|
23
|
-
* The same document with `
|
|
24
|
+
* The same document with `model` no longer optional, or a throw. For call
|
|
24
25
|
* sites where absence is a bug rather than a branch; the whole envelope is
|
|
25
|
-
* returned because a caller needing `
|
|
26
|
+
* returned because a caller needing `model` usually needs `uri` or `text`
|
|
26
27
|
* with it.
|
|
27
28
|
*/
|
|
28
29
|
function assertLoaded(document) {
|
|
@@ -32,14 +33,21 @@ var TransferDocument;
|
|
|
32
33
|
return document;
|
|
33
34
|
}
|
|
34
35
|
TransferDocument.assertLoaded = assertLoaded;
|
|
36
|
+
/** The envelope for a document the server does not have. */
|
|
37
|
+
function absent(uri) {
|
|
38
|
+
return { uri };
|
|
39
|
+
}
|
|
40
|
+
TransferDocument.absent = absent;
|
|
35
41
|
/**
|
|
36
|
-
* Construct a {@link TransferDocument} envelope
|
|
37
|
-
*
|
|
38
|
-
* "no diagnostics yet" code paths don't need to repeat the empty array
|
|
39
|
-
* at every call site.
|
|
42
|
+
* Construct a {@link TransferDocument} envelope with a model, its version
|
|
43
|
+
* marked as coming from a read. `diagnostics` absent means not validated.
|
|
40
44
|
*/
|
|
41
|
-
function create(uri, version, root, diagnostics
|
|
42
|
-
return {
|
|
45
|
+
function create(uri, version, root, hash, diagnostics, text) {
|
|
46
|
+
return {
|
|
47
|
+
uri,
|
|
48
|
+
model: { root, version: (0, base_version_1.asModelVersion)(version), hash, ...(diagnostics === undefined ? {} : { diagnostics }) },
|
|
49
|
+
...(text === undefined ? {} : { text })
|
|
50
|
+
};
|
|
43
51
|
}
|
|
44
52
|
TransferDocument.create = create;
|
|
45
53
|
})(TransferDocument || (exports.TransferDocument = TransferDocument = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer-document.js","sourceRoot":"","sources":["../src/transfer-document.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;
|
|
1
|
+
{"version":3,"file":"transfer-document.js","sourceRoot":"","sources":["../src/transfer-document.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAIlF,+DAAmG;AA4EnG,IAAiB,gBAAgB,CAmDhC;AAnDD,WAAiB,gBAAgB;IAC9B;;;OAGG;IACH,SAAgB,QAAQ,CACrB,QAAkD;QAElD,OAAO,QAAQ,CAAC,KAAK,KAAK,SAAS,CAAC;IACvC,CAAC;IAJe,iBAAA,QAAQ,WAIvB,CAAA;IAED;;;;;OAKG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AACvG,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAEnF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../src/uri.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAA;CAAE,CAAC;AAEzE,uGAAuG;AACvG,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAEnF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,UAAW,MAAM,KAAG,YAAqC,CAAC;AAErF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,UAAW,MAAM,KAAG,iBAA+C,CAAC"}
|
package/lib/uri.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uri.js","sourceRoot":"","sources":["../src/uri.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAuClF;;;;;;GAMG;AACI,MAAM,cAAc,GAAG,CAAC,KAAa,EAAgB,EAAE,CAAC,KAAqB,CAAC;AAAxE,QAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"uri.js","sourceRoot":"","sources":["../src/uri.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAuClF;;;;;;GAMG;AACI,MAAM,cAAc,GAAG,CAAC,KAAa,EAAgB,EAAE,CAAC,KAAqB,CAAC;AAAxE,QAAA,cAAc,GAAd,cAAc,CAA0D;AAErF;;;;GAIG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAqB,EAAE,CAAC,KAA0B,CAAC;AAAvF,QAAA,mBAAmB,GAAnB,mBAAmB,CAAoE"}
|
package/lib/util.d.ts
CHANGED
|
@@ -144,4 +144,12 @@ export declare function unreachable(input: never): never;
|
|
|
144
144
|
* uncertain, then narrow with a type-guard.
|
|
145
145
|
*/
|
|
146
146
|
export declare function getAt<T = unknown>(obj: unknown, path: string[]): T | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* A stable, non-cryptographic digest of `text`, equal on every host for equal
|
|
149
|
+
* text: the `TextState.hash` a data server stamps, so a client can
|
|
150
|
+
* hash text of its own to compare. An array is read as its elements joined, so
|
|
151
|
+
* a large text is hashed in parts without concatenating it. It tells whether a
|
|
152
|
+
* text changed, not who could forge one.
|
|
153
|
+
*/
|
|
154
|
+
export declare function textHash(text: string | readonly string[]): string;
|
|
147
155
|
//# sourceMappingURL=util.d.ts.map
|
package/lib/util.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,qCAAqC;AACrC,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC;AAExD;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACxB,OAAO,IAAI,IAAI,CAAC;CAClB;AAED,yBAAiB,UAAU,CAAC;IACzB,SAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,UAAU,CAEtD;IACD;;;;;;OAMG;IACI,MAAM,KAAK,EAAE,UAAwD,CAAC;CAC/E;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,oBAAqB,YAAW,UAAU;IACpD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,EAAE,CAAM;IAClD,SAAS,CAAC,SAAS,UAAS;IAE5B,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU;
|
|
1
|
+
{"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,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAE/C;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAS9E;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,MAAM,CAGjE"}
|
package/lib/util.js
CHANGED
|
@@ -20,6 +20,7 @@ exports.identity = identity;
|
|
|
20
20
|
exports.findNextUnique = findNextUnique;
|
|
21
21
|
exports.unreachable = unreachable;
|
|
22
22
|
exports.getAt = getAt;
|
|
23
|
+
exports.textHash = textHash;
|
|
23
24
|
var Disposable;
|
|
24
25
|
(function (Disposable) {
|
|
25
26
|
function create(dispose) {
|
|
@@ -208,4 +209,35 @@ function getAt(obj, path) {
|
|
|
208
209
|
}
|
|
209
210
|
return cur;
|
|
210
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* A stable, non-cryptographic digest of `text`, equal on every host for equal
|
|
214
|
+
* text: the `TextState.hash` a data server stamps, so a client can
|
|
215
|
+
* hash text of its own to compare. An array is read as its elements joined, so
|
|
216
|
+
* a large text is hashed in parts without concatenating it. It tells whether a
|
|
217
|
+
* text changed, not who could forge one.
|
|
218
|
+
*/
|
|
219
|
+
function textHash(text) {
|
|
220
|
+
const { high, low } = cyrb53(typeof text === 'string' ? [text] : text);
|
|
221
|
+
return high.toString(16).padStart(8, '0') + low.toString(16).padStart(8, '0');
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* The two 32-bit words cyrb53 ends on, each unsigned, for `parts` read as one
|
|
225
|
+
* string. It needs no `node:*` module, so every host runs it.
|
|
226
|
+
*/
|
|
227
|
+
function cyrb53(parts) {
|
|
228
|
+
let h1 = 0xdeadbeef;
|
|
229
|
+
let h2 = 0x41c6ce57;
|
|
230
|
+
for (const part of parts) {
|
|
231
|
+
for (let i = 0; i < part.length; i++) {
|
|
232
|
+
const code = part.charCodeAt(i);
|
|
233
|
+
h1 = Math.imul(h1 ^ code, 2654435761);
|
|
234
|
+
h2 = Math.imul(h2 ^ code, 1597334677);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507);
|
|
238
|
+
h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909);
|
|
239
|
+
h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507);
|
|
240
|
+
h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909);
|
|
241
|
+
return { high: h2 >>> 0, low: h1 >>> 0 };
|
|
242
|
+
}
|
|
211
243
|
//# sourceMappingURL=util.js.map
|
package/lib/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;AAmBlF,IAAiB,UAAU,CAY1B;AAZD,WAAiB,UAAU;IACxB,SAAgB,MAAM,CAAC,OAAmB;QACvC,OAAO,EAAE,OAAO,EAAE,CAAC;IACtB,CAAC;IAFe,WAAA,MAAM,SAErB,CAAA;IACD;;;;;;OAMG;IACU,gBAAK,GAAe,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;AAChF,CAAC,EAZgB,UAAU,aAAV,UAAU,GAAV,UAAU,QAY1B;AAED;;;;;;;;;;;;;;;GAeG;AACH;IACsB,WAAW,GAAiB,EAAE,CAAC;IACxC,SAAS,GAAG,KAAK,CAAC;IAE5B,IAAI,QAAQ;QACT,OAAO,IAAI,CAAC,SAAS,CAAC;IACzB,CAAC;IAED,IAAI,CAAC,U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|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hydranium/protocol",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.192",
|
|
4
4
|
"description": "Generic, language-agnostic types, constants, and pure utilities for the hydranium framework.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hydranium",
|
|
@@ -14,16 +14,23 @@
|
|
|
14
14
|
"bugs": {
|
|
15
15
|
"url": "https://github.com/eclipse-emfcloud/hydranium/issues"
|
|
16
16
|
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": {
|
|
19
|
+
"name": "Hydranium Team"
|
|
20
|
+
},
|
|
17
21
|
"repository": {
|
|
18
22
|
"type": "git",
|
|
19
23
|
"url": "https://github.com/eclipse-emfcloud/hydranium.git",
|
|
20
24
|
"directory": "packages/protocol"
|
|
21
25
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
+
"files": [
|
|
27
|
+
"lib",
|
|
28
|
+
"src",
|
|
29
|
+
"!lib/**/*.tsbuildinfo"
|
|
30
|
+
],
|
|
26
31
|
"sideEffects": false,
|
|
32
|
+
"main": "lib/index.js",
|
|
33
|
+
"types": "lib/index.d.ts",
|
|
27
34
|
"exports": {
|
|
28
35
|
".": {
|
|
29
36
|
"types": "./lib/index.d.ts",
|
|
@@ -41,6 +48,14 @@
|
|
|
41
48
|
"types": "./lib/data/index.d.ts",
|
|
42
49
|
"default": "./lib/data/index.js"
|
|
43
50
|
},
|
|
51
|
+
"./messages": {
|
|
52
|
+
"types": "./lib/messages/index.d.ts",
|
|
53
|
+
"default": "./lib/messages/index.js"
|
|
54
|
+
},
|
|
55
|
+
"./lib/messages": {
|
|
56
|
+
"types": "./lib/messages/index.d.ts",
|
|
57
|
+
"default": "./lib/messages/index.js"
|
|
58
|
+
},
|
|
44
59
|
"./testing": {
|
|
45
60
|
"types": "./lib/testing/index.d.ts",
|
|
46
61
|
"default": "./lib/testing/index.js"
|
|
@@ -62,17 +77,13 @@
|
|
|
62
77
|
"default": "./lib/testing/node/index.js"
|
|
63
78
|
}
|
|
64
79
|
},
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"lib",
|
|
69
|
-
"src",
|
|
70
|
-
"!lib/**/*.tsbuildinfo"
|
|
71
|
-
],
|
|
80
|
+
"publishConfig": {
|
|
81
|
+
"access": "public"
|
|
82
|
+
},
|
|
72
83
|
"scripts": {
|
|
73
84
|
"build": "tsc -b",
|
|
74
85
|
"clean": "rimraf lib tsconfig.tsbuildinfo",
|
|
75
|
-
"lint": "
|
|
86
|
+
"lint": "oxlint --format stylish --config ../../oxlint.config.cjs src test --max-warnings 0",
|
|
76
87
|
"prepack": "node -e \"const m=require('./package.json'),fs=require('node:fs');const missing=[m.main,...Object.values(m.bin||{})].filter(entry=>entry&&!fs.existsSync(entry));if(missing.length){console.error('prepack '+m.name+': not built ('+missing.join(', ')+' missing). Run the build before packing: a files entry that matches nothing is skipped silently, so the tarball would ship src only.');process.exit(1);}\"",
|
|
77
88
|
"test": "npm run typecheck:test && vitest run",
|
|
78
89
|
"typecheck:test": "tsc --noEmit -p tsconfig.test.json",
|
|
@@ -84,17 +95,15 @@
|
|
|
84
95
|
"devDependencies": {
|
|
85
96
|
"fast-check": "^3.23.2",
|
|
86
97
|
"rimraf": "^5.0.0",
|
|
87
|
-
"typescript": "^
|
|
98
|
+
"typescript": "^7.0.2",
|
|
88
99
|
"vscode-jsonrpc": "9.0.1"
|
|
89
100
|
},
|
|
90
101
|
"peerDependencies": {
|
|
91
|
-
"vscode-jsonrpc": "
|
|
102
|
+
"vscode-jsonrpc": "9.0.1"
|
|
92
103
|
},
|
|
93
104
|
"engines": {
|
|
94
105
|
"node": ">=22.13"
|
|
95
106
|
},
|
|
96
|
-
"
|
|
97
|
-
"access": "public"
|
|
98
|
-
},
|
|
107
|
+
"//peerDependencies": "`vscode-jsonrpc` is EXACT rather than a range, because it is one link of an atomic chain with no independently movable link: `vscode-languageserver-protocol` depends on it at exactly 9.0.1, so any other value an adopter supplies is a SECOND physical copy rather than an upgrade. This wire stack breaks on copy identity rather than on structure — `ParameterStructures.auto` is a singleton compared by `===` in connection.js, so a request type built by one copy and sent over a connection owned by the other throws `Unknown parameter structure auto`. A caret or union range was rejected because npm then resolves a `vscode-jsonrpc@8.2.0` tree SILENTLY, with no diagnostic at all, and the failure surfaces only later at server init. Exact does not fail the install either — npm downgrades an unsatisfiable peer to a warning — but it is a NAMED ERESOLVE warning printing the required version beside the found one, and a hard error for anyone installing with `--strict-peer-deps`. It does NOT prevent a NESTED copy — `@eclipse-glsp/*` carries its own exact `vscode-jsonrpc@8.2.0` dependency and root `overrides` do not ship — so a consumer of the GLSP head must pin the chain in its own manifest, and docs/adopting/requirements.md carries the block to paste.",
|
|
99
108
|
"//prepack": "The publish guard, and it deliberately is NOT a `prepare`: npm runs a workspace `prepare` BEFORE the root `postinstall` that applies patches/vscode-jsonrpc+9.0.1.patch, so building there fails on a cold clone and npm rolls the entire install back. `prepack` runs only when a tarball is made (`npm pack`, `npm publish`) and never on install, so it cannot break the install it has no business touching. It FAILS rather than rebuilds, because the rebuild is exactly the part that ordering defeats. What it defends against: `files` lists `lib`, `lib` is gitignored, and a `files` entry matching nothing is skipped SILENTLY — so `npm publish` from an unbuilt tree emits a tarball of `src` and nothing else, with no error."
|
|
100
109
|
}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
import { Emitter, type Event } from 'vscode-jsonrpc';
|
|
11
|
+
import { FRAMEWORK_CLIENT_IDS } from '../client-ids';
|
|
12
|
+
import {
|
|
13
|
+
DATA_CLIENT_PROTOCOL_METHODS,
|
|
14
|
+
DATA_SERVER_WIRE_PREFIX,
|
|
15
|
+
type DataClientProtocol,
|
|
16
|
+
type DataServerProtocol,
|
|
17
|
+
type DiagnosticOf,
|
|
18
|
+
type ProjectOf,
|
|
19
|
+
type TransferDocumentDirtyChangedEvent,
|
|
20
|
+
type TransferDocumentUpdatedEvent
|
|
21
|
+
} from '../data';
|
|
22
|
+
import { DuplicateClientIdError, ReservedClientIdError } from '../errors';
|
|
23
|
+
import type { TransferElement } from '../transfer-element';
|
|
24
|
+
import { DataEvents } from './data-events';
|
|
25
|
+
import type { DataPort } from './data-port';
|
|
26
|
+
import { DataSession, type DataSessionFactory } from './data-session';
|
|
27
|
+
import { RpcConnection, type RpcConnectionLifecycle } from './rpc-connection';
|
|
28
|
+
|
|
29
|
+
/** Options for {@link DataConnection}. */
|
|
30
|
+
export interface DataConnectionOptions<
|
|
31
|
+
TTransfer extends TransferElement = TransferElement,
|
|
32
|
+
TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>
|
|
33
|
+
> extends RpcConnectionLifecycle {
|
|
34
|
+
/**
|
|
35
|
+
* Wire namespace the server is addressed under. Defaults to the
|
|
36
|
+
* framework's {@link DATA_SERVER_WIRE_PREFIX}, which is what an unmodified
|
|
37
|
+
* `DataServer` binds. Override only alongside the server's own
|
|
38
|
+
* `methodNamespace` option — a mismatch turns every request into
|
|
39
|
+
* "Unhandled method" rather than failing at wire-up.
|
|
40
|
+
*/
|
|
41
|
+
readonly methodNamespace?: string;
|
|
42
|
+
/** Builds the sessions `createSession` hands out. Defaults to a plain {@link DataSession}. */
|
|
43
|
+
readonly sessionFactory?: DataSessionFactory<TTransfer, TServer>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** {@link DataConnectionOptions} for a client that does not speak {@link DataClientProtocol}. */
|
|
47
|
+
export interface DataConnectionOptionsWithMethods<
|
|
48
|
+
TClient extends object,
|
|
49
|
+
TTransfer extends TransferElement = TransferElement,
|
|
50
|
+
TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>
|
|
51
|
+
> extends DataConnectionOptions<TTransfer, TServer> {
|
|
52
|
+
/**
|
|
53
|
+
* Method names of the client to bind as inbound handlers. Declare it
|
|
54
|
+
* `as const satisfies ReadonlyArray<keyof YourClient & string>` so the list
|
|
55
|
+
* cannot drift from the interface.
|
|
56
|
+
*/
|
|
57
|
+
readonly clientMethods: readonly (keyof TClient & string)[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Trailing constructor arguments, required only when the client cannot take
|
|
62
|
+
* the framework's default method list.
|
|
63
|
+
*
|
|
64
|
+
* `bindRpcMethods` throws for a name the target does not implement, so a
|
|
65
|
+
* request/response-only client binding the default list fails at wire-up. The
|
|
66
|
+
* conditional turns that into a compile error.
|
|
67
|
+
*/
|
|
68
|
+
export type DataConnectionArgs<
|
|
69
|
+
TTransfer extends TransferElement,
|
|
70
|
+
TClient extends object,
|
|
71
|
+
TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>
|
|
72
|
+
> =
|
|
73
|
+
TClient extends DataClientProtocol<TTransfer>
|
|
74
|
+
? [options?: DataConnectionOptions<TTransfer, TServer> & Partial<DataConnectionOptionsWithMethods<TClient, TTransfer, TServer>>]
|
|
75
|
+
: [options: DataConnectionOptionsWithMethods<TClient, TTransfer, TServer>];
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* A {@link RpcConnection} to the data head, carrying as many participants as
|
|
79
|
+
* the host has interested parties.
|
|
80
|
+
*
|
|
81
|
+
* Document operations live on the participants rather than here: they carry a
|
|
82
|
+
* `clientId`, which identifies a participant rather than a wire, and the server
|
|
83
|
+
* keys its opens and watches per `(uri, clientId)`. Two parties sharing one
|
|
84
|
+
* identity cannot tell each other's writes from their own echoes.
|
|
85
|
+
*
|
|
86
|
+
* Generic over the transfer root so this file names no grammar. An adopter
|
|
87
|
+
* binds the concrete root (or the union of them, for a multi-grammar head) at
|
|
88
|
+
* its own edge.
|
|
89
|
+
*/
|
|
90
|
+
export class DataConnection<
|
|
91
|
+
TTransfer extends TransferElement,
|
|
92
|
+
TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>,
|
|
93
|
+
TClient extends object = DataClientProtocol<TTransfer>
|
|
94
|
+
> extends RpcConnection<TServer, TClient> {
|
|
95
|
+
protected readonly sessions = new Set<DataSession<TTransfer, TServer>>();
|
|
96
|
+
protected readonly sessionFactory: DataSessionFactory<TTransfer, TServer>;
|
|
97
|
+
protected readonly createSessionEmitter = new Emitter<DataSession<TTransfer, TServer>>();
|
|
98
|
+
/**
|
|
99
|
+
* Fires with each session {@link createSession} starts, before it returns,
|
|
100
|
+
* so a listener sees every session a caller can. A session started before
|
|
101
|
+
* the listener subscribed is in {@link liveSessions}.
|
|
102
|
+
*/
|
|
103
|
+
readonly onDidCreateSession: Event<DataSession<TTransfer, TServer>> = this.createSessionEmitter.event;
|
|
104
|
+
/**
|
|
105
|
+
* Per URI, the `dirty` the client was last told since a session of this
|
|
106
|
+
* connection last opened the URI. A restore tells the client its answer
|
|
107
|
+
* only where it differs, so the client hears changes and nothing else; see
|
|
108
|
+
* {@link DataSessionHost.restoreDirty}.
|
|
109
|
+
*/
|
|
110
|
+
protected readonly dirtyStates = new Map<string, boolean>();
|
|
111
|
+
/** Backs each session's {@link DataSessionHost.onDidChangeDirty}. */
|
|
112
|
+
protected readonly dirtyChangedEmitter = new Emitter<TransferDocumentDirtyChangedEvent>();
|
|
113
|
+
/** Backs each session's {@link DataSessionHost.onDidUpdateDocument}. */
|
|
114
|
+
protected readonly documentUpdatedEmitter = new Emitter<TransferDocumentUpdatedEvent<TTransfer, DiagnosticOf<TServer>>>();
|
|
115
|
+
|
|
116
|
+
constructor(port: DataPort, client: TClient, ...rest: DataConnectionArgs<TTransfer, TClient, TServer>) {
|
|
117
|
+
const [options = {}] = rest as [
|
|
118
|
+
(DataConnectionOptions<TTransfer, TServer> & Partial<DataConnectionOptionsWithMethods<TClient, TTransfer, TServer>>)?
|
|
119
|
+
];
|
|
120
|
+
super(port, client, {
|
|
121
|
+
methodNamespace: options.methodNamespace ?? DATA_SERVER_WIRE_PREFIX,
|
|
122
|
+
// The default is reachable only where `TClient` satisfies
|
|
123
|
+
// `DataClientProtocol`, which the constructor's conditional enforces;
|
|
124
|
+
// the compiler cannot carry that through to the generic parameter.
|
|
125
|
+
clientMethods: options.clientMethods ?? (DATA_CLIENT_PROTOCOL_METHODS as unknown as readonly (keyof TClient & string)[]),
|
|
126
|
+
lifecycle: options
|
|
127
|
+
});
|
|
128
|
+
this.sessionFactory =
|
|
129
|
+
options.sessionFactory ?? ((clientId, host, label) => new DataSession<TTransfer, TServer>(clientId, host, label));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The sessions of this connection that have not ended, in the order they
|
|
134
|
+
* started. A session is listed until its `onDidDispose` fires, or until
|
|
135
|
+
* {@link dispose} clears the list.
|
|
136
|
+
*/
|
|
137
|
+
get liveSessions(): readonly DataSession<TTransfer, TServer>[] {
|
|
138
|
+
return [...this.sessions];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Start a participant on this connection, registered with the server under a
|
|
143
|
+
* fresh id, `label` plus `#` plus a random UUID, or under `clientId` when
|
|
144
|
+
* given. Pass a `label` naming the participant; without one it is
|
|
145
|
+
* `session`. Synchronous: the registration is sent at once, and the
|
|
146
|
+
* session's calls wait for it. The server refuses an id live anywhere in
|
|
147
|
+
* its process, and every call of that session then rejects with an error
|
|
148
|
+
* `isDuplicateClientIdError` recognises; an id the server reserves beyond
|
|
149
|
+
* {@link FRAMEWORK_CLIENT_IDS}, such as the integrity author, with one
|
|
150
|
+
* `isReservedClientIdError` recognises. Only the code crosses the wire, so
|
|
151
|
+
* test with those guards rather than `instanceof`.
|
|
152
|
+
*
|
|
153
|
+
* Throws a {@link ReservedClientIdError} for an id in
|
|
154
|
+
* {@link FRAMEWORK_CLIENT_IDS} — those are authors the SERVER emits rather
|
|
155
|
+
* than participants, so a session holding one would read the framework's
|
|
156
|
+
* own broadcasts as its own echoes and drop them — and a
|
|
157
|
+
* {@link DuplicateClientIdError} for an id a live session on this
|
|
158
|
+
* connection already holds.
|
|
159
|
+
*/
|
|
160
|
+
createSession(label = 'session', clientId?: string): DataSession<TTransfer, TServer> {
|
|
161
|
+
this.assertLive();
|
|
162
|
+
const id = clientId ?? `${label}#${globalThis.crypto.randomUUID()}`;
|
|
163
|
+
if (FRAMEWORK_CLIENT_IDS.includes(id)) {
|
|
164
|
+
throw new ReservedClientIdError(id);
|
|
165
|
+
}
|
|
166
|
+
if ([...this.sessions].some(session => session.clientId === id)) {
|
|
167
|
+
throw new DuplicateClientIdError(id);
|
|
168
|
+
}
|
|
169
|
+
const session = this.sessionFactory(
|
|
170
|
+
id,
|
|
171
|
+
{
|
|
172
|
+
connected: () => this.connected(),
|
|
173
|
+
reportError: (error, reported) => this.reportError(error, reported),
|
|
174
|
+
restoreDirty: event => {
|
|
175
|
+
if (this.dirtyStates.get(event.uri) !== (event.text?.dirty ?? false)) {
|
|
176
|
+
this.deliverDirty(event);
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
forgetDirty: uri => this.dirtyStates.delete(uri),
|
|
180
|
+
onDidChangeDirty: this.dirtyChangedEmitter.event,
|
|
181
|
+
onDidUpdateDocument: this.documentUpdatedEmitter.event
|
|
182
|
+
},
|
|
183
|
+
label
|
|
184
|
+
);
|
|
185
|
+
this.sessions.add(session);
|
|
186
|
+
// Subscribed before the session is handed out, so the id is free again
|
|
187
|
+
// on this connection by the time any caller's listener runs.
|
|
188
|
+
session.onDidDispose(() => this.sessions.delete(session));
|
|
189
|
+
// A failure reaches the session's own calls, which wait for the same
|
|
190
|
+
// registration; caught here only so it is not also reported unhandled.
|
|
191
|
+
session.connected().catch(() => undefined);
|
|
192
|
+
this.createSessionEmitter.fire(session);
|
|
193
|
+
return session;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The client, with its `onDocumentDirtyChanged` passing through
|
|
198
|
+
* {@link deliverDirty} first, so {@link dirtyStates} holds what the server
|
|
199
|
+
* told it, and every session hears it through {@link dirtyChangedEmitter};
|
|
200
|
+
* and with its `onDocumentUpdated` heard by every session through
|
|
201
|
+
* {@link documentUpdatedEmitter} first. Every other bound method forwards
|
|
202
|
+
* to the client unchanged, and one the client lacks stays absent, so the
|
|
203
|
+
* binding still refuses it.
|
|
204
|
+
*/
|
|
205
|
+
protected override localTarget(): TClient {
|
|
206
|
+
const client = this.client as unknown as Record<string, unknown>;
|
|
207
|
+
const hearsDirty = typeof client.onDocumentDirtyChanged === 'function';
|
|
208
|
+
const hearsUpdates = typeof client.onDocumentUpdated === 'function';
|
|
209
|
+
if (!hearsDirty && !hearsUpdates) {
|
|
210
|
+
return this.client;
|
|
211
|
+
}
|
|
212
|
+
const target: Record<string, unknown> = {};
|
|
213
|
+
for (const name of this.clientMethods) {
|
|
214
|
+
const method: unknown = client[name];
|
|
215
|
+
if (typeof method === 'function') {
|
|
216
|
+
target[name] = (params: unknown): unknown => (method as (params: unknown) => unknown).call(client, params);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (hearsDirty) {
|
|
220
|
+
target.onDocumentDirtyChanged = (event: TransferDocumentDirtyChangedEvent): void => {
|
|
221
|
+
this.dirtyChangedEmitter.fire(event);
|
|
222
|
+
this.deliverDirty(event);
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
if (hearsUpdates) {
|
|
226
|
+
const forward = target.onDocumentUpdated as (event: TransferDocumentUpdatedEvent<TTransfer, DiagnosticOf<TServer>>) => void;
|
|
227
|
+
target.onDocumentUpdated = (event: TransferDocumentUpdatedEvent<TTransfer, DiagnosticOf<TServer>>): void => {
|
|
228
|
+
this.documentUpdatedEmitter.fire(event);
|
|
229
|
+
forward(event);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
return target as unknown as TClient;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/** Record `event` in {@link dirtyStates} and hand it to the client. */
|
|
236
|
+
protected deliverDirty(event: TransferDocumentDirtyChangedEvent): void {
|
|
237
|
+
this.dirtyStates.set(event.uri, event.text?.dirty ?? false);
|
|
238
|
+
const client = this.client as unknown as Partial<Pick<DataClientProtocol<TTransfer>, 'onDocumentDirtyChanged'>>;
|
|
239
|
+
client.onDocumentDirtyChanged?.(event);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* After the transport dropped, reconnect on the next macrotask for the
|
|
244
|
+
* sessions with documents open, so they re-watch and follow their documents
|
|
245
|
+
* again without waiting for a call of their own; a session with nothing
|
|
246
|
+
* open restores on its next call. Nothing is scheduled once this connection
|
|
247
|
+
* is disposed, which drops its generation too.
|
|
248
|
+
*/
|
|
249
|
+
protected override dropGeneration(): void {
|
|
250
|
+
const dropped = this.generation !== undefined;
|
|
251
|
+
super.dropGeneration();
|
|
252
|
+
if (dropped && !this.disposed) {
|
|
253
|
+
setTimeout(() => {
|
|
254
|
+
if (!this.disposed) {
|
|
255
|
+
this.sessions.forEach(session => session.reconnect());
|
|
256
|
+
}
|
|
257
|
+
}, 0);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Sessions are detached rather than disposed: the server ends every session
|
|
263
|
+
* on a connection it sees close, so ending each one first sends requests
|
|
264
|
+
* over a connection this call is about to dispose.
|
|
265
|
+
*/
|
|
266
|
+
override dispose(): void {
|
|
267
|
+
for (const session of [...this.sessions]) {
|
|
268
|
+
session.detach();
|
|
269
|
+
}
|
|
270
|
+
// For a factory's session whose `detach` does not fire.
|
|
271
|
+
this.sessions.clear();
|
|
272
|
+
this.createSessionEmitter.dispose();
|
|
273
|
+
this.dirtyChangedEmitter.dispose();
|
|
274
|
+
this.documentUpdatedEmitter.dispose();
|
|
275
|
+
super.dispose();
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* A {@link DataConnection} that brings its own {@link DataEvents}, so a host
|
|
281
|
+
* with several interested parties does not have to supply one.
|
|
282
|
+
*
|
|
283
|
+
* **The client slot holds exactly one object, and that is why this exists.**
|
|
284
|
+
* `createRpcProxy` binds a single `localTarget`, and underneath a method name
|
|
285
|
+
* maps to one handler — a second registration replaces the first silently. So a
|
|
286
|
+
* properties panel and a tree cannot both be the client; one fan-out sits in the
|
|
287
|
+
* slot and both subscribe to it.
|
|
288
|
+
*
|
|
289
|
+
* Use {@link DataConnection} directly instead when the client is yours: an
|
|
290
|
+
* adopter service that implements the protocol plus its own methods, a single
|
|
291
|
+
* consumer that IS the client, or a request/response-only client that binds
|
|
292
|
+
* nothing.
|
|
293
|
+
*/
|
|
294
|
+
export class DataConnectionWithEvents<
|
|
295
|
+
TTransfer extends TransferElement,
|
|
296
|
+
TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>
|
|
297
|
+
> extends DataConnection<TTransfer, TServer, DataEvents<TTransfer, DiagnosticOf<TServer>, ProjectOf<TServer>>> {
|
|
298
|
+
/** Server pushes, fanned out to as many local listeners as the host has. */
|
|
299
|
+
readonly events: DataEvents<TTransfer, DiagnosticOf<TServer>, ProjectOf<TServer>>;
|
|
300
|
+
|
|
301
|
+
constructor(port: DataPort, options?: DataConnectionOptions<TTransfer, TServer>) {
|
|
302
|
+
// Built as a local because `this` is unavailable before `super`, then
|
|
303
|
+
// read back onto the field.
|
|
304
|
+
const events = new DataEvents<TTransfer, DiagnosticOf<TServer>, ProjectOf<TServer>>();
|
|
305
|
+
super(port, events, options);
|
|
306
|
+
this.events = events;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** Disposes the fan-out it created, which no caller else holds. */
|
|
310
|
+
override dispose(): void {
|
|
311
|
+
super.dispose();
|
|
312
|
+
this.events.dispose();
|
|
313
|
+
}
|
|
314
|
+
}
|