@hydranium/data-client-theia 1.0.0-next.14 → 1.0.0-next.140

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.
Files changed (59) hide show
  1. package/README.md +33 -29
  2. package/lib/browser/channel-connection.d.ts +2 -2
  3. package/lib/browser/channel-data-port.d.ts +65 -0
  4. package/lib/browser/channel-data-port.d.ts.map +1 -0
  5. package/lib/browser/channel-data-port.js +115 -0
  6. package/lib/browser/channel-data-port.js.map +1 -0
  7. package/lib/browser/data-session-stop-contribution.d.ts +64 -0
  8. package/lib/browser/data-session-stop-contribution.d.ts.map +1 -0
  9. package/lib/browser/data-session-stop-contribution.js +117 -0
  10. package/lib/browser/data-session-stop-contribution.js.map +1 -0
  11. package/lib/browser/index.d.ts +2 -3
  12. package/lib/browser/index.d.ts.map +1 -1
  13. package/lib/browser/index.js +2 -3
  14. package/lib/browser/index.js.map +1 -1
  15. package/lib/common/emitter-data-client.d.ts +13 -1
  16. package/lib/common/emitter-data-client.d.ts.map +1 -1
  17. package/lib/common/emitter-data-client.js +18 -0
  18. package/lib/common/emitter-data-client.js.map +1 -1
  19. package/lib/node/connection-container-module.d.ts +5 -4
  20. package/lib/node/connection-container-module.d.ts.map +1 -1
  21. package/lib/node/connection-container-module.js +5 -4
  22. package/lib/node/connection-container-module.js.map +1 -1
  23. package/lib/node/data-server-connection-handler.d.ts +14 -9
  24. package/lib/node/data-server-connection-handler.d.ts.map +1 -1
  25. package/lib/node/data-server-connection-handler.js +5 -12
  26. package/lib/node/data-server-connection-handler.js.map +1 -1
  27. package/lib/node/index.d.ts +0 -1
  28. package/lib/node/index.d.ts.map +1 -1
  29. package/lib/node/index.js +0 -1
  30. package/lib/node/index.js.map +1 -1
  31. package/package.json +13 -12
  32. package/src/browser/channel-connection.ts +2 -2
  33. package/src/browser/channel-data-port.ts +100 -0
  34. package/src/browser/data-session-stop-contribution.ts +117 -0
  35. package/src/browser/index.ts +2 -3
  36. package/src/common/emitter-data-client.ts +27 -0
  37. package/src/node/connection-container-module.ts +5 -4
  38. package/src/node/data-server-connection-handler.ts +15 -14
  39. package/src/node/index.ts +0 -1
  40. package/lib/browser/data-service-frontend.d.ts +0 -154
  41. package/lib/browser/data-service-frontend.d.ts.map +0 -1
  42. package/lib/browser/data-service-frontend.js +0 -169
  43. package/lib/browser/data-service-frontend.js.map +0 -1
  44. package/lib/browser/diagnostics-data-service-frontend.d.ts +0 -35
  45. package/lib/browser/diagnostics-data-service-frontend.d.ts.map +0 -1
  46. package/lib/browser/diagnostics-data-service-frontend.js +0 -54
  47. package/lib/browser/diagnostics-data-service-frontend.js.map +0 -1
  48. package/lib/browser/references-data-service-frontend.d.ts +0 -45
  49. package/lib/browser/references-data-service-frontend.d.ts.map +0 -1
  50. package/lib/browser/references-data-service-frontend.js +0 -55
  51. package/lib/browser/references-data-service-frontend.js.map +0 -1
  52. package/lib/node/socket-channel-forwarder.d.ts +0 -34
  53. package/lib/node/socket-channel-forwarder.d.ts.map +0 -1
  54. package/lib/node/socket-channel-forwarder.js +0 -63
  55. package/lib/node/socket-channel-forwarder.js.map +0 -1
  56. package/src/browser/data-service-frontend.ts +0 -208
  57. package/src/browser/diagnostics-data-service-frontend.ts +0 -70
  58. package/src/browser/references-data-service-frontend.ts +0 -70
  59. package/src/node/socket-channel-forwarder.ts +0 -64
package/README.md CHANGED
@@ -6,10 +6,12 @@ Theia client primitives for the hydranium **data head** — the companion of
6
6
 
7
7
  The data head's frontend speaks the data server's own `vscode-jsonrpc` protocol
8
8
  over a channel that the Theia backend relays byte-for-byte onto the server's
9
- socket. This package is both halves of that arrangement: the browser-side
10
- connection and typed-frontend bases, and the backend-side connection handler and
11
- forwarder. Install it if a Theia application needs form editors, trees, or
12
- code-gen driven from the live AST rather than from LSP text edits.
9
+ socket. This package is the Theia-specific half of that arrangement: the browser-side
10
+ transport and the backend-side connection handler and forwarder. Everything above
11
+ the transport — the connection, its sessions, the event fan-out — is host-neutral
12
+ and lives in `@hydranium/protocol/client`. Install it if a Theia application needs
13
+ form editors, trees, or code-gen driven from the live AST rather than from LSP
14
+ text edits.
13
15
 
14
16
  ## What it gives you
15
17
 
