@hydranium/protocol 1.0.0-next.38 → 1.0.0-next.380
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 +44 -83
- package/lib/abstract-logger.d.ts +11 -0
- package/lib/abstract-logger.d.ts.map +1 -1
- package/lib/abstract-logger.js +16 -0
- package/lib/abstract-logger.js.map +1 -1
- package/lib/client/data-connection.d.ts +303 -0
- package/lib/client/data-connection.d.ts.map +1 -0
- package/lib/client/data-connection.js +534 -0
- package/lib/client/data-connection.js.map +1 -0
- package/lib/client/data-events.d.ts +18 -1
- package/lib/client/data-events.d.ts.map +1 -1
- package/lib/client/data-events.js +26 -0
- package/lib/client/data-events.js.map +1 -1
- package/lib/client/data-port.d.ts +34 -24
- package/lib/client/data-port.d.ts.map +1 -1
- package/lib/client/data-session.d.ts +694 -89
- package/lib/client/data-session.d.ts.map +1 -1
- package/lib/client/data-session.js +1158 -115
- package/lib/client/data-session.js.map +1 -1
- package/lib/client/index.d.ts +15 -9
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/index.js +15 -9
- package/lib/client/index.js.map +1 -1
- package/lib/client/message-relay.d.ts +6 -4
- package/lib/client/message-relay.d.ts.map +1 -1
- package/lib/client/message-relay.js +4 -4
- package/lib/client/message-relay.js.map +1 -1
- package/lib/client/post-message-transport.d.ts +69 -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 +173 -0
- package/lib/client/rpc-connection.d.ts.map +1 -0
- package/lib/client/rpc-connection.js +225 -0
- package/lib/client/rpc-connection.js.map +1 -0
- package/lib/client/worker-handshake.d.ts +94 -0
- package/lib/client/worker-handshake.d.ts.map +1 -0
- package/lib/client/worker-handshake.js +51 -0
- package/lib/client/worker-handshake.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 +50 -10
- package/lib/clock.d.ts.map +1 -1
- package/lib/clock.js +36 -1
- package/lib/clock.js.map +1 -1
- package/lib/console-logger.d.ts +23 -0
- package/lib/console-logger.d.ts.map +1 -0
- package/lib/console-logger.js +39 -0
- package/lib/console-logger.js.map +1 -0
- 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 +13 -1
- package/lib/data/data-protocol-methods.js.map +1 -1
- package/lib/data/data-server-protocol.d.ts +176 -49
- package/lib/data/data-server-protocol.d.ts.map +1 -1
- package/lib/data/events.d.ts +144 -33
- package/lib/data/events.d.ts.map +1 -1
- package/lib/data/requests.d.ts +84 -11
- package/lib/data/requests.d.ts.map +1 -1
- package/lib/debouncer.d.ts +7 -4
- package/lib/debouncer.d.ts.map +1 -1
- package/lib/debouncer.js +10 -10
- package/lib/debouncer.js.map +1 -1
- package/lib/errors.d.ts +243 -41
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +400 -55
- package/lib/errors.js.map +1 -1
- package/lib/format-log-arg.d.ts +33 -0
- package/lib/format-log-arg.d.ts.map +1 -0
- package/lib/format-log-arg.js +158 -0
- package/lib/format-log-arg.js.map +1 -0
- package/lib/glsp-edits-settled-actions.d.ts +54 -0
- package/lib/glsp-edits-settled-actions.d.ts.map +1 -0
- package/lib/glsp-edits-settled-actions.js +28 -0
- package/lib/glsp-edits-settled-actions.js.map +1 -0
- package/lib/glsp-request-model-args.d.ts +16 -0
- package/lib/glsp-request-model-args.d.ts.map +1 -0
- package/lib/glsp-request-model-args.js +19 -0
- package/lib/glsp-request-model-args.js.map +1 -0
- package/lib/glsp-save-model-actions.d.ts +55 -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 +11 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -1
- package/lib/latency-collector.d.ts +10 -4
- package/lib/latency-collector.d.ts.map +1 -1
- package/lib/latency-collector.js +2 -0
- package/lib/latency-collector.js.map +1 -1
- package/lib/logger.d.ts +38 -7
- package/lib/logger.d.ts.map +1 -1
- package/lib/logger.js +42 -4
- package/lib/logger.js.map +1 -1
- package/lib/messages/index.d.ts +4 -2
- package/lib/messages/index.d.ts.map +1 -1
- package/lib/messages/index.js +17 -4
- package/lib/messages/index.js.map +1 -1
- package/lib/messages/primitives.d.ts +59 -4
- package/lib/messages/primitives.d.ts.map +1 -1
- package/lib/messages/primitives.js +97 -4
- package/lib/messages/primitives.js.map +1 -1
- 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 +67 -0
- package/lib/model-service/base-version.d.ts.map +1 -0
- package/lib/model-service/base-version.js +44 -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/node/index.d.ts +10 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +29 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/process-memory.d.ts +66 -0
- package/lib/node/process-memory.d.ts.map +1 -0
- package/lib/node/process-memory.js +291 -0
- package/lib/node/process-memory.js.map +1 -0
- 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 +63 -35
- package/lib/patch-merge.d.ts.map +1 -1
- package/lib/patch-merge.js +171 -25
- package/lib/patch-merge.js.map +1 -1
- package/lib/pending-work-tracker.d.ts +30 -0
- package/lib/pending-work-tracker.d.ts.map +1 -0
- package/lib/pending-work-tracker.js +47 -0
- package/lib/pending-work-tracker.js.map +1 -0
- package/lib/profile-session.d.ts +24 -8
- package/lib/profile-session.d.ts.map +1 -1
- package/lib/profile-session.js +13 -4
- package/lib/profile-session.js.map +1 -1
- package/lib/profiling.d.ts +15 -2
- package/lib/profiling.d.ts.map +1 -1
- package/lib/profiling.js.map +1 -1
- package/lib/project.d.ts +6 -2
- package/lib/project.d.ts.map +1 -1
- package/lib/project.js.map +1 -1
- package/lib/random-uuid.d.ts +14 -0
- package/lib/random-uuid.d.ts.map +1 -0
- package/lib/random-uuid.js +24 -0
- package/lib/random-uuid.js.map +1 -0
- package/lib/reconcile-write.d.ts +70 -0
- package/lib/reconcile-write.d.ts.map +1 -0
- package/lib/reconcile-write.js +69 -0
- package/lib/reconcile-write.js.map +1 -0
- package/lib/rpc/bind-rpc-methods.d.ts +6 -2
- package/lib/rpc/bind-rpc-methods.d.ts.map +1 -1
- package/lib/rpc/bind-rpc-methods.js +17 -7
- package/lib/rpc/bind-rpc-methods.js.map +1 -1
- package/lib/rpc/create-rpc-proxy.d.ts +3 -0
- package/lib/rpc/create-rpc-proxy.d.ts.map +1 -1
- package/lib/rpc/create-rpc-proxy.js +6 -1
- package/lib/rpc/create-rpc-proxy.js.map +1 -1
- package/lib/rpc/index.d.ts +1 -0
- package/lib/rpc/index.d.ts.map +1 -1
- package/lib/rpc/index.js +1 -0
- package/lib/rpc/index.js.map +1 -1
- package/lib/rpc/send-by-method-name.d.ts +76 -0
- package/lib/rpc/send-by-method-name.d.ts.map +1 -0
- package/lib/rpc/send-by-method-name.js +120 -0
- package/lib/rpc/send-by-method-name.js.map +1 -0
- package/lib/rpc/wire-prefix.js.map +1 -1
- package/lib/save-text-document.d.ts +40 -0
- package/lib/save-text-document.d.ts.map +1 -0
- package/lib/save-text-document.js +34 -0
- package/lib/save-text-document.js.map +1 -0
- package/lib/testing/catalogue-audit.js.map +1 -1
- package/lib/testing/data-doubles.d.ts +41 -12
- package/lib/testing/data-doubles.d.ts.map +1 -1
- package/lib/testing/data-doubles.js +56 -8
- package/lib/testing/data-doubles.js.map +1 -1
- package/lib/testing/fake-clock.d.ts +17 -2
- package/lib/testing/fake-clock.d.ts.map +1 -1
- package/lib/testing/fake-clock.js +61 -46
- 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 +4 -3
- package/lib/testing/index.js.map +1 -1
- package/lib/testing/node/duplex-connection.d.ts.map +1 -1
- package/lib/testing/node/duplex-connection.js +3 -2
- 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/transfer-node-builder.d.ts +81 -0
- package/lib/testing/transfer-node-builder.d.ts.map +1 -0
- package/lib/testing/transfer-node-builder.js +47 -0
- package/lib/testing/transfer-node-builder.js.map +1 -0
- package/lib/testing/wait-for.d.ts +9 -3
- package/lib/testing/wait-for.d.ts.map +1 -1
- package/lib/testing/wait-for.js +57 -11
- package/lib/testing/wait-for.js.map +1 -1
- package/lib/tracer.d.ts.map +1 -1
- package/lib/tracer.js +5 -9
- package/lib/tracer.js.map +1 -1
- package/lib/transfer-diagnostic.d.ts +11 -0
- package/lib/transfer-diagnostic.d.ts.map +1 -1
- package/lib/transfer-diagnostic.js +17 -0
- package/lib/transfer-diagnostic.js.map +1 -1
- package/lib/transfer-document.d.ts +96 -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/transfer-element.d.ts +4 -4
- package/lib/types.d.ts +32 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/{model-service/args.js → types.js} +2 -2
- package/lib/types.js.map +1 -0
- package/lib/uri.d.ts.map +1 -1
- package/lib/uri.js.map +1 -1
- package/lib/util.d.ts +8 -2
- package/lib/util.d.ts.map +1 -1
- package/lib/util.js +32 -4
- package/lib/util.js.map +1 -1
- package/package.json +24 -40
- package/src/abstract-logger.ts +18 -0
- package/src/client/data-connection.ts +654 -0
- package/src/client/data-events.ts +38 -1
- package/src/client/data-port.ts +36 -25
- package/src/client/data-session.ts +1479 -137
- package/src/client/index.ts +15 -9
- package/src/client/message-relay.ts +6 -4
- package/src/client/post-message-transport.ts +224 -4
- package/src/client/rpc-connection.ts +302 -0
- package/src/client/worker-handshake.ts +121 -0
- package/src/client-ids.ts +49 -0
- package/src/clock.ts +68 -10
- package/src/console-logger.ts +39 -0
- package/src/data/data-protocol-methods.ts +14 -4
- package/src/data/data-server-protocol.ts +203 -49
- package/src/data/events.ts +150 -33
- package/src/data/requests.ts +90 -11
- package/src/debouncer.ts +11 -11
- package/src/errors.ts +500 -65
- package/src/format-log-arg.ts +176 -0
- package/src/glsp-edits-settled-actions.ts +62 -0
- package/src/glsp-request-model-args.ts +16 -0
- package/src/glsp-save-model-actions.ts +64 -0
- package/src/index.ts +11 -0
- package/src/latency-collector.ts +10 -3
- package/src/logger.ts +44 -8
- package/src/messages/index.ts +12 -2
- package/src/messages/primitives.ts +129 -5
- package/src/model-server.ts +64 -19
- package/src/model-service/base-version.ts +75 -0
- package/src/model-service/index.ts +4 -5
- package/src/model-service/reference-candidate.ts +5 -3
- package/src/node/index.ts +14 -0
- package/src/node/process-memory.ts +299 -0
- package/src/patch-merge.ts +230 -45
- package/src/pending-work-tracker.ts +47 -0
- package/src/profile-session.ts +31 -11
- package/src/profiling.ts +15 -2
- package/src/project.ts +6 -2
- package/src/random-uuid.ts +21 -0
- package/src/reconcile-write.ts +131 -0
- package/src/rpc/README.md +6 -6
- package/src/rpc/bind-rpc-methods.ts +18 -8
- package/src/rpc/create-rpc-proxy.ts +6 -1
- package/src/rpc/index.ts +1 -0
- package/src/rpc/send-by-method-name.ts +140 -0
- package/src/save-text-document.ts +39 -0
- package/src/testing/data-doubles.ts +141 -19
- package/src/testing/fake-clock.ts +76 -48
- package/src/testing/index.ts +4 -3
- package/src/testing/node/duplex-connection.ts +3 -2
- package/src/testing/node/index.ts +2 -2
- package/src/testing/node/message-port-pair.ts +40 -0
- package/src/testing/transfer-node-builder.ts +107 -0
- package/src/testing/wait-for.ts +61 -13
- package/src/tracer.ts +5 -9
- package/src/transfer-diagnostic.ts +17 -0
- package/src/transfer-document.ts +116 -34
- package/src/transfer-element.ts +4 -4
- package/src/types.ts +30 -0
- package/src/util.ts +33 -6
- 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.map +0 -1
- package/src/model-service/args.ts +0 -67
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the MIT License which is available in the project root.
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: MIT
|
|
9
|
+
********************************************************************************/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.FRAMEWORK_CLIENT_IDS = exports.DOCUMENT_RELEASE_CLIENT_ID = exports.UNKNOWN_CLIENT_ID = exports.LANGUAGE_CLIENT_ID = void 0;
|
|
12
|
+
/**
|
|
13
|
+
* Well-known values of the wire's `clientId` / `sourceClientId` field.
|
|
14
|
+
*
|
|
15
|
+
* The framework tracks each document as belonging to one or more "clients" —
|
|
16
|
+
* typically an LSP-text client (Monaco, VS Code, …), a GLSP diagram client,
|
|
17
|
+
* and/or a structured-form client — and keys its holds and watches per
|
|
18
|
+
* `(uri, clientId)`. These three values are not real participants, so a client
|
|
19
|
+
* minting its own id must avoid them.
|
|
20
|
+
*
|
|
21
|
+
* **Here rather than in the server package, because the side that has to
|
|
22
|
+
* RECOGNISE them is the client.** An inbound `onDocumentUpdated` carries
|
|
23
|
+
* `sourceClientId`, and a consumer deciding what to do with it is asking which
|
|
24
|
+
* of these it is — so a frontend would otherwise have to depend on the server
|
|
25
|
+
* tier to name three strings, and in practice retypes the literal instead.
|
|
26
|
+
*/
|
|
27
|
+
/** Identifier for an LSP-text client (Monaco, VS Code, …). */
|
|
28
|
+
exports.LANGUAGE_CLIENT_ID = 'language-client';
|
|
29
|
+
/**
|
|
30
|
+
* The id an event names when no single client is behind it: the source of a
|
|
31
|
+
* `'rebuilt'` event, a document no client authored, or a build with more than
|
|
32
|
+
* one cause.
|
|
33
|
+
*/
|
|
34
|
+
exports.UNKNOWN_CLIENT_ID = 'unknown';
|
|
35
|
+
/**
|
|
36
|
+
* Synthetic author id on the `onDocumentUpdated` broadcast a data-server
|
|
37
|
+
* emits for the build that follows a document's release, once no client holds
|
|
38
|
+
* it; by default that build reverts the document to its disk content,
|
|
39
|
+
* discarding unsaved edits. Not a real client: it lets consumers tell the
|
|
40
|
+
* release broadcast from client-authored updates.
|
|
41
|
+
*/
|
|
42
|
+
exports.DOCUMENT_RELEASE_CLIENT_ID = 'document-release';
|
|
43
|
+
/**
|
|
44
|
+
* Every id the framework reserves, for a client checking that the identity it
|
|
45
|
+
* is about to mint collides with none of them.
|
|
46
|
+
*/
|
|
47
|
+
exports.FRAMEWORK_CLIENT_IDS = [exports.LANGUAGE_CLIENT_ID, exports.UNKNOWN_CLIENT_ID, exports.DOCUMENT_RELEASE_CLIENT_ID];
|
|
48
|
+
//# sourceMappingURL=client-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-ids.js","sourceRoot":"","sources":["../src/client-ids.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF;;;;;;;;;;;;;;GAcG;AAEH,8DAA8D;AACjD,QAAA,kBAAkB,GAAG,iBAAiB,CAAC;AAEpD;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAE3C;;;;;;GAMG;AACU,QAAA,0BAA0B,GAAG,kBAAkB,CAAC;AAE7D;;;GAGG;AACU,QAAA,oBAAoB,GAAsB,CAAC,QAAA,kBAAkB,EAAE,QAAA,iBAAiB,EAAE,QAAA,0BAA0B,CAAC,CAAC"}
|
package/lib/clock.d.ts
CHANGED
|
@@ -12,9 +12,11 @@ import { Disposable } from './util';
|
|
|
12
12
|
* there is no `start` — you create it at the moment timing begins.
|
|
13
13
|
*
|
|
14
14
|
* Backed by a monotonic source (`performance.now`), so it is sub-millisecond
|
|
15
|
-
* precise and immune to wall-clock
|
|
16
|
-
* `Date.now` delta go backwards; a stopwatch cannot).
|
|
17
|
-
*
|
|
15
|
+
* precise and immune to wall-clock steps (a time sync or a manual change can
|
|
16
|
+
* make a `Date.now` delta go backwards; a stopwatch cannot). In Node on Linux
|
|
17
|
+
* it also leaves out time the system spends suspended, so a duration spanning
|
|
18
|
+
* a suspend reads as the awake time only. Use this for every duration, a TTL
|
|
19
|
+
* included, and {@link Clock.now} for "what time is it".
|
|
18
20
|
*
|
|
19
21
|
* It holds no scheduled resource and is therefore NOT a {@link Disposable} —
|
|
20
22
|
* the disposable thing is a {@link Clock.setTimer}. Reads are lazy, so a fake
|
|
@@ -42,16 +44,16 @@ export interface Stopwatch {
|
|
|
42
44
|
* testable instead of waiting on real wall-clock. The {@link SystemClock}
|
|
43
45
|
* default delegates to the platform; tests bind `makeFakeClock`.
|
|
44
46
|
*
|
|
45
|
-
* Two distinct readings on purpose: {@link now} is wall-clock
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
47
|
+
* Two distinct readings on purpose: {@link now} is wall-clock, for a
|
|
48
|
+
* timestamp, while {@link stopwatch} measures durations off a monotonic
|
|
49
|
+
* source. They are different clocks; do not subtract two {@link now} readings
|
|
50
|
+
* to measure a duration. Framework code reads time only through a `Clock`, so
|
|
51
|
+
* a platform workaround lives in one place.
|
|
49
52
|
*
|
|
50
53
|
* A cross-head contract, so it carries no platform or DI-framework coupling.
|
|
51
54
|
*
|
|
52
|
-
* Note:
|
|
53
|
-
*
|
|
54
|
-
* measure would invert their meaning.
|
|
55
|
+
* Note: code that measures real CPU, heap or event-loop time never takes the
|
|
56
|
+
* bound `Clock`: faking the time it measures would invert its meaning.
|
|
55
57
|
*/
|
|
56
58
|
export interface Clock {
|
|
57
59
|
/** Current wall-clock time in milliseconds (the `Date.now` reading). */
|
|
@@ -73,7 +75,28 @@ export interface Clock {
|
|
|
73
75
|
*/
|
|
74
76
|
measure<T>(callback: () => Promise<T>): Promise<Timed<T>>;
|
|
75
77
|
measure<T>(callback: () => T): Timed<T>;
|
|
78
|
+
/**
|
|
79
|
+
* Settle with `promise`, or with {@link TIMED_OUT} once `ms` have elapsed
|
|
80
|
+
* first. A promise that rejects first rejects this one; one that rejects
|
|
81
|
+
* after the timer is ignored. The timer is disposed the moment `promise`
|
|
82
|
+
* settles, so a won race leaves nothing scheduled, but `promise` itself
|
|
83
|
+
* runs on: nothing here can cancel it.
|
|
84
|
+
*
|
|
85
|
+
* Unlike VS Code's `raceTimeout`, this settles with a sentinel rather than
|
|
86
|
+
* `undefined`, so a promise resolving to `undefined` is not taken for a
|
|
87
|
+
* timeout; the caller branches on the result instead of passing an
|
|
88
|
+
* `onTimeout`.
|
|
89
|
+
*
|
|
90
|
+
* A custom implementation extends {@link SystemClock}, whose race runs over
|
|
91
|
+
* the subclass's {@link setTimer}.
|
|
92
|
+
*/
|
|
93
|
+
raceTimer<T>(promise: Promise<T>, ms: number): Promise<T | typeof TIMED_OUT>;
|
|
76
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* What {@link Clock.raceTimer} settles with when its timer fires first.
|
|
97
|
+
* Registered under a global key, so two copies of this package agree on it.
|
|
98
|
+
*/
|
|
99
|
+
export declare const TIMED_OUT: unique symbol;
|
|
77
100
|
/**
|
|
78
101
|
* The result of {@link Clock.measure}: a callback's return value paired with
|
|
79
102
|
* its elapsed wall-time in milliseconds. A plain value object — no methods, no
|
|
@@ -100,6 +123,10 @@ export interface Timed<T> {
|
|
|
100
123
|
* Default {@link Clock}: delegates to the platform's `Date.now`,
|
|
101
124
|
* `performance.now`, and `setTimeout`/`clearTimeout`. Bound everywhere in
|
|
102
125
|
* production; swapped for `makeFakeClock` in tests.
|
|
126
|
+
*
|
|
127
|
+
* {@link measure} and {@link raceTimer} run over {@link stopwatch} and
|
|
128
|
+
* {@link setTimer}, so a clock that extends this one and replaces those
|
|
129
|
+
* measures and races on its own time, as the test clock does.
|
|
103
130
|
*/
|
|
104
131
|
export declare class SystemClock implements Clock {
|
|
105
132
|
now(): number;
|
|
@@ -107,5 +134,18 @@ export declare class SystemClock implements Clock {
|
|
|
107
134
|
stopwatch(): Stopwatch;
|
|
108
135
|
measure<T>(callback: () => Promise<T>): Promise<Timed<T>>;
|
|
109
136
|
measure<T>(callback: () => T): Timed<T>;
|
|
137
|
+
/**
|
|
138
|
+
* The timer settles the race one microtask after it fires. A real timer
|
|
139
|
+
* runs only once pending resolutions are delivered, while a fake one fires
|
|
140
|
+
* inside its `advance`, so settling at once would let a promise already
|
|
141
|
+
* resolved when `advance` runs lose to a timer it beats in production. The
|
|
142
|
+
* deferral covers only that promise: one that settles through further
|
|
143
|
+
* chained reactions, such as a `.then` chain, an async function or
|
|
144
|
+
* `Promise.allSettled`, can still lose to an `advance` in the same turn,
|
|
145
|
+
* while it wins on the platform's timer. The handlers go on `promise`
|
|
146
|
+
* before {@link setTimer} runs, so a `setTimer` that throws still leaves
|
|
147
|
+
* `promise` observed.
|
|
148
|
+
*/
|
|
149
|
+
raceTimer<T>(promise: Promise<T>, ms: number): Promise<T | typeof TIMED_OUT>;
|
|
110
150
|
}
|
|
111
151
|
//# sourceMappingURL=clock.d.ts.map
|
package/lib/clock.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clock.d.ts","sourceRoot":"","sources":["../src/clock.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC
|
|
1
|
+
{"version":3,"file":"clock.d.ts","sourceRoot":"","sources":["../src/clock.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,SAAS;IACvB,mFAAmF;IACnF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,GAAG,IAAI,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,IAAI,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,KAAK;IACnB,wEAAwE;IACxE,GAAG,IAAI,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU,CAAC;IACvD,yDAAyD;IACzD,SAAS,IAAI,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACxC;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,OAAO,SAAS,CAAC,CAAC;CAC/E;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,eAA6C,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC;IACrB;;;;;OAKG;IACH,MAAM,EAAE,CAAC,CAAC;IACV;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;CACpB;AAyCD;;;;;;;;GAQG;AACH,qBAAa,WAAY,YAAW,KAAK;IACtC,GAAG,IAAI,MAAM,CAEZ;IAED,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,UAAU,CAIrD;IAED,SAAS,IAAI,SAAS,CAErB;IAED,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAUxC;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,OAAO,SAAS,CAAC,CAgB3E;CACH"}
|
package/lib/clock.js
CHANGED
|
@@ -8,8 +8,13 @@
|
|
|
8
8
|
* SPDX-License-Identifier: MIT
|
|
9
9
|
********************************************************************************/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.SystemClock = void 0;
|
|
11
|
+
exports.SystemClock = exports.TIMED_OUT = void 0;
|
|
12
12
|
const util_1 = require("./util");
|
|
13
|
+
/**
|
|
14
|
+
* What {@link Clock.raceTimer} settles with when its timer fires first.
|
|
15
|
+
* Registered under a global key, so two copies of this package agree on it.
|
|
16
|
+
*/
|
|
17
|
+
exports.TIMED_OUT = Symbol.for('hydranium/protocol/timed-out');
|
|
13
18
|
class SystemStopwatch {
|
|
14
19
|
start = performance.now();
|
|
15
20
|
lastLap = this.start;
|
|
@@ -48,6 +53,10 @@ function unrefTimer(handle) {
|
|
|
48
53
|
* Default {@link Clock}: delegates to the platform's `Date.now`,
|
|
49
54
|
* `performance.now`, and `setTimeout`/`clearTimeout`. Bound everywhere in
|
|
50
55
|
* production; swapped for `makeFakeClock` in tests.
|
|
56
|
+
*
|
|
57
|
+
* {@link measure} and {@link raceTimer} run over {@link stopwatch} and
|
|
58
|
+
* {@link setTimer}, so a clock that extends this one and replaces those
|
|
59
|
+
* measures and races on its own time, as the test clock does.
|
|
51
60
|
*/
|
|
52
61
|
class SystemClock {
|
|
53
62
|
now() {
|
|
@@ -69,6 +78,32 @@ class SystemClock {
|
|
|
69
78
|
}
|
|
70
79
|
return { result: result, elapsedMs: stopwatch.elapsedMs };
|
|
71
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* The timer settles the race one microtask after it fires. A real timer
|
|
83
|
+
* runs only once pending resolutions are delivered, while a fake one fires
|
|
84
|
+
* inside its `advance`, so settling at once would let a promise already
|
|
85
|
+
* resolved when `advance` runs lose to a timer it beats in production. The
|
|
86
|
+
* deferral covers only that promise: one that settles through further
|
|
87
|
+
* chained reactions, such as a `.then` chain, an async function or
|
|
88
|
+
* `Promise.allSettled`, can still lose to an `advance` in the same turn,
|
|
89
|
+
* while it wins on the platform's timer. The handlers go on `promise`
|
|
90
|
+
* before {@link setTimer} runs, so a `setTimer` that throws still leaves
|
|
91
|
+
* `promise` observed.
|
|
92
|
+
*/
|
|
93
|
+
raceTimer(promise, ms) {
|
|
94
|
+
return new Promise((resolve, reject) => {
|
|
95
|
+
// eslint-disable-next-line prefer-const -- with a `const`, a `setTimer` that throws leaves it uninitialised, and the handlers' later read of it is an unhandled ReferenceError
|
|
96
|
+
let timer;
|
|
97
|
+
promise.then(value => {
|
|
98
|
+
timer?.dispose();
|
|
99
|
+
resolve(value);
|
|
100
|
+
}, (err) => {
|
|
101
|
+
timer?.dispose();
|
|
102
|
+
reject(err);
|
|
103
|
+
});
|
|
104
|
+
timer = this.setTimer(() => void Promise.resolve().then(() => resolve(exports.TIMED_OUT)), ms);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
72
107
|
}
|
|
73
108
|
exports.SystemClock = SystemClock;
|
|
74
109
|
//# sourceMappingURL=clock.js.map
|
package/lib/clock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clock.js","sourceRoot":"","sources":["../src/clock.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF,iCAAoC;
|
|
1
|
+
{"version":3,"file":"clock.js","sourceRoot":"","sources":["../src/clock.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 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
|
+
import { AbstractLogger } from './abstract-logger';
|
|
10
|
+
import { type LogLevel, type Logger } from './logger';
|
|
11
|
+
/**
|
|
12
|
+
* {@link Logger} that writes each line to `console`, at the method matching its
|
|
13
|
+
* level: the framework's `[Label - time] [component]` prefix and the message,
|
|
14
|
+
* then any trailing arguments as they are, so a browser console can expand
|
|
15
|
+
* them. For a browser page, webview or extension host, which has no other sink
|
|
16
|
+
* to hand. On Node, `info` and `debug` reach stdout, so a process whose stdout
|
|
17
|
+
* carries a protocol stream must not use it.
|
|
18
|
+
*/
|
|
19
|
+
export declare class ConsoleLogger extends AbstractLogger implements Logger {
|
|
20
|
+
protected emit(level: LogLevel, label: string, message: string, args: readonly unknown[]): void;
|
|
21
|
+
protected derive(component: string): this;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=console-logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-logger.d.ts","sourceRoot":"","sources":["../src/console-logger.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAWtD;;;;;;;GAOG;AACH,qBAAa,aAAc,SAAQ,cAAe,YAAW,MAAM;IAChE,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,IAAI,CAE9F;IAED,SAAS,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAGxC;CACH"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
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 MIT License which is available in the project root.
|
|
7
|
+
*
|
|
8
|
+
* SPDX-License-Identifier: MIT
|
|
9
|
+
********************************************************************************/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.ConsoleLogger = void 0;
|
|
12
|
+
const abstract_logger_1 = require("./abstract-logger");
|
|
13
|
+
/** `console.trace` prints a stack with every line, so `trace` goes out at `debug`. */
|
|
14
|
+
const CONSOLE_METHODS = {
|
|
15
|
+
error: 'error',
|
|
16
|
+
warn: 'warn',
|
|
17
|
+
info: 'info',
|
|
18
|
+
debug: 'debug',
|
|
19
|
+
trace: 'debug'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* {@link Logger} that writes each line to `console`, at the method matching its
|
|
23
|
+
* level: the framework's `[Label - time] [component]` prefix and the message,
|
|
24
|
+
* then any trailing arguments as they are, so a browser console can expand
|
|
25
|
+
* them. For a browser page, webview or extension host, which has no other sink
|
|
26
|
+
* to hand. On Node, `info` and `debug` reach stdout, so a process whose stdout
|
|
27
|
+
* carries a protocol stream must not use it.
|
|
28
|
+
*/
|
|
29
|
+
class ConsoleLogger extends abstract_logger_1.AbstractLogger {
|
|
30
|
+
emit(level, label, message, args) {
|
|
31
|
+
console[CONSOLE_METHODS[level]](`${this.formatLinePrefix(label)} ${message}`, ...args);
|
|
32
|
+
}
|
|
33
|
+
derive(component) {
|
|
34
|
+
const Subclass = this.constructor;
|
|
35
|
+
return new Subclass(component);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.ConsoleLogger = ConsoleLogger;
|
|
39
|
+
//# sourceMappingURL=console-logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console-logger.js","sourceRoot":"","sources":["../src/console-logger.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF,uDAAmD;AAGnD,sFAAsF;AACtF,MAAM,eAAe,GAA0D;IAC5E,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,mBAA2B,SAAQ,gCAAc;IACpC,IAAI,CAAC,KAAe,EAAE,KAAa,EAAE,OAAe,EAAE,IAAwB;QACrF,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,OAAO,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC;IAC1F,CAAC;IAES,MAAM,CAAC,SAAiB;QAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,WAA+C,CAAC;QACtE,OAAO,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;CACH"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
/** Request-method names on {@link DocumentServerProtocol}. */
|
|
10
|
-
export declare const DOCUMENT_SERVER_PROTOCOL_METHODS: readonly ["openModelDocument", "closeModelDocument", "getModelDocument", "updateModelDocument", "saveModelDocument", "watchModelDocument", "unwatchModelDocument", "waitForReady"];
|
|
10
|
+
export declare const DOCUMENT_SERVER_PROTOCOL_METHODS: readonly ["createSession", "closeSession", "createModelDocument", "updateModelDocuments", "openModelDocument", "closeModelDocument", "getModelDocument", "updateModelDocument", "saveModelDocument", "persistModelDocument", "deleteModelDocument", "watchModelDocument", "unwatchModelDocument", "waitForReady"];
|
|
11
11
|
/** Request-method names on {@link ProjectServerProtocol}. */
|
|
12
12
|
export declare const PROJECT_SERVER_PROTOCOL_METHODS: readonly ["getProjects", "getProjectForUri"];
|
|
13
13
|
/**
|
|
@@ -16,7 +16,7 @@ export declare const PROJECT_SERVER_PROTOCOL_METHODS: readonly ["getProjects", "
|
|
|
16
16
|
* constraint makes the array typed against the interface — stale names (typos,
|
|
17
17
|
* renamed methods) fail to typecheck.
|
|
18
18
|
*/
|
|
19
|
-
export declare const DATA_SERVER_PROTOCOL_METHODS: readonly ["openModelDocument", "closeModelDocument", "getModelDocument", "updateModelDocument", "saveModelDocument", "watchModelDocument", "unwatchModelDocument", "waitForReady", "getProjects", "getProjectForUri"];
|
|
19
|
+
export declare const DATA_SERVER_PROTOCOL_METHODS: readonly ["createSession", "closeSession", "createModelDocument", "updateModelDocuments", "openModelDocument", "closeModelDocument", "getModelDocument", "updateModelDocument", "saveModelDocument", "persistModelDocument", "deleteModelDocument", "watchModelDocument", "unwatchModelDocument", "waitForReady", "getProjects", "getProjectForUri"];
|
|
20
20
|
/**
|
|
21
21
|
* Request-method names on {@link ReferenceServerProtocol}. NOT part of
|
|
22
22
|
* {@link DATA_SERVER_PROTOCOL_METHODS} — adopters that compose the reference
|
|
@@ -25,7 +25,7 @@ export declare const DATA_SERVER_PROTOCOL_METHODS: readonly ["openModelDocument"
|
|
|
25
25
|
*/
|
|
26
26
|
export declare const REFERENCE_SERVER_PROTOCOL_METHODS: readonly ["findReferenceCandidates", "resolveReference", "findNextName"];
|
|
27
27
|
/** Notification-method names on {@link DocumentClientProtocol}. */
|
|
28
|
-
export declare const DOCUMENT_CLIENT_PROTOCOL_METHODS: readonly ["onDocumentUpdated", "onDocumentSaved"];
|
|
28
|
+
export declare const DOCUMENT_CLIENT_PROTOCOL_METHODS: readonly ["onDocumentUpdated", "onDocumentSaved", "onDocumentDirtyChanged", "onDocumentDeleted", "onDocumentsBuilt"];
|
|
29
29
|
/** Notification-method names on {@link ProjectClientProtocol}. */
|
|
30
30
|
export declare const PROJECT_CLIENT_PROTOCOL_METHODS: readonly ["onProjectsChanged"];
|
|
31
31
|
/**
|
|
@@ -35,5 +35,5 @@ export declare const PROJECT_CLIENT_PROTOCOL_METHODS: readonly ["onProjectsChang
|
|
|
35
35
|
* data head's connection routes `<methodNamespace>onDocumentUpdated` etc. to
|
|
36
36
|
* the bound client target.
|
|
37
37
|
*/
|
|
38
|
-
export declare const DATA_CLIENT_PROTOCOL_METHODS: readonly ["onDocumentUpdated", "onDocumentSaved", "onProjectsChanged"];
|
|
38
|
+
export declare const DATA_CLIENT_PROTOCOL_METHODS: readonly ["onDocumentUpdated", "onDocumentSaved", "onDocumentDirtyChanged", "onDocumentDeleted", "onDocumentsBuilt", "onProjectsChanged"];
|
|
39
39
|
//# sourceMappingURL=data-protocol-methods.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-protocol-methods.d.ts","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAalF,8DAA8D;AAC9D,eAAO,MAAM,gCAAgC,
|
|
1
|
+
{"version":3,"file":"data-protocol-methods.d.ts","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAalF,8DAA8D;AAC9D,eAAO,MAAM,gCAAgC,mTAe6C,CAAC;AAE3F,6DAA6D;AAC7D,eAAO,MAAM,+BAA+B,8CAE3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,sVAG6C,CAAC;AAEvF;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,0EAI4B,CAAC;AAE3E,mEAAmE;AACnE,eAAO,MAAM,gCAAgC,sHAM6C,CAAC;AAE3F,kEAAkE;AAClE,eAAO,MAAM,+BAA+B,gCAA+F,CAAC;AAE5I;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,2IAG6C,CAAC"}
|
|
@@ -11,11 +11,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
11
11
|
exports.DATA_CLIENT_PROTOCOL_METHODS = exports.PROJECT_CLIENT_PROTOCOL_METHODS = exports.DOCUMENT_CLIENT_PROTOCOL_METHODS = exports.REFERENCE_SERVER_PROTOCOL_METHODS = exports.DATA_SERVER_PROTOCOL_METHODS = exports.PROJECT_SERVER_PROTOCOL_METHODS = exports.DOCUMENT_SERVER_PROTOCOL_METHODS = void 0;
|
|
12
12
|
/** Request-method names on {@link DocumentServerProtocol}. */
|
|
13
13
|
exports.DOCUMENT_SERVER_PROTOCOL_METHODS = [
|
|
14
|
+
'createSession',
|
|
15
|
+
'closeSession',
|
|
16
|
+
'createModelDocument',
|
|
17
|
+
'updateModelDocuments',
|
|
14
18
|
'openModelDocument',
|
|
15
19
|
'closeModelDocument',
|
|
16
20
|
'getModelDocument',
|
|
17
21
|
'updateModelDocument',
|
|
18
22
|
'saveModelDocument',
|
|
23
|
+
'persistModelDocument',
|
|
24
|
+
'deleteModelDocument',
|
|
19
25
|
'watchModelDocument',
|
|
20
26
|
'unwatchModelDocument',
|
|
21
27
|
'waitForReady'
|
|
@@ -44,7 +50,13 @@ exports.REFERENCE_SERVER_PROTOCOL_METHODS = [
|
|
|
44
50
|
'findNextName'
|
|
45
51
|
];
|
|
46
52
|
/** Notification-method names on {@link DocumentClientProtocol}. */
|
|
47
|
-
exports.DOCUMENT_CLIENT_PROTOCOL_METHODS = [
|
|
53
|
+
exports.DOCUMENT_CLIENT_PROTOCOL_METHODS = [
|
|
54
|
+
'onDocumentUpdated',
|
|
55
|
+
'onDocumentSaved',
|
|
56
|
+
'onDocumentDirtyChanged',
|
|
57
|
+
'onDocumentDeleted',
|
|
58
|
+
'onDocumentsBuilt'
|
|
59
|
+
];
|
|
48
60
|
/** Notification-method names on {@link ProjectClientProtocol}. */
|
|
49
61
|
exports.PROJECT_CLIENT_PROTOCOL_METHODS = ['onProjectsChanged'];
|
|
50
62
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-protocol-methods.js","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAalF,8DAA8D;AACjD,QAAA,gCAAgC,GAAG;IAC7C,mBAAmB;IACnB,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,sBAAsB;IACtB,cAAc;CACyE,CAAC;AAE3F,6DAA6D;AAChD,QAAA,+BAA+B,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAEhF,CAAC;AAEF;;;;;GAKG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,
|
|
1
|
+
{"version":3,"file":"data-protocol-methods.js","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAalF,8DAA8D;AACjD,QAAA,gCAAgC,GAAG;IAC7C,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,sBAAsB;IACtB,mBAAmB;IACnB,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,sBAAsB;IACtB,qBAAqB;IACrB,oBAAoB;IACpB,sBAAsB;IACtB,cAAc;CACyE,CAAC;AAE3F,6DAA6D;AAChD,QAAA,+BAA+B,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAEhF,CAAC;AAEF;;;;;GAKG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,QAAA,gCAAgC;IACnC,GAAG,QAAA,+BAA+B;CACiD,CAAC;AAEvF;;;;;GAKG;AACU,QAAA,iCAAiC,GAAG;IAC9C,yBAAyB;IACzB,kBAAkB;IAClB,cAAc;CACyD,CAAC;AAE3E,mEAAmE;AACtD,QAAA,gCAAgC,GAAG;IAC7C,mBAAmB;IACnB,iBAAiB;IACjB,wBAAwB;IACxB,mBAAmB;IACnB,kBAAkB;CACqE,CAAC;AAE3F,kEAAkE;AACrD,QAAA,+BAA+B,GAAG,CAAC,mBAAmB,CAAwE,CAAC;AAE5I;;;;;;GAMG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,QAAA,gCAAgC;IACnC,GAAG,QAAA,+BAA+B;CACiD,CAAC"}
|