@procedures/client 0.18.0 → 0.18.1
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/CHANGELOG.md +33 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/adapters/http/server/ndjson.d.ts +3 -1
- package/dist/adapters/http/server/ndjson.d.ts.map +1 -1
- package/dist/adapters/http/server/ndjson.js +3 -1
- package/dist/adapters/http/server/ndjson.js.map +1 -1
- package/dist/adapters/websocket/shared/rpc.d.ts +5 -1
- package/dist/adapters/websocket/shared/rpc.d.ts.map +1 -1
- package/dist/adapters/websocket/shared/rpc.js +5 -1
- package/dist/adapters/websocket/shared/rpc.js.map +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +2 -0
- package/dist/browser.js.map +1 -1
- package/dist/procedures/collection/index.d.ts +1 -0
- package/dist/procedures/collection/index.d.ts.map +1 -1
- package/dist/procedures/collection/index.js +2 -0
- package/dist/procedures/collection/index.js.map +1 -1
- package/dist/procedures/collection/partition.d.ts +48 -0
- package/dist/procedures/collection/partition.d.ts.map +1 -1
- package/dist/procedures/collection/partition.js +66 -0
- package/dist/procedures/collection/partition.js.map +1 -1
- package/dist/procedures/collection/topic.d.ts +2 -0
- package/dist/procedures/collection/topic.d.ts.map +1 -1
- package/dist/procedures/collection/topic.js.map +1 -1
- package/dist/procedures/index.d.ts +1 -1
- package/dist/procedures/index.d.ts.map +1 -1
- package/dist/procedures/index.js +2 -0
- package/dist/procedures/index.js.map +1 -1
- package/dist/server/procedure-server.d.ts +24 -1
- package/dist/server/procedure-server.d.ts.map +1 -1
- package/dist/server/procedure-server.js +29 -1
- package/dist/server/procedure-server.js.map +1 -1
- package/package.json +1 -1
- package/src/adapters/http/server/ndjson.ts +3 -1
- package/src/adapters/websocket/shared/rpc.ts +5 -1
- package/src/browser.ts +2 -0
- package/src/procedures/collection/index.ts +2 -0
- package/src/procedures/collection/partition.ts +75 -0
- package/src/procedures/collection/topic.ts +2 -0
- package/src/procedures/index.ts +2 -0
- package/src/server/procedure-server.ts +35 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @procedures/client
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d69c8cb: A host that serves a plain collection `a.b` and a collection `a` with partitions fails at registration. To correct it, rename the plain collection. Before, the two had the same topic `collections.a.b`. Thus the readers of `a.b` got the events of the tenant `b` of `a`, a leak across tenants (roadmap CLI-57, decision D23).
|
|
8
|
+
|
|
9
|
+
- The refusal is the new export `CollectionTopicCollisionError`. It names the two collections, the partition and the topic.
|
|
10
|
+
- `useStorage`, `useStorages`, the option `collections` of a host and `usePartitions` do the check. The check finds the pair in each order, also when the registrations come at different times.
|
|
11
|
+
- The check also refuses a deeper name, for example `a.b.c` next to `a` with partitions: `b.c` is a partition of `a`.
|
|
12
|
+
- The check also refuses a storage of `a.b` for the calls without a partition while `a` has partitions, also when `a.b` has partitions. That storage publishes on `collections.a.b`.
|
|
13
|
+
- A name without a dot does not change. A dotted name without a partitioned prefix does not change. Two collections with partitions, for example `a` and `a.b`, do not change, because the partitions of `a.b` encode its name.
|
|
14
|
+
|
|
15
|
+
PATCH (decision D23): the change refuses only a configuration that leaks events across tenants, so no caller can rely on it. Each correct configuration behaves as before.
|
|
16
|
+
|
|
17
|
+
Migration steps:
|
|
18
|
+
|
|
19
|
+
- When a host fails with `CollectionTopicCollisionError`, rename the plain collection, for example `a.b` to `a_b`. A name without a dot has no topic of a partition.
|
|
20
|
+
- The site: no change is necessary. It serves no collection.
|
|
21
|
+
- MiniMongo: no change is necessary. Its server serves no collection.
|
|
22
|
+
- Graph: no change is necessary. Its host gives partitions to each served collection (`examples`), and no collection has a plain storage.
|
|
23
|
+
- jarvis: no change is necessary. Its host serves no collection.
|
|
24
|
+
- 0379278: Docs and tests: the rule of the retryable flag of an in-band end (CLI-58). The behavior does not change, thus this change is a PATCH of the client group (decision D13).
|
|
25
|
+
|
|
26
|
+
- Before the stream starts, an error of a handler without a retryable flag gets the flag of its code in `ERROR_CODES` (CLI-48). Thus `UNAVAILABLE` without a flag is retryable, and the HTTP face answers 503.
|
|
27
|
+
- After the stream starts, an error ends the stream in-band. The in-band end is the `error` line of NDJSON, the `error` frame of WebSocket or the `_meta` of the MCP result.
|
|
28
|
+
- An in-band end without a retryable flag gets `retryable: false`, also when the stream gave no item. The reader can have items, and a retry can send them again.
|
|
29
|
+
- A handler gives `retryable: true` when a retry is safe. Then the in-band end is retryable too.
|
|
30
|
+
- The retry middleware of the client does not retry after an item reached the reader. Thus after the first item, the flag only tells the application.
|
|
31
|
+
- This rule agrees with the rule of a cut (CLI-48): the flag is false when the call can have had its effect.
|
|
32
|
+
- `WIRE-PROTOCOL.md` gives the rule in the section "Error codes". Tests pin it on the wire of HTTP and WebSocket, and on the HTTP, WebSocket and MCP faces of the procedures host.
|
|
33
|
+
|
|
34
|
+
The site, MiniMongo, Graph and jarvis: no change.
|
|
35
|
+
|
|
3
36
|
## 0.18.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|