@warp-drive-mirror/experiments 0.1.0-alpha.138 → 0.1.0-alpha.139

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.
@@ -131,6 +131,43 @@ class PersistedCache {
131
131
  return this._cache.peek(identifier);
132
132
  }
133
133
 
134
+ /**
135
+ * Peek resource data from the Cache.
136
+ *
137
+ * In development, if the return value
138
+ * is JSON the return value
139
+ * will be deep-cloned and deep-frozen
140
+ * to prevent mutation thereby enforcing cache
141
+ * Immutability.
142
+ *
143
+ * This form of peek is useful for implementations
144
+ * that want to feed raw-data from cache to the UI
145
+ * or which want to interact with a blob of data
146
+ * directly from the presentation cache.
147
+ *
148
+ * An implementation might want to do this because
149
+ * de-referencing records which read from their own
150
+ * blob is generally safer because the record does
151
+ * not require retainining connections to the Store
152
+ * and Cache to present data on a per-field basis.
153
+ *
154
+ * This generally takes the place of `getAttr` as
155
+ * an API and may even take the place of `getRelationship`
156
+ * depending on implementation specifics, though this
157
+ * latter usage is less recommended due to the advantages
158
+ * of the Graph handling necessary entanglements and
159
+ * notifications for relational data.
160
+ *
161
+ * @method peek
162
+ * @internal
163
+ * @param {StableRecordIdentifier | StableDocumentIdentifier} identifier
164
+ * @returns {ResourceDocument | ResourceBlob | null} the known resource data
165
+ */
166
+
167
+ peekRemoteState(identifier) {
168
+ return this._cache.peekRemoteState(identifier);
169
+ }
170
+
134
171
  /**
135
172
  * Peek the Cache for the existing request data associated with
136
173
  * a cacheable request
@@ -353,6 +390,19 @@ class PersistedCache {
353
390
  return this._cache.getAttr(identifier, field);
354
391
  }
355
392
 
393
+ /**
394
+ * Retrieve the remote state for an attribute from the cache
395
+ *
396
+ * @method getAttr
397
+ * @internal
398
+ * @param identifier
399
+ * @param propertyName
400
+ * @return {unknown}
401
+ */
402
+ getRemoteAttr(identifier, field) {
403
+ return this._cache.getRemoteAttr(identifier, field);
404
+ }
405
+
356
406
  /**
357
407
  * Mutate the data for an attribute in the cache
358
408
  *
@@ -477,6 +527,19 @@ class PersistedCache {
477
527
  return this._cache.getRelationship(identifier, field, isCollection);
478
528
  }
479
529
 
530
+ /**
531
+ * Query the remote state for the current state of a relationship property
532
+ *
533
+ * @method getRelationship
534
+ * @internal
535
+ * @param identifier
536
+ * @param propertyName
537
+ * @return resource relationship object
538
+ */
539
+ getRemoteRelationship(identifier, field, isCollection) {
540
+ return this._cache.getRemoteRelationship(identifier, field, isCollection);
541
+ }
542
+
480
543
  // Resource State
481
544
  // ===============
482
545
 
