@warp-drive/core 5.8.0-beta.0 → 5.8.0-beta.1

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 (275) hide show
  1. package/README.md +23 -36
  2. package/declarations/build-config.d.ts +18 -1
  3. package/declarations/configure.d.ts +1 -1
  4. package/declarations/graph/-private/-edge-definition.d.ts +12 -2
  5. package/declarations/index.d.ts +90 -8
  6. package/declarations/reactive/-private/default-mode.d.ts +1 -1
  7. package/declarations/reactive/-private/document.d.ts +58 -46
  8. package/declarations/reactive/-private/fields/extension.d.ts +1 -1
  9. package/declarations/reactive/-private/fields/managed-array.d.ts +2 -2
  10. package/declarations/reactive/-private/fields/managed-object.d.ts +1 -1
  11. package/declarations/reactive/-private/record.d.ts +10 -1
  12. package/declarations/reactive/-private/schema.d.ts +77 -4
  13. package/declarations/reactive/-private.d.ts +1 -0
  14. package/declarations/reactive.d.ts +13 -8
  15. package/declarations/request/-private/types.d.ts +1 -1
  16. package/declarations/request.d.ts +47 -0
  17. package/declarations/signals/-leaked.d.ts +2 -0
  18. package/declarations/signals/-private.d.ts +6 -0
  19. package/declarations/{store/-private/new-core-tmp → signals}/promise-state.d.ts +2 -1
  20. package/declarations/{store/-private/new-core-tmp → signals}/request-state.d.ts +6 -6
  21. package/declarations/{store/-private/new-core-tmp → signals}/request-subscription.d.ts +4 -4
  22. package/declarations/store/-private/cache-handler/types.d.ts +2 -16
  23. package/declarations/store/-private/caches/instance-cache.d.ts +5 -6
  24. package/declarations/store/-private/default-cache-policy.d.ts +147 -129
  25. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +1 -1
  26. package/declarations/store/-private/managers/cache-key-manager.d.ts +26 -8
  27. package/declarations/store/-private/managers/cache-manager.d.ts +7 -18
  28. package/declarations/store/-private/managers/notification-manager.d.ts +1 -1
  29. package/declarations/store/-private/record-arrays/legacy-many-array.d.ts +1 -1
  30. package/declarations/store/-private/record-arrays/resource-array.d.ts +1 -1
  31. package/declarations/store/-private/store-service.d.ts +43 -64
  32. package/declarations/store/-private.d.ts +0 -6
  33. package/declarations/store/-types/q/cache-capabilities-manager.d.ts +1 -1
  34. package/declarations/store/deprecated/-private.d.ts +2 -2
  35. package/declarations/store/deprecated/store.d.ts +33 -32
  36. package/declarations/store.d.ts +1 -0
  37. package/declarations/types/cache.d.ts +8 -6
  38. package/declarations/types/record.d.ts +132 -0
  39. package/declarations/types/request.d.ts +26 -14
  40. package/declarations/types/schema/fields.d.ts +37 -13
  41. package/declarations/{store/-types/q → types/schema}/schema-service.d.ts +15 -13
  42. package/declarations/types/spec/document.d.ts +34 -0
  43. package/declarations/types/symbols.d.ts +2 -2
  44. package/declarations/types.d.ts +1 -1
  45. package/dist/build-config.js +1 -1
  46. package/dist/configure-DPUFCemT.js +1940 -0
  47. package/dist/configure.js +2 -1
  48. package/dist/default-cache-policy-D7_u4YRH.js +572 -0
  49. package/dist/{context-C_7OLieY.js → future-BKkJJkj7.js} +174 -174
  50. package/dist/graph/-private.js +16 -6
  51. package/dist/{request-state-C955e0AL.js → index-CQP2NSqg.js} +8830 -9427
  52. package/dist/index.js +6 -382
  53. package/dist/reactive/-private.js +1 -1
  54. package/dist/reactive.js +4 -903
  55. package/dist/request.js +49 -1
  56. package/dist/signals/-leaked.js +1 -0
  57. package/dist/store/-private.js +1 -2
  58. package/dist/store.js +1 -533
  59. package/dist/symbols-3C1OkYtZ.js +39 -0
  60. package/dist/types/-private.js +1 -1
  61. package/dist/types/record.js +127 -0
  62. package/dist/types/request.js +14 -12
  63. package/dist/types/runtime.js +1 -1
  64. package/dist/types/schema/fields.js +14 -0
  65. package/dist/types/schema/schema-service.js +0 -0
  66. package/dist/types/symbols.js +2 -2
  67. package/dist/unpkg/dev/-leaked-Co0EI6Go.js +1939 -0
  68. package/dist/unpkg/dev/build-config/babel-macros.js +1 -0
  69. package/dist/unpkg/dev/build-config/canary-features.js +1 -0
  70. package/dist/unpkg/dev/build-config/debugging.js +1 -0
  71. package/dist/unpkg/dev/build-config/deprecations.js +1 -0
  72. package/dist/unpkg/dev/build-config/env.js +1 -0
  73. package/dist/unpkg/dev/build-config/macros.js +1 -0
  74. package/dist/unpkg/dev/build-config.js +1 -0
  75. package/dist/unpkg/dev/configure.js +1 -0
  76. package/dist/unpkg/dev/future-DFfOzSoe.js +672 -0
  77. package/dist/unpkg/dev/graph/-private.js +3132 -0
  78. package/dist/unpkg/dev/index-BzcBOnw9.js +9392 -0
  79. package/dist/unpkg/dev/index.js +6 -0
  80. package/dist/unpkg/dev/reactive/-private.js +1 -0
  81. package/dist/unpkg/dev/reactive.js +3 -0
  82. package/dist/unpkg/dev/request.js +49 -0
  83. package/dist/unpkg/dev/runtime-E1M51_-O.js +135 -0
  84. package/dist/unpkg/dev/signals/-leaked.js +1 -0
  85. package/dist/unpkg/dev/store/-private.js +55 -0
  86. package/dist/unpkg/dev/store.js +558 -0
  87. package/dist/unpkg/dev/types/-private.js +69 -0
  88. package/dist/unpkg/dev/types/cache/aliases.js +0 -0
  89. package/dist/unpkg/dev/types/cache/change.js +0 -0
  90. package/dist/unpkg/dev/types/cache/mutations.js +0 -0
  91. package/dist/unpkg/dev/types/cache/operations.js +0 -0
  92. package/dist/unpkg/dev/types/cache/relationship.js +0 -0
  93. package/dist/unpkg/dev/types/cache.js +0 -0
  94. package/dist/unpkg/dev/types/graph.js +0 -0
  95. package/dist/unpkg/dev/types/identifier.js +61 -0
  96. package/dist/unpkg/dev/types/json/raw.js +0 -0
  97. package/dist/unpkg/dev/types/params.js +0 -0
  98. package/dist/unpkg/dev/types/record.js +191 -0
  99. package/dist/unpkg/dev/types/request.js +77 -0
  100. package/dist/unpkg/dev/types/runtime.js +34 -0
  101. package/dist/unpkg/dev/types/schema/concepts.js +0 -0
  102. package/dist/unpkg/dev/types/schema/fields.js +505 -0
  103. package/dist/unpkg/dev/types/schema/fields.type-test.js +0 -0
  104. package/dist/unpkg/dev/types/schema/schema-service.js +0 -0
  105. package/dist/unpkg/dev/types/spec/document.js +0 -0
  106. package/dist/unpkg/dev/types/spec/error.js +0 -0
  107. package/dist/unpkg/dev/types/spec/json-api-raw.js +0 -0
  108. package/dist/unpkg/dev/types/symbols.js +84 -0
  109. package/dist/unpkg/dev/types/utils.js +0 -0
  110. package/dist/unpkg/dev/types.js +0 -0
  111. package/dist/unpkg/dev/utils/string.js +91 -0
  112. package/dist/unpkg/dev-deprecated/-leaked-DjMeRqdU.js +1939 -0
  113. package/dist/unpkg/dev-deprecated/-private-3C1OkYtZ.js +39 -0
  114. package/dist/unpkg/dev-deprecated/build-config/babel-macros.js +1 -0
  115. package/dist/unpkg/dev-deprecated/build-config/canary-features.js +1 -0
  116. package/dist/unpkg/dev-deprecated/build-config/debugging.js +1 -0
  117. package/dist/unpkg/dev-deprecated/build-config/deprecations.js +1 -0
  118. package/dist/unpkg/dev-deprecated/build-config/env.js +1 -0
  119. package/dist/unpkg/dev-deprecated/build-config/macros.js +1 -0
  120. package/dist/unpkg/dev-deprecated/build-config.js +1 -0
  121. package/dist/unpkg/dev-deprecated/configure.js +1 -0
  122. package/dist/unpkg/dev-deprecated/future-DFfOzSoe.js +672 -0
  123. package/dist/unpkg/dev-deprecated/graph/-private.js +3327 -0
  124. package/dist/unpkg/dev-deprecated/index-6TnTv-WG.js +10007 -0
  125. package/dist/unpkg/dev-deprecated/index.js +5 -0
  126. package/dist/unpkg/dev-deprecated/reactive/-private.js +1 -0
  127. package/dist/unpkg/dev-deprecated/reactive.js +3 -0
  128. package/dist/unpkg/dev-deprecated/request.js +49 -0
  129. package/dist/unpkg/dev-deprecated/runtime-DAu5b0IR.js +135 -0
  130. package/dist/unpkg/dev-deprecated/signals/-leaked.js +1 -0
  131. package/dist/unpkg/dev-deprecated/store/-private.js +1 -0
  132. package/dist/unpkg/dev-deprecated/store.js +558 -0
  133. package/dist/unpkg/dev-deprecated/types/-private.js +69 -0
  134. package/dist/unpkg/dev-deprecated/types/cache/aliases.js +0 -0
  135. package/dist/unpkg/dev-deprecated/types/cache/change.js +0 -0
  136. package/dist/unpkg/dev-deprecated/types/cache/mutations.js +0 -0
  137. package/dist/unpkg/dev-deprecated/types/cache/operations.js +0 -0
  138. package/dist/unpkg/dev-deprecated/types/cache/relationship.js +0 -0
  139. package/dist/unpkg/dev-deprecated/types/cache.js +0 -0
  140. package/dist/unpkg/dev-deprecated/types/graph.js +0 -0
  141. package/dist/unpkg/dev-deprecated/types/identifier.js +61 -0
  142. package/dist/unpkg/dev-deprecated/types/json/raw.js +0 -0
  143. package/dist/unpkg/dev-deprecated/types/params.js +0 -0
  144. package/dist/unpkg/dev-deprecated/types/record.js +191 -0
  145. package/dist/unpkg/dev-deprecated/types/request.js +77 -0
  146. package/dist/unpkg/dev-deprecated/types/runtime.js +34 -0
  147. package/dist/unpkg/dev-deprecated/types/schema/concepts.js +0 -0
  148. package/dist/unpkg/dev-deprecated/types/schema/fields.js +505 -0
  149. package/dist/unpkg/dev-deprecated/types/schema/fields.type-test.js +0 -0
  150. package/dist/unpkg/dev-deprecated/types/schema/schema-service.js +0 -0
  151. package/dist/unpkg/dev-deprecated/types/spec/document.js +0 -0
  152. package/dist/unpkg/dev-deprecated/types/spec/error.js +0 -0
  153. package/dist/unpkg/dev-deprecated/types/spec/json-api-raw.js +0 -0
  154. package/dist/unpkg/dev-deprecated/types/symbols.js +84 -0
  155. package/dist/unpkg/dev-deprecated/types/utils.js +0 -0
  156. package/dist/unpkg/dev-deprecated/types.js +0 -0
  157. package/dist/unpkg/dev-deprecated/utils/string.js +91 -0
  158. package/dist/unpkg/prod/-leaked-DUONXQDB.js +1676 -0
  159. package/dist/unpkg/prod/-private-sql1_mdx.js +39 -0
  160. package/dist/unpkg/prod/build-config/babel-macros.js +1 -0
  161. package/dist/unpkg/prod/build-config/canary-features.js +1 -0
  162. package/dist/unpkg/prod/build-config/debugging.js +1 -0
  163. package/dist/unpkg/prod/build-config/deprecations.js +1 -0
  164. package/dist/unpkg/prod/build-config/env.js +1 -0
  165. package/dist/unpkg/prod/build-config/macros.js +1 -0
  166. package/dist/unpkg/prod/build-config.js +1 -0
  167. package/dist/unpkg/prod/configure.js +2 -0
  168. package/dist/unpkg/prod/graph/-private.js +2235 -0
  169. package/dist/unpkg/prod/handler-EU_8ncB2.js +1619 -0
  170. package/dist/unpkg/prod/index.js +483 -0
  171. package/dist/unpkg/prod/promise-cache-DIT8Ypjq.js +19 -0
  172. package/dist/unpkg/prod/reactive/-private.js +1 -0
  173. package/dist/unpkg/prod/reactive.js +30 -0
  174. package/dist/unpkg/prod/request-BrJSCG6r.js +421 -0
  175. package/dist/unpkg/prod/request.js +2 -0
  176. package/dist/unpkg/prod/schema-BSkHyoWz.js +5219 -0
  177. package/dist/unpkg/prod/signals/-leaked.js +1 -0
  178. package/dist/unpkg/prod/store/-private.js +126 -0
  179. package/dist/unpkg/prod/store.js +437 -0
  180. package/dist/unpkg/prod/types/-private.js +49 -0
  181. package/dist/unpkg/prod/types/cache/aliases.js +0 -0
  182. package/dist/unpkg/prod/types/cache/change.js +0 -0
  183. package/dist/unpkg/prod/types/cache/mutations.js +0 -0
  184. package/dist/unpkg/prod/types/cache/operations.js +0 -0
  185. package/dist/unpkg/prod/types/cache/relationship.js +0 -0
  186. package/dist/unpkg/prod/types/cache.js +0 -0
  187. package/dist/unpkg/prod/types/graph.js +0 -0
  188. package/dist/unpkg/prod/types/identifier.js +61 -0
  189. package/dist/unpkg/prod/types/json/raw.js +0 -0
  190. package/dist/unpkg/prod/types/params.js +0 -0
  191. package/dist/unpkg/prod/types/record.js +191 -0
  192. package/dist/unpkg/prod/types/request.js +77 -0
  193. package/dist/unpkg/prod/types/runtime.js +34 -0
  194. package/dist/unpkg/prod/types/schema/concepts.js +0 -0
  195. package/dist/unpkg/prod/types/schema/fields.js +505 -0
  196. package/dist/unpkg/prod/types/schema/fields.type-test.js +0 -0
  197. package/dist/unpkg/prod/types/schema/schema-service.js +0 -0
  198. package/dist/unpkg/prod/types/spec/document.js +0 -0
  199. package/dist/unpkg/prod/types/spec/error.js +0 -0
  200. package/dist/unpkg/prod/types/spec/json-api-raw.js +0 -0
  201. package/dist/unpkg/prod/types/symbols.js +84 -0
  202. package/dist/unpkg/prod/types/utils.js +0 -0
  203. package/dist/unpkg/prod/types.js +0 -0
  204. package/dist/unpkg/prod/utils/string.js +72 -0
  205. package/dist/unpkg/prod-deprecated/-leaked-DRNv9VIX.js +1676 -0
  206. package/dist/unpkg/prod-deprecated/-private-3C1OkYtZ.js +39 -0
  207. package/dist/unpkg/prod-deprecated/build-config/babel-macros.js +1 -0
  208. package/dist/unpkg/prod-deprecated/build-config/canary-features.js +1 -0
  209. package/dist/unpkg/prod-deprecated/build-config/debugging.js +1 -0
  210. package/dist/unpkg/prod-deprecated/build-config/deprecations.js +1 -0
  211. package/dist/unpkg/prod-deprecated/build-config/env.js +1 -0
  212. package/dist/unpkg/prod-deprecated/build-config/macros.js +1 -0
  213. package/dist/unpkg/prod-deprecated/build-config.js +1 -0
  214. package/dist/unpkg/prod-deprecated/configure.js +2 -0
  215. package/dist/unpkg/prod-deprecated/graph/-private.js +2408 -0
  216. package/dist/unpkg/prod-deprecated/handler-CCIu4sQ3.js +334 -0
  217. package/dist/unpkg/prod-deprecated/hooks-Dv4Np0MY.js +26 -0
  218. package/dist/unpkg/prod-deprecated/index.js +483 -0
  219. package/dist/unpkg/prod-deprecated/promise-cache-DIT8Ypjq.js +19 -0
  220. package/dist/unpkg/prod-deprecated/reactive/-private.js +1 -0
  221. package/dist/unpkg/prod-deprecated/reactive.js +5 -0
  222. package/dist/unpkg/prod-deprecated/request-BrJSCG6r.js +421 -0
  223. package/dist/unpkg/prod-deprecated/request.js +2 -0
  224. package/dist/unpkg/prod-deprecated/schema-CJcjHv0E.js +6939 -0
  225. package/dist/unpkg/prod-deprecated/signals/-leaked.js +1 -0
  226. package/dist/unpkg/prod-deprecated/store/-private.js +88 -0
  227. package/dist/unpkg/prod-deprecated/store.js +437 -0
  228. package/dist/unpkg/prod-deprecated/types/-private.js +49 -0
  229. package/dist/unpkg/prod-deprecated/types/cache/aliases.js +0 -0
  230. package/dist/unpkg/prod-deprecated/types/cache/change.js +0 -0
  231. package/dist/unpkg/prod-deprecated/types/cache/mutations.js +0 -0
  232. package/dist/unpkg/prod-deprecated/types/cache/operations.js +0 -0
  233. package/dist/unpkg/prod-deprecated/types/cache/relationship.js +0 -0
  234. package/dist/unpkg/prod-deprecated/types/cache.js +0 -0
  235. package/dist/unpkg/prod-deprecated/types/graph.js +0 -0
  236. package/dist/unpkg/prod-deprecated/types/identifier.js +61 -0
  237. package/dist/unpkg/prod-deprecated/types/json/raw.js +0 -0
  238. package/dist/unpkg/prod-deprecated/types/params.js +0 -0
  239. package/dist/unpkg/prod-deprecated/types/record.js +191 -0
  240. package/dist/unpkg/prod-deprecated/types/request.js +77 -0
  241. package/dist/unpkg/prod-deprecated/types/runtime.js +34 -0
  242. package/dist/unpkg/prod-deprecated/types/schema/concepts.js +0 -0
  243. package/dist/unpkg/prod-deprecated/types/schema/fields.js +505 -0
  244. package/dist/unpkg/prod-deprecated/types/schema/fields.type-test.js +0 -0
  245. package/dist/unpkg/prod-deprecated/types/schema/schema-service.js +0 -0
  246. package/dist/unpkg/prod-deprecated/types/spec/document.js +0 -0
  247. package/dist/unpkg/prod-deprecated/types/spec/error.js +0 -0
  248. package/dist/unpkg/prod-deprecated/types/spec/json-api-raw.js +0 -0
  249. package/dist/unpkg/prod-deprecated/types/symbols.js +84 -0
  250. package/dist/unpkg/prod-deprecated/types/utils.js +0 -0
  251. package/dist/unpkg/prod-deprecated/types.js +0 -0
  252. package/dist/unpkg/prod-deprecated/utils/string.js +72 -0
  253. package/logos/README.md +2 -2
  254. package/logos/logo-yellow-slab.svg +1 -0
  255. package/logos/word-mark-black.svg +1 -0
  256. package/logos/word-mark-white.svg +1 -0
  257. package/package.json +12 -4
  258. package/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +0 -24
  259. package/dist/configure-C3x8YXzL.js +0 -181
  260. package/logos/NCC-1701-a-blue.svg +0 -4
  261. package/logos/NCC-1701-a-gold.svg +0 -4
  262. package/logos/NCC-1701-a-gold_100.svg +0 -1
  263. package/logos/NCC-1701-a-gold_base-64.txt +0 -1
  264. package/logos/NCC-1701-a.svg +0 -4
  265. package/logos/docs-badge.svg +0 -2
  266. package/logos/ember-data-logo-dark.svg +0 -12
  267. package/logos/ember-data-logo-light.svg +0 -12
  268. package/logos/social1.png +0 -0
  269. package/logos/social2.png +0 -0
  270. package/logos/warp-drive-logo-dark.svg +0 -4
  271. package/logos/warp-drive-logo-gold.svg +0 -4
  272. /package/declarations/{store/-private/new-core-tmp → signals}/reactivity/configure.d.ts +0 -0
  273. /package/declarations/{store/-private/new-core-tmp → signals}/reactivity/internal.d.ts +0 -0
  274. /package/declarations/{store/-private/new-core-tmp → signals}/reactivity/signal.d.ts +0 -0
  275. /package/dist/{symbols-sql1_mdx.js → unpkg/dev/-private-sql1_mdx.js} +0 -0