@@ -22,19 +24,13 @@ code-gen driven from the live AST rather than from LSP text edits.
22
24
  channel ever arrives on its own. Retries follow `DEFAULT_RECONNECT_DELAYS`,
23
25
  escalating per consecutive loss and resetting after
24
26
  `RECONNECT_ESCALATION_RESET_MS`.
25
- - **`AbstractDataServiceFrontend`** — base for a frontend that owns the
26
- data-server connection: the workspace-gated connect, the typed server proxy,
27
- the inbound client binding, and a lazy idempotent init gate (`ensureConnected`).
28
- You supply the connection seams (`connectionProvider`, `servicePath`,
29
- `methodNamespace`, `client`, `clientMethods`); progress UI and domain caching
30
- layer on top.
31
- - **`AbstractDiagnosticsDataServiceFrontend`** and
32
- **`AbstractReferencesDataServiceFrontend`** — the same base specialised for the
33
- two protocol fragments an adopter most often keeps: each diagnostics
34
- (`dumpServerState`, `writeHeapSnapshot`, `dumpPodMemory`, the profiling and
35
- latency calls) and each reference method is implemented as a readiness-gated
36
- pass-through, so you do not hand-write identical one-line bodies. They are
37
- deliberately independent bases rather than chained.
27
+ - **`ChannelDataPort`** — the `DataPort` implementation over a Theia frontend
28
+ channel, and the only class a Theia adopter has to write against. Subclass it
29
+ with a `servicePath`; it supplies the channel, the workspace gate, the
30
+ reconnect signal and the `MessageService` error sink. Bind one per service path
31
+ in singleton scope. Hand it to `DataConnectionWithEvents` (from
32
+ `@hydranium/protocol`) and the connection, its sessions and its event fan-out
33
+ are the host-neutral ones every other shell uses.
38
34
  - **`EmitterDataClient`** (on `./common`, not `./browser`) — the default
39
35
  client-side implementation of the data protocol's inbound notifications,
40
36
  fanning each one out to a Theia `Event`: `onDidUpdateDocument`,
@@ -45,8 +41,13 @@ code-gen driven from the live AST rather than from LSP text edits.
45
41
  - **`whenWorkspaceOpen`** — resolves once Theia reports a workspace root. The data
46
42
  server only starts once the LSP launches for a workspace, so connecting earlier
47
43
  would hang in port discovery; pass this as `whenReady`.
