@warp-drive/core 5.6.0-alpha.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 (337) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE.md +23 -0
  3. package/README.md +70 -0
  4. package/addon-main.cjs +5 -0
  5. package/cjs-dist/addon-shim.cjs +1 -0
  6. package/cjs-dist/cjs-set-config.cjs +1 -0
  7. package/declarations/build-config/babel-macros.d.ts +2 -0
  8. package/declarations/build-config/babel-macros.d.ts.map +1 -0
  9. package/declarations/build-config/canary-features.d.ts +2 -0
  10. package/declarations/build-config/canary-features.d.ts.map +1 -0
  11. package/declarations/build-config/debugging.d.ts +2 -0
  12. package/declarations/build-config/debugging.d.ts.map +1 -0
  13. package/declarations/build-config/deprecations.d.ts +2 -0
  14. package/declarations/build-config/deprecations.d.ts.map +1 -0
  15. package/declarations/build-config/env.d.ts +2 -0
  16. package/declarations/build-config/env.d.ts.map +1 -0
  17. package/declarations/build-config/macros.d.ts +2 -0
  18. package/declarations/build-config/macros.d.ts.map +1 -0
  19. package/declarations/build-config.d.ts +2 -0
  20. package/declarations/build-config.d.ts.map +1 -0
  21. package/declarations/configure.d.ts +8 -0
  22. package/declarations/configure.d.ts.map +1 -0
  23. package/declarations/graph/-private/-diff.d.ts +33 -0
  24. package/declarations/graph/-private/-diff.d.ts.map +1 -0
  25. package/declarations/graph/-private/-edge-definition.d.ts +149 -0
  26. package/declarations/graph/-private/-edge-definition.d.ts.map +1 -0
  27. package/declarations/graph/-private/-state.d.ts +10 -0
  28. package/declarations/graph/-private/-state.d.ts.map +1 -0
  29. package/declarations/graph/-private/-utils.d.ts +26 -0
  30. package/declarations/graph/-private/-utils.d.ts.map +1 -0
  31. package/declarations/graph/-private/coerce-id.d.ts +5 -0
  32. package/declarations/graph/-private/coerce-id.d.ts.map +1 -0
  33. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +7 -0
  34. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts.map +1 -0
  35. package/declarations/graph/-private/edges/collection.d.ts +40 -0
  36. package/declarations/graph/-private/edges/collection.d.ts.map +1 -0
  37. package/declarations/graph/-private/edges/implicit.d.ts +14 -0
  38. package/declarations/graph/-private/edges/implicit.d.ts.map +1 -0
  39. package/declarations/graph/-private/edges/resource.d.ts +25 -0
  40. package/declarations/graph/-private/edges/resource.d.ts.map +1 -0
  41. package/declarations/graph/-private/graph.d.ts +55 -0
  42. package/declarations/graph/-private/graph.d.ts.map +1 -0
  43. package/declarations/graph/-private/normalize-link.d.ts +3 -0
  44. package/declarations/graph/-private/normalize-link.d.ts.map +1 -0
  45. package/declarations/graph/-private/operations/add-to-related-records.d.ts +5 -0
  46. package/declarations/graph/-private/operations/add-to-related-records.d.ts.map +1 -0
  47. package/declarations/graph/-private/operations/merge-identifier.d.ts +4 -0
  48. package/declarations/graph/-private/operations/merge-identifier.d.ts.map +1 -0
  49. package/declarations/graph/-private/operations/remove-from-related-records.d.ts +5 -0
  50. package/declarations/graph/-private/operations/remove-from-related-records.d.ts.map +1 -0
  51. package/declarations/graph/-private/operations/replace-related-record.d.ts +4 -0
  52. package/declarations/graph/-private/operations/replace-related-record.d.ts.map +1 -0
  53. package/declarations/graph/-private/operations/replace-related-records.d.ts +8 -0
  54. package/declarations/graph/-private/operations/replace-related-records.d.ts.map +1 -0
  55. package/declarations/graph/-private/operations/update-relationship.d.ts +11 -0
  56. package/declarations/graph/-private/operations/update-relationship.d.ts.map +1 -0
  57. package/declarations/graph/-private.d.ts +14 -0
  58. package/declarations/graph/-private.d.ts.map +1 -0
  59. package/declarations/index.d.ts +15 -0
  60. package/declarations/index.d.ts.map +1 -0
  61. package/declarations/reactive/-private/document.d.ts +147 -0
  62. package/declarations/reactive/-private/document.d.ts.map +1 -0
  63. package/declarations/reactive/-private/fields/compute.d.ts +40 -0
  64. package/declarations/reactive/-private/fields/compute.d.ts.map +1 -0
  65. package/declarations/reactive/-private/fields/managed-array.d.ts +23 -0
  66. package/declarations/reactive/-private/fields/managed-array.d.ts.map +1 -0
  67. package/declarations/reactive/-private/fields/managed-object.d.ts +21 -0
  68. package/declarations/reactive/-private/fields/managed-object.d.ts.map +1 -0
  69. package/declarations/reactive/-private/fields/many-array-manager.d.ts +20 -0
  70. package/declarations/reactive/-private/fields/many-array-manager.d.ts.map +1 -0
  71. package/declarations/reactive/-private/hooks.d.ts +6 -0
  72. package/declarations/reactive/-private/hooks.d.ts.map +1 -0
  73. package/declarations/reactive/-private/record.d.ts +61 -0
  74. package/declarations/reactive/-private/record.d.ts.map +1 -0
  75. package/declarations/reactive/-private/schema.d.ts +180 -0
  76. package/declarations/reactive/-private/schema.d.ts.map +1 -0
  77. package/declarations/reactive/-private/symbols.d.ts +11 -0
  78. package/declarations/reactive/-private/symbols.d.ts.map +1 -0
  79. package/declarations/reactive/-private.d.ts +2 -0
  80. package/declarations/reactive/-private.d.ts.map +1 -0
  81. package/declarations/reactive.d.ts +5 -0
  82. package/declarations/reactive.d.ts.map +1 -0
  83. package/declarations/request/-private/context.d.ts +42 -0
  84. package/declarations/request/-private/context.d.ts.map +1 -0
  85. package/declarations/request/-private/debug.d.ts +5 -0
  86. package/declarations/request/-private/debug.d.ts.map +1 -0
  87. package/declarations/request/-private/fetch.d.ts +40 -0
  88. package/declarations/request/-private/fetch.d.ts.map +1 -0
  89. package/declarations/request/-private/future.d.ts +8 -0
  90. package/declarations/request/-private/future.d.ts.map +1 -0
  91. package/declarations/request/-private/manager.d.ts +160 -0
  92. package/declarations/request/-private/manager.d.ts.map +1 -0
  93. package/declarations/request/-private/promise-cache.d.ts +20 -0
  94. package/declarations/request/-private/promise-cache.d.ts.map +1 -0
  95. package/declarations/request/-private/types.d.ts +236 -0
  96. package/declarations/request/-private/types.d.ts.map +1 -0
  97. package/declarations/request/-private/utils.d.ts +16 -0
  98. package/declarations/request/-private/utils.d.ts.map +1 -0
  99. package/declarations/request.d.ts +6 -0
  100. package/declarations/request.d.ts.map +1 -0
  101. package/declarations/store/-private/cache-handler/handler.d.ts +57 -0
  102. package/declarations/store/-private/cache-handler/handler.d.ts.map +1 -0
  103. package/declarations/store/-private/cache-handler/types.d.ts +99 -0
  104. package/declarations/store/-private/cache-handler/types.d.ts.map +1 -0
  105. package/declarations/store/-private/cache-handler/utils.d.ts +32 -0
  106. package/declarations/store/-private/cache-handler/utils.d.ts.map +1 -0
  107. package/declarations/store/-private/caches/cache-utils.d.ts +9 -0
  108. package/declarations/store/-private/caches/cache-utils.d.ts.map +1 -0
  109. package/declarations/store/-private/caches/identifier-cache.d.ts +316 -0
  110. package/declarations/store/-private/caches/identifier-cache.d.ts.map +1 -0
  111. package/declarations/store/-private/caches/instance-cache.d.ts +65 -0
  112. package/declarations/store/-private/caches/instance-cache.d.ts.map +1 -0
  113. package/declarations/store/-private/caches/resource-utils.d.ts +10 -0
  114. package/declarations/store/-private/caches/resource-utils.d.ts.map +1 -0
  115. package/declarations/store/-private/debug/utils.d.ts +7 -0
  116. package/declarations/store/-private/debug/utils.d.ts.map +1 -0
  117. package/declarations/store/-private/default-cache-policy.d.ts +383 -0
  118. package/declarations/store/-private/default-cache-policy.d.ts.map +1 -0
  119. package/declarations/store/-private/legacy-model-support/record-reference.d.ts +164 -0
  120. package/declarations/store/-private/legacy-model-support/record-reference.d.ts.map +1 -0
  121. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts +17 -0
  122. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts.map +1 -0
  123. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +26 -0
  124. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts.map +1 -0
  125. package/declarations/store/-private/managers/cache-manager.d.ts +428 -0
  126. package/declarations/store/-private/managers/cache-manager.d.ts.map +1 -0
  127. package/declarations/store/-private/managers/notification-manager.d.ts +93 -0
  128. package/declarations/store/-private/managers/notification-manager.d.ts.map +1 -0
  129. package/declarations/store/-private/managers/record-array-manager.d.ts +98 -0
  130. package/declarations/store/-private/managers/record-array-manager.d.ts.map +1 -0
  131. package/declarations/store/-private/network/request-cache.d.ts +104 -0
  132. package/declarations/store/-private/network/request-cache.d.ts.map +1 -0
  133. package/declarations/store/-private/new-core-tmp/promise-state.d.ts +255 -0
  134. package/declarations/store/-private/new-core-tmp/promise-state.d.ts.map +1 -0
  135. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +93 -0
  136. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts.map +1 -0
  137. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +170 -0
  138. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts.map +1 -0
  139. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +30 -0
  140. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts.map +1 -0
  141. package/declarations/store/-private/new-core-tmp/request-state.d.ts +255 -0
  142. package/declarations/store/-private/new-core-tmp/request-state.d.ts.map +1 -0
  143. package/declarations/store/-private/record-arrays/identifier-array.d.ts +141 -0
  144. package/declarations/store/-private/record-arrays/identifier-array.d.ts.map +1 -0
  145. package/declarations/store/-private/record-arrays/many-array.d.ts +199 -0
  146. package/declarations/store/-private/record-arrays/many-array.d.ts.map +1 -0
  147. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +116 -0
  148. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts.map +1 -0
  149. package/declarations/store/-private/store-service.d.ts +1597 -0
  150. package/declarations/store/-private/store-service.d.ts.map +1 -0
  151. package/declarations/store/-private/store-service.type-test.d.ts +2 -0
  152. package/declarations/store/-private/store-service.type-test.d.ts.map +1 -0
  153. package/declarations/store/-private/utils/coerce-id.d.ts +5 -0
  154. package/declarations/store/-private/utils/coerce-id.d.ts.map +1 -0
  155. package/declarations/store/-private/utils/construct-resource.d.ts +7 -0
  156. package/declarations/store/-private/utils/construct-resource.d.ts.map +1 -0
  157. package/declarations/store/-private/utils/is-non-empty-string.d.ts +2 -0
  158. package/declarations/store/-private/utils/is-non-empty-string.d.ts.map +1 -0
  159. package/declarations/store/-private/utils/normalize-model-name.d.ts +2 -0
  160. package/declarations/store/-private/utils/normalize-model-name.d.ts.map +1 -0
  161. package/declarations/store/-private/utils/uuid-polyfill.d.ts +2 -0
  162. package/declarations/store/-private/utils/uuid-polyfill.d.ts.map +1 -0
  163. package/declarations/store/-private.d.ts +27 -0
  164. package/declarations/store/-private.d.ts.map +1 -0
  165. package/declarations/store/-types/q/cache-capabilities-manager.d.ts +100 -0
  166. package/declarations/store/-types/q/cache-capabilities-manager.d.ts.map +1 -0
  167. package/declarations/store/-types/q/ds-model.d.ts +22 -0
  168. package/declarations/store/-types/q/ds-model.d.ts.map +1 -0
  169. package/declarations/store/-types/q/identifier.d.ts +21 -0
  170. package/declarations/store/-types/q/identifier.d.ts.map +1 -0
  171. package/declarations/store/-types/q/promise-proxies.d.ts +2 -0
  172. package/declarations/store/-types/q/promise-proxies.d.ts.map +1 -0
  173. package/declarations/store/-types/q/record-data-json-api.d.ts +31 -0
  174. package/declarations/store/-types/q/record-data-json-api.d.ts.map +1 -0
  175. package/declarations/store/-types/q/record-instance.d.ts +24 -0
  176. package/declarations/store/-types/q/record-instance.d.ts.map +1 -0
  177. package/declarations/store/-types/q/schema-service.d.ts +331 -0
  178. package/declarations/store/-types/q/schema-service.d.ts.map +1 -0
  179. package/declarations/store/-types/q/store.d.ts +35 -0
  180. package/declarations/store/-types/q/store.d.ts.map +1 -0
  181. package/declarations/store.d.ts +2 -0
  182. package/declarations/store.d.ts.map +1 -0
  183. package/declarations/types/-private.d.ts +14 -0
  184. package/declarations/types/-private.d.ts.map +1 -0
  185. package/declarations/types/cache/aliases.d.ts +2 -0
  186. package/declarations/types/cache/aliases.d.ts.map +1 -0
  187. package/declarations/types/cache/change.d.ts +7 -0
  188. package/declarations/types/cache/change.d.ts.map +1 -0
  189. package/declarations/types/cache/mutations.d.ts +39 -0
  190. package/declarations/types/cache/mutations.d.ts.map +1 -0
  191. package/declarations/types/cache/operations.d.ts +72 -0
  192. package/declarations/types/cache/operations.d.ts.map +1 -0
  193. package/declarations/types/cache/relationship.d.ts +14 -0
  194. package/declarations/types/cache/relationship.d.ts.map +1 -0
  195. package/declarations/types/cache.d.ts +492 -0
  196. package/declarations/types/cache.d.ts.map +1 -0
  197. package/declarations/types/graph.d.ts +48 -0
  198. package/declarations/types/graph.d.ts.map +1 -0
  199. package/declarations/types/identifier.d.ts +111 -0
  200. package/declarations/types/identifier.d.ts.map +1 -0
  201. package/declarations/types/json/raw.d.ts +7 -0
  202. package/declarations/types/json/raw.d.ts.map +1 -0
  203. package/declarations/types/params.d.ts +10 -0
  204. package/declarations/types/params.d.ts.map +1 -0
  205. package/declarations/types/record.d.ts +96 -0
  206. package/declarations/types/record.d.ts.map +1 -0
  207. package/declarations/types/record.type-test.d.ts +2 -0
  208. package/declarations/types/record.type-test.d.ts.map +1 -0
  209. package/declarations/types/request.d.ts +308 -0
  210. package/declarations/types/request.d.ts.map +1 -0
  211. package/declarations/types/request.type-test.d.ts +2 -0
  212. package/declarations/types/request.type-test.d.ts.map +1 -0
  213. package/declarations/types/runtime.d.ts +15 -0
  214. package/declarations/types/runtime.d.ts.map +1 -0
  215. package/declarations/types/schema/concepts.d.ts +17 -0
  216. package/declarations/types/schema/concepts.d.ts.map +1 -0
  217. package/declarations/types/schema/fields.d.ts +1674 -0
  218. package/declarations/types/schema/fields.d.ts.map +1 -0
  219. package/declarations/types/schema/fields.type-test.d.ts +2 -0
  220. package/declarations/types/schema/fields.type-test.d.ts.map +1 -0
  221. package/declarations/types/spec/document.d.ts +31 -0
  222. package/declarations/types/spec/document.d.ts.map +1 -0
  223. package/declarations/types/spec/error.d.ts +19 -0
  224. package/declarations/types/spec/error.d.ts.map +1 -0
  225. package/declarations/types/spec/json-api-raw.d.ts +142 -0
  226. package/declarations/types/spec/json-api-raw.d.ts.map +1 -0
  227. package/declarations/types/symbols.d.ts +79 -0
  228. package/declarations/types/symbols.d.ts.map +1 -0
  229. package/declarations/types/utils.d.ts +5 -0
  230. package/declarations/types/utils.d.ts.map +1 -0
  231. package/declarations/types.d.ts +12 -0
  232. package/declarations/types.d.ts.map +1 -0
  233. package/declarations/utils/string.d.ts +45 -0
  234. package/declarations/utils/string.d.ts.map +1 -0
  235. package/dist/build-config/babel-macros.js +1 -0
  236. package/dist/build-config/babel-macros.js.map +1 -0
  237. package/dist/build-config/canary-features.js +1 -0
  238. package/dist/build-config/canary-features.js.map +1 -0
  239. package/dist/build-config/debugging.js +1 -0
  240. package/dist/build-config/debugging.js.map +1 -0
  241. package/dist/build-config/deprecations.js +1 -0
  242. package/dist/build-config/deprecations.js.map +1 -0
  243. package/dist/build-config/env.js +1 -0
  244. package/dist/build-config/env.js.map +1 -0
  245. package/dist/build-config/macros.js +1 -0
  246. package/dist/build-config/macros.js.map +1 -0
  247. package/dist/build-config.js +1 -0
  248. package/dist/build-config.js.map +1 -0
  249. package/dist/configure-Bz49BEZQ.js +145 -0
  250. package/dist/configure-Bz49BEZQ.js.map +1 -0
  251. package/dist/configure.js +1 -0
  252. package/dist/configure.js.map +1 -0
  253. package/dist/context-DE5sFezZ.js +636 -0
  254. package/dist/context-DE5sFezZ.js.map +1 -0
  255. package/dist/graph/-private.js +3364 -0
  256. package/dist/graph/-private.js.map +1 -0
  257. package/dist/handler-DYUefHNU.js +339 -0
  258. package/dist/handler-DYUefHNU.js.map +1 -0
  259. package/dist/index.js +382 -0
  260. package/dist/index.js.map +1 -0
  261. package/dist/reactive/-private.js +1 -0
  262. package/dist/reactive/-private.js.map +1 -0
  263. package/dist/reactive.js +1802 -0
  264. package/dist/reactive.js.map +1 -0
  265. package/dist/request-state-Bv5CY_H0.js +7358 -0
  266. package/dist/request-state-Bv5CY_H0.js.map +1 -0
  267. package/dist/request.js +1 -0
  268. package/dist/request.js.map +1 -0
  269. package/dist/store/-private.js +3 -0
  270. package/dist/store/-private.js.map +1 -0
  271. package/dist/store.js +545 -0
  272. package/dist/store.js.map +1 -0
  273. package/dist/symbols-DyqeYQTe.js +44 -0
  274. package/dist/symbols-DyqeYQTe.js.map +1 -0
  275. package/dist/types/-private.js +79 -0
  276. package/dist/types/-private.js.map +1 -0
  277. package/dist/types/cache/aliases.js +0 -0
  278. package/dist/types/cache/aliases.js.map +1 -0
  279. package/dist/types/cache/change.js +0 -0
  280. package/dist/types/cache/change.js.map +1 -0
  281. package/dist/types/cache/mutations.js +0 -0
  282. package/dist/types/cache/mutations.js.map +1 -0
  283. package/dist/types/cache/operations.js +0 -0
  284. package/dist/types/cache/operations.js.map +1 -0
  285. package/dist/types/cache/relationship.js +0 -0
  286. package/dist/types/cache/relationship.js.map +1 -0
  287. package/dist/types/cache.js +0 -0
  288. package/dist/types/cache.js.map +1 -0
  289. package/dist/types/graph.js +0 -0
  290. package/dist/types/graph.js.map +1 -0
  291. package/dist/types/identifier.js +89 -0
  292. package/dist/types/identifier.js.map +1 -0
  293. package/dist/types/json/raw.js +0 -0
  294. package/dist/types/json/raw.js.map +1 -0
  295. package/dist/types/params.js +0 -0
  296. package/dist/types/params.js.map +1 -0
  297. package/dist/types/record.js +64 -0
  298. package/dist/types/record.js.map +1 -0
  299. package/dist/types/request.js +33 -0
  300. package/dist/types/request.js.map +1 -0
  301. package/dist/types/runtime.js +34 -0
  302. package/dist/types/runtime.js.map +1 -0
  303. package/dist/types/schema/concepts.js +0 -0
  304. package/dist/types/schema/concepts.js.map +1 -0
  305. package/dist/types/schema/fields.js +470 -0
  306. package/dist/types/schema/fields.js.map +1 -0
  307. package/dist/types/schema/fields.type-test.js +0 -0
  308. package/dist/types/schema/fields.type-test.js.map +1 -0
  309. package/dist/types/spec/document.js +0 -0
  310. package/dist/types/spec/document.js.map +1 -0
  311. package/dist/types/spec/error.js +0 -0
  312. package/dist/types/spec/error.js.map +1 -0
  313. package/dist/types/spec/json-api-raw.js +0 -0
  314. package/dist/types/spec/json-api-raw.js.map +1 -0
  315. package/dist/types/symbols.js +84 -0
  316. package/dist/types/symbols.js.map +1 -0
  317. package/dist/types/utils.js +0 -0
  318. package/dist/types/utils.js.map +1 -0
  319. package/dist/types.js +0 -0
  320. package/dist/types.js.map +1 -0
  321. package/dist/utils/string.js +92 -0
  322. package/dist/utils/string.js.map +1 -0
  323. package/logos/NCC-1701-a-blue.svg +4 -0
  324. package/logos/NCC-1701-a-gold.svg +4 -0
  325. package/logos/NCC-1701-a-gold_100.svg +1 -0
  326. package/logos/NCC-1701-a-gold_base-64.txt +1 -0
  327. package/logos/NCC-1701-a.svg +4 -0
  328. package/logos/README.md +4 -0
  329. package/logos/docs-badge.svg +2 -0
  330. package/logos/ember-data-logo-dark.svg +12 -0
  331. package/logos/ember-data-logo-light.svg +12 -0
  332. package/logos/github-header.svg +444 -0
  333. package/logos/social1.png +0 -0
  334. package/logos/social2.png +0 -0
  335. package/logos/warp-drive-logo-dark.svg +4 -0
  336. package/logos/warp-drive-logo-gold.svg +4 -0
  337. package/package.json +70 -0
