@econ-v1/domain 7.0.51 → 7.0.53
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.
|
@@ -9,12 +9,23 @@ export type DomainEvent = import("../events/index.js").DomainEvent;
|
|
|
9
9
|
* `run()` is provably independent of the local SQLite cache, such as in-memory
|
|
10
10
|
* state or a home-node round trip; those queries remain available in degraded
|
|
11
11
|
* mode when a browser cannot provide OPFS.
|
|
12
|
+
*
|
|
13
|
+
* `retryAfterMs` is how a definition that carries its own failure backoff
|
|
14
|
+
* asks the engine to come back on a timer. It is read after a rejected
|
|
15
|
+
* `run()` and returns milliseconds from now until the definition is willing
|
|
16
|
+
* to run again; `0` or an absent property schedules nothing. It exists
|
|
17
|
+
* because a definition whose `matchesInvalidation` gates on a backoff
|
|
18
|
+
* deadline DISCARDS the invalidations that arrive inside the window — including
|
|
19
|
+
* the single `connectivity.changed` edge published when a node comes back — so
|
|
20
|
+
* without a timer one transient failure is permanent for the life of the
|
|
21
|
+
* subscription.
|
|
12
22
|
*/
|
|
13
23
|
export type LiveQueryDefinition<TParams, TRow> = {
|
|
14
24
|
readonly invalidateOn: readonly KernelEventType[];
|
|
15
25
|
readonly matchesInvalidation?: (event: DomainEvent) => boolean;
|
|
16
26
|
readonly name: QueryName;
|
|
17
27
|
readonly requiresDurableStorage?: boolean;
|
|
28
|
+
readonly retryAfterMs?: () => number;
|
|
18
29
|
key(row: TRow): string;
|
|
19
30
|
run(params: TParams): Promise<readonly TRow[]>;
|
|
20
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-query-definition.d.ts","sourceRoot":"","sources":["../../src/models/live-query-definition.js"],"names":[],"mappings":"8BAGa,OAAO,oBAAoB,EAAE,eAAe;wBAG5C,OAAO,oBAAoB,EAAE,SAAS;0BAErC,OAAO,oBAAoB,EAAE,WAAW
|
|
1
|
+
{"version":3,"file":"live-query-definition.d.ts","sourceRoot":"","sources":["../../src/models/live-query-definition.js"],"names":[],"mappings":"8BAGa,OAAO,oBAAoB,EAAE,eAAe;wBAG5C,OAAO,oBAAoB,EAAE,SAAS;0BAErC,OAAO,oBAAoB,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;gCAoBzC,OAAO,EACP,IAAI,IACJ;IACZ,QAAY,CAAC,YAAY,EAAE,SAAS,eAAe,EAAE,CAAC;IACtD,QAAY,CAAC,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,OAAO,CAAC;IACnE,QAAY,CAAC,IAAI,EAAE,SAAS,CAAC;IAC7B,QAAY,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAC9C,QAAY,CAAC,YAAY,CAAC,EAAE,MAAM,MAAM,CAAC;IACrC,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC;IACvB,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;CAChD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@econ-v1/domain",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.53",
|
|
4
4
|
"description": "Platform-neutral domain contracts and errors for Node clients",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"author": "Node contributors",
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@econ-v1/ports": "7.0.
|
|
60
|
+
"@econ-v1/ports": "7.0.53"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -16,6 +16,16 @@
|
|
|
16
16
|
* state or a home-node round trip; those queries remain available in degraded
|
|
17
17
|
* mode when a browser cannot provide OPFS.
|
|
18
18
|
*
|
|
19
|
+
* `retryAfterMs` is how a definition that carries its own failure backoff
|
|
20
|
+
* asks the engine to come back on a timer. It is read after a rejected
|
|
21
|
+
* `run()` and returns milliseconds from now until the definition is willing
|
|
22
|
+
* to run again; `0` or an absent property schedules nothing. It exists
|
|
23
|
+
* because a definition whose `matchesInvalidation` gates on a backoff
|
|
24
|
+
* deadline DISCARDS the invalidations that arrive inside the window — including
|
|
25
|
+
* the single `connectivity.changed` edge published when a node comes back — so
|
|
26
|
+
* without a timer one transient failure is permanent for the life of the
|
|
27
|
+
* subscription.
|
|
28
|
+
*
|
|
19
29
|
* @template TParams
|
|
20
30
|
* @template TRow
|
|
21
31
|
* @typedef {{
|
|
@@ -23,6 +33,7 @@
|
|
|
23
33
|
* readonly matchesInvalidation?: (event: DomainEvent) => boolean;
|
|
24
34
|
* readonly name: QueryName;
|
|
25
35
|
* readonly requiresDurableStorage?: boolean;
|
|
36
|
+
* readonly retryAfterMs?: () => number;
|
|
26
37
|
* key(row: TRow): string;
|
|
27
38
|
* run(params: TParams): Promise<readonly TRow[]>;
|
|
28
39
|
* }} LiveQueryDefinition
|