@warp-drive-mirror/experiments 0.2.2-alpha.9 → 0.2.3

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.
@@ -434,7 +434,7 @@ class PersistedCache {
434
434
  * @method hasChangedAttrs
435
435
  * @internal
436
436
  * @param identifier
437
- * @return {boolean}
437
+ * @return {Boolean}
438
438
  */
439
439
  hasChangedAttrs(identifier) {
440
440
  return this._cache.hasChangedAttrs(identifier);
@@ -489,7 +489,7 @@ class PersistedCache {
489
489
  * @method hasChangedRelationships
490
490
  * @public
491
491
  * @param {StableRecordIdentifier} identifier
492
- * @return {boolean}
492
+ * @return {Boolean}
493
493
  */
494
494
  hasChangedRelationships(identifier) {
495
495
  return this._cache.hasChangedRelationships(identifier);
@@ -505,7 +505,7 @@ class PersistedCache {
505
505
  * @method rollbackRelationships
506
506
  * @public
507
507
  * @param {StableRecordIdentifier} identifier
508
- * @return {string[]} the names of relationships that were restored
508
+ * @return {String[]} the names of relationships that were restored
509
509
  */
510
510
  rollbackRelationships(identifier) {
511
511
  return this._cache.rollbackRelationships(identifier);
@@ -574,7 +574,7 @@ class PersistedCache {
574
574
  * @method isEmpty
575
575
  * @internal
576
576
  * @param identifier
577
- * @return {boolean}
577
+ * @return {Boolean}
578
578
  */
579
579
  isEmpty(identifier) {
580
580
  return this._cache.isEmpty(identifier);
@@ -587,7 +587,7 @@ class PersistedCache {
587
587
  * @method isNew
588
588
  * @internal
589
589
  * @param identifier
590
- * @return {boolean}
590
+ * @return {Boolean}
591
591
  */
592
592
  isNew(identifier) {
593
593
  return this._cache.isNew(identifier);
@@ -600,7 +600,7 @@ class PersistedCache {
600
600
  * @method isDeleted
601
601
  * @internal
602
602
  * @param identifier
603
- * @return {boolean}
603
+ * @return {Boolean}
604
604
  */
605
605
  isDeleted(identifier) {
606
606
  return this._cache.isDeleted(identifier);
@@ -613,7 +613,7 @@ class PersistedCache {
613
613
  * @method isDeletionCommitted
614
614
  * @internal
615
615
  * @param identifier
616
- * @return {boolean}
616
+ * @return {Boolean}
617
617
  */
618
618
  isDeletionCommitted(identifier) {
619
619
  return this._cache.isDeletionCommitted(identifier);
@@ -1 +1 @@
1
- {"version":3,"file":"persisted-cache.js","sources":["../src/persisted-cache/cache.ts"],"sourcesContent":["import type { StableRecordIdentifier } from '@warp-drive-mirror/core-types';\nimport type { Cache, ChangedAttributesHash, RelationshipDiff } from '@warp-drive-mirror/core-types/cache';\nimport type { ResourceBlob } from '@warp-drive-mirror/core-types/cache/aliases';\nimport type { Change } from '@warp-drive-mirror/core-types/cache/change';\nimport type { Mutation } from '@warp-drive-mirror/core-types/cache/mutations';\nimport type { Operation } from '@warp-drive-mirror/core-types/cache/operations';\nimport type { CollectionRelationship, ResourceRelationship } from '@warp-drive-mirror/core-types/cache/relationship';\nimport type { StableDocumentIdentifier, StableExistingRecordIdentifier } from '@warp-drive-mirror/core-types/identifier';\nimport type { Value } from '@warp-drive-mirror/core-types/json/raw';\nimport type { TypeFromInstanceOrString } from '@warp-drive-mirror/core-types/record';\nimport type { RequestContext, StructuredDataDocument, StructuredDocument } from '@warp-drive-mirror/core-types/request';\nimport type { ResourceDocument, SingleResourceDataDocument } from '@warp-drive-mirror/core-types/spec/document';\nimport type { ApiError } from '@warp-drive-mirror/core-types/spec/error';\n/**\n * The PersistedCache wraps a Cache to enhance it with\n * Persisted Storage capabilities.\n *\n * @class PersistedCache\n * @internal\n */\nexport class PersistedCache implements Cache {\n declare _cache: Cache;\n declare _db: IDBDatabase;\n declare version: '2';\n\n constructor(cache: Cache, db: IDBDatabase) {\n this.version = '2';\n this._cache = cache;\n this._db = db;\n }\n\n // Cache Management\n // ================\n\n /**\n * Cache the response to a request\n *\n * Unlike `store.push` which has UPSERT\n * semantics, `put` has `replace` semantics similar to\n * the `http` method `PUT`\n *\n * the individually cacheabl\n * e resource data it may contain\n * should upsert, but the document data surrounding it should\n * fully replace any existing information\n *\n * Note that in order to support inserting arbitrary data\n * to the cache that did not originate from a request `put`\n * should expect to sometimes encounter a document with only\n * a `content` member and therefor must not assume the existence\n * of `request` and `response` on the document.\n *\n * @method put\n * @param {StructuredDocument} doc\n * @return {ResourceDocument}\n * @internal\n */\n put<T>(doc: StructuredDocument<T> | { content: T }): ResourceDocument {\n const result = this._cache.put(doc);\n\n if (!result.lid) {\n return result;\n }\n\n const transaction = this._db.transaction(['request', 'resource'], 'readwrite', { durability: 'relaxed' });\n const request = this._cache.peekRequest({ lid: result.lid })!;\n\n const requests = transaction.objectStore('request');\n const resources = transaction.objectStore('resource');\n\n requests.put(request);\n\n if ('data' in result && result.data) {\n const resourceData: StableExistingRecordIdentifier[] = Array.isArray(result.data) ? result.data : [result.data];\n resourceData.forEach((identifier) => {\n resources.put(this._cache.peek(identifier), identifier.lid);\n });\n }\n\n if ('included' in result && result.included) {\n const included: StableExistingRecordIdentifier[] = result.included;\n included.forEach((identifier) => {\n resources.put(this._cache.peek(identifier), identifier.lid);\n });\n }\n\n return result;\n }\n\n /**\n * Perform an operation on the cache to update the remote state.\n *\n * Note: currently the only valid operation is a MergeOperation\n * which occurs when a collision of identifiers is detected.\n *\n * @method patch\n * @internal\n * @param op the operation to perform\n * @return {void}\n */\n patch(op: Operation): void {\n this._cache.patch(op);\n }\n\n /**\n * Update resource data with a local mutation. Currently supports operations\n * on relationships only.\n *\n * @method mutate\n * @internal\n * @param mutation\n */\n mutate(mutation: Mutation): void {\n this._cache.mutate(mutation);\n }\n\n /**\n * Peek resource data from the Cache.\n *\n * In development, if the return value\n * is JSON the return value\n * will be deep-cloned and deep-frozen\n * to prevent mutation thereby enforcing cache\n * Immutability.\n *\n * This form of peek is useful for implementations\n * that want to feed raw-data from cache to the UI\n * or which want to interact with a blob of data\n * directly from the presentation cache.\n *\n * An implementation might want to do this because\n * de-referencing records which read from their own\n * blob is generally safer because the record does\n * not require retainining connections to the Store\n * and Cache to present data on a per-field basis.\n *\n * This generally takes the place of `getAttr` as\n * an API and may even take the place of `getRelationship`\n * depending on implementation specifics, though this\n * latter usage is less recommended due to the advantages\n * of the Graph handling necessary entanglements and\n * notifications for relational data.\n *\n * @method peek\n * @internal\n * @param {StableRecordIdentifier | StableDocumentIdentifier} identifier\n * @return {ResourceDocument | ResourceBlob | null} the known resource data\n */\n peek<T = unknown>(identifier: StableRecordIdentifier<TypeFromInstanceOrString<T>>): T | null;\n peek(identifier: StableDocumentIdentifier): ResourceDocument | null;\n peek(identifier: StableRecordIdentifier | StableDocumentIdentifier): unknown {\n return this._cache.peek(identifier);\n }\n\n /**\n * Peek resource data from the Cache.\n *\n * In development, if the return value\n * is JSON the return value\n * will be deep-cloned and deep-frozen\n * to prevent mutation thereby enforcing cache\n * Immutability.\n *\n * This form of peek is useful for implementations\n * that want to feed raw-data from cache to the UI\n * or which want to interact with a blob of data\n * directly from the presentation cache.\n *\n * An implementation might want to do this because\n * de-referencing records which read from their own\n * blob is generally safer because the record does\n * not require retainining connections to the Store\n * and Cache to present data on a per-field basis.\n *\n * This generally takes the place of `getAttr` as\n * an API and may even take the place of `getRelationship`\n * depending on implementation specifics, though this\n * latter usage is less recommended due to the advantages\n * of the Graph handling necessary entanglements and\n * notifications for relational data.\n *\n * @method peek\n * @internal\n * @param {StableRecordIdentifier | StableDocumentIdentifier} identifier\n * @return {ResourceDocument | ResourceBlob | null} the known resource data\n */\n peekRemoteState<T = unknown>(identifier: StableRecordIdentifier<TypeFromInstanceOrString<T>>): T | null;\n peekRemoteState(identifier: StableDocumentIdentifier): ResourceDocument | null;\n peekRemoteState(identifier: StableRecordIdentifier | StableDocumentIdentifier): unknown {\n return this._cache.peekRemoteState(identifier);\n }\n\n /**\n * Peek the Cache for the existing request data associated with\n * a cacheable request\n *\n * @method peekRequest\n * @param {StableDocumentIdentifier}\n * @return {StableDocumentIdentifier | null}\n * @internal\n */\n peekRequest(identifier: StableDocumentIdentifier): StructuredDocument<ResourceDocument> | null {\n return this._cache.peekRequest(identifier);\n }\n\n /**\n * Push resource data from a remote source into the cache for this identifier\n *\n * @method upsert\n * @internal\n * @param identifier\n * @param data\n * @param hasRecord\n * @return {void | string[]} if `hasRecord` is true then calculated key changes should be returned\n */\n upsert(identifier: StableRecordIdentifier, data: ResourceBlob, hasRecord: boolean): void | string[] {\n return this._cache.upsert(identifier, data, hasRecord);\n }\n\n // Cache Forking Support\n // =====================\n\n /**\n * Create a fork of the cache from the current state.\n *\n * Applications should typically not call this method themselves,\n * preferring instead to fork at the Store level, which will\n * utilize this method to fork the cache.\n *\n * @method fork\n * @internal\n * @return Promise<Cache>\n */\n fork(): Promise<Cache> {\n return this._cache.fork();\n }\n\n /**\n * Merge a fork back into a parent Cache.\n *\n * Applications should typically not call this method themselves,\n * preferring instead to merge at the Store level, which will\n * utilize this method to merge the caches.\n *\n * @method merge\n * @param {Cache} cache\n * @internal\n * @return Promise<void>\n */\n merge(cache: Cache): Promise<void> {\n return this._cache.merge(cache);\n }\n\n /**\n * Generate the list of changes applied to all\n * record in the store.\n *\n * Each individual resource or document that has\n * been mutated should be described as an individual\n * `Change` entry in the returned array.\n *\n * A `Change` is described by an object containing up to\n * three properties: (1) the `identifier` of the entity that\n * changed; (2) the `op` code of that change being one of\n * `upsert` or `remove`, and if the op is `upsert` a `patch`\n * containing the data to merge into the cache for the given\n * entity.\n *\n * This `patch` is opaque to the Store but should be understood\n * by the Cache and may expect to be utilized by an Adapter\n * when generating data during a `save` operation.\n *\n * It is generally recommended that the `patch` contain only\n * the updated state, ignoring fields that are unchanged\n *\n * ```ts\n * interface Change {\n * identifier: StableRecordIdentifier | StableDocumentIdentifier;\n * op: 'upsert' | 'remove';\n * patch?: unknown;\n * }\n * ```\n *\n * @method diff\n * @internal\n */\n diff(): Promise<Change[]> {\n return this._cache.diff();\n }\n\n // SSR Support\n // ===========\n\n /**\n * Serialize the entire contents of the Cache into a Stream\n * which may be fed back into a new instance of the same Cache\n * via `cache.hydrate`.\n *\n * @method dump\n * @return {Promise<ReadableStream>}\n * @internal\n */\n dump(): Promise<ReadableStream<unknown>> {\n return this._cache.dump();\n }\n\n /**\n * hydrate a Cache from a Stream with content previously serialized\n * from another instance of the same Cache, resolving when hydration\n * is complete.\n *\n * This method should expect to be called both in the context of restoring\n * the Cache during application rehydration after SSR **AND** at unknown\n * times during the lifetime of an already booted application when it is\n * desired to bulk-load additional information into the cache. This latter\n * behavior supports optimizing pre/fetching of data for route transitions\n * via data-only SSR modes.\n *\n * @method hydrate\n * @param {ReadableStream} stream\n * @return {Promise<void>}\n * @internal\n */\n hydrate(stream: ReadableStream<unknown>): Promise<void> {\n return this._cache.hydrate(stream);\n }\n\n // Cache\n // =====\n\n // Resource Support\n // ================\n\n /**\n * [LIFECYLCE] Signal to the cache that a new record has been instantiated on the client\n *\n * It returns properties from options that should be set on the record during the create\n * process. This return value behavior is deprecated.\n *\n * @method clientDidCreate\n * @internal\n * @param identifier\n * @param options\n */\n clientDidCreate(identifier: StableRecordIdentifier, options?: Record<string, unknown>): Record<string, unknown> {\n return this._cache.clientDidCreate(identifier, options);\n }\n\n /**\n * [LIFECYCLE] Signals to the cache that a resource\n * will be part of a save transaction.\n *\n * @method willCommit\n * @internal\n * @param identifier\n */\n willCommit(identifier: StableRecordIdentifier, context: RequestContext): void {\n this._cache.willCommit(identifier, context);\n }\n\n /**\n * [LIFECYCLE] Signals to the cache that a resource\n * was successfully updated as part of a save transaction.\n *\n * @method didCommit\n * @internal\n * @param identifier\n * @param data\n */\n didCommit(identifier: StableRecordIdentifier, result: StructuredDataDocument<unknown>): SingleResourceDataDocument {\n return this._cache.didCommit(identifier, result);\n }\n\n /**\n * [LIFECYCLE] Signals to the cache that a resource\n * was update via a save transaction failed.\n *\n * @method commitWasRejected\n * @internal\n * @param identifier\n * @param errors\n */\n commitWasRejected(identifier: StableRecordIdentifier, errors?: ApiError[]): void {\n this._cache.commitWasRejected(identifier, errors);\n }\n\n /**\n * [LIFECYCLE] Signals to the cache that all data for a resource\n * should be cleared.\n *\n * @method unloadRecord\n * @internal\n * @param identifier\n */\n unloadRecord(identifier: StableRecordIdentifier): void {\n this._cache.unloadRecord(identifier);\n }\n\n // Granular Resource Data APIs\n // ===========================\n\n /**\n * Retrieve the data for an attribute from the cache\n *\n * @method getAttr\n * @internal\n * @param identifier\n * @param propertyName\n * @return {unknown}\n */\n getAttr(identifier: StableRecordIdentifier, field: string): Value | undefined {\n return this._cache.getAttr(identifier, field);\n }\n\n /**\n * Retrieve the remote state for an attribute from the cache\n *\n * @method getAttr\n * @internal\n * @param identifier\n * @param propertyName\n * @return {unknown}\n */\n getRemoteAttr(identifier: StableRecordIdentifier, field: string): Value | undefined {\n return this._cache.getRemoteAttr(identifier, field);\n }\n\n /**\n * Mutate the data for an attribute in the cache\n *\n * @method setAttr\n * @internal\n * @param identifier\n * @param propertyName\n * @param value\n */\n setAttr(identifier: StableRecordIdentifier, propertyName: string, value: Value): void {\n this._cache.setAttr(identifier, propertyName, value);\n }\n\n /**\n * Query the cache for the changed attributes of a resource.\n *\n * @method changedAttrs\n * @internal\n * @param identifier\n * @return\n */\n changedAttrs(identifier: StableRecordIdentifier): ChangedAttributesHash {\n return this._cache.changedAttrs(identifier);\n }\n\n /**\n * Query the cache for whether any mutated attributes exist\n *\n * @method hasChangedAttrs\n * @internal\n * @param identifier\n * @return {boolean}\n */\n hasChangedAttrs(identifier: StableRecordIdentifier): boolean {\n return this._cache.hasChangedAttrs(identifier);\n }\n\n /**\n * Tell the cache to discard any uncommitted mutations to attributes\n *\n * @method rollbackAttrs\n * @internal\n * @param identifier\n * @return the names of attributes that were restored\n */\n rollbackAttrs(identifier: StableRecordIdentifier): string[] {\n return this._cache.rollbackAttrs(identifier);\n }\n\n /**\n * Query the cache for the changes to relationships of a resource.\n *\n * Returns a map of relationship names to RelationshipDiff objects.\n *\n * ```ts\n * type RelationshipDiff =\n | {\n kind: 'collection';\n remoteState: StableRecordIdentifier[];\n additions: Set<StableRecordIdentifier>;\n removals: Set<StableRecordIdentifier>;\n localState: StableRecordIdentifier[];\n reordered: boolean;\n }\n | {\n kind: 'resource';\n remoteState: StableRecordIdentifier | null;\n localState: StableRecordIdentifier | null;\n };\n ```\n *\n * @method changedRelationships\n * @public\n * @param {StableRecordIdentifier} identifier\n * @return {Map<string, RelationshipDiff>}\n */\n changedRelationships(identifier: StableRecordIdentifier): Map<string, RelationshipDiff> {\n return this._cache.changedRelationships(identifier);\n }\n\n /**\n * Query the cache for whether any mutated attributes exist\n *\n * @method hasChangedRelationships\n * @public\n * @param {StableRecordIdentifier} identifier\n * @return {boolean}\n */\n hasChangedRelationships(identifier: StableRecordIdentifier): boolean {\n return this._cache.hasChangedRelationships(identifier);\n }\n\n /**\n * Tell the cache to discard any uncommitted mutations to relationships.\n *\n * This will also discard the change on any appropriate inverses.\n *\n * This method is a candidate to become a mutation\n *\n * @method rollbackRelationships\n * @public\n * @param {StableRecordIdentifier} identifier\n * @return {string[]} the names of relationships that were restored\n */\n rollbackRelationships(identifier: StableRecordIdentifier): string[] {\n return this._cache.rollbackRelationships(identifier);\n }\n\n // Relationships\n // =============\n\n /**\n * Query the cache for the current state of a relationship property\n *\n * @method getRelationship\n * @internal\n * @param identifier\n * @param propertyName\n * @return resource relationship object\n */\n getRelationship(\n identifier: StableRecordIdentifier,\n field: string,\n isCollection?: boolean\n ): ResourceRelationship | CollectionRelationship {\n return this._cache.getRelationship(identifier, field, isCollection);\n }\n\n /**\n * Query the remote state for the current state of a relationship property\n *\n * @method getRelationship\n * @internal\n * @param identifier\n * @param propertyName\n * @return resource relationship object\n */\n getRemoteRelationship(\n identifier: StableRecordIdentifier,\n field: string,\n isCollection?: boolean\n ): ResourceRelationship | CollectionRelationship {\n return this._cache.getRemoteRelationship(identifier, field, isCollection);\n }\n\n // Resource State\n // ===============\n\n /**\n * Update the cache state for the given resource to be marked as locally deleted,\n * or remove such a mark.\n *\n * @method setIsDeleted\n * @internal\n * @param identifier\n * @param isDeleted\n */\n setIsDeleted(identifier: StableRecordIdentifier, isDeleted: boolean): void {\n this._cache.setIsDeleted(identifier, isDeleted);\n }\n\n /**\n * Query the cache for any validation errors applicable to the given resource.\n *\n * @method getErrors\n * @internal\n * @param identifier\n * @return\n */\n getErrors(identifier: StableRecordIdentifier): ApiError[] {\n return this._cache.getErrors(identifier);\n }\n\n /**\n * Query the cache for whether a given resource has any available data\n *\n * @method isEmpty\n * @internal\n * @param identifier\n * @return {boolean}\n */\n isEmpty(identifier: StableRecordIdentifier): boolean {\n return this._cache.isEmpty(identifier);\n }\n\n /**\n * Query the cache for whether a given resource was created locally and not\n * yet persisted.\n *\n * @method isNew\n * @internal\n * @param identifier\n * @return {boolean}\n */\n isNew(identifier: StableRecordIdentifier): boolean {\n return this._cache.isNew(identifier);\n }\n\n /**\n * Query the cache for whether a given resource is marked as deleted (but not\n * necessarily persisted yet).\n *\n * @method isDeleted\n * @internal\n * @param identifier\n * @return {boolean}\n */\n isDeleted(identifier: StableRecordIdentifier): boolean {\n return this._cache.isDeleted(identifier);\n }\n\n /**\n * Query the cache for whether a given resource has been deleted and that deletion\n * has also been persisted.\n *\n * @method isDeletionCommitted\n * @internal\n * @param identifier\n * @return {boolean}\n */\n isDeletionCommitted(identifier: StableRecordIdentifier): boolean {\n return this._cache.isDeletionCommitted(identifier);\n }\n}\n"],"names":["PersistedCache","constructor","cache","db","version","_cache","_db","put","doc","result","lid","transaction","durability","request","peekRequest","requests","objectStore","resources","data","resourceData","Array","isArray","forEach","identifier","peek","included","patch","op","mutate","mutation","peekRemoteState","upsert","hasRecord","fork","merge","diff","dump","hydrate","stream","clientDidCreate","options","willCommit","context","didCommit","commitWasRejected","errors","unloadRecord","getAttr","field","getRemoteAttr","setAttr","propertyName","value","changedAttrs","hasChangedAttrs","rollbackAttrs","changedRelationships","hasChangedRelationships","rollbackRelationships","getRelationship","isCollection","getRemoteRelationship","setIsDeleted","isDeleted","getErrors","isEmpty","isNew","isDeletionCommitted"],"mappings":"AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,CAAkB;AAK3CC,EAAAA,WAAWA,CAACC,KAAY,E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,MAAM,CAACmB,IAAI,CAACD,UAAU,CAAC,EAAEA,UAAU,CAACb,GAAG,CAAC;AAC7D,OAAC,CAAC;AACJ;AAEA,IAAA,IAAI,UAAU,IAAID,MAAM,IAAIA,MAAM,CAACgB,QAAQ,EAAE;AAC3C,MAAA,MAAMA,QAA0C,GAAGhB,MAAM,CAACgB,QAAQ;AAClEA,MAAAA,QAAQ,CAACH,OAAO,CAAEC,UAAU,IAAK;AAC/BN,QAAAA,SAAS,CAACV,GAAG,CAAC,IAAI,CAACF,MAAM,CAACmB,IAAI,CAACD,UAAU,CAAC,EAAEA,UAAU,CAACb,GAAG,CAAC;AAC7D,OAAC,CAAC;AACJ;AAEA,IAAA,OAAOD,MAAM;AACf;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEiB,KAAKA,CAACC,EAAa,EAAQ;AACzB,IAAA,IAAI,CAACtB,MAAM,CAACqB,KAAK,CAACC,EAAE,CAAC;AACvB;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,MAAMA,CAACC,QAAkB,EAAQ;AAC/B,IAAA,IAAI,CAACxB,MAAM,CAACuB,MAAM,CAACC,QAAQ,CAAC;AAC9B;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGEL,IAAIA,CAACD,UAA6D,EAAW;AAC3E,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACmB,IAAI,CAACD,UAAU,CAAC;AACrC;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGEO,eAAeA,CAACP,UAA6D,EAAW;AACtF,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACyB,eAAe,CAACP,UAAU,CAAC;AAChD;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACET,WAAWA,CAACS,UAAoC,EAA+C;AAC7F,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACS,WAAW,CAACS,UAAU,CAAC;AAC5C;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEQ,EAAAA,MAAMA,CAACR,UAAkC,EAAEL,IAAkB,EAAEc,SAAkB,EAAmB;IAClG,OAAO,IAAI,CAAC3B,MAAM,CAAC0B,MAAM,CAACR,UAAU,EAAEL,IAAI,EAAEc,SAAS,CAAC;AACxD;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,IAAIA,GAAmB;AACrB,IAAA,OAAO,IAAI,CAAC5B,MAAM,CAAC4B,IAAI,EAAE;AAC3B;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,KAAKA,CAAChC,KAAY,EAAiB;AACjC,IAAA,OAAO,IAAI,CAACG,MAAM,CAAC6B,KAAK,CAAChC,KAAK,CAAC;AACjC;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEiC,EAAAA,IAAIA,GAAsB;AACxB,IAAA,OAAO,IAAI,CAAC9B,MAAM,CAAC8B,IAAI,EAAE;AAC3B;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,IAAIA,GAAqC;AACvC,IAAA,OAAO,IAAI,CAAC/B,MAAM,CAAC+B,IAAI,EAAE;AAC3B;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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EACE2C,KAAKA,CAAC3C,UAAkC,EAAW;AACjD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC6D,KAAK,CAAC3C,UAAU,CAAC;AACtC;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEwC,SAASA,CAACxC,UAAkC,EAAW;AACrD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC0D,SAAS,CAACxC,UAAU,CAAC;AAC1C;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE4C,mBAAmBA,CAAC5C,UAAkC,EAAW;AAC/D,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC8D,mBAAmB,CAAC5C,UAAU,CAAC;AACpD;AACF;;;;"}
1
+ {"version":3,"file":"persisted-cache.js","sources":["../src/persisted-cache/cache.ts"],"sourcesContent":["import type { StableRecordIdentifier } from '@warp-drive-mirror/core-types';\nimport type { Cache, ChangedAttributesHash, RelationshipDiff } from '@warp-drive-mirror/core-types/cache';\nimport type { ResourceBlob } from '@warp-drive-mirror/core-types/cache/aliases';\nimport type { Change } from '@warp-drive-mirror/core-types/cache/change';\nimport type { Mutation } from '@warp-drive-mirror/core-types/cache/mutations';\nimport type { Operation } from '@warp-drive-mirror/core-types/cache/operations';\nimport type { CollectionRelationship, ResourceRelationship } from '@warp-drive-mirror/core-types/cache/relationship';\nimport type { StableDocumentIdentifier, StableExistingRecordIdentifier } from '@warp-drive-mirror/core-types/identifier';\nimport type { Value } from '@warp-drive-mirror/core-types/json/raw';\nimport type { TypeFromInstanceOrString } from '@warp-drive-mirror/core-types/record';\nimport type { RequestContext, StructuredDataDocument, StructuredDocument } from '@warp-drive-mirror/core-types/request';\nimport type { ResourceDocument, SingleResourceDataDocument } from '@warp-drive-mirror/core-types/spec/document';\nimport type { ApiError } from '@warp-drive-mirror/core-types/spec/error';\n/**\n * The PersistedCache wraps a Cache to enhance it with\n * Persisted Storage capabilities.\n *\n * @class PersistedCache\n * @internal\n */\nexport class PersistedCache implements Cache {\n declare _cache: Cache;\n declare _db: IDBDatabase;\n declare version: '2';\n\n constructor(cache: Cache, db: IDBDatabase) {\n this.version = '2';\n this._cache = cache;\n this._db = db;\n }\n\n // Cache Management\n // ================\n\n /**\n * Cache the response to a request\n *\n * Unlike `store.push` which has UPSERT\n * semantics, `put` has `replace` semantics similar to\n * the `http` method `PUT`\n *\n * the individually cacheabl\n * e resource data it may contain\n * should upsert, but the document data surrounding it should\n * fully replace any existing information\n *\n * Note that in order to support inserting arbitrary data\n * to the cache that did not originate from a request `put`\n * should expect to sometimes encounter a document with only\n * a `content` member and therefor must not assume the existence\n * of `request` and `response` on the document.\n *\n * @method put\n * @param {StructuredDocument} doc\n * @return {ResourceDocument}\n * @internal\n */\n put<T>(doc: StructuredDocument<T> | { content: T }): ResourceDocument {\n const result = this._cache.put(doc);\n\n if (!result.lid) {\n return result;\n }\n\n const transaction = this._db.transaction(['request', 'resource'], 'readwrite', { durability: 'relaxed' });\n const request = this._cache.peekRequest({ lid: result.lid })!;\n\n const requests = transaction.objectStore('request');\n const resources = transaction.objectStore('resource');\n\n requests.put(request);\n\n if ('data' in result && result.data) {\n const resourceData: StableExistingRecordIdentifier[] = Array.isArray(result.data) ? result.data : [result.data];\n resourceData.forEach((identifier) => {\n resources.put(this._cache.peek(identifier), identifier.lid);\n });\n }\n\n if ('included' in result && result.included) {\n const included: StableExistingRecordIdentifier[] = result.included;\n included.forEach((identifier) => {\n resources.put(this._cache.peek(identifier), identifier.lid);\n });\n }\n\n return result;\n }\n\n /**\n * Perform an operation on the cache to update the remote state.\n *\n * Note: currently the only valid operation is a MergeOperation\n * which occurs when a collision of identifiers is detected.\n *\n * @method patch\n * @internal\n * @param op the operation to perform\n * @return {void}\n */\n patch(op: Operation): void {\n this._cache.patch(op);\n }\n\n /**\n * Update resource data with a local mutation. Currently supports operations\n * on relationships only.\n *\n * @method mutate\n * @internal\n * @param mutation\n */\n mutate(mutation: Mutation): void {\n this._cache.mutate(mutation);\n }\n\n /**\n * Peek resource data from the Cache.\n *\n * In development, if the return value\n * is JSON the return value\n * will be deep-cloned and deep-frozen\n * to prevent mutation thereby enforcing cache\n * Immutability.\n *\n * This form of peek is useful for implementations\n * that want to feed raw-data from cache to the UI\n * or which want to interact with a blob of data\n * directly from the presentation cache.\n *\n * An implementation might want to do this because\n * de-referencing records which read from their own\n * blob is generally safer because the record does\n * not require retainining connections to the Store\n * and Cache to present data on a per-field basis.\n *\n * This generally takes the place of `getAttr` as\n * an API and may even take the place of `getRelationship`\n * depending on implementation specifics, though this\n * latter usage is less recommended due to the advantages\n * of the Graph handling necessary entanglements and\n * notifications for relational data.\n *\n * @method peek\n * @internal\n * @param {StableRecordIdentifier | StableDocumentIdentifier} identifier\n * @return {ResourceDocument | ResourceBlob | null} the known resource data\n */\n peek<T = unknown>(identifier: StableRecordIdentifier<TypeFromInstanceOrString<T>>): T | null;\n peek(identifier: StableDocumentIdentifier): ResourceDocument | null;\n peek(identifier: StableRecordIdentifier | StableDocumentIdentifier): unknown {\n return this._cache.peek(identifier);\n }\n\n /**\n * Peek resource data from the Cache.\n *\n * In development, if the return value\n * is JSON the return value\n * will be deep-cloned and deep-frozen\n * to prevent mutation thereby enforcing cache\n * Immutability.\n *\n * This form of peek is useful for implementations\n * that want to feed raw-data from cache to the UI\n * or which want to interact with a blob of data\n * directly from the presentation cache.\n *\n * An implementation might want to do this because\n * de-referencing records which read from their own\n * blob is generally safer because the record does\n * not require retainining connections to the Store\n * and Cache to present data on a per-field basis.\n *\n * This generally takes the place of `getAttr` as\n * an API and may even take the place of `getRelationship`\n * depending on implementation specifics, though this\n * latter usage is less recommended due to the advantages\n * of the Graph handling necessary entanglements and\n * notifications for relational data.\n *\n * @method peek\n * @internal\n * @param {StableRecordIdentifier | StableDocumentIdentifier} identifier\n * @return {ResourceDocument | ResourceBlob | null} the known resource data\n */\n peekRemoteState<T = unknown>(identifier: StableRecordIdentifier<TypeFromInstanceOrString<T>>): T | null;\n peekRemoteState(identifier: StableDocumentIdentifier): ResourceDocument | null;\n peekRemoteState(identifier: StableRecordIdentifier | StableDocumentIdentifier): unknown {\n return this._cache.peekRemoteState(identifier);\n }\n\n /**\n * Peek the Cache for the existing request data associated with\n * a cacheable request\n *\n * @method peekRequest\n * @param {StableDocumentIdentifier}\n * @return {StableDocumentIdentifier | null}\n * @internal\n */\n peekRequest(identifier: StableDocumentIdentifier): StructuredDocument<ResourceDocument> | null {\n return this._cache.peekRequest(identifier);\n }\n\n /**\n * Push resource data from a remote source into the cache for this identifier\n *\n * @method upsert\n * @internal\n * @param identifier\n * @param data\n * @param hasRecord\n * @return {void | string[]} if `hasRecord` is true then calculated key changes should be returned\n */\n upsert(identifier: StableRecordIdentifier, data: ResourceBlob, hasRecord: boolean): void | string[] {\n return this._cache.upsert(identifier, data, hasRecord);\n }\n\n // Cache Forking Support\n // =====================\n\n /**\n * Create a fork of the cache from the current state.\n *\n * Applications should typically not call this method themselves,\n * preferring instead to fork at the Store level, which will\n * utilize this method to fork the cache.\n *\n * @method fork\n * @internal\n * @return Promise<Cache>\n */\n fork(): Promise<Cache> {\n return this._cache.fork();\n }\n\n /**\n * Merge a fork back into a parent Cache.\n *\n * Applications should typically not call this method themselves,\n * preferring instead to merge at the Store level, which will\n * utilize this method to merge the caches.\n *\n * @method merge\n * @param {Cache} cache\n * @internal\n * @return Promise<void>\n */\n merge(cache: Cache): Promise<void> {\n return this._cache.merge(cache);\n }\n\n /**\n * Generate the list of changes applied to all\n * record in the store.\n *\n * Each individual resource or document that has\n * been mutated should be described as an individual\n * `Change` entry in the returned array.\n *\n * A `Change` is described by an object containing up to\n * three properties: (1) the `identifier` of the entity that\n * changed; (2) the `op` code of that change being one of\n * `upsert` or `remove`, and if the op is `upsert` a `patch`\n * containing the data to merge into the cache for the given\n * entity.\n *\n * This `patch` is opaque to the Store but should be understood\n * by the Cache and may expect to be utilized by an Adapter\n * when generating data during a `save` operation.\n *\n * It is generally recommended that the `patch` contain only\n * the updated state, ignoring fields that are unchanged\n *\n * ```ts\n * interface Change {\n * identifier: StableRecordIdentifier | StableDocumentIdentifier;\n * op: 'upsert' | 'remove';\n * patch?: unknown;\n * }\n * ```\n *\n * @method diff\n * @internal\n */\n diff(): Promise<Change[]> {\n return this._cache.diff();\n }\n\n // SSR Support\n // ===========\n\n /**\n * Serialize the entire contents of the Cache into a Stream\n * which may be fed back into a new instance of the same Cache\n * via `cache.hydrate`.\n *\n * @method dump\n * @return {Promise<ReadableStream>}\n * @internal\n */\n dump(): Promise<ReadableStream<unknown>> {\n return this._cache.dump();\n }\n\n /**\n * hydrate a Cache from a Stream with content previously serialized\n * from another instance of the same Cache, resolving when hydration\n * is complete.\n *\n * This method should expect to be called both in the context of restoring\n * the Cache during application rehydration after SSR **AND** at unknown\n * times during the lifetime of an already booted application when it is\n * desired to bulk-load additional information into the cache. This latter\n * behavior supports optimizing pre/fetching of data for route transitions\n * via data-only SSR modes.\n *\n * @method hydrate\n * @param {ReadableStream} stream\n * @return {Promise<void>}\n * @internal\n */\n hydrate(stream: ReadableStream<unknown>): Promise<void> {\n return this._cache.hydrate(stream);\n }\n\n // Cache\n // =====\n\n // Resource Support\n // ================\n\n /**\n * [LIFECYLCE] Signal to the cache that a new record has been instantiated on the client\n *\n * It returns properties from options that should be set on the record during the create\n * process. This return value behavior is deprecated.\n *\n * @method clientDidCreate\n * @internal\n * @param identifier\n * @param options\n */\n clientDidCreate(identifier: StableRecordIdentifier, options?: Record<string, unknown>): Record<string, unknown> {\n return this._cache.clientDidCreate(identifier, options);\n }\n\n /**\n * [LIFECYCLE] Signals to the cache that a resource\n * will be part of a save transaction.\n *\n * @method willCommit\n * @internal\n * @param identifier\n */\n willCommit(identifier: StableRecordIdentifier, context: RequestContext): void {\n this._cache.willCommit(identifier, context);\n }\n\n /**\n * [LIFECYCLE] Signals to the cache that a resource\n * was successfully updated as part of a save transaction.\n *\n * @method didCommit\n * @internal\n * @param identifier\n * @param data\n */\n didCommit(identifier: StableRecordIdentifier, result: StructuredDataDocument<unknown>): SingleResourceDataDocument {\n return this._cache.didCommit(identifier, result);\n }\n\n /**\n * [LIFECYCLE] Signals to the cache that a resource\n * was update via a save transaction failed.\n *\n * @method commitWasRejected\n * @internal\n * @param identifier\n * @param errors\n */\n commitWasRejected(identifier: StableRecordIdentifier, errors?: ApiError[]): void {\n this._cache.commitWasRejected(identifier, errors);\n }\n\n /**\n * [LIFECYCLE] Signals to the cache that all data for a resource\n * should be cleared.\n *\n * @method unloadRecord\n * @internal\n * @param identifier\n */\n unloadRecord(identifier: StableRecordIdentifier): void {\n this._cache.unloadRecord(identifier);\n }\n\n // Granular Resource Data APIs\n // ===========================\n\n /**\n * Retrieve the data for an attribute from the cache\n *\n * @method getAttr\n * @internal\n * @param identifier\n * @param propertyName\n * @return {unknown}\n */\n getAttr(identifier: StableRecordIdentifier, field: string): Value | undefined {\n return this._cache.getAttr(identifier, field);\n }\n\n /**\n * Retrieve the remote state for an attribute from the cache\n *\n * @method getAttr\n * @internal\n * @param identifier\n * @param propertyName\n * @return {unknown}\n */\n getRemoteAttr(identifier: StableRecordIdentifier, field: string): Value | undefined {\n return this._cache.getRemoteAttr(identifier, field);\n }\n\n /**\n * Mutate the data for an attribute in the cache\n *\n * @method setAttr\n * @internal\n * @param identifier\n * @param propertyName\n * @param value\n */\n setAttr(identifier: StableRecordIdentifier, propertyName: string, value: Value): void {\n this._cache.setAttr(identifier, propertyName, value);\n }\n\n /**\n * Query the cache for the changed attributes of a resource.\n *\n * @method changedAttrs\n * @internal\n * @param identifier\n * @return\n */\n changedAttrs(identifier: StableRecordIdentifier): ChangedAttributesHash {\n return this._cache.changedAttrs(identifier);\n }\n\n /**\n * Query the cache for whether any mutated attributes exist\n *\n * @method hasChangedAttrs\n * @internal\n * @param identifier\n * @return {Boolean}\n */\n hasChangedAttrs(identifier: StableRecordIdentifier): boolean {\n return this._cache.hasChangedAttrs(identifier);\n }\n\n /**\n * Tell the cache to discard any uncommitted mutations to attributes\n *\n * @method rollbackAttrs\n * @internal\n * @param identifier\n * @return the names of attributes that were restored\n */\n rollbackAttrs(identifier: StableRecordIdentifier): string[] {\n return this._cache.rollbackAttrs(identifier);\n }\n\n /**\n * Query the cache for the changes to relationships of a resource.\n *\n * Returns a map of relationship names to RelationshipDiff objects.\n *\n * ```ts\n * type RelationshipDiff =\n | {\n kind: 'collection';\n remoteState: StableRecordIdentifier[];\n additions: Set<StableRecordIdentifier>;\n removals: Set<StableRecordIdentifier>;\n localState: StableRecordIdentifier[];\n reordered: boolean;\n }\n | {\n kind: 'resource';\n remoteState: StableRecordIdentifier | null;\n localState: StableRecordIdentifier | null;\n };\n ```\n *\n * @method changedRelationships\n * @public\n * @param {StableRecordIdentifier} identifier\n * @return {Map<string, RelationshipDiff>}\n */\n changedRelationships(identifier: StableRecordIdentifier): Map<string, RelationshipDiff> {\n return this._cache.changedRelationships(identifier);\n }\n\n /**\n * Query the cache for whether any mutated attributes exist\n *\n * @method hasChangedRelationships\n * @public\n * @param {StableRecordIdentifier} identifier\n * @return {Boolean}\n */\n hasChangedRelationships(identifier: StableRecordIdentifier): boolean {\n return this._cache.hasChangedRelationships(identifier);\n }\n\n /**\n * Tell the cache to discard any uncommitted mutations to relationships.\n *\n * This will also discard the change on any appropriate inverses.\n *\n * This method is a candidate to become a mutation\n *\n * @method rollbackRelationships\n * @public\n * @param {StableRecordIdentifier} identifier\n * @return {String[]} the names of relationships that were restored\n */\n rollbackRelationships(identifier: StableRecordIdentifier): string[] {\n return this._cache.rollbackRelationships(identifier);\n }\n\n // Relationships\n // =============\n\n /**\n * Query the cache for the current state of a relationship property\n *\n * @method getRelationship\n * @internal\n * @param identifier\n * @param propertyName\n * @return resource relationship object\n */\n getRelationship(\n identifier: StableRecordIdentifier,\n field: string,\n isCollection?: boolean\n ): ResourceRelationship | CollectionRelationship {\n return this._cache.getRelationship(identifier, field, isCollection);\n }\n\n /**\n * Query the remote state for the current state of a relationship property\n *\n * @method getRelationship\n * @internal\n * @param identifier\n * @param propertyName\n * @return resource relationship object\n */\n getRemoteRelationship(\n identifier: StableRecordIdentifier,\n field: string,\n isCollection?: boolean\n ): ResourceRelationship | CollectionRelationship {\n return this._cache.getRemoteRelationship(identifier, field, isCollection);\n }\n\n // Resource State\n // ===============\n\n /**\n * Update the cache state for the given resource to be marked as locally deleted,\n * or remove such a mark.\n *\n * @method setIsDeleted\n * @internal\n * @param identifier\n * @param isDeleted\n */\n setIsDeleted(identifier: StableRecordIdentifier, isDeleted: boolean): void {\n this._cache.setIsDeleted(identifier, isDeleted);\n }\n\n /**\n * Query the cache for any validation errors applicable to the given resource.\n *\n * @method getErrors\n * @internal\n * @param identifier\n * @return\n */\n getErrors(identifier: StableRecordIdentifier): ApiError[] {\n return this._cache.getErrors(identifier);\n }\n\n /**\n * Query the cache for whether a given resource has any available data\n *\n * @method isEmpty\n * @internal\n * @param identifier\n * @return {Boolean}\n */\n isEmpty(identifier: StableRecordIdentifier): boolean {\n return this._cache.isEmpty(identifier);\n }\n\n /**\n * Query the cache for whether a given resource was created locally and not\n * yet persisted.\n *\n * @method isNew\n * @internal\n * @param identifier\n * @return {Boolean}\n */\n isNew(identifier: StableRecordIdentifier): boolean {\n return this._cache.isNew(identifier);\n }\n\n /**\n * Query the cache for whether a given resource is marked as deleted (but not\n * necessarily persisted yet).\n *\n * @method isDeleted\n * @internal\n * @param identifier\n * @return {Boolean}\n */\n isDeleted(identifier: StableRecordIdentifier): boolean {\n return this._cache.isDeleted(identifier);\n }\n\n /**\n * Query the cache for whether a given resource has been deleted and that deletion\n * has also been persisted.\n *\n * @method isDeletionCommitted\n * @internal\n * @param identifier\n * @return {Boolean}\n */\n isDeletionCommitted(identifier: StableRecordIdentifier): boolean {\n return this._cache.isDeletionCommitted(identifier);\n }\n}\n"],"names":["PersistedCache","constructor","cache","db","version","_cache","_db","put","doc","result","lid","transaction","durability","request","peekRequest","requests","objectStore","resources","data","resourceData","Array","isArray","forEach","identifier","peek","included","patch","op","mutate","mutation","peekRemoteState","upsert","hasRecord","fork","merge","diff","dump","hydrate","stream","clientDidCreate","options","willCommit","context","didCommit","commitWasRejected","errors","unloadRecord","getAttr","field","getRemoteAttr","setAttr","propertyName","value","changedAttrs","hasChangedAttrs","rollbackAttrs","changedRelationships","hasChangedRelationships","rollbackRelationships","getRelationship","isCollection","getRemoteRelationship","setIsDeleted","isDeleted","getErrors","isEmpty","isNew","isDeletionCommitted"],"mappings":"AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,CAAkB;AAK3CC,EAAAA,WAAWA,CAACC,KAAY,EAAEC,EAAe,EAAE;IACzC,IAAI,CAACC,OAAO,GAAG,GAAG;IAClB,IAAI,CAACC,MAAM,GAAGH,KAAK;IACnB,IAAI,CAACI,GAAG,GAAGH,EAAE;AACf;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEI,GAAGA,CAAIC,GAA2C,EAAoB;IACpE,MAAMC,MAAM,GAAG,IAAI,CAACJ,MAAM,CAACE,GAAG,CAACC,GAAG,CAAC;AAEnC,IAAA,IAAI,CAACC,MAAM,CAACC,GAAG,EAAE;AACf,MAAA,OAAOD,MAAM;AACf;AAEA,IAAA,MAAME,WAAW,GAAG,IAAI,CAACL,GAAG,CAACK,WAAW,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,WAAW,EAAE;AAAEC,MAAAA,UAAU,EAAE;AAAU,KAAC,CAAC;AACzG,IAAA,MAAMC,OAAO,GAAG,IAAI,CAACR,MAAM,CAACS,WAAW,CAAC;MAAEJ,GAAG,EAAED,MAAM,CAACC;AAAI,KAAC,CAAE;AAE7D,IAAA,MAAMK,QAAQ,GAAGJ,WAAW,CAACK,WAAW,CAAC,SAAS,CAAC;AACnD,IAAA,MAAMC,SAAS,GAAGN,WAAW,CAACK,WAAW,CAAC,UAAU,CAAC;AAErDD,IAAAA,QAAQ,CAACR,GAAG,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ACA;AACA;AACA;;EAGEL,IAAIA,CAACD,UAA6D,EAAW;AAC3E,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACmB,IAAI,CAACD,UAAU,CAAC;AACrC;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGEO,eAAeA,CAACP,UAA6D,EAAW;AACtF,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACyB,eAAe,CAACP,UAAU,CAAC;AAChD;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACET,WAAWA,CAACS,UAAoC,EAA+C;AAC7F,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACS,WAAW,CAACS,UAAU,CAAC;AAC5C;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEQ,EAAAA,MAAMA,CAACR,UAAkC,EAAEL,IAAkB,EAAEc,SAAkB,EAAmB;IAClG,OAAO,IAAI,CAAC3B,MAAM,CAAC0B,MAAM,CAACR,UAAU,EAAEL,IAAI,EAAEc,SAAS,CAAC;AACxD;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,IAAIA,GAAmB;AACrB,IAAA,OAAO,IAAI,CAAC5B,MAAM,CAAC4B,IAAI,EAAE;AAC3B;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,KAAKA,CAAChC,KAAY,EAAiB;AACjC,IAAA,OAAO,IAAI,CAACG,MAAM,CAAC6B,KAAK,CAAChC,KAAK,CAAC;AACjC;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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ACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEiC,oBAAoBA,CAACjC,UAAkC,EAAiC;AACtF,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACmD,oBAAoB,CAACjC,UAAU,CAAC;AACrD;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEkC,uBAAuBA,CAAClC,UAAkC,EAAW;AACnE,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACoD,uBAAuB,CAAClC,UAAU,CAAC;AACxD;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEmC,qBAAqBA,CAACnC,UAAkC,EAAY;AAClE,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACqD,qBAAqB,CAACnC,UAAU,CAAC;AACtD;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEoC,EAAAA,eAAeA,CACbpC,UAAkC,EAClCyB,KAAa,EACbY,YAAsB,EACyB;IAC/C,OAAO,IAAI,CAACvD,MAAM,CAACsD,eAAe,CAACpC,UAAU,EAAEyB,KAAK,EAAEY,YAAY,CAAC;AACrE;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,qBAAqBA,CACnBtC,UAAkC,EAClCyB,KAAa,EACbY,YAAsB,EACyB;IAC/C,OAAO,IAAI,CAACvD,MAAM,CAACwD,qBAAqB,CAACtC,UAAU,EAAEyB,KAAK,EAAEY,YAAY,CAAC;AAC3E;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEE,EAAAA,YAAYA,CAACvC,UAAkC,EAAEwC,SAAkB,EAAQ;IACzE,IAAI,CAAC1D,MAAM,CAACyD,YAAY,CAACvC,UAAU,EAAEwC,SAAS,CAAC;AACjD;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,SAASA,CAACzC,UAAkC,EAAc;AACxD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC2D,SAAS,CAACzC,UAAU,CAAC;AAC1C;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE0C,OAAOA,CAAC1C,UAAkC,EAAW;AACnD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC4D,OAAO,CAAC1C,UAAU,CAAC;AACxC;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE2C,KAAKA,CAAC3C,UAAkC,EAAW;AACjD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC6D,KAAK,CAAC3C,UAAU,CAAC;AACtC;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEwC,SAASA,CAACxC,UAAkC,EAAW;AACrD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC0D,SAAS,CAACxC,UAAU,CAAC;AAC1C;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE4C,mBAAmBA,CAAC5C,UAAkC,EAAW;AAC/D,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC8D,mBAAmB,CAAC5C,UAAU,CAAC;AACpD;AACF;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warp-drive-mirror/experiments",
3
3
  "description": "Experimental features for EmberData/WarpDrive",
4
- "version": "0.2.2-alpha.9",
4
+ "version": "0.2.3",
5
5
  "license": "MIT",
6
6
  "author": "Chris Thoburn <runspired@users.noreply.github.com>",
7
7
  "repository": {
@@ -41,10 +41,10 @@
41
41
  ],
42
42
  "peerDependencies": {
43
43
  "@sqlite.org/sqlite-wasm": "3.46.0-build2",
44
- "@ember-data-mirror/request": "5.5.0-alpha.19",
45
- "@ember-data-mirror/request-utils": "5.5.0-alpha.19",
46
- "@ember-data-mirror/store": "5.5.0-alpha.19",
47
- "@warp-drive-mirror/core-types": "5.5.0-alpha.19"
44
+ "@ember-data-mirror/request": "5.5.0",
45
+ "@ember-data-mirror/request-utils": "5.5.0",
46
+ "@ember-data-mirror/store": "5.5.0",
47
+ "@warp-drive-mirror/core-types": "5.5.0"
48
48
  },
49
49
  "peerDependenciesMeta": {
50
50
  "@sqlite.org/sqlite-wasm": {
@@ -53,20 +53,19 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@embroider/macros": "^1.16.12",
56
- "@warp-drive-mirror/build-config": "5.5.0-alpha.19"
56
+ "@warp-drive-mirror/build-config": "5.5.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/core": "^7.26.10",
60
60
  "@babel/plugin-transform-typescript": "^7.27.0",
61
61
  "@babel/preset-env": "^7.26.9",
62
62
  "@babel/preset-typescript": "^7.27.0",
63
- "@ember-data-mirror/request": "5.5.0-alpha.19",
64
- "@ember-data-mirror/request-utils": "5.5.0-alpha.19",
65
- "@ember-data-mirror/store": "5.5.0-alpha.19",
66
- "@ember-data-mirror/tracking": "5.5.0-alpha.19",
63
+ "@ember-data-mirror/request": "5.5.0",
64
+ "@ember-data-mirror/request-utils": "5.5.0",
65
+ "@ember-data-mirror/store": "5.5.0",
67
66
  "@glimmer/component": "^2.0.0",
68
- "@warp-drive-mirror/core-types": "5.5.0-alpha.19",
69
- "@warp-drive/internal-config": "5.5.0-alpha.19",
67
+ "@warp-drive-mirror/core-types": "5.5.0",
68
+ "@warp-drive/internal-config": "5.5.0",
70
69
  "ember-source": "~6.3.0",
71
70
  "@sqlite.org/sqlite-wasm": "3.46.0-build2",
72
71
  "typescript": "^5.8.3",