@@ -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 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 * 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 // 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","upsert","hasRecord","fork","merge","diff","dump","hydrate","stream","clientDidCreate","options","willCommit","context","didCommit","commitWasRejected","errors","unloadRecord","getAttr","field","setAttr","propertyName","value","changedAttrs","hasChangedAttrs","rollbackAttrs","changedRelationships","hasChangedRelationships","rollbackRelationships","getRelationship","isCollection","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,CAAA;IAClB,IAAI,CAACC,MAAM,GAAGH,KAAK,CAAA;IACnB,IAAI,CAACI,GAAG,GAAGH,EAAE,CAAA;AACf,GAAA;;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,CAAA;AAEnC,IAAA,IAAI,CAACC,MAAM,CAACC,GAAG,EAAE;AACf,MAAA,OAAOD,MAAM,CAAA;AACf,KAAA;AAEA,IAAA,MAAME,WAAW,GAAG,IAAI,CAACL,GAAG,CAACK,WAAW,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,WAAW,EAAE;AAAEC,MAAAA,UAAU,EAAE,SAAA;AAAU,KAAC,CAAC,CAAA;AACzG,IAAA,MAAMC,OAAO,GAAG,IAAI,CAACR,MAAM,CAACS,WAAW,CAAC;MAAEJ,GAAG,EAAED,MAAM,CAACC,GAAAA;AAAI,KAAC,CAAE,CAAA;AAE7D,IAAA,MAAMK,QAAQ,GAAGJ,WAAW,CAACK,WAAW,CAAC,SAAS,CAAC,CAAA;AACnD,IA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B,MAAM,CAACC,QAAQ,CAAC,CAAA;AAC9B,GAAA;;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,CAAA;AACrC,GAAA;;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,CAAA;AAC5C,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEO,EAAAA,MAAMA,CAACP,UAAkC,EAAEL,IAAkB,EAAEa,SAAkB,EAAmB;IAClG,OAAO,IAAI,CAAC1B,MAAM,CAACyB,MAAM,CAACP,UAAU,EAAEL,IAAI,EAAEa,SAAS,CAAC,CAAA;AACxD,GAAA;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,IAAIA,GAAmB;AACrB,IAAA,OAAO,IAAI,CAAC3B,MAAM,CAAC2B,IAAI,EAAE,CAAA;AAC3B,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,KAAKA,CAAC/B,KAAY,EAAiB;AACjC,IAAA,OAAO,IAAI,CAACG,MAAM,CAAC4B,KAAK,CAAC/B,KAAK,CAAC,CAAA;AACjC,GAAA;;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;AAC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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE+B,oBAAoBA,CAAC/B,UAAkC,EAAiC;AACtF,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACiD,oBAAoB,CAAC/B,UAAU,CAAC,CAAA;AACrD,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEgC,uBAAuBA,CAAChC,UAAkC,EAAW;AACnE,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACkD,uBAAuB,CAAChC,UAAU,CAAC,CAAA;AACxD,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEiC,qBAAqBA,CAACjC,UAAkC,EAAY;AAClE,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACmD,qBAAqB,CAACjC,UAAU,CAAC,CAAA;AACtD,GAAA;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEkC,EAAAA,eAAeA,CACblC,UAAkC,EAClCwB,KAAa,EACbW,YAAsB,EACyB;IAC/C,OAAO,IAAI,CAACrD,MAAM,CAACoD,eAAe,CAAClC,UAAU,EAAEwB,KAAK,EAAEW,YAAY,CAAC,CAAA;AACrE,GAAA;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,YAAYA,CAACpC,UAAkC,EAAEqC,SAAkB,EAAQ;IACzE,IAAI,CAACvD,MAAM,CAACsD,YAAY,CAACpC,UAAU,EAAEqC,SAAS,CAAC,CAAA;AACjD,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,SAASA,CAACtC,UAAkC,EAAc;AACxD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACwD,SAAS,CAACtC,UAAU,CAAC,CAAA;AAC1C,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEuC,OAAOA,CAACvC,UAAkC,EAAW;AACnD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACyD,OAAO,CAACvC,UAAU,CAAC,CAAA;AACxC,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEwC,KAAKA,CAACxC,UAAkC,EAAW;AACjD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC0D,KAAK,CAACxC,UAAU,CAAC,CAAA;AACtC,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEqC,SAASA,CAACrC,UAAkC,EAAW;AACrD,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACuD,SAAS,CAACrC,UAAU,CAAC,CAAA;AAC1C,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEyC,mBAAmBA,CAACzC,UAAkC,EAAW;AAC/D,IAAA,OAAO,IAAI,CAAClB,MAAM,CAAC2D,mBAAmB,CAACzC,UAAU,CAAC,CAAA;AACpD,GAAA;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 * @returns {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,CAAA;IAClB,IAAI,CAACC,MAAM,GAAGH,KAAK,CAAA;IACnB,IAAI,CAACI,GAAG,GAAGH,EAAE,CAAA;AACf,GAAA;;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,CAAA;AAEnC,IAAA,IAAI,CAACC,MAAM,CAACC,GAAG,EAAE;AACf,MAAA,OAAOD,MAAM,CAAA;AACf,KAAA;AAEA,IAAA,MAAME,WAAW,GAAG,IAAI,CAACL,GAAG,CAACK,WAAW,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,WAAW,EAAE;AAAEC,MAAAA,UAAU,EAAE,SAAA;AAAU,KAAC,CAAC,CAAA;AACzG,IAAA,MAAMC,OAAO,GAAG,IAAI,CAACR,MAAM,CAACS,WAAW,CAAC;MAA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AACC,EAAE,CAAC,CAAA;AACvB,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,MAAMA,CAACC,QAAkB,EAAQ;AAC/B,IAAA,IAAI,CAACxB,MAAM,CAACuB,MAAM,CAACC,QAAQ,CAAC,CAAA;AAC9B,GAAA;;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,CAAA;AACrC,GAAA;;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,CAAA;AAChD,GAAA;;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,CAAA;AAC5C,GAAA;;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,CAAA;AACxD,GAAA;;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,CAAA;AAC3B,GAAA;;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,CAAA;AACjC,GAAA;;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,CAAA;AAC3B,GAAA;;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,CAAA;AAC3B,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,OAAOA,CAACC,MAA+B,EAAiB;AACtD,IAAA,OAAO,IAAI,CAACjC,MAAM,CAACgC,OAAO,CAACC,MAAM,CAAC,CAAA;AACpC,GAAA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,eAAeA,CAAChB,UAAkC,EAAEiB,OAAiC,EAA2B;IAC9G,OAAO,IAAI,CAACnC,MAAM,CAACkC,eAAe,CAAChB,UAAU,EAAEiB,OAAO,CAAC,CAAA;AACzD,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,EAAAA,UAAUA,CAAClB,UAAkC,EAAEmB,OAAuB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O,CAAC3B,UAAU,EAAE4B,YAAY,EAAEC,KAAK,CAAC,CAAA;AACtD,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,YAAYA,CAAC9B,UAAkC,EAAyB;AACtE,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACgD,YAAY,CAAC9B,UAAU,CAAC,CAAA;AAC7C,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE+B,eAAeA,CAAC/B,UAAkC,EAAW;AAC3D,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACiD,eAAe,CAAC/B,UAAU,CAAC,CAAA;AAChD,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEgC,aAAaA,CAAChC,UAAkC,EAAY;AAC1D,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACkD,aAAa,CAAChC,UAAU,CAAC,CAAA;AAC9C,GAAA;;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;EACEiC,oBAAoBA,CAACjC,UAAkC,EAAiC;AACtF,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACmD,oBAAoB,CAACjC,UAAU,CAAC,CAAA;AACrD,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEkC,uBAAuBA,CAAClC,UAAkC,EAAW;AACnE,IAAA,OAAO,IAAI,CAAClB,MAAM,CAACoD,uBAAuB,CAAClC,UAAU,CAAC,CAAA;AACxD,GAAA;;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,CAAA;AACtD,GAAA;;AAEA;AACA;;AAEA;AACF;AACA;AACA;AACA;AACA;AAC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IAAI,CAAClB,MAAM,CAAC0D,SAAS,CAACxC,UAAU,CAAC,CAAA;AAC1C,GAAA;;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,CAAA;AACpD,GAAA;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.1.0-alpha.138",
4
+ "version": "0.1.0-alpha.139",
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.4.0-alpha.138",
45
- "@ember-data-mirror/request-utils": "5.4.0-alpha.138",
46
- "@ember-data-mirror/store": "5.4.0-alpha.138",
47
- "@warp-drive-mirror/core-types": "5.4.0-alpha.138"
44
+ "@ember-data-mirror/request": "5.4.0-alpha.139",
45
+ "@ember-data-mirror/request-utils": "5.4.0-alpha.139",
46
+ "@ember-data-mirror/store": "5.4.0-alpha.139",
47
+ "@warp-drive-mirror/core-types": "5.4.0-alpha.139"
48
48
  },
