@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,15 +1,15 @@
|
|
|
1
|
-
import { a as setTransient, i as peekUniversalTransient, o as setUniversalTransient, r as peekTransient, t as getOrSetGlobal } from "./-private-
|
|
2
|
-
import {
|
|
1
|
+
import { a as setTransient, i as peekUniversalTransient, o as setUniversalTransient, r as peekTransient, t as getOrSetGlobal } from "./-private-D6Tw25AD.js";
|
|
2
|
+
import { A as ARRAY_SIGNAL, C as createInternalMemo, D as notifyInternalSignal, N as waitFor, O as peekInternalSignal, P as willSyncFlushWatchers, S as consumeInternalSignal, T as getOrCreateInternalSignal, _ as entangleSignal, f as createSignalDescriptor, g as entangleInitiallyStaleSignal, h as defineSignal, j as OBJECT_SIGNAL, k as withSignalStore, p as defineGate, w as createInternalSignal, x as Signals } from "./-private-BoSTJwp9.js";
|
|
3
3
|
import { EnableHydration, STRUCTURED, SkipCache } from "./types/request.js";
|
|
4
4
|
import { CACHE_OWNER, DEBUG_CLIENT_ORIGINATED, DEBUG_KEY_TYPE, DEBUG_STALE_CACHE_OWNER } from "./types/identifier.js";
|
|
5
|
-
import { a as upgradePromise, c as executeNextHandler, d as getRequestResult, f as setPromiseResult, l as clearRequestResult, m as assertValidRequest, o as DOMError, p as cloneResponseProperties, s as IS_CACHE_HANDLER, t as withBrand } from "./request-
|
|
5
|
+
import { a as upgradePromise, c as executeNextHandler, d as getRequestResult, f as setPromiseResult, l as clearRequestResult, m as assertValidRequest, o as DOMError, p as cloneResponseProperties, s as IS_CACHE_HANDLER, t as withBrand } from "./request-CwjpJB3r.js";
|
|
6
6
|
import { getRuntimeConfig, setIsMaybeMirage, setLogging } from "./types/runtime.js";
|
|
7
|
-
import { a as SOURCE, i as Destroy, n as Commit, r as Context, t as Checkout } from "./-private-
|
|
7
|
+
import { a as SOURCE, i as Destroy, n as Commit, r as Context, t as Checkout } from "./-private-CUkeqUhO.js";
|
|
8
8
|
import { dasherize } from "./utils/string.js";
|
|
9
|
-
import { t as getGlobalConfig } from "./runtime-
|
|
9
|
+
import { t as getGlobalConfig } from "./runtime-CPL2BGgT.js";
|
|
10
10
|
import { RecordStore, Type } from "./types/symbols.js";
|
|
11
11
|
import { isResourceSchema } from "./types/schema/fields.js";
|
|
12
|
-
import { t as DefaultCachePolicy } from "./store-
|
|
12
|
+
import { t as DefaultCachePolicy } from "./store-Bsdz5mRe.js";
|
|
13
13
|
import * as _importSync20 from "@ember/object";
|
|
14
14
|
|
|
15
15
|
//#region src/reactive/-private/document.ts
|
|
@@ -1110,13 +1110,18 @@ var CacheCapabilitiesManager = class {
|
|
|
1110
1110
|
return this.cacheKeyManager;
|
|
1111
1111
|
}
|
|
1112
1112
|
/** @internal */
|
|
1113
|
-
_scheduleNotification(identifier, key) {
|
|
1113
|
+
_scheduleNotification(identifier, key, channel) {
|
|
1114
1114
|
let pending = this._pendingNotifies.get(identifier);
|
|
1115
1115
|
if (!pending) {
|
|
1116
|
-
pending = /* @__PURE__ */ new
|
|
1116
|
+
pending = /* @__PURE__ */ new Map();
|
|
1117
1117
|
this._pendingNotifies.set(identifier, pending);
|
|
1118
1118
|
}
|
|
1119
|
-
pending.
|
|
1119
|
+
let channels = pending.get(key);
|
|
1120
|
+
if (!channels) {
|
|
1121
|
+
channels = /* @__PURE__ */ new Set();
|
|
1122
|
+
pending.set(key, channels);
|
|
1123
|
+
}
|
|
1124
|
+
channels.add(channel);
|
|
1120
1125
|
if (this._willNotify === true) return;
|
|
1121
1126
|
this._willNotify = true;
|
|
1122
1127
|
if (this._store._cbs) this._store._schedule("notify", () => this._flushNotifications());
|
|
@@ -1128,11 +1133,24 @@ var CacheCapabilitiesManager = class {
|
|
|
1128
1133
|
const pending = this._pendingNotifies;
|
|
1129
1134
|
this._pendingNotifies = /* @__PURE__ */ new Map();
|
|
1130
1135
|
this._willNotify = false;
|
|
1131
|
-
pending.forEach((
|
|
1132
|
-
|
|
1136
|
+
pending.forEach((channelsByKey, identifier) => {
|
|
1137
|
+
const keysByChannel = /* @__PURE__ */ new Map();
|
|
1138
|
+
channelsByKey.forEach((channels, key) => {
|
|
1139
|
+
channels.forEach((channel) => {
|
|
1140
|
+
let keys = keysByChannel.get(channel);
|
|
1141
|
+
if (!keys) {
|
|
1142
|
+
keys = /* @__PURE__ */ new Set();
|
|
1143
|
+
keysByChannel.set(channel, keys);
|
|
1144
|
+
}
|
|
1145
|
+
keys.add(key);
|
|
1146
|
+
});
|
|
1147
|
+
});
|
|
1148
|
+
keysByChannel.forEach((keys, channel) => {
|
|
1149
|
+
this._store.notifications.notify(identifier, "relationships", keys, channel);
|
|
1150
|
+
});
|
|
1133
1151
|
});
|
|
1134
1152
|
}
|
|
1135
|
-
notifyChange(identifier, namespace, key) {
|
|
1153
|
+
notifyChange(identifier, namespace, key, channel) {
|
|
1136
1154
|
((test) => {
|
|
1137
1155
|
if (!test) throw new Error(`Expected a stable identifier`);
|
|
1138
1156
|
})(isResourceKey(identifier) || isRequestKey(identifier));
|
|
@@ -1140,10 +1158,10 @@ var CacheCapabilitiesManager = class {
|
|
|
1140
1158
|
((test) => {
|
|
1141
1159
|
if (!test) throw new Error(`Expected a single relationship key`);
|
|
1142
1160
|
})(typeof key === "string");
|
|
1143
|
-
this._scheduleNotification(identifier, key);
|
|
1161
|
+
this._scheduleNotification(identifier, key, channel);
|
|
1144
1162
|
return;
|
|
1145
1163
|
}
|
|
1146
|
-
this._store.notifications.notify(identifier, namespace, key);
|
|
1164
|
+
this._store.notifications.notify(identifier, namespace, key, channel);
|
|
1147
1165
|
}
|
|
1148
1166
|
get schema() {
|
|
1149
1167
|
return this._store.schema;
|
|
@@ -1874,6 +1892,52 @@ function isCacheOperationValue(value) {
|
|
|
1874
1892
|
* @since 5.9.0
|
|
1875
1893
|
* @public
|
|
1876
1894
|
*/
|
|
1895
|
+
/**
|
|
1896
|
+
* A change to a resource's `attributes` or `relationships` can be relevant to
|
|
1897
|
+
* a "local" view of the resource (its mutable/editable state), a "remote" view
|
|
1898
|
+
* (its last-known-persisted state), or both.
|
|
1899
|
+
*
|
|
1900
|
+
* Each view subscribes to its own channel and, when notified, re-pulls its own
|
|
1901
|
+
* projection of the data: a remote-only reader (e.g. PolarisMode's default
|
|
1902
|
+
* immutable record) subscribes `'remote'` and re-reads remote state; an
|
|
1903
|
+
* editable/reconciled reader (a legacy record, or an editable checkout)
|
|
1904
|
+
* subscribes `'local'` (the same as omitting the channel) and re-reads local
|
|
1905
|
+
* state. A notifier that knows which projection changed tags the notification
|
|
1906
|
+
* with that channel; each tag is delivered only to that channel's subscribers.
|
|
1907
|
+
* A change affecting both projections is either notified unscoped or once per
|
|
1908
|
+
* channel. An unscoped notify cannot guarantee which view changed, so it
|
|
1909
|
+
* reaches every subscriber -- this keeps every pre-channel `notify` callsite
|
|
1910
|
+
* (and any custom cache that doesn't know about channels) fully compatible.
|
|
1911
|
+
*
|
|
1912
|
+
* The full delivery matrix:
|
|
1913
|
+
*
|
|
1914
|
+
* | notify ↓ subscribe → | `'local'` | `'remote'` | omitted (= `'local'`) |
|
|
1915
|
+
* | -------------------- | --------- | ---------- | --------------------- |
|
|
1916
|
+
* | `'local'` | ✅ | ❌ | ✅ |
|
|
1917
|
+
* | `'remote'` | ❌ | ✅ | ❌ |
|
|
1918
|
+
* | omitted | ✅ | ✅ | ✅ |
|
|
1919
|
+
*
|
|
1920
|
+
* Channel only applies to the `'attributes'` and `'relationships'`
|
|
1921
|
+
* notification types. All other types (`'errors'`,
|
|
1922
|
+
* `'identity'`, `'state'`, and the various `CacheOperation`/
|
|
1923
|
+
* `DocumentCacheOperation` values) are never filtered by channel since they
|
|
1924
|
+
* have no local/remote duality.
|
|
1925
|
+
*
|
|
1926
|
+
* @public
|
|
1927
|
+
*/
|
|
1928
|
+
/**
|
|
1929
|
+
* Well-known sentinel recorded in a {@link ChannelSet} for a touch that
|
|
1930
|
+
* carried no channel. An unscoped touch always reaches every subscriber
|
|
1931
|
+
* regardless of what channel(s) the same key was also touched with, so its
|
|
1932
|
+
* presence in the set short-circuits channel filtering.
|
|
1933
|
+
*/
|
|
1934
|
+
const UnscopedChannel = getOrSetGlobal("UnscopedChannel", Symbol("unscoped"));
|
|
1935
|
+
/**
|
|
1936
|
+
* The set of channels (if any) a given `'attributes'`/`'relationships'` touch
|
|
1937
|
+
* was tagged with while buffered. {@link UnscopedChannel} is included in this
|
|
1938
|
+
* set when at least one of the coalesced touches was itself unscoped (no
|
|
1939
|
+
* channel given).
|
|
1940
|
+
*/
|
|
1877
1941
|
function keyToString(key) {
|
|
1878
1942
|
return key instanceof Set ? Array.from(key).join(", ") : key || "";
|
|
1879
1943
|
}
|
|
@@ -1883,44 +1947,83 @@ function keyToString(key) {
|
|
|
1883
1947
|
* a single flush window.
|
|
1884
1948
|
*
|
|
1885
1949
|
* The buffer is a `Map` from namespace (`'attributes'`, `'relationships'`,
|
|
1886
|
-
* `'state'`, etc.) to
|
|
1887
|
-
*
|
|
1888
|
-
*
|
|
1889
|
-
*
|
|
1890
|
-
*
|
|
1891
|
-
*
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1894
|
-
*
|
|
1895
|
-
*
|
|
1896
|
-
*
|
|
1897
|
-
*
|
|
1898
|
-
*
|
|
1899
|
-
*
|
|
1900
|
-
*
|
|
1901
|
-
*
|
|
1902
|
-
*
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
1906
|
-
*
|
|
1907
|
-
*
|
|
1950
|
+
* `'state'`, etc.) to a "bucket". Using a `Map` means the *first* time a
|
|
1951
|
+
* namespace is touched during this flush window fixes its position in
|
|
1952
|
+
* iteration order; every subsequent touch to that same namespace (regardless
|
|
1953
|
+
* of how much later, or how many other namespaces fired in between) updates
|
|
1954
|
+
* its value in place without moving it. This preserves the relative order in
|
|
1955
|
+
* which *different* namespaces first fired, while intentionally not tracking
|
|
1956
|
+
* the arrival order of repeated touches to the *same* namespace - those are
|
|
1957
|
+
* provably safe to coalesce because subscribers never receive anything about
|
|
1958
|
+
* a notification beyond `(cacheKey, type, key?)`.
|
|
1959
|
+
*
|
|
1960
|
+
* For every namespace other than `'attributes'`/`'relationships'`, subscriber
|
|
1961
|
+
* callbacks never receive a key at all (and channel never applies to them -
|
|
1962
|
+
* see {@link NotificationChannel}), so the bucket is simply `null`, used
|
|
1963
|
+
* purely as a "this namespace fired at least once" presence marker; multiple
|
|
1964
|
+
* firings within one flush all collapse to the same single marker.
|
|
1965
|
+
*
|
|
1966
|
+
* For `'attributes'`/`'relationships'`, a key (or channel) *does* matter, so
|
|
1967
|
+
* the bucket is one of:
|
|
1968
|
+
* - a `Map<string, ChannelSet>`: the normal case, mapping each specific key
|
|
1969
|
+
* touched to the set of channels it was touched with ({@link UnscopedChannel}
|
|
1970
|
+
* in that set means at least one of those touches was itself unscoped).
|
|
1971
|
+
* - a `ChannelSet` directly: a wildcard meaning "an unspecified set of keys
|
|
1972
|
+
* changed" - a strict superset of any specific key list, per the existing
|
|
1973
|
+
* contract of {@link CacheCapabilitiesManager.notifyChange} - tagged with
|
|
1974
|
+
* the set of channels any of the coalesced keyless (or post-wildcard
|
|
1975
|
+
* keyed) touches carried.
|
|
1976
|
+
*
|
|
1977
|
+
* A keyless call always upgrades the bucket to the wildcard form. When
|
|
1978
|
+
* upgrading away from a `Map`, every channel ever recorded against any of
|
|
1979
|
+
* its specific keys is folded into the new wildcard `ChannelSet` - the
|
|
1980
|
+
* wildcard must remain a superset not just key-wise but channel-wise too, or
|
|
1981
|
+
* a channel-scoped subscriber that would have heard about one of those
|
|
1982
|
+
* specific keys could silently stop hearing about it once the bucket flips
|
|
1983
|
+
* to wildcard. Once a bucket is a wildcard it can never downgrade back to a
|
|
1984
|
+
* `Map`; a keyed touch that arrives after that point still folds its channel
|
|
1985
|
+
* into the wildcard's `ChannelSet` (the specific key itself is discarded,
|
|
1986
|
+
* since the wildcard already covers it).
|
|
1908
1987
|
*/
|
|
1909
|
-
function mergeIntoBuffer(buffer, value, key) {
|
|
1988
|
+
function mergeIntoBuffer(buffer, value, key, channel) {
|
|
1910
1989
|
if (value !== "attributes" && value !== "relationships") {
|
|
1911
1990
|
buffer.set(value, null);
|
|
1912
1991
|
return;
|
|
1913
1992
|
}
|
|
1914
1993
|
const existing = buffer.get(value);
|
|
1915
1994
|
if (key === null || key === void 0) {
|
|
1916
|
-
|
|
1995
|
+
const channels = existing instanceof Set ? existing : /* @__PURE__ */ new Set();
|
|
1996
|
+
if (existing instanceof Map) for (const channelsForKey of existing.values()) for (const ch of channelsForKey) channels.add(ch);
|
|
1997
|
+
channels.add(channel ?? UnscopedChannel);
|
|
1998
|
+
buffer.set(value, channels);
|
|
1917
1999
|
return;
|
|
1918
2000
|
}
|
|
1919
|
-
if (existing
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
2001
|
+
if (existing instanceof Set) {
|
|
2002
|
+
existing.add(channel ?? UnscopedChannel);
|
|
2003
|
+
return;
|
|
2004
|
+
}
|
|
2005
|
+
const map = existing ?? /* @__PURE__ */ new Map();
|
|
2006
|
+
if (!existing) buffer.set(value, map);
|
|
2007
|
+
const keys = key instanceof Set ? key : [key];
|
|
2008
|
+
for (const k of keys) {
|
|
2009
|
+
let channels = map.get(k);
|
|
2010
|
+
if (!channels) {
|
|
2011
|
+
channels = /* @__PURE__ */ new Set();
|
|
2012
|
+
map.set(k, channels);
|
|
2013
|
+
}
|
|
2014
|
+
channels.add(channel ?? UnscopedChannel);
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
/**
|
|
2018
|
+
* Given the set of channels a touch (or coalesced group of touches) was
|
|
2019
|
+
* recorded with, determines whether a subscriber scoped to `subscriberChannel`
|
|
2020
|
+
* should be delivered to (see the delivery matrix on
|
|
2021
|
+
* {@link NotificationChannel}): a subscriber hears a touch-set if any of its
|
|
2022
|
+
* touches was unscoped or tagged with the subscriber's own channel; a
|
|
2023
|
+
* touch-set exclusively tagged with the *other* channel is skipped.
|
|
2024
|
+
*/
|
|
2025
|
+
function shouldDeliverToChannel(channels, subscriberChannel) {
|
|
2026
|
+
return channels.has(UnscopedChannel) || channels.has(subscriberChannel);
|
|
1924
2027
|
}
|
|
1925
2028
|
function count(label) {
|
|
1926
2029
|
globalThis.__WarpDriveMetricCountData[label] = (globalThis.__WarpDriveMetricCountData[label] || 0) + 1;
|
|
@@ -1995,10 +2098,23 @@ var NotificationManager = class {
|
|
|
1995
2098
|
* }
|
|
1996
2099
|
* ```
|
|
1997
2100
|
*
|
|
2101
|
+
* A `channel` may be provided when subscribing to a `ResourceKey`. Its
|
|
2102
|
+
* effect is that the subscription skips `'attributes'`/`'relationships'`
|
|
2103
|
+
* notifications explicitly tagged with the *other* channel; unscoped
|
|
2104
|
+
* notifications, and notifications for all other notification types, always
|
|
2105
|
+
* reach the subscriber. Subscribing `'local'` and omitting the channel are
|
|
2106
|
+
* the same thing. See {@link NotificationChannel}.
|
|
2107
|
+
*
|
|
2108
|
+
* | notify ↓ subscribe → | `'local'` | `'remote'` | omitted (= `'local'`) |
|
|
2109
|
+
* | -------------------- | --------- | ---------- | --------------------- |
|
|
2110
|
+
* | `'local'` | ✅ | ❌ | ✅ |
|
|
2111
|
+
* | `'remote'` | ❌ | ✅ | ❌ |
|
|
2112
|
+
* | omitted | ✅ | ✅ | ✅ |
|
|
2113
|
+
*
|
|
1998
2114
|
* @public
|
|
1999
2115
|
* @return an opaque token to be used with unsubscribe
|
|
2000
2116
|
*/
|
|
2001
|
-
subscribe(cacheKey, callback) {
|
|
2117
|
+
subscribe(cacheKey, callback, channel) {
|
|
2002
2118
|
((test) => {
|
|
2003
2119
|
if (!test) throw new Error(`Expected not to be destroyed`);
|
|
2004
2120
|
})(!this.isDestroyed);
|
|
@@ -2013,6 +2129,7 @@ var NotificationManager = class {
|
|
|
2013
2129
|
if (!test) throw new Error(`cannot subscribe with the same callback twice`);
|
|
2014
2130
|
})(!callbacks || !callbacks.includes(callback));
|
|
2015
2131
|
callback.for = cacheKey;
|
|
2132
|
+
callback.channel = channel ?? "local";
|
|
2016
2133
|
if (!callbacks) {
|
|
2017
2134
|
callbacks = [];
|
|
2018
2135
|
this._cache.set(cacheKey, callbacks);
|
|
@@ -2042,13 +2159,29 @@ var NotificationManager = class {
|
|
|
2042
2159
|
* buffer/flush scheduling) only once for the whole batch instead of once
|
|
2043
2160
|
* per key.
|
|
2044
2161
|
*
|
|
2162
|
+
* A `channel` may be supplied for the `'attributes'`/`'relationships'`
|
|
2163
|
+
* namespaces. Tagging a notification `'local'` declares "only the local
|
|
2164
|
+
* (reconciled/editable) view changed"; tagging it `'remote'` declares "only
|
|
2165
|
+
* the remote view changed". Each tag is delivered only to that channel's
|
|
2166
|
+
* subscribers. Omitting the channel reaches every subscriber regardless of
|
|
2167
|
+
* its channel. See {@link NotificationChannel}.
|
|
2168
|
+
*
|
|
2169
|
+
* | notify ↓ subscribe → | `'local'` | `'remote'` | omitted (= `'local'`) |
|
|
2170
|
+
* | -------------------- | --------- | ---------- | --------------------- |
|
|
2171
|
+
* | `'local'` | ✅ | ❌ | ✅ |
|
|
2172
|
+
* | `'remote'` | ❌ | ✅ | ❌ |
|
|
2173
|
+
* | omitted | ✅ | ✅ | ✅ |
|
|
2174
|
+
*
|
|
2045
2175
|
* @private
|
|
2046
2176
|
*/
|
|
2047
|
-
notify(cacheKey, value, key) {
|
|
2177
|
+
notify(cacheKey, value, key, channel) {
|
|
2048
2178
|
if (this.isDestroyed) return false;
|
|
2049
2179
|
((test) => {
|
|
2050
2180
|
if (!test) throw new Error(`Notify does not accept a key argument for the namespace '${value}'. Received key '${keyToString(key)}'.`);
|
|
2051
2181
|
})(!key || value === "attributes" || value === "relationships");
|
|
2182
|
+
((test) => {
|
|
2183
|
+
if (!test) throw new Error(`Notify does not accept a channel argument for the namespace '${value}'. Received channel '${channel || ""}'.`);
|
|
2184
|
+
})(!channel || value === "attributes" || value === "relationships");
|
|
2052
2185
|
if (!isResourceKey(cacheKey) && !isRequestKey(cacheKey)) {
|
|
2053
2186
|
if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) console.log(`Notifying: Expected to receive a stable Identifier to notify '${value}' '${keyToString(key)}' with, but ${String(cacheKey)} is not in the cache`, cacheKey);
|
|
2054
2187
|
return false;
|
|
@@ -2060,7 +2193,7 @@ var NotificationManager = class {
|
|
|
2060
2193
|
buffer = /* @__PURE__ */ new Map();
|
|
2061
2194
|
this._buffered.set(cacheKey, buffer);
|
|
2062
2195
|
}
|
|
2063
|
-
mergeIntoBuffer(buffer, value, key);
|
|
2196
|
+
mergeIntoBuffer(buffer, value, key, channel);
|
|
2064
2197
|
if (getGlobalConfig().WarpDrive.debug.LOG_METRIC_COUNTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_METRIC_COUNTS) count(`notify ${"type" in cacheKey ? cacheKey.type : "<document>"} ${value} ${keyToString(key)}`);
|
|
2065
2198
|
if (!this._scheduleNotify()) {
|
|
2066
2199
|
if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) log("notify", "buffered", `${"type" in cacheKey ? cacheKey.type : "document"}`, cacheKey.lid, `${value}`, keyToString(key));
|
|
@@ -2093,8 +2226,9 @@ var NotificationManager = class {
|
|
|
2093
2226
|
const buffered = this._buffered;
|
|
2094
2227
|
if (buffered.size) {
|
|
2095
2228
|
this._buffered = /* @__PURE__ */ new Map();
|
|
2096
|
-
for (const [cacheKey, states] of buffered) for (const [value,
|
|
2097
|
-
else
|
|
2229
|
+
for (const [cacheKey, states] of buffered) for (const [value, bucket] of states) if (bucket === null) _flushNotification(this._cache, cacheKey, value, null);
|
|
2230
|
+
else if (bucket instanceof Set) _flushNotification(this._cache, cacheKey, value, null, bucket);
|
|
2231
|
+
else for (const [key, channels] of bucket) _flushNotification(this._cache, cacheKey, value, key, channels);
|
|
2098
2232
|
}
|
|
2099
2233
|
this._hasFlush = false;
|
|
2100
2234
|
this._onFlushCB?.();
|
|
@@ -2113,7 +2247,7 @@ var NotificationManager = class {
|
|
|
2113
2247
|
*
|
|
2114
2248
|
* @private
|
|
2115
2249
|
*/
|
|
2116
|
-
function _flushNotification(cache, cacheKey, value, key) {
|
|
2250
|
+
function _flushNotification(cache, cacheKey, value, key, channels) {
|
|
2117
2251
|
if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) log("notify", "", `${"type" in cacheKey ? cacheKey.type : "document"}`, cacheKey.lid, `${value}`, key || "");
|
|
2118
2252
|
if (isCacheOperationValue(value)) {
|
|
2119
2253
|
const callbackMap = cache.get(isRequestKey(cacheKey) ? "document" : "resource");
|
|
@@ -2124,6 +2258,10 @@ function _flushNotification(cache, cacheKey, value, key) {
|
|
|
2124
2258
|
const callbacks = cache.get(cacheKey);
|
|
2125
2259
|
if (!callbacks || !callbacks.length) return false;
|
|
2126
2260
|
callbacks.forEach((cb) => {
|
|
2261
|
+
if (channels) {
|
|
2262
|
+
const subscriberChannel = cb.channel;
|
|
2263
|
+
if (!shouldDeliverToChannel(channels, subscriberChannel)) return;
|
|
2264
|
+
}
|
|
2127
2265
|
cb(cacheKey, value, key);
|
|
2128
2266
|
});
|
|
2129
2267
|
return true;
|
|
@@ -3040,7 +3178,7 @@ var RecordArrayManager = class {
|
|
|
3040
3178
|
}
|
|
3041
3179
|
getCollection(config) {
|
|
3042
3180
|
if ("requestKey" in config && this._keyedArrays.has(config.requestKey.lid)) return this._keyedArrays.get(config.requestKey.lid);
|
|
3043
|
-
let array
|
|
3181
|
+
let array;
|
|
3044
3182
|
if ("requestKey" in config) {
|
|
3045
3183
|
const options = {
|
|
3046
3184
|
store: this.store,
|
|
@@ -3477,7 +3615,7 @@ var RequestStateService = class {
|
|
|
3477
3615
|
* @private
|
|
3478
3616
|
*/
|
|
3479
3617
|
//#endregion
|
|
3480
|
-
//#region ../../node_modules/.pnpm/@
|
|
3618
|
+
//#region ../../node_modules/.pnpm/@embroider+macros@1.20.6/node_modules/@embroider/macros/src/addon/es-compat2.js
|
|
3481
3619
|
function esCompat(m) {
|
|
3482
3620
|
return m?.__esModule ? m : {
|
|
3483
3621
|
default: m,
|
|
@@ -3958,7 +4096,7 @@ var Store = class extends BaseClass {
|
|
|
3958
4096
|
this._join(() => {
|
|
3959
4097
|
const normalizedModelName = normalizeModelName(type);
|
|
3960
4098
|
const properties = { ...inputProperties };
|
|
3961
|
-
let id
|
|
4099
|
+
let id;
|
|
3962
4100
|
if (properties.id === null || properties.id === void 0) {
|
|
3963
4101
|
const adapter = this.adapterFor?.(normalizedModelName, true);
|
|
3964
4102
|
if (adapter && adapter.generateIdForRecord) id = properties.id = coerceId(adapter.generateIdForRecord(this, normalizedModelName, properties));
|
|
@@ -6015,7 +6153,7 @@ var ManyArrayManager = class {
|
|
|
6015
6153
|
if (rawValue.meta) array.meta = rawValue.meta;
|
|
6016
6154
|
if (rawValue.links) array.links = rawValue.links;
|
|
6017
6155
|
const currentState = array[Context].source;
|
|
6018
|
-
if (currentState !== rawValue.data) {
|
|
6156
|
+
if (rawValue.data !== void 0 && currentState !== rawValue.data) {
|
|
6019
6157
|
currentState.length = 0;
|
|
6020
6158
|
fastPush(currentState, rawValue.data);
|
|
6021
6159
|
}
|
|
@@ -6073,7 +6211,7 @@ function getHasManyField(context) {
|
|
|
6073
6211
|
if (cached) return cached;
|
|
6074
6212
|
const { editable, resourceKey } = context;
|
|
6075
6213
|
const { cache } = store;
|
|
6076
|
-
const rawValue = cache.getRelationship(resourceKey, getFieldCacheKeyStrict(field));
|
|
6214
|
+
const rawValue = editable ? cache.getRelationship(resourceKey, getFieldCacheKeyStrict(field)) : cache.getRemoteRelationship(resourceKey, getFieldCacheKeyStrict(field));
|
|
6077
6215
|
if (!rawValue) return null;
|
|
6078
6216
|
const managedArray = createLegacyManyArray({
|
|
6079
6217
|
store,
|
|
@@ -6709,7 +6847,7 @@ var ReactiveResource = class ReactiveResource {
|
|
|
6709
6847
|
}
|
|
6710
6848
|
}
|
|
6711
6849
|
}
|
|
6712
|
-
});
|
|
6850
|
+
}, context.legacy || context.editable ? "local" : "remote");
|
|
6713
6851
|
const proxy = new Proxy(this, {
|
|
6714
6852
|
ownKeys() {
|
|
6715
6853
|
const identityKey = identityField?.name;
|
|
@@ -8221,6 +8359,7 @@ const ERROR_STATUS_CODE_FOR = /* @__PURE__ */ new Map([
|
|
|
8221
8359
|
* ```
|
|
8222
8360
|
*
|
|
8223
8361
|
* @public
|
|
8362
|
+
* @badge Handler
|
|
8224
8363
|
*/
|
|
8225
8364
|
const Fetch = {
|
|
8226
8365
|
/**
|
|
@@ -8742,4 +8881,4 @@ function useRecommendedStore(options, StoreKlass = Store) {
|
|
|
8742
8881
|
|
|
8743
8882
|
//#endregion
|
|
8744
8883
|
export { setIdentifierResetMethod as A, setRecordIdentifier as C, isResourceKey as D, isRequestKey as E, ensureStringId as F, log as I, logGroup as L, setKeyInfoForResource as M, normalizeModelName as N, setIdentifierForgetMethod as O, coerceId as P, recordIdentifierFor as S, assertPrivateCapabilities as T, isPrivateStore as _, fromIdentity as a, StoreMap as b, instantiateRecord as c, commit as d, createLegacyManyArray as f, assertPrivateStore as g, Store as h, SchemaService as i, setIdentifierUpdateMethod as j, setIdentifierGenerationMethod as k, teardownRecord as l, CacheHandler as m, RequestManager as n, registerDerivations as o, constructResource as p, Fetch as r, withDefaults as s, useRecommendedStore as t, checkout as u, RecordArrayManager as v, storeFor as w, _clearCaches as x, fastPush as y };
|
|
8745
|
-
//# sourceMappingURL=src-
|
|
8884
|
+
//# sourceMappingURL=src-De8OV58h.js.map
|