@warp-drive/core 5.6.0-alpha.17 → 5.6.0-alpha.5
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 +7 -8
- package/declarations/index.d.ts +3 -14
- package/declarations/index.d.ts.map +1 -0
- package/declarations/request/-private/context.d.ts +35 -34
- package/declarations/request/-private/context.d.ts.map +1 -0
- package/declarations/request/-private/debug.d.ts +3 -2
- package/declarations/request/-private/debug.d.ts.map +1 -0
- package/declarations/request/-private/fetch.d.ts +36 -24
- package/declarations/request/-private/fetch.d.ts.map +1 -0
- package/declarations/request/-private/future.d.ts +4 -3
- package/declarations/request/-private/future.d.ts.map +1 -0
- package/declarations/request/-private/manager.d.ts +132 -159
- package/declarations/request/-private/manager.d.ts.map +1 -0
- package/declarations/request/-private/promise-cache.d.ts +13 -21
- package/declarations/request/-private/promise-cache.d.ts.map +1 -0
- package/declarations/request/-private/types.d.ts +123 -124
- package/declarations/request/-private/types.d.ts.map +1 -0
- package/declarations/request/-private/utils.d.ts +9 -8
- package/declarations/request/-private/utils.d.ts.map +1 -0
- package/declarations/request.d.ts +433 -5
- package/declarations/request.d.ts.map +1 -0
- package/declarations/types/-private.d.ts +8 -16
- package/declarations/types/-private.d.ts.map +1 -0
- package/declarations/types/cache/aliases.d.ts +1 -11
- package/declarations/types/cache/aliases.d.ts.map +1 -0
- package/declarations/types/cache/change.d.ts +5 -4
- package/declarations/types/cache/change.d.ts.map +1 -0
- package/declarations/types/cache/mutations.d.ts +28 -51
- package/declarations/types/cache/mutations.d.ts.map +1 -0
- package/declarations/types/cache/operations.d.ts +47 -60
- package/declarations/types/cache/operations.d.ts.map +1 -0
- package/declarations/types/cache/relationship.d.ts +9 -11
- package/declarations/types/cache/relationship.d.ts.map +1 -0
- package/declarations/types/cache.d.ts +484 -495
- package/declarations/types/cache.d.ts.map +1 -0
- package/declarations/types/graph.d.ts +40 -31
- package/declarations/types/graph.d.ts.map +1 -0
- package/declarations/types/identifier.d.ts +82 -83
- package/declarations/types/identifier.d.ts.map +1 -0
- package/declarations/types/json/raw.d.ts +2 -1
- package/declarations/types/json/raw.d.ts.map +1 -0
- package/declarations/types/params.d.ts +5 -4
- package/declarations/types/params.d.ts.map +1 -0
- package/declarations/types/record.d.ts +76 -117
- package/declarations/types/record.d.ts.map +1 -0
- package/declarations/types/record.type-test.d.ts +2 -0
- package/declarations/types/record.type-test.d.ts.map +1 -0
- package/declarations/types/request.d.ts +266 -289
- package/declarations/types/request.d.ts.map +1 -0
- package/declarations/types/request.type-test.d.ts +2 -0
- package/declarations/types/request.type-test.d.ts.map +1 -0
- package/declarations/types/runtime.d.ts +9 -8
- package/declarations/types/runtime.d.ts.map +1 -0
- package/declarations/types/schema/concepts.d.ts +13 -19
- package/declarations/types/schema/concepts.d.ts.map +1 -0
- package/declarations/types/schema/fields.d.ts +1741 -1712
- package/declarations/types/schema/fields.d.ts.map +1 -0
- package/declarations/types/schema/fields.type-test.d.ts +1 -0
- package/declarations/types/schema/fields.type-test.d.ts.map +1 -0
- package/declarations/types/spec/document.d.ts +22 -28
- package/declarations/types/spec/document.d.ts.map +1 -0
- package/declarations/types/spec/error.d.ts +17 -16
- package/declarations/types/spec/error.d.ts.map +1 -0
- package/declarations/types/spec/json-api-raw.d.ts +102 -102
- package/declarations/types/spec/json-api-raw.d.ts.map +1 -0
- package/declarations/types/symbols.d.ts +75 -74
- package/declarations/types/symbols.d.ts.map +1 -0
- package/declarations/types/utils.d.ts +5 -5
- package/declarations/types/utils.d.ts.map +1 -0
- package/declarations/types.d.ts +7 -10
- package/declarations/types.d.ts.map +1 -0
- package/dist/{context-COmAnXUQ.js → context-DE5sFezZ.js} +2 -2
- package/dist/context-DE5sFezZ.js.map +1 -0
- package/dist/index.js +104 -37
- package/dist/index.js.map +1 -0
- package/dist/request.js +1 -1
- package/dist/request.js.map +1 -0
- package/dist/types/-private.js +3 -3
- package/dist/types/-private.js.map +1 -0
- package/dist/types/cache/aliases.js.map +1 -0
- package/dist/types/cache/change.js.map +1 -0
- package/dist/types/cache/mutations.js.map +1 -0
- package/dist/types/cache/operations.js.map +1 -0
- package/dist/types/cache/relationship.js.map +1 -0
- package/dist/types/cache.js.map +1 -0
- package/dist/types/graph.js.map +1 -0
- package/dist/types/identifier.js.map +1 -0
- package/dist/types/json/raw.js.map +1 -0
- package/dist/types/params.js.map +1 -0
- package/dist/types/record.js +1 -1
- package/dist/types/record.js.map +1 -0
- package/dist/types/request.js +2 -2
- package/dist/types/request.js.map +1 -0
- package/dist/types/runtime.js +1 -1
- package/dist/types/runtime.js.map +1 -0
- package/dist/types/schema/concepts.js.map +1 -0
- package/dist/types/schema/fields.js +41 -8
- package/dist/types/schema/fields.js.map +1 -0
- package/dist/types/schema/fields.type-test.js.map +1 -0
- package/dist/types/spec/document.js.map +1 -0
- package/dist/types/spec/error.js.map +1 -0
- package/dist/types/spec/json-api-raw.js.map +1 -0
- package/dist/types/symbols.js +3 -3
- package/dist/types/symbols.js.map +1 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +8 -11
- package/cjs-dist/addon-shim.cjs +0 -1
- package/cjs-dist/cjs-set-config.cjs +0 -1
- package/declarations/build-config/babel-macros.d.ts +0 -1
- package/declarations/build-config/canary-features.d.ts +0 -1
- package/declarations/build-config/debugging.d.ts +0 -1
- package/declarations/build-config/deprecations.d.ts +0 -1
- package/declarations/build-config/env.d.ts +0 -1
- package/declarations/build-config/macros.d.ts +0 -1
- package/declarations/build-config.d.ts +0 -1
- package/declarations/configure.d.ts +0 -7
- package/declarations/graph/-private/-diff.d.ts +0 -32
- package/declarations/graph/-private/-edge-definition.d.ts +0 -148
- package/declarations/graph/-private/-state.d.ts +0 -96
- package/declarations/graph/-private/-utils.d.ts +0 -31
- package/declarations/graph/-private/coerce-id.d.ts +0 -10
- package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +0 -18
- package/declarations/graph/-private/edges/collection.d.ts +0 -39
- package/declarations/graph/-private/edges/implicit.d.ts +0 -43
- package/declarations/graph/-private/edges/resource.d.ts +0 -24
- package/declarations/graph/-private/graph.d.ts +0 -90
- package/declarations/graph/-private/normalize-link.d.ts +0 -8
- package/declarations/graph/-private/operations/add-to-related-records.d.ts +0 -4
- package/declarations/graph/-private/operations/merge-identifier.d.ts +0 -3
- package/declarations/graph/-private/operations/remove-from-related-records.d.ts +0 -4
- package/declarations/graph/-private/operations/replace-related-record.d.ts +0 -3
- package/declarations/graph/-private/operations/replace-related-records.d.ts +0 -62
- package/declarations/graph/-private/operations/update-relationship.d.ts +0 -13
- package/declarations/graph/-private.d.ts +0 -13
- package/declarations/reactive/-private/document.d.ts +0 -146
- package/declarations/reactive/-private/fields/compute.d.ts +0 -43
- package/declarations/reactive/-private/fields/extension.d.ts +0 -8
- package/declarations/reactive/-private/fields/managed-array.d.ts +0 -22
- package/declarations/reactive/-private/fields/managed-object.d.ts +0 -21
- package/declarations/reactive/-private/fields/many-array-manager.d.ts +0 -19
- package/declarations/reactive/-private/hooks.d.ts +0 -5
- package/declarations/reactive/-private/record.d.ts +0 -64
- package/declarations/reactive/-private/schema.d.ts +0 -271
- package/declarations/reactive/-private/symbols.d.ts +0 -36
- package/declarations/reactive/-private.d.ts +0 -1
- package/declarations/reactive.d.ts +0 -4
- package/declarations/store/-private/cache-handler/handler.d.ts +0 -62
- package/declarations/store/-private/cache-handler/types.d.ts +0 -98
- package/declarations/store/-private/cache-handler/utils.d.ts +0 -32
- package/declarations/store/-private/caches/cache-utils.d.ts +0 -12
- package/declarations/store/-private/caches/identifier-cache.d.ts +0 -304
- package/declarations/store/-private/caches/instance-cache.d.ts +0 -65
- package/declarations/store/-private/caches/resource-utils.d.ts +0 -9
- package/declarations/store/-private/debug/utils.d.ts +0 -6
- package/declarations/store/-private/default-cache-policy.d.ts +0 -384
- package/declarations/store/-private/legacy-model-support/record-reference.d.ts +0 -159
- package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts +0 -17
- package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +0 -25
- package/declarations/store/-private/managers/cache-manager.d.ts +0 -443
- package/declarations/store/-private/managers/notification-manager.d.ts +0 -98
- package/declarations/store/-private/managers/record-array-manager.d.ts +0 -97
- package/declarations/store/-private/network/request-cache.d.ts +0 -107
- package/declarations/store/-private/new-core-tmp/promise-state.d.ts +0 -263
- package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +0 -176
- package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +0 -169
- package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +0 -35
- package/declarations/store/-private/new-core-tmp/request-state.d.ts +0 -277
- package/declarations/store/-private/new-core-tmp/request-subscription.d.ts +0 -261
- package/declarations/store/-private/record-arrays/identifier-array.d.ts +0 -147
- package/declarations/store/-private/record-arrays/many-array.d.ts +0 -197
- package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +0 -126
- package/declarations/store/-private/store-service.d.ts +0 -1605
- package/declarations/store/-private/utils/coerce-id.d.ts +0 -10
- package/declarations/store/-private/utils/construct-resource.d.ts +0 -6
- package/declarations/store/-private/utils/is-non-empty-string.d.ts +0 -1
- package/declarations/store/-private/utils/normalize-model-name.d.ts +0 -1
- package/declarations/store/-private/utils/uuid-polyfill.d.ts +0 -1
- package/declarations/store/-private.d.ts +0 -31
- package/declarations/store/-types/q/cache-capabilities-manager.d.ts +0 -99
- package/declarations/store/-types/q/ds-model.d.ts +0 -21
- package/declarations/store/-types/q/identifier.d.ts +0 -20
- package/declarations/store/-types/q/record-instance.d.ts +0 -23
- package/declarations/store/-types/q/schema-service.d.ts +0 -354
- package/declarations/store/-types/q/store.d.ts +0 -32
- package/declarations/store.d.ts +0 -1
- package/declarations/utils/string.d.ts +0 -48
- package/dist/build-config/babel-macros.js +0 -1
- package/dist/build-config/canary-features.js +0 -1
- package/dist/build-config/debugging.js +0 -1
- package/dist/build-config/deprecations.js +0 -1
- package/dist/build-config/env.js +0 -1
- package/dist/build-config/macros.js +0 -1
- package/dist/build-config.js +0 -1
- package/dist/configure-B48bFHOl.js +0 -181
- package/dist/configure.js +0 -1
- package/dist/graph/-private.js +0 -3372
- package/dist/handler-C2T-IyJK.js +0 -339
- package/dist/reactive/-private.js +0 -1
- package/dist/reactive.js +0 -1988
- package/dist/request-state-CjLph1LP.js +0 -8139
- package/dist/store/-private.js +0 -3
- package/dist/store.js +0 -545
- package/dist/symbols-SIstXMLI.js +0 -44
- package/dist/utils/string.js +0 -92
- 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/README.md +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/github-header.svg +0 -444
- 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
|
@@ -1,85 +1,72 @@
|
|
|
1
|
-
import type { StableDocumentIdentifier, StableExistingRecordIdentifier, StableRecordIdentifier } from
|
|
2
|
-
import type { Value } from
|
|
3
|
-
import type { ExistingResourceObject } from
|
|
4
|
-
import type { Relationship } from
|
|
1
|
+
import type { StableDocumentIdentifier, StableExistingRecordIdentifier, StableRecordIdentifier } from '../identifier.ts';
|
|
2
|
+
import type { Value } from '../json/raw.ts';
|
|
3
|
+
import type { ExistingResourceObject } from '../spec/json-api-raw.ts';
|
|
4
|
+
import type { Relationship } from './relationship.ts';
|
|
5
5
|
export interface Op {
|
|
6
|
-
|
|
6
|
+
op: string;
|
|
7
7
|
}
|
|
8
|
-
// Occasionally the IdentifierCache
|
|
9
|
-
// discovers that two previously thought
|
|
10
|
-
// to be distinct Identifiers refer to
|
|
11
|
-
// the same ResourceBlob. This Operation
|
|
12
|
-
// will be performed giving the Cache the
|
|
13
|
-
// change to cleanup and merge internal
|
|
14
|
-
// state as desired when this discovery
|
|
15
|
-
// is made.
|
|
16
8
|
export interface MergeOperation extends Op {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// new
|
|
21
|
-
value: StableRecordIdentifier;
|
|
9
|
+
op: 'mergeIdentifiers';
|
|
10
|
+
record: StableRecordIdentifier;
|
|
11
|
+
value: StableRecordIdentifier;
|
|
22
12
|
}
|
|
23
13
|
export interface RemoveDocumentOperation extends Op {
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
op: 'remove';
|
|
15
|
+
record: StableDocumentIdentifier;
|
|
26
16
|
}
|
|
27
17
|
export interface RemoveResourceOperation extends Op {
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
op: 'remove';
|
|
19
|
+
record: StableExistingRecordIdentifier;
|
|
30
20
|
}
|
|
31
21
|
export interface AddResourceOperation extends Op {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
op: 'add';
|
|
23
|
+
record: StableExistingRecordIdentifier;
|
|
24
|
+
value: ExistingResourceObject;
|
|
35
25
|
}
|
|
36
26
|
export interface UpdateResourceOperation extends Op {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
op: 'update';
|
|
28
|
+
record: StableExistingRecordIdentifier;
|
|
29
|
+
value: ExistingResourceObject;
|
|
40
30
|
}
|
|
41
31
|
export interface UpdateResourceFieldOperation extends Op {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
op: 'update';
|
|
33
|
+
record: StableExistingRecordIdentifier;
|
|
34
|
+
field: string;
|
|
35
|
+
value: Value;
|
|
46
36
|
}
|
|
47
37
|
export interface UpdateResourceRelationshipOperation extends Op {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
op: 'update';
|
|
39
|
+
record: StableExistingRecordIdentifier;
|
|
40
|
+
field: string;
|
|
41
|
+
value: Relationship<StableExistingRecordIdentifier>;
|
|
52
42
|
}
|
|
53
43
|
export interface AddToDocumentOperation extends Op {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
op: 'add';
|
|
45
|
+
record: StableDocumentIdentifier;
|
|
46
|
+
field: 'data' | 'included';
|
|
47
|
+
value: StableExistingRecordIdentifier | StableExistingRecordIdentifier[];
|
|
48
|
+
index?: number;
|
|
59
49
|
}
|
|
60
50
|
export interface AddToResourceRelationshipOperation extends Op {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
op: 'add';
|
|
52
|
+
record: StableExistingRecordIdentifier;
|
|
53
|
+
field: string;
|
|
54
|
+
value: StableExistingRecordIdentifier | StableExistingRecordIdentifier[];
|
|
55
|
+
index?: number;
|
|
66
56
|
}
|
|
67
57
|
export interface RemoveFromResourceRelationshipOperation extends Op {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
op: 'remove';
|
|
59
|
+
record: StableExistingRecordIdentifier;
|
|
60
|
+
field: string;
|
|
61
|
+
value: StableExistingRecordIdentifier | StableExistingRecordIdentifier[];
|
|
62
|
+
index?: number;
|
|
73
63
|
}
|
|
74
64
|
export interface RemoveFromDocumentOperation extends Op {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
65
|
+
op: 'remove';
|
|
66
|
+
record: StableDocumentIdentifier;
|
|
67
|
+
field: 'data' | 'included';
|
|
68
|
+
value: StableExistingRecordIdentifier | StableExistingRecordIdentifier[];
|
|
69
|
+
index?: number;
|
|
80
70
|
}
|
|
81
|
-
// An Operation is an action that updates
|
|
82
|
-
// the remote state of the Cache in some
|
|
83
|
-
// manner. Additional Operations will be
|
|
84
|
-
// added in the future.
|
|
85
71
|
export type Operation = MergeOperation | RemoveResourceOperation | RemoveDocumentOperation | AddResourceOperation | UpdateResourceOperation | UpdateResourceFieldOperation | AddToResourceRelationshipOperation | RemoveFromResourceRelationshipOperation | AddToDocumentOperation | RemoveFromDocumentOperation;
|
|
72
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/types/cache/operations.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import type { StableRecordIdentifier } from
|
|
2
|
-
import type { Links, Meta, PaginationLinks } from
|
|
3
|
-
// we request that it be in the stable form already.
|
|
1
|
+
import type { StableRecordIdentifier } from '../identifier.ts';
|
|
2
|
+
import type { Links, Meta, PaginationLinks } from '../spec/json-api-raw.ts';
|
|
4
3
|
export interface ResourceRelationship<T = StableRecordIdentifier> {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
data?: T | null;
|
|
5
|
+
meta?: Meta;
|
|
6
|
+
links?: Links;
|
|
8
7
|
}
|
|
9
|
-
// Note: in v1 data could be a ResourceIdentifier, now
|
|
10
|
-
// we request that it be in the stable form already.
|
|
11
8
|
export interface CollectionRelationship<T = StableRecordIdentifier> {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
data?: T[];
|
|
10
|
+
meta?: Meta;
|
|
11
|
+
links?: PaginationLinks;
|
|
15
12
|
}
|
|
16
13
|
export type Relationship<T = StableRecordIdentifier> = ResourceRelationship<T> | CollectionRelationship<T>;
|
|
14
|
+
//# sourceMappingURL=relationship.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationship.d.ts","sourceRoot":"","sources":["../../../src/types/cache/relationship.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG5E,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,sBAAsB;IAC9D,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAID,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,sBAAsB;IAChE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,sBAAsB,IAAI,oBAAoB,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC"}
|