@hydranium/protocol 1.0.0-next.25 → 1.0.0-next.250
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 -49
- package/lib/abstract-logger.d.ts +5 -0
- package/lib/abstract-logger.d.ts.map +1 -1
- package/lib/abstract-logger.js +7 -0
- package/lib/abstract-logger.js.map +1 -1
- package/lib/client/data-connection.d.ts +245 -0
- package/lib/client/data-connection.d.ts.map +1 -0
- package/lib/client/data-connection.js +425 -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 +44 -27
- package/lib/client/data-port.d.ts.map +1 -1
- package/lib/client/data-session.d.ts +473 -81
- package/lib/client/data-session.d.ts.map +1 -1
- package/lib/client/data-session.js +743 -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 +10 -4
- package/lib/client/message-relay.d.ts.map +1 -1
- package/lib/client/message-relay.js +12 -6
- 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 +157 -0
- package/lib/client/rpc-connection.d.ts.map +1 -0
- package/lib/client/rpc-connection.js +214 -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/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 +12 -1
- package/lib/data/data-protocol-methods.js.map +1 -1
- package/lib/data/data-server-protocol.d.ts +132 -41
- package/lib/data/data-server-protocol.d.ts.map +1 -1
- package/lib/data/events.d.ts +117 -21
- package/lib/data/events.d.ts.map +1 -1
- package/lib/data/requests.d.ts +69 -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 +187 -29
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +270 -29
- package/lib/errors.js.map +1 -1
- 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 +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 +7 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -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 +30 -0
- package/lib/messages/index.d.ts.map +1 -0
- package/lib/messages/index.js +62 -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/{model-service/args.js → node/index.d.ts} +2 -3
- 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 +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/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 +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 +33 -3
- package/lib/rpc/bind-rpc-methods.d.ts.map +1 -1
- package/lib/rpc/bind-rpc-methods.js +32 -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/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/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 +46 -15
- package/lib/testing/data-doubles.d.ts.map +1 -1
- package/lib/testing/data-doubles.js +58 -10
- 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.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/wait-for.d.ts +3 -2
- package/lib/testing/wait-for.d.ts.map +1 -1
- package/lib/testing/wait-for.js +40 -10
- 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 +70 -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 +29 -37
- package/src/abstract-logger.ts +8 -0
- package/src/client/data-connection.ts +520 -0
- package/src/client/data-events.ts +33 -1
- package/src/client/data-port.ts +46 -28
- package/src/client/data-session.ts +951 -126
- package/src/client/index.ts +14 -9
- package/src/client/message-relay.ts +30 -8
- package/src/client/post-message-transport.ts +219 -4
- package/src/client/rpc-connection.ts +281 -0
- package/src/client-ids.ts +49 -0
- package/src/clock.ts +56 -0
- package/src/console-logger.ts +39 -0
- package/src/data/data-protocol-methods.ts +13 -4
- package/src/data/data-server-protocol.ts +157 -41
- package/src/data/events.ts +123 -21
- package/src/data/requests.ts +74 -11
- package/src/errors.ts +322 -36
- package/src/glsp-request-model-args.ts +16 -0
- package/src/glsp-save-model-actions.ts +59 -0
- package/src/index.ts +10 -0
- package/src/latency-collector.ts +8 -3
- package/src/logger.ts +28 -2
- package/src/messages/index.ts +37 -0
- package/src/messages/primitives.ts +271 -0
- package/src/model-server.ts +64 -19
- 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/node/index.ts +14 -0
- package/src/node/process-memory.ts +299 -0
- package/src/patch-merge.ts +97 -42
- package/src/profile-session.ts +9 -4
- package/src/random-uuid.ts +21 -0
- package/src/reconcile-write.ts +124 -0
- package/src/rpc/README.md +4 -5
- package/src/rpc/bind-rpc-methods.ts +59 -4
- package/src/rpc/create-rpc-proxy.ts +20 -2
- package/src/rpc/index.ts +1 -0
- package/src/rpc/send-by-method-name.ts +140 -0
- package/src/testing/catalogue-audit.ts +111 -0
- package/src/testing/data-doubles.ts +149 -25
- package/src/testing/fake-clock.ts +62 -47
- package/src/testing/index.ts +5 -2
- 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/wait-for.ts +38 -11
- package/src/transfer-diagnostic.ts +40 -0
- package/src/transfer-document.ts +87 -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.map +0 -1
- package/src/model-service/args.ts +0 -67
|
@@ -6,84 +6,272 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
-
import type
|
|
10
|
-
import { type
|
|
11
|
-
import {
|
|
12
|
-
import type
|
|
9
|
+
import { type Disposable, Emitter, type Event } from 'vscode-jsonrpc';
|
|
10
|
+
import { type Clock } from '../clock';
|
|
11
|
+
import type { DataServerProtocol, DiagnosticOf, TransferDocumentDirtyChangedEvent, TransferDocumentUpdatedEvent } from '../data';
|
|
12
|
+
import { type BaseVersion, type ModelVersion } from '../model-service/base-version';
|
|
13
|
+
import { type ResolvedMessage } from '../messages/primitives';
|
|
14
|
+
import type { OpenModelArgs } from '../model-server';
|
|
15
|
+
import type { MaybePromise } from '../util';
|
|
16
|
+
import type { RpcProxy } from '../rpc';
|
|
17
|
+
import type { TextState, TransferDocument, TransferSavedDocument } from '../transfer-document';
|
|
13
18
|
import type { TransferElement } from '../transfer-element';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
/**
|
|
20
|
+
* A session could not re-open a document it had open after its connection
|
|
21
|
+
* dropped, and forgot it; or could not write it again for another reason than
|
|
22
|
+
* a conflict, and keeps its unsaved edits for the next restore.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DATA_SESSION_RESTORE_FAILED: import("../messages/primitives").MessageDefinition<"Could not restore {uri} after reconnecting to the data server: {detail}">;
|
|
25
|
+
/** A write or open of `{uri}` that the data server answered without a model. */
|
|
26
|
+
export declare const DATA_SESSION_ANSWER_WITHOUT_MODEL: import("../messages/primitives").MessageDefinition<"The data server answered a write of {uri} without a model; the session counts that answer as older than every version.">;
|
|
27
|
+
/**
|
|
28
|
+
* A session re-opened documents after its connection dropped and cannot put
|
|
29
|
+
* back what it wrote to them since their last save: another client changed
|
|
30
|
+
* them, even while the session was still connected; the session could not
|
|
31
|
+
* tell the text its writes started from, or lost another document written with
|
|
32
|
+
* them; or the write it sent again conflicted. The session's unsaved edits may
|
|
33
|
+
* be gone, and it no longer holds them.
|
|
34
|
+
*/
|
|
35
|
+
export declare const DATA_SESSION_UNSAVED_LOST: import("../messages/primitives").MessageDefinition<"Unsaved changes to {uris} may have been lost when the connection to the data server dropped.">;
|
|
36
|
+
/**
|
|
37
|
+
* What one of `TServer`'s document methods takes, minus the `clientId` a
|
|
38
|
+
* {@link DataSession} stamps itself.
|
|
39
|
+
*
|
|
40
|
+
* Read off the SERVER's signature, not off the framework's own arg type: an
|
|
41
|
+
* adopter server widens these, and a wrapper declared against the narrow
|
|
42
|
+
* shape rejects the extra field on a fresh object literal, so that call
|
|
43
|
+
* cannot go through a session at all.
|
|
44
|
+
*/
|
|
45
|
+
export type DataSessionArgs<TMethod extends (args: never) => unknown> = Omit<Parameters<TMethod>[0], 'clientId'>;
|
|
46
|
+
/**
|
|
47
|
+
* Open a document through a session; the session supplies `clientId`. Only the
|
|
48
|
+
* URI and the open's options: a session's open reads the file, and the server
|
|
49
|
+
* ignores the `languageId`, `version` and `text` seeds of `OpenModelArgs`, so
|
|
50
|
+
* accepting them here would let a caller believe they took effect.
|
|
51
|
+
*/
|
|
52
|
+
export type DataSessionOpenArgs<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> = Pick<OpenModelArgs, 'uri' | 'options'>;
|
|
53
|
+
/** Create a document through a session; the session supplies `clientId`. */
|
|
54
|
+
export type DataSessionCreateArgs<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> = DataSessionArgs<TServer['createModelDocument']>;
|
|
55
|
+
/** Close a document through a session; the session supplies `clientId`. */
|
|
56
|
+
export type DataSessionCloseArgs<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> = DataSessionArgs<TServer['closeModelDocument']>;
|
|
57
|
+
/** Update a document through a session; the session supplies `clientId`. */
|
|
58
|
+
export type DataSessionUpdateArgs<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> = DataSessionArgs<TServer['updateModelDocument']>;
|
|
59
|
+
/** Update several documents at once through a session; the session supplies `clientId`. */
|
|
60
|
+
export type DataSessionUpdatesArgs<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> = DataSessionArgs<TServer['updateModelDocuments']>;
|
|
61
|
+
/** Persist a document through a session; the session supplies `clientId`. */
|
|
62
|
+
export type DataSessionSaveArgs<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> = DataSessionArgs<TServer['saveModelDocument']>;
|
|
63
|
+
/** Persist the text the server holds through a session; the session supplies `clientId`. */
|
|
64
|
+
export type DataSessionPersistArgs<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> = DataSessionArgs<TServer['persistModelDocument']>;
|
|
65
|
+
/** The document a session hands back, carrying its server's diagnostic shape. */
|
|
66
|
+
export type DataSessionDocument<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> = TransferDocument<TTransfer, DiagnosticOf<TServer>>;
|
|
67
|
+
/**
|
|
68
|
+
* What a {@link DataSession} keeps of a URI it wrote since the URI's last save,
|
|
69
|
+
* to write it again after a reconnect that lost it.
|
|
70
|
+
*/
|
|
71
|
+
export interface DataSessionUnsavedWrite<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> {
|
|
17
72
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* `
|
|
21
|
-
*
|
|
22
|
-
*
|
|
73
|
+
* The `text.hash` of the text the first of these writes was based on.
|
|
74
|
+
* `undefined` when the session could not tell, for a write based on
|
|
75
|
+
* `'any'` or on a version it could not read back, and such a write is
|
|
76
|
+
* never sent again: the session cannot tell another client's text from the
|
|
77
|
+
* text it wrote over.
|
|
23
78
|
*/
|
|
24
|
-
readonly
|
|
79
|
+
readonly baseHash: string | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* The model version the last of these writes was answered with, which
|
|
82
|
+
* orders its answers, and the `text.hash` of that answer.
|
|
83
|
+
*/
|
|
84
|
+
readonly answer: {
|
|
85
|
+
readonly version: ModelVersion;
|
|
86
|
+
readonly hash?: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* The call that made the last write, and for an `updateDocuments` call this
|
|
90
|
+
* URI's index in it. Records whose `updates` is the same object were
|
|
91
|
+
* written together and are sent again together, so a restore never applies
|
|
92
|
+
* part of a set.
|
|
93
|
+
*/
|
|
94
|
+
readonly call: {
|
|
95
|
+
readonly update: DataSessionUpdateArgs<TTransfer, TServer>;
|
|
96
|
+
} | {
|
|
97
|
+
readonly updates: DataSessionUpdatesArgs<TTransfer, TServer>;
|
|
98
|
+
readonly index: number;
|
|
99
|
+
};
|
|
25
100
|
}
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
101
|
+
/**
|
|
102
|
+
* What a {@link DataSession} needs from the connection that minted it.
|
|
103
|
+
*
|
|
104
|
+
* Narrower than the connection itself so the dependency points one way:
|
|
105
|
+
* `DataConnection` constructs sessions, and nothing here imports it back.
|
|
106
|
+
*/
|
|
107
|
+
export interface DataSessionHost<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>>> {
|
|
108
|
+
/** The connected, READY proxy of the current connection; a new object after each reconnect. */
|
|
109
|
+
connected(): Promise<RpcProxy<TServer>>;
|
|
110
|
+
/** Surface a failure no caller is waiting on, such as restoring a document after a reconnect. */
|
|
111
|
+
reportError?(error: unknown, reported: ResolvedMessage): void;
|
|
112
|
+
/**
|
|
113
|
+
* Tell the connection's client the dirty state a restore read, unless it
|
|
114
|
+
* is what the client was last told of the URI since the URI's last open.
|
|
115
|
+
*/
|
|
116
|
+
restoreDirty?(event: TransferDocumentDirtyChangedEvent): void;
|
|
117
|
+
/**
|
|
118
|
+
* Forget what the client was told of `uri`'s dirty state: an open just
|
|
119
|
+
* made answered its caller afresh, and the client heard none of it, or a
|
|
120
|
+
* close leaves nothing to restore. Forgetting a URI another session still
|
|
121
|
+
* has open costs at most one repeat of a state the client already has.
|
|
122
|
+
*/
|
|
123
|
+
forgetDirty?(uri: string): void;
|
|
124
|
+
/**
|
|
125
|
+
* Fires with each flip of a document's dirty state the server sends. A
|
|
126
|
+
* session drops the unsaved write it keeps of a document that turns
|
|
127
|
+
* clean; without this event it keeps it, and a restore after another
|
|
128
|
+
* client's save of the document can report the write lost.
|
|
129
|
+
*/
|
|
130
|
+
readonly onDidChangeDirty?: Event<TransferDocumentDirtyChangedEvent>;
|
|
131
|
+
/**
|
|
132
|
+
* Fires with each update event the server sends. A session drops the
|
|
133
|
+
* unsaved write it keeps of a document another client wrote over; without
|
|
134
|
+
* this event it keeps it, and a restore reports the write lost.
|
|
135
|
+
*/
|
|
136
|
+
readonly onDidUpdateDocument?: Event<TransferDocumentUpdatedEvent<TTransfer, DiagnosticOf<TServer>>>;
|
|
32
137
|
}
|
|
33
138
|
/**
|
|
34
|
-
*
|
|
35
|
-
* {@link
|
|
36
|
-
*
|
|
139
|
+
* Builds the session `DataConnection.createSession` hands out, for an adopter
|
|
140
|
+
* that extends {@link DataSession}. The connection has minted `clientId` and
|
|
141
|
+
* checked it by then.
|
|
142
|
+
*/
|
|
143
|
+
export type DataSessionFactory<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>>> = (clientId: string, host: DataSessionHost<TTransfer, TServer>, label: string) => DataSession<TTransfer, TServer>;
|
|
144
|
+
/**
|
|
145
|
+
* One participant on a data connection: a properties panel, a tree, a form
|
|
146
|
+
* editor. The client side of a server client session, registered over the
|
|
147
|
+
* wire under {@link clientId}.
|
|
148
|
+
*
|
|
149
|
+
* The session writes only what it has open: the server refuses its update or
|
|
150
|
+
* save of a document it has not opened with a `DocumentNotOpenError` code.
|
|
151
|
+
* Every call waits for the registration, so the first can be issued at once.
|
|
37
152
|
*
|
|
38
|
-
*
|
|
153
|
+
* Every document operation stamps {@link clientId} itself. A caller that
|
|
154
|
+
* passed its own could pass another participant's, and the server would
|
|
155
|
+
* attribute the write and close the document accordingly.
|
|
39
156
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* workspace walk finishes, and an early request is then answered correctly
|
|
45
|
-
* from an empty registry, which reads as a broken project tier rather than
|
|
46
|
-
* as a race.
|
|
47
|
-
* 3. **Own the reconnect policy**, by dropping its connection generation when
|
|
48
|
-
* the port disposes and building a fresh one on the next request.
|
|
157
|
+
* {@link closeDocument} and {@link dispose} first wait, up to
|
|
158
|
+
* {@link settleBeforeCloseMs}, for this session's calls still in flight on the
|
|
159
|
+
* URI, or on any URI for `dispose`: a save sent just before its close would
|
|
160
|
+
* otherwise reach the server after it, and fail as not open.
|
|
49
161
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
162
|
+
* After the connection drops, the session registers again under the same id,
|
|
163
|
+
* re-opens and re-watches what it had open, tells the client of their dirty
|
|
164
|
+
* state where it changed, and reports the documents whose unsaved edits did
|
|
165
|
+
* not survive; see {@link restore}. The connection does this at
|
|
166
|
+
* once for a session with documents open, and again once any later connection
|
|
167
|
+
* is ready, so a reconnect that failed is not left to the session's own next
|
|
168
|
+
* call; any session's next call does it too.
|
|
54
169
|
*
|
|
55
|
-
* Generic over the transfer root so this file names no grammar.
|
|
56
|
-
*
|
|
57
|
-
*
|
|
170
|
+
* Generic over the transfer root so this file names no grammar.
|
|
171
|
+
*
|
|
172
|
+
* `TServer` is bound to a server answering with ITS OWN diagnostic shape, read
|
|
173
|
+
* back off the parameter being bound. Simplifying that to
|
|
174
|
+
* `DataServerProtocol<TTransfer>` compiles and costs the wrappers their
|
|
175
|
+
* return type: every call through `TServer` would resolve against that looser
|
|
176
|
+
* bound, so an adopter's diagnostics would come back as the framework's and
|
|
177
|
+
* the document would have to be cast on the way out.
|
|
58
178
|
*/
|
|
59
|
-
export declare class DataSession<TTransfer extends TransferElement
|
|
60
|
-
|
|
61
|
-
protected readonly
|
|
62
|
-
|
|
63
|
-
/** The current generation, or `undefined` before the first request / after a teardown. */
|
|
64
|
-
protected generation?: Generation<TTransfer>;
|
|
65
|
-
protected disposed: boolean;
|
|
66
|
-
protected readonly portDisposeListener: {
|
|
67
|
-
dispose(): void;
|
|
68
|
-
};
|
|
69
|
-
constructor(port: DataPort, client: DataClientProtocol<TTransfer>, options?: DataSessionOptions);
|
|
70
|
-
/** The identity every request is made under — the port's, not a second one. */
|
|
71
|
-
get clientId(): string;
|
|
179
|
+
export declare class DataSession<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>> = DataServerProtocol<TTransfer>> implements Disposable {
|
|
180
|
+
readonly clientId: string;
|
|
181
|
+
protected readonly host: DataSessionHost<TTransfer, TServer>;
|
|
182
|
+
readonly label: string;
|
|
72
183
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
|
|
78
|
-
|
|
184
|
+
* How long {@link closeDocument} and {@link dispose} wait for this session's
|
|
185
|
+
* calls in flight before closing anyway. Long, because the wait only runs
|
|
186
|
+
* out when a call hangs, and a close sent while a save is still running
|
|
187
|
+
* fails that save.
|
|
188
|
+
*/
|
|
189
|
+
protected readonly settleBeforeCloseMs: number;
|
|
190
|
+
/**
|
|
191
|
+
* The clock {@link settleBeforeCloseMs} runs on. {@link DataSessionHost}
|
|
192
|
+
* carries no {@link Clock}, so a subclass replaces this field as it
|
|
193
|
+
* replaces the bound.
|
|
194
|
+
*/
|
|
195
|
+
protected readonly clock: Clock;
|
|
196
|
+
/** URIs this session has open, re-opened after a reconnect. */
|
|
197
|
+
protected readonly openUris: Set<string>;
|
|
198
|
+
/**
|
|
199
|
+
* Per URI in {@link openUris}, the URI the server's last answer to its open
|
|
200
|
+
* or re-open named. The server keys its notifications by it, and so does
|
|
201
|
+
* the host's record of what its client was told.
|
|
202
|
+
*/
|
|
203
|
+
protected readonly serverUris: Map<string, string>;
|
|
204
|
+
/**
|
|
205
|
+
* Per URI, how many opens of it this session has under way. Such a URI
|
|
206
|
+
* counts as open for {@link withOpenDocument}, which would otherwise close
|
|
207
|
+
* it under the open that is still being made.
|
|
208
|
+
*/
|
|
209
|
+
protected readonly openingUris: Map<string, number>;
|
|
210
|
+
/** Per URI written since its last save, what {@link restore} needs to write it again. */
|
|
211
|
+
protected readonly unsavedWrites: Map<string, DataSessionUnsavedWrite<TTransfer, TServer>>;
|
|
212
|
+
/**
|
|
213
|
+
* Per URI this session has open, the text of the last document one of its
|
|
214
|
+
* own calls was answered with, which spares the read a first unsaved write
|
|
215
|
+
* otherwise makes for its base; see {@link baseHashOf}.
|
|
216
|
+
*/
|
|
217
|
+
protected readonly lastAnswers: Map<string, TextState>;
|
|
218
|
+
/**
|
|
219
|
+
* Per URI this session has open, the text version its last save or persist
|
|
220
|
+
* of it wrote, as its answer's `persisted` says; see {@link recordWrite}.
|
|
221
|
+
* Not the answer's model version, which can carry a write that landed
|
|
222
|
+
* after the text was taken. Only those set it: an open answers at the
|
|
223
|
+
* version of a write still in flight as well, and that write is not saved.
|
|
224
|
+
*/
|
|
225
|
+
protected readonly savedVersions: Map<string, number>;
|
|
226
|
+
/** Per URI, this session's calls still in flight on it, which a close waits for. */
|
|
227
|
+
protected readonly inFlight: Map<string, Set<Promise<unknown>>>;
|
|
228
|
+
/** This session's saves still in flight, which a host's exit waits for; see {@link hasSavesInFlight}. */
|
|
229
|
+
protected readonly savesInFlight: Set<Promise<unknown>>;
|
|
230
|
+
protected readonly disposeEmitter: Emitter<void>;
|
|
231
|
+
/**
|
|
232
|
+
* Fires once when the session ends, by {@link dispose} or {@link detach}, as
|
|
233
|
+
* soon as it rejects further calls and before any close is sent. For a
|
|
234
|
+
* session its connection created, the connection's listener runs first, so
|
|
235
|
+
* the id is free again on that connection by the time any other listener
|
|
236
|
+
* runs; the server still holds it until the close arrives, and refuses a new
|
|
237
|
+
* session under it until then.
|
|
79
238
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
239
|
+
* A listener subscribed once the session has ended is never called, so a
|
|
240
|
+
* late subscriber checks {@link isDisposed} first.
|
|
241
|
+
*/
|
|
242
|
+
readonly onDidDispose: Event<void>;
|
|
243
|
+
/**
|
|
244
|
+
* Sent with every registration, so the server lets this session register
|
|
245
|
+
* its id again while the dropped connection's session is still live there:
|
|
246
|
+
* a server that has not yet noticed the drop would otherwise refuse the id
|
|
247
|
+
* as a duplicate until it does.
|
|
248
|
+
*/
|
|
249
|
+
protected readonly resumeToken: string;
|
|
250
|
+
/** The proxy the session is registered on; another one means the connection was replaced. */
|
|
251
|
+
protected registeredOn?: RpcProxy<TServer>;
|
|
252
|
+
protected registration?: Promise<void>;
|
|
253
|
+
protected disposed: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Disposed through {@link detach} rather than {@link dispose}, so nothing may
|
|
256
|
+
* be sent. Folding it into {@link disposed} would send the session's close
|
|
257
|
+
* over a connection that is going away.
|
|
258
|
+
*/
|
|
259
|
+
protected detached: boolean;
|
|
260
|
+
/** The subscription to the host's `onDidChangeDirty`, disposed with the session. */
|
|
261
|
+
protected readonly dirtySubscription?: Disposable;
|
|
262
|
+
/** The subscription to the host's `onDidUpdateDocument`, disposed with the session. */
|
|
263
|
+
protected readonly updateSubscription?: Disposable;
|
|
264
|
+
constructor(clientId: string, host: DataSessionHost<TTransfer, TServer>, label: string);
|
|
265
|
+
/**
|
|
266
|
+
* The connected, READY server proxy once this session is registered on it,
|
|
267
|
+
* for protocol methods this session does not wrap. The proxy stamps
|
|
268
|
+
* nothing: pass this session's {@link clientId} to any method that carries
|
|
269
|
+
* one.
|
|
82
270
|
*/
|
|
83
|
-
connected(): Promise<RpcProxy<
|
|
271
|
+
connected(): Promise<RpcProxy<TServer>>;
|
|
84
272
|
/**
|
|
85
|
-
* Open `uri` for editing and start watching it, in that order,
|
|
86
|
-
* the opened snapshot.
|
|
273
|
+
* Open `args.uri` for editing and start watching it, in that order,
|
|
274
|
+
* returning the opened snapshot.
|
|
87
275
|
*
|
|
88
276
|
* **The order is the whole reason this method exists.**
|
|
89
277
|
* `watchModelDocument` baselines its dedup fingerprint from the *current*
|
|
@@ -91,39 +279,243 @@ export declare class DataSession<TTransfer extends TransferElement> {
|
|
|
91
279
|
* baseline, and the first phase event after the open arrives as a spurious
|
|
92
280
|
* `'changed'` — which a widget that resets its in-memory root to the server
|
|
93
281
|
* view misreads as a concurrent third-party write, losing whatever the user
|
|
94
|
-
* had typed.
|
|
95
|
-
* here rather than documented and re-derived.
|
|
282
|
+
* had typed.
|
|
96
283
|
*
|
|
97
|
-
* Note that the returned snapshot's
|
|
98
|
-
*
|
|
284
|
+
* Note that the returned snapshot's model usually has no `diagnostics`:
|
|
285
|
+
* `open` settles at the integrity landmark, not at validation.
|
|
99
286
|
* Validity arrives asynchronously on `onDocumentUpdated`, or synchronously
|
|
100
287
|
* from `getModelDocument({ includeDiagnostics: true })`.
|
|
101
288
|
*/
|
|
102
|
-
openDocument(
|
|
289
|
+
openDocument(args: DataSessionOpenArgs<TTransfer, TServer>): Promise<DataSessionDocument<TTransfer, TServer>>;
|
|
290
|
+
/**
|
|
291
|
+
* Create a document that exists nowhere yet, open and watched for this
|
|
292
|
+
* session; it reaches disk with the first {@link saveDocument}. The server
|
|
293
|
+
* refuses a URI that exists on disk or that any client has open.
|
|
294
|
+
*/
|
|
295
|
+
createDocument(args: DataSessionCreateArgs<TTransfer, TServer>): Promise<DataSessionDocument<TTransfer, TServer>>;
|
|
296
|
+
/**
|
|
297
|
+
* Watch a document this session just opened, and record it as open. A
|
|
298
|
+
* failed watch closes it again: the caller sees a failed open and so would
|
|
299
|
+
* never close it.
|
|
300
|
+
*/
|
|
301
|
+
protected watchOpened(server: RpcProxy<TServer>, uri: string, document: DataSessionDocument<TTransfer, TServer>): Promise<DataSessionDocument<TTransfer, TServer>>;
|
|
302
|
+
/**
|
|
303
|
+
* Close `args.uri`, once this session's calls on it have settled or
|
|
304
|
+
* {@link settleBeforeCloseMs} has passed. The server unwatches implicitly,
|
|
305
|
+
* so this is the dual of {@link openDocument} and needs no separate unwatch.
|
|
306
|
+
*/
|
|
307
|
+
closeDocument(args: DataSessionCloseArgs<TTransfer, TServer>): Promise<void>;
|
|
103
308
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
309
|
+
* Open `args.uri`, run `fn` with the opened snapshot, and close it once
|
|
310
|
+
* `fn` settles, whether it returned or threw. A URI this session already
|
|
311
|
+
* had open, or is still opening through another call, stays open: the close
|
|
312
|
+
* undoes only the open this call made.
|
|
106
313
|
*/
|
|
107
|
-
|
|
314
|
+
withOpenDocument<T>(args: DataSessionOpenArgs<TTransfer, TServer>, fn: (document: DataSessionDocument<TTransfer, TServer>) => MaybePromise<T>): Promise<T>;
|
|
315
|
+
/** Write `args.model` back as this session. The session must have `args.uri` open. */
|
|
316
|
+
updateDocument(args: DataSessionUpdateArgs<TTransfer, TServer>): Promise<DataSessionDocument<TTransfer, TServer>>;
|
|
108
317
|
/**
|
|
109
|
-
*
|
|
318
|
+
* Write several documents this session has open, all or none: the server
|
|
319
|
+
* refuses the whole set, before any text applies, when one is stale or not
|
|
320
|
+
* open. Resolves to the documents in the order given.
|
|
321
|
+
*/
|
|
322
|
+
updateDocuments(args: DataSessionUpdatesArgs<TTransfer, TServer>): Promise<DataSessionDocument<TTransfer, TServer>[]>;
|
|
323
|
+
/** Persist `args.model` to disk as this session. The session must have `args.uri` open. */
|
|
324
|
+
saveDocument(args: DataSessionSaveArgs<TTransfer, TServer>): Promise<TransferSavedDocument<TTransfer, DiagnosticOf<TServer>>>;
|
|
325
|
+
/**
|
|
326
|
+
* Persist the text the server holds for `args.uri` as this session, with no
|
|
327
|
+
* model of its own. The session must have `args.uri` open.
|
|
328
|
+
*/
|
|
329
|
+
persistDocument(args: DataSessionPersistArgs<TTransfer, TServer>): Promise<TransferSavedDocument<TTransfer, DiagnosticOf<TServer>>>;
|
|
330
|
+
/** Run a save or persist of `uri` and record what it answered as saved. */
|
|
331
|
+
protected trackSave(uri: string, send: (server: RpcProxy<TServer>) => Promise<TransferSavedDocument<TTransfer, DiagnosticOf<TServer>>>): Promise<TransferSavedDocument<TTransfer, DiagnosticOf<TServer>>>;
|
|
332
|
+
/** Whether the session has ended, by {@link dispose} or {@link detach}. */
|
|
333
|
+
get isDisposed(): boolean;
|
|
334
|
+
/**
|
|
335
|
+
* Whether a save of this session has not answered yet. Synchronous, for a
|
|
336
|
+
* host whose exit veto must decide within the tick, such as Theia's
|
|
337
|
+
* `onWillStop`.
|
|
338
|
+
*/
|
|
339
|
+
get hasSavesInFlight(): boolean;
|
|
340
|
+
/**
|
|
341
|
+
* Resolves once the saves in flight now have answered, or
|
|
342
|
+
* {@link settleBeforeCloseMs} has passed. Never rejects: a failed save has
|
|
343
|
+
* answered too.
|
|
344
|
+
*/
|
|
345
|
+
whenSavesSettled(): Promise<void>;
|
|
346
|
+
/**
|
|
347
|
+
* Whether `sourceClientId` identifies this session's own write.
|
|
110
348
|
*
|
|
111
349
|
* Every watcher needs this and the check is one comparison, so getting it
|
|
112
350
|
* wrong is cheap to do and expensive to find: an unfiltered echo looks
|
|
113
351
|
* exactly like a concurrent third-party edit.
|
|
114
352
|
*/
|
|
115
353
|
isOwnEcho(sourceClientId: string): boolean;
|
|
116
|
-
/**
|
|
354
|
+
/**
|
|
355
|
+
* End the session: detach it from the connection at once, and once its
|
|
356
|
+
* calls in flight have settled or {@link settleBeforeCloseMs} has passed,
|
|
357
|
+
* end it on the server, which closes everything it has open. Idempotent,
|
|
358
|
+
* and leaves the connection usable by its other sessions.
|
|
359
|
+
*
|
|
360
|
+
* Every later call rejects, and so does a call made earlier in the same
|
|
361
|
+
* tick, which has not reached the wire yet and is never sent. The server
|
|
362
|
+
* close is not awaited, because a `Disposable` cannot be; a close that fails
|
|
363
|
+
* leaves the session to the server's connection-close cleanup.
|
|
364
|
+
*/
|
|
117
365
|
dispose(): void;
|
|
118
|
-
/** The live generation, building one if there is none. */
|
|
119
|
-
protected currentGeneration(): Generation<TTransfer>;
|
|
120
|
-
/** Await the connection and the server's startup gate for one generation. */
|
|
121
|
-
protected awaitReady(generation: Generation<TTransfer>): Promise<void>;
|
|
122
366
|
/**
|
|
123
|
-
*
|
|
124
|
-
*
|
|
367
|
+
* Come off the connection because it is going away.
|
|
368
|
+
*
|
|
369
|
+
* Sends nothing, unlike {@link dispose}: the server ends every session on a
|
|
370
|
+
* connection it sees close, and the close would travel over the very
|
|
371
|
+
* connection being disposed.
|
|
372
|
+
*
|
|
373
|
+
* Public because the connection calls it; anyone else ends a session with
|
|
374
|
+
* {@link dispose}. It fires {@link onDidDispose} only if the session has not
|
|
375
|
+
* already ended, and after {@link dispose} it still cancels the close that
|
|
376
|
+
* dispose has not sent yet.
|
|
377
|
+
*/
|
|
378
|
+
detach(): void;
|
|
379
|
+
/**
|
|
380
|
+
* Dispose {@link dirtySubscription} and {@link updateSubscription}, fire
|
|
381
|
+
* {@link onDidDispose} and dispose its emitter, so a second call fires
|
|
382
|
+
* nothing.
|
|
383
|
+
*/
|
|
384
|
+
protected fireDispose(): void;
|
|
385
|
+
/**
|
|
386
|
+
* Register again and restore now, after the connection dropped, instead of
|
|
387
|
+
* on the next call. A no-op for a session with nothing open, which the next
|
|
388
|
+
* call restores anyway, and for one already registered on the current
|
|
389
|
+
* connection. A failure is retried on the connection's next ready
|
|
390
|
+
* generation; a call before then meets it again.
|
|
391
|
+
*/
|
|
392
|
+
reconnect(): void;
|
|
393
|
+
/**
|
|
394
|
+
* Drop the record in {@link unsavedWrites} of a document this session has
|
|
395
|
+
* open once the server says it turned clean: it holds no unsaved text
|
|
396
|
+
* then, and a record kept would have a restore report the write lost once
|
|
397
|
+
* another client's save changed the file.
|
|
398
|
+
*
|
|
399
|
+
* The server sends a flip only for a document someone watches, so a
|
|
400
|
+
* document the session writes without watching it keeps its record, and
|
|
401
|
+
* can still be reported lost that way.
|
|
402
|
+
*/
|
|
403
|
+
protected forgetSavedWrite(event: TransferDocumentDirtyChangedEvent): void;
|
|
404
|
+
/**
|
|
405
|
+
* Drop the record in {@link unsavedWrites} of a document another client
|
|
406
|
+
* wrote over while the connection held: its write replaced the session's,
|
|
407
|
+
* so a restore has nothing of the session's to put back, and a record kept
|
|
408
|
+
* would have it report the write lost to the reconnect. A write superseded
|
|
409
|
+
* before its answer needs nothing: the answer names the other client's
|
|
410
|
+
* text, which the record then holds.
|
|
411
|
+
*
|
|
412
|
+
* Only a `'changed'` event from another client counts, and only where the
|
|
413
|
+
* document no longer holds the write: the session's own echo, and an
|
|
414
|
+
* integrity repair already in the write's answer, replaced nothing, and a
|
|
415
|
+
* `'rebuilt'` event carries no new text. Like {@link forgetSavedWrite}, it
|
|
416
|
+
* depends on the server sending the event, which it does only for a
|
|
417
|
+
* document someone watches.
|
|
418
|
+
*/
|
|
419
|
+
protected forgetSupersededWrite(event: TransferDocumentUpdatedEvent<TTransfer, DiagnosticOf<TServer>>): void;
|
|
420
|
+
/**
|
|
421
|
+
* Register on `server`, and after a reconnect restore what the ended session
|
|
422
|
+
* had. Calls issued meanwhile wait for this.
|
|
423
|
+
*/
|
|
424
|
+
protected register(server: RpcProxy<TServer>, reconnected: boolean): Promise<void>;
|
|
425
|
+
/**
|
|
426
|
+
* Re-open and re-watch every document the session had open, write again
|
|
427
|
+
* what it wrote since their last save where the re-open lost it, and tell
|
|
428
|
+
* the host which of them lost it for good.
|
|
429
|
+
*
|
|
430
|
+
* Decided per document by the re-opened document's `text.hash`,
|
|
431
|
+
* in {@link restoreOutcome}. Versions cannot decide a write: a revert moves
|
|
432
|
+
* the version on and a restarted server numbers afresh, so the version the
|
|
433
|
+
* last write was answered with never matches where a write is needed, and
|
|
434
|
+
* any other version may be another client's edit, which a write would
|
|
435
|
+
* overwrite.
|
|
436
|
+
*
|
|
437
|
+
* Only what the drop cost is reported: a write another client wrote over
|
|
438
|
+
* while the connection held has no record left by then, see
|
|
439
|
+
* {@link forgetSupersededWrite}.
|
|
440
|
+
*
|
|
441
|
+
* A write is sent again based on the re-opened version, as an ordinary
|
|
442
|
+
* write, so an edit arriving in between conflicts, and a conflict is not
|
|
443
|
+
* retried. Documents last written by one {@link updateDocuments} are sent
|
|
444
|
+
* again by one, and only when every one of them may be; a document that
|
|
445
|
+
* could not be re-opened blocks its set.
|
|
446
|
+
*
|
|
447
|
+
* No caller is waiting, so the outcomes go through the host: one report
|
|
448
|
+
* naming every document whose unsaved text is gone, whose record is then
|
|
449
|
+
* dropped, and one per document that could not be re-opened or written
|
|
450
|
+
* again for another reason than a conflict. A document that could not be
|
|
451
|
+
* re-opened is forgotten; a failed write keeps its record, for the next
|
|
452
|
+
* restore to decide again.
|
|
453
|
+
*
|
|
454
|
+
* Each document's dirty state goes to the host too, read once the watch is
|
|
455
|
+
* in place and any write is sent: a flip while the connection was down, or
|
|
456
|
+
* between the re-open and the watch, reached no one, and the re-open's own
|
|
457
|
+
* answer misses the second. Read before the write, it would tell the client
|
|
458
|
+
* a document is clean that the write is about to make dirty again.
|
|
459
|
+
*/
|
|
460
|
+
protected restore(server: RpcProxy<TServer>): Promise<void>;
|
|
461
|
+
/**
|
|
462
|
+
* Whether the re-opened `document` still holds the session's unsaved
|
|
463
|
+
* `write` (`'kept'`), holds the text the write started from, so the write
|
|
464
|
+
* can be sent again (`'resend'`), or holds something else (`'lost'`).
|
|
465
|
+
*
|
|
466
|
+
* A document without `text` comes from a server that sends none, and
|
|
467
|
+
* counts as kept only at the version the write was answered with. One
|
|
468
|
+
* without a model has no version to send the write again on.
|
|
469
|
+
*/
|
|
470
|
+
protected restoreOutcome(write: DataSessionUnsavedWrite<TTransfer, TServer>, document: DataSessionDocument<TTransfer, TServer>): 'kept' | 'resend' | 'lost';
|
|
471
|
+
/**
|
|
472
|
+
* Write again, in one call and based on their `reopened` versions, the
|
|
473
|
+
* `members` of one write call that the re-open lost, all or none. Returns
|
|
474
|
+
* the URIs whose unsaved text is gone, and drops their records, and the
|
|
475
|
+
* record of a member that could not be re-opened.
|
|
476
|
+
*
|
|
477
|
+
* A member whose record is no longer the one the restore started with was
|
|
478
|
+
* closed, saved or disposed meanwhile, and is left out: writing it would
|
|
479
|
+
* put back text its caller discarded.
|
|
480
|
+
*/
|
|
481
|
+
protected reapply(server: RpcProxy<TServer>, members: readonly [string, DataSessionUnsavedWrite<TTransfer, TServer>][], reopened: ReadonlyMap<string, DataSessionDocument<TTransfer, TServer>>): Promise<string[]>;
|
|
482
|
+
/**
|
|
483
|
+
* The text hash of the version `baseVersion` names for `uri`, for a write that
|
|
484
|
+
* starts the URI's record in {@link unsavedWrites}; `undefined` for any
|
|
485
|
+
* other write, whose record keeps the base it has.
|
|
486
|
+
*
|
|
487
|
+
* Taken from {@link lastAnswers} when that is at the version, otherwise
|
|
488
|
+
* read, and kept only when the read answers that version: a server's text
|
|
489
|
+
* changes only with its version, so the text at a version is the text the
|
|
490
|
+
* write, once it passes the gate, was applied to.
|
|
491
|
+
*/
|
|
492
|
+
protected baseHashOf(server: RpcProxy<TServer>, uri: string, baseVersion: BaseVersion): Promise<string | undefined>;
|
|
493
|
+
/**
|
|
494
|
+
* Record `document` as the answer to a write of `uri`, keeping the base of
|
|
495
|
+
* the URI's record if it has one. An answer numbered below the record's is
|
|
496
|
+
* ignored: two writes of `uri` in flight at once may answer out of order,
|
|
497
|
+
* and the record holds the one applied last.
|
|
498
|
+
*
|
|
499
|
+
* So is one numbered at or below the URI's entry in {@link savedVersions}.
|
|
500
|
+
* The save came after that write was applied, so the save persisted its
|
|
501
|
+
* text or a later write replaced it, and its answer carries the text as it
|
|
502
|
+
* was when sent, which a restore would report as lost.
|
|
503
|
+
*/
|
|
504
|
+
protected recordWrite(uri: string, document: DataSessionDocument<TTransfer, TServer>, baseHash: string | undefined, call: DataSessionUnsavedWrite<TTransfer, TServer>['call']): void;
|
|
505
|
+
/**
|
|
506
|
+
* What {@link DataSessionUnsavedWrite.answer} keeps of `document`. Every write
|
|
507
|
+
* and open answers with a model; one without is reported and counted older
|
|
508
|
+
* than every version, so it never replaces a real answer.
|
|
125
509
|
*/
|
|
126
|
-
protected
|
|
510
|
+
protected answerOf(uri: string, document: DataSessionDocument<TTransfer, TServer>): DataSessionUnsavedWrite<TTransfer, TServer>['answer'];
|
|
511
|
+
/** Keep `document`'s text in {@link lastAnswers}, or forget it for a server that sends none. */
|
|
512
|
+
protected recordText(uri: string, document: DataSessionDocument<TTransfer, TServer>): void;
|
|
513
|
+
/** Run `call`, counted as in flight on each of `uris` until it settles. */
|
|
514
|
+
protected track<T>(uris: readonly string[], call: () => Promise<T>): Promise<T>;
|
|
515
|
+
/** {@link track} an open of `uri`, counted in {@link openingUris} until it settles. */
|
|
516
|
+
protected trackOpen<T>(uri: string, call: () => Promise<T>): Promise<T>;
|
|
517
|
+
/** Wait until `calls` have settled, or {@link settleBeforeCloseMs} has passed. */
|
|
518
|
+
protected settle(calls: Iterable<Promise<unknown>> | undefined): Promise<void>;
|
|
519
|
+
protected assertLive(): void;
|
|
127
520
|
}
|
|
128
|
-
export {};
|
|
129
521
|
//# sourceMappingURL=data-session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-session.d.ts","sourceRoot":"","sources":["../../src/client/data-session.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"data-session.d.ts","sourceRoot":"","sources":["../../src/client/data-session.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,UAAU,EAAE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAEjI,OAAO,EAAE,KAAK,WAAW,EAAkB,KAAK,YAAY,EAAwC,MAAM,+BAA+B,CAAC;AAC1I,OAAO,EAAE,KAAK,eAAe,EAAyC,MAAM,wBAAwB,CAAC;AACrG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,q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