49
49
  "peerDependenciesMeta": {
50
50
  "@sqlite.org/sqlite-wasm": {
@@ -53,20 +53,20 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@embroider/macros": "^1.16.10",
56
- "@warp-drive-mirror/build-config": "5.4.0-alpha.138"
56
+ "@warp-drive-mirror/build-config": "5.4.0-alpha.139"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/core": "^7.24.5",
60
60
  "@babel/plugin-transform-typescript": "^7.24.5",
61
61
  "@babel/preset-env": "^7.24.5",
62
62
  "@babel/preset-typescript": "^7.24.1",
63
- "@ember-data-mirror/request": "5.4.0-alpha.138",
64
- "@ember-data-mirror/request-utils": "5.4.0-alpha.138",
65
- "@ember-data-mirror/store": "5.4.0-alpha.138",
66
- "@ember-data-mirror/tracking": "5.4.0-alpha.138",
63
+ "@ember-data-mirror/request": "5.4.0-alpha.139",
64
+ "@ember-data-mirror/request-utils": "5.4.0-alpha.139",
65
+ "@ember-data-mirror/store": "5.4.0-alpha.139",
66
+ "@ember-data-mirror/tracking": "5.4.0-alpha.139",
67
67
  "@glimmer/component": "^1.1.2",
68
- "@warp-drive-mirror/core-types": "5.4.0-alpha.138",
69
- "@warp-drive/internal-config": "5.4.0-alpha.138",
68
+ "@warp-drive-mirror/core-types": "5.4.0-alpha.139",
69
+ "@warp-drive/internal-config": "5.4.0-alpha.139",
70
70
  "ember-source": "~5.12.0",
71
71
  "pnpm-sync-dependencies-meta-injected": "0.0.14",
72
72
  "@sqlite.org/sqlite-wasm": "3.46.0-build2",