@hydranium/data-server 1.0.0-next.11 → 1.0.0-next.111
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 +5 -1
- package/lib/data-server.d.ts +171 -22
- package/lib/data-server.d.ts.map +1 -1
- package/lib/data-server.js +253 -44
- package/lib/data-server.js.map +1 -1
- package/lib/messages/index.d.ts +18 -0
- package/lib/messages/index.d.ts.map +1 -0
- package/lib/messages/index.js +18 -0
- package/lib/messages/index.js.map +1 -0
- package/lib/testing/data-server-harness.d.ts +5 -1
- package/lib/testing/data-server-harness.d.ts.map +1 -1
- package/lib/testing/data-server-harness.js +4 -2
- package/lib/testing/data-server-harness.js.map +1 -1
- package/package.json +17 -8
- package/src/data-server.ts +308 -56
- package/src/messages/index.ts +19 -0
- package/src/testing/data-server-harness.ts +11 -1
package/README.md
CHANGED
|
@@ -22,7 +22,11 @@ Installed by the server process that already composes
|
|
|
22
22
|
- **Push notifications instead of polling:** `onDocumentUpdated` when a
|
|
23
23
|
subscribed document reaches the configured build phase
|
|
24
24
|
(`DataServerOptions.subscriptionPhase`, `DocumentState.Validated` by default),
|
|
25
|
-
`onDocumentSaved` on a separate channel,
|
|
25
|
+
`onDocumentSaved` on a separate channel, `onDocumentDeleted` on a third (a
|
|
26
|
+
deleted document has no built state to carry, and the build-phase path never
|
|
27
|
+
runs for one), `onDocumentsBuilt` once per build for the documents nobody
|
|
28
|
+
watches — chiefly those rebuilt as a cascade, which no filesystem watcher can
|
|
29
|
+
see because their own files did not change — and `onProjectsChanged` from the
|
|
26
30
|
project registry.
|
|
27
31
|
- **Projects as first-class:** `getProjects` and `getProjectForUri`, answered from
|
|
28
32
|
the framework's `ProjectManager`.
|
package/lib/data-server.d.ts
CHANGED
|
@@ -6,10 +6,37 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
-
import { DisposableCollection, ReferenceSource, type CloseModelArgs, type Disposable, type ElementSource, type FindNextNameArgs, type LatencyCollector, type LatencyReport, type OpenModelArgs, type Project, type ReferenceCandidate, type ReferenceContext, type ReferenceRequest, type ReferenceTarget, type Tracer, type TransferDiagnostic,
|
|
9
|
+
import { DisposableCollection, ReferenceSource, type CloseModelArgs, type HydraniumResponseError, type Disposable, type ElementSource, type FindNextNameArgs, type LatencyCollector, type LatencyReport, type OpenModelArgs, type Project, type ReferenceCandidate, type ReferenceContext, type ReferenceRequest, type ReferenceTarget, type Tracer, type TransferDiagnostic, TransferDocument, type TransferElement } from '@hydranium/protocol';
|
|
10
10
|
import { type DataClientProtocol, type DataServerDiagnosticsProtocol, type DataServerProtocol, type DumpServerStateArgs, type StartProfilingArgs, type StopProfilingArgs, type WriteServerHeapSnapshotArgs, type GetModelDocumentArgs, type GetProjectForUriArgs, type TransferSaveDocumentArgs, type WatchModelDocumentArgs, type TransferDocumentUpdatedEvent, type TransferUpdateDocumentArgs } from '@hydranium/protocol/data';
|
|
11
|
+
/**
|
|
12
|
+
* Raised when a profiling command arrives with no capture running.
|
|
13
|
+
*
|
|
14
|
+
* A `ResponseError` rather than a plain `Error` so the identity survives to the
|
|
15
|
+
* response boundary, which is where the message is rendered. An unwrapped throw
|
|
16
|
+
* reaches the client as a generic internal error instead: no code for a caller
|
|
17
|
+
* to switch on, and nothing for the boundary to render from.
|
|
18
|
+
*/
|
|
19
|
+
export declare const NO_ACTIVE_PROFILE: import("@hydranium/protocol").MessageDefinition<"No profiling capture is active; call startProfiling first.">;
|
|
20
|
+
/**
|
|
21
|
+
* The JSON-RPC code, unrelated to the catalogue code above: this one is numeric,
|
|
22
|
+
* survives reconstruction and is what a caller switches on.
|
|
23
|
+
*/
|
|
24
|
+
export declare const NO_ACTIVE_PROFILE_CODE = 1002;
|
|
25
|
+
export declare const noActiveProfileError: () => HydraniumResponseError;
|
|
26
|
+
/**
|
|
27
|
+
* Raised when a reference question's wait for the build exceeds
|
|
28
|
+
* {@link DataServerOptions.referenceSettleTimeoutMs}.
|
|
29
|
+
*
|
|
30
|
+
* A `ResponseError` because a class name does not cross RPC: without the code a
|
|
31
|
+
* wire client cannot tell a wedged build from a reference that resolves to
|
|
32
|
+
* nothing, which is the distinction the wait exists to keep.
|
|
33
|
+
*/
|
|
34
|
+
export declare const REFERENCE_SETTLE_TIMEOUT: import("@hydranium/protocol").MessageDefinition<"Timed out after {elapsedMs}ms waiting for the build to settle before answering a reference query.">;
|
|
35
|
+
/** See {@link NO_ACTIVE_PROFILE_CODE} for why this is separate from the catalogue code. */
|
|
36
|
+
export declare const REFERENCE_SETTLE_TIMEOUT_CODE = 1003;
|
|
37
|
+
export declare const referenceSettleTimeoutError: (elapsedMs: number) => HydraniumResponseError;
|
|
11
38
|
import type { DataServerDiagnosticsProvider, DataServerProfileCapture } from './diagnostics-provider.js';
|
|
12
|
-
import type { ClientTextDocumentChangeEvent, HydraniumLanguageServices, LogNameOptions, ModelService, ProjectChangeEvent, ServerSharedServices, TransferEncoder } from '@hydranium/core';
|
|
39
|
+
import type { ClientTextDocumentChangeEvent, HydraniumLanguageServices, LogNameOptions, AstDiagnostic, ModelService, ProjectChangeEvent, ServerSharedServices, TransferEncoder } from '@hydranium/core';
|
|
13
40
|
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
14
41
|
import { type AstNode, DocumentState, type LangiumDocument, type URI } from '@hydranium/langium';
|
|
15
42
|
import type { CancellationToken, MessageConnection } from 'vscode-jsonrpc';
|
|
@@ -82,6 +109,21 @@ export interface DataServerOptions extends LogNameOptions {
|
|
|
82
109
|
* state included). See {@link FingerprintStrategy}.
|
|
83
110
|
*/
|
|
84
111
|
readonly fingerprintStrategy?: FingerprintStrategy;
|
|
112
|
+
/**
|
|
113
|
+
* How long a reference question waits for the build to reach `Linked` before
|
|
114
|
+
* failing with {@link REFERENCE_SETTLE_TIMEOUT_CODE}. Bounded because the
|
|
115
|
+
* wait resolves off a build-phase notification, so a build cancelled below
|
|
116
|
+
* `Linked` with nothing after it leaves the request unanswered for the life
|
|
117
|
+
* of the server.
|
|
118
|
+
*
|
|
119
|
+
* Expiry rejects rather than reading the index anyway: the unsettled index
|
|
120
|
+
* is what the wait keeps the caller away from, so falling through to it on a
|
|
121
|
+
* slow build reinstates the fault — and on a name proposal persists it.
|
|
122
|
+
*
|
|
123
|
+
* Default {@link DataServer.DEFAULT_OPTIONS}, sized for a cold workspace
|
|
124
|
+
* still reaching `Linked` for the first time.
|
|
125
|
+
*/
|
|
126
|
+
readonly referenceSettleTimeoutMs?: number;
|
|
85
127
|
/**
|
|
86
128
|
* Wire-method namespace for both inbound request handlers and the
|
|
87
129
|
* outbound notification client proxy. Defaults to
|
|
@@ -136,14 +178,19 @@ export interface DataServerOptions extends LogNameOptions {
|
|
|
136
178
|
* When supplied, every inbound data-server RPC is timed into this collector
|
|
137
179
|
* (via the `createRpcProxy` binding) and exposed through
|
|
138
180
|
* {@link DataServerDiagnosticsProtocol.getLatency}. A head that also runs an
|
|
139
|
-
* LSP connection can pass the SAME collector to
|
|
140
|
-
*
|
|
141
|
-
*
|
|
181
|
+
* LSP connection can pass the SAME collector through `lspLatencyOptions` to
|
|
182
|
+
* that connection, so one report covers both heads. Absent by default (no
|
|
183
|
+
* timing overhead).
|
|
142
184
|
*/
|
|
143
185
|
readonly latency?: LatencyCollector;
|
|
144
186
|
}
|
|
145
|
-
/**
|
|
146
|
-
|
|
187
|
+
/**
|
|
188
|
+
* Fully-resolved variant of {@link DataServerOptions} — every field set, after
|
|
189
|
+
* merging defaults. Returned by the `protected`
|
|
190
|
+
* {@link DataServer.resolveOptions} and held on {@link DataServer.options}, so
|
|
191
|
+
* an adopter changing how defaults resolve has to name it.
|
|
192
|
+
*/
|
|
193
|
+
export interface ResolvedDataServerOptions {
|
|
147
194
|
readonly subscriptionPhase: DocumentState;
|
|
148
195
|
readonly fingerprintStrategy: FingerprintStrategy;
|
|
149
196
|
readonly methodNamespace: string;
|
|
@@ -151,6 +198,7 @@ interface ResolvedDataServerOptions {
|
|
|
151
198
|
readonly excludedMethods: readonly string[];
|
|
152
199
|
/** Always resolved — to the caller's, or to the platform default. */
|
|
153
200
|
readonly diagnostics: DataServerDiagnosticsProvider;
|
|
201
|
+
readonly referenceSettleTimeoutMs: number;
|
|
154
202
|
}
|
|
155
203
|
/**
|
|
156
204
|
* Typed-RPC protocol head for the hydranium framework. The data-server
|
|
@@ -177,9 +225,11 @@ interface ResolvedDataServerOptions {
|
|
|
177
225
|
* any names supplied via {@link DataServerOptions.additionalMethods}) and
|
|
178
226
|
* builds the {@link DataClientProtocol} notification proxy on the same
|
|
179
227
|
* connection in one {@link createRpcProxy} call (binding `this` as its
|
|
180
|
-
* `localTarget`) under the configured namespace, and subscribes
|
|
181
|
-
* `DocumentBuilder.onDocumentPhase`
|
|
182
|
-
*
|
|
228
|
+
* `localTarget`) under the configured namespace, and subscribes two listeners
|
|
229
|
+
* at the configured phase: a `DocumentBuilder.onDocumentPhase` one dispatching
|
|
230
|
+
* per-document `clientProxy.onDocumentUpdated` for watched URIs, and a
|
|
231
|
+
* `DocumentBuilder.onBuildPhase` one dispatching a single
|
|
232
|
+
* `clientProxy.onDocumentsBuilt` naming the batch's unwatched documents.
|
|
183
233
|
*
|
|
184
234
|
* The data-server requires the full {@link ServerSharedServices}
|
|
185
235
|
* shape — `HydraniumTextDocuments` for client-attributed updates,
|
|
@@ -203,7 +253,7 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
203
253
|
* Framework defaults, exposed so an adopter can spread them when
|
|
204
254
|
* extending rather than restate a value the framework may change.
|
|
205
255
|
*/
|
|
206
|
-
static readonly DEFAULT_OPTIONS: Required<Pick<DataServerOptions, 'subscriptionPhase'>>;
|
|
256
|
+
static readonly DEFAULT_OPTIONS: Required<Pick<DataServerOptions, 'subscriptionPhase' | 'referenceSettleTimeoutMs'>>;
|
|
207
257
|
protected readonly options: ResolvedDataServerOptions;
|
|
208
258
|
/** Subscription bookkeeping: URI → set of clientIds that subscribed for that URI. */
|
|
209
259
|
protected readonly subscriptions: Map<string, Set<string>>;
|
|
@@ -225,10 +275,12 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
225
275
|
/**
|
|
226
276
|
* Snapshot of the most recent `DocumentBuilder.onUpdate` event. Drives
|
|
227
277
|
* `reason` discrimination on outbound `onDocumentUpdated` notifications:
|
|
228
|
-
* a URI in the `changed` list emits `'changed'`,
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
278
|
+
* a URI in the `changed` list emits `'changed'`, otherwise `'rebuilt'`
|
|
279
|
+
* (cascade rebuild from a dependent URI's change). The same mechanism
|
|
280
|
+
* `AstDocumentManager.onUpdate` uses on the LSP side, so reason fidelity
|
|
281
|
+
* stays consistent between heads. The `deleted` half is read by
|
|
282
|
+
* {@link dispatchDeleteEvents} rather than by the reason discrimination,
|
|
283
|
+
* a deletion travelling on its own channel.
|
|
232
284
|
*/
|
|
233
285
|
protected lastBuildUpdate?: {
|
|
234
286
|
changed: readonly URI[];
|
|
@@ -292,7 +344,7 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
292
344
|
/** Per-method RPC latency collector, when the head opted in via {@link DataServerOptions.latency}. */
|
|
293
345
|
protected readonly latency?: LatencyCollector;
|
|
294
346
|
/** Encoder pulled from DI. Adopters rebind `services.model.TransferEncoder` to a typed-overlay subclass. */
|
|
295
|
-
protected readonly encoder: TransferEncoder<
|
|
347
|
+
protected readonly encoder: TransferEncoder<TDiagnostic>;
|
|
296
348
|
/**
|
|
297
349
|
* In-process workspace facade — the lifecycle delegate `get` / `update` / `save` go through.
|
|
298
350
|
* The facade's AstDocument diagnostic shape is intentionally typed `unknown` here: adopters
|
|
@@ -301,7 +353,7 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
301
353
|
* `astDocumentToTransferDocument` accepts both shapes (wire-shape or LSP-shape) and projects
|
|
302
354
|
* to wire shape on the return — see `TransferEncoder.astDocumentToTransferDocument`.
|
|
303
355
|
*/
|
|
304
|
-
protected readonly modelService: ModelService<AstNode,
|
|
356
|
+
protected readonly modelService: ModelService<AstNode, AstDiagnostic, TTransfer>;
|
|
305
357
|
constructor(connection: MessageConnection, services: ServerSharedServices<TProject>, options?: DataServerOptions);
|
|
306
358
|
/**
|
|
307
359
|
* Release everything the constructor wired up — the bound protocol
|
|
@@ -395,6 +447,23 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
395
447
|
* subclass.
|
|
396
448
|
*/
|
|
397
449
|
waitForReady(): Promise<void>;
|
|
450
|
+
/**
|
|
451
|
+
* Settle the build before a reference question is answered from the index.
|
|
452
|
+
*
|
|
453
|
+
* A query issued right after a model update otherwise races the rebuild and
|
|
454
|
+
* reads an index missing the symbols it asks about. The cost is not confined
|
|
455
|
+
* to this call: a scope built inside that window is cached, and the build's
|
|
456
|
+
* remaining documents link against it.
|
|
457
|
+
*
|
|
458
|
+
* Waits the source document specifically, but ONLY when one is loaded at
|
|
459
|
+
* that URI: a synthetic source can address a URI with no document (a
|
|
460
|
+
* directory URI, typically), where a per-URI `waitUntil` throws "No document
|
|
461
|
+
* found". Falls back to a global settle, matching the id-based
|
|
462
|
+
* `ElementSource` path.
|
|
463
|
+
*
|
|
464
|
+
* Bounded by {@link DataServerOptions.referenceSettleTimeoutMs}.
|
|
465
|
+
*/
|
|
466
|
+
protected awaitReferencesLinked(source: ReferenceSource): Promise<void>;
|
|
398
467
|
findReferenceCandidates(ctx: ReferenceContext): Promise<ReferenceCandidate[]>;
|
|
399
468
|
resolveReference(ref: ReferenceRequest): Promise<ReferenceTarget<TTransfer> | undefined>;
|
|
400
469
|
findNextName(args: FindNextNameArgs): Promise<string>;
|
|
@@ -409,6 +478,9 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
409
478
|
/**
|
|
410
479
|
* Pick the language that owns a reference source, in order:
|
|
411
480
|
*
|
|
481
|
+
* 0. A {@link isSyntheticSource} naming its own `language` routes there.
|
|
482
|
+
* First because every step below infers, and an inference must not
|
|
483
|
+
* override a caller that has said which grammar it means.
|
|
412
484
|
* 1. A URI-bearing source ({@link isDocumentSource}/{@link isSyntheticSource})
|
|
413
485
|
* whose URI resolves to a registered language routes by URI.
|
|
414
486
|
* 2. A single-language workspace always routes to that one language — so
|
|
@@ -489,6 +561,42 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
489
561
|
* regardless of subscriber count.
|
|
490
562
|
*/
|
|
491
563
|
protected subscribeToDocumentBuilder(): void;
|
|
564
|
+
/**
|
|
565
|
+
* Report the documents that reached {@link DataServerOptions.subscriptionPhase}
|
|
566
|
+
* and that NOBODY on this
|
|
567
|
+
* connection is watching — the ones a client was not told about through
|
|
568
|
+
* {@link dispatchPhaseEvent}, which is gated per URI.
|
|
569
|
+
*
|
|
570
|
+
* **The gap this closes is the one no other source can observe.** A document
|
|
571
|
+
* the client watches, it hears about already. A file changed on disk, the
|
|
572
|
+
* host's own filesystem watcher reports — and on a browser host, where the
|
|
573
|
+
* workspace lives behind this head, an external change cannot happen at all.
|
|
574
|
+
* What is left, and what nothing outside the server can see, is a document
|
|
575
|
+
* rebuilt because something it DEPENDS ON changed: its file never changed, so
|
|
576
|
+
* a filesystem watcher is silent by construction, and it has no subscriber, so
|
|
577
|
+
* the update channel is silent by design. A consumer displaying data derived
|
|
578
|
+
* from that document — a tree label, a decorator — otherwise goes stale with
|
|
579
|
+
* no signal from any source, and repairs itself the moment someone opens the
|
|
580
|
+
* file to investigate, which is what makes it expensive to diagnose later.
|
|
581
|
+
*
|
|
582
|
+
* Payload-free on purpose: URIs only, so a client re-reads what it displays
|
|
583
|
+
* rather than being handed transfer documents it did not ask for. That is the
|
|
584
|
+
* property the subscription map protects, and it is preserved here by
|
|
585
|
+
* carrying no document rather than by gating the message.
|
|
586
|
+
*
|
|
587
|
+
* Quiet in the common case. Editing a document that an editor has open leaves
|
|
588
|
+
* that URI watched and therefore out of this set, so a build with no
|
|
589
|
+
* dependents produces nothing at all, and workspace initialisation produces
|
|
590
|
+
* nothing because it does not build to this phase. The ceiling is a
|
|
591
|
+
* whole-workspace rebuild at the subscription phase: one message, URIs only.
|
|
592
|
+
*
|
|
593
|
+
* The URI is canonicalised for the same reason the subscription map is keyed
|
|
594
|
+
* that way, and is untested for the same reason as its twin in
|
|
595
|
+
* {@link dispatchDeleteEvents}: the builder reports URIs out of its own
|
|
596
|
+
* store, so a non-canonical one cannot be produced without a fixture
|
|
597
|
+
* asserting a shape the real system never emits.
|
|
598
|
+
*/
|
|
599
|
+
protected dispatchBuiltEvent(built: readonly LangiumDocument[]): void;
|
|
492
600
|
/**
|
|
493
601
|
* Subscribe to the universal save event on `HydraniumTextDocuments` so a
|
|
494
602
|
* single `onDocumentSaved` wire notification fires for ANY save of a
|
|
@@ -511,6 +619,48 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
511
619
|
* hold, so a `false` answer means this close was the last one.
|
|
512
620
|
*/
|
|
513
621
|
protected subscribeToTextDocumentCloses(): void;
|
|
622
|
+
/**
|
|
623
|
+
* Fan out a deletion for each removed URI, to EVERY client on the connection
|
|
624
|
+
* rather than only to the ones watching that URI.
|
|
625
|
+
*
|
|
626
|
+
* **Deliberately ungated, where {@link dispatchPhaseEvent} and
|
|
627
|
+
* {@link dispatchSaveEvent} are gated.** Those two carry a built document and
|
|
628
|
+
* fire on every build, so the subscription map is what keeps bandwidth
|
|
629
|
+
* proportional to what a client asked for. A deletion is neither: it is one
|
|
630
|
+
* URI, it is rare, and it reports the workspace's STRUCTURE rather than a
|
|
631
|
+
* document's content. Gating it forces any consumer that displays the
|
|
632
|
+
* workspace — a model tree, a file decorator — to learn about disappearances
|
|
633
|
+
* from a filesystem watcher instead, which a client hosted in a browser has
|
|
634
|
+
* no way to run: its workspace lives behind the head. A client that does not
|
|
635
|
+
* care filters on the URI, which costs it a comparison.
|
|
636
|
+
*
|
|
637
|
+
* The precedent is the last-close revert broadcast (see
|
|
638
|
+
* {@link pendingRevertBroadcasts}), where the same judgement was already made
|
|
639
|
+
* in the other direction: a transition that matters enough is delivered
|
|
640
|
+
* without a subscription.
|
|
641
|
+
*
|
|
642
|
+
* Runs from the `DocumentBuilder.onUpdate` listener rather than from a phase
|
|
643
|
+
* listener, which is the only place a deletion is observable: `update`
|
|
644
|
+
* removes the document before deriving the rebuild set, so it is never built.
|
|
645
|
+
* That ordering also puts this notification ahead of the `'rebuilt'` events
|
|
646
|
+
* for the dependents whose references the deletion just broke.
|
|
647
|
+
*
|
|
648
|
+
* The `deleted` list arrives already expanded to concrete document URIs —
|
|
649
|
+
* `deleteDocuments` resolves a directory URI to the documents beneath it — so
|
|
650
|
+
* no caller has to handle a directory here.
|
|
651
|
+
*
|
|
652
|
+
* Per-URI derived state is dropped for the same reason it is dropped
|
|
653
|
+
* anywhere: it describes a document that no longer exists.
|
|
654
|
+
* {@link lastEmittedFingerprint} in particular can outlive its subscriptions
|
|
655
|
+
* through the last-close revert path — left behind, it is adopted as the
|
|
656
|
+
* baseline by the next {@link watchModelDocument} and suppresses the first
|
|
657
|
+
* emit after the file returns with its previous content.
|
|
658
|
+
*
|
|
659
|
+
* The subscription itself SURVIVES: a recreated file resumes delivering to
|
|
660
|
+
* the same watchers with no re-subscription, and a client that answers the
|
|
661
|
+
* deletion by closing releases the watch through `closeModelDocument` anyway.
|
|
662
|
+
*/
|
|
663
|
+
protected dispatchDeleteEvents(deleted: readonly URI[]): void;
|
|
514
664
|
/** Fan out a save event for the document's URI, gated by the subscription map. */
|
|
515
665
|
protected dispatchSaveEvent(event: ClientTextDocumentChangeEvent<TextDocument>): void;
|
|
516
666
|
/**
|
|
@@ -556,16 +706,16 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
556
706
|
/**
|
|
557
707
|
* Discriminate the reason for a phase-event-driven update notification.
|
|
558
708
|
* Uses the most recent `DocumentBuilder.onUpdate` snapshot:
|
|
559
|
-
* - URI in the `deleted` list → `'deleted'`
|
|
560
709
|
* - URI in the `changed` list → `'changed'` (the URI was passed to
|
|
561
710
|
* `documentBuilder.update(changed, deleted)`, which spans `didChange`
|
|
562
711
|
* text-document events and programmatic `update([uri], [])` calls).
|
|
563
712
|
* - Otherwise → `'rebuilt'` (cascade re-derivation: this URI was rebuilt
|
|
564
713
|
* because something it depends on changed; its own text wasn't flagged).
|
|
565
714
|
*
|
|
566
|
-
* `'saved'` is NOT emitted
|
|
567
|
-
* `DataClientProtocol.onDocumentSaved` channel
|
|
568
|
-
* unified
|
|
715
|
+
* `'saved'` is NOT emitted here — saves take the dedicated
|
|
716
|
+
* `DataClientProtocol.onDocumentSaved` channel, and adopters wanting a
|
|
717
|
+
* unified stream synthesise it in their bridge layer. A deletion is not a
|
|
718
|
+
* reason at all; see {@link dispatchDeleteEvents}.
|
|
569
719
|
*/
|
|
570
720
|
protected resolveUpdateReason(uri: URI): TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>['reason'];
|
|
571
721
|
/**
|
|
@@ -610,5 +760,4 @@ export declare class DataServer<TTransfer extends TransferElement, TDiagnostic e
|
|
|
610
760
|
/** Resolve a partial options object into a fully-defaulted form. */
|
|
611
761
|
protected resolveOptions(partial: DataServerOptions): ResolvedDataServerOptions;
|
|
612
762
|
}
|
|
613
|
-
export {};
|
|
614
763
|
//# sourceMappingURL=data-server.d.ts.map
|
package/lib/data-server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-server.d.ts","sourceRoot":"","sources":["../src/data-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,
|
|
1
|
+
{"version":3,"file":"data-server.d.ts","sourceRoot":"","sources":["../src/data-server.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAGJ,oBAAoB,EAKpB,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,gBA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