@hydranium/data-server 1.0.0-next.10 → 1.0.0-next.104

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.
@@ -0,0 +1,19 @@
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
+
10
+ /**
11
+ * Every user-facing message `@hydranium/data-server` raises.
12
+ *
13
+ * Declarations stay beside their call sites and are re-exported here, so this is
14
+ * enumeration rather than centralization: a code's package segment has to name
15
+ * the package that raises it. The English is a fallback, not a contract; the
16
+ * code is the contract, and renaming one is a breaking change.
17
+ */
18
+
19
+ export { NO_ACTIVE_PROFILE, NO_ACTIVE_PROFILE_CODE, noActiveProfileError } from '../data-server.js';
@@ -14,7 +14,9 @@ import {
14
14
  type DataClientProtocol,
15
15
  type DataServerProtocol,
16
16
  type ProjectsChangedEvent,
17
+ type TransferDocumentDeletedEvent,
17
18
  type TransferDocumentSavedEvent,
19
+ type TransferDocumentsBuiltEvent,
18
20
  type TransferDocumentUpdatedEvent
19
21
  } from '@hydranium/protocol/data';
20
22
  import { type Harness, makeCapturingDataClient } from '@hydranium/protocol/testing';
@@ -87,6 +89,10 @@ export interface DataServerHarness<
87
89
  readonly events: ReadonlyArray<TransferDocumentUpdatedEvent<TTransfer, TDiagnostic>>;
88
90
  /** Captured `onDocumentSaved` events. */
89
91
  readonly saves: ReadonlyArray<TransferDocumentSavedEvent<TTransfer, TDiagnostic>>;
92
+ /** Captured `onDocumentDeleted` events. */
93
+ readonly deletions: ReadonlyArray<TransferDocumentDeletedEvent>;
94
+ /** Captured `onDocumentsBuilt` events, one per build that had unwatched documents. */
95
+ readonly builds: ReadonlyArray<TransferDocumentsBuiltEvent>;
90
96
  /** Captured `onProjectsChanged` events. */
91
97
  readonly projectsChanges: ReadonlyArray<ProjectsChangedEvent<TProject>>;
92
98
  /** Dispose the underlying duplex pair. Idempotent. */
@@ -115,7 +121,7 @@ export function makeDataServerHarness<
115
121
  const server = options.server(pair.left);
116
122
 
117
123
  // The capture half is the shared client double, not a local copy: the same
118
- // recording semantics (all three channels, an override replacing rather than
124
+ // recording semantics (every channel, an override replacing rather than
119
125
  // supplementing) then hold for a client-side suite that stands the double up
120
126
  // without a server, so an assertion learnt against one reads the same in the
121
127
  // other.
@@ -123,6 +129,8 @@ export function makeDataServerHarness<
123
129
  client: localClient,
124
130
  updates: events,
125
131
  saves,
132
+ deletions,
133
+ builds,
126
134
  projectsChanges
127
135
  } = makeCapturingDataClient<TTransfer, TDiagnostic, TProject>(options.client);
128
136
 
@@ -141,6 +149,8 @@ export function makeDataServerHarness<
141
149
  pair,
142
150
  events,
143
151
  saves,
152
+ deletions,
153
+ builds,
144
154
  projectsChanges,
145
155
  dispose: () => pair.dispose()
146
156
  };