@warp-drive/core 5.8.0-alpha.9 → 5.8.0-beta.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/README.md +22 -38
- package/declarations/configure.d.ts +1 -1
- package/declarations/graph/-private/-edge-definition.d.ts +12 -2
- package/declarations/index.d.ts +14 -9
- package/declarations/reactive/-private/default-mode.d.ts +1 -1
- package/declarations/reactive/-private/fields/extension.d.ts +1 -1
- package/declarations/reactive/-private/fields/managed-array.d.ts +2 -2
- package/declarations/reactive/-private/fields/managed-object.d.ts +1 -1
- package/declarations/reactive/-private/record.d.ts +10 -1
- package/declarations/reactive/-private.d.ts +1 -0
- package/declarations/reactive.d.ts +11 -7
- package/declarations/request/-private/types.d.ts +1 -1
- package/declarations/signals/-leaked.d.ts +2 -0
- package/declarations/signals/-private.d.ts +6 -0
- package/declarations/{store/-private/new-core-tmp → signals}/promise-state.d.ts +1 -1
- package/declarations/{store/-private/new-core-tmp → signals}/request-state.d.ts +6 -6
- package/declarations/{store/-private/new-core-tmp → signals}/request-subscription.d.ts +4 -4
- package/declarations/store/-private/cache-handler/types.d.ts +2 -16
- package/declarations/store/-private/caches/instance-cache.d.ts +1 -1
- package/declarations/store/-private/managers/cache-manager.d.ts +1 -14
- package/declarations/store/-private/managers/notification-manager.d.ts +1 -1
- package/declarations/store/-private/record-arrays/legacy-many-array.d.ts +1 -1
- package/declarations/store/-private/record-arrays/resource-array.d.ts +1 -1
- package/declarations/store/-private/store-service.d.ts +2 -2
- package/declarations/store/-private.d.ts +0 -6
- package/declarations/store/deprecated/-private.d.ts +2 -2
- package/declarations/store/deprecated/store.d.ts +1 -1
- package/declarations/store.d.ts +1 -0
- package/declarations/types/cache.d.ts +2 -2
- package/declarations/types/record.d.ts +132 -0
- package/declarations/types/request.d.ts +22 -8
- package/declarations/types/schema/fields.d.ts +26 -13
- package/declarations/types/schema/schema-service.d.ts +4 -4
- package/declarations/types/spec/document.d.ts +34 -0
- package/dist/configure-DPUFCemT.js +1940 -0
- package/dist/configure.js +2 -1
- package/dist/{request-oqoLC9rz.js → future-BKkJJkj7.js} +1 -48
- package/dist/graph/-private.js +15 -5
- package/dist/{index-B1cSRj-N.js → index-CQP2NSqg.js} +63 -1812
- package/dist/index.js +5 -5
- package/dist/reactive/-private.js +1 -1
- package/dist/reactive.js +4 -129
- package/dist/request.js +49 -1
- package/dist/signals/-leaked.js +1 -0
- package/dist/store/-private.js +1 -2
- package/dist/symbols-3C1OkYtZ.js +39 -0
- package/dist/types/-private.js +1 -1
- package/dist/types/record.js +127 -0
- package/dist/types/request.js +11 -7
- package/dist/unpkg/dev/-leaked-Co0EI6Go.js +1939 -0
- package/dist/unpkg/dev/build-config/babel-macros.js +1 -0
- package/dist/unpkg/dev/build-config/canary-features.js +1 -0
- package/dist/unpkg/dev/build-config/debugging.js +1 -0
- package/dist/unpkg/dev/build-config/deprecations.js +1 -0
- package/dist/unpkg/dev/build-config/env.js +1 -0
- package/dist/unpkg/dev/build-config/macros.js +1 -0
- package/dist/unpkg/dev/build-config.js +1 -0
- package/dist/unpkg/dev/configure.js +1 -0
- package/dist/unpkg/dev/future-DFfOzSoe.js +672 -0
- package/dist/unpkg/dev/graph/-private.js +3132 -0
- package/dist/unpkg/dev/index-BzcBOnw9.js +9392 -0
- package/dist/unpkg/dev/index.js +6 -0
- package/dist/unpkg/dev/reactive/-private.js +1 -0
- package/dist/unpkg/dev/reactive.js +3 -0
- package/dist/unpkg/dev/request.js +49 -0
- package/dist/unpkg/dev/runtime-E1M51_-O.js +135 -0
- package/dist/unpkg/dev/signals/-leaked.js +1 -0
- package/dist/unpkg/dev/store/-private.js +55 -0
- package/dist/unpkg/dev/store.js +558 -0
- package/dist/unpkg/dev/types/-private.js +69 -0
- package/dist/unpkg/dev/types/cache/aliases.js +0 -0
- package/dist/unpkg/dev/types/cache/change.js +0 -0
- package/dist/unpkg/dev/types/cache/mutations.js +0 -0
- package/dist/unpkg/dev/types/cache/operations.js +0 -0
- package/dist/unpkg/dev/types/cache/relationship.js +0 -0
- package/dist/unpkg/dev/types/cache.js +0 -0
- package/dist/unpkg/dev/types/graph.js +0 -0
- package/dist/unpkg/dev/types/identifier.js +61 -0
- package/dist/unpkg/dev/types/json/raw.js +0 -0
- package/dist/unpkg/dev/types/params.js +0 -0
- package/dist/unpkg/dev/types/record.js +191 -0
- package/dist/unpkg/dev/types/request.js +77 -0
- package/dist/unpkg/dev/types/runtime.js +34 -0
- package/dist/unpkg/dev/types/schema/concepts.js +0 -0
- package/dist/unpkg/dev/types/schema/fields.js +505 -0
- package/dist/unpkg/dev/types/schema/fields.type-test.js +0 -0
- package/dist/unpkg/dev/types/schema/schema-service.js +0 -0
- package/dist/unpkg/dev/types/spec/document.js +0 -0
- package/dist/unpkg/dev/types/spec/error.js +0 -0
- package/dist/unpkg/dev/types/spec/json-api-raw.js +0 -0
- package/dist/unpkg/dev/types/symbols.js +84 -0
- package/dist/unpkg/dev/types/utils.js +0 -0
- package/dist/unpkg/dev/types.js +0 -0
- package/dist/unpkg/dev/utils/string.js +91 -0
- package/dist/unpkg/dev-deprecated/-leaked-DjMeRqdU.js +1939 -0
- package/dist/unpkg/dev-deprecated/-private-3C1OkYtZ.js +39 -0
- package/dist/unpkg/dev-deprecated/build-config/babel-macros.js +1 -0
- package/dist/unpkg/dev-deprecated/build-config/canary-features.js +1 -0
- package/dist/unpkg/dev-deprecated/build-config/debugging.js +1 -0
- package/dist/unpkg/dev-deprecated/build-config/deprecations.js +1 -0
- package/dist/unpkg/dev-deprecated/build-config/env.js +1 -0
- package/dist/unpkg/dev-deprecated/build-config/macros.js +1 -0
- package/dist/unpkg/dev-deprecated/build-config.js +1 -0
- package/dist/unpkg/dev-deprecated/configure.js +1 -0
- package/dist/unpkg/dev-deprecated/future-DFfOzSoe.js +672 -0
- package/dist/unpkg/dev-deprecated/graph/-private.js +3327 -0
- package/dist/unpkg/dev-deprecated/index-6TnTv-WG.js +10007 -0
- package/dist/unpkg/dev-deprecated/index.js +5 -0
- package/dist/unpkg/dev-deprecated/reactive/-private.js +1 -0
- package/dist/unpkg/dev-deprecated/reactive.js +3 -0
- package/dist/unpkg/dev-deprecated/request.js +49 -0
- package/dist/unpkg/dev-deprecated/runtime-DAu5b0IR.js +135 -0
- package/dist/unpkg/dev-deprecated/signals/-leaked.js +1 -0
- package/dist/unpkg/dev-deprecated/store/-private.js +1 -0
- package/dist/unpkg/dev-deprecated/store.js +558 -0
- package/dist/unpkg/dev-deprecated/types/-private.js +69 -0
- package/dist/unpkg/dev-deprecated/types/cache/aliases.js +0 -0
- package/dist/unpkg/dev-deprecated/types/cache/change.js +0 -0
- package/dist/unpkg/dev-deprecated/types/cache/mutations.js +0 -0
- package/dist/unpkg/dev-deprecated/types/cache/operations.js +0 -0
- package/dist/unpkg/dev-deprecated/types/cache/relationship.js +0 -0
- package/dist/unpkg/dev-deprecated/types/cache.js +0 -0
- package/dist/unpkg/dev-deprecated/types/graph.js +0 -0
- package/dist/unpkg/dev-deprecated/types/identifier.js +61 -0
- package/dist/unpkg/dev-deprecated/types/json/raw.js +0 -0
- package/dist/unpkg/dev-deprecated/types/params.js +0 -0
- package/dist/unpkg/dev-deprecated/types/record.js +191 -0
- package/dist/unpkg/dev-deprecated/types/request.js +77 -0
- package/dist/unpkg/dev-deprecated/types/runtime.js +34 -0
- package/dist/unpkg/dev-deprecated/types/schema/concepts.js +0 -0
- package/dist/unpkg/dev-deprecated/types/schema/fields.js +505 -0
- package/dist/unpkg/dev-deprecated/types/schema/fields.type-test.js +0 -0
- package/dist/unpkg/dev-deprecated/types/schema/schema-service.js +0 -0
- package/dist/unpkg/dev-deprecated/types/spec/document.js +0 -0
- package/dist/unpkg/dev-deprecated/types/spec/error.js +0 -0
- package/dist/unpkg/dev-deprecated/types/spec/json-api-raw.js +0 -0
- package/dist/unpkg/dev-deprecated/types/symbols.js +84 -0
- package/dist/unpkg/dev-deprecated/types/utils.js +0 -0
- package/dist/unpkg/dev-deprecated/types.js +0 -0
- package/dist/unpkg/dev-deprecated/utils/string.js +91 -0
- package/dist/unpkg/prod/-leaked-DUONXQDB.js +1676 -0
- package/dist/unpkg/prod/-private-sql1_mdx.js +39 -0
- package/dist/unpkg/prod/build-config/babel-macros.js +1 -0
- package/dist/unpkg/prod/build-config/canary-features.js +1 -0
- package/dist/unpkg/prod/build-config/debugging.js +1 -0
- package/dist/unpkg/prod/build-config/deprecations.js +1 -0
- package/dist/unpkg/prod/build-config/env.js +1 -0
- package/dist/unpkg/prod/build-config/macros.js +1 -0
- package/dist/unpkg/prod/build-config.js +1 -0
- package/dist/unpkg/prod/configure.js +2 -0
- package/dist/unpkg/prod/graph/-private.js +2235 -0
- package/dist/unpkg/prod/handler-EU_8ncB2.js +1619 -0
- package/dist/unpkg/prod/index.js +483 -0
- package/dist/unpkg/prod/promise-cache-DIT8Ypjq.js +19 -0
- package/dist/unpkg/prod/reactive/-private.js +1 -0
- package/dist/unpkg/prod/reactive.js +30 -0
- package/dist/unpkg/prod/request-BrJSCG6r.js +421 -0
- package/dist/unpkg/prod/request.js +2 -0
- package/dist/unpkg/prod/schema-BSkHyoWz.js +5219 -0
- package/dist/unpkg/prod/signals/-leaked.js +1 -0
- package/dist/unpkg/prod/store/-private.js +126 -0
- package/dist/unpkg/prod/store.js +437 -0
- package/dist/unpkg/prod/types/-private.js +49 -0
- package/dist/unpkg/prod/types/cache/aliases.js +0 -0
- package/dist/unpkg/prod/types/cache/change.js +0 -0
- package/dist/unpkg/prod/types/cache/mutations.js +0 -0
- package/dist/unpkg/prod/types/cache/operations.js +0 -0
- package/dist/unpkg/prod/types/cache/relationship.js +0 -0
- package/dist/unpkg/prod/types/cache.js +0 -0
- package/dist/unpkg/prod/types/graph.js +0 -0
- package/dist/unpkg/prod/types/identifier.js +61 -0
- package/dist/unpkg/prod/types/json/raw.js +0 -0
- package/dist/unpkg/prod/types/params.js +0 -0
- package/dist/unpkg/prod/types/record.js +191 -0
- package/dist/unpkg/prod/types/request.js +77 -0
- package/dist/unpkg/prod/types/runtime.js +34 -0
- package/dist/unpkg/prod/types/schema/concepts.js +0 -0
- package/dist/unpkg/prod/types/schema/fields.js +505 -0
- package/dist/unpkg/prod/types/schema/fields.type-test.js +0 -0
- package/dist/unpkg/prod/types/schema/schema-service.js +0 -0
- package/dist/unpkg/prod/types/spec/document.js +0 -0
- package/dist/unpkg/prod/types/spec/error.js +0 -0
- package/dist/unpkg/prod/types/spec/json-api-raw.js +0 -0
- package/dist/unpkg/prod/types/symbols.js +84 -0
- package/dist/unpkg/prod/types/utils.js +0 -0
- package/dist/unpkg/prod/types.js +0 -0
- package/dist/unpkg/prod/utils/string.js +72 -0
- package/dist/unpkg/prod-deprecated/-leaked-DRNv9VIX.js +1676 -0
- package/dist/unpkg/prod-deprecated/-private-3C1OkYtZ.js +39 -0
- package/dist/unpkg/prod-deprecated/build-config/babel-macros.js +1 -0
- package/dist/unpkg/prod-deprecated/build-config/canary-features.js +1 -0
- package/dist/unpkg/prod-deprecated/build-config/debugging.js +1 -0
- package/dist/unpkg/prod-deprecated/build-config/deprecations.js +1 -0
- package/dist/unpkg/prod-deprecated/build-config/env.js +1 -0
- package/dist/unpkg/prod-deprecated/build-config/macros.js +1 -0
- package/dist/unpkg/prod-deprecated/build-config.js +1 -0
- package/dist/unpkg/prod-deprecated/configure.js +2 -0
- package/dist/unpkg/prod-deprecated/graph/-private.js +2408 -0
- package/dist/unpkg/prod-deprecated/handler-CCIu4sQ3.js +334 -0
- package/dist/unpkg/prod-deprecated/hooks-Dv4Np0MY.js +26 -0
- package/dist/unpkg/prod-deprecated/index.js +483 -0
- package/dist/unpkg/prod-deprecated/promise-cache-DIT8Ypjq.js +19 -0
- package/dist/unpkg/prod-deprecated/reactive/-private.js +1 -0
- package/dist/unpkg/prod-deprecated/reactive.js +5 -0
- package/dist/unpkg/prod-deprecated/request-BrJSCG6r.js +421 -0
- package/dist/unpkg/prod-deprecated/request.js +2 -0
- package/dist/unpkg/prod-deprecated/schema-CJcjHv0E.js +6939 -0
- package/dist/unpkg/prod-deprecated/signals/-leaked.js +1 -0
- package/dist/unpkg/prod-deprecated/store/-private.js +88 -0
- package/dist/unpkg/prod-deprecated/store.js +437 -0
- package/dist/unpkg/prod-deprecated/types/-private.js +49 -0
- package/dist/unpkg/prod-deprecated/types/cache/aliases.js +0 -0
- package/dist/unpkg/prod-deprecated/types/cache/change.js +0 -0
- package/dist/unpkg/prod-deprecated/types/cache/mutations.js +0 -0
- package/dist/unpkg/prod-deprecated/types/cache/operations.js +0 -0
- package/dist/unpkg/prod-deprecated/types/cache/relationship.js +0 -0
- package/dist/unpkg/prod-deprecated/types/cache.js +0 -0
- package/dist/unpkg/prod-deprecated/types/graph.js +0 -0
- package/dist/unpkg/prod-deprecated/types/identifier.js +61 -0
- package/dist/unpkg/prod-deprecated/types/json/raw.js +0 -0
- package/dist/unpkg/prod-deprecated/types/params.js +0 -0
- package/dist/unpkg/prod-deprecated/types/record.js +191 -0
- package/dist/unpkg/prod-deprecated/types/request.js +77 -0
- package/dist/unpkg/prod-deprecated/types/runtime.js +34 -0
- package/dist/unpkg/prod-deprecated/types/schema/concepts.js +0 -0
- package/dist/unpkg/prod-deprecated/types/schema/fields.js +505 -0
- package/dist/unpkg/prod-deprecated/types/schema/fields.type-test.js +0 -0
- package/dist/unpkg/prod-deprecated/types/schema/schema-service.js +0 -0
- package/dist/unpkg/prod-deprecated/types/spec/document.js +0 -0
- package/dist/unpkg/prod-deprecated/types/spec/error.js +0 -0
- package/dist/unpkg/prod-deprecated/types/spec/json-api-raw.js +0 -0
- package/dist/unpkg/prod-deprecated/types/symbols.js +84 -0
- package/dist/unpkg/prod-deprecated/types/utils.js +0 -0
- package/dist/unpkg/prod-deprecated/types.js +0 -0
- package/dist/unpkg/prod-deprecated/utils/string.js +72 -0
- package/logos/README.md +2 -2
- package/logos/logo-yellow-slab.svg +1 -0
- package/logos/word-mark-black.svg +1 -0
- package/logos/word-mark-white.svg +1 -0
- package/package.json +11 -3
- package/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +0 -24
- package/dist/configure-C3x8YXzL.js +0 -181
- package/logos/NCC-1701-a-blue.svg +0 -4
- package/logos/NCC-1701-a-gold.svg +0 -4
- package/logos/NCC-1701-a-gold_100.svg +0 -1
- package/logos/NCC-1701-a-gold_base-64.txt +0 -1
- package/logos/NCC-1701-a.svg +0 -4
- package/logos/docs-badge.svg +0 -2
- package/logos/ember-data-logo-dark.svg +0 -12
- package/logos/ember-data-logo-light.svg +0 -12
- package/logos/social1.png +0 -0
- package/logos/social2.png +0 -0
- package/logos/warp-drive-logo-dark.svg +0 -4
- package/logos/warp-drive-logo-gold.svg +0 -4
- /package/declarations/{store/-private/new-core-tmp → signals}/reactivity/configure.d.ts +0 -0
- /package/declarations/{store/-private/new-core-tmp → signals}/reactivity/internal.d.ts +0 -0
- /package/declarations/{store/-private/new-core-tmp → signals}/reactivity/signal.d.ts +0 -0
- /package/dist/{symbols-sql1_mdx.js → unpkg/dev/-private-sql1_mdx.js} +0 -0
package/README.md
CHANGED
|
@@ -1,52 +1,44 @@
|
|
|
1
|
-
<
|
|
2
|
-
<img
|
|
3
|
-
class="project-logo light-only"
|
|
4
|
-
src="./logos/github-header.svg#gh-light-mode-only"
|
|
5
|
-
alt="WarpDrive | Boldly go where no app has gone before"
|
|
6
|
-
title="WarpDrive | Boldly go where no app has gone before"
|
|
7
|
-
/>
|
|
1
|
+
<p align="center">
|
|
8
2
|
<img
|
|
9
|
-
class="project-logo
|
|
10
|
-
src="./logos/
|
|
11
|
-
alt="WarpDrive
|
|
12
|
-
|
|
3
|
+
class="project-logo"
|
|
4
|
+
src="./logos/logo-yellow-slab.svg"
|
|
5
|
+
alt="WarpDrive"
|
|
6
|
+
width="180px"
|
|
7
|
+
title="WarpDrive"
|
|
13
8
|
/>
|
|
14
|
-
</
|
|
9
|
+
</p>
|
|
15
10
|
|
|
16
|
-
](https://discord.gg/zT3asNS
|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+
[](https://discord.gg/zT3asNS
|
|
21
15
|
)
|
|
22
|
-
[](https://discord.gg/PHBbnWJx5S
|
|
23
17
|
)
|
|
24
18
|
|
|
25
|
-
|
|
26
19
|
<p align="center">
|
|
27
20
|
<br>
|
|
28
|
-
<a href="https://warp-drive.io">WarpDrive</a> is
|
|
21
|
+
<a href="https://warp-drive.io">WarpDrive</a> is the lightweight data library for web apps —
|
|
29
22
|
<br>
|
|
30
23
|
universal, typed, reactive, and ready to scale.
|
|
31
|
-
<br
|
|
32
|
-
<br>
|
|
24
|
+
<br/><br/>
|
|
33
25
|
</p>
|
|
34
26
|
|
|
35
|
-
|
|
36
|
-
rich
|
|
27
|
+
***Warp*Drive** makes it easy to build scalable, fast, feature
|
|
28
|
+
rich applications — letting you ship better experiences more quickly without re-architecting your app or API. ***Warp*Drive** is:
|
|
37
29
|
|
|
30
|
+
- 🌌 Seamless Reactivity in any Framework
|
|
38
31
|
- ⚡️ Committed to Best-In-Class Performance
|
|
39
|
-
- 🌲 Focused on being as svelte as possible
|
|
40
|
-
- 🚀 SSR Ready
|
|
41
32
|
- 💚 Typed
|
|
42
|
-
-
|
|
43
|
-
-
|
|
33
|
+
- ⚛️ Works with any API
|
|
34
|
+
- 🌲 Focused on being as tiny as possible
|
|
35
|
+
- 🚀 SSR Ready
|
|
44
36
|
- 🐹 Built with ♥️ by [Ember](https://emberjs.com)
|
|
45
37
|
|
|
46
38
|
<br>
|
|
47
39
|
<br>
|
|
48
40
|
|
|
49
|
-
*Get Started* → [Guides](
|
|
41
|
+
*Get Started* → [Guides](https://warp-drive.io/guides/)
|
|
50
42
|
|
|
51
43
|
<br>
|
|
52
44
|
|
|
@@ -54,17 +46,9 @@ rich application — letting you ship better experiences more quickly withou
|
|
|
54
46
|
|
|
55
47
|
<br>
|
|
56
48
|
|
|
57
|
-
## Installation
|
|
58
|
-
|
|
59
|
-
```sh
|
|
60
|
-
pnpm add -E @warp-drive/core@latest
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
<br>
|
|
64
|
-
|
|
65
49
|
## Code of Conduct
|
|
66
50
|
|
|
67
|
-
Refer to the [Code of Conduct](https://github.com/
|
|
51
|
+
Refer to the [Code of Conduct](https://github.com/warp-drive-data/warp-drive/blob/main/CODE_OF_CONDUCT.md) for community guidelines and inclusivity.
|
|
68
52
|
|
|
69
53
|
<br>
|
|
70
54
|
|
|
@@ -75,10 +75,15 @@ export declare function temporaryConvertToLegacy(field: ResourceField | Collecti
|
|
|
75
75
|
export interface UpgradedMeta {
|
|
76
76
|
kind: "implicit" | RelationshipFieldKind;
|
|
77
77
|
/**
|
|
78
|
-
* The field
|
|
78
|
+
* The field sourceKey on `this` record,
|
|
79
|
+
* name if sourceKey is not set.
|
|
79
80
|
*/
|
|
80
81
|
key: string;
|
|
81
82
|
/**
|
|
83
|
+
* The field name on `this` record
|
|
84
|
+
*/
|
|
85
|
+
name: string;
|
|
86
|
+
/**
|
|
82
87
|
* The `type` of the related record
|
|
83
88
|
*
|
|
84
89
|
*/
|
|
@@ -91,10 +96,15 @@ export interface UpgradedMeta {
|
|
|
91
96
|
isLinksMode: boolean;
|
|
92
97
|
inverseKind: "implicit" | RelationshipFieldKind;
|
|
93
98
|
/**
|
|
94
|
-
* The field
|
|
99
|
+
* The field sourceKey on the opposing record,
|
|
100
|
+
* name if sourceKey is not set.
|
|
95
101
|
*/
|
|
96
102
|
inverseKey: string;
|
|
97
103
|
/**
|
|
104
|
+
* The field name on the opposing record,
|
|
105
|
+
*/
|
|
106
|
+
inverseName: string;
|
|
107
|
+
/**
|
|
98
108
|
* The `type` of `this` record
|
|
99
109
|
*/
|
|
100
110
|
inverseType: string;
|
package/declarations/index.d.ts
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module
|
|
3
|
-
* @mergeModuleWith <project>
|
|
4
|
-
*/
|
|
5
1
|
import type { CAUTION_MEGA_DANGER_ZONE_Extension } from "./reactive.js";
|
|
6
2
|
import type { ReactiveDocument } from "./reactive/-private/document.js";
|
|
7
3
|
import type { Handler } from "./request.js";
|
|
8
4
|
import { Fetch } from "./request/-private/fetch.js";
|
|
9
5
|
import { RequestManager } from "./request/-private/manager.js";
|
|
10
6
|
import { CacheHandler, type CachePolicy, Store } from "./store/-private.js";
|
|
7
|
+
import { recordIdentifierFor } from "./store/-private.js";
|
|
11
8
|
import type { CacheCapabilitiesManager } from "./types.js";
|
|
12
9
|
import type { Cache } from "./types/cache.js";
|
|
13
10
|
import type { Derivation, HashFn, Transformation } from "./types/schema/concepts.js";
|
|
14
11
|
import type { ObjectSchema, PolarisResourceSchema, Trait } from "./types/schema/fields.js";
|
|
12
|
+
export { recordIdentifierFor, recordIdentifierFor as cacheKeyFor };
|
|
15
13
|
export { Fetch, RequestManager };
|
|
16
14
|
export { Store, CacheHandler, type CachePolicy };
|
|
17
|
-
export { type StoreRequestContext, type StoreRequestInput,
|
|
15
|
+
export { type StoreRequestContext, type StoreRequestInput, storeFor } from "./store/-private.js";
|
|
18
16
|
/**
|
|
19
|
-
* @deprecated use
|
|
17
|
+
* @deprecated use {@link ReactiveDocument} instead
|
|
20
18
|
*/
|
|
21
19
|
export type Document<T> = ReactiveDocument<T>;
|
|
22
20
|
export type { DocumentCacheOperation, CacheOperation, NotificationType } from "./store/-private/managers/notification-manager.js";
|
|
@@ -24,11 +22,11 @@ export { setIdentifierGenerationMethod, setIdentifierUpdateMethod, setIdentifier
|
|
|
24
22
|
/**
|
|
25
23
|
* Options for setting up a Store instance with `useRecommendedStore`.
|
|
26
24
|
*/
|
|
27
|
-
export interface StoreSetupOptions {
|
|
25
|
+
export interface StoreSetupOptions<T extends Cache = Cache> {
|
|
28
26
|
/**
|
|
29
27
|
* The Cache implementation to use
|
|
30
28
|
*/
|
|
31
|
-
cache: new (capabilities: CacheCapabilitiesManager) =>
|
|
29
|
+
cache: new (capabilities: CacheCapabilitiesManager) => T;
|
|
32
30
|
/**
|
|
33
31
|
* The Cache policy to use.
|
|
34
32
|
*
|
|
@@ -74,6 +72,11 @@ export interface StoreSetupOptions {
|
|
|
74
72
|
*/
|
|
75
73
|
CAUTION_MEGA_DANGER_ZONE_extensions?: CAUTION_MEGA_DANGER_ZONE_Extension[];
|
|
76
74
|
}
|
|
75
|
+
export declare class ConfiguredStore<T extends {
|
|
76
|
+
cache: Cache;
|
|
77
|
+
}> extends Store {
|
|
78
|
+
createCache(capabilities: CacheCapabilitiesManager): T["cache"];
|
|
79
|
+
}
|
|
77
80
|
/**
|
|
78
81
|
* Creates a configured Store class with recommended defaults
|
|
79
82
|
* for schema handling, reactivity, caching, and request management.
|
|
@@ -88,4 +91,6 @@ export interface StoreSetupOptions {
|
|
|
88
91
|
* });
|
|
89
92
|
* ```
|
|
90
93
|
*/
|
|
91
|
-
export declare function useRecommendedStore(options: StoreSetupOptions
|
|
94
|
+
export declare function useRecommendedStore<T extends Cache>(options: StoreSetupOptions<T>, StoreKlass?: typeof Store): typeof ConfiguredStore<{
|
|
95
|
+
cache: T;
|
|
96
|
+
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { SignalStore } from "../../signals/-private.js";
|
|
1
2
|
import type { Store } from "../../store/-private.js";
|
|
2
|
-
import type { SignalStore } from "../../store/-private/new-core-tmp/reactivity/internal.js";
|
|
3
3
|
import type { ResourceKey } from "../../types.js";
|
|
4
4
|
import type { FieldSchema, HashField, IdentityField, SchemaArrayField, SchemaObjectField } from "../../types/schema/fields.js";
|
|
5
5
|
import type { ReactiveResource } from "./record.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SignalStore, WarpDriveSignal } from "../../../
|
|
1
|
+
import type { SignalStore, WarpDriveSignal } from "../../../signals/-private.js";
|
|
2
2
|
import type { ExtensionDef } from "../schema.js";
|
|
3
3
|
export type ProxiedMethod = (...args: unknown[]) => unknown;
|
|
4
4
|
export declare function expectNever(value: never): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WarpDriveSignal } from "../../../
|
|
2
|
-
import { ARRAY_SIGNAL } from "../../../
|
|
1
|
+
import type { WarpDriveSignal } from "../../../signals/-private.js";
|
|
2
|
+
import { ARRAY_SIGNAL } from "../../../signals/-private.js";
|
|
3
3
|
import type { ResourceKey } from "../../../types/identifier.js";
|
|
4
4
|
import type { ArrayField, SchemaArrayField } from "../../../types/schema/fields.js";
|
|
5
5
|
import type { KindContext } from "../default-mode.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OBJECT_SIGNAL, type WarpDriveSignal } from "../../../
|
|
1
|
+
import { OBJECT_SIGNAL, type WarpDriveSignal } from "../../../signals/-private.js";
|
|
2
2
|
import type { ObjectField, SchemaObjectField } from "../../../types/schema/fields.js";
|
|
3
3
|
import type { KindContext } from "../default-mode.js";
|
|
4
4
|
import type { ReactiveResource } from "../record.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ObjectContext, ResourceContext } from "./default-mode.js";
|
|
2
|
-
import { Checkout } from "./symbols.js";
|
|
2
|
+
import { Checkout, Context } from "./symbols.js";
|
|
3
3
|
export interface ReactiveResource {
|
|
4
4
|
/**
|
|
5
5
|
* Create an editable copy of the record
|
|
@@ -21,6 +21,15 @@ export interface ReactiveResource {
|
|
|
21
21
|
[Checkout]<T>(): Promise<T>;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
export interface PrivateReactiveResource extends ReactiveResource {
|
|
27
|
+
/**
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
[Context]: ObjectContext | ResourceContext;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
24
33
|
* A class that uses a the ResourceSchema for a ResourceType
|
|
25
34
|
* and a ResourceKey to transform data from the cache into a rich, reactive
|
|
26
35
|
* object.
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* reactive representations of the raw data for requests, resources and their relationships
|
|
6
6
|
* stored in the cache.
|
|
7
7
|
*
|
|
8
|
-
* - For configuring the store to use these reactive objects, see [The Setup Guide](/guides/
|
|
9
|
-
* - For defining resource schemas, see [The Schema Guide](/guides)
|
|
8
|
+
* - For configuring the store to use these reactive objects, see [The Setup Guide](/guides/configuration/)
|
|
9
|
+
* - For defining resource schemas, see [The Schema Guide](/guides/the-manual/schemas/)
|
|
10
10
|
*
|
|
11
11
|
* Any method that returns a record instance will use the `instantiateRecord`
|
|
12
12
|
* hook configured above to instantiate a ReactiveResource once this is in place.
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* - local changes immediately reflect app wide
|
|
27
27
|
* - records have all the APIs of Model (references, state props, currentState, methods etc)
|
|
28
28
|
* - the continued use of `@warp-drive/legacy` is required (though most imports from it can be removed)
|
|
29
|
-
* - `async: true` relationships are supported (but not recommended outside of [LinksMode](
|
|
29
|
+
* - `async: true` relationships are supported (but not recommended outside of [LinksMode](/guides/the-manual/misc/links-mode.md))
|
|
30
30
|
*
|
|
31
31
|
* ---
|
|
32
32
|
*
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* - local changes are isolated until committed, displaying only via the editable version of the record
|
|
39
39
|
* - records have a more limited API, focused on only what is in their schema.
|
|
40
40
|
* - some common operations may have more friction to perform because intended utilities are not yet available
|
|
41
|
-
* - `async: true` relationships are not supported (see [LinksMode](
|
|
41
|
+
* - `async: true` relationships are not supported (see [LinksMode](/guides/the-manual/misc/links-mode.md))
|
|
42
42
|
* - The `@warp-drive/legacy` package is not required
|
|
43
43
|
*
|
|
44
44
|
* These modes are interopable. The reactive object (record) for a resource in PolarisMode can relate to
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* reactive form is controlled by a resource schema.
|
|
57
57
|
*
|
|
58
58
|
* For instance, lets say your API is a [{json:api}](https://jsonapi.org) and your store is using
|
|
59
|
-
* the Cache provided by
|
|
59
|
+
* the Cache provided by {@link @warp-drive/json-api! | @warp-drive/json-api}, and a request
|
|
60
60
|
* returns the following raw data:
|
|
61
61
|
*
|
|
62
62
|
* ```ts
|
|
@@ -278,5 +278,9 @@ export { commit, type ReactiveResource } from "./reactive/-private/record.js";
|
|
|
278
278
|
export { checkout };
|
|
279
279
|
export { Checkout } from "./reactive/-private/symbols.js";
|
|
280
280
|
export { type ReactiveDocument, type ReactiveDataDocument, type ReactiveErrorDocument } from "./reactive/-private/document.js";
|
|
281
|
-
export {
|
|
282
|
-
export {
|
|
281
|
+
export { createRequestSubscription, getRequestState, type RequestSubscription, type RequestLoadingState, type RequestState } from "./signals/-private.js";
|
|
282
|
+
export { getPromiseState, type PromiseState, type ResolvedPromise, type RejectedPromise, type PendingPromise } from "./signals/-private.js";
|
|
283
|
+
export type { LegacyLiveArray } from "./store/-private/record-arrays/legacy-live-array.js";
|
|
284
|
+
export type { LegacyManyArray } from "./store/-private/record-arrays/legacy-many-array.js";
|
|
285
|
+
export type { LegacyQueryArray } from "./store/-private/record-arrays/legacy-query.js";
|
|
286
|
+
export type { ReactiveResourceArray } from "./store/-private/record-arrays/resource-array.js";
|
|
@@ -27,7 +27,7 @@ export type DeferredStream = {
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* A Future is a {@link Promise} which resolves
|
|
30
|
+
* A Future is a {@link Promise} which resolves or rejects with a {@link StructuredDocument}
|
|
31
31
|
* while providing the ability to {@link Future.abort | abort} the underlying request, and
|
|
32
32
|
* {@link Future.getStream | access the response stream} before the outer promise resolves;
|
|
33
33
|
*
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { defineNonEnumerableSignal, defineGate, defineSignal, entangleSignal, signal, waitFor, gate, DISPOSE, memoized, notifyInternalSignal, peekInternalSignal, withSignalStore } from "./-private.js";
|
|
2
|
+
export type { AutorefreshBehaviorCombos, SubscriptionArgs, ContentFeatures, RecoveryFeatures, RequestArgs } from "./-private.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DISPOSE, createRequestSubscription, type RequestArgs, type SubscriptionArgs, type RequestComponentArgs, type RequestSubscription, type ContentFeatures, type RecoveryFeatures, type AutorefreshBehaviorCombos, type AutorefreshBehaviorType } from "./request-subscription.js";
|
|
2
|
+
export { getRequestState, type RequestLoadingState, type RequestState } from "./request-state.js";
|
|
3
|
+
export { getPromiseState, type PromiseState, type ResolvedPromise, type RejectedPromise, type PendingPromise } from "./promise-state.js";
|
|
4
|
+
export { setupSignals, type HooksOptions, type SignalHooks, waitFor, willSyncFlushWatchers } from "./reactivity/configure.js";
|
|
5
|
+
export { signal, memoized, gate, entangleSignal, entangleInitiallyStaleSignal, defineSignal, defineGate, defineNonEnumerableSignal, createSignalDescriptor } from "./reactivity/signal.js";
|
|
6
|
+
export { type SignalStore, ARRAY_SIGNAL, OBJECT_SIGNAL, Signals, type WarpDriveSignal, peekInternalSignal, createInternalMemo, withSignalStore, notifyInternalSignal, consumeInternalSignal, getOrCreateInternalSignal, createInternalSignal } from "./reactivity/internal.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Future } from "
|
|
2
|
-
import type { ImmutableRequestInfo, ResponseInfo, StructuredErrorDocument } from "
|
|
1
|
+
import type { Future } from "../request.js";
|
|
2
|
+
import type { ImmutableRequestInfo, ResponseInfo, StructuredErrorDocument } from "../types/request.js";
|
|
3
3
|
import type { PendingPromise, RejectedPromise, ResolvedPromise } from "./promise-state.js";
|
|
4
4
|
/**
|
|
5
5
|
* Lazily consumes the stream of a request, providing a number of
|
|
@@ -308,14 +308,14 @@ export interface PrivateRequestState {
|
|
|
308
308
|
* - {@link CancelledRequest}
|
|
309
309
|
*
|
|
310
310
|
*/
|
|
311
|
-
export type
|
|
311
|
+
export type RequestState<
|
|
312
312
|
RT = unknown,
|
|
313
313
|
E extends StructuredErrorDocument = StructuredErrorDocument
|
|
314
314
|
> = PendingRequest | ResolvedRequest<RT> | RejectedRequest<RT, E> | CancelledRequest<RT, E>;
|
|
315
315
|
export declare function createRequestState<
|
|
316
316
|
RT,
|
|
317
317
|
E
|
|
318
|
-
>(future: Future<RT>): Readonly<
|
|
318
|
+
>(future: Future<RT>): Readonly<RequestState<RT, StructuredErrorDocument<E>>>;
|
|
319
319
|
/**
|
|
320
320
|
* `getRequestState` can be used in both JavaScript and Template contexts.
|
|
321
321
|
*
|
|
@@ -362,11 +362,11 @@ export declare function createRequestState<
|
|
|
362
362
|
* ```
|
|
363
363
|
*
|
|
364
364
|
* If looking to use in a template, consider also the `<Request />` component
|
|
365
|
-
* which offers a
|
|
365
|
+
* which offers a number of additional capabilities for requests *beyond* what
|
|
366
366
|
* `RequestState` provides.
|
|
367
367
|
*
|
|
368
368
|
*/
|
|
369
369
|
export declare function getRequestState<
|
|
370
370
|
RT,
|
|
371
371
|
E
|
|
372
|
-
>(future: Future<RT>): Readonly<
|
|
372
|
+
>(future: Future<RT>): Readonly<RequestState<RT, StructuredErrorDocument<E>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { RequestManager, Store, StoreRequestInput } from "
|
|
2
|
-
import type { Future } from "
|
|
3
|
-
import type { StructuredErrorDocument } from "
|
|
4
|
-
import type { RequestState } from "
|
|
1
|
+
import type { RequestManager, Store, StoreRequestInput } from "../index.js";
|
|
2
|
+
import type { Future } from "../request.js";
|
|
3
|
+
import type { StructuredErrorDocument } from "../types/request.js";
|
|
4
|
+
import type { RequestState } from "./request-state.js";
|
|
5
5
|
export declare const DISPOSE: "(symbol) dispose";
|
|
6
6
|
export type AutorefreshBehaviorType = "online" | "interval" | "invalid";
|
|
7
7
|
export type AutorefreshBehaviorCombos = boolean | AutorefreshBehaviorType | `${AutorefreshBehaviorType},${AutorefreshBehaviorType}` | `${AutorefreshBehaviorType},${AutorefreshBehaviorType},${AutorefreshBehaviorType}`;
|
|
@@ -12,7 +12,6 @@ import type { Store } from "../store-service.js";
|
|
|
12
12
|
* Implementing this service allows you to programatically define
|
|
13
13
|
* when a request should be considered expired.
|
|
14
14
|
*
|
|
15
|
-
* @class (Interface) CachePolicy
|
|
16
15
|
* @public
|
|
17
16
|
*/
|
|
18
17
|
export interface CachePolicy {
|
|
@@ -27,9 +26,7 @@ export interface CachePolicy {
|
|
|
27
26
|
* and the cache will be updated before returning the response.
|
|
28
27
|
*
|
|
29
28
|
* @public
|
|
30
|
-
* @
|
|
31
|
-
* @param {Store} store
|
|
32
|
-
* @return {Boolean} true if the request is considered hard expired
|
|
29
|
+
* @return true if the request is considered hard expired
|
|
33
30
|
*/
|
|
34
31
|
isHardExpired(identifier: RequestKey, store: Store): boolean;
|
|
35
32
|
/**
|
|
@@ -42,9 +39,7 @@ export interface CachePolicy {
|
|
|
42
39
|
* request is made to update the cache via the configured request handlers.
|
|
43
40
|
*
|
|
44
41
|
* @public
|
|
45
|
-
* @
|
|
46
|
-
* @param {Store} store
|
|
47
|
-
* @return {Boolean} true if the request is considered soft expired
|
|
42
|
+
* @return true if the request is considered soft expired
|
|
48
43
|
*/
|
|
49
44
|
isSoftExpired(identifier: RequestKey, store: Store): boolean;
|
|
50
45
|
/**
|
|
@@ -54,10 +49,6 @@ export interface CachePolicy {
|
|
|
54
49
|
* Note, this is invoked regardless of whether the request has a cache-key.
|
|
55
50
|
*
|
|
56
51
|
* @public
|
|
57
|
-
* @param {ImmutableRequestInfo} request
|
|
58
|
-
* @param {RequestKey | null} identifier
|
|
59
|
-
* @param {Store} store
|
|
60
|
-
* @return {void}
|
|
61
52
|
*/
|
|
62
53
|
willRequest?(request: ImmutableRequestInfo, identifier: RequestKey | null, store: Store): void;
|
|
63
54
|
/**
|
|
@@ -88,11 +79,6 @@ export interface CachePolicy {
|
|
|
88
79
|
*
|
|
89
80
|
*
|
|
90
81
|
* @public
|
|
91
|
-
* @param {ImmutableRequestInfo} request
|
|
92
|
-
* @param {ImmutableResponse} response
|
|
93
|
-
* @param {RequestKey | null} identifier
|
|
94
|
-
* @param {Store} store
|
|
95
|
-
* @return {void}
|
|
96
82
|
*/
|
|
97
83
|
didRequest?(request: ImmutableRequestInfo, response: Response | ResponseInfo | null, identifier: RequestKey | null, store: Store): void;
|
|
98
84
|
}
|
|
@@ -12,7 +12,7 @@ Retrieves the unique referentially-stable {@link ResourceKey}
|
|
|
12
12
|
assigned to the given record instance.
|
|
13
13
|
|
|
14
14
|
```js
|
|
15
|
-
import { recordIdentifierFor } from "@
|
|
15
|
+
import { recordIdentifierFor } from "@warp-drive/core";
|
|
16
16
|
// ... gain access to a record, for instance with peekRecord or findRecord
|
|
17
17
|
const record = store.peekRecord("user", "1");
|
|
18
18
|
// get the identifier for the record (see docs for ResourceKey)
|
|
@@ -48,8 +48,6 @@ export declare class CacheManager implements Cache {
|
|
|
48
48
|
* a `content` member and therefor must not assume the existence
|
|
49
49
|
* of `request` and `response` on the document.
|
|
50
50
|
*
|
|
51
|
-
* @param {StructuredDocument} doc
|
|
52
|
-
* @return {ResourceDocument}
|
|
53
51
|
* @public
|
|
54
52
|
*/
|
|
55
53
|
put<T>(doc: StructuredDocument<T> | {
|
|
@@ -60,7 +58,6 @@ export declare class CacheManager implements Cache {
|
|
|
60
58
|
*
|
|
61
59
|
* @public
|
|
62
60
|
* @param op the operation to perform
|
|
63
|
-
* @return {void}
|
|
64
61
|
*/
|
|
65
62
|
patch(op: Operation | Operation[]): void;
|
|
66
63
|
/**
|
|
@@ -68,7 +65,6 @@ export declare class CacheManager implements Cache {
|
|
|
68
65
|
* on relationships only.
|
|
69
66
|
*
|
|
70
67
|
* @public
|
|
71
|
-
* @param mutation
|
|
72
68
|
*/
|
|
73
69
|
mutate(mutation: LocalRelationshipOperation): void;
|
|
74
70
|
/**
|
|
@@ -99,8 +95,7 @@ export declare class CacheManager implements Cache {
|
|
|
99
95
|
* notifications for relational data.
|
|
100
96
|
*
|
|
101
97
|
* @public
|
|
102
|
-
* @
|
|
103
|
-
* @return {ResourceDocument | ResourceBlob | null} the known resource data
|
|
98
|
+
* @return the known resource data
|
|
104
99
|
*/
|
|
105
100
|
peek(cacheKey: ResourceKey): unknown;
|
|
106
101
|
peek(cacheKey: RequestKey): ResourceDocument | null;
|
|
@@ -110,8 +105,6 @@ export declare class CacheManager implements Cache {
|
|
|
110
105
|
* Peek the Cache for the existing request data associated with
|
|
111
106
|
* a cacheable request
|
|
112
107
|
*
|
|
113
|
-
* @param {RequestKey}
|
|
114
|
-
* @return {RequestKey | null}
|
|
115
108
|
* @public
|
|
116
109
|
*/
|
|
117
110
|
peekRequest(key: RequestKey): StructuredDocument<ResourceDocument> | null;
|
|
@@ -130,7 +123,6 @@ export declare class CacheManager implements Cache {
|
|
|
130
123
|
* utilize this method to fork the cache.
|
|
131
124
|
*
|
|
132
125
|
* @public
|
|
133
|
-
* @return {Promise<Cache>}
|
|
134
126
|
*/
|
|
135
127
|
fork(): Promise<Cache>;
|
|
136
128
|
/**
|
|
@@ -140,9 +132,7 @@ export declare class CacheManager implements Cache {
|
|
|
140
132
|
* preferring instead to merge at the Store level, which will
|
|
141
133
|
* utilize this method to merge the caches.
|
|
142
134
|
*
|
|
143
|
-
* @param {Cache} cache
|
|
144
135
|
* @public
|
|
145
|
-
* @return {Promise<void>}
|
|
146
136
|
*/
|
|
147
137
|
merge(cache: Cache): Promise<void>;
|
|
148
138
|
/**
|
|
@@ -183,7 +173,6 @@ export declare class CacheManager implements Cache {
|
|
|
183
173
|
* which may be fed back into a new instance of the same Cache
|
|
184
174
|
* via `cache.hydrate`.
|
|
185
175
|
*
|
|
186
|
-
* @return {Promise<ReadableStream>}
|
|
187
176
|
* @public
|
|
188
177
|
*/
|
|
189
178
|
dump(): Promise<ReadableStream<unknown>>;
|
|
@@ -199,8 +188,6 @@ export declare class CacheManager implements Cache {
|
|
|
199
188
|
* behavior supports optimizing pre/fetching of data for route transitions
|
|
200
189
|
* via data-only SSR modes.
|
|
201
190
|
*
|
|
202
|
-
* @param {ReadableStream} stream
|
|
203
|
-
* @return {Promise<void>}
|
|
204
191
|
* @public
|
|
205
192
|
*/
|
|
206
193
|
hydrate(stream: ReadableStream<unknown>): Promise<void>;
|
|
@@ -25,7 +25,7 @@ export interface DocumentOperationCallback {
|
|
|
25
25
|
* @hideconstructor
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
|
-
export
|
|
28
|
+
export declare class NotificationManager {
|
|
29
29
|
constructor(store: Store);
|
|
30
30
|
/**
|
|
31
31
|
* Subscribe to changes for a given ResourceKey, RequestKey, or addition/removal of any resource
|
|
@@ -16,7 +16,7 @@ This class is not intended to be directly instantiated by consuming applications
|
|
|
16
16
|
|
|
17
17
|
### Inverses
|
|
18
18
|
|
|
19
|
-
Often, the relationships in
|
|
19
|
+
Often, the relationships in WarpDrive applications will have
|
|
20
20
|
an inverse. For example, imagine the following models are
|
|
21
21
|
defined:
|
|
22
22
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ExtensionDef } from "../../../reactive.js";
|
|
2
2
|
import { Context } from "../../../reactive/-private.js";
|
|
3
|
+
import type { SignalStore, WarpDriveSignal } from "../../../signals/-private.js";
|
|
3
4
|
import type { RequestKey, ResourceKey } from "../../../types/identifier.js";
|
|
4
5
|
import type { ObjectValue } from "../../../types/json/raw.js";
|
|
5
6
|
import type { CollectionField } from "../../../types/schema/fields.js";
|
|
6
|
-
import type { SignalStore, WarpDriveSignal } from "../new-core-tmp/reactivity/internal.js";
|
|
7
7
|
import type { Store } from "../store-service.js";
|
|
8
8
|
import type { KeyType, MinimumManager } from "./-utils.js";
|
|
9
9
|
import { NativeProxy } from "./native-proxy-type-fix.js";
|
|
@@ -15,7 +15,7 @@ import { InstanceCache, storeFor } from "./caches/instance-cache.js";
|
|
|
15
15
|
import type { PrivateCacheKeyManager } from "./managers/cache-key-manager.js";
|
|
16
16
|
import { CacheKeyManager } from "./managers/cache-key-manager.js";
|
|
17
17
|
import type { PrivateNotificationManager } from "./managers/notification-manager.js";
|
|
18
|
-
import NotificationManager from "./managers/notification-manager.js";
|
|
18
|
+
import { NotificationManager } from "./managers/notification-manager.js";
|
|
19
19
|
import type { PrivateRecordArrayManager } from "./managers/record-array-manager.js";
|
|
20
20
|
import type { PrivateRequestStateService } from "./network/request-cache.js";
|
|
21
21
|
import { RequestStateService } from "./network/request-cache.js";
|
|
@@ -288,7 +288,7 @@ export interface Store {
|
|
|
288
288
|
*/
|
|
289
289
|
export declare class Store extends BaseClass {
|
|
290
290
|
/**
|
|
291
|
-
* Provides access to the NotificationManager associated
|
|
291
|
+
* Provides access to the {@link NotificationManager} associated
|
|
292
292
|
* with this Store instance.
|
|
293
293
|
*
|
|
294
294
|
* The NotificationManager can be used to subscribe to
|
|
@@ -22,9 +22,3 @@ export { normalizeModelName as _deprecatingNormalize } from "./-private/utils/no
|
|
|
22
22
|
export type { StoreRequestInput } from "./-private/cache-handler/handler.js";
|
|
23
23
|
export { type LegacyManyArray, type LegacyManyArray as RelatedCollection, createLegacyManyArray } from "./-private/record-arrays/legacy-many-array.js";
|
|
24
24
|
export { log, logGroup } from "./-private/debug/utils.js";
|
|
25
|
-
export { getPromiseState, type PromiseState } from "./-private/new-core-tmp/promise-state.js";
|
|
26
|
-
export { DISPOSE, createRequestSubscription, type RequestArgs, type SubscriptionArgs, type RequestComponentArgs, type RequestSubscription, type ContentFeatures, type RecoveryFeatures, type AutorefreshBehaviorCombos, type AutorefreshBehaviorType } from "./-private/new-core-tmp/request-subscription.js";
|
|
27
|
-
export { getRequestState, type RequestLoadingState, type RequestCacheRequestState as RequestState } from "./-private/new-core-tmp/request-state.js";
|
|
28
|
-
export { type SignalHooks, waitFor } from "./-private/new-core-tmp/reactivity/configure.js";
|
|
29
|
-
export { signal, memoized, gate, entangleSignal, entangleInitiallyStaleSignal, defineSignal, defineGate, defineNonEnumerableSignal } from "./-private/new-core-tmp/reactivity/signal.js";
|
|
30
|
-
export { ARRAY_SIGNAL, OBJECT_SIGNAL, Signals, type WarpDriveSignal, peekInternalSignal, createInternalMemo, withSignalStore, notifyInternalSignal, consumeInternalSignal, getOrCreateInternalSignal } from "./-private/new-core-tmp/reactivity/internal.js";
|
|
@@ -42,7 +42,7 @@ export type KeyOrString<T> = keyof T & string extends never ? string : keyof T &
|
|
|
42
42
|
* "model" class.
|
|
43
43
|
*
|
|
44
44
|
* Only used when using the legacy schema-service implementation
|
|
45
|
-
* for @
|
|
45
|
+
* for @warp-drive/legacy/model or when wrapping schema for legacy
|
|
46
46
|
* Adapters/Serializers.
|
|
47
47
|
*
|
|
48
48
|
*/
|
|
@@ -124,7 +124,7 @@ export declare class RecordReference {
|
|
|
124
124
|
normalized hash of data and the object represented by the reference
|
|
125
125
|
will update.
|
|
126
126
|
|
|
127
|
-
If you pass a promise to `push`,
|
|
127
|
+
If you pass a promise to `push`, WarpDrive will not ask the adapter
|
|
128
128
|
for the data if another attempt to fetch it is made in the
|
|
129
129
|
interim. When the promise resolves, the underlying object is updated
|
|
130
130
|
with the new data, and the promise returned by *this function* is resolved
|
|
@@ -498,7 +498,7 @@ declare module "../-private/store-service" {
|
|
|
498
498
|
}
|
|
499
499
|
```
|
|
500
500
|
|
|
501
|
-
See
|
|
501
|
+
See {@link Store.peekAll | peekAll} to get an array of current records in the
|
|
502
502
|
store, without waiting until a reload is finished.
|
|
503
503
|
|
|
504
504
|
### Retrieving Related Model Records
|
package/declarations/store.d.ts
CHANGED
|
@@ -259,8 +259,8 @@ export interface Cache {
|
|
|
259
259
|
* was successfully updated as part of a save transaction.
|
|
260
260
|
*
|
|
261
261
|
* @public
|
|
262
|
-
* @param the primary ResourceKey that was operated on
|
|
263
|
-
* @param
|
|
262
|
+
* @param cacheKey - the primary ResourceKey that was operated on
|
|
263
|
+
* @param result - a document in the cache format containing any updated data
|
|
264
264
|
*/
|
|
265
265
|
didCommit(cacheKey: ResourceKey, result: StructuredDataDocument<SingleResourceDataDocument> | null): SingleResourceDataDocument;
|
|
266
266
|
didCommit(cacheKey: ResourceKey[], result: StructuredDataDocument<SingleResourceDataDocument> | null): SingleResourceDataDocument;
|