@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,3 +1,3 @@
1
- import { C as setRecordIdentifier, D as isRequestKey, E as fieldValueIdentity, F as coerceId, I as ensureStringId, L as log, O as isResourceKey, P as normalizeModelName, R as logGroup, S as recordIdentifierFor, T as assertPrivateCapabilities, _ as isPrivateStore, b as StoreMap, f as createLegacyManyArray, g as assertPrivateStore, h as Store, m as CacheHandler, p as constructResource, v as RecordArrayManager, w as storeFor, x as _clearCaches, y as fastPush } from "../src-PuYJ-RSZ.js";
1
+ import { C as setRecordIdentifier, D as isRequestKey, E as fieldValueIdentity, F as coerceId, I as ensureStringId, L as log, O as isResourceKey, P as normalizeModelName, R as logGroup, S as recordIdentifierFor, T as assertPrivateCapabilities, _ as isPrivateStore, b as StoreMap, f as createLegacyManyArray, g as assertPrivateStore, h as Store, m as CacheHandler, p as constructResource, v as RecordArrayManager, w as storeFor, x as _clearCaches, y as fastPush } from "../src-CvKTKJvq.js";
2
2
 
3
3
  export { CacheHandler, RecordArrayManager, Store, StoreMap, _clearCaches, normalizeModelName as _deprecatingNormalize, assertPrivateCapabilities, assertPrivateStore, coerceId, constructResource, createLegacyManyArray, ensureStringId, fastPush, fieldValueIdentity, isPrivateStore, isRequestKey, isResourceKey, log, logGroup, recordIdentifierFor, setRecordIdentifier, storeFor };
package/dist/store.d.ts CHANGED
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module
3
+ * @summary The `DefaultCachePolicy` and `parseCacheControl` for expiring cached requests, plus the
4
+ * `NotificationManager` type for subscribing to cache change notifications.
5
+ */
1
6
  import { F as PolicyConfig, I as parseCacheControl, N as CacheControlValue, P as DefaultCachePolicy, rn as NotificationManager } from "./internal-DTPBJZLO.js";
2
7
  export { type CacheControlValue, DefaultCachePolicy, type NotificationManager, type PolicyConfig, parseCacheControl };
@@ -2,7 +2,7 @@ import { getGlobalConfig, macroCondition } from "@embroider/macros";
2
2
 
3
3
  //#region src/types/-private.ts
4
4
  const name = "@warp-drive-mirror/core";
5
- const version = "5.10.0-alpha.18";
5
+ const version = "5.10.0-alpha.19";
6
6
  const GlobalRef = globalThis;
7
7
  const UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};
8
8
  GlobalRef[name] = GlobalRef[name] ?? { __version: version };
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module
3
+ * @summary Types for the cache-side state of to-one and to-many relationships, with related resources referenced by
4
+ * `ResourceKey`.
5
+ */
1
6
  import { n as Relationship, r as ResourceRelationship, t as CollectionRelationship } from "../../relationship-BlGIXgj4.js";
2
7
  export { CollectionRelationship, Relationship, ResourceRelationship };
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module
3
+ * @summary The `Cache` interface a cache implementation fulfills to store, patch, mutate and read documents and
4
+ * resources, plus the `ChangedAttributesHash` and `RelationshipDiff` types.
5
+ */
1
6
  import { Qt as RelationshipDiff, Xt as Cache, Zt as ChangedAttributesHash } from "../internal-DTPBJZLO.js";
2
7
  export { Cache, ChangedAttributesHash, RelationshipDiff };
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module
3
+ * @summary Types for the operations that update a relationship's remote (persisted) or local (uncommitted) state in the
4
+ * relationship Graph.
5
+ */
1
6
  import { a as ReplaceRelatedRecordOperation, c as UnknownOperation, i as RemoteRelationshipOperation, l as UpdateRelationshipOperation, n as LocalRelationshipOperation, o as ReplaceRelatedRecordsOperation, r as Operation, s as SortRelatedRecords, t as DeleteRecordOperation } from "../graph-rjTyJ-gd.js";
2
7
  export { DeleteRecordOperation, LocalRelationshipOperation, Operation, RemoteRelationshipOperation, ReplaceRelatedRecordOperation, ReplaceRelatedRecordsOperation, SortRelatedRecords, UnknownOperation, UpdateRelationshipOperation };
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module
3
+ * @summary Types for records that declare their resource type via the `[Type]` symbol, including `TypedRecordInstance`,
4
+ * `Includes`, `Mask` and the `createIncludeValidator` helper.
5
+ */
1
6
  import { a as StringSatisfiesIncludes, c as TypedRecordInstance, i as OpaqueRecordInstance, l as Validate, n as Includes, o as TypeFromInstance, r as Mask, s as TypeFromInstanceOrString, t as ExtractSuggestedCacheTypes, u as createIncludeValidator } from "../record-DDxPtzcY.js";
