@warp-drive-mirror/core 5.10.0-alpha.13 → 5.10.0-alpha.15
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/{-private-BpyvBYFj.js → -private-Y-13dsHO.js} +39 -9
- package/dist/-private-Y-13dsHO.js.map +1 -0
- package/dist/build-config/babel-macros.d.ts +5 -0
- package/dist/build-config/canary-features.d.ts +5 -0
- package/dist/build-config/debugging.d.ts +59 -0
- package/dist/build-config/deprecations.d.ts +5 -0
- package/dist/build-config.d.ts +17 -0
- package/dist/{configure-CjsojjiI.d.ts → configure-CodrrdQr.d.ts} +51 -8
- package/dist/configure-CodrrdQr.d.ts.map +1 -0
- package/dist/configure.d.ts +10 -2
- package/dist/configure.js +2 -2
- package/dist/graph/-private.d.ts +1 -1
- package/dist/graph/-private.js +2 -2
- package/dist/graph/-private.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{internal-CgOlgOt3.d.ts → internal-BOC6nyCi.d.ts} +25 -15
- package/dist/{internal-CgOlgOt3.d.ts.map → internal-BOC6nyCi.d.ts.map} +1 -1
- package/dist/reactive/-private.d.ts +1 -1
- package/dist/reactive.d.ts +276 -1
- package/dist/reactive.js +2 -2
- package/dist/{request-MiwUbGdT.js → request-DUGpwUhf.js} +23 -13
- package/dist/{request-MiwUbGdT.js.map → request-DUGpwUhf.js.map} +1 -1
- package/dist/request.d.ts +9 -1
- package/dist/request.js +1 -1
- package/dist/signals/-leaked.d.ts +16 -2
- package/dist/signals/-leaked.d.ts.map +1 -1
- package/dist/signals/-leaked.js +1 -1
- package/dist/{src-DlNeupkA.js → src-DDLNZD8D.js} +5 -5
- package/dist/{src-DlNeupkA.js.map → src-DDLNZD8D.js.map} +1 -1
- package/dist/store/-private.d.ts +1 -1
- package/dist/store/-private.js +1 -1
- package/dist/store.d.ts +6 -1
- package/dist/types/-private.d.ts +1 -0
- package/dist/types/-private.js +1 -1
- package/dist/types/cache/relationship.d.ts +5 -0
- package/dist/types/cache.d.ts +6 -1
- package/dist/types/graph.d.ts +5 -0
- package/dist/types/record.d.ts +5 -0
- package/dist/types/request.d.ts +1 -1
- package/dist/types/runtime.d.ts +10 -5
- package/dist/types/runtime.d.ts.map +1 -1
- package/dist/types/runtime.js +7 -3
- package/dist/types/runtime.js.map +1 -1
- package/dist/types/schema/concepts.d.ts +5 -0
- package/dist/types/schema/schema-service.d.ts +6 -1
- package/dist/types/spec/error.d.ts +4 -0
- package/dist/types/spec/json-api-raw.d.ts +5 -0
- package/dist/types.d.ts +9 -1
- package/dist/unpkg/dev/{-private-BH4O810v.js → -private-BoKjsWc1.js} +39 -9
- package/dist/unpkg/dev/-private-BoKjsWc1.js.map +1 -0
- package/dist/unpkg/dev/configure.js +2 -2
- package/dist/unpkg/dev/graph/-private.js +2 -2
- package/dist/unpkg/dev/graph/-private.js.map +1 -1
- package/dist/unpkg/dev/index.js +1 -1
- package/dist/unpkg/dev/reactive.js +2 -2
- package/dist/unpkg/dev/{request-Fe-vpe-u.js → request-BQUGZTOj.js} +23 -13
- package/dist/unpkg/dev/{request-Fe-vpe-u.js.map → request-BQUGZTOj.js.map} +1 -1
- package/dist/unpkg/dev/request.js +1 -1
- package/dist/unpkg/dev/signals/-leaked.js +1 -1
- package/dist/unpkg/dev/{src-FSk0Z_Lp.js → src-DqRXbeNO.js} +5 -5
- package/dist/unpkg/dev/{src-FSk0Z_Lp.js.map → src-DqRXbeNO.js.map} +1 -1
- package/dist/unpkg/dev/store/-private.js +1 -1
- package/dist/unpkg/dev/types/-private.js +1 -1
- package/dist/unpkg/dev/types/runtime.js +7 -3
- package/dist/unpkg/dev/types/runtime.js.map +1 -1
- package/dist/unpkg/dev-deprecated/{-private-BH4O810v.js → -private-BoKjsWc1.js} +39 -9
- package/dist/unpkg/dev-deprecated/-private-BoKjsWc1.js.map +1 -0
- package/dist/unpkg/dev-deprecated/configure.js +2 -2
- package/dist/unpkg/dev-deprecated/graph/-private.js +2 -2
- 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.js +2 -2
- package/dist/unpkg/dev-deprecated/{request-Fe-vpe-u.js → request-BQUGZTOj.js} +23 -13
- package/dist/unpkg/dev-deprecated/{request-Fe-vpe-u.js.map → request-BQUGZTOj.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/request.js +1 -1
- package/dist/unpkg/dev-deprecated/signals/-leaked.js +1 -1
- package/dist/unpkg/dev-deprecated/{src-Isk_Je7q.js → src-EY9o2zd6.js} +5 -5
- package/dist/unpkg/dev-deprecated/{src-Isk_Je7q.js.map → src-EY9o2zd6.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/store/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/types/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/types/runtime.js +7 -3
- package/dist/unpkg/dev-deprecated/types/runtime.js.map +1 -1
- package/dist/unpkg/{prod-deprecated/-private-DKVDMUfT.js → prod/-private-CRDwlN1v.js} +39 -9
- package/dist/unpkg/prod/-private-CRDwlN1v.js.map +1 -0
- package/dist/unpkg/prod/configure.js +2 -2
- package/dist/unpkg/prod/graph/-private.js.map +1 -1
- package/dist/unpkg/prod/index.js +1 -1
- package/dist/unpkg/prod/reactive.js +2 -2
- package/dist/unpkg/{prod-deprecated/request-ndw2Fy91.js → prod/request-0h8eJko9.js} +23 -13
- package/dist/unpkg/{prod-deprecated/request-ndw2Fy91.js.map → prod/request-0h8eJko9.js.map} +1 -1
- package/dist/unpkg/prod/request.js +1 -1
- package/dist/unpkg/prod/signals/-leaked.js +1 -1
- package/dist/unpkg/prod/{src-CoSpuocQ.js → src-Dagh1FmP.js} +5 -5
- package/dist/unpkg/prod/{src-CoSpuocQ.js.map → src-Dagh1FmP.js.map} +1 -1
- package/dist/unpkg/prod/store/-private.js +1 -1
- package/dist/unpkg/prod/types/-private.js +1 -1
- package/dist/unpkg/prod/types/runtime.js +7 -3
- package/dist/unpkg/prod/types/runtime.js.map +1 -1
- package/dist/unpkg/{prod/-private-DKVDMUfT.js → prod-deprecated/-private-CRDwlN1v.js} +39 -9
- package/dist/unpkg/prod-deprecated/-private-CRDwlN1v.js.map +1 -0
- package/dist/unpkg/prod-deprecated/configure.js +2 -2
- 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.js +2 -2
- package/dist/unpkg/{prod/request-ndw2Fy91.js → prod-deprecated/request-0h8eJko9.js} +23 -13
- package/dist/unpkg/{prod/request-ndw2Fy91.js.map → prod-deprecated/request-0h8eJko9.js.map} +1 -1
- package/dist/unpkg/prod-deprecated/request.js +1 -1
- package/dist/unpkg/prod-deprecated/signals/-leaked.js +1 -1
- package/dist/unpkg/prod-deprecated/{src-FK_rMde5.js → src-CvV5lz9D.js} +5 -5
- package/dist/unpkg/prod-deprecated/{src-FK_rMde5.js.map → src-CvV5lz9D.js.map} +1 -1
- package/dist/unpkg/prod-deprecated/store/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/types/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/types/runtime.js +7 -3
- package/dist/unpkg/prod-deprecated/types/runtime.js.map +1 -1
- package/logos/README.md +1 -1
- package/package.json +4 -4
- package/dist/-private-BpyvBYFj.js.map +0 -1
- package/dist/configure-CjsojjiI.d.ts.map +0 -1
- package/dist/unpkg/dev/-private-BH4O810v.js.map +0 -1
- package/dist/unpkg/dev-deprecated/-private-BH4O810v.js.map +0 -1
- package/dist/unpkg/prod/-private-DKVDMUfT.js.map +0 -1
- package/dist/unpkg/prod-deprecated/-private-DKVDMUfT.js.map +0 -1
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* @summary The `macros` function, which returns the Babel plugins that strip WarpDrive deprecation, canary-feature,
|
|
4
|
+
* debug-logging and env code at build time.
|
|
5
|
+
*/
|
|
1
6
|
import { macros } from "@warp-drive-mirror/build-config/babel-macros";
|
|
2
7
|
export { macros };
|
|
@@ -1 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* # Log Instrumentation <Badge type="tip" text="debug only" />
|
|
3
|
+
*
|
|
4
|
+
* Many portions of the internals are helpfully instrumented with logging.
|
|
5
|
+
* This instrumentation is always removed from production builds.
|
|
6
|
+
*
|
|
7
|
+
* The [Debugging](/guides/the-manual/debugging/) guide explains what each flag logs.
|
|
8
|
+
*
|
|
9
|
+
* Log instrumentation is "regionalized" to specific concepts and concerns
|
|
10
|
+
* to enable you to enable/disable just the areas you are interested in.
|
|
11
|
+
*
|
|
12
|
+
* To activate a particular group of logs set the appropriate flag to `true`
|
|
13
|
+
* either in your build config or via the runtime helper.
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* ## Runtime Activation
|
|
17
|
+
*
|
|
18
|
+
* ::: tip 💡 Just Works in browser Dev Tools!
|
|
19
|
+
* No import is needed, and the logging config is preserved when the page is refreshed
|
|
20
|
+
* :::
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* setWarpDriveLogging({
|
|
24
|
+
* LOG_CACHE: true,
|
|
25
|
+
* LOG_REQUESTS: true,
|
|
26
|
+
* })
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* A runtime helper is attached to `globalThis` to enable activation of the logs
|
|
30
|
+
* from anywhere in your application including from the devtools panel.
|
|
31
|
+
*
|
|
32
|
+
* The runtime helper overrides any build config settings for the given flag
|
|
33
|
+
* for the current browser tab. It stores the configuration you give it in
|
|
34
|
+
* `sessionStorage` so that it persists across page reloads of the current tab,
|
|
35
|
+
* but not across browser tabs or windows.
|
|
36
|
+
*
|
|
37
|
+
* If you need to deactivate the logging, you can call the helper again with the
|
|
38
|
+
* same flag set to `false` or just open a new tab/window.
|
|
39
|
+
*
|
|
40
|
+
* ## Buildtime Activation
|
|
41
|
+
*
|
|
42
|
+
* ```ts
|
|
43
|
+
* setConfig(__dirname, app, {
|
|
44
|
+
* debug: {
|
|
45
|
+
* LOG_CACHE: true,
|
|
46
|
+
* LOG_REQUESTS: false,
|
|
47
|
+
* LOG_NOTIFICATIONS: true,
|
|
48
|
+
* }
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* The build config settings are used to set the default values for the
|
|
53
|
+
* logging flags. Any logging flag that is not set in the build config
|
|
54
|
+
* will default to `false`.
|
|
55
|
+
*
|
|
56
|
+
* @summary Debug-only logging flags, such as `LOG_CACHE` and `LOG_REQUESTS`, set in build config or at runtime
|
|
57
|
+
* via `setWarpDriveLogging`.
|
|
58
|
+
* @module
|
|
59
|
+
*/
|
|
1
60
|
export * from "@warp-drive-mirror/build-config/debugging";
|
|
@@ -1 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* @summary Deprecation flags, such as `DEPRECATE_NON_STRICT_TYPES`, that keep deprecated WarpDrive behavior active
|
|
4
|
+
* until the build config drops it by `compatWith` version or by flag.
|
|
5
|
+
*/
|
|
1
6
|
export * from "@warp-drive-mirror/build-config/deprecations";
|
package/dist/build-config.d.ts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides a build-plugin that enables configuration of deprecations,
|
|
3
|
+
* optional features, development/testing support and debug logging.
|
|
4
|
+
*
|
|
5
|
+
* Available settings include:
|
|
6
|
+
*
|
|
7
|
+
* - {@link LOGGING | debugging}
|
|
8
|
+
* - {@link DEPRECATIONS | deprecations}
|
|
9
|
+
* - {@link FEATURES | features}
|
|
10
|
+
* - {@link WarpDriveConfig.polyfillUUID | polyfillUUID}
|
|
11
|
+
* - {@link WarpDriveConfig.includeDataAdapterInProduction | includeDataAdapterInProduction}
|
|
12
|
+
* - {@link WarpDriveConfig.compatWith | compatWith}
|
|
13
|
+
*
|
|
14
|
+
* @summary Build-time configuration for WarpDrive: `setConfig` and its babel plugin for deprecations, features,
|
|
15
|
+
* debug logging, and polyfill settings.
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
1
18
|
import { WarpDriveConfig, babelPlugin, setConfig } from "@warp-drive-mirror/build-config";
|
|
2
19
|
export { type WarpDriveConfig, babelPlugin, setConfig };
|
|
@@ -12,10 +12,12 @@ type SignalRef = unknown;
|
|
|
12
12
|
* The hooks which MUST be configured in order to use reactive arrays,
|
|
13
13
|
* resources and documents with framework specfic signals or TC39 signals.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* To support multiple frameworks on the same page, import
|
|
16
|
+
* `@warp-drive-mirror/alien-signals/install` before each framework's `install` entry
|
|
17
|
+
* point. Its hooks implement {@link SignalHooks.register}, so each framework's
|
|
18
|
+
* hooks, passed to {@link registerSignals}, are added to its signals graph
|
|
19
|
+
* instead of replacing it, and its memos stay up to date for every framework.
|
|
20
|
+
* See [Using Ember and React on the Same Page](/guides/the-manual/cookbook/multiple-frameworks-on-one-page.md).
|
|
19
21
|
*
|
|
20
22
|
* Unlike many signals implementations, WarpDrive does not wrap values as
|
|
21
23
|
* signals directly, but instead uses signals to alert the reactive layer
|
|
@@ -78,6 +80,23 @@ interface SignalHooks<T = SignalRef> {
|
|
|
78
80
|
* for things like test-waiters.
|
|
79
81
|
*/
|
|
80
82
|
waitFor?: <K>(promise: Promise<K>) => Promise<K>;
|
|
83
|
+
/**
|
|
84
|
+
* An optional method that returns whether a signal consumed right now would be tracked by the
|
|
85
|
+
* framework, for instance because a component is rendering.
|
|
86
|
+
*
|
|
87
|
+
* ***Warp*Drive** itself does not call it. Hooks that compose other implementations, such as
|
|
88
|
+
* the ones `@warp-drive-mirror/alien-signals/install` configures, use it to skip work for reads that no
|
|
89
|
+
* framework would track.
|
|
90
|
+
*/
|
|
91
|
+
isTracking?: () => boolean;
|
|
92
|
+
/**
|
|
93
|
+
* An optional method, present only on hooks that compose other signals implementations into
|
|
94
|
+
* their own, such as the ones `@warp-drive-mirror/alien-signals/install` configures.
|
|
95
|
+
*
|
|
96
|
+
* {@link registerSignals} calls it instead of replacing the configured hooks, so that a
|
|
97
|
+
* framework's hooks are added alongside the ones already configured rather than replacing them.
|
|
98
|
+
*/
|
|
99
|
+
register?: <K>(buildConfig: (options: HooksOptions) => SignalHooks<K>) => void;
|
|
81
100
|
}
|
|
82
101
|
/**
|
|
83
102
|
* Contains information a {@link SignalHooks} implementation may want
|
|
@@ -114,8 +133,9 @@ interface HooksOptions {
|
|
|
114
133
|
};
|
|
115
134
|
}
|
|
116
135
|
/**
|
|
117
|
-
* Configures the signals implementation to use
|
|
118
|
-
*
|
|
136
|
+
* Configures the signals implementation to use, replacing any configured
|
|
137
|
+
* before. To add a framework's hooks alongside those of other frameworks, use
|
|
138
|
+
* {@link registerSignals} instead.
|
|
119
139
|
*
|
|
120
140
|
* See {@link HooksOptions} for the options passed to the provided function
|
|
121
141
|
* when called.
|
|
@@ -129,6 +149,29 @@ interface HooksOptions {
|
|
|
129
149
|
* @param buildConfig - a function that takes options and returns a configuration object
|
|
130
150
|
*/
|
|
131
151
|
declare function setupSignals<T>(buildConfig: (options: HooksOptions) => SignalHooks<T>): void;
|
|
152
|
+
/**
|
|
153
|
+
* Adds the hooks built by `buildConfig` to the configured signals implementation if it composes
|
|
154
|
+
* other implementations, such as `@warp-drive-mirror/alien-signals`, and otherwise configures them with
|
|
155
|
+
* {@link setupSignals}.
|
|
156
|
+
*
|
|
157
|
+
* A framework's `install` entry point calls this rather than `setupSignals`, so that importing
|
|
158
|
+
* `@warp-drive-mirror/alien-signals/install` first lets every framework on the page share its signals
|
|
159
|
+
* and memos.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* import { registerSignals } from '@warp-drive-mirror/core/configure';
|
|
164
|
+
*
|
|
165
|
+
* registerSignals(buildSignalConfig);
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* @summary Registers signal hooks with the configured composing implementation, or configures
|
|
169
|
+
* them with `setupSignals` when there is none.
|
|
170
|
+
* @since 5.10.0
|
|
171
|
+
* @public
|
|
172
|
+
* @param buildConfig - a function that takes options and returns a configuration object
|
|
173
|
+
*/
|
|
174
|
+
declare function registerSignals<T>(buildConfig: (options: HooksOptions) => SignalHooks<T>): void;
|
|
132
175
|
/**
|
|
133
176
|
* Wraps `promise` using the configured {@link SignalHooks.waitFor}, if any,
|
|
134
177
|
* for things like test-waiters. Returns `promise` unchanged if no
|
|
@@ -136,5 +179,5 @@ declare function setupSignals<T>(buildConfig: (options: HooksOptions) => SignalH
|
|
|
136
179
|
*/
|
|
137
180
|
declare function waitFor<K>(promise: Promise<K>): Promise<K>;
|
|
138
181
|
//#endregion
|
|
139
|
-
export {
|
|
140
|
-
//# sourceMappingURL=configure-
|
|
182
|
+
export { registerSignals as a, SignalRef as i, HooksOptions as n, setupSignals as o, SignalHooks as r, waitFor as s, ARRAY_SIGNAL as t };
|
|
183
|
+
//# sourceMappingURL=configure-CodrrdQr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-CodrrdQr.d.ts","names":[],"sources":["../src/signals/reactivity/configure.ts"],"mappings":";cAMa;;;;;;;;KAsCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6BK,YAAY,IAAI;;;;;;;;;;EAU/B,eAAe,aAAa,yBAAyB;;;;EAIrD,gBAAgB,QAAQ;;;;EAIxB,eAAe,QAAQ;;;;;;;;EAQvB,aAAa,GAAG,aAAa,sBAAsB,UAAU,YAAY;;;;;;;;;;;;EAazE;;;;;EAMA,WAAW,GAAG,SAAS,QAAQ,OAAO,QAAQ;;;;;;;;;EAU9C;;;;;;;;EASA,YAAY,GAAG,cAAc,SAAS,iBAAiB,YAAY;;;;;;;;;;;;;;;;;;;UAoBpD;;;;;;EAMf;;;;;;;;IAQE;;;;;;;;;;;;;;;;;;;iBAoBY,aAAa,GAAG,cAAc,SAAS,iBAAiB,YAAY;;;;;;;;;;;;;;;;;;;;;;;iBAmCpE,gBAAgB,GAAG,cAAc,SAAS,iBAAiB,YAAY;;;;;;iBA4DvE,QAAQ,GAAG,SAAS,QAAQ,KAAK,QAAQ"}
|
package/dist/configure.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Provides a configuration API for the reactivity system
|
|
3
|
+
* that WarpDrive should use.
|
|
4
|
+
*
|
|
5
|
+
* @summary Provides `setupSignals`, which tells WarpDrive which signal and reactivity library to build its
|
|
6
|
+
* reactive values on.
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import { a as registerSignals, n as HooksOptions, o as setupSignals, r as SignalHooks } from "./configure-CodrrdQr.js";
|
|
10
|
+
export { type HooksOptions, type SignalHooks, registerSignals, setupSignals };
|
package/dist/configure.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { M as setupSignals } from "./-private-
|
|
1
|
+
import { M as registerSignals, N as setupSignals } from "./-private-Y-13dsHO.js";
|
|
2
2
|
|
|
3
|
-
export { setupSignals };
|
|
3
|
+
export { registerSignals, setupSignals };
|
package/dist/graph/-private.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Gt as GraphEdge, Ht as peekGraph, Jt as CollectionEdge, Kt as ResourceEdge, Ut as isBelongsTo, Vt as graphFor, Wt as Graph, Yt as UpgradedMeta, qt as ImplicitEdge } from "../internal-
|
|
1
|
+
import { Gt as GraphEdge, Ht as peekGraph, Jt as CollectionEdge, Kt as ResourceEdge, Ut as isBelongsTo, Vt as graphFor, Wt as Graph, Yt as UpgradedMeta, qt as ImplicitEdge } from "../internal-BOC6nyCi.js";
|
|
2
2
|
export { type CollectionEdge, type Graph, type GraphEdge, type ImplicitEdge, type ResourceEdge, type UpgradedMeta, graphFor, isBelongsTo, peekGraph };
|
package/dist/graph/-private.js
CHANGED
|
@@ -57,9 +57,9 @@ function assertValidRelationshipPayload(graph, op) {
|
|
|
57
57
|
const { definition, identifier, state } = relationship;
|
|
58
58
|
const { type } = identifier;
|
|
59
59
|
const { field } = op;
|
|
60
|
-
const { isAsync, kind } = definition;
|
|
60
|
+
const { isAsync, isLinksMode, kind } = definition;
|
|
61
61
|
if (payload.links) {
|
|
62
|
-
if (macroCondition(!getGlobalConfig().WarpDriveMirror.features.JSON_API_CACHE_VALIDATION_ERRORS)) warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, isAsync || payload.data === null || !!payload.data || state.hasReceivedData, { id: "ds.store.push-link-for-sync-relationship" });
|
|
62
|
+
if (macroCondition(!getGlobalConfig().WarpDriveMirror.features.JSON_API_CACHE_VALIDATION_ERRORS)) warn(`You pushed a record of type '${type}' with a relationship '${field}' configured as 'async: false'. You've included a link but no primary data, this may be an error in your payload. WarpDrive will treat this relationship as known-to-be-empty.`, isAsync || isLinksMode || payload.data === null || !!payload.data || state.hasReceivedData, { id: "ds.store.push-link-for-sync-relationship" });
|
|
63
63
|
} else if (payload.data) {
|
|
64
64
|
if (kind === "belongsTo") {
|
|
65
65
|
macroCondition(getGlobalConfig().WarpDriveMirror.env.DEBUG) && ((test) => {
|