@@ -0,0 +1,316 @@
1
+ import { type Identifier, type RecordIdentifier, type StableDocumentIdentifier, type StableExistingRecordIdentifier, type StableRecordIdentifier } from '../../../types/identifier.ts';
2
+ import type { ImmutableRequestInfo } from '../../../types/request.ts';
3
+ import type { ExistingResourceIdentifierObject, ResourceIdentifierObject } from '../../../types/spec/json-api-raw.ts';
4
+ import type { ForgetMethod, GenerationMethod, KeyInfo, KeyInfoMethod, ResetMethod, UpdateMethod } from '../../-types/q/identifier.ts';
5
+ type TypeFromIdentifier<T> = T extends {
6
+ type: infer U;
7
+ } ? U : string;
8
+ type NarrowIdentifierIfPossible<T> = T extends ExistingResourceIdentifierObject ? StableExistingRecordIdentifier<TypeFromIdentifier<T>> : StableRecordIdentifier;
9
+ export declare function isStableIdentifier(identifier: unknown): identifier is StableRecordIdentifier;
10
+ export declare function isDocumentIdentifier(identifier: unknown): identifier is StableDocumentIdentifier;
11
+ interface KeyOptions {
12
+ lid: IdentifierMap;
13
+ id: IdentifierMap;
14
+ }
15
+ type TypeMap = {
16
+ [key: string]: KeyOptions;
17
+ };
18
+ type IdentifierMap = Map<string, StableRecordIdentifier>;
19
+ type StableCache = {
20
+ resources: IdentifierMap;
21
+ documents: Map<string, StableDocumentIdentifier>;
22
+ resourcesByType: TypeMap;
23
+ polymorphicLidBackMap: Map<string, string[]>;
24
+ };
25
+ export type MergeMethod = (targetIdentifier: StableRecordIdentifier, matchedIdentifier: StableRecordIdentifier, resourceData: unknown) => StableRecordIdentifier;
26
+ /**
27
+ Configures how unique identifier lid strings are generated by @ember-data/store.
28
+
29
+ This configuration MUST occur prior to the store instance being created.
30
+
31
+ Takes a method which can expect to receive various data as its first argument
32
+ and the name of a bucket as its second argument.
33
+
34
+ Currently there are two buckets, 'record' and 'document'.
35
+
36
+ ### Resource (`Record`) Identity
37
+
38
+ If the bucket is `record` the method must return a unique (to at-least
39
+ the given bucket) string identifier for the given data as a string to be
40
+ used as the `lid` of an `Identifier` token.
41
+
42
+ This method will only be called by either `getOrCreateRecordIdentifier` or
43
+ `createIdentifierForNewRecord` when an identifier for the supplied data
44
+ is not already known via `lid` or `type + id` combo and one needs to be
45
+ generated or retrieved from a proprietary cache.
46
+
47
+ `data` will be the same data argument provided to `getOrCreateRecordIdentifier`
48
+ and in the `createIdentifierForNewRecord` case will be an object with
49
+ only `type` as a key.
50
+
51
+ ```ts
52
+ import { setIdentifierGenerationMethod } from '@warp-drive/core';
53
+
54
+ export function initialize(applicationInstance) {
55
+ // note how `count` here is now scoped to the application instance
56
+ // for our generation method by being inside the closure provided
57
+ // by the initialize function
58
+ let count = 0;
59
+
60
+ setIdentifierGenerationMethod((resource, bucket) => {
61
+ return resource.lid || `my-key-${count++}`;
62
+ });
63
+ }
64
+
65
+ export default {
66
+ name: 'configure-ember-data-identifiers',
67
+ initialize
68
+ };
69
+ ```
70
+
71
+ ### Document Identity
72
+
73
+ If the bucket is `document` the method will receive the associated
74
+ immutable `request` passed to `store.request` as its first argument
75
+ and should return a unique string for the given request if the document
76
+ should be cached, and `null` if it should not be cached.
77
+
78
+ Note, the request result will still be passed to the cache via `Cache.put`,
79
+ but caches should take this as a signal that the document should not itself
80
+ be cached, while its contents may still be used to update other cache state.
81
+
82
+ The presence of `cacheOptions.key` on the request will take precedence
83
+ for the document cache key, and this method will not be called if it is
84
+ present.
85
+
86
+ The default method implementation for this bucket is to return `null`
87
+ for all requests whose method is not `GET`, and to return the `url` for
88
+ those where it is.
89
+
90
+ This means that queries via `POST` MUST provide `cacheOptions.key` or
91
+ implement this hook.
92
+
93
+ ⚠️ Caution: Requests that do not have a `method` assigned are assumed to be `GET`
94
+
95
+ @public
96
+ */
97
+ export declare function setIdentifierGenerationMethod(method: GenerationMethod | null): void;
98
+ /**
99
+ Configure a callback for when the identifier cache encounters new resource
100
+ data for an existing resource.
101
+
102
+ This configuration MUST occur prior to the store instance being created.
103
+
104
+ ```js
105
+ import { setIdentifierUpdateMethod } from '@warp-drive/core';
106
+ ```
107
+
108
+ Takes a method which can expect to receive an existing `Identifier` alongside
109
+ some new data to consider as a second argument. This is an opportunity
110
+ for secondary lookup tables and caches associated with the identifier
111
+ to be amended.
112
+
113
+ This method is called everytime `updateRecordIdentifier` is called and
114
+ with the same arguments. It provides the opportunity to update secondary
115
+ lookup tables for existing identifiers.
116
+
117
+ It will always be called after an identifier created with `createIdentifierForNewRecord`
118
+ has been committed, or after an update to the `record` a `RecordIdentifier`
119
+ is assigned to has been committed. Committed here meaning that the server
120
+ has acknowledged the update (for instance after a call to `.save()`)
121
+
122
+ If `id` has not previously existed, it will be assigned to the `Identifier`
123
+ prior to this `UpdateMethod` being called; however, calls to the parent method
124
+ `updateRecordIdentifier` that attempt to change the `id` or calling update
125
+ without providing an `id` when one is missing will throw an error.
126
+
127
+ @public
128
+ */
129
+ export declare function setIdentifierUpdateMethod(method: UpdateMethod | null): void;
130
+ /**
131
+ Configure a callback for when the identifier cache is going to release an identifier.
132
+
133
+ This configuration MUST occur prior to the store instance being created.
134
+
135
+ ```js
136
+ import { setIdentifierForgetMethod } from '@warp-drive/core';
137
+ ```
138
+
139
+ Takes method which can expect to receive an existing `Identifier` that should be eliminated
140
+ from any secondary lookup tables or caches that the user has populated for it.
141
+
142
+ @public
143
+ */
144
+ export declare function setIdentifierForgetMethod(method: ForgetMethod | null): void;
145
+ /**
146
+ Configure a callback for when the identifier cache is being torn down.
147
+
148
+ This configuration MUST occur prior to the store instance being created.
149
+
150
+ ```js
151
+ import { setIdentifierResetMethod } from '@warp-drive/core';
152
+ ```
153
+
154
+ Takes a method which can expect to be called when the parent application is destroyed.
155
+
156
+ If you have properly used a WeakMap to encapsulate the state of your customization
157
+ to the application instance, you may not need to implement the `resetMethod`.
158
+
159
+ @public
160
+ */
161
+ export declare function setIdentifierResetMethod(method: ResetMethod | null): void;
162
+ /**
163
+ Configure a callback for when the identifier cache is generating a new
164
+ StableRecordIdentifier for a resource.
165
+
166
+ This method controls the `type` and `id` that will be assigned to the
167
+ `StableRecordIdentifier` that is created.
168
+
169
+ This configuration MUST occur prior to the store instance being created.
170
+
171
+ ```js
172
+ import { setKeyInfoForResource } from '@warp-drive/core';
173
+ ```
174
+
175
+ @public
176
+ */
177
+ export declare function setKeyInfoForResource(method: KeyInfoMethod | null): void;
178
+ /**
179
+ * Each instance of {Store} receives a unique instance of a IdentifierCache.
180
+ *
181
+ * This cache is responsible for assigning or retrieving the unique identify
182
+ * for arbitrary resource data encountered by the store. Data representing
183
+ * a unique resource or record should always be represented by the same
184
+ * identifier.
185
+ *
186
+ * It can be configured by consuming applications.
187
+ *
188
+ * @class IdentifierCache
189
+ @public
190
+ */
191
+ export declare class IdentifierCache {
192
+ _cache: StableCache;
193
+ _generate: GenerationMethod;
194
+ _update: UpdateMethod;
195
+ _forget: ForgetMethod;
196
+ _reset: ResetMethod;
197
+ _merge: MergeMethod;
198
+ _keyInfoForResource: KeyInfoMethod;
199
+ _id: number;
200
+ constructor();
201
+ /**
202
+ * Internal hook to allow management of merge conflicts with identifiers.
203
+ *
204
+ * we allow late binding of this private internal merge so that
205
+ * the cache can insert itself here to handle elimination of duplicates
206
+ *
207
+ * @private
208
+ */
209
+ __configureMerge(method: MergeMethod | null): void;
210
+ upgradeIdentifier(resource: {
211
+ type: string;
212
+ id: string | null;
213
+ lid?: string;
214
+ }): StableRecordIdentifier;
215
+ /**
216
+ * @private
217
+ */
218
+ _getRecordIdentifier(resource: {
219
+ type: string;
220
+ id: string | null;
221
+ lid?: string;
222
+ }, shouldGenerate: 2): StableRecordIdentifier;
223
+ _getRecordIdentifier(resource: unknown, shouldGenerate: 1): StableRecordIdentifier;
224
+ _getRecordIdentifier(resource: unknown, shouldGenerate: 0): StableRecordIdentifier | undefined;
225
+ /**
226
+ * allows us to peek without generating when needed
227
+ * useful for the "create" case when we need to see if
228
+ * we are accidentally overwritting something
229
+ *
230
+ * @param resource
231
+ * @return {StableRecordIdentifier | undefined}
232
+ * @private
233
+ */
234
+ peekRecordIdentifier(resource: ResourceIdentifierObject | Identifier): StableRecordIdentifier | undefined;
235
+ /**
236
+ Returns the DocumentIdentifier for the given Request, creates one if it does not yet exist.
237
+ Returns `null` if the request does not have a `cacheKey` or `url`.
238
+
239
+ @param request
240
+ @return {StableDocumentIdentifier | null}
241
+ @public
242
+ */
243
+ getOrCreateDocumentIdentifier(request: ImmutableRequestInfo): StableDocumentIdentifier | null;
244
+ /**
245
+ Returns the Identifier for the given Resource, creates one if it does not yet exist.
246
+
247
+ Specifically this means that we:
248
+
249
+ - validate the `id` `type` and `lid` combo against known identifiers
250
+ - return an object with an `lid` that is stable (repeated calls with the same
251
+ `id` + `type` or `lid` will return the same `lid` value)
252
+ - this referential stability of the object itself is guaranteed
253
+
254
+ @param resource
255
+ @return {StableRecordIdentifier}
256
+ @public
257
+ */
258
+ getOrCreateRecordIdentifier<T>(resource: T): NarrowIdentifierIfPossible<T>;
259
+ /**
260
+ Returns a new Identifier for the supplied data. Call this method to generate
261
+ an identifier when a new resource is being created local to the client and
262
+ potentially does not have an `id`.
263
+
264
+ Delegates generation to the user supplied `GenerateMethod` if one has been provided
265
+ with the signature `generateMethod({ type }, 'record')`.
266
+
267
+ @param data
268
+ @return {StableRecordIdentifier}
269
+ @public
270
+ */
271
+ createIdentifierForNewRecord(data: {
272
+ type: string;
273
+ id?: string | null;
274
+ }): StableRecordIdentifier;
275
+ /**
276
+ Provides the opportunity to update secondary lookup tables for existing identifiers
277
+ Called after an identifier created with `createIdentifierForNewRecord` has been
278
+ committed.
279
+
280
+ Assigned `id` to an `Identifier` if `id` has not previously existed; however,
281
+ attempting to change the `id` or calling update without providing an `id` when
282
+ one is missing will throw an error.
283
+
284
+ - sets `id` (if `id` was previously `null`)
285
+ - `lid` and `type` MUST NOT be altered post creation
286
+
287
+ If a merge occurs, it is possible the returned identifier does not match the originally
288
+ provided identifier. In this case the abandoned identifier will go through the usual
289
+ `forgetRecordIdentifier` codepaths.
290
+
291
+ @param identifierObject
292
+ @param data
293
+ @return {StableRecordIdentifier}
294
+ @public
295
+ */
296
+ updateRecordIdentifier(identifierObject: RecordIdentifier, data: unknown): StableRecordIdentifier;
297
+ /**
298
+ * @private
299
+ */
300
+ _mergeRecordIdentifiers(keyInfo: KeyInfo, identifier: StableRecordIdentifier, existingIdentifier: StableRecordIdentifier, data: unknown): StableRecordIdentifier;
301
+ /**
302
+ Provides the opportunity to eliminate an identifier from secondary lookup tables
303
+ as well as eliminates it from ember-data's own lookup tables and book keeping.
304
+
305
+ Useful when a record has been deleted and the deletion has been persisted and
306
+ we do not care about the record anymore. Especially useful when an `id` of a
307
+ deleted record might be reused later for a new record.
308
+
309
+ @param identifierObject
310
+ @public
311
+ */
312
+ forgetRecordIdentifier(identifierObject: RecordIdentifier): void;
313
+ destroy(): void;
314
+ }
315
+ export {};
316
+ //# sourceMappingURL=identifier-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifier-cache.d.ts","sourceRoot":"","sources":["../../../../src/store/-private/caches/identifier-cache.ts"],"names":[],"mappings":"AASA,OAAO,EAKL,KAAK,UAAU,EAEf,KAAK,gBAAgB,EACrB,KAAK,wBAAw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{ ReactiveDocument } from '../../../reactive/-private/document.ts';
2
+ import type { Cache } from '../../../types/cache.ts';
3
+ import type { StableDocumentIdentifier, StableRecordIdentifier } from '../../../types/identifier.ts';
4
+ import type { Value } from '../../../types/json/raw.ts';
5
+ import type { TypedRecordInstance, TypeFromInstance } from '../../../types/record.ts';
6
+ import type { OpaqueRecordInstance } from '../../-types/q/record-instance.ts';
7
+ import RecordReference from '../legacy-model-support/record-reference.ts';
8
+ import { CacheCapabilitiesManager } from '../managers/cache-capabilities-manager.ts';
9
+ import type { CacheManager } from '../managers/cache-manager.ts';
10
+ import type { CreateRecordProperties, Store } from '../store-service.ts';
11
+ export declare function peekRecordIdentifier(record: OpaqueRecordInstance): StableRecordIdentifier | undefined;
12
+ /**
13
+ Retrieves the unique referentially-stable [RecordIdentifier](/ember-data/release/classes/StableRecordIdentifier)
14
+ assigned to the given record instance.
15
+
16
+ ```js
17
+ import { recordIdentifierFor } from "@ember-data/store";
18
+ // ... gain access to a record, for instance with peekRecord or findRecord
19
+ const record = store.peekRecord("user", "1");
20
+ // get the identifier for the record (see docs for StableRecordIdentifier)
21
+ const identifier = recordIdentifierFor(record);
22
+ // access the identifier's properties.
23
+ const { id, type, lid } = identifier;
24
+ ```
25
+
26
+ @public
27
+ @param {Object} record a record instance previously obstained from the store.
28
+ @return {StableRecordIdentifier}
29
+ */
30
+ export declare function recordIdentifierFor<T extends TypedRecordInstance>(record: T): StableRecordIdentifier<TypeFromInstance<T>>;
31
+ export declare function recordIdentifierFor(record: OpaqueRecordInstance): StableRecordIdentifier;
32
+ export declare function setRecordIdentifier(record: OpaqueRecordInstance, identifier: StableRecordIdentifier): void;
33
+ export declare const StoreMap: Map<unknown, Store>;
34
+ /**
35
+ * We may eventually make this public, but its likely better for this to be killed off
36
+ * @internal
37
+ */
38
+ export declare function storeFor(record: OpaqueRecordInstance): Store | undefined;
39
+ type Caches = {
40
+ record: Map<StableRecordIdentifier, OpaqueRecordInstance>;
41
+ reference: WeakMap<StableRecordIdentifier, RecordReference>;
42
+ document: Map<StableDocumentIdentifier, ReactiveDocument<OpaqueRecordInstance | OpaqueRecordInstance[] | null | undefined>>;
43
+ };
44
+ export declare class InstanceCache {
45
+ store: Store;
46
+ cache: Cache;
47
+ _storeWrapper: CacheCapabilitiesManager;
48
+ __cacheManager: CacheManager;
49
+ __instances: Caches;
50
+ constructor(store: Store);
51
+ peek(identifier: StableRecordIdentifier): Cache | OpaqueRecordInstance | undefined;
52
+ getDocument<T>(identifier: StableDocumentIdentifier): ReactiveDocument<T>;
53
+ getRecord(identifier: StableRecordIdentifier, properties?: CreateRecordProperties): OpaqueRecordInstance;
54
+ getReference(identifier: StableRecordIdentifier): RecordReference;
55
+ recordIsLoaded(identifier: StableRecordIdentifier, filterDeleted?: boolean): boolean;
56
+ disconnect(identifier: StableRecordIdentifier): void;
57
+ unloadRecord(identifier: StableRecordIdentifier): void;
58
+ clear(type?: string): void;
59
+ setRecordId(identifier: StableRecordIdentifier, id: string): void;
60
+ }
61
+ export declare function resourceIsFullyDeleted(instanceCache: InstanceCache, identifier: StableRecordIdentifier): boolean;
62
+ export declare function preloadData(store: Store, identifier: StableRecordIdentifier, preload: Record<string, Value>): void;
63
+ export declare function _clearCaches(): void;
64
+ export {};
65
+ //# sourceMappingURL=instance-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance-cache.d.ts","sourceRoot":"","sources":["../../../../src/store/-private/caches/instance-cache.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACrG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAA4B,MAAM,0BAA0B,CAAC;AAOhH,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AAc,EAAE,YAAY,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;gBAEhB,KAAK,EAAE,KAAK;IAuExB,IAAI,CAAC,UAAU,EAAE,sBAAsB,GAAG,KAAK,GAAG,oBAAoB,GAAG,SAAS;IAIlF,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,wBAAwB,GAAG,gBAAgB,CAAC,CAAC,CAAC;IASzE,SAAS,CAAC,UAAU,EAAE,sBAAsB,EAAE,UAAU,CAAC,EAAE,sBAAsB,GAAG,oBAAoB;IA8BxG,YAAY,CAAC,UAAU,EAAE,sBAAsB;IAW/C,cAAc,CAAC,UAAU,EAAE,sBAAsB,EAAE,aAAa,UAAQ;IAsBxE,UAAU,CAAC,UAAU,EAAE,sBAAsB;IAiB7C,YAAY,CAAC,UAAU,EAAE,sBAAsB;IAuD/C,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM;IAuBnB,WAAW,CAAC,UAAU,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM;CA+C3D;AAMD,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,sBAAsB,GAAG,OAAO,CAGhH;AAcD,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,QAwB3G;AAiCD,wBAAgB,YAAY,SAI3B"}
@@ -0,0 +1,10 @@
1
+ export declare function hasLid(resource: unknown): resource is {
2
+ lid: string;
3
+ };
4
+ export declare function hasId(resource: unknown): resource is {
5
+ id: string;
6
+ };
7
+ export declare function hasType(resource: unknown): resource is {
8
+ type: string;
9
+ };
10
+ //# sourceMappingURL=resource-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-utils.d.ts","sourceRoot":"","sources":["../../../../src/store/-private/caches/resource-utils.ts"],"names":[],"mappings":"AAUA,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAErE;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAInE;AAED,wBAAgB,OAAO,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAEvE"}
@@ -0,0 +1,7 @@
1
+ export declare function logGroup(scope: 'cache', prefix: string, type: string, lid: string, bucket: string, key: string): void;
2
+ export declare function logGroup(scope: 'reactive-ui', prefix: string, type: string, lid: string, bucket: string, key: ''): void;
3
+ export declare function logGroup(scope: 'notify', prefix: string, type: string, lid: string, bucket: string, key: string): void;
4
+ export declare function log(scope: 'cache', prefix: string, type: string, lid: string, bucket: string, key: string): void;
5
+ export declare function log(scope: 'reactive-ui', prefix: string, type: string, lid: string, bucket: string, key: ''): void;
6
+ export declare function log(scope: 'notify', prefix: string, type: string, lid: string, bucket: string, key: string): void;
7
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/store/-private/debug/utils.ts"],"names":[],"mappings":"AAiEA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;AACvH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,EAAE,GACN,IAAI,CAAC;AACR,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,M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