2
7
  export { ExtractSuggestedCacheTypes, Includes, Mask, OpaqueRecordInstance, StringSatisfiesIncludes, TypeFromInstance, TypeFromInstanceOrString, TypedRecordInstance, Validate, createIncludeValidator };
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module
3
+ * @summary Types for the functions schemas reference by name: `Transformation` to convert field values, `Derivation`
4
+ * for computed fields and `HashFn` for object identity.
5
+ */
1
6
  import { n as HashFn, r as Transformation, t as Derivation } from "../../concepts-DzuY5M1K.js";
2
7
  export { Derivation, HashFn, Transformation };
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module
3
+ * @summary The `SchemaService` interface a store's schema service implements to describe resource types, traits, fields
4
+ * and derivations, plus the legacy `AttributesSchema` and `RelationshipsSchema` types.
5
+ */
1
6
  import { _n as SchemaService, gn as RelationshipsSchema, hn as AttributesSchema } from "../../internal-DTPBJZLO.js";
2
7
  export { AttributesSchema, RelationshipsSchema, SchemaService };
@@ -1,2 +1,6 @@
1
+ /**
2
+ * @module
3
+ * @summary The `ApiError` type for one {json:api} error object in a document's `errors` array.
4
+ */
1
5
  import { t as ApiError } from "../../error-APuUdUGk.js";
2
6
  export { ApiError };
@@ -1,2 +1,7 @@
1
+ /**
2
+ * @module
3
+ * @summary Types for raw {json:api} structures: resource objects, relationship objects, resource identifiers, links,
4
+ * meta and single, collection and empty documents.
5
+ */
1
6
  import { _ as ResourceObject, a as ExistingResourceObject, b as SingleResourceRelationship, c as Link, d as Meta, f as NewResourceIdentifierObject, g as ResourceIdentifierObject, h as ResourceIdentifier, i as ExistingResourceIdentifierObject, l as LinkObject, m as PaginationLinks, n as CollectionResourceRelationship, o as InnerRelationshipDocument, p as NewResourceObject, r as EmptyResourceDocument, s as JsonApiDocument, t as CollectionResourceDocument, u as Links, v as ResourceRelationshipsObject, y as SingleResourceDocument } from "../../json-api-raw-BxzNsCg0.js";
2
7
  export { CollectionResourceDocument, CollectionResourceRelationship, EmptyResourceDocument, ExistingResourceIdentifierObject, ExistingResourceObject, InnerRelationshipDocument, JsonApiDocument, Link, LinkObject, Links, Meta, NewResourceIdentifierObject, NewResourceObject, PaginationLinks, ResourceIdentifier, ResourceIdentifierObject, ResourceObject, ResourceRelationshipsObject, SingleResourceDocument, SingleResourceRelationship };
package/dist/types.d.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * This package provides core types, type-utilities, symbols
3
+ * and constants used across the WarpDrive ecosystem.
4
+ *
5
+ * @summary Shared WarpDrive types such as `ResourceKey`, `SchemaService`, `CacheCapabilitiesManager`, and the
6
+ * legacy finder option types.
7
+ * @module
8
+ */
1
9
  import { f as StableRecordIdentifier, l as ResourceKey } from "./identifier-B_tK3FUw.js";
2
10
  import { $t as CacheCapabilitiesManager, An as LegacyResourceQuery, Dn as BaseFinderOptions, Mn as ModelSchema, On as FindAllOptions, _n as SchemaService, jn as QueryOptions, kn as FindRecordOptions } from "./internal-DTPBJZLO.js";
3
11
  export type { BaseFinderOptions, CacheCapabilitiesManager, FindAllOptions, FindRecordOptions, LegacyResourceQuery, ModelSchema, QueryOptions, ResourceKey, SchemaService, StableRecordIdentifier };
@@ -370,7 +370,7 @@ function upgradeDefinition(graph, key, propertyName, isImplicit = false) {
370
370
  })(storeWrapper.schema.hasResource({ type: inverseType }));
371
371
  inverseDefinition = null;
372
372
  } else {
373
- inverseKey = inverseForRelationship(getStore(storeWrapper), key, propertyName);
373
+ inverseKey = inverseForRelationship(getStore(storeWrapper), key, meta.name);
374
374
  if (!inverseKey && definition.isPolymorphic && definition.inverseKey) inverseDefinition = {
375
375
  kind: "belongsTo",
376
376
  key: definition.inverseKey,
@@ -395,6 +395,7 @@ function upgradeDefinition(graph, key, propertyName, isImplicit = false) {
395
395
  if (!test) throw new Error(`Expected ${inverseKey} to be a relationship`);
396
396
  })(isRelationshipField(metaFromInverse));
397
397
  inverseDefinition = upgradeMeta(metaFromInverse);
398
+ inverseKey = inverseDefinition.key;
398
399
  }
399
400
  }
400
401
  if (!inverseDefinition) {