48
- - **Backend (`./node`)** — `DataServerConnectionHandler` (the socket bridge, with
49
- its own GLSP-free `SocketChannelForwarder`),
44
+ - **`DataSessionStopContribution`** — ends a frontend's data sessions with its
45
+ page, so the server ends them as closed rather than waiting for the connection
46
+ to go, and holds the page while one of them is saving. Bind it as a
47
+ `FrontendApplicationContribution` and call its `track(connection)` once, where
48
+ the connection is bound.
49
+ - **Backend (`./node`)** — `DataServerConnectionHandler` (the socket bridge,
50
+ over `@hydranium/client-theia`'s `SocketChannelForwarder`),
50
51
  `createDataServerConnectionContainerModule(...handlers)` for the
51
52
  frontend-scoped module boilerplate, and `HostDiagnosticsServer` with
52
53
  `createHostDiagnosticsBackendModule()` — which, paired with the browser-side
@@ -67,10 +68,10 @@ running hydranium data server to connect to. The declared peer dependencies are:
67
68
  | `@hydranium/client-theia` | `^1.0.0-next` |
68
69
  | `@hydranium/core` | `^1.0.0-next` |
69
70
  | `@hydranium/protocol` | `^1.0.0-next` |
70
- | `@theia/core` | `^1.71.0` |
71
- | `@theia/workspace` | `^1.71.0` |
71
+ | `@theia/core` | `^1.70.0` |
72
+ | `@theia/workspace` | `^1.70.0` |
72
73
  | `inversify` | `^6.0.0` |
73
- | `vscode-jsonrpc` | `^8.0.0 \|\| ^9.0.0` |
74
+ | `vscode-jsonrpc` | `9.0.1` |
74
75
 
75
76
  `@hydranium/core` is reached only from the `./node` tier (the host-diagnostics
76
77
  service), so a frontend-only consumer never loads it.
@@ -81,17 +82,20 @@ This package declares no `theiaExtensions` — it is a library your own Theia
81
82
  extension builds on. That extension's `package.json` declares the entries, and
82
83
  each entry names one frontend/backend module pair:
83
84
 
84
- - the **frontend** module binds your `AbstractDataServiceFrontend` subclass (and,
85
- for the diagnostics commands, calls `bindHostDiagnostics`);
85
+ - the **frontend** module binds your `ChannelDataPort` subclass and the
86
+ connection over it, both in singleton scope (and, for the diagnostics commands,
87
+ calls `bindHostDiagnostics`);
86
88
  - the **backend** module is typically a one-liner:
87
89
  `export default createDataServerConnectionContainerModule(MyHandler)`, where
88
90
  `MyHandler` extends `DataServerConnectionHandler`.
89
91
 
90
92
  More than one handler is the normal case, not an exotic one. Theia keys a
91
93
  frontend channel by its service path and refuses a second channel on a path
92
- already open, so every frontend abstraction reaching the data head needs its own
93
- `servicePath` — while the shared `portCommand` still names the one server process
94
- behind them all.
94
+ already open, so every frontend abstraction reaching the data head on its own
95
+ channel needs its own `servicePath` — while the shared `portCommand` still names
96
+ the one server process behind them all. Several participants over ONE channel
97
+ need no second handler: that is what `DataConnection`'s sessions are for, and it
98
+ is the cheaper arrangement.
95
99
 
96
100
  The refusal is silent, which is what makes it expensive: the loser's promise is
97
101
  left unsettled rather than rejected, so a frontend that shared a path hangs on
@@ -103,8 +107,8 @@ its loading state indefinitely with nothing in the server log to say why.
103
107
  | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
104
108
  | `.` | Nothing — the surface is split by environment, so the root barrel stays empty. | browser-neutral (gated) |
105
109
  | `./common` | `EmitterDataClient` — a module lands here only when values, types and relative imports are all neutral or Theia COMMON tier. No error-reconstruction bridge, and that is a property of the transport: the direct `vscode-jsonrpc` connection carries a typed error across the relay natively. | browser-neutral (gated) |
106
- | `./browser` | `openChannelConnection`, `createChannelConnection`, the three `Abstract*DataServiceFrontend` bases, `bindHostDiagnostics`, `whenWorkspaceOpen` | browser / Theia frontend (gated) |
107
- | `./node` | `DataServerConnectionHandler`, `createDataServerConnectionContainerModule`, `SocketChannelForwarder`, `HostDiagnosticsServer`, `createHostDiagnosticsBackendModule` | Node / Theia backend |
110
+ | `./browser` | `openChannelConnection`, `createChannelConnection`, the three `Abstract*DataServiceFrontend` bases, `bindHostDiagnostics`, `whenWorkspaceOpen`, `DataSessionStopContribution` | browser / Theia frontend (gated) |
111
+ | `./node` | `DataServerConnectionHandler`, `createDataServerConnectionContainerModule`, `HostDiagnosticsServer`, `createHostDiagnosticsBackendModule` | Node / Theia backend |
108
112
 
109
113
  Every subpath also has a `./lib/<name>` twin for consumers on
110
114
  `moduleResolution: "Node"`. "Gated" means the repository's neutral-bundle check
@@ -107,8 +107,8 @@ export interface ChannelConnectionHandle {
107
107
  /**
108
108
  * The current connection. Read it per use rather than caching it: after a
109
109
  * reconnect this returns a NEW promise, and a cached one resolves to the
110
- * dead connection forever. The same reasoning makes
111
- * `AbstractDataServiceFrontend` rebuild its proxy rather than hold one.
110
+ * dead connection forever. The same reasoning makes `RpcConnection` rebuild
111
+ * its proxy per generation rather than hold one.
112
112
  */
113
113
  readonly current: Promise<MessageConnection>;
114
114
  /**
@@ -0,0 +1,65 @@
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 DataPort, type ResolvedMessage } from '@hydranium/protocol';
10
+ import { Emitter, MessageService, type Event } from '@theia/core';
11
+ import { type ServiceConnectionProvider } from '@theia/core/lib/browser';
12
+ import { WorkspaceService } from '@theia/workspace/lib/browser';
13
+ import type { MessageConnection } from 'vscode-jsonrpc';
14
+ import { type ChannelConnectionHandle } from './channel-connection';
15
+ /**
16
+ * A {@link DataPort} over a Theia frontend channel.
17
+ *
18
+ * Subclasses supply {@link servicePath}; everything above the port —
19
+ * `DataConnection`, its sessions, and whatever model a widget drives — is
20
+ * host-neutral and shared with the VS Code and browser shells.
21
+ *
22
+ * Bind one per service path and in singleton scope. Theia keys a frontend
23
+ * channel by its path and refuses a second on a path already open, and the
24
+ * throw escapes the `openChannelConnection` the loser is awaiting, leaving that
25
+ * promise unsettled rather than rejected.
26
+ */
27
+ export declare abstract class ChannelDataPort implements DataPort {
28
+ protected readonly connectionProvider: ServiceConnectionProvider;
29
+ protected readonly workspaceService: WorkspaceService;
30
+ protected readonly messageService: MessageService;
31
+ /** Frontend service path the backend forwarder for this head is registered under. */
32
+ protected abstract readonly servicePath: string;
33
+ /**
34
+ * Re-open the channel when the current connection is lost. Default `true` —
35
+ * re-opening is the only thing that recovers a restarted language server,
36
+ * which binds new ephemeral ports. Turn it off for a frontend that tears
37
+ * itself down on transport loss instead.
38
+ */
39
+ protected readonly reconnectOnConnectionLoss: boolean;
40
+ protected readonly disposeEmitter: Emitter<void>;
41
+ readonly onDispose: Event<void>;
42
+ protected handle?: ChannelConnectionHandle;
43
+ /**
44
+ * Open the workspace-gated channel and hand back its listening connection.
45
+ *
46
+ * Gated because the backend forwarder discovers the head's port by executing
47
+ * a command the language server answers, and the language server only
48
+ * launches once there is a workspace to launch it for. Asking earlier polls
49
+ * a command nobody has registered.
50
+ */
51
+ connect(): Promise<MessageConnection>;
52
+ /**
53
+ * Surface a transport or write failure as a Theia notification.
54
+ *
55
+ * Swallowing it is the failure this exists to prevent: a dead connection and
56
+ * an empty document are indistinguishable in a widget.
57
+ *
58
+ * `reported` is already a complete sentence with the detail interpolated, so
59
+ * wrapping it in a sentence of the host's own would nest one owner's clause
60
+ * inside another's and leave no translator in control of the whole.
61
+ */
62
+ reportError(_error: unknown, reported: ResolvedMessage): void;
63
+ dispose(): void;
64
+ }
65
+ //# sourceMappingURL=channel-data-port.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-data-port.d.ts","sourceRoot":"","sources":["../../src/browser/channel-data-port.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAA0B,KAAK,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,cAAc,EAAO,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,KAAK,uBAAuB,EAAyB,MAAM,sBAAsB,CAAC;AAG3F;;;;;;;;;;;GAWG;AACH,8BACsB,eAAgB,YAAW,QAAQ;IACpB,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAG,yBAAyB,CAAC;IAC1E,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAG,gBAAgB,CAAC;IACzD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAG,cAAc,CAAC;IAE3E,qFAAqF;IACrF,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAEhD;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAQ;IAE7D,SAAS,CAAC,QAAQ,CAAC,cAAc,gBAAuB;IACxD,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAA6B;IAE5D,SAAS,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;IAE3C;;;;;;;OAOG;IACH,OAAO,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAkBrC;;;;;;;;;OASG;IACH,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI;IAI7D,OAAO,IAAI,IAAI;CAMjB"}
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
13
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
15
+ };
16
+ var __metadata = (this && this.__metadata) || function (k, v) {
17
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.ChannelDataPort = void 0;
21
+ const protocol_1 = require("@hydranium/protocol");
22
+ const core_1 = require("@theia/core");
23
+ const service_connection_provider_1 = require("@theia/core/lib/browser/messaging/service-connection-provider");
24
+ const inversify_1 = require("@theia/core/shared/inversify");
25
+ const browser_1 = require("@theia/workspace/lib/browser");
26
+ const channel_connection_1 = require("./channel-connection");
27
+ const workspace_gate_1 = require("./workspace-gate");
28
+ /**
29
+ * A {@link DataPort} over a Theia frontend channel.
30
+ *
31
+ * Subclasses supply {@link servicePath}; everything above the port —
32
+ * `DataConnection`, its sessions, and whatever model a widget drives — is
33
+ * host-neutral and shared with the VS Code and browser shells.
34
+ *
35
+ * Bind one per service path and in singleton scope. Theia keys a frontend
36
+ * channel by its path and refuses a second on a path already open, and the
37
+ * throw escapes the `openChannelConnection` the loser is awaiting, leaving that
38
+ * promise unsettled rather than rejected.
39
+ */
40
+ let ChannelDataPort = class ChannelDataPort {
41
+ connectionProvider;
42
+ workspaceService;
43
+ messageService;
44
+ /**
45
+ * Re-open the channel when the current connection is lost. Default `true` —
46
+ * re-opening is the only thing that recovers a restarted language server,
47
+ * which binds new ephemeral ports. Turn it off for a frontend that tears
48
+ * itself down on transport loss instead.
49
+ */
50
+ reconnectOnConnectionLoss = true;
51
+ disposeEmitter = new core_1.Emitter();
52
+ onDispose = this.disposeEmitter.event;
53
+ handle;
54
+ /**
55
+ * Open the workspace-gated channel and hand back its listening connection.
56
+ *
57
+ * Gated because the backend forwarder discovers the head's port by executing
58
+ * a command the language server answers, and the language server only
59
+ * launches once there is a workspace to launch it for. Asking earlier polls
60
+ * a command nobody has registered.
61
+ */
62
+ connect() {
63
+ // Read per call rather than cached: `current` is repointed at a fresh
64
+ // promise every time the channel is re-opened, so reading through the
65
+ // handle is what makes a later generation reach the live server.
66
+ if (!this.handle) {
67
+ this.handle = (0, channel_connection_1.openChannelConnection)(this.connectionProvider, this.servicePath, {
68
+ whenReady: (0, workspace_gate_1.whenWorkspaceOpen)(this.workspaceService),
69
+ reconnect: this.reconnectOnConnectionLoss
70
+ });
71
+ // A relaunched server binds new ephemeral ports; the handle re-opens
72
+ // and the forwarder rediscovers, but `DataConnection` caches its
73
+ // generation and would go on addressing the dead one. Its signal to
74
+ // drop that generation is this event.
75
+ this.handle.onDidLoseConnection(() => this.disposeEmitter.fire(undefined));
76
+ }
77
+ return this.handle.current;
78
+ }
79
+ /**
80
+ * Surface a transport or write failure as a Theia notification.
81
+ *
82
+ * Swallowing it is the failure this exists to prevent: a dead connection and
83
+ * an empty document are indistinguishable in a widget.
84
+ *
85
+ * `reported` is already a complete sentence with the detail interpolated, so
86
+ * wrapping it in a sentence of the host's own would nest one owner's clause
87
+ * inside another's and leave no translator in control of the whole.
88
+ */
89
+ reportError(_error, reported) {
90
+ this.messageService.error((0, protocol_1.renderFrameworkMessage)(reported, core_1.nls.localization?.translations));
91
+ }
92
+ dispose() {
93
+ this.handle?.dispose();
94
+ this.handle = undefined;
95
+ this.disposeEmitter.fire(undefined);
96
+ this.disposeEmitter.dispose();
97
+ }
98
+ };
99
+ exports.ChannelDataPort = ChannelDataPort;
100
+ __decorate([
101
+ (0, inversify_1.inject)(service_connection_provider_1.RemoteConnectionProvider),
102
+ __metadata("design:type", Function)
103
+ ], ChannelDataPort.prototype, "connectionProvider", void 0);
104
+ __decorate([
105
+ (0, inversify_1.inject)(browser_1.WorkspaceService),
106
+ __metadata("design:type", browser_1.WorkspaceService)
107
+ ], ChannelDataPort.prototype, "workspaceService", void 0);
108
+ __decorate([
109
+ (0, inversify_1.inject)(core_1.MessageService),
110
+ __metadata("design:type", core_1.MessageService)
111
+ ], ChannelDataPort.prototype, "messageService", void 0);
112
+ exports.ChannelDataPort = ChannelDataPort = __decorate([
113
+ (0, inversify_1.injectable)()
114
+ ], ChannelDataPort);
115
+ //# sourceMappingURL=channel-data-port.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel-data-port.js","sourceRoot":"","sources":["../../src/browser/channel-data-port.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;AAElF,kDAAkG;AAClG,sCAAuE;AAEvE,+GAAyG;AACzG,4DAAkE;AAClE,0DAAgE;AAEhE,6DAA2F;AAC3F,qDAAqD;AAErD;;;;;;;;;;;GAWG;AAEI,IAAe,eAAe,GAA9B,MAAe,eAAe;IACmB,kBAAkB,CAA6B;IACvD,gBAAgB,CAAoB;IACtC,cAAc,CAAkB;IAK3E;;;;;OAKG;IACgB,yBAAyB,GAAY,IAAI,CAAC;IAE1C,cAAc,GAAG,IAAI,cAAO,EAAQ,CAAC;IAC/C,SAAS,GAAgB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;IAElD,MAAM,CAA2B;IAE3C;;;;;;;OAOG;IACH,OAAO;QACJ,sEAAsE;QACtE,sEAAsE;QACtE,iEAAiE;QACjE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,GAAG,IAAA,0CAAqB,EAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,WAAW,EAAE;gBAC5E,SAAS,EAAE,IAAA,kCAAiB,EAAC,IAAI,CAAC,gBAAgB,CAAC;gBACnD,SAAS,EAAE,IAAI,CAAC,yBAAyB;aAC3C,CAAC,CAAC;YACH,qEAAqE;YACrE,iEAAiE;YACjE,oEAAoE;YACpE,sCAAsC;YACtC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QAC9E,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAC9B,CAAC;IAED;;;;;;;;;OASG;IACH,WAAW,CAAC,MAAe,EAAE,QAAyB;QACnD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,IAAA,iCAAsB,EAAC,QAAQ,EAAE,UAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC;IAC/F,CAAC;IAED,OAAO;QACJ,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpC,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;IACjC,CAAC;CACH,CAAA;AAnEqB,0CAAe;AACmB;IAApD,IAAA,kBAAM,EAAC,sDAAwB,CAAC;;2DAAmE;AACvD;IAA5C,IAAA,kBAAM,EAAC,0BAAgB,CAAC;8BAAuC,0BAAgB;yDAAC;AACtC;IAA1C,IAAA,kBAAM,EAAC,qBAAc,CAAC;8BAAqC,qBAAc;uDAAC;0BAHxD,eAAe;IADpC,IAAA,sBAAU,GAAE;GACS,eAAe,CAmEpC"}
@@ -0,0 +1,64 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import type { DataConnection, DataServerProtocol, DataSession, DiagnosticOf, TransferElement } from '@hydranium/protocol';
10
+ import type { FrontendApplicationContribution, OnWillStopAction } from '@theia/core/lib/browser';
11
+ /**
12
+ * Ends a Theia frontend's data sessions with its page, and holds the page
13
+ * while one of them is still saving. Bind it as a
14
+ * `FrontendApplicationContribution` in singleton scope and {@link track} each
15
+ * data connection the frontend binds, once.
16
+ *
17
+ * **Stop.** {@link onStop} disposes every tracked session, which sends its
18
+ * `closeSession`, so the server ends it as closed: each document it was the
19
+ * last to hold reverts at once. Otherwise the server learns of the page only
20
+ * when its connection goes, which Theia may hold open for its reconnect
21
+ * timeout, and then ends the sessions as lost, so their documents wait out the
22
+ * revert grace. The close is best effort: under load the page's last frames
23
+ * can be lost on the way, and the server then ends the sessions as lost. A
24
+ * session with calls still in flight at the stop closes after them, which is
25
+ * too late for a page going away, and is left to the server's connection-close
26
+ * cleanup. A call a session makes in the same tick as the stop is refused and
27
+ * never sent.
28
+ *
29
+ * **Veto.** While a tracked session has a save in flight, {@link onWillStop}
30
+ * vetoes, including a session disposed meanwhile. In Electron, Theia awaits
31
+ * the veto's action, which waits for the saves to answer, a save started during
32
+ * the wait included, up to {@link maxSettlePasses} times. The browser runs no
33
+ * action before unload, so there the veto shows the leave-page prompt and
34
+ * nothing more. Theia ignores every veto under
35
+ * `application.confirmExit: 'never'`, so there a save in flight at the stop
36
+ * may be cut off.
37
+ */
38
+ export declare class DataSessionStopContribution implements FrontendApplicationContribution {
39
+ /** The sessions to end at the stop, and to wait for while they save. */
40
+ protected readonly sessions: Set<DataSession<TransferElement, DataServerProtocol<TransferElement, import("@hydranium/protocol").TransferDiagnostic, import("@hydranium/protocol").Project>>>;
41
+ /**
42
+ * How many times the veto's action waits for the saves in flight before it
43
+ * lets the stop go. Each wait ends by the session's own bound, so a save
44
+ * that never answers holds the stop for a few bounds, not for good.
45
+ */
46
+ protected readonly maxSettlePasses: number;
47
+ /**
48
+ * Take every session of `connection` into the stop: the ones it has
49
+ * started already, and each one it starts from now on. Generic, so a
50
+ * connection of any transfer root, server and client fits.
51
+ */
52
+ track<TTransfer extends TransferElement, TServer extends DataServerProtocol<TTransfer, DiagnosticOf<TServer>>, TClient extends object>(connection: DataConnection<TTransfer, TServer, TClient>): void;
53
+ /**
54
+ * Take `session` into the stop. It leaves once it has ended and its saves
55
+ * have answered, so a session disposed with a save in flight still holds
56
+ * the page.
57
+ */
58
+ protected trackSession(session: DataSession<TransferElement>): void;
59
+ onWillStop(): OnWillStopAction | undefined;
60
+ /** The tracked sessions with a save in flight. */
61
+ protected savingSessions(): DataSession<TransferElement>[];
62
+ onStop(): void;
63
+ }
64
+ //# sourceMappingURL=data-session-stop-contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-session-stop-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/data-session-stop-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG1H,OAAO,KAAK,EAAE,+BAA+B,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGjG;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBACa,2BAA4B,YAAW,+BAA+B;IAChF,wEAAwE;IACxE,SAAS,CAAC,QAAQ,CAAC,QAAQ,kKAA2C;IACtE;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAK;IAE/C;;;;OAIG;IACH,KAAK,CAAC,SAAS,SAAS,eAAe,EAAE,OAAO,SAAS,kBAAkB,CAAC,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,SAAS,MAAM,EAClI,UAAU,EAAE,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,GACvD,IAAI;IAKP;;;;OAIG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC,eAAe,CAAC,GAAG,IAAI;IAcnE,UAAU,IAAI,gBAAgB,GAAG,SAAS;IAsB1C,kDAAkD;IAClD,SAAS,CAAC,cAAc,IAAI,WAAW,CAAC,eAAe,CAAC,EAAE;IAI1D,MAAM,IAAI,IAAI;CAKhB"}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
13
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.DataSessionStopContribution = void 0;
18
+ const inversify_1 = require("@theia/core/shared/inversify");
19
+ /**
20
+ * Ends a Theia frontend's data sessions with its page, and holds the page
21
+ * while one of them is still saving. Bind it as a
22
+ * `FrontendApplicationContribution` in singleton scope and {@link track} each
23
+ * data connection the frontend binds, once.
24
+ *
25
+ * **Stop.** {@link onStop} disposes every tracked session, which sends its
26
+ * `closeSession`, so the server ends it as closed: each document it was the
27
+ * last to hold reverts at once. Otherwise the server learns of the page only
28
+ * when its connection goes, which Theia may hold open for its reconnect
29
+ * timeout, and then ends the sessions as lost, so their documents wait out the
30
+ * revert grace. The close is best effort: under load the page's last frames
31
+ * can be lost on the way, and the server then ends the sessions as lost. A
32
+ * session with calls still in flight at the stop closes after them, which is
33
+ * too late for a page going away, and is left to the server's connection-close
34
+ * cleanup. A call a session makes in the same tick as the stop is refused and
35
+ * never sent.
36
+ *
37
+ * **Veto.** While a tracked session has a save in flight, {@link onWillStop}
38
+ * vetoes, including a session disposed meanwhile. In Electron, Theia awaits
39
+ * the veto's action, which waits for the saves to answer, a save started during
40
+ * the wait included, up to {@link maxSettlePasses} times. The browser runs no
41
+ * action before unload, so there the veto shows the leave-page prompt and
42
+ * nothing more. Theia ignores every veto under
43
+ * `application.confirmExit: 'never'`, so there a save in flight at the stop
44
+ * may be cut off.
45
+ */
46
+ let DataSessionStopContribution = class DataSessionStopContribution {
47
+ /** The sessions to end at the stop, and to wait for while they save. */
48
+ sessions = new Set();
49
+ /**
50
+ * How many times the veto's action waits for the saves in flight before it
51
+ * lets the stop go. Each wait ends by the session's own bound, so a save
52
+ * that never answers holds the stop for a few bounds, not for good.
53
+ */
54
+ maxSettlePasses = 3;
55
+ /**
56
+ * Take every session of `connection` into the stop: the ones it has
57
+ * started already, and each one it starts from now on. Generic, so a
58
+ * connection of any transfer root, server and client fits.
59
+ */
60
+ track(connection) {
61
+ connection.liveSessions.forEach(session => this.trackSession(session));
62
+ connection.onDidCreateSession(session => this.trackSession(session));
63
+ }
64
+ /**
65
+ * Take `session` into the stop. It leaves once it has ended and its saves
66
+ * have answered, so a session disposed with a save in flight still holds
67
+ * the page.
68
+ */
69
+ trackSession(session) {
70
+ this.sessions.add(session);
71
+ // A save can outlast the wait's bound, so the session stays until none
72
+ // is left in flight.
73
+ const release = () => void session.whenSavesSettled().then(() => (session.hasSavesInFlight ? release() : this.sessions.delete(session)));
74
+ // An ended session has fired its event already, and never fires it again.
75
+ if (session.isDisposed) {
76
+ release();
77
+ }
78
+ else {
79
+ session.onDidDispose(release);
80
+ }
81
+ }
82
+ onWillStop() {
83
+ if (this.savingSessions().length === 0) {
84
+ return undefined;
85
+ }
86
+ return {
87
+ // Theia logs the reason and shows it nowhere, so it is not translated.
88
+ reason: 'Data sessions are saving',
89
+ action: async () => {
90
+ // The page stays usable while Theia awaits this, so a save can
91
+ // start during a wait; each pass waits for the saves then in flight.
92
+ for (let pass = 0; pass < this.maxSettlePasses; pass++) {
93
+ const saving = this.savingSessions();
94
+ if (saving.length === 0) {
95
+ break;
96
+ }
97
+ await Promise.all(saving.map(session => session.whenSavesSettled()));
98
+ }
99
+ return true;
100
+ }
101
+ };
102
+ }
103
+ /** The tracked sessions with a save in flight. */
104
+ savingSessions() {
105
+ return [...this.sessions].filter(session => session.hasSavesInFlight);
106
+ }
107
+ onStop() {
108
+ for (const session of this.sessions) {
109
+ session.dispose();
110
+ }
111
+ }
112
+ };
113
+ exports.DataSessionStopContribution = DataSessionStopContribution;
114
+ exports.DataSessionStopContribution = DataSessionStopContribution = __decorate([
115
+ (0, inversify_1.injectable)()
116
+ ], DataSessionStopContribution);
117
+ //# sourceMappingURL=data-session-stop-contribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-session-stop-contribution.js","sourceRoot":"","sources":["../../src/browser/data-session-stop-contribution.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;AAMlF,4DAA0D;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACrC,wEAAwE;IACrD,QAAQ,GAAG,IAAI,GAAG,EAAgC,CAAC;IACtE;;;;OAIG;IACgB,eAAe,GAAW,CAAC,CAAC;IAE/C;;;;OAIG;IACH,KAAK,CACF,UAAuD;QAEvD,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;QACvE,UAAU,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,CAAC;IAED;;;;OAIG;IACO,YAAY,CAAC,OAAqC;QACzD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,uEAAuE;QACvE,qBAAqB;QACrB,MAAM,OAAO,GAAG,GAAS,EAAE,CACxB,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACtH,0EAA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,9 +7,8 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  export * from './channel-connection';
10
- export * from './data-service-frontend';
11
- export * from './diagnostics-data-service-frontend';
10
+ export * from './channel-data-port';
11
+ export * from './data-session-stop-contribution';
12
12
  export * from './host-diagnostics-frontend';
13
- export * from './references-data-service-frontend';
14
13
  export * from './workspace-gate';
15
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC"}
@@ -23,9 +23,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  __exportStar(require("./channel-connection"), exports);
26
- __exportStar(require("./data-service-frontend"), exports);
27
- __exportStar(require("./diagnostics-data-service-frontend"), exports);
26
+ __exportStar(require("./channel-data-port"), exports);
27
+ __exportStar(require("./data-session-stop-contribution"), exports);
28
28
  __exportStar(require("./host-diagnostics-frontend"), exports);
29
- __exportStar(require("./references-data-service-frontend"), exports);
30
29
  __exportStar(require("./workspace-gate"), exports);
31
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,uDAAqC;AACrC,0DAAwC;AACxC,sEAAoD;AACpD,8DAA4C;AAC5C,qEAAmD;AACnD,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,uDAAqC;AACrC,sDAAoC;AACpC,mEAAiD;AACjD,8DAA4C;AAC5C,mDAAiC"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import type { DataClientProtocol, Project, ProjectsChangedEvent, TransferDiagnostic, TransferDocumentSavedEvent, TransferDocumentUpdatedEvent, TransferElement } from '@hydranium/protocol';
9
+ import type { DataClientProtocol, Project, ProjectsChangedEvent, TransferDiagnostic, TransferDocumentDeletedEvent, TransferDocumentDirtyChangedEvent, TransferDocumentSavedEvent, TransferDocumentsBuiltEvent, TransferDocumentUpdatedEvent, TransferElement } from '@hydranium/protocol';
10
10
  import { Emitter, type Event } from '@theia/core';
11
11
  /**
12
12
  * Default {@link DataClientProtocol} implementation for a Theia frontend:
@@ -30,11 +30,23 @@ export declare class EmitterDataClient<TTransfer extends TransferElement, TDiagn
30
30
  protected readonly onDocumentSavedEmitter: Emitter<TransferDocumentSavedEvent<TTransfer, TDiagnostic>>;
31
31
  /** Fires for each inbound {@link onDocumentSaved} notification. */
32
32
  readonly onDidSaveDocument: Event<TransferDocumentSavedEvent<TTransfer, TDiagnostic>>;
33
+ protected readonly onDocumentDirtyChangedEmitter: Emitter<TransferDocumentDirtyChangedEvent>;
34
+ /** Fires for each inbound {@link onDocumentDirtyChanged} notification. */
35
+ readonly onDidChangeDocumentDirty: Event<TransferDocumentDirtyChangedEvent>;
36
+ protected readonly onDocumentDeletedEmitter: Emitter<TransferDocumentDeletedEvent>;
37
+ /** Fires for each inbound {@link onDocumentDeleted} notification. */
38
+ readonly onDidDeleteDocument: Event<TransferDocumentDeletedEvent>;
39
+ protected readonly onDocumentsBuiltEmitter: Emitter<TransferDocumentsBuiltEvent>;
40
+ /** Fires for each inbound {@link onDocumentsBuilt} notification. */
41
+ readonly onDidBuildDocuments: Event<TransferDocumentsBuiltEvent>;
33
42
  protected readonly onProjectsChangedEmitter: Emitter<ProjectsChangedEvent<TProject>>;
34
43
  /** Fires for each inbound {@link onProjectsChanged} notification. */
35
44
  readonly onDidChangeProjects: Event<ProjectsChangedEvent<TProject>>;
36
45
  onDocumentUpdated(event: TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>): void;
37
46
  onDocumentSaved(event: TransferDocumentSavedEvent<TTransfer, TDiagnostic>): void;
47
+ onDocumentDirtyChanged(event: TransferDocumentDirtyChangedEvent): void;
48
+ onDocumentDeleted(event: TransferDocumentDeletedEvent): void;
49
+ onDocumentsBuilt(event: TransferDocumentsBuiltEvent): void;
38
50
  onProjectsChanged(event: ProjectsChangedEvent<TProject>): void;
39
51
  }
40
52
  //# sourceMappingURL=emitter-data-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"emitter-data-client.d.ts","sourceRoot":"","sources":["../../src/common/emitter-data-client.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EACT,kBAAkB,EAClB,OAAO,EACP,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAC5B,eAAe,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,iBAAiB,CAC3B,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAAkB,GAAG,kBAAkB,EAC3D,QAAQ,SAAS,OAAO,GAAG,OAAO,CACnC,YAAW,kBAAkB,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC;IAC9D,SAAS,CAAC,QAAQ,CAAC,wBAAwB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iBAAiB,CAAC,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC,GAAG,IAAI;CAGhE"}
@@ -32,6 +32,15 @@ class EmitterDataClient {
32
32
  onDocumentSavedEmitter = new core_1.Emitter();
33
33
  /** Fires for each inbound {@link onDocumentSaved} notification. */
34
34
  onDidSaveDocument = this.onDocumentSavedEmitter.event;
35
+ onDocumentDirtyChangedEmitter = new core_1.Emitter();
36
+ /** Fires for each inbound {@link onDocumentDirtyChanged} notification. */
37
+ onDidChangeDocumentDirty = this.onDocumentDirtyChangedEmitter.event;
38
+ onDocumentDeletedEmitter = new core_1.Emitter();
39
+ /** Fires for each inbound {@link onDocumentDeleted} notification. */
40
+ onDidDeleteDocument = this.onDocumentDeletedEmitter.event;
41
+ onDocumentsBuiltEmitter = new core_1.Emitter();
42
+ /** Fires for each inbound {@link onDocumentsBuilt} notification. */
43
+ onDidBuildDocuments = this.onDocumentsBuiltEmitter.event;
35
44
  onProjectsChangedEmitter = new core_1.Emitter();
36
45
  /** Fires for each inbound {@link onProjectsChanged} notification. */
37
46
  onDidChangeProjects = this.onProjectsChangedEmitter.event;
@@ -41,6 +50,15 @@ class EmitterDataClient {
41
50
  onDocumentSaved(event) {
42
51
  this.onDocumentSavedEmitter.fire(event);
43
52
  }
53
+ onDocumentDirtyChanged(event) {
54
+ this.onDocumentDirtyChangedEmitter.fire(event);
55
+ }
56
+ onDocumentDeleted(event) {
57
+ this.onDocumentDeletedEmitter.fire(event);
58
+ }
59
+ onDocumentsBuilt(event) {
60
+ this.onDocumentsBuiltEmitter.fire(event);
61
+ }
44
62
  onProjectsChanged(event) {
45
63
  this.onProjectsChangedEmitter.fire(event);
46
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"emitter-data-client.js","sourceRoot":"","sources":["../../src/common/emitter-data-client.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAWlF,sCAAkD;AAElD;;;;;;;;;;;;;;GAcG;AACH,MAAa,iBAAiB;IAKR,wBAAw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