@hydranium/protocol 1.0.0-next.39 → 1.0.0-next.390
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 +46 -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 +11 -2
- package/lib/client/data-events.d.ts.map +1 -1
- package/lib/client/data-events.js +13 -1
- 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 +762 -89
- package/lib/client/data-session.d.ts.map +1 -1
- package/lib/client/data-session.js +1253 -115
- package/lib/client/data-session.js.map +1 -1
- package/lib/client/index.d.ts +16 -9
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/index.js +16 -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/working-copy.d.ts +420 -0
- package/lib/client/working-copy.d.ts.map +1 -0
- package/lib/client/working-copy.js +958 -0
- package/lib/client/working-copy.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 +7 -0
- package/lib/data/data-protocol-methods.js.map +1 -1
- package/lib/data/data-server-protocol.d.ts +160 -50
- package/lib/data/data-server-protocol.d.ts.map +1 -1
- package/lib/data/events.d.ts +75 -31
- 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 +241 -48
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +395 -60
- 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 +58 -11
- 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 +33 -0
- package/lib/pending-work-tracker.d.ts.map +1 -0
- package/lib/pending-work-tracker.js +48 -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 +36 -11
- package/lib/testing/data-doubles.d.ts.map +1 -1
- package/lib/testing/data-doubles.js +47 -9
- 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/harness.d.ts +9 -0
- package/lib/testing/harness.d.ts.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 +2 -0
- package/lib/testing/node/index.d.ts.map +1 -1
- package/lib/testing/node/index.js +3 -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/node/unhandled-rejections.d.ts +20 -0
- package/lib/testing/node/unhandled-rejections.d.ts.map +1 -0
- package/lib/testing/node/unhandled-rejections.js +35 -0
- package/lib/testing/node/unhandled-rejections.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 +108 -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 +15 -1
- package/src/client/data-port.ts +36 -25
- package/src/client/data-session.ts +1606 -137
- package/src/client/index.ts +16 -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/working-copy.ts +1116 -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 +8 -1
- package/src/data/data-server-protocol.ts +184 -49
- package/src/data/events.ts +77 -31
- package/src/data/requests.ts +90 -11
- package/src/debouncer.ts +11 -11
- package/src/errors.ts +496 -71
- 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 +62 -17
- 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 +48 -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 +119 -19
- package/src/testing/fake-clock.ts +76 -48
- package/src/testing/harness.ts +10 -0
- package/src/testing/index.ts +4 -3
- package/src/testing/node/duplex-connection.ts +3 -2
- package/src/testing/node/index.ts +3 -2
- package/src/testing/node/message-port-pair.ts +40 -0
- package/src/testing/node/unhandled-rejections.ts +31 -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 +130 -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,420 @@
|
|
|
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 { type Disposable, Emitter, type Event } from 'vscode-jsonrpc';
|
|
10
|
+
import { type Clock } from '../clock';
|
|
11
|
+
import { type ModelVersion } from '../model-service/base-version';
|
|
12
|
+
import { type ConflictResolver } from '../patch-merge';
|
|
13
|
+
import { PendingWorkTracker } from '../pending-work-tracker';
|
|
14
|
+
import { type ReconcileWriteOutcome, type VersionedModel } from '../reconcile-write';
|
|
15
|
+
import type { TransferDiagnostic } from '../transfer-diagnostic';
|
|
16
|
+
import { type LoadedTransferDocument, type TextState, TransferDocument, type TransferSavedDocument } from '../transfer-document';
|
|
17
|
+
import type { TransferElement } from '../transfer-element';
|
|
18
|
+
import { Deferred } from '../util';
|
|
19
|
+
import type { DataEvents } from './data-events';
|
|
20
|
+
import type { DataSession, DataSessionRestoreEvent } from './data-session';
|
|
21
|
+
/** What the write that carried an {@link WorkingCopy.edit} did. */
|
|
22
|
+
export type WorkingCopyEditOutcome =
|
|
23
|
+
/** The write landed against an unchanged document. */
|
|
24
|
+
{
|
|
25
|
+
readonly status: 'applied';
|
|
26
|
+
}
|
|
27
|
+
/** The write raced a foreign edit to other paths, and both landed. */
|
|
28
|
+
| {
|
|
29
|
+
readonly status: 'merged';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The edit raced a foreign edit of the same path, or kept racing foreign
|
|
33
|
+
* edits, and was dropped, or wrote a path an edit before it lost that way.
|
|
34
|
+
* The copy shows the server's value, unless the read after the last race
|
|
35
|
+
* failed.
|
|
36
|
+
*/
|
|
37
|
+
| {
|
|
38
|
+
readonly status: 'conflict';
|
|
39
|
+
}
|
|
40
|
+
/** Nothing was written: the server already held the edit, or it changed nothing. */
|
|
41
|
+
| {
|
|
42
|
+
readonly status: 'unchanged';
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Nothing was written, because the copy was closed, its file deleted, a
|
|
46
|
+
* restore could not open it again or its open's second read failed, before
|
|
47
|
+
* a write carried the edit.
|
|
48
|
+
*/
|
|
49
|
+
| {
|
|
50
|
+
readonly status: 'unavailable';
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* One open of a {@link WorkingCopy}, from the answer to its first read until a
|
|
54
|
+
* close, a deletion or a failure ends it. A request records its answer only
|
|
55
|
+
* while the open it was sent under is still the copy's, so nothing of an
|
|
56
|
+
* ended open reaches the next.
|
|
57
|
+
*/
|
|
58
|
+
export interface WorkingCopyOpen<TTransfer extends TransferElement> {
|
|
59
|
+
/** The last document the server sent. */
|
|
60
|
+
snapshot: TransferDocument<TTransfer>;
|
|
61
|
+
/** The copy's restores heard when {@link snapshot} was taken. */
|
|
62
|
+
snapshotRestores: number;
|
|
63
|
+
/**
|
|
64
|
+
* Whether {@link snapshot} was taken while a write was out, so it may hold
|
|
65
|
+
* the edits {@link sending} applies again. A base made on it then is
|
|
66
|
+
* unconfirmed, so its first write is reconciled, not sent.
|
|
67
|
+
*/
|
|
68
|
+
snapshotUnderWrite?: boolean;
|
|
69
|
+
/** Edits not yet written, in edit order, each until the write that carries it answers. */
|
|
70
|
+
queued: {
|
|
71
|
+
readonly change: (root: TTransfer) => TTransfer;
|
|
72
|
+
readonly outcome: Deferred<WorkingCopyEditOutcome>;
|
|
73
|
+
}[];
|
|
74
|
+
/**
|
|
75
|
+
* The root the first queued edit was made on, the write in flight
|
|
76
|
+
* included, and the snapshot version their write is gated on. A foreign
|
|
77
|
+
* update that lands while they wait then conflicts and is reconciled,
|
|
78
|
+
* instead of being written over, and the copy's own write does not.
|
|
79
|
+
* `restores` is the copy's restores heard when that root was taken. A base
|
|
80
|
+
* from before a restore conflicts on its first write. `unconfirmed` marks
|
|
81
|
+
* a base whose write before a conflict dropped edits from. The root is then
|
|
82
|
+
* the one that write was made on with only the edits it kept, so an edit
|
|
83
|
+
* restating a dropped value conflicts, and its first write conflicts too.
|
|
84
|
+
* It also marks a base made on a {@link snapshotUnderWrite}. `dropped`
|
|
85
|
+
* makes any edit of a path a dropped edit wrote conflict, a revert to the
|
|
86
|
+
* value before it included.
|
|
87
|
+
*/
|
|
88
|
+
base?: VersionedModel<TTransfer> & {
|
|
89
|
+
readonly restores: number;
|
|
90
|
+
readonly unconfirmed?: boolean;
|
|
91
|
+
/** The root the user saw before a conflict dropped edits, and the paths those edits wrote. */
|
|
92
|
+
readonly dropped?: {
|
|
93
|
+
readonly seen: TTransfer;
|
|
94
|
+
readonly paths: readonly string[];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
/** Edits of the write in flight, in edit order. */
|
|
98
|
+
sending: WorkingCopyOpen<TTransfer>['queued'];
|
|
99
|
+
/** Whether a write loop runs. */
|
|
100
|
+
writing: boolean;
|
|
101
|
+
/** The server's dirty flag, as last sent. */
|
|
102
|
+
serverDirty: boolean;
|
|
103
|
+
/** Requests out whose answer replaces the snapshot. */
|
|
104
|
+
snapshotRequests: number;
|
|
105
|
+
/**
|
|
106
|
+
* The newest document the server sent while a request is out, held until a
|
|
107
|
+
* request answers with no write out, or for
|
|
108
|
+
* {@link WorkingCopy.settleWritesMs} at most.
|
|
109
|
+
*/
|
|
110
|
+
held?: TransferDocument<TTransfer>;
|
|
111
|
+
/** Takes {@link held} once it has waited {@link WorkingCopy.settleWritesMs}. */
|
|
112
|
+
holdTimer?: Disposable;
|
|
113
|
+
/** The text version of the dirty flag last taken, so an answer built earlier does not undo a later save. */
|
|
114
|
+
dirtyVersion?: number;
|
|
115
|
+
/** Whether that flag came as a dirty event, which a document at its version does not undo. */
|
|
116
|
+
dirtyFromEvent: boolean;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The client's working copy of one data-server document: the server's latest
|
|
120
|
+
* snapshot of it, plus the edits the server has not confirmed yet.
|
|
121
|
+
*
|
|
122
|
+
* - **Follows the server.** Another client's update replaces the snapshot and
|
|
123
|
+
* fires {@link onDidChange}. This session's own echoes are skipped while a
|
|
124
|
+
* write is out, since the write's answer carries them. A document the
|
|
125
|
+
* server sends while a write, a save, a reread or the open's second read is
|
|
126
|
+
* out waits. The newest is taken when one of them answers and no write is
|
|
127
|
+
* out, or once the first of them has waited {@link settleWritesMs}. A write
|
|
128
|
+
* still out then has its edits applied to a document that may hold them
|
|
129
|
+
* already, so an edit that does not give the same root twice may show twice
|
|
130
|
+
* until its write answers. A batch made on that document has its first
|
|
131
|
+
* write reconciled, so the edit is not written twice.
|
|
132
|
+
* - **Batches edits behind a write.** An edit goes out at once when no write
|
|
133
|
+
* is out. The edits made while one is out go out after it, as one write of
|
|
134
|
+
* the whole root, gated on the version of the snapshot the first of them
|
|
135
|
+
* was made on, or of the answer to the copy's write before when that was
|
|
136
|
+
* built from the write's own text or holds its model unchanged. Each edit
|
|
137
|
+
* resolves to a {@link WorkingCopyEditOutcome}, its batch's unless the
|
|
138
|
+
* batch splits on a conflict.
|
|
139
|
+
* - **Reconciles.** A write that meets a newer version goes through
|
|
140
|
+
* `reconcileWrite`: the edits are replayed onto the refetched root, and a
|
|
141
|
+
* same-path collision drops the edit that made it in favour of the
|
|
142
|
+
* server's value. The other edits of its batch are still written.
|
|
143
|
+
* - **Counts its own edits as dirty.** {@link dirty} is the server's flag, or
|
|
144
|
+
* true while an edit is unanswered, so a host never shows clean text with
|
|
145
|
+
* an edit still on its way.
|
|
146
|
+
*
|
|
147
|
+
* Its session's own writes of the document are taken as echoes while a
|
|
148
|
+
* write is out, so the copy is the only writer of the document on its
|
|
149
|
+
* session. One heard with none out is taken, as a late write of a copy
|
|
150
|
+
* before it may be.
|
|
151
|
+
*
|
|
152
|
+
* One URI per copy, for its whole life. Opening another document is a new
|
|
153
|
+
* copy, so no queued edit can land on a document it was not made for. Open a
|
|
154
|
+
* new copy of the same document on the same session only once the last one's
|
|
155
|
+
* {@link close} has settled, since the copy does not check it. The session
|
|
156
|
+
* holds one open per document, so a close sent later would end the new copy's
|
|
157
|
+
* open too.
|
|
158
|
+
*
|
|
159
|
+
* An edit is a function of the root and runs again on every newer snapshot
|
|
160
|
+
* until its write answers, so it must be pure. Running it once and keeping the
|
|
161
|
+
* result would hide a foreign update behind the edit's stale copy of the root.
|
|
162
|
+
* One that throws on a newer root makes {@link root} throw too, until its
|
|
163
|
+
* write answers.
|
|
164
|
+
*/
|
|
165
|
+
export declare class WorkingCopy<TTransfer extends TransferElement> {
|
|
166
|
+
protected readonly session: DataSession<TTransfer>;
|
|
167
|
+
protected readonly events: DataEvents<TTransfer>;
|
|
168
|
+
/** The document followed, as the caller spells it, which the session keys its open by. */
|
|
169
|
+
readonly uri: string;
|
|
170
|
+
protected readonly changeEmitter: Emitter<void>;
|
|
171
|
+
/** Fires whenever {@link root} or {@link diagnostics} may have changed. */
|
|
172
|
+
readonly onDidChange: Event<void>;
|
|
173
|
+
protected readonly dirtyEmitter: Emitter<void>;
|
|
174
|
+
/** Fires whenever {@link dirty} changes. Apart from {@link onDidChange}, since a save changes no content. */
|
|
175
|
+
readonly onDidChangeDirty: Event<void>;
|
|
176
|
+
/** Asked for each conflicting write, see {@link reconcile}. */
|
|
177
|
+
protected readonly conflictResolver: ConflictResolver;
|
|
178
|
+
/**
|
|
179
|
+
* Writes of one reconcile, the first included, before a still-conflicting
|
|
180
|
+
* one is dropped. A first write the copy refuses unsent, on a base from
|
|
181
|
+
* before a restore or one a conflict dropped edits from, counts too. A
|
|
182
|
+
* split batch reconciles twice, so one batch makes at most twice the cap
|
|
183
|
+
* less one writes. Absent, `reconcileWrite`'s default applies.
|
|
184
|
+
*/
|
|
185
|
+
protected readonly maxWrites?: number;
|
|
186
|
+
/**
|
|
187
|
+
* How long {@link save}, {@link close} and {@link whenWritesSettled} wait
|
|
188
|
+
* for the copy's edits before going on anyway, and how long a document the
|
|
189
|
+
* server sends is held for a request at most.
|
|
190
|
+
*/
|
|
191
|
+
protected readonly settleWritesMs: number;
|
|
192
|
+
/** The clock of {@link settleWritesMs}. */
|
|
193
|
+
protected readonly clock: Clock;
|
|
194
|
+
/**
|
|
195
|
+
* The open the copy follows. A close, a deletion or a failure ends it, and a
|
|
196
|
+
* request sent under an earlier one neither counts nor answers.
|
|
197
|
+
*/
|
|
198
|
+
protected current?: WorkingCopyOpen<TTransfer>;
|
|
199
|
+
/** Restores heard that may have renumbered the versions, see {@link handleDocumentRestored}. */
|
|
200
|
+
protected restores: number;
|
|
201
|
+
/** Every edit until its write answers, so a settle waits on rereads after a conflict too. */
|
|
202
|
+
protected readonly editsInFlight: PendingWorkTracker;
|
|
203
|
+
/** {@link dirty} as last announced. */
|
|
204
|
+
protected announcedDirty: boolean;
|
|
205
|
+
/** Requests being settled, during which {@link onDidChangeDirty} waits, since their answer is not taken yet. */
|
|
206
|
+
protected settling: number;
|
|
207
|
+
/** The open, under way or done, which a later call shares until a deletion or a failure clears it. */
|
|
208
|
+
protected opening?: Promise<void>;
|
|
209
|
+
/** The close, once called. The copy does not open again after it. */
|
|
210
|
+
protected closing?: Promise<void>;
|
|
211
|
+
/** The listeners on the session and its events, ended once {@link dispose} ran and the edits have answered. */
|
|
212
|
+
protected readonly subscriptions: Disposable[];
|
|
213
|
+
/** Set by {@link dispose}, after which nothing is announced. */
|
|
214
|
+
protected disposed: boolean;
|
|
215
|
+
/** Set once {@link close} stopped waiting for the open, which then ends when it answers. */
|
|
216
|
+
protected openAbandoned: boolean;
|
|
217
|
+
constructor(session: DataSession<TTransfer>, events: DataEvents<TTransfer>,
|
|
218
|
+
/** The document followed, as the caller spells it, which the session keys its open by. */
|
|
219
|
+
uri: string);
|
|
220
|
+
/** The last document the server sent, without the edits it has not confirmed. `undefined` before {@link open}. */
|
|
221
|
+
get snapshot(): TransferDocument<TTransfer> | undefined;
|
|
222
|
+
/** The version of {@link snapshot}. A write is gated on the version its batch was made on, see the class doc. */
|
|
223
|
+
get version(): ModelVersion | undefined;
|
|
224
|
+
/** The server's root with every unconfirmed edit applied. `undefined` when no document is loaded. */
|
|
225
|
+
get root(): TTransfer | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* Diagnostics as of the last snapshot. A write answers once its document is
|
|
228
|
+
* validated, so they hold for the copy's own edits without an update push.
|
|
229
|
+
* After a reconnect the ones from before stay until the copy's reread
|
|
230
|
+
* answers, or the next update when it fails.
|
|
231
|
+
*/
|
|
232
|
+
get diagnostics(): readonly TransferDiagnostic[];
|
|
233
|
+
/** Whether the server's text differs from the file, or an edit has not been confirmed. */
|
|
234
|
+
get dirty(): boolean;
|
|
235
|
+
/** Whether an edit has not answered yet. Synchronous, for an unload guard. */
|
|
236
|
+
get hasWritesInFlight(): boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Open and watch the document, then read it again with diagnostics. The
|
|
239
|
+
* open settles before validation, so without the second read a document
|
|
240
|
+
* that was never edited reports no problems. Fires a change once both reads
|
|
241
|
+
* have answered and the open stands, and before that only for a document a
|
|
242
|
+
* restore hands over meanwhile. Repeated calls share the first one, and a
|
|
243
|
+
* failed open may be retried. Rejects once {@link close} was called, and
|
|
244
|
+
* with a `DocumentNotOpenError` when the file is gone by the second read. A
|
|
245
|
+
* failed second read rejects once the session is connected, so after a
|
|
246
|
+
* dropped connection it waits for the reconnect, and resolves when the
|
|
247
|
+
* restore took the document over.
|
|
248
|
+
*/
|
|
249
|
+
open(): Promise<void>;
|
|
250
|
+
/**
|
|
251
|
+
* Queue `change` for the next write. The edit shows in {@link root} at once.
|
|
252
|
+
* Resolves to the outcome of the write that carried it, and rejects when
|
|
253
|
+
* that write fails for another reason than a conflict, as with a
|
|
254
|
+
* `DocumentSyntaxError` while the document does not parse. Rejects with a
|
|
255
|
+
* `DocumentNotOpenError` when the copy follows no document, and with what
|
|
256
|
+
* `change` throws on {@link root}, queueing nothing. A change that throws
|
|
257
|
+
* only on a later root rejects every edit of the write that carries it.
|
|
258
|
+
*/
|
|
259
|
+
edit(change: (root: TTransfer) => TTransfer): Promise<WorkingCopyEditOutcome>;
|
|
260
|
+
/**
|
|
261
|
+
* Wait for every edit to answer, those made during the wait included, and
|
|
262
|
+
* persist the server's text when it differs from the file, whoever wrote
|
|
263
|
+
* it. Resolves to what the persist answered, or `undefined` when nothing
|
|
264
|
+
* needed saving. Rejects with a `DocumentNotOpenError` when the copy
|
|
265
|
+
* follows no document, at the call or once the edits have answered, or
|
|
266
|
+
* follows one opened again meanwhile. Rejects with a `ConflictError` when
|
|
267
|
+
* the text moved past the copy's version or the copy's document is from
|
|
268
|
+
* before the latest restore, and with a `SaveFailedError` when an edit has
|
|
269
|
+
* not answered within {@link settleWritesMs}.
|
|
270
|
+
*/
|
|
271
|
+
save(): Promise<TransferSavedDocument<TTransfer> | undefined>;
|
|
272
|
+
/**
|
|
273
|
+
* Resolve to `true` once no edit is pending, those made during the wait
|
|
274
|
+
* included, or to `false` once {@link settleWritesMs} has passed first.
|
|
275
|
+
* Never rejects.
|
|
276
|
+
*/
|
|
277
|
+
whenWritesSettled(): Promise<boolean>;
|
|
278
|
+
/**
|
|
279
|
+
* Resolve to `true` once `opening` has settled and no edit is pending, those
|
|
280
|
+
* made during the wait included, or to `false` once {@link settleWritesMs}
|
|
281
|
+
* has passed first.
|
|
282
|
+
*/
|
|
283
|
+
protected whenEditsIdle(opening?: Promise<void>): Promise<boolean>;
|
|
284
|
+
/**
|
|
285
|
+
* Wait for an open under way and the edits, those made during the wait
|
|
286
|
+
* included, up to {@link settleWritesMs}, and close the document. Final:
|
|
287
|
+
* the copy does not open again, and a later call shares this one.
|
|
288
|
+
*/
|
|
289
|
+
close(): Promise<void>;
|
|
290
|
+
/** The work of {@link close}, after the open it ends and the edits, within one bound. */
|
|
291
|
+
protected closeAfter(opening: Promise<void> | undefined): Promise<void>;
|
|
292
|
+
/**
|
|
293
|
+
* Announce nothing more. Unanswered edits are still written while the
|
|
294
|
+
* session lives, since dropping them would lose what the user typed, and
|
|
295
|
+
* the copy follows the document until they have answered, so their writes
|
|
296
|
+
* still heed a restore or a deletion. A host that ends the session as well
|
|
297
|
+
* waits for {@link whenWritesSettled} first.
|
|
298
|
+
*/
|
|
299
|
+
dispose(): void;
|
|
300
|
+
/** Both reads of {@link open}. */
|
|
301
|
+
protected load(): Promise<void>;
|
|
302
|
+
/** Write the batches of `open` until none is left, one at a time, so each can be based on the answer to the last. */
|
|
303
|
+
protected writeQueued(open: WorkingCopyOpen<TTransfer>): Promise<void>;
|
|
304
|
+
/**
|
|
305
|
+
* Write one batch, made on `base`, and settle its edits. The batch leaves
|
|
306
|
+
* {@link root} before the server's answer is taken and the one change is
|
|
307
|
+
* fired for it, since a reader would otherwise apply it again over an
|
|
308
|
+
* answer that holds or refused it.
|
|
309
|
+
*/
|
|
310
|
+
protected writeBatch(open: WorkingCopyOpen<TTransfer>, batch: WorkingCopyOpen<TTransfer>['queued'], base: WorkingCopyOpen<TTransfer>['base']): Promise<void>;
|
|
311
|
+
/**
|
|
312
|
+
* Replay a conflicting batch onto `theirs` one edit at a time, each as the
|
|
313
|
+
* change from the root before it, and write the edits that do not collide.
|
|
314
|
+
* One edit's collision then drops only that edit.
|
|
315
|
+
*/
|
|
316
|
+
protected splitConflict(open: WorkingCopyOpen<TTransfer>, roots: readonly TTransfer[], theirs: LoadedTransferDocument<TTransfer>, restores: number): Promise<{
|
|
317
|
+
answer?: TransferDocument<TTransfer>;
|
|
318
|
+
outcomes: (WorkingCopyEditOutcome | Promise<never>)[];
|
|
319
|
+
}>;
|
|
320
|
+
/**
|
|
321
|
+
* Write `ours`, based on `base`, and reconcile a conflict. Resolves to the
|
|
322
|
+
* last document the write and its rereads answered, which {@link writeBatch}
|
|
323
|
+
* takes, so the copy shows the server's value for an edit the reconcile
|
|
324
|
+
* dropped. `restores` is {@link restores} when its last reread was taken.
|
|
325
|
+
*
|
|
326
|
+
* A base from before a restore is not sent but refused as a conflict, so
|
|
327
|
+
* the write is reconciled against the restarted server's document. Its
|
|
328
|
+
* version could match that server's by chance and the write would land.
|
|
329
|
+
* An unconfirmed base is refused the same way. Only a batch's own write,
|
|
330
|
+
* `whole`, can move the base of the edits queued meanwhile.
|
|
331
|
+
*
|
|
332
|
+
* A merged write comes back as `persisted` when it was gated on a reread
|
|
333
|
+
* that equals the root the edit was made on, since it raced no foreign
|
|
334
|
+
* edit. It then carries no `conflict` or `writes`.
|
|
335
|
+
*/
|
|
336
|
+
protected reconcile(open: WorkingCopyOpen<TTransfer>, base: NonNullable<WorkingCopyOpen<TTransfer>['base']>, ours: TTransfer, whole: boolean): Promise<{
|
|
337
|
+
readonly outcome: ReconcileWriteOutcome;
|
|
338
|
+
readonly answer?: TransferDocument<TTransfer>;
|
|
339
|
+
readonly restores: number;
|
|
340
|
+
}>;
|
|
341
|
+
/** The outcome an edit reports for what {@link reconcile} did. */
|
|
342
|
+
protected toEditOutcome(outcome: ReconcileWriteOutcome): WorkingCopyEditOutcome;
|
|
343
|
+
/** Drop the snapshot when the document's file is removed, so no edit is based on a document the server no longer has. */
|
|
344
|
+
protected handleDocumentDeleted(event: {
|
|
345
|
+
uri: string;
|
|
346
|
+
}): void;
|
|
347
|
+
/** End the open as a deletion does, and settle the edits not yet written as `unavailable`. */
|
|
348
|
+
protected dropDocument(): void;
|
|
349
|
+
/**
|
|
350
|
+
* Drop the document and every edit not yet written, and return those edits
|
|
351
|
+
* for the caller to settle. Made on the document that went, they never
|
|
352
|
+
* reach one opened again. Requests still out answer to nothing, since a
|
|
353
|
+
* late answer would bring the document back.
|
|
354
|
+
*/
|
|
355
|
+
protected unload(): WorkingCopyOpen<TTransfer>['queued'];
|
|
356
|
+
/**
|
|
357
|
+
* Follow the document again after a reconnect. A restarted server numbers
|
|
358
|
+
* versions afresh, so the versions held from before compare with nothing,
|
|
359
|
+
* and a change made while the connection was down sent no event. Queued
|
|
360
|
+
* edits keep their base, so their write is reconciled against what the
|
|
361
|
+
* restarted server holds and a field changed meanwhile conflicts. A restore
|
|
362
|
+
* that finds the snapshot's text at its version is not counted, as in the
|
|
363
|
+
* session, so a brief drop costs no conflict.
|
|
364
|
+
*/
|
|
365
|
+
protected handleDocumentRestored(event: DataSessionRestoreEvent<TTransfer>): void;
|
|
366
|
+
/** Read the document of `open` again with diagnostics, and take the answer. */
|
|
367
|
+
protected reread(open: WorkingCopyOpen<TTransfer>): Promise<void>;
|
|
368
|
+
/** Follow a server push for the document. */
|
|
369
|
+
protected handleDocumentUpdated(event: {
|
|
370
|
+
document: TransferDocument<TTransfer>;
|
|
371
|
+
sourceClientId: string;
|
|
372
|
+
}): void;
|
|
373
|
+
/**
|
|
374
|
+
* Take the dirty flag of a document the server sent, and the document itself
|
|
375
|
+
* unless a request is out. A document older than the snapshot is skipped.
|
|
376
|
+
*/
|
|
377
|
+
protected offer(open: WorkingCopyOpen<TTransfer>, document: TransferDocument<TTransfer>, announce: boolean): void;
|
|
378
|
+
/**
|
|
379
|
+
* Hold `document` until a request answers. A document first held
|
|
380
|
+
* {@link settleWritesMs} ago is taken then, so a request that hangs does
|
|
381
|
+
* not hide other clients' changes for longer.
|
|
382
|
+
*/
|
|
383
|
+
protected hold(open: WorkingCopyOpen<TTransfer>, document: TransferDocument<TTransfer>): void;
|
|
384
|
+
/** Stop holding a document for `open`, and return the one it held. */
|
|
385
|
+
protected unhold(open: WorkingCopyOpen<TTransfer>): TransferDocument<TTransfer> | undefined;
|
|
386
|
+
/**
|
|
387
|
+
* Take `document` as the new snapshot. Fires a change unless the model's
|
|
388
|
+
* hash is the one held, which also means equally validated, or `announce`
|
|
389
|
+
* is false, as for a write's answers, which {@link writeBatch} announces
|
|
390
|
+
* once the write's edits are off {@link root}.
|
|
391
|
+
*/
|
|
392
|
+
protected adopt(open: WorkingCopyOpen<TTransfer>, document: TransferDocument<TTransfer>, announce?: boolean): void;
|
|
393
|
+
/**
|
|
394
|
+
* End a request, and take the newest document the server sent while
|
|
395
|
+
* requests were out, its answer included. None is taken while a write is
|
|
396
|
+
* out, since it may already hold that write's edits, which {@link root}
|
|
397
|
+
* would then apply again. Versions are compared only within that window,
|
|
398
|
+
* and a restore clears what it held, since a restarted server numbers
|
|
399
|
+
* afresh. {@link dirty} is announced once the answer is taken.
|
|
400
|
+
*/
|
|
401
|
+
protected settleRequest(open: WorkingCopyOpen<TTransfer>, answer: TransferDocument<TTransfer> | undefined, announce?: boolean): void;
|
|
402
|
+
/** {@link settleRequest} past its check that `open` is followed, without announcing {@link dirty}. */
|
|
403
|
+
protected settleAnswer(open: WorkingCopyOpen<TTransfer>, answer: TransferDocument<TTransfer> | undefined, announce: boolean): void;
|
|
404
|
+
/**
|
|
405
|
+
* Take a dirty flag the server sent, `announced` when it came as a dirty
|
|
406
|
+
* event. While a request is out, one decided on older text than the last
|
|
407
|
+
* is skipped, and so is a document's at the version of the last event,
|
|
408
|
+
* since a save changes the flag but not the version, and that document may
|
|
409
|
+
* have been built before it. Outside that window any is taken, as after a
|
|
410
|
+
* restart that numbers versions afresh.
|
|
411
|
+
*/
|
|
412
|
+
protected takeDirty(open: WorkingCopyOpen<TTransfer>, text: (Pick<TextState, 'dirty'> & Partial<Pick<TextState, 'version'>>) | undefined, announced?: boolean): void;
|
|
413
|
+
/** Fire {@link onDidChangeDirty} when {@link dirty} differs from what was last announced, unless a request is being settled. */
|
|
414
|
+
protected announceDirty(): void;
|
|
415
|
+
/** The open the copy follows, or a throw when it follows none. */
|
|
416
|
+
protected requireOpen(): WorkingCopyOpen<TTransfer>;
|
|
417
|
+
/** Throw once {@link dispose} ran. */
|
|
418
|
+
protected assertLive(): void;
|
|
419
|
+
}
|
|
420
|
+
//# sourceMappingURL=working-copy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"working-copy.d.ts","sourceRoot":"","sources":["../../src/client/working-copy.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,OAAO,EAAE,KAAK,UAAU,EAAE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,KAAK,KAAK,EAA0B,MAAM,UAAU,CAAC;AAE9D,OAAO,EAAoC,KAAK,YAAY,EAAsB,MAAM,+BAA+B,CAAC;AACxH,OAAO,EAAE,KAAK,gBAAgB,EAAsD,MAAM,gBAAgB,CAAC;AAC3G,OAAO,EAAE,kBAAkB,EAAE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