@warp-drive-mirror/core 5.10.0-alpha.18 → 5.10.0-alpha.19

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.
Files changed (66) hide show
  1. package/dist/build-config/babel-macros.d.ts +5 -0
  2. package/dist/build-config/canary-features.d.ts +5 -0
  3. package/dist/build-config/debugging.d.ts +59 -0
  4. package/dist/build-config/deprecations.d.ts +5 -0
  5. package/dist/build-config.d.ts +17 -0
  6. package/dist/configure.d.ts +8 -0
  7. package/dist/graph/-private.js +2 -1
  8. package/dist/graph/-private.js.map +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/reactive.d.ts +275 -0
  11. package/dist/reactive.js +1 -1
  12. package/dist/request.d.ts +8 -0
  13. package/dist/signals/-leaked.d.ts +14 -0
  14. package/dist/signals/-leaked.d.ts.map +1 -1
  15. package/dist/{src-PuYJ-RSZ.js → src-CvKTKJvq.js} +2 -2
  16. package/dist/src-CvKTKJvq.js.map +1 -0
  17. package/dist/store/-private.js +1 -1
  18. package/dist/store.d.ts +5 -0
  19. package/dist/types/-private.js +1 -1
  20. package/dist/types/cache/relationship.d.ts +5 -0
  21. package/dist/types/cache.d.ts +5 -0
  22. package/dist/types/graph.d.ts +5 -0
  23. package/dist/types/record.d.ts +5 -0
  24. package/dist/types/schema/concepts.d.ts +5 -0
  25. package/dist/types/schema/schema-service.d.ts +5 -0
  26. package/dist/types/spec/error.d.ts +4 -0
  27. package/dist/types/spec/json-api-raw.d.ts +5 -0
  28. package/dist/types.d.ts +8 -0
  29. package/dist/unpkg/dev/graph/-private.js +2 -1
  30. package/dist/unpkg/dev/graph/-private.js.map +1 -1
  31. package/dist/unpkg/dev/index.js +1 -1
  32. package/dist/unpkg/dev/reactive.js +1 -1
  33. package/dist/unpkg/dev/{src-Dy9m6GTv.js → src-CqJO8wIe.js} +2 -2
  34. package/dist/unpkg/dev/src-CqJO8wIe.js.map +1 -0
  35. package/dist/unpkg/dev/store/-private.js +1 -1
  36. package/dist/unpkg/dev/types/-private.js +1 -1
  37. package/dist/unpkg/dev-deprecated/graph/-private.js +2 -1
  38. package/dist/unpkg/dev-deprecated/graph/-private.js.map +1 -1
  39. package/dist/unpkg/dev-deprecated/index.js +1 -1
  40. package/dist/unpkg/dev-deprecated/reactive.js +1 -1
  41. package/dist/unpkg/dev-deprecated/{src-ByOiBTF3.js → src-BtyRjyV0.js} +2 -2
  42. package/dist/unpkg/dev-deprecated/src-BtyRjyV0.js.map +1 -0
  43. package/dist/unpkg/dev-deprecated/store/-private.js +1 -1
  44. package/dist/unpkg/dev-deprecated/types/-private.js +1 -1
  45. package/dist/unpkg/prod/graph/-private.js +5 -2
  46. package/dist/unpkg/prod/graph/-private.js.map +1 -1
  47. package/dist/unpkg/prod/index.js +1 -1
  48. package/dist/unpkg/prod/reactive.js +1 -1
  49. package/dist/unpkg/prod/{src-NuWjjfax.js → src-Ack6NaKZ.js} +2 -2
  50. package/dist/unpkg/prod/src-Ack6NaKZ.js.map +1 -0
  51. package/dist/unpkg/prod/store/-private.js +1 -1
  52. package/dist/unpkg/prod/types/-private.js +1 -1
  53. package/dist/unpkg/prod-deprecated/graph/-private.js +5 -2
  54. package/dist/unpkg/prod-deprecated/graph/-private.js.map +1 -1
  55. package/dist/unpkg/prod-deprecated/index.js +1 -1
  56. package/dist/unpkg/prod-deprecated/reactive.js +1 -1
  57. package/dist/unpkg/prod-deprecated/{src-Bt7BkX1Y.js → src-C8-R95FT.js} +2 -2
  58. package/dist/unpkg/prod-deprecated/src-C8-R95FT.js.map +1 -0
  59. package/dist/unpkg/prod-deprecated/store/-private.js +1 -1
  60. package/dist/unpkg/prod-deprecated/types/-private.js +1 -1
  61. package/package.json +4 -4
  62. package/dist/src-PuYJ-RSZ.js.map +0 -1
  63. package/dist/unpkg/dev/src-Dy9m6GTv.js.map +0 -1
  64. package/dist/unpkg/dev-deprecated/src-ByOiBTF3.js.map +0 -1
  65. package/dist/unpkg/prod/src-NuWjjfax.js.map +0 -1
  66. package/dist/unpkg/prod-deprecated/src-Bt7BkX1Y.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,6 @@
1
+ /**
2
+ * @module
3
+ * @summary Build-time flags, such as `JSON_API_CACHE_VALIDATION_ERRORS`, that gate unreleased WarpDrive features for
4
+ * canary builds.
5
+ */
1
6
  export * from "@warp-drive-mirror/build-config/canary-features";
@@ -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";
@@ -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 };
@@ -1,2 +1,10 @@
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
+ */
1
9
  import { a as registerSignals, n as HooksOptions, o as setupSignals, r as SignalHooks } from "./configure-CodrrdQr.js";
2
10
  export { type HooksOptions, type SignalHooks, registerSignals, setupSignals };
@@ -391,7 +391,7 @@ function upgradeDefinition(graph, key, propertyName, isImplicit = false) {
391
391
  })(storeWrapper.schema.hasResource({ type: inverseType }));
392
392
  inverseDefinition = null;
393
393
  } else {
394
- inverseKey = inverseForRelationship(getStore(storeWrapper), key, propertyName);
394
+ inverseKey = inverseForRelationship(getStore(storeWrapper), key, meta.name);
395
395
  if (!inverseKey && definition.isPolymorphic && definition.inverseKey) inverseDefinition = {
396
396
  kind: "belongsTo",
397
397
  key: definition.inverseKey,
@@ -416,6 +416,7 @@ function upgradeDefinition(graph, key, propertyName, isImplicit = false) {
416
416
  if (!test) throw new Error(`Expected ${inverseKey} to be a relationship`);
417
417
  })(isRelationshipField(metaFromInverse));
418
418
  inverseDefinition = upgradeMeta(metaFromInverse);
419
+ inverseKey = inverseDefinition.key;
419
420
  }
420
421
  }
421
422
  if (!inverseDefinition) {