@procedures/client 0.14.1 → 0.15.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 +93 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/adapters/http/client/transport.d.ts.map +1 -1
- package/dist/adapters/http/client/transport.js +4 -0
- package/dist/adapters/http/client/transport.js.map +1 -1
- package/dist/adapters/http/server/handler.d.ts.map +1 -1
- package/dist/adapters/http/server/handler.js +8 -3
- package/dist/adapters/http/server/handler.js.map +1 -1
- package/dist/adapters/local/client/transport.d.ts.map +1 -1
- package/dist/adapters/local/client/transport.js +5 -0
- package/dist/adapters/local/client/transport.js.map +1 -1
- package/dist/browser.d.ts +4 -3
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +2 -0
- package/dist/browser.js.map +1 -1
- package/dist/client/client.js +1 -1
- package/dist/client/client.js.map +1 -1
- package/dist/client/errors/registry.d.ts.map +1 -1
- package/dist/client/errors/registry.js +13 -0
- package/dist/client/errors/registry.js.map +1 -1
- package/dist/client/middleware/rate-limit.d.ts +17 -0
- package/dist/client/middleware/rate-limit.d.ts.map +1 -1
- package/dist/client/middleware/rate-limit.js +94 -39
- package/dist/client/middleware/rate-limit.js.map +1 -1
- package/dist/client/types.d.ts +6 -1
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js +7 -1
- package/dist/client/types.js.map +1 -1
- package/dist/events/index.d.ts +1 -0
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js.map +1 -1
- package/dist/events/publisher.d.ts +46 -1
- package/dist/events/publisher.d.ts.map +1 -1
- package/dist/events/publisher.js +95 -5
- package/dist/events/publisher.js.map +1 -1
- package/dist/events/recheck.d.ts +84 -0
- package/dist/events/recheck.d.ts.map +1 -0
- package/dist/events/recheck.js +135 -0
- package/dist/events/recheck.js.map +1 -0
- package/dist/procedures/collection/index.d.ts +3 -1
- 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/precondition.d.ts +111 -0
- package/dist/procedures/collection/precondition.d.ts.map +1 -0
- package/dist/procedures/collection/precondition.js +153 -0
- package/dist/procedures/collection/precondition.js.map +1 -0
- package/dist/procedures/collection/procedures.d.ts.map +1 -1
- package/dist/procedures/collection/procedures.js +16 -3
- package/dist/procedures/collection/procedures.js.map +1 -1
- package/dist/procedures/collection/query.d.ts +2 -0
- package/dist/procedures/collection/query.d.ts.map +1 -1
- package/dist/procedures/collection/query.js +3 -0
- package/dist/procedures/collection/query.js.map +1 -1
- package/dist/procedures/collection/schemas.d.ts +16 -0
- package/dist/procedures/collection/schemas.d.ts.map +1 -1
- package/dist/procedures/collection/schemas.js +26 -5
- package/dist/procedures/collection/schemas.js.map +1 -1
- package/dist/procedures/collection/storage.d.ts +34 -6
- package/dist/procedures/collection/storage.d.ts.map +1 -1
- package/dist/procedures/collection/storage.js +3 -0
- package/dist/procedures/collection/storage.js.map +1 -1
- package/dist/procedures/index.d.ts +2 -2
- package/dist/procedures/index.d.ts.map +1 -1
- package/dist/procedures/index.js +1 -1
- package/dist/procedures/index.js.map +1 -1
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +2 -0
- package/dist/protocol.js.map +1 -1
- package/dist/server/host-policy.d.ts +17 -0
- package/dist/server/host-policy.d.ts.map +1 -1
- package/dist/server/host-policy.js +7 -0
- package/dist/server/host-policy.js.map +1 -1
- package/dist/server/limits.d.ts +122 -0
- package/dist/server/limits.d.ts.map +1 -0
- package/dist/server/limits.js +153 -0
- package/dist/server/limits.js.map +1 -0
- package/dist/server/procedure-server.d.ts +31 -1
- package/dist/server/procedure-server.d.ts.map +1 -1
- package/dist/server/procedure-server.js +43 -2
- package/dist/server/procedure-server.js.map +1 -1
- package/dist/server/request-auth.d.ts +5 -1
- package/dist/server/request-auth.d.ts.map +1 -1
- package/dist/server/request-auth.js +19 -2
- package/dist/server/request-auth.js.map +1 -1
- package/package.json +3 -3
- package/src/adapters/http/client/transport.ts +3 -0
- package/src/adapters/http/server/handler.ts +8 -3
- package/src/adapters/local/client/transport.ts +4 -0
- package/src/browser.ts +20 -0
- package/src/client/client.ts +1 -1
- package/src/client/errors/registry.ts +14 -0
- package/src/client/middleware/rate-limit.ts +116 -41
- package/src/client/types.ts +8 -0
- package/src/events/index.ts +1 -0
- package/src/events/publisher.ts +116 -6
- package/src/events/recheck.ts +182 -0
- package/src/procedures/collection/index.ts +17 -0
- package/src/procedures/collection/precondition.ts +180 -0
- package/src/procedures/collection/procedures.ts +17 -4
- package/src/procedures/collection/query.ts +16 -0
- package/src/procedures/collection/schemas.ts +43 -6
- package/src/procedures/collection/storage.ts +36 -6
- package/src/procedures/index.ts +15 -0
- package/src/protocol.ts +5 -1
- package/src/server/host-policy.ts +22 -0
- package/src/server/limits.ts +254 -0
- package/src/server/procedure-server.ts +59 -3
- package/src/server/request-auth.ts +19 -2
package/dist/events/publisher.js
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
*
|
|
19
19
|
* - A value with rows (`withRows()`) reaches each subscriber through the output filter of its host
|
|
20
20
|
* (`ctx.admit`): each row passes the filter, and the subscriber gets only the admitted rows.
|
|
21
|
+
* - An open subscription gets the same checks again at a change of the rights (`rightsChanged()`,
|
|
22
|
+
* `recheck.rightsChanges`) and after `recheck.maxAge` (roadmap CLI-44). A refusal ends it.
|
|
21
23
|
*
|
|
22
24
|
* The delivery is at most once. The queue of a subscription holds at most `buffer` events. When
|
|
23
25
|
* it is full, the publisher drops the oldest event, and the next event tells the number of lost
|
|
@@ -32,6 +34,8 @@ import { collectionTopicTarget, partitionOfCall } from "../procedures/collection
|
|
|
32
34
|
import { getGlobalEventBus } from "./bus.js";
|
|
33
35
|
import { EVENTS_SUBSCRIBE_PATH } from "./remote.js";
|
|
34
36
|
import { admittedValue, rowsOf } from "./rows.js";
|
|
37
|
+
import { realClock } from "../clock.js";
|
|
38
|
+
import { SubscriptionRechecks } from "./recheck.js";
|
|
35
39
|
/** The number of topics that one subscription can name. */
|
|
36
40
|
export const MAX_SUBSCRIPTION_TOPICS = 64;
|
|
37
41
|
/** The number of characters of a topic name. */
|
|
@@ -111,6 +115,10 @@ class TopicSubscription {
|
|
|
111
115
|
closed = false;
|
|
112
116
|
failure;
|
|
113
117
|
unsubscribes;
|
|
118
|
+
/** The re-check of the admission that runs (roadmap CLI-44). The events wait for it. */
|
|
119
|
+
recheck;
|
|
120
|
+
/** The functions that run when the subscription ends */
|
|
121
|
+
endListeners = [];
|
|
114
122
|
constructor(bus,
|
|
115
123
|
/** The topics of the subscriber, each with the topic of the bus that it listens to */
|
|
116
124
|
routes, buffer, signal, onClose,
|
|
@@ -141,7 +149,7 @@ class TopicSubscription {
|
|
|
141
149
|
return;
|
|
142
150
|
const event = { type: "event", topic, data, seq: ++this.seq };
|
|
143
151
|
const waiter = this.waiter;
|
|
144
|
-
if (waiter && this.queue.length === 0) {
|
|
152
|
+
if (waiter && this.queue.length === 0 && !this.recheck) {
|
|
145
153
|
this.waiter = undefined;
|
|
146
154
|
waiter.resolve(this.deliver(event));
|
|
147
155
|
return;
|
|
@@ -178,6 +186,9 @@ class TopicSubscription {
|
|
|
178
186
|
this.confirmation = undefined;
|
|
179
187
|
return Promise.resolve({ value: confirmation, done: false });
|
|
180
188
|
}
|
|
189
|
+
// The events wait for a re-check of the admission (roadmap CLI-44)
|
|
190
|
+
if (this.recheck)
|
|
191
|
+
return this.recheck.then(() => this.next());
|
|
181
192
|
const event = this.queue.shift();
|
|
182
193
|
if (event)
|
|
183
194
|
return this.deliver(event);
|
|
@@ -236,8 +247,50 @@ class TopicSubscription {
|
|
|
236
247
|
unsubscribe();
|
|
237
248
|
this.signal?.removeEventListener("abort", this.onAbort);
|
|
238
249
|
this.onClose(this);
|
|
250
|
+
for (const listener of this.endListeners.splice(0))
|
|
251
|
+
listener();
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* This function holds the events until the check ends (roadmap CLI-44). A check that passes gives
|
|
255
|
+
* the held events to the reader. A check that fails ends the subscription with its error, and the
|
|
256
|
+
* held events go. The promise ends when the check ends, and it does not reject.
|
|
257
|
+
*/
|
|
258
|
+
hold(check) {
|
|
259
|
+
if (this.closed)
|
|
260
|
+
return check.then(ignore, ignore);
|
|
261
|
+
const running = check.then(() => {
|
|
262
|
+
if (this.recheck === running)
|
|
263
|
+
this.recheck = undefined;
|
|
264
|
+
this.flush();
|
|
265
|
+
}, (error) => {
|
|
266
|
+
if (this.recheck === running)
|
|
267
|
+
this.recheck = undefined;
|
|
268
|
+
this.queue.length = 0;
|
|
269
|
+
this.fail(error);
|
|
270
|
+
});
|
|
271
|
+
this.recheck = running;
|
|
272
|
+
return running;
|
|
273
|
+
}
|
|
274
|
+
/** This function runs the listener when the subscription ends, or at once after its end. */
|
|
275
|
+
onEnd(listener) {
|
|
276
|
+
if (this.closed)
|
|
277
|
+
listener();
|
|
278
|
+
else
|
|
279
|
+
this.endListeners.push(listener);
|
|
280
|
+
}
|
|
281
|
+
/** This function gives the first held event to a reader that waits, after a check passes. */
|
|
282
|
+
flush() {
|
|
283
|
+
const waiter = this.waiter;
|
|
284
|
+
const event = this.queue[0];
|
|
285
|
+
if (!waiter || !event || this.recheck)
|
|
286
|
+
return;
|
|
287
|
+
this.waiter = undefined;
|
|
288
|
+
this.queue.shift();
|
|
289
|
+
waiter.resolve(this.deliver(event));
|
|
239
290
|
}
|
|
240
291
|
}
|
|
292
|
+
/** This function does nothing: the end of a check of a closed subscription. */
|
|
293
|
+
function ignore() { }
|
|
241
294
|
/**
|
|
242
295
|
* The publisher of the remote events: it serves `events.subscribe` from a bus, under a topic
|
|
243
296
|
* rule. `ProcedureServer` makes one from its option `events`.
|
|
@@ -261,7 +314,10 @@ export class EventPublisher {
|
|
|
261
314
|
defaultReads;
|
|
262
315
|
buffer;
|
|
263
316
|
open = new Set();
|
|
317
|
+
/** The re-checks of the admission of the open subscriptions (roadmap CLI-44) */
|
|
318
|
+
rechecks;
|
|
264
319
|
constructor(options) {
|
|
320
|
+
this.rechecks = new SubscriptionRechecks(options.recheck ?? {}, options.clock ?? realClock);
|
|
265
321
|
this.bus = options.bus ?? getGlobalEventBus();
|
|
266
322
|
this.known = topicMatcher(options.topics);
|
|
267
323
|
this.allow = options.allow;
|
|
@@ -296,6 +352,17 @@ export class EventPublisher {
|
|
|
296
352
|
for (const subscription of [...this.open])
|
|
297
353
|
subscription.fail(stoppedError());
|
|
298
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* This function tells the publisher that rights changed (roadmap CLI-44). Each open subscription
|
|
357
|
+
* that the change touches gets the checks of its start again: the topic rule, the reads, `allow`
|
|
358
|
+
* and the partition. Its events wait for the check. A refusal ends the subscription with its
|
|
359
|
+
* error, for example `FORBIDDEN`. The promise ends when each check ends, and it does not reject.
|
|
360
|
+
*
|
|
361
|
+
* @param change - The subscriptions that the change touches. Without it, each open subscription gets a check.
|
|
362
|
+
*/
|
|
363
|
+
rightsChanged(change) {
|
|
364
|
+
return this.rechecks.rightsChanged(change);
|
|
365
|
+
}
|
|
299
366
|
/**
|
|
300
367
|
* The topic of the bus for a topic of a subscriber (roadmap CLI-17). A topic of a partitioned
|
|
301
368
|
* collection names the partition that the subscriber asks for, as the input of a procedure does:
|
|
@@ -321,11 +388,10 @@ export class EventPublisher {
|
|
|
321
388
|
return target ? [`collection:${target.collection}`] : [];
|
|
322
389
|
}
|
|
323
390
|
/**
|
|
324
|
-
* The
|
|
325
|
-
*
|
|
391
|
+
* The checks of the topics of a call: the topic rule, the reads of the capability and `allow`.
|
|
392
|
+
* A subscription passes them at its start and at each re-check (roadmap CLI-44).
|
|
326
393
|
*/
|
|
327
|
-
|
|
328
|
-
const unique = [...new Set(topics)];
|
|
394
|
+
admitTopics(unique, ctx) {
|
|
329
395
|
for (const topic of unique) {
|
|
330
396
|
if (!this.known(topic))
|
|
331
397
|
throw new TopicNotFoundError(`The host has no topic "${topic}"`);
|
|
@@ -347,11 +413,35 @@ export class EventPublisher {
|
|
|
347
413
|
}
|
|
348
414
|
}
|
|
349
415
|
}
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* The admission of an open subscription again (roadmap CLI-44): the checks of its start, and the
|
|
419
|
+
* partition of each topic. A refusal of the resolver throws its error. A topic whose partition
|
|
420
|
+
* changed throws `FORBIDDEN` (reason `partition-not-allowed`), because the listener has the old
|
|
421
|
+
* partition.
|
|
422
|
+
*/
|
|
423
|
+
async readmit(routes, ctx) {
|
|
424
|
+
this.admitTopics(routes.map(([topic]) => topic), ctx);
|
|
425
|
+
for (const [topic, busTopic] of routes) {
|
|
426
|
+
if ((await this.busTopic(topic, ctx)) !== busTopic) {
|
|
427
|
+
throw new InvocationError("FORBIDDEN", `The partition of the topic "${topic}" changed, so the subscription ends`, ctx.path, "partition-not-allowed");
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* The stream of one subscription. The publisher examines each topic before it adds a listener:
|
|
433
|
+
* the topic rule, the reads, `allow`, and the partition. A call with one bad topic makes no subscription.
|
|
434
|
+
*/
|
|
435
|
+
async subscribe(topics, ctx) {
|
|
436
|
+
const unique = [...new Set(topics)];
|
|
437
|
+
this.admitTopics(unique, ctx);
|
|
350
438
|
const routes = [];
|
|
351
439
|
for (const topic of unique)
|
|
352
440
|
routes.push([topic, await this.busTopic(topic, ctx)]);
|
|
353
441
|
const subscription = new TopicSubscription(this.bus, routes, this.buffer, ctx.signal, (closed) => this.open.delete(closed), ctx.admit, ctx.invocation);
|
|
354
442
|
this.open.add(subscription);
|
|
443
|
+
// The same checks run again at a change of the rights and after the max age (roadmap CLI-44)
|
|
444
|
+
this.rechecks.watch(subscription, ctx.principal, () => this.readmit(routes, ctx));
|
|
355
445
|
return subscription.closeIfAborted();
|
|
356
446
|
}
|
|
357
447
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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Y,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;QACvJ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC5B,6FAA6F;QAC7F,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,EAAE,GAAG,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;QAClF,OAAO,YAAY,CAAC,cAAc,EAAE,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The re-check of the admission of the open subscriptions (roadmap CLI-44).
|
|
3
|
+
*
|
|
4
|
+
* At the start of a subscription, a publisher examines the rights of the subscriber. It examines
|
|
5
|
+
* the topic rule, the reads of the capability, `allow` and the partition. A right can change
|
|
6
|
+
* later, for example when the app removes a user from a group. Thus the publisher examines each
|
|
7
|
+
* open subscription again:
|
|
8
|
+
*
|
|
9
|
+
* - At a change of the rights. The host uses `rightsChanged()` of the publisher, or the source of
|
|
10
|
+
* the option `recheck.rightsChanges` gives the change to its listener.
|
|
11
|
+
* - After the time `recheck.maxAge` on the clock of the publisher, from the last check.
|
|
12
|
+
*
|
|
13
|
+
* The check is the same function as at the start. While it operates, the events of the
|
|
14
|
+
* subscription wait. A refusal ends the subscription with its error, for example `FORBIDDEN`, and
|
|
15
|
+
* the events that wait go. Without a call of `rightsChanged()` and without the option, nothing
|
|
16
|
+
* changes.
|
|
17
|
+
*/
|
|
18
|
+
import type { Clock } from "../clock.js";
|
|
19
|
+
import { type Duration } from "../duration.js";
|
|
20
|
+
import type { Principal } from "../server/types.js";
|
|
21
|
+
/**
|
|
22
|
+
* The subscriptions that a change of the rights touches: the id of a principal, or a test of the
|
|
23
|
+
* principal of a subscription. A subscription without a principal (a call from this process) has
|
|
24
|
+
* no id, so only a test or a change of each subscription touches it.
|
|
25
|
+
*/
|
|
26
|
+
export type RightsChange = string | ((principal: Principal | undefined) => boolean);
|
|
27
|
+
/** The options of the re-check of the open subscriptions of a publisher (roadmap CLI-44). */
|
|
28
|
+
export interface SubscriptionRecheck {
|
|
29
|
+
/**
|
|
30
|
+
* The longest time from one check of a subscription to the next check, for example `minutes(1)`.
|
|
31
|
+
* The time is on the clock of the publisher. Without it, only a change of the rights starts a
|
|
32
|
+
* check.
|
|
33
|
+
*/
|
|
34
|
+
readonly maxAge?: Duration | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The source of the changes of the rights of the app. While the publisher has an open
|
|
37
|
+
* subscription, the source has one listener of the publisher. The source gives the function that
|
|
38
|
+
* removes the listener. Each call of the listener is a call of `rightsChanged()`: without a
|
|
39
|
+
* change, each subscription gets a check.
|
|
40
|
+
*/
|
|
41
|
+
readonly rightsChanges?: ((listener: (change?: RightsChange) => void) => () => void) | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** A subscription that the re-checks can hold and watch. */
|
|
44
|
+
export interface RecheckedSubscription {
|
|
45
|
+
/**
|
|
46
|
+
* This function holds the events of the subscription until the check ends. A refusal ends the
|
|
47
|
+
* subscription with its error. The promise ends with the check, and it does not reject.
|
|
48
|
+
*/
|
|
49
|
+
hold(check: Promise<void>): Promise<void>;
|
|
50
|
+
/** This function runs the listener when the subscription ends. */
|
|
51
|
+
onEnd(listener: () => void): void;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The re-checks of the open subscriptions of one publisher (roadmap CLI-44). The publisher gives
|
|
55
|
+
* each new subscription to `watch()`, with the check of its admission.
|
|
56
|
+
*/
|
|
57
|
+
export declare class SubscriptionRechecks {
|
|
58
|
+
private readonly clock;
|
|
59
|
+
private readonly watches;
|
|
60
|
+
private readonly maxAgeMs;
|
|
61
|
+
private readonly source;
|
|
62
|
+
/** The function that removes the listener of the source, while a subscription is open */
|
|
63
|
+
private stopListening;
|
|
64
|
+
constructor(options: SubscriptionRecheck, clock: Clock);
|
|
65
|
+
/** The number of the subscriptions that the re-checks watch. */
|
|
66
|
+
get size(): number;
|
|
67
|
+
/**
|
|
68
|
+
* This function watches a subscription until it ends. A change of the rights of its principal
|
|
69
|
+
* and its max age start the check. The check must throw the refusal.
|
|
70
|
+
*/
|
|
71
|
+
watch(subscription: RecheckedSubscription, principal: Principal | undefined, check: () => Promise<void>): void;
|
|
72
|
+
/**
|
|
73
|
+
* This function starts a check of each watched subscription that the change touches. The
|
|
74
|
+
* promise ends when each check ends.
|
|
75
|
+
*/
|
|
76
|
+
rightsChanged(change?: RightsChange): Promise<void>;
|
|
77
|
+
/** This function stops the watch of a subscription that ended. */
|
|
78
|
+
private unwatch;
|
|
79
|
+
/** This function starts the timer of the max age of a subscription. */
|
|
80
|
+
private startTimer;
|
|
81
|
+
/** This function stops the timer of the max age of a subscription. */
|
|
82
|
+
private stopTimer;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=recheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recheck.d.ts","sourceRoot":"","sources":["../../src/events/recheck.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC;AAEpF,6FAA6F;AAC7F,MAAM,W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|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The re-check of the admission of the open subscriptions (roadmap CLI-44).
|
|
3
|
+
*
|
|
4
|
+
* At the start of a subscription, a publisher examines the rights of the subscriber. It examines
|
|
5
|
+
* the topic rule, the reads of the capability, `allow` and the partition. A right can change
|
|
6
|
+
* later, for example when the app removes a user from a group. Thus the publisher examines each
|
|
7
|
+
* open subscription again:
|
|
8
|
+
*
|
|
9
|
+
* - At a change of the rights. The host uses `rightsChanged()` of the publisher, or the source of
|
|
10
|
+
* the option `recheck.rightsChanges` gives the change to its listener.
|
|
11
|
+
* - After the time `recheck.maxAge` on the clock of the publisher, from the last check.
|
|
12
|
+
*
|
|
13
|
+
* The check is the same function as at the start. While it operates, the events of the
|
|
14
|
+
* subscription wait. A refusal ends the subscription with its error, for example `FORBIDDEN`, and
|
|
15
|
+
* the events that wait go. Without a call of `rightsChanged()` and without the option, nothing
|
|
16
|
+
* changes.
|
|
17
|
+
*/
|
|
18
|
+
import { toMs } from "../duration.js";
|
|
19
|
+
/** True when the change touches a subscription of the principal. A test that throws touches it. */
|
|
20
|
+
function touches(change, principal) {
|
|
21
|
+
if (change === undefined)
|
|
22
|
+
return true;
|
|
23
|
+
if (typeof change === "string")
|
|
24
|
+
return principal?.id === change;
|
|
25
|
+
try {
|
|
26
|
+
return change(principal);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** The promise of a check. A check that throws at once gives a rejected promise. */
|
|
33
|
+
function started(check) {
|
|
34
|
+
return new Promise((resolve) => resolve(check()));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The re-checks of the open subscriptions of one publisher (roadmap CLI-44). The publisher gives
|
|
38
|
+
* each new subscription to `watch()`, with the check of its admission.
|
|
39
|
+
*/
|
|
40
|
+
export class SubscriptionRechecks {
|
|
41
|
+
clock;
|
|
42
|
+
watches = new Set();
|
|
43
|
+
maxAgeMs;
|
|
44
|
+
source;
|
|
45
|
+
/** The function that removes the listener of the source, while a subscription is open */
|
|
46
|
+
stopListening;
|
|
47
|
+
constructor(options, clock) {
|
|
48
|
+
this.clock = clock;
|
|
49
|
+
const maxAgeMs = options.maxAge === undefined ? undefined : toMs(options.maxAge, "recheck.maxAge");
|
|
50
|
+
if (maxAgeMs !== undefined && !(maxAgeMs > 0)) {
|
|
51
|
+
throw new TypeError(`recheck.maxAge must be more than 0 ms, got ${maxAgeMs} ms`);
|
|
52
|
+
}
|
|
53
|
+
this.maxAgeMs = maxAgeMs;
|
|
54
|
+
this.source = options.rightsChanges;
|
|
55
|
+
}
|
|
56
|
+
/** The number of the subscriptions that the re-checks watch. */
|
|
57
|
+
get size() {
|
|
58
|
+
return this.watches.size;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* This function watches a subscription until it ends. A change of the rights of its principal
|
|
62
|
+
* and its max age start the check. The check must throw the refusal.
|
|
63
|
+
*/
|
|
64
|
+
watch(subscription, principal, check) {
|
|
65
|
+
const watch = {
|
|
66
|
+
principal,
|
|
67
|
+
timer: undefined,
|
|
68
|
+
recheck: () => {
|
|
69
|
+
this.stopTimer(watch);
|
|
70
|
+
return subscription.hold(started(check)).then(() => {
|
|
71
|
+
// A check that passes gives the admission a new age
|
|
72
|
+
if (this.watches.has(watch))
|
|
73
|
+
this.startTimer(watch);
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
this.watches.add(watch);
|
|
78
|
+
subscription.onEnd(() => this.unwatch(watch));
|
|
79
|
+
if (!this.watches.has(watch))
|
|
80
|
+
return;
|
|
81
|
+
this.startTimer(watch);
|
|
82
|
+
if (this.source && !this.stopListening) {
|
|
83
|
+
try {
|
|
84
|
+
this.stopListening = this.source((change) => void this.rightsChanged(change));
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
// A source that cannot listen cannot tell a revocation: the subscription ends
|
|
88
|
+
void subscription.hold(Promise.reject(error));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* This function starts a check of each watched subscription that the change touches. The
|
|
94
|
+
* promise ends when each check ends.
|
|
95
|
+
*/
|
|
96
|
+
rightsChanged(change) {
|
|
97
|
+
const checks = [];
|
|
98
|
+
for (const watch of [...this.watches]) {
|
|
99
|
+
if (touches(change, watch.principal))
|
|
100
|
+
checks.push(watch.recheck());
|
|
101
|
+
}
|
|
102
|
+
return Promise.all(checks).then(() => undefined);
|
|
103
|
+
}
|
|
104
|
+
/** This function stops the watch of a subscription that ended. */
|
|
105
|
+
unwatch(watch) {
|
|
106
|
+
this.stopTimer(watch);
|
|
107
|
+
if (!this.watches.delete(watch) || this.watches.size > 0)
|
|
108
|
+
return;
|
|
109
|
+
// The last subscription ended: the publisher does not listen to the source
|
|
110
|
+
const stop = this.stopListening;
|
|
111
|
+
this.stopListening = undefined;
|
|
112
|
+
stop?.();
|
|
113
|
+
}
|
|
114
|
+
/** This function starts the timer of the max age of a subscription. */
|
|
115
|
+
startTimer(watch) {
|
|
116
|
+
if (this.maxAgeMs === undefined)
|
|
117
|
+
return;
|
|
118
|
+
this.stopTimer(watch);
|
|
119
|
+
const timer = this.clock.after(this.maxAgeMs, () => {
|
|
120
|
+
if (watch.timer === timer)
|
|
121
|
+
watch.timer = undefined;
|
|
122
|
+
void watch.recheck();
|
|
123
|
+
});
|
|
124
|
+
// A check does not keep a Node process alive
|
|
125
|
+
timer.unref?.();
|
|
126
|
+
watch.timer = timer;
|
|
127
|
+
}
|
|
128
|
+
/** This function stops the timer of the max age of a subscription. */
|
|
129
|
+
stopTimer(watch) {
|
|
130
|
+
const timer = watch.timer;
|
|
131
|
+
watch.timer = undefined;
|
|
132
|
+
timer?.();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=recheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recheck.js","s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,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;QAChB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,sEAAsE;IAC9D,SAAS,CAAC,KAAY;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAC1B,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC;QACxB,KAAK,EAAE,EAAE,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -13,7 +13,9 @@ export { PARTITION_PATTERN, collectionTopicPartition, collectionTopicTarget, par
|
|
|
13
13
|
export type { CollectionPartitions, PartitionInput, PartitionResolver } from "./partition.js";
|
|
14
14
|
export { admittedStorage, admitsRow } from "./admission.js";
|
|
15
15
|
export type { CollectionAdmission, CollectionRow, CollectionWrite, CollectionWriteGuard } from "./admission.js";
|
|
16
|
-
export type { CollectionStorage, StorageChanges, StorageMetadata, StorageWriteOptions, StorageSetChange, StorageDeleteChange, StorageClearChange, StorageChangeEvent, StorageChangeBatch, StorageObserver, } from "./storage.js";
|
|
16
|
+
export type { CollectionStorage, StorageChanges, StorageMetadata, StorageWriteOptions, StorageItemWriteOptions, StorageBatchWriteOptions, StorageSetChange, StorageDeleteChange, StorageClearChange, StorageChangeEvent, StorageChangeBatch, StorageObserver, } from "./storage.js";
|
|
17
|
+
export { MAX_EXPECTED_VERSION_LENGTH, PRECONDITION_NOT_SUPPORTED, VERSION_CONFLICTS_METADATA_KEY, VersionConflictError, asVersionConflictError, isExpectedVersion, preconditionNotSupported, versionConflict, versionConflicts, versionConflictsOf, } from "./precondition.js";
|
|
18
|
+
export type { CurrentItem, VersionConflict, VersionOf } from "./precondition.js";
|
|
17
19
|
export { DEFAULT_FIND_LIMIT, DEFAULT_QUERY_OPERATORS, DEFAULT_QUERY_POLICY, QUERY_OPERATORS, applyPatch, compareStorageValues, compileSelector, isPatchOperations, matchesSelector, mergePatch, patchProblems, queryEntries, queryOptionsProblems, selectorProblems, } from "./query.js";
|
|
18
20
|
export type { StorageFieldOperators, StoragePatch, StoragePatchOperations, StorageQueryOperator, StorageQueryOptions, StorageQueryPolicy, StorageSelector, StorageSort, StorageSortDirection, } from "./query.js";
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/procedures/collection/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,eAAe,EACf,SAAS,EACT,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,SAAS,EACT,UAAU,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,YAAY,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAGlG,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC3E,YAAY,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAG1D,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACnJ,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAG9F,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC5D,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGhH,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,GAChB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/procedures/collection/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,eAAe,EACf,SAAS,EACT,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,a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EACpB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,qBAAqB,EACrB,YAAY,EACZ,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,oBAAoB,GACrB,MAAM,YAAY,CAAC"}
|
|
@@ -13,6 +13,8 @@ export { collectionChangeTopic, collectionTopicReads } from "./changes.js";
|
|
|
13
13
|
export { PARTITION_PATTERN, collectionTopicPartition, collectionTopicTarget, partitionOfCall, storageOfCall, withPartition } from "./partition.js";
|
|
14
14
|
// The rules of the rows of a collection: a filter of the reads and a guard of the writes (roadmap CLI-41)
|
|
15
15
|
export { admittedStorage, admitsRow } from "./admission.js";
|
|
16
|
+
// The precondition of the writes: the expected version and VERSION_CONFLICT (roadmap CLI-16)
|
|
17
|
+
export { MAX_EXPECTED_VERSION_LENGTH, PRECONDITION_NOT_SUPPORTED, VERSION_CONFLICTS_METADATA_KEY, VersionConflictError, asVersionConflictError, isExpectedVersion, preconditionNotSupported, versionConflict, versionConflicts, versionConflictsOf, } from "./precondition.js";
|
|
16
18
|
// The query language of the storages: the same JSON on the wire and in query() (roadmap CLI-34:
|
|
17
19
|
// the one copy of the language)
|
|
18
20
|
export { DEFAULT_FIND_LIMIT, DEFAULT_QUERY_OPERATORS, DEFAULT_QUERY_POLICY, QUERY_OPERATORS, applyPatch, compareStorageValues, compileSelector, isPatchOperations, matchesSelector, mergePatch, patchProblems, queryEntries, queryOptionsProblems, selectorProblems, } from "./query.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/procedures/collection/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,UAAU;AACV,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAuBtB,aAAa;AACb,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG7D,mDAAmD;AACnD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAG3E,kDAAkD;AAClD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGnJ,0GAA0G;AAC1G,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/procedures/collection/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,UAAU;AACV,OAAO,EACL,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAuBtB,aAAa;AACb,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAG7D,mDAAmD;AACnD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAG3E,kDAAkD;AAClD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGnJ,0GAA0G;AAC1G,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAmB5D,6FAA6F;AAC7F,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,8BAA8B,EAC9B,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAG3B,gGAAgG;AAChG,gCAAgC;AAChC,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The precondition of a collection write (roadmap CLI-16, decision D11).
|
|
3
|
+
*
|
|
4
|
+
* - `set` and `delete` take `expectedVersion`. `setBatch` takes `expectedVersions`, with one
|
|
5
|
+
* expected version for each id. The value is the version of the current item that the write
|
|
6
|
+
* expects. `null` expects no item.
|
|
7
|
+
* - The version of an item is the value that the function `versionOf` of the storage gives for
|
|
8
|
+
* the item, for example a revision field. `HybridStorage` reads the same versions with its own
|
|
9
|
+
* `versionOf`, so its queue can send the base version of a write as the expected version.
|
|
10
|
+
* - The storage tests the precondition and writes in one step. When the version of the current
|
|
11
|
+
* item is not the expected version, the write changes nothing, and it rejects with
|
|
12
|
+
* `VersionConflictError`.
|
|
13
|
+
* - The error has the code `VERSION_CONFLICT` (HTTP 409). It has the current item and its version
|
|
14
|
+
* for each conflict. On the wire, the conflicts go in the metadata key `conflicts`.
|
|
15
|
+
* - A storage without `versionOf` cannot test a precondition. It rejects such a write with a
|
|
16
|
+
* `TypeError`, and changes nothing. It never ignores a precondition.
|
|
17
|
+
* - A write without a precondition is the same as before: the last write wins.
|
|
18
|
+
*
|
|
19
|
+
* This module has no imports: `@procedures/client/query` exports it for the storage packages.
|
|
20
|
+
*/
|
|
21
|
+
/** One conflict of a write with a precondition (roadmap CLI-16). The data is JSON. */
|
|
22
|
+
export interface VersionConflict {
|
|
23
|
+
/** The id of the item. */
|
|
24
|
+
readonly id: string;
|
|
25
|
+
/** The version that the write expected. `null`: the write expected no item. */
|
|
26
|
+
readonly expected: string | null;
|
|
27
|
+
/** True when the id has an item now. */
|
|
28
|
+
readonly found: boolean;
|
|
29
|
+
/** The current item, when `found` is true. */
|
|
30
|
+
readonly value?: unknown;
|
|
31
|
+
/**
|
|
32
|
+
* The version of the current item: `null` when the id has no item. When the current item has no
|
|
33
|
+
* version, the field is absent.
|
|
34
|
+
*/
|
|
35
|
+
readonly version?: string | null;
|
|
36
|
+
}
|
|
37
|
+
/** The function that gives the version of an item, or undefined for an item without a version. */
|
|
38
|
+
export type VersionOf<T> = (item: T) => string | undefined;
|
|
39
|
+
/** The current state of an id: no item, or an item. */
|
|
40
|
+
export type CurrentItem<T> = {
|
|
41
|
+
readonly found: false;
|
|
42
|
+
} | {
|
|
43
|
+
readonly found: true;
|
|
44
|
+
readonly value: T;
|
|
45
|
+
};
|
|
46
|
+
/** The metadata key of the conflicts of a `VERSION_CONFLICT` error on the wire. */
|
|
47
|
+
export declare const VERSION_CONFLICTS_METADATA_KEY = "conflicts";
|
|
48
|
+
/** The longest expected version, in characters. */
|
|
49
|
+
export declare const MAX_EXPECTED_VERSION_LENGTH = 1024;
|
|
50
|
+
/**
|
|
51
|
+
* A write with a precondition found an item with another version (roadmap CLI-16). The write
|
|
52
|
+
* changed nothing. `conflicts` has the current item and its version for each id of a conflict.
|
|
53
|
+
*/
|
|
54
|
+
export declare class VersionConflictError extends Error {
|
|
55
|
+
readonly name = "VersionConflictError";
|
|
56
|
+
/** The error code of the protocol: HTTP 409, not retryable. */
|
|
57
|
+
readonly code = "VERSION_CONFLICT";
|
|
58
|
+
/** A retry of the same write fails again: the caller reads the current item first. */
|
|
59
|
+
readonly retryable = false;
|
|
60
|
+
/** The conflicts, one for each id whose current item does not have the expected version. */
|
|
61
|
+
readonly conflicts: readonly VersionConflict[];
|
|
62
|
+
constructor(conflicts: readonly VersionConflict[], message?: string);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* This function gives the conflict of one id, or undefined when the current item has the expected
|
|
66
|
+
* version. `null` expects no item. An item without a version never has an expected string version.
|
|
67
|
+
*
|
|
68
|
+
* @param id - The id of the item
|
|
69
|
+
* @param expected - The expected version, or `null` for no item
|
|
70
|
+
* @param current - The current state of the id
|
|
71
|
+
* @param versionOf - The version of an item
|
|
72
|
+
*/
|
|
73
|
+
export declare function versionConflict<T>(id: string, expected: string | null, current: CurrentItem<T>, versionOf: VersionOf<T>): VersionConflict | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* This function tests the preconditions of a write against the current items, and gives the
|
|
76
|
+
* conflicts. The list is empty when each precondition holds.
|
|
77
|
+
*
|
|
78
|
+
* @param expected - The expected version of each id
|
|
79
|
+
* @param currentOf - The current state of an id, before the write
|
|
80
|
+
* @param versionOf - The version of an item
|
|
81
|
+
*/
|
|
82
|
+
export declare function versionConflicts<T>(expected: Iterable<readonly [string, string | null]>, currentOf: (id: string) => CurrentItem<T>, versionOf: VersionOf<T>): VersionConflict[];
|
|
83
|
+
/** The code of the error of a write with a precondition on a storage that cannot test it. */
|
|
84
|
+
export declare const PRECONDITION_NOT_SUPPORTED = "PRECONDITION_NOT_SUPPORTED";
|
|
85
|
+
/**
|
|
86
|
+
* The error of a write with a precondition on a storage that cannot test it: a storage without
|
|
87
|
+
* `versionOf`. The storage changes nothing. The error is a `TypeError` with the code
|
|
88
|
+
* `PRECONDITION_NOT_SUPPORTED`, so a sync does not take it for a network failure.
|
|
89
|
+
*
|
|
90
|
+
* @param storage - The name of the storage, for the message
|
|
91
|
+
* @param remedy - What makes the test possible
|
|
92
|
+
*/
|
|
93
|
+
export declare function preconditionNotSupported(storage: string, remedy?: string): TypeError & {
|
|
94
|
+
readonly code: string;
|
|
95
|
+
readonly retryable: false;
|
|
96
|
+
};
|
|
97
|
+
/** True for a value that a precondition can expect: a string of at most 1024 characters, or `null`. */
|
|
98
|
+
export declare function isExpectedVersion(value: unknown): value is string | null;
|
|
99
|
+
/**
|
|
100
|
+
* This function gives the conflicts of an error with the code `VERSION_CONFLICT`: the `conflicts`
|
|
101
|
+
* of a `VersionConflictError`, or the metadata key `conflicts` of an error from the wire (a
|
|
102
|
+
* `ClientError`). It gives undefined for another error. A `VERSION_CONFLICT` error without
|
|
103
|
+
* readable conflicts gives an empty list.
|
|
104
|
+
*/
|
|
105
|
+
export declare function versionConflictsOf(error: unknown): readonly VersionConflict[] | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* This function gives a `VersionConflictError` for an error with the code `VERSION_CONFLICT`, with
|
|
108
|
+
* its conflicts and its message. It gives undefined for another error.
|
|
109
|
+
*/
|
|
110
|
+
export declare function asVersionConflictError(error: unknown): VersionConflictError | undefined;
|
|
111
|
+
//# sourceMappingURL=precondition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"precondition.d.ts","sourceRoot":"","sources":["../../../src/procedures/collection/precondition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sFAAsF;AACtF,MAAM,W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