@warp-drive/core 5.9.0-beta.1 → 5.9.0-beta.2
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/dist/{unpkg/dev-deprecated/-private-DL4tfrv9.js → -private-BYn1Vh-L.js} +2 -2
- package/dist/{-private-b1g4dhl0.js.map → -private-BYn1Vh-L.js.map} +1 -1
- package/dist/{-private-DMzvF_Q6.js → -private-CyhhcK1a.js} +2 -2
- package/dist/-private-CyhhcK1a.js.map +1 -0
- package/dist/-private-zrP4VGAf.js +3530 -0
- package/dist/-private-zrP4VGAf.js.map +1 -0
- package/{declarations/concepts-LHsLJZMl.d.ts → dist/concepts-DFldVwEM.d.ts} +2 -2
- package/{declarations/concepts-LHsLJZMl.d.ts.map → dist/concepts-DFldVwEM.d.ts.map} +1 -1
- package/dist/configure.js +1 -1
- package/dist/graph/-private.d.ts +2 -0
- package/dist/graph/-private.js +46 -33
- package/dist/graph/-private.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/{declarations/internal-Cz-893zD.d.ts → dist/internal-DtWOpxrR.d.ts} +2763 -2271
- package/dist/internal-DtWOpxrR.d.ts.map +1 -0
- package/dist/reactive/-private.d.ts +2 -0
- package/dist/reactive/-private.js +1 -1
- package/dist/reactive.d.ts +2 -0
- package/dist/reactive.js +3 -3
- package/{declarations → dist}/record-D3QQcaIR.d.ts.map +1 -1
- package/dist/{request--vRFALbQ.js → request-7BJFgSu_.js} +2 -2
- package/dist/request-7BJFgSu_.js.map +1 -0
- package/dist/request.d.ts +2 -0
- package/dist/request.js +1 -1
- package/dist/signals/-leaked.d.ts +1060 -0
- package/dist/signals/-leaked.d.ts.map +1 -0
- package/dist/signals/-leaked.js +2 -2
- package/dist/{src-Dex_phWI.js → src-BOAWJH_S.js} +192 -53
- package/dist/src-BOAWJH_S.js.map +1 -0
- package/dist/store/-private.d.ts +2 -0
- package/dist/store/-private.js +1 -1
- package/dist/store-DNF9Rgoh.js.map +1 -1
- package/dist/store.d.ts +2 -0
- package/{declarations → dist}/types/-private.d.ts +1 -1
- package/{declarations → dist}/types/-private.d.ts.map +1 -1
- package/dist/types/-private.js +1 -1
- package/dist/types/cache.d.ts +2 -0
- package/dist/types/record.js.map +1 -1
- package/dist/types/request.d.ts +2 -0
- package/dist/types/request.js +1 -1
- package/dist/types/request.js.map +1 -1
- package/dist/types/runtime.js +1 -1
- package/dist/types/schema/concepts.d.ts +2 -0
- package/dist/types/schema/fields.js.map +1 -1
- package/dist/types/schema/schema-service.d.ts +2 -0
- package/dist/types/symbols.js +1 -1
- package/dist/types/symbols.js.map +1 -1
- package/{declarations → dist}/types.d.ts +1 -1
- package/dist/unpkg/dev/-private-BoSTJwp9.js +3519 -0
- package/dist/unpkg/dev/-private-BoSTJwp9.js.map +1 -0
- package/dist/{-private-b1g4dhl0.js → unpkg/dev/-private-CUkeqUhO.js} +2 -2
- package/dist/unpkg/{dev-deprecated/-private-DL4tfrv9.js.map → dev/-private-CUkeqUhO.js.map} +1 -1
- package/dist/unpkg/{dev-deprecated/-private-2RfQ2761.js → dev/-private-D6Tw25AD.js} +2 -2
- package/dist/unpkg/dev/-private-D6Tw25AD.js.map +1 -0
- package/dist/unpkg/dev/configure.js +1 -1
- package/dist/unpkg/dev/graph/-private.js +46 -33
- package/dist/unpkg/dev/graph/-private.js.map +1 -1
- package/dist/unpkg/dev/index.js +1 -1
- package/dist/unpkg/dev/reactive/-private.js +1 -1
- package/dist/unpkg/dev/reactive.js +3 -3
- package/dist/unpkg/{dev-deprecated/request-DAuXbfYi.js → dev/request-CwjpJB3r.js} +2 -2
- package/dist/unpkg/dev/request-CwjpJB3r.js.map +1 -0
- package/dist/unpkg/dev/request.js +1 -1
- package/dist/unpkg/dev/{runtime-EoVKAhTv.js → runtime-DoDtzXJb.js} +2 -2
- package/dist/unpkg/dev/runtime-DoDtzXJb.js.map +1 -0
- package/dist/unpkg/dev/signals/-leaked.js +2 -2
- package/dist/unpkg/dev/{src-Bxlr_vue.js → src-CP6e_ozt.js} +194 -55
- package/dist/unpkg/dev/src-CP6e_ozt.js.map +1 -0
- package/dist/unpkg/dev/store/-private.js +1 -1
- package/dist/unpkg/{dev-deprecated/store-TcP2H4Af.js → dev/store-DamE3C4y.js} +2 -2
- package/dist/unpkg/dev/store-DamE3C4y.js.map +1 -0
- package/dist/unpkg/dev/store.js +1 -1
- package/dist/unpkg/dev/types/-private.js +1 -1
- package/dist/unpkg/dev/types/record.js.map +1 -1
- package/dist/unpkg/dev/types/request.js +1 -1
- package/dist/unpkg/dev/types/request.js.map +1 -1
- package/dist/unpkg/dev/types/runtime.js +1 -1
- package/dist/unpkg/dev/types/schema/fields.js.map +1 -1
- package/dist/unpkg/dev/types/symbols.js +1 -1
- package/dist/unpkg/dev/types/symbols.js.map +1 -1
- package/dist/unpkg/dev-deprecated/-private-BoSTJwp9.js +3519 -0
- package/dist/unpkg/dev-deprecated/-private-BoSTJwp9.js.map +1 -0
- package/dist/unpkg/{dev/-private-DL4tfrv9.js → dev-deprecated/-private-CUkeqUhO.js} +2 -2
- package/dist/unpkg/{prod/-private-Z9i0icpE.js.map → dev-deprecated/-private-CUkeqUhO.js.map} +1 -1
- package/dist/unpkg/{dev/-private-2RfQ2761.js → dev-deprecated/-private-D6Tw25AD.js} +2 -2
- package/dist/unpkg/dev-deprecated/-private-D6Tw25AD.js.map +1 -0
- package/dist/unpkg/dev-deprecated/configure.js +1 -1
- package/dist/unpkg/dev-deprecated/graph/-private.js +47 -34
- package/dist/unpkg/dev-deprecated/graph/-private.js.map +1 -1
- package/dist/unpkg/dev-deprecated/index.js +1 -1
- package/dist/unpkg/dev-deprecated/reactive/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/reactive.js +3 -3
- package/dist/unpkg/{dev/request-DAuXbfYi.js → dev-deprecated/request-CwjpJB3r.js} +2 -2
- package/dist/unpkg/dev-deprecated/request-CwjpJB3r.js.map +1 -0
- package/dist/unpkg/dev-deprecated/request.js +1 -1
- package/dist/unpkg/dev-deprecated/{runtime-BacZMq1r.js → runtime-CPL2BGgT.js} +2 -2
- package/dist/unpkg/dev-deprecated/runtime-CPL2BGgT.js.map +1 -0
- package/dist/unpkg/dev-deprecated/signals/-leaked.js +2 -2
- package/dist/unpkg/dev-deprecated/{src-DEl2Ca3T.js → src-De8OV58h.js} +195 -56
- package/dist/unpkg/dev-deprecated/src-De8OV58h.js.map +1 -0
- package/dist/unpkg/dev-deprecated/store/-private.js +1 -1
- package/dist/unpkg/{dev/store-DmiFvT1B.js → dev-deprecated/store-Bsdz5mRe.js} +2 -2
- package/dist/unpkg/dev-deprecated/store-Bsdz5mRe.js.map +1 -0
- package/dist/unpkg/dev-deprecated/store.js +1 -1
- package/dist/unpkg/dev-deprecated/types/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/types/record.js.map +1 -1
- package/dist/unpkg/dev-deprecated/types/request.js +1 -1
- package/dist/unpkg/dev-deprecated/types/request.js.map +1 -1
- package/dist/unpkg/dev-deprecated/types/runtime.js +1 -1
- package/dist/unpkg/dev-deprecated/types/schema/fields.js.map +1 -1
- package/dist/unpkg/dev-deprecated/types/symbols.js +1 -1
- package/dist/unpkg/dev-deprecated/types/symbols.js.map +1 -1
- package/dist/unpkg/prod/-private-B36B1ztP.js +22 -0
- package/dist/unpkg/{prod-deprecated/-private-Z9i0icpE.js.map → prod/-private-B36B1ztP.js.map} +1 -1
- package/dist/unpkg/prod/-private-DHco-h0q.js +3294 -0
- package/dist/unpkg/prod/-private-DHco-h0q.js.map +1 -0
- package/dist/unpkg/prod/{-private-BK71-uXR.js → -private-Dhl123OI.js} +2 -2
- package/dist/unpkg/prod/-private-Dhl123OI.js.map +1 -0
- package/dist/unpkg/prod/configure.js +1 -1
- package/dist/unpkg/prod/graph/-private.js +45 -32
- package/dist/unpkg/prod/graph/-private.js.map +1 -1
- package/dist/unpkg/prod/index.js +1 -1
- package/dist/unpkg/prod/reactive/-private.js +1 -1
- package/dist/unpkg/prod/reactive.js +3 -3
- package/dist/unpkg/prod/{request-BcJNzSgv.js → request-BBdC1Sz7.js} +2 -2
- package/dist/unpkg/prod/request-BBdC1Sz7.js.map +1 -0
- package/dist/unpkg/prod/request.js +1 -1
- package/dist/unpkg/prod/signals/-leaked.js +2 -2
- package/dist/unpkg/prod/{src-Dzz-j6pp.js → src-nFHlZgKa.js} +196 -53
- package/dist/unpkg/prod/src-nFHlZgKa.js.map +1 -0
- package/dist/unpkg/prod/store/-private.js +1 -1
- package/dist/unpkg/prod/store-BWhmb7Ob.js.map +1 -1
- package/dist/unpkg/prod/types/-private.js +1 -1
- package/dist/unpkg/prod/types/record.js.map +1 -1
- package/dist/unpkg/prod/types/request.js +1 -1
- package/dist/unpkg/prod/types/request.js.map +1 -1
- package/dist/unpkg/prod/types/runtime.js +1 -1
- package/dist/unpkg/prod/types/schema/fields.js.map +1 -1
- package/dist/unpkg/prod/types/symbols.js +1 -1
- package/dist/unpkg/prod/types/symbols.js.map +1 -1
- package/dist/unpkg/prod-deprecated/{-private-Z9i0icpE.js → -private-B36B1ztP.js} +2 -2
- package/dist/unpkg/{dev/-private-DL4tfrv9.js.map → prod-deprecated/-private-B36B1ztP.js.map} +1 -1
- package/dist/unpkg/prod-deprecated/-private-DHco-h0q.js +3294 -0
- package/dist/unpkg/prod-deprecated/-private-DHco-h0q.js.map +1 -0
- package/dist/unpkg/prod-deprecated/{-private-BK71-uXR.js → -private-Dhl123OI.js} +2 -2
- package/dist/unpkg/prod-deprecated/-private-Dhl123OI.js.map +1 -0
- package/dist/unpkg/prod-deprecated/configure.js +1 -1
- package/dist/unpkg/prod-deprecated/graph/-private.js +46 -35
- package/dist/unpkg/prod-deprecated/graph/-private.js.map +1 -1
- package/dist/unpkg/prod-deprecated/index.js +1 -1
- package/dist/unpkg/prod-deprecated/reactive/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/reactive.js +3 -3
- package/dist/unpkg/prod-deprecated/{request-BcJNzSgv.js → request-BBdC1Sz7.js} +2 -2
- package/dist/unpkg/prod-deprecated/request-BBdC1Sz7.js.map +1 -0
- package/dist/unpkg/prod-deprecated/request.js +1 -1
- package/dist/unpkg/prod-deprecated/signals/-leaked.js +2 -2
- package/dist/unpkg/prod-deprecated/{src-BOifHFQ5.js → src-Cku5ymUJ.js} +197 -54
- package/dist/unpkg/prod-deprecated/src-Cku5ymUJ.js.map +1 -0
- package/dist/unpkg/prod-deprecated/store/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/store-BWhmb7Ob.js.map +1 -1
- package/dist/unpkg/prod-deprecated/types/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/types/record.js.map +1 -1
- package/dist/unpkg/prod-deprecated/types/request.js +1 -1
- package/dist/unpkg/prod-deprecated/types/request.js.map +1 -1
- package/dist/unpkg/prod-deprecated/types/runtime.js +1 -1
- package/dist/unpkg/prod-deprecated/types/schema/fields.js.map +1 -1
- package/dist/unpkg/prod-deprecated/types/symbols.js +1 -1
- package/dist/unpkg/prod-deprecated/types/symbols.js.map +1 -1
- package/package.json +15 -19
- package/declarations/graph/-private.d.ts +0 -2
- package/declarations/index.d.ts +0 -2
- package/declarations/internal-Cz-893zD.d.ts.map +0 -1
- package/declarations/reactive/-private.d.ts +0 -2
- package/declarations/reactive.d.ts +0 -2
- package/declarations/request.d.ts +0 -2
- package/declarations/signals/-leaked.d.ts +0 -63
- package/declarations/signals/-leaked.d.ts.map +0 -1
- package/declarations/store/-private.d.ts +0 -2
- package/declarations/store.d.ts +0 -8358
- package/declarations/store.d.ts.map +0 -1
- package/declarations/types/cache.d.ts +0 -2
- package/declarations/types/request.d.ts +0 -2
- package/declarations/types/schema/concepts.d.ts +0 -2
- package/declarations/types/schema/schema-service.d.ts +0 -2
- package/dist/-private-DMzvF_Q6.js.map +0 -1
- package/dist/-private-HjaQ1wp1.js +0 -1695
- package/dist/-private-HjaQ1wp1.js.map +0 -1
- package/dist/request--vRFALbQ.js.map +0 -1
- package/dist/src-Dex_phWI.js.map +0 -1
- package/dist/unpkg/dev/-private-2RfQ2761.js.map +0 -1
- package/dist/unpkg/dev/-private-CM1zxNws.js +0 -1684
- package/dist/unpkg/dev/-private-CM1zxNws.js.map +0 -1
- package/dist/unpkg/dev/request-DAuXbfYi.js.map +0 -1
- package/dist/unpkg/dev/runtime-EoVKAhTv.js.map +0 -1
- package/dist/unpkg/dev/src-Bxlr_vue.js.map +0 -1
- package/dist/unpkg/dev/store-DmiFvT1B.js.map +0 -1
- package/dist/unpkg/dev-deprecated/-private-2RfQ2761.js.map +0 -1
- package/dist/unpkg/dev-deprecated/-private-CM1zxNws.js +0 -1684
- package/dist/unpkg/dev-deprecated/-private-CM1zxNws.js.map +0 -1
- package/dist/unpkg/dev-deprecated/request-DAuXbfYi.js.map +0 -1
- package/dist/unpkg/dev-deprecated/runtime-BacZMq1r.js.map +0 -1
- package/dist/unpkg/dev-deprecated/src-DEl2Ca3T.js.map +0 -1
- package/dist/unpkg/dev-deprecated/store-TcP2H4Af.js.map +0 -1
- package/dist/unpkg/prod/-private-BK71-uXR.js.map +0 -1
- package/dist/unpkg/prod/-private-TNaS5Piv.js +0 -1494
- package/dist/unpkg/prod/-private-TNaS5Piv.js.map +0 -1
- package/dist/unpkg/prod/-private-Z9i0icpE.js +0 -22
- package/dist/unpkg/prod/request-BcJNzSgv.js.map +0 -1
- package/dist/unpkg/prod/src-Dzz-j6pp.js.map +0 -1
- package/dist/unpkg/prod-deprecated/-private-BK71-uXR.js.map +0 -1
- package/dist/unpkg/prod-deprecated/-private-TNaS5Piv.js +0 -1494
- package/dist/unpkg/prod-deprecated/-private-TNaS5Piv.js.map +0 -1
- package/dist/unpkg/prod-deprecated/request-BcJNzSgv.js.map +0 -1
- package/dist/unpkg/prod-deprecated/src-BOifHFQ5.js.map +0 -1
- /package/{declarations → dist}/aliases-BWYW5EhX.d.ts +0 -0
- /package/{declarations → dist}/aliases-BWYW5EhX.d.ts.map +0 -0
- /package/{declarations → dist}/build-config/babel-macros.d.ts +0 -0
- /package/{declarations → dist}/build-config/canary-features.d.ts +0 -0
- /package/{declarations → dist}/build-config/debugging.d.ts +0 -0
- /package/{declarations → dist}/build-config/deprecations.d.ts +0 -0
- /package/{declarations → dist}/build-config/env.d.ts +0 -0
- /package/{declarations → dist}/build-config/macros.d.ts +0 -0
- /package/{declarations → dist}/build-config.d.ts +0 -0
- /package/{declarations → dist}/change-C7kqv2kW.d.ts +0 -0
- /package/{declarations → dist}/change-C7kqv2kW.d.ts.map +0 -0
- /package/{declarations → dist}/configure-B_F639tN.d.ts +0 -0
- /package/{declarations → dist}/configure-B_F639tN.d.ts.map +0 -0
- /package/{declarations → dist}/configure.d.ts +0 -0
- /package/{declarations → dist}/document-BEn91SwT.d.ts +0 -0
- /package/{declarations → dist}/document-BEn91SwT.d.ts.map +0 -0
- /package/{declarations → dist}/error-50OSEhsF.d.ts +0 -0
- /package/{declarations → dist}/error-50OSEhsF.d.ts.map +0 -0
- /package/{declarations → dist}/fields-FM7peCiM.d.ts +0 -0
- /package/{declarations → dist}/fields-FM7peCiM.d.ts.map +0 -0
- /package/{declarations → dist}/graph-DLqYXP2z.d.ts +0 -0
- /package/{declarations → dist}/graph-DLqYXP2z.d.ts.map +0 -0
- /package/{declarations → dist}/identifier-DQnqOSJK.d.ts +0 -0
- /package/{declarations → dist}/identifier-DQnqOSJK.d.ts.map +0 -0
- /package/{declarations → dist}/json-api-raw-C5APJHHB.d.ts +0 -0
- /package/{declarations → dist}/json-api-raw-C5APJHHB.d.ts.map +0 -0
- /package/{declarations → dist}/mutations-CqtoGB4t.d.ts +0 -0
- /package/{declarations → dist}/mutations-CqtoGB4t.d.ts.map +0 -0
- /package/{declarations → dist}/operations-D1qA6r0_.d.ts +0 -0
- /package/{declarations → dist}/operations-D1qA6r0_.d.ts.map +0 -0
- /package/{declarations → dist}/params-DrEx3bf8.d.ts +0 -0
- /package/{declarations → dist}/params-DrEx3bf8.d.ts.map +0 -0
- /package/{declarations → dist}/raw-D5hnjiq7.d.ts +0 -0
- /package/{declarations → dist}/raw-D5hnjiq7.d.ts.map +0 -0
- /package/{declarations → dist}/record-D3QQcaIR.d.ts +0 -0
- /package/{declarations → dist}/relationship-CmHzMPKf.d.ts +0 -0
- /package/{declarations → dist}/relationship-CmHzMPKf.d.ts.map +0 -0
- /package/{declarations → dist}/symbols-DjRDCeX0.d.ts +0 -0
- /package/{declarations → dist}/symbols-DjRDCeX0.d.ts.map +0 -0
- /package/{declarations → dist}/types/cache/aliases.d.ts +0 -0
- /package/{declarations → dist}/types/cache/change.d.ts +0 -0
- /package/{declarations → dist}/types/cache/mutations.d.ts +0 -0
- /package/{declarations → dist}/types/cache/operations.d.ts +0 -0
- /package/{declarations → dist}/types/cache/relationship.d.ts +0 -0
- /package/{declarations → dist}/types/graph.d.ts +0 -0
- /package/{declarations → dist}/types/identifier.d.ts +0 -0
- /package/{declarations → dist}/types/json/raw.d.ts +0 -0
- /package/{declarations → dist}/types/params.d.ts +0 -0
- /package/{declarations → dist}/types/record.d.ts +0 -0
- /package/{declarations → dist}/types/runtime.d.ts +0 -0
- /package/{declarations → dist}/types/runtime.d.ts.map +0 -0
- /package/{declarations → dist}/types/schema/fields.d.ts +0 -0
- /package/{declarations → dist}/types/schema/fields.type-test.d.ts +0 -0
- /package/{declarations → dist}/types/spec/document.d.ts +0 -0
- /package/{declarations → dist}/types/spec/error.d.ts +0 -0
- /package/{declarations → dist}/types/spec/json-api-raw.d.ts +0 -0
- /package/{declarations → dist}/types/symbols.d.ts +0 -0
- /package/{declarations → dist}/types/utils.d.ts +0 -0
- /package/{declarations → dist}/utils/string.d.ts +0 -0
- /package/{declarations → dist}/utils/string.d.ts.map +0 -0
- /package/{declarations → dist}/utils-BtURiy8l.d.ts +0 -0
- /package/{declarations → dist}/utils-BtURiy8l.d.ts.map +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as ResourceKey } from "./identifier-DQnqOSJK.js";
|
|
2
|
-
import { i as Value, n as ObjectValue } from "./raw-D5hnjiq7.js";
|
|
3
2
|
import { a as Type } from "./symbols-DjRDCeX0.js";
|
|
4
3
|
import { i as OpaqueRecordInstance } from "./record-D3QQcaIR.js";
|
|
4
|
+
import { i as Value, n as ObjectValue } from "./raw-D5hnjiq7.js";
|
|
5
5
|
//#region src/types/schema/concepts.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* A Transformation converts a cached primitive value into a richer
|
|
@@ -74,4 +74,4 @@ type HashFn<T extends object = object> = {
|
|
|
74
74
|
} & ((data: T, options: ObjectValue | null, prop: string | null) => string);
|
|
75
75
|
//#endregion
|
|
76
76
|
export { HashFn as n, Transformation as r, Derivation as t };
|
|
77
|
-
//# sourceMappingURL=concepts-
|
|
77
|
+
//# sourceMappingURL=concepts-DFldVwEM.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concepts-
|
|
1
|
+
{"version":3,"file":"concepts-DFldVwEM.d.ts","names":[],"sources":["../src/types/schema/concepts.ts"],"mappings":";;;;;;;;;;;;;;;;;KAiBY,eAAe,UAAU,QAAQ,OAAO;;;;;EAKlD,UAAU,OAAO,IAAI,SAAS,oBAAoB,QAAQ,uBAAuB;;;;;EAMjF,QAAQ,OAAO,eAAe,SAAS,oBAAoB,QAAQ,uBAAuB;;;;;EAM1F,cAAc,SAAS,oBAAoB,YAAY,cAAc;;;;GAKpE;;;;;;;;;;;;;;KAeS,WAAW,aAAa,aAAa,WAAW,qBAAqB;;;;GAI9E;MACG,QAAQ,GAAG,SAAS,IAAI,iBAAiB;;;;;;;;;;;;;KAcnC,OAAO;;;;GAIhB;MACG,MAAM,GAAG,SAAS,oBAAoB"}
|
package/dist/configure.js
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Bt as GraphEdge, Ht as ImplicitEdge, It as graphFor, Lt as peekGraph, Rt as isBelongsTo, Ut as CollectionEdge, Vt as ResourceEdge, Wt as UpgradedMeta, zt as Graph } from "../internal-DtWOpxrR.js";
|
|
2
|
+
export { type CollectionEdge, type Graph, type GraphEdge, type ImplicitEdge, type ResourceEdge, type UpgradedMeta, graphFor, isBelongsTo, peekGraph };
|
package/dist/graph/-private.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as setTransient, r as peekTransient, t as getOrSetGlobal } from "../-private-
|
|
1
|
+
import { a as setTransient, r as peekTransient, t as getOrSetGlobal } from "../-private-CyhhcK1a.js";
|
|
2
2
|
import { getGlobalConfig, macroCondition } from "@embroider/macros";
|
|
3
3
|
import { deprecate, warn } from "@ember/debug";
|
|
4
4
|
|
|
@@ -152,7 +152,7 @@ function removeIdentifierCompletelyFromRelationship(graph, relationship, value,
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
/** Notifies the store that a relationship has changed, provided the relationship has been accessed and is not currently being removed. */
|
|
155
|
-
function notifyChange(graph, relationship) {
|
|
155
|
+
function notifyChange(graph, relationship, channel) {
|
|
156
156
|
if (!relationship.accessed) return;
|
|
157
157
|
const resourceKey = relationship.identifier;
|
|
158
158
|
const key = relationship.definition.key;
|
|
@@ -165,7 +165,7 @@ function notifyChange(graph, relationship) {
|
|
|
165
165
|
if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_GRAPH)) {
|
|
166
166
|
if (getGlobalConfig().WarpDrive.debug.LOG_GRAPH || globalThis.getWarpDriveRuntimeConfig().debug.LOG_GRAPH) console.log(`Graph: notifying relationship change for ${String(resourceKey)} ${key}`);
|
|
167
167
|
}
|
|
168
|
-
graph.store.notifyChange(resourceKey, "relationships", key);
|
|
168
|
+
graph.store.notifyChange(resourceKey, "relationships", key, channel);
|
|
169
169
|
}
|
|
170
170
|
/**
|
|
171
171
|
* Asserts (dev-only) that a pushed relationship data payload conforms to the JSON:API resource
|
|
@@ -706,7 +706,7 @@ function replaceRelatedRecordsLocal(graph, op, isRemote) {
|
|
|
706
706
|
relationship.additions = diff.add;
|
|
707
707
|
relationship.removals = diff.del;
|
|
708
708
|
relationship.localState = diff.finalState;
|
|
709
|
-
if (becameDirty && !wasDirty) notifyChange(graph, relationship);
|
|
709
|
+
if (becameDirty && !wasDirty) notifyChange(graph, relationship, "local");
|
|
710
710
|
}
|
|
711
711
|
function replaceRelatedRecordsRemote(graph, op, isRemote) {
|
|
712
712
|
const resourceKeys = op.value;
|
|
@@ -788,7 +788,8 @@ function replaceRelatedRecordsRemote(graph, op, isRemote) {
|
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
|
-
if (
|
|
791
|
+
if (diff.remoteOrderChanged) flushCanonical(graph, relationship, "remote");
|
|
792
|
+
if (diff.changed) flushCanonical(graph, relationship, "local");
|
|
792
793
|
}
|
|
793
794
|
function addToInverse(graph, resourceKey, key, value, isRemote) {
|
|
794
795
|
const relationship = graph.get(resourceKey, key);
|
|
@@ -804,11 +805,12 @@ function addToInverse(graph, resourceKey, key, value, isRemote) {
|
|
|
804
805
|
graph._addToTransaction(relationship);
|
|
805
806
|
if (relationship.remoteState !== null) removeFromInverse(graph, relationship.remoteState, relationship.definition.inverseKey, resourceKey, isRemote);
|
|
806
807
|
relationship.remoteState = value;
|
|
808
|
+
notifyChange(graph, relationship);
|
|
807
809
|
}
|
|
808
810
|
if (relationship.localState !== value) {
|
|
809
811
|
if (!isRemote && relationship.localState) removeFromInverse(graph, relationship.localState, relationship.definition.inverseKey, resourceKey, isRemote);
|
|
810
812
|
relationship.localState = value;
|
|
811
|
-
notifyChange(graph, relationship);
|
|
813
|
+
if (!isRemote) notifyChange(graph, relationship, "local");
|
|
812
814
|
}
|
|
813
815
|
} else if (isHasMany(relationship)) {
|
|
814
816
|
if (isRemote) {
|
|
@@ -825,7 +827,7 @@ function addToInverse(graph, resourceKey, key, value, isRemote) {
|
|
|
825
827
|
}
|
|
826
828
|
} else {
|
|
827
829
|
if (!relationship.isDirty && !relationship.localState) relationship.localState = [];
|
|
828
|
-
if (_add(graph, resourceKey, relationship, value, null, isRemote)) notifyChange(graph, relationship);
|
|
830
|
+
if (_add(graph, resourceKey, relationship, value, null, isRemote)) notifyChange(graph, relationship, "local");
|
|
829
831
|
}
|
|
830
832
|
} else if (isRemote) {
|
|
831
833
|
if (!relationship.remoteMembers.has(value)) {
|
|
@@ -845,23 +847,24 @@ function removeFromInverse(graph, resourceKey, key, value, isRemote) {
|
|
|
845
847
|
if (isRemote) {
|
|
846
848
|
graph._addToTransaction(relationship);
|
|
847
849
|
relationship.remoteState = null;
|
|
850
|
+
notifyChange(graph, relationship);
|
|
848
851
|
}
|
|
849
852
|
if (relationship.localState === value) {
|
|
850
853
|
relationship.localState = null;
|
|
851
|
-
notifyChange(graph, relationship);
|
|
854
|
+
if (!isRemote) notifyChange(graph, relationship, "local");
|
|
852
855
|
}
|
|
853
856
|
} else if (isHasMany(relationship)) {
|
|
854
857
|
if (isRemote) {
|
|
855
858
|
graph._addToTransaction(relationship);
|
|
856
859
|
if (_removeRemote(relationship, value)) notifyChange(graph, relationship);
|
|
857
|
-
} else if (_removeLocal(relationship, value)) notifyChange(graph, relationship);
|
|
860
|
+
} else if (_removeLocal(relationship, value)) notifyChange(graph, relationship, "local");
|
|
858
861
|
} else if (isRemote) {
|
|
859
862
|
relationship.remoteMembers.delete(value);
|
|
860
863
|
relationship.localMembers.delete(value);
|
|
861
864
|
} else if (value && relationship.localMembers.has(value)) relationship.localMembers.delete(value);
|
|
862
865
|
}
|
|
863
|
-
function flushCanonical(graph, rel) {
|
|
864
|
-
if (rel.accessed) graph._scheduleLocalSync(rel);
|
|
866
|
+
function flushCanonical(graph, rel, channel) {
|
|
867
|
+
if (rel.accessed) graph._scheduleLocalSync(rel, channel);
|
|
865
868
|
}
|
|
866
869
|
|
|
867
870
|
//#endregion
|
|
@@ -895,7 +898,7 @@ function replaceRelatedRecord(graph, op, isRemote = false) {
|
|
|
895
898
|
until: "6.0",
|
|
896
899
|
url: "https://deprecations.emberjs.com/v5.x#ember-data-deprecate-relationship-remote-update-clearing-local-state"
|
|
897
900
|
});
|
|
898
|
-
notifyChange(graph, relationship);
|
|
901
|
+
notifyChange(graph, relationship, "local");
|
|
899
902
|
}
|
|
900
903
|
}
|
|
901
904
|
}
|
|
@@ -922,12 +925,11 @@ function replaceRelatedRecord(graph, op, isRemote = false) {
|
|
|
922
925
|
addToInverse(graph, op.value, definition.inverseKey, op.record, isRemote);
|
|
923
926
|
}
|
|
924
927
|
if (isRemote) {
|
|
928
|
+
notifyChange(graph, relationship);
|
|
925
929
|
const { localState, remoteState } = relationship;
|
|
926
930
|
if (localState && checkIfNew(graph._realStore, localState) && !remoteState) return;
|
|
927
|
-
if (localState !== remoteState && localState === existingState)
|
|
928
|
-
|
|
929
|
-
notifyChange(graph, relationship);
|
|
930
|
-
} else if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {
|
|
931
|
+
if (localState !== remoteState && localState === existingState) relationship.localState = remoteState;
|
|
932
|
+
else if (macroCondition(getGlobalConfig().WarpDrive.deprecations.DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE)) {
|
|
931
933
|
if (localState !== remoteState && localState !== existingState && relationship.definition.resetOnRemoteUpdate !== false) {
|
|
932
934
|
relationship.localState = remoteState;
|
|
933
935
|
deprecate(`WarpDrive is changing the default semantics of updates to the remote state of relationships.\n\nThe following local state was cleared from the <${relationship.identifier.type}>.${relationship.definition.key} belongsTo relationship but will not be once this deprecation is resolved:\n\n\t${localState ? "Added: " + localState.lid + "\n " : ""}${existingState ? "Removed: " + existingState.lid : ""}`, false, {
|
|
@@ -940,10 +942,9 @@ function replaceRelatedRecord(graph, op, isRemote = false) {
|
|
|
940
942
|
until: "6.0",
|
|
941
943
|
url: "https://deprecations.emberjs.com/v5.x#ember-data-deprecate-relationship-remote-update-clearing-local-state"
|
|
942
944
|
});
|
|
943
|
-
notifyChange(graph, relationship);
|
|
944
945
|
}
|
|
945
946
|
}
|
|
946
|
-
} else notifyChange(graph, relationship);
|
|
947
|
+
} else notifyChange(graph, relationship, "local");
|
|
947
948
|
}
|
|
948
949
|
|
|
949
950
|
//#endregion
|
|
@@ -1478,7 +1479,7 @@ function addToRelatedRecords(graph, op, isRemote) {
|
|
|
1478
1479
|
if (!relationship.isDirty && !relationship.localState) relationship.localState = [];
|
|
1479
1480
|
if (Array.isArray(value)) for (let i = 0; i < value.length; i++) addRelatedRecord(graph, relationship, record, value[i], index !== void 0 ? index + i : null, isRemote);
|
|
1480
1481
|
else addRelatedRecord(graph, relationship, record, value, index ?? null, isRemote);
|
|
1481
|
-
notifyChange(graph, relationship);
|
|
1482
|
+
notifyChange(graph, relationship, isRemote ? void 0 : "local");
|
|
1482
1483
|
}
|
|
1483
1484
|
function addRelatedRecord(graph, relationship, record, value, index, isRemote) {
|
|
1484
1485
|
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) && ((test) => {
|
|
@@ -1508,11 +1509,16 @@ function mergeInRelationship(graph, rel, op) {
|
|
|
1508
1509
|
else mergeImplicit(graph, rel, op);
|
|
1509
1510
|
}
|
|
1510
1511
|
function mergeBelongsTo(graph, rel, op) {
|
|
1511
|
-
|
|
1512
|
+
let changed = false;
|
|
1513
|
+
if (rel.remoteState === op.record) {
|
|
1514
|
+
rel.remoteState = op.value;
|
|
1515
|
+
changed = true;
|
|
1516
|
+
}
|
|
1512
1517
|
if (rel.localState === op.record) {
|
|
1513
1518
|
rel.localState = op.value;
|
|
1514
|
-
|
|
1519
|
+
changed = true;
|
|
1515
1520
|
}
|
|
1521
|
+
if (changed) notifyChange(graph, rel);
|
|
1516
1522
|
}
|
|
1517
1523
|
function mergeHasMany(graph, rel, op) {
|
|
1518
1524
|
if (rel.remoteMembers.has(op.record)) {
|
|
@@ -1571,7 +1577,7 @@ function removeFromRelatedRecords(graph, op, isRemote) {
|
|
|
1571
1577
|
})(isHasMany(relationship));
|
|
1572
1578
|
if (Array.isArray(value)) for (let i = 0; i < value.length; i++) removeRelatedRecord(graph, record, relationship, value[i], op.index ?? null, isRemote);
|
|
1573
1579
|
else removeRelatedRecord(graph, record, relationship, value, op.index ?? null, isRemote);
|
|
1574
|
-
notifyChange(graph, relationship);
|
|
1580
|
+
notifyChange(graph, relationship, isRemote ? void 0 : "local");
|
|
1575
1581
|
}
|
|
1576
1582
|
function removeRelatedRecord(graph, record, relationship, value, index, isRemote) {
|
|
1577
1583
|
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) && ((test) => {
|
|
@@ -1743,8 +1749,11 @@ var Graph = class {
|
|
|
1743
1749
|
* {@link Graph.push} but not yet flushed into the graph by {@link Graph._flushRemoteQueue}.
|
|
1744
1750
|
*/
|
|
1745
1751
|
/**
|
|
1746
|
-
* The
|
|
1747
|
-
*
|
|
1752
|
+
* The {@link CollectionEdge}s that have changes pending notification, scheduled via
|
|
1753
|
+
* {@link Graph._scheduleLocalSync} and drained by {@link Graph._flushLocalQueue}, each
|
|
1754
|
+
* mapped to the {@link NotificationChannel} the notification should be scoped to —
|
|
1755
|
+
* `null` when it must reach every subscriber (scheduled unscoped, or scheduled for
|
|
1756
|
+
* both channels).
|
|
1748
1757
|
*/
|
|
1749
1758
|
/**
|
|
1750
1759
|
* The identifier of the current remote-update transaction, or `null` when no transaction is
|
|
@@ -1770,7 +1779,7 @@ var Graph = class {
|
|
|
1770
1779
|
hasMany: void 0,
|
|
1771
1780
|
deletions: []
|
|
1772
1781
|
};
|
|
1773
|
-
this._updatedRelationships = /* @__PURE__ */ new
|
|
1782
|
+
this._updatedRelationships = /* @__PURE__ */ new Map();
|
|
1774
1783
|
this._transaction = null;
|
|
1775
1784
|
this._removing = null;
|
|
1776
1785
|
this.silenceNotifications = false;
|
|
@@ -2116,12 +2125,16 @@ var Graph = class {
|
|
|
2116
2125
|
}
|
|
2117
2126
|
}
|
|
2118
2127
|
/**
|
|
2119
|
-
* Marks a {@link CollectionEdge} as having
|
|
2120
|
-
*
|
|
2121
|
-
*
|
|
2128
|
+
* Marks a {@link CollectionEdge} as having changes that need to be notified on the given
|
|
2129
|
+
* {@link NotificationChannel} (omitted = unscoped, reaching every subscriber), and schedules
|
|
2130
|
+
* a flush of the sync queue (see {@link Graph._flushLocalQueue}) if one is not already
|
|
2131
|
+
* pending. Scheduling the same edge for both channels (or once unscoped) coalesces into a
|
|
2132
|
+
* single unscoped notification.
|
|
2122
2133
|
*/
|
|
2123
|
-
_scheduleLocalSync(relationship) {
|
|
2124
|
-
this._updatedRelationships
|
|
2134
|
+
_scheduleLocalSync(relationship, channel) {
|
|
2135
|
+
const pending = this._updatedRelationships;
|
|
2136
|
+
if (!pending.has(relationship)) pending.set(relationship, channel ?? null);
|
|
2137
|
+
else if (pending.get(relationship) !== (channel ?? null)) pending.set(relationship, null);
|
|
2125
2138
|
if (!this._willSyncLocal) {
|
|
2126
2139
|
this._willSyncLocal = true;
|
|
2127
2140
|
getStore(this.store)._schedule("sync", () => this._flushLocalQueue());
|
|
@@ -2180,13 +2193,13 @@ var Graph = class {
|
|
|
2180
2193
|
if (!this._willSyncLocal) return;
|
|
2181
2194
|
if (this.silenceNotifications) {
|
|
2182
2195
|
this.silenceNotifications = false;
|
|
2183
|
-
this._updatedRelationships = /* @__PURE__ */ new
|
|
2196
|
+
this._updatedRelationships = /* @__PURE__ */ new Map();
|
|
2184
2197
|
return;
|
|
2185
2198
|
}
|
|
2186
2199
|
this._willSyncLocal = false;
|
|
2187
2200
|
const updated = this._updatedRelationships;
|
|
2188
|
-
this._updatedRelationships = /* @__PURE__ */ new
|
|
2189
|
-
updated.forEach((rel) => notifyChange(this, rel));
|
|
2201
|
+
this._updatedRelationships = /* @__PURE__ */ new Map();
|
|
2202
|
+
updated.forEach((channel, rel) => notifyChange(this, rel, channel ?? void 0));
|
|
2190
2203
|
}
|
|
2191
2204
|
/**
|
|
2192
2205
|
* Tears down the graph: clears all tracked identifiers/edges, removes it from the global
|