@ember-data/store 5.4.0-beta.1 → 5.4.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +16 -4
  2. package/addon-main.cjs +5 -0
  3. package/dist/-private.js +1 -0
  4. package/{addon/store-service-f6cb9898.js → dist/cache-handler-C5ilAUZ5.js} +1950 -1474
  5. package/dist/cache-handler-C5ilAUZ5.js.map +1 -0
  6. package/{addon → dist}/index.js +4 -1
  7. package/dist/types.js +0 -0
  8. package/dist/types.js.map +1 -0
  9. package/package.json +61 -48
  10. package/unstable-preview-types/-private/cache-handler.d.ts +144 -0
  11. package/unstable-preview-types/-private/cache-handler.d.ts.map +1 -0
  12. package/unstable-preview-types/-private/caches/cache-utils.d.ts +11 -0
  13. package/unstable-preview-types/-private/caches/cache-utils.d.ts.map +1 -0
  14. package/unstable-preview-types/-private/caches/identifier-cache.d.ts +176 -0
  15. package/unstable-preview-types/-private/caches/identifier-cache.d.ts.map +1 -0
  16. package/unstable-preview-types/-private/caches/instance-cache.d.ts +61 -0
  17. package/unstable-preview-types/-private/caches/instance-cache.d.ts.map +1 -0
  18. package/unstable-preview-types/-private/caches/resource-utils.d.ts +12 -0
  19. package/unstable-preview-types/-private/caches/resource-utils.d.ts.map +1 -0
  20. package/unstable-preview-types/-private/document.d.ts +146 -0
  21. package/unstable-preview-types/-private/document.d.ts.map +1 -0
  22. package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts +179 -0
  23. package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts.map +1 -0
  24. package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts +19 -0
  25. package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts.map +1 -0
  26. package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts +31 -0
  27. package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts.map +1 -0
  28. package/unstable-preview-types/-private/managers/cache-manager.d.ts +441 -0
  29. package/unstable-preview-types/-private/managers/cache-manager.d.ts.map +1 -0
  30. package/unstable-preview-types/-private/managers/notification-manager.d.ts +96 -0
  31. package/unstable-preview-types/-private/managers/notification-manager.d.ts.map +1 -0
  32. package/unstable-preview-types/-private/managers/record-array-manager.d.ts +97 -0
  33. package/unstable-preview-types/-private/managers/record-array-manager.d.ts.map +1 -0
  34. package/unstable-preview-types/-private/network/request-cache.d.ts +109 -0
  35. package/unstable-preview-types/-private/network/request-cache.d.ts.map +1 -0
  36. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts +138 -0
  37. package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +1 -0
  38. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts +118 -0
  39. package/unstable-preview-types/-private/record-arrays/native-proxy-type-fix.d.ts.map +1 -0
  40. package/unstable-preview-types/-private/store-service.d.ts +1522 -0
  41. package/unstable-preview-types/-private/store-service.d.ts.map +1 -0
  42. package/unstable-preview-types/-private/store-service.type-test.d.ts +4 -0
  43. package/unstable-preview-types/-private/store-service.type-test.d.ts.map +1 -0
  44. package/unstable-preview-types/-private/utils/coerce-id.d.ts +10 -0
  45. package/unstable-preview-types/-private/utils/coerce-id.d.ts.map +1 -0
  46. package/unstable-preview-types/-private/utils/construct-resource.d.ts +9 -0
  47. package/unstable-preview-types/-private/utils/construct-resource.d.ts.map +1 -0
  48. package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts +4 -0
  49. package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts.map +1 -0
  50. package/unstable-preview-types/-private/utils/normalize-model-name.d.ts +4 -0
  51. package/unstable-preview-types/-private/utils/normalize-model-name.d.ts.map +1 -0
  52. package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts +4 -0
  53. package/unstable-preview-types/-private/utils/uuid-polyfill.d.ts.map +1 -0
  54. package/unstable-preview-types/-private.d.ts +25 -0
  55. package/unstable-preview-types/-private.d.ts.map +1 -0
  56. package/unstable-preview-types/-types/overview.d.ts +21 -0
  57. package/unstable-preview-types/-types/overview.d.ts.map +1 -0
  58. package/unstable-preview-types/-types/q/cache-capabilities-manager.d.ts +109 -0
  59. package/unstable-preview-types/-types/q/cache-capabilities-manager.d.ts.map +1 -0
  60. package/unstable-preview-types/-types/q/ds-model.d.ts +25 -0
  61. package/unstable-preview-types/-types/q/ds-model.d.ts.map +1 -0
  62. package/unstable-preview-types/-types/q/identifier.d.ts +193 -0
  63. package/unstable-preview-types/-types/q/identifier.d.ts.map +1 -0
  64. package/unstable-preview-types/-types/q/promise-proxies.d.ts +4 -0
  65. package/unstable-preview-types/-types/q/promise-proxies.d.ts.map +1 -0
  66. package/unstable-preview-types/-types/q/record-data-json-api.d.ts +36 -0
  67. package/unstable-preview-types/-types/q/record-data-json-api.d.ts.map +1 -0
  68. package/unstable-preview-types/-types/q/record-instance.d.ts +29 -0
  69. package/unstable-preview-types/-types/q/record-instance.d.ts.map +1 -0
  70. package/unstable-preview-types/-types/q/schema-service.d.ts +358 -0
  71. package/unstable-preview-types/-types/q/schema-service.d.ts.map +1 -0
  72. package/unstable-preview-types/-types/q/store.d.ts +38 -0
  73. package/unstable-preview-types/-types/q/store.d.ts.map +1 -0
  74. package/unstable-preview-types/index.d.ts +222 -0
  75. package/unstable-preview-types/index.d.ts.map +1 -0
  76. package/unstable-preview-types/types.d.ts +7 -0
  77. package/unstable-preview-types/types.d.ts.map +1 -0
  78. package/addon/-private.js +0 -1
  79. package/addon/store-service-f6cb9898.js.map +0 -1
  80. package/addon-main.js +0 -93
  81. /package/{addon → dist}/-private.js.map +0 -0
  82. /package/{addon → dist}/index.js.map +0 -0