@@ -0,0 +1,558 @@
1
+ import { LRUCache } from './utils/string.js';
2
+ import { g as getGlobalConfig } from "./runtime-E1M51_-O.js";
3
+
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+
6
+ const NUMERIC_KEYS = new Set(['max-age', 's-maxage', 'stale-if-error', 'stale-while-revalidate']);
7
+
8
+ /**
9
+ * Parses a string Cache-Control header value into an object with the following structure:
10
+ *
11
+ * ```ts
12
+ * interface CacheControlValue {
13
+ * immutable?: boolean;
14
+ * 'max-age'?: number;
15
+ * 'must-revalidate'?: boolean;
16
+ * 'must-understand'?: boolean;
17
+ * 'no-cache'?: boolean;
18
+ * 'no-store'?: boolean;
19
+ * 'no-transform'?: boolean;
20
+ * 'only-if-cached'?: boolean;
21
+ * private?: boolean;
22
+ * 'proxy-revalidate'?: boolean;
23
+ * public?: boolean;
24
+ * 's-maxage'?: number;
25
+ * 'stale-if-error'?: number;
26
+ * 'stale-while-revalidate'?: number;
27
+ * }
28
+ * ```
29
+ *
30
+ * See also {@link CacheControlValue} and [Response Directives](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control#response_directives)
31
+ *
32
+ * @public
33
+ */
34
+ function parseCacheControl(header) {
35
+ return CACHE_CONTROL_CACHE.get(header);
36
+ }
37
+ const CACHE_CONTROL_CACHE = new LRUCache(header => {
38
+ let key = '';
39
+ let value = '';
40
+ let isParsingKey = true;
41
+ const cacheControlValue = {};
42
+ for (let i = 0; i < header.length; i++) {
43
+ const char = header.charAt(i);
44
+ if (char === ',') {
45
+ (test => {
46
+ if (!test) {
47
+ throw new Error(`Invalid Cache-Control value, expected a value`);
48
+ }
49
+ })(!isParsingKey || !NUMERIC_KEYS.has(key));
50
+ (test => {
51
+ if (!test) {
52
+ throw new Error(`Invalid Cache-Control value, expected a value after "=" but got ","`);
53
+ }
54
+ })(i === 0 || header.charAt(i - 1) !== '=');
55
+ isParsingKey = true;
56
+ // @ts-expect-error TS incorrectly thinks that optional keys must have a type that includes undefined
57
+ cacheControlValue[key] = NUMERIC_KEYS.has(key) ? parseCacheControlValue(value) : true;
58
+ key = '';
59
+ value = '';
60
+ continue;
61
+ } else if (char === '=') {
62
+ (test => {
63
+ if (!test) {
64
+ throw new Error(`Invalid Cache-Control value, expected a value after "="`);
65
+ }
66
+ })(i + 1 !== header.length);
67
+ isParsingKey = false;
68
+ } else if (char === ' ' || char === `\t` || char === `\n`) {
69
+ continue;
70
+ } else if (isParsingKey) {
71
+ key += char;
72
+ } else {
73
+ value += char;
74
+ }
75
+ if (i === header.length - 1) {
76
+ // @ts-expect-error TS incorrectly thinks that optional keys must have a type that includes undefined
77
+ cacheControlValue[key] = NUMERIC_KEYS.has(key) ? parseCacheControlValue(value) : true;
78
+ }
79
+ }
80
+ return cacheControlValue;
81
+ }, 200);
82
+ function parseCacheControlValue(stringToParse) {
83
+ const parsedValue = Number.parseInt(stringToParse);
84
+ (test => {
85
+ if (!test) {
86
+ throw new Error(`Invalid Cache-Control value, expected a number but got - ${stringToParse}`);
87
+ }
88
+ })(!Number.isNaN(parsedValue));
89
+ (test => {
90
+ if (!test) {
91
+ throw new Error(`Invalid Cache-Control value, expected a number greater than 0 but got - ${stringToParse}`);
92
+ }
93
+ })(parsedValue >= 0);
94
+ if (Number.isNaN(parsedValue) || parsedValue < 0) {
95
+ return 0;
96
+ }
97
+ return parsedValue;
98
+ }
99
+ function isExpired(cacheKey, request, config) {
100
+ const {
101
+ constraints
102
+ } = config;
103
+ if (constraints?.isExpired) {
104
+ const result = constraints.isExpired(request);
105
+ if (result !== null) {
106
+ {
107
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
108
+ // eslint-disable-next-line no-console
109
+ console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because constraints.isExpired returned ${result}`);
110
+ }
111
+ }
112
+ return result;
113
+ }
114
+ }
115
+ const {
116
+ headers
117
+ } = request.response;
118
+ if (!headers) {
119
+ {
120
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
121
+ // eslint-disable-next-line no-console
122
+ console.log(`CachePolicy: ${cacheKey.lid} is EXPIRED because no headers were provided`);
123
+ }
124
+ } // if we have no headers then both the headers based expiration
125
+ // and the time based expiration will be considered expired
126
+ return true;
127
+ }
128
+
129
+ // check for X-WarpDrive-Expires
130
+ const now = Date.now();
131
+ const date = headers.get('Date');
132
+ if (constraints?.headers) {
133
+ if (constraints.headers['X-WarpDrive-Expires']) {
134
+ const xWarpDriveExpires = headers.get('X-WarpDrive-Expires');
135
+ if (xWarpDriveExpires) {
136
+ const expirationTime = new Date(xWarpDriveExpires).getTime();
137
+ const result = now >= expirationTime;
138
+ {
139
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
140
+ // eslint-disable-next-line no-console
141
+ console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because the time set by X-WarpDrive-Expires header is ${result ? 'in the past' : 'in the future'}`);
142
+ }
143
+ }
144
+ return result;
145
+ }
146
+ }
147
+
148
+ // check for Cache-Control
149
+ if (constraints.headers['Cache-Control']) {
150
+ const cacheControl = headers.get('Cache-Control');
151
+ const age = headers.get('Age');
152
+ if (cacheControl && age && date) {
153
+ const cacheControlValue = parseCacheControl(cacheControl);
154
+
155
+ // max-age and s-maxage are stored in
156
+ const maxAge = cacheControlValue['max-age'] || cacheControlValue['s-maxage'];
157
+ if (maxAge) {
158
+ // age is stored in seconds
159
+ const ageValue = parseInt(age, 10);
160
+ (test => {
161
+ if (!test) {
162
+ throw new Error(`Invalid Cache-Control value, expected a number but got - ${age}`);
163
+ }
164
+ })(!Number.isNaN(ageValue));
165
+ (test => {
166
+ if (!test) {
167
+ throw new Error(`Invalid Cache-Control value, expected a number greater than 0 but got - ${age}`);
168
+ }
169
+ })(ageValue >= 0);
170
+ if (!Number.isNaN(ageValue) && ageValue >= 0) {
171
+ const dateValue = new Date(date).getTime();
172
+ const expirationTime = dateValue + (maxAge - ageValue) * 1000;
173
+ const result = now >= expirationTime;
174
+ {
175
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
176
+ // eslint-disable-next-line no-console
177
+ console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because the time set by Cache-Control header is ${result ? 'in the past' : 'in the future'}`);
178
+ }
179
+ }
180
+ return result;
181
+ }
182
+ }
183
+ }
184
+ }
185
+
186
+ // check for Expires
187
+ if (constraints.headers.Expires) {
188
+ const expires = headers.get('Expires');
189
+ if (expires) {
190
+ const expirationTime = new Date(expires).getTime();
191
+ const result = now >= expirationTime;
192
+ {
193
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
194
+ // eslint-disable-next-line no-console
195
+ console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because the time set by Expires header is ${result ? 'in the past' : 'in the future'}`);
196
+ }
197
+ }
198
+ return result;
199
+ }
200
+ }
201
+ }
202
+
203
+ // check for Date
204
+ if (!date) {
205
+ {
206
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
207
+ // eslint-disable-next-line no-console
208
+ console.log(`CachePolicy: ${cacheKey.lid} is EXPIRED because no Date header was provided`);
209
+ }
210
+ }
211
+ return true;
212
+ }
213
+ let expirationTime = config.apiCacheHardExpires;
214
+ {
215
+ if (!config.disableTestOptimization) {
216
+ expirationTime = config.apiCacheSoftExpires;
217
+ }
218
+ }
219
+ const time = new Date(date).getTime();
220
+ const deadline = time + expirationTime;
221
+ const result = now >= deadline;
222
+ {
223
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
224
+ // eslint-disable-next-line no-console
225
+ console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'EXPIRED' : 'NOT expired'} because the apiCacheHardExpires time since the response's Date header is ${result ? 'in the past' : 'in the future'}`);
226
+ }
227
+ }
228
+ return result;
229
+ }
230
+
231
+ /**
232
+ * The constraint options for {@link PolicyConfig.constraints}
233
+ */
234
+
235
+ /**
236
+ * The configuration options for the {@link DefaultCachePolicy}
237
+ *
238
+ * ```ts [app/services/store.ts]
239
+ * import { Store } from '@warp-drive/core';
240
+ * import { DefaultCachePolicy } from '@warp-drive/core/store'; // [!code focus]
241
+ *
242
+ * export default class AppStore extends Store {
243
+ * lifetimes = new DefaultCachePolicy({ // [!code focus:3]
244
+ * // ... PolicyConfig Settings ... //
245
+ * });
246
+ * }
247
+ * ```
248
+ *
249
+ */
250
+
251
+ /**
252
+ * A basic {@link CachePolicy} that can be added to the Store service.
253
+ *
254
+ * ```ts [app/services/store.ts]
255
+ * import { Store } from '@warp-drive/core';
256
+ * import { DefaultCachePolicy } from '@warp-drive/core/store'; // [!code focus]
257
+ *
258
+ * export default class AppStore extends Store {
259
+ * lifetimes = new DefaultCachePolicy({ // [!code focus:5]
260
+ * apiCacheSoftExpires: 30_000,
261
+ * apiCacheHardExpires: 60_000,
262
+ * // ... Other PolicyConfig Settings ... //
263
+ * });
264
+ * }
265
+ * ```
266
+ *
267
+ * :::tip 💡 TIP
268
+ * Date headers do not have millisecond precision, so expiration times should
269
+ * generally be larger than 1000ms.
270
+ * :::
271
+ *
272
+ * See also {@link PolicyConfig} for configuration options.
273
+ *
274
+ * ### The Mechanics
275
+ *
276
+ * This policy determines staleness based on various configurable constraints falling back to a simple
277
+ * check of the time elapsed since the request was last received from the API using the `date` header
278
+ * from the last response.
279
+ *
280
+ * :::tip 💡 TIP
281
+ * The {@link Fetch} handler provided by `@warp-drive/core` will automatically
282
+ * add the `date` header to responses if it is not present.
283
+ * :::
284
+ *
285
+ * - For manual override of reload see {@link CacheOptions.reload | cacheOptions.reload}
286
+ * - For manual override of background reload see {@link CacheOptions.backgroundReload | cacheOptions.backgroundReload}
287
+ *
288
+ * In order expiration is determined by:
289
+ *
290
+ * ```md
291
+ * Is explicitly invalidated by `cacheOptions.reload`
292
+ * ↳ (if falsey) if the request has been explicitly invalidated
293
+ * since the last request (see Automatic Invalidation below)
294
+ * ↳ (if false) (If Active) isExpired function
295
+ * ↳ (if null) (If Active) X-WarpDrive-Expires header
296
+ * ↳ (if null) (If Active) Cache-Control header
297
+ * ↳ (if null) (If Active) Expires header
298
+ * ↳ (if null) Date header + apiCacheHardExpires < current time
299
+ *
300
+ * -- <if above is false, a background request is issued if> --
301
+ *
302
+ * ↳ is invalidated by `cacheOptions.backgroundReload`
303
+ * ↳ (if falsey) Date header + apiCacheSoftExpires < current time
304
+ * ```
305
+ *
306
+ * ### Automatic Invalidation / Entanglement
307
+ *
308
+ * It also invalidates any request with an {@link RequestInfo.op | OpCode} of `"query"`
309
+ * for which {@link CacheOptions.types | cacheOptions.types} was provided
310
+ * when a request with an `OpCode` of `"createRecord"` is successful and also includes
311
+ * a matching type in its own `cacheOptions.types` array.
312
+
313
+ * :::tip 💡 TIP
314
+ * Abstracting this behavior via builders is recommended to ensure consistency.
315
+ * :::
316
+ *
317
+ * ### Testing
318
+ *
319
+ * In Testing environments:
320
+ *
321
+ * - `apiCacheSoftExpires` will always be `false`
322
+ * - `apiCacheHardExpires` will use the `apiCacheSoftExpires` value.
323
+ *
324
+ * This helps reduce flakiness and produce predictably rendered results in test suites.
325
+ *
326
+ * Requests that specifically set `cacheOptions.backgroundReload = true` will
327
+ * still be background reloaded in tests.
328
+ *
329
+ * This behavior can be opted out of by setting `disableTestOptimization = true`
330
+ * in the policy config.
331
+ *
332
+ * @public
333
+ */
334
+ class DefaultCachePolicy {
335
+ /**
336
+ * @internal
337
+ */
338
+
339
+ /**
340
+ * @internal
341
+ */
342
+
343
+ /**
344
+ * @internal
345
+ */
346
+ _getStore(store) {
347
+ let set = this._stores.get(store);
348
+ if (!set) {
349
+ set = {
350
+ invalidated: new Set(),
351
+ types: new Map()
352
+ };
353
+ this._stores.set(store, set);
354
+ }
355
+ return set;
356
+ }
357
+ constructor(config) {
358
+ this._stores = new WeakMap();
359
+ const _config = arguments.length === 1 ? config : arguments[1];
360
+ !(arguments.length === 1) && console.warn(`Passing a Store to the CachePolicy is deprecated, please pass only a config instead.`);
361
+ (test => {
362
+ if (!test) {
363
+ throw new Error(`You must pass a config to the CachePolicy`);
364
+ }
365
+ })(_config);
366
+ (test => {
367
+ if (!test) {
368
+ throw new Error(`You must pass a apiCacheSoftExpires to the CachePolicy`);
369
+ }
370
+ })(typeof _config.apiCacheSoftExpires === 'number');
371
+ (test => {
372
+ if (!test) {
373
+ throw new Error(`You must pass a apiCacheHardExpires to the CachePolicy`);
374
+ }
375
+ })(typeof _config.apiCacheHardExpires === 'number');
376
+ this.config = _config;
377
+ }
378
+
379
+ /**
380
+ * Invalidate a request by its CacheKey for the given store instance.
381
+ *
382
+ * While the store argument may seem redundant, the CachePolicy
383
+ * is designed to be shared across multiple stores / forks
384
+ * of the store.
385
+ *
386
+ * ```ts
387
+ * store.lifetimes.invalidateRequest(store, cacheKey);
388
+ * ```
389
+ *
390
+ * @public
391
+ */
392
+ invalidateRequest(cacheKey, store) {
393
+ this._getStore(store).invalidated.add(cacheKey);
394
+ }
395
+
396
+ /**
397
+ * Invalidate all requests associated to a specific type
398
+ * for a given store instance.
399
+ *
400
+ * While the store argument may seem redundant, the CachePolicy
401
+ * is designed to be shared across multiple stores / forks
402
+ * of the store.
403
+ *
404
+ * This invalidation is done automatically when using this service
405
+ * for both the {@link CacheHandler} and the [NetworkHandler](/api/@warp-drive/legacy/compat/variables/LegacyNetworkHandler).
406
+ *
407
+ * ```ts
408
+ * store.lifetimes.invalidateRequestsForType(store, 'person');
409
+ * ```
410
+ *
411
+ * @public
412
+ */
413
+ invalidateRequestsForType(type, store) {
414
+ const storeCache = this._getStore(store);
415
+ const set = storeCache.types.get(type);
416
+ const notifications = store.notifications;
417
+ if (set) {
418
+ // TODO batch notifications
419
+ set.forEach(id => {
420
+ storeCache.invalidated.add(id);
421
+ // @ts-expect-error
422
+ notifications.notify(id, 'invalidated', null);
423
+ });
424
+ }
425
+ }
426
+
427
+ /**
428
+ * Invoked when a request has been fulfilled from the configured request handlers.
429
+ * This is invoked by the CacheHandler for both foreground and background requests
430
+ * once the cache has been updated.
431
+ *
432
+ * Note, this is invoked by the {@link CacheHandler} regardless of whether
433
+ * the request has a cache-key.
434
+ *
435
+ * This method should not be invoked directly by consumers.
436
+ *
437
+ * @public
438
+ */
439
+ didRequest(request, response, cacheKey, store) {
440
+ // if this is a successful createRecord request, invalidate the cacheKey for the type
441
+ if (request.op === 'createRecord') {
442
+ const statusNumber = response?.status ?? 0;
443
+ if (statusNumber >= 200 && statusNumber < 400) {
444
+ const types = new Set(request.records?.map(r => r.type));
445
+ const additionalTypes = request.cacheOptions?.types;
446
+ additionalTypes?.forEach(type => {
447
+ types.add(type);
448
+ });
449
+ types.forEach(type => {
450
+ this.invalidateRequestsForType(type, store);
451
+ });
452
+ }
453
+
454
+ // add this document's cacheKey to a map for all associated types
455
+ // it is recommended to only use this for queries
456
+ } else if (cacheKey && request.cacheOptions?.types?.length) {
457
+ const storeCache = this._getStore(store);
458
+ request.cacheOptions?.types.forEach(type => {
459
+ const set = storeCache.types.get(type);
460
+ if (set) {
461
+ set.add(cacheKey);
462
+ storeCache.invalidated.delete(cacheKey);
463
+ } else {
464
+ storeCache.types.set(type, new Set([cacheKey]));
465
+ }
466
+ });
467
+ }
468
+ }
469
+
470
+ /**
471
+ * Invoked to determine if the request may be fulfilled from cache
472
+ * if possible.
473
+ *
474
+ * Note, this is only invoked by the {@link CacheHandler} if the request has
475
+ * a cache-key.
476
+ *
477
+ * If no cache entry is found or the entry is hard expired,
478
+ * the request will be fulfilled from the configured request handlers
479
+ * and the cache will be updated before returning the response.
480
+ *
481
+ * @public
482
+ * @return true if the request is considered hard expired
483
+ */
484
+ isHardExpired(cacheKey, store) {
485
+ // if we are explicitly invalidated, we are hard expired
486
+ const storeCache = this._getStore(store);
487
+ if (storeCache.invalidated.has(cacheKey)) {
488
+ return true;
489
+ }
490
+ const cache = store.cache;
491
+ const cached = cache.peekRequest(cacheKey);
492
+ if (!cached?.response) {
493
+ {
494
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
495
+ // eslint-disable-next-line no-console
496
+ console.log(`CachePolicy: ${cacheKey.lid} is EXPIRED because no cache entry was found`);
497
+ }
498
+ }
499
+ return true;
500
+ }
501
+ return isExpired(cacheKey, cached, this.config);
502
+ }
503
+
504
+ /**
505
+ * Invoked if `isHardExpired` is false to determine if the request
506
+ * should be update behind the scenes if cache data is already available.
507
+ *
508
+ * Note, this is only invoked by the {@link CacheHandler} if the request has
509
+ * a cache-key.
510
+ *
511
+ * If true, the request will be fulfilled from cache while a backgrounded
512
+ * request is made to update the cache via the configured request handlers.
513
+ *
514
+ * @public
515
+ * @return true if the request is considered soft expired
516
+ */
517
+ isSoftExpired(cacheKey, store) {
518
+ {
519
+ if (!this.config.disableTestOptimization) {
520
+ return false;
521
+ }
522
+ }
523
+ const cache = store.cache;
524
+ const cached = cache.peekRequest(cacheKey);
525
+ if (cached?.response) {
526
+ const date = cached.response.headers.get('date');
527
+ if (!date) {
528
+ {
529
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
530
+ // eslint-disable-next-line no-console
531
+ console.log(`CachePolicy: ${cacheKey.lid} is STALE because no date header was found`);
532
+ }
533
+ }
534
+ return true;
535
+ } else {
536
+ const time = new Date(date).getTime();
537
+ const now = Date.now();
538
+ const deadline = time + this.config.apiCacheSoftExpires;
539
+ const result = now >= deadline;
540
+ {
541
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
542
+ // eslint-disable-next-line no-console
543
+ console.log(`CachePolicy: ${cacheKey.lid} is ${result ? 'STALE' : 'NOT stale'}. Expiration time: ${deadline}, now: ${now}`);
544
+ }
545
+ }
546
+ return result;
547
+ }
548
+ }
549
+ {
550
+ if (getGlobalConfig().WarpDrive.debug.LOG_CACHE_POLICY || globalThis.getWarpDriveRuntimeConfig().debug.LOG_CACHE_POLICY) {
551
+ // eslint-disable-next-line no-console
552
+ console.log(`CachePolicy: ${cacheKey.lid} is STALE because no cache entry was found`);
553
+ }
554
+ }
555
+ return true;
556
+ }
557
+ }
558
+ export { DefaultCachePolicy, parseCacheControl };
@@ -0,0 +1,69 @@
1
+ const name = "@warp-drive/core";
2
+ const version = "5.8.0-beta.1";
3
+
4
+ // in testing mode, we utilize globals to ensure only one copy exists of
5
+ // these maps, due to bugs in ember-auto-import
6
+
7
+ const GlobalRef = globalThis;
8
+ const UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};
9
+
10
+ // in order to support mirror packages, we ensure that each
11
+ // unique package name has its own global cache
12
+ GlobalRef[name] = GlobalRef[name] ?? {
13
+ __version: version
14
+ };
15
+ const GlobalSink = GlobalRef[name];
16
+ {
17
+ if (GlobalSink.__version !== version) {
18
+ throw new Error('Multiple versions of WarpDrive detected, the application will malfunction.');
19
+ }
20
+ }
21
+ const ModuleScopedCaches = GlobalSink.__warpDrive_ModuleScopedCaches ?? {};
22
+ {
23
+ if (!GlobalSink.__warpDrive_ModuleScopedCaches) {
24
+ GlobalSink.__warpDrive_ModuleScopedCaches = ModuleScopedCaches;
25
+ } else {
26
+ // eslint-disable-next-line no-console
27
+ console.warn(`
28
+ Multiple copies of WarpDrive have been detected. This may be due to a bug in ember-auto-import
29
+ in which test assets get their own copy of some v2-addons. This can cause the application to
30
+ malfunction as each copy will maintain its own separate state.`);
31
+ }
32
+ }
33
+ function getOrSetGlobal(key, value) {
34
+ {
35
+ const existing = ModuleScopedCaches[key];
36
+ if (existing === undefined) {
37
+ return ModuleScopedCaches[key] = value;
38
+ } else {
39
+ return existing;
40
+ }
41
+ }
42
+ }
43
+ function peekTransient(key) {
44
+ const globalKey = `(transient) ${key}`;
45
+ return ModuleScopedCaches[globalKey] ?? null;
46
+ }
47
+ function setTransient(key, value) {
48
+ const globalKey = `(transient) ${key}`;
49
+ return ModuleScopedCaches[globalKey] = value;
50
+ }
51
+ function getOrSetUniversal(key, value) {
52
+ {
53
+ const existing = UniversalCache[key];
54
+ if (existing === undefined) {
55
+ return UniversalCache[key] = value;
56
+ } else {
57
+ return existing;
58
+ }
59
+ }
60
+ }
61
+ function peekUniversalTransient(key) {
62
+ const globalKey = `(transient) ${key}`;
63
+ return UniversalCache[globalKey] ?? null;
64
+ }
65
+ function setUniversalTransient(key, value) {
66
+ const globalKey = `(transient) ${key}`;
67
+ return UniversalCache[globalKey] = value;
68
+ }
69
+ export { getOrSetGlobal, getOrSetUniversal, peekTransient, peekUniversalTransient, setTransient, setUniversalTransient };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,61 @@
1
+ // provided for additional debuggability
2
+ const DEBUG_CLIENT_ORIGINATED = Symbol('record-originated-on-client');
3
+ const DEBUG_KEY_TYPE = Symbol('key-type');
4
+ const DEBUG_STALE_CACHE_OWNER = Symbol('warpDriveStaleCache');
5
+ function ProdSymbol(str, debugStr) {
6
+ return Symbol(debugStr);
7
+ }
8
+
9
+ // also present in production
10
+ const CACHE_OWNER = ProdSymbol('__$co', 'CACHE_OWNER');
11
+
12
+ /**
13
+ * A referentially stable object with a unique string (lid) that can be used
14
+ * as a reference to request data in the cache.
15
+ *
16
+ * Only requests that are assigned a RequestKey are retrievable/replayable from
17
+ * the cache, though requests without RequestKeys may still update cache state.
18
+ *
19
+ * @public
20
+ */
21
+
22
+ /** @deprecated use {@link RequestKey} */
23
+
24
+ /**
25
+ * Used when an ResourceKey is known to be the stable version
26
+ */
27
+
28
+ /**
29
+ * Used when a ResourceKey was not created locally as part
30
+ * of a call to store.createRecord
31
+ *
32
+ * Distinguishing between this ResourceKey and one for a client created
33
+ * resource that was created with an ID is generally speaking not possible
34
+ * at runtime, so anything with an ID typically narrows to this.
35
+ */
36
+
37
+ /** @deprecated use {@link PersistedResourceKey} */
38
+
39
+ /**
40
+ * Used when a ResourceKey was created locally
41
+ * (by a call to store.createRecord).
42
+ *
43
+ * It is possible in rare circumstances to have a ResourceKey
44
+ * that is not for a new record but does not have an ID. This would
45
+ * happen if a user intentionally created one for use with a secondary-index
46
+ * prior to the record having been fully loaded.
47
+ */
48
+
49
+ /**
50
+ * A referentially stable object with a unique string (lid) that can be used
51
+ * as a reference to data in the cache.
52
+ *
53
+ * Every resource has a unique ResourceKey, and ResourceKeys may refer
54
+ * to data that has never been loaded (for instance, in an async relationship).
55
+ *
56
+ * @public
57
+ */
58
+
59
+ /** @deprecated use {@link ResourceKey} */
60
+
61
+ export { CACHE_OWNER, DEBUG_CLIENT_ORIGINATED, DEBUG_KEY_TYPE, DEBUG_STALE_CACHE_OWNER };