@hydranium/data-server 1.0.0-next.23 → 1.0.0-next.230

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 CHANGED
@@ -17,13 +17,24 @@ Installed by the server process that already composes
17
17
  compose.
18
18
  - **A document lifecycle over the shared workspace:** `openModelDocument`,
19
19
  `getModelDocument`, `updateModelDocument`, `saveModelDocument`,
20
- `closeModelDocument`, `watchModelDocument` / `unwatchModelDocument`, and
20
+ `persistModelDocument`, `closeModelDocument`, `watchModelDocument` / `unwatchModelDocument`, and
21
21
  `waitForReady` for clients that must not race workspace initialisation.
22
+ - **Client sessions per connection:** `createSession` registers a participant,
23
+ whose requests then write only what it has open; `createModelDocument` and
24
+ the all-or-none `updateModelDocuments` serve sessions only; `closeSession`, or
25
+ the connection closing, ends a session and closes everything it has open. See
26
+ [Client sessions](../../docs/concepts/client-sessions.md).
22
27
  - **Push notifications instead of polling:** `onDocumentUpdated` when a
23
28
  subscribed document reaches the configured build phase
24
29
  (`DataServerOptions.subscriptionPhase`, `DocumentState.Validated` by default),
25
- `onDocumentSaved` on a separate channel, and `onProjectsChanged` from the
26
- project registry.
30
+ `onDocumentSaved` on a separate channel, `onDocumentDirtyChanged` when a
31
+ subscribed document starts or stops differing from its file (every document
32
+ the head sends that it holds also carries its `text` block: version, hash
33
+ and current `dirty`), `onDocumentDeleted` (a deleted document has no built
34
+ state to carry, and the build-phase path never runs for one),
35
+ `onDocumentsBuilt` once per build for the documents nobody watches — chiefly
36
+ those rebuilt as a cascade, which no filesystem watcher can see because their
37
+ own files did not change — and `onProjectsChanged` from the project registry.
27
38
  - **Projects as first-class:** `getProjects` and `getProjectForUri`, answered from
28
39
  the framework's `ProjectManager`.
29
40
  - **An opt-in reference/naming slice** — `findReferenceCandidates`,
@@ -38,6 +49,8 @@ The projection itself is not this package's: it delegates to `TransferEncoder`
38
49
  and `ModelService` from `@hydranium/core`, so there is no second in-memory model
39
50
  to keep in sync.
40
51
 
52
+ For the adopter extension path, see [Add a data-server method](../../docs/guides/data-server-method.md). It covers the typed subclass, `additionalMethods`, shared namespace, and client proxy as one wire contract.
53
+
41
54
  ## Install
42
55
 
43
56
  ```bash
@@ -56,14 +69,16 @@ launchers live in `@hydranium/core/node`, not here.
56
69
  | ----------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------- |
57
70
  | `.` | `DataServer` and its option types, plus the `DataServerDiagnosticsProvider` seam — the whole production surface. | browser-neutral |
58
71
  | `./node` | `nodeDataServerDiagnostics()`, the runtime-backed half of the diagnostics seam. | Node-only |
72
+ | `./messages`| Every user-facing message the package raises, by code — what a translation catalogue keys on. | browser-neutral |
59
73
  | `./testing` | `makeDataServerHarness` — a real server driven in-process over a duplex connection pair. | Node-only (`vscode-jsonrpc/node`) |
60
74
 
61
- `.` is gated as browser-neutral in CI (`scripts/check-neutral-bundles.mjs`). It
75
+ `.` is gated as browser-neutral in CI (`scripts/check-neutral-bundles.mts`). It
62
76
  stays that way through a `browser` field in `package.json` that swaps the
63
77
  diagnostics default for a browser twin, so a bundler never follows the
64
78
  `@hydranium/core/node` import a Node host resolves — see [what "gated neutral" does and does not promise](../../docs/concepts/browser-hosting.md#a-note-on-what-gated-neutral-does-and-does-not-promise).
65
- Each subpath also has a `./lib/…` twin for consumers on
66
- `moduleResolution: "Node"`.
79
+ Resolve the subpaths with [a resolver that reads
80
+ `exports`](../../docs/adopting/requirements.md#a-resolver-that-reads-exports);
81
+ `"Node"` (node10) reaches none of them.
67
82
 
68
83
  ## Getting oriented
69
84
 
@@ -81,9 +96,10 @@ also [`docs/concepts/architecture.md`](../../docs/concepts/architecture.md) and
81
96
 
82
97
  ## Status
83
98
 
84
- Alpha — pre-v0, not yet published. The API is not stable and may change without a
85
- deprecation cycle. See the [repository README](../../README.md) for the current
86
- status and known limitations.
99
+ Alpha — pre-v0, published as a `1.0.0-next` prerelease on every merge to `main`.
100
+ The API is not stable and may change without a deprecation cycle. See the
101
+ [repository README](../../README.md) for the current status and known
102
+ limitations.
87
103
 
88
104
  ## License
89
105