package/README.md CHANGED
@@ -55,12 +55,21 @@ pnpm add @ember-data/store
55
55
 
56
56
  After installing you will want to configure your first `Store`. Read more below for how to create and configure stores for your application.
57
57
 
58
+ **Tagged Releases**
59
+
60
+ - ![NPM Canary Version](https://img.shields.io/npm/v/%40ember-data/store/canary?label=%40canary&color=FFBF00)
61
+ - ![NPM Beta Version](https://img.shields.io/npm/v/%40ember-data/store/beta?label=%40beta&color=ff00ff)
62
+ - ![NPM Stable Version](https://img.shields.io/npm/v/%40ember-data/store/latest?label=%40latest&color=90EE90)
63
+ - ![NPM LTS Version](https://img.shields.io/npm/v/%40ember-data/store/lts?label=%40lts&color=0096FF)
64
+ - ![NPM LTS 4.12 Version](https://img.shields.io/npm/v/%40ember-data/store/lts-4-12?label=%40lts-4-12&color=bbbbbb)
65
+
58
66
 
59
67
  ## 🔨 Creating A Store
60
68
 
61
69
  To use a `Store` we will need to do few things: add a [Cache](https://api.emberjs.com/ember-data/release/classes/%3CInterface%3E%20Cache) to store data **in-memory**, add a [Handler](https://github.com/emberjs/data/tree/main/packages/request#handling-requests) to fetch data from a source, and implement `instantiateRecord` to tell the store how to display the data for individual resources.
62
70
 
63
- > **Note** If you are using the package `ember-data` then a `JSON:API` cache and `instantiateRecord` are configured for you by default.
71
+ > **Note**
72
+ > If you are using the package `ember-data` then a `JSON:API` cache and `instantiateRecord` are configured for you by default.
64
73
 
65
74
  ### Configuring A Cache
66
75
 
@@ -81,7 +90,8 @@ class extends Store {
81
90
 
82
91
  Now that we have a `cache` let's setup something to handle fetching and saving data via our API.
83
92
 
84
- > **Note** The `ember-data` package automatically includes and configures the `@ember-data/json-api` cache for you.
93
+ > **Note**
94
+ > The `ember-data` package automatically includes and configures the `@ember-data/json-api` cache for you.
85
95
 
86
96
  ### Handling Requests
87
97
 
@@ -89,7 +99,8 @@ When *Ember***Data** needs to fetch or save data it will pass that request to yo
89
99
 
90
100
  To start, let's install the `RequestManager` from `@ember-data/request` and the basic `Fetch` handler from ``@ember-data/request/fetch`.
91
101
 
92
- > **Note** If your app uses `GraphQL`, `REST` or different conventions for `JSON:API` than your cache expects, other handlers may better fit your data. You can author your own handler by creating one that conforms to the [handler interface](https://github.com/emberjs/data/tree/main/packages/request#handling-requests).
102
+ > **Note**
103
+ > If your app uses `GraphQL`, `REST` or different conventions for `JSON:API` than your cache expects, other handlers may better fit your data. You can author your own handler by creating one that conforms to the [handler interface](https://github.com/emberjs/data/tree/main/packages/request#handling-requests).
93
104
 
94
105
  ```ts
95
106
  import Store, { CacheHandler } from '@ember-data/store';
@@ -185,5 +196,6 @@ Typically you will choose an existing record implementation such as `@ember-data
185
196
 
186
197
  Because of the boundaries around instantiation and the cache, record implementations should be capable of interop both with each other and with any `Cache`. Due to this, if needed an application can utilize multiple record implementations and multiple cache implementations either to support enhanced features for only a subset of records or to be able to incrementally migrate from one record/cache to another record or cache.
187
198
 
188
- > **Note:** The `ember-data` package automatically includes the `@ember-data/model`
199
+ > **Note**
200
+ > The `ember-data` package automatically includes the `@ember-data/model`
189
201
  > package and configures it for you.
package/addon-main.cjs ADDED
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const { addonShim } = require('@warp-drive/build-config/addon-shim.cjs');
4
+
5
+ module.exports = addonShim(__dirname);
@@ -0,0 +1 @@
1
+ export { A as ARRAY_SIGNAL, C as CacheHandler, j as CollectionRecordArray, I as LiveArray, M as MUTATE, R as RecordArrayManager, k as SOURCE, S as Store, q as StoreMap, _ as _clearCaches, u as _deprecatingNormalize, g as coerceId, f as constructResource, h as ensureStringId, l as fastPush, i as isStableIdentifier, n as notifyArray, p as peekCache, r as recordIdentifierFor, m as removeRecordDataFor, t as setCacheFor, o as setRecordIdentifier, s as storeFor } from "./cache-handler-C5ilAUZ5.js";