@warp-drive/legacy 5.8.0-alpha.37 → 5.8.0-alpha.40

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 (433) hide show
  1. package/dist/unpkg/{prod-deprecated/-private-B1pSSN52.js → dev/-private-DbaSCSym.js} +65 -70
  2. package/dist/unpkg/dev/adapter/-private.js +1 -1
  3. package/dist/unpkg/dev/adapter/error.js +2 -3
  4. package/dist/unpkg/dev/adapter/json-api.js +144 -5
  5. package/dist/unpkg/dev/adapter/rest.js +15 -17
  6. package/dist/unpkg/dev/adapter.js +9 -10
  7. package/dist/unpkg/dev/compat/-private.js +1 -1
  8. package/dist/unpkg/dev/compat/builders.js +30 -28
  9. package/dist/unpkg/dev/compat/extensions.js +4 -5
  10. package/dist/unpkg/dev/compat/utils.js +2 -3
  11. package/dist/unpkg/dev/compat.js +226 -100
  12. package/dist/unpkg/{dev-deprecated/errors-CIGPcDvd.js → dev/errors-DD96TBEs.js} +78 -82
  13. package/dist/unpkg/{dev-deprecated/hooks-QqRnX108.js → dev/hooks-CqWjNWeL.js} +14 -15
  14. package/dist/unpkg/dev/index.js +23 -21
  15. package/dist/unpkg/dev/{json-BNrV8EYG.js → json-CCU-ZQ4b.js} +6 -9
  16. package/dist/unpkg/dev/model/-private.js +1 -1
  17. package/dist/unpkg/dev/model/migration-support.js +6 -34
  18. package/dist/unpkg/dev/model.js +57 -46
  19. package/dist/unpkg/{dev-deprecated/schema-provider-g5MfTj8n.js → dev/schema-provider-B8jiJOYC.js} +113 -222
  20. package/dist/unpkg/{prod/serialize-into-hash-BnYvPex3.js → dev/serialize-into-hash-CPAZXrQU.js} +16 -18
  21. package/dist/unpkg/dev/serializer/json-api.js +140 -19
  22. package/dist/unpkg/dev/serializer/json.js +1 -3
  23. package/dist/unpkg/dev/serializer/rest.js +12 -13
  24. package/dist/unpkg/dev/store.js +55 -55
  25. package/dist/unpkg/dev/util-DvanW33H.js +20 -0
  26. package/dist/unpkg/dev/utils-BhvS1iTS.js +8 -0
  27. package/dist/unpkg/dev-deprecated/{-private-B1pSSN52.js → -private-DbaSCSym.js} +65 -70
  28. package/dist/unpkg/dev-deprecated/adapter/-private.js +1 -1
  29. package/dist/unpkg/dev-deprecated/adapter/error.js +2 -3
  30. package/dist/unpkg/dev-deprecated/adapter/json-api.js +144 -5
  31. package/dist/unpkg/dev-deprecated/adapter/rest.js +15 -17
  32. package/dist/unpkg/dev-deprecated/adapter.js +9 -10
  33. package/dist/unpkg/dev-deprecated/compat/-private.js +1 -1
  34. package/dist/unpkg/dev-deprecated/compat/builders.js +30 -28
  35. package/dist/unpkg/dev-deprecated/compat/extensions.js +4 -5
  36. package/dist/unpkg/dev-deprecated/compat/utils.js +2 -3
  37. package/dist/unpkg/dev-deprecated/compat.js +226 -100
  38. package/dist/unpkg/{dev/errors-CIGPcDvd.js → dev-deprecated/errors-DEnabIZj.js} +78 -79
  39. package/dist/unpkg/{prod-deprecated/hooks-QqRnX108.js → dev-deprecated/hooks-CAll-Ets.js} +14 -15
  40. package/dist/unpkg/dev-deprecated/index.js +22 -21
  41. package/dist/unpkg/{prod-deprecated/json-BNrV8EYG.js → dev-deprecated/json-CCU-ZQ4b.js} +6 -9
  42. package/dist/unpkg/dev-deprecated/model/-private.js +1 -1
  43. package/dist/unpkg/dev-deprecated/model/migration-support.js +7 -18
  44. package/dist/unpkg/dev-deprecated/model.js +58 -43
  45. package/dist/unpkg/{prod-deprecated/schema-provider-g5MfTj8n.js → dev-deprecated/schema-provider-k2qXQTBg.js} +114 -198
  46. package/dist/unpkg/{prod-deprecated/serialize-into-hash-BnYvPex3.js → dev-deprecated/serialize-into-hash-CPAZXrQU.js} +16 -18
  47. package/dist/unpkg/dev-deprecated/serializer/json-api.js +140 -19
  48. package/dist/unpkg/dev-deprecated/serializer/json.js +1 -3
  49. package/dist/unpkg/dev-deprecated/serializer/rest.js +12 -13
  50. package/dist/unpkg/dev-deprecated/store.js +55 -55
  51. package/dist/unpkg/{prod-deprecated/util-Dul6TZts.js → dev-deprecated/util-CWr5WQOT.js} +2 -13
  52. package/dist/unpkg/dev-deprecated/utils-C9PJehtL.js +12 -0
  53. package/dist/unpkg/prod/{-private-B1pSSN52.js → -private-Cvf_97EG.js} +6 -246
  54. package/dist/unpkg/prod/adapter/-private.js +1 -1
  55. package/dist/unpkg/prod/adapter/error.js +0 -6
  56. package/dist/unpkg/prod/adapter/json-api.js +142 -8
  57. package/dist/unpkg/prod/adapter/rest.js +1 -40
  58. package/dist/unpkg/prod/adapter.js +7 -41
  59. package/dist/unpkg/prod/compat/-private.js +1 -1
  60. package/dist/unpkg/prod/compat/builders.js +4 -67
  61. package/dist/unpkg/prod/compat/extensions.js +0 -11
  62. package/dist/unpkg/prod/compat/utils.js +0 -6
  63. package/dist/unpkg/prod/compat.js +13 -307
  64. package/dist/unpkg/prod/{errors-CIGPcDvd.js → errors-CXnfnBfQ.js} +4 -256
  65. package/dist/unpkg/prod/hooks-DvyWhLNg.js +41 -0
  66. package/dist/unpkg/prod/index.js +9 -53
  67. package/dist/unpkg/prod/{json-BNrV8EYG.js → json-BYrUP8ao.js} +0 -16
  68. package/dist/unpkg/prod/model/-private.js +1 -1
  69. package/dist/unpkg/prod/model/migration-support.js +3 -38
  70. package/dist/unpkg/prod/model.js +31 -105
  71. package/dist/unpkg/{dev/schema-provider-g5MfTj8n.js → prod/schema-provider-CHujJvA9.js} +20 -454
  72. package/dist/unpkg/{dev-deprecated/serialize-into-hash-BnYvPex3.js → prod/serialize-into-hash-DYU2egXl.js} +1 -47
  73. package/dist/unpkg/prod/serializer/json-api.js +124 -60
  74. package/dist/unpkg/prod/serializer/json.js +1 -3
  75. package/dist/unpkg/prod/serializer/rest.js +2 -35
  76. package/dist/unpkg/prod/store.js +4 -136
  77. package/dist/unpkg/prod/util-DvanW33H.js +20 -0
  78. package/dist/unpkg/prod/utils-BhvS1iTS.js +8 -0
  79. package/dist/unpkg/{dev/-private-B1pSSN52.js → prod-deprecated/-private-Cvf_97EG.js} +6 -246
  80. package/dist/unpkg/prod-deprecated/adapter/-private.js +1 -1
  81. package/dist/unpkg/prod-deprecated/adapter/error.js +0 -6
  82. package/dist/unpkg/prod-deprecated/adapter/json-api.js +142 -8
  83. package/dist/unpkg/prod-deprecated/adapter/rest.js +1 -40
  84. package/dist/unpkg/prod-deprecated/adapter.js +7 -41
  85. package/dist/unpkg/prod-deprecated/compat/-private.js +1 -1
  86. package/dist/unpkg/prod-deprecated/compat/builders.js +4 -67
  87. package/dist/unpkg/prod-deprecated/compat/extensions.js +0 -11
  88. package/dist/unpkg/prod-deprecated/compat/utils.js +0 -6
  89. package/dist/unpkg/prod-deprecated/compat.js +13 -307
  90. package/dist/unpkg/prod-deprecated/{errors-CIGPcDvd.js → errors-CG1SPYVg.js} +4 -253
  91. package/dist/unpkg/prod-deprecated/hooks-BIUBiNGR.js +41 -0
  92. package/dist/unpkg/prod-deprecated/index.js +8 -53
  93. package/dist/unpkg/{dev-deprecated/json-BNrV8EYG.js → prod-deprecated/json-BYrUP8ao.js} +0 -16
  94. package/dist/unpkg/prod-deprecated/model/-private.js +1 -1
  95. package/dist/unpkg/prod-deprecated/model/migration-support.js +4 -22
  96. package/dist/unpkg/prod-deprecated/model.js +31 -102
  97. package/dist/unpkg/{prod/schema-provider-g5MfTj8n.js → prod-deprecated/schema-provider-BJ4TWnZf.js} +21 -412
  98. package/dist/unpkg/{dev/serialize-into-hash-BnYvPex3.js → prod-deprecated/serialize-into-hash-DYU2egXl.js} +1 -47
  99. package/dist/unpkg/prod-deprecated/serializer/json-api.js +124 -60
  100. package/dist/unpkg/prod-deprecated/serializer/json.js +1 -3
  101. package/dist/unpkg/prod-deprecated/serializer/rest.js +2 -35
  102. package/dist/unpkg/prod-deprecated/store.js +4 -136
  103. package/dist/unpkg/{dev/util-Dul6TZts.js → prod-deprecated/util-B6cn-i93.js} +1 -13
  104. package/dist/unpkg/prod-deprecated/utils-BUWwQwCh.js +11 -0
  105. package/package.json +14 -22
  106. package/dist/unpkg/dev/declarations/adapter/-private/build-url-mixin.d.ts +0 -33
  107. package/dist/unpkg/dev/declarations/adapter/-private/fastboot-interface.d.ts +0 -8
  108. package/dist/unpkg/dev/declarations/adapter/-private/utils/continue-on-reject.d.ts +0 -1
  109. package/dist/unpkg/dev/declarations/adapter/-private/utils/determine-body-promise.d.ts +0 -4
  110. package/dist/unpkg/dev/declarations/adapter/-private/utils/fetch.d.ts +0 -8
  111. package/dist/unpkg/dev/declarations/adapter/-private/utils/parse-response-headers.d.ts +0 -1
  112. package/dist/unpkg/dev/declarations/adapter/-private/utils/serialize-into-hash.d.ts +0 -6
  113. package/dist/unpkg/dev/declarations/adapter/-private/utils/serialize-query-params.d.ts +0 -5
  114. package/dist/unpkg/dev/declarations/adapter/-private.d.ts +0 -5
  115. package/dist/unpkg/dev/declarations/adapter/error.d.ts +0 -215
  116. package/dist/unpkg/dev/declarations/adapter/json-api.d.ts +0 -231
  117. package/dist/unpkg/dev/declarations/adapter/rest.d.ts +0 -815
  118. package/dist/unpkg/dev/declarations/adapter.d.ts +0 -770
  119. package/dist/unpkg/dev/declarations/compat/-private.d.ts +0 -13
  120. package/dist/unpkg/dev/declarations/compat/builders/find-all.d.ts +0 -35
  121. package/dist/unpkg/dev/declarations/compat/builders/find-record.d.ts +0 -56
  122. package/dist/unpkg/dev/declarations/compat/builders/query.d.ts +0 -66
  123. package/dist/unpkg/dev/declarations/compat/builders/save-record.d.ts +0 -34
  124. package/dist/unpkg/dev/declarations/compat/builders/utils.d.ts +0 -3
  125. package/dist/unpkg/dev/declarations/compat/builders.d.ts +0 -14
  126. package/dist/unpkg/dev/declarations/compat/extensions.d.ts +0 -59
  127. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/fetch-manager.d.ts +0 -55
  128. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/identifier-has-id.d.ts +0 -2
  129. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/legacy-data-fetch.d.ts +0 -11
  130. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/legacy-data-utils.d.ts +0 -5
  131. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/legacy-network-handler.d.ts +0 -2
  132. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/minimum-adapter-interface.d.ts +0 -524
  133. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/minimum-serializer-interface.d.ts +0 -213
  134. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/serializer-response.d.ts +0 -6
  135. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/snapshot-record-array.d.ts +0 -110
  136. package/dist/unpkg/dev/declarations/compat/legacy-network-handler/snapshot.d.ts +0 -255
  137. package/dist/unpkg/dev/declarations/compat/utils.d.ts +0 -137
  138. package/dist/unpkg/dev/declarations/compat.d.ts +0 -157
  139. package/dist/unpkg/dev/declarations/index.d.ts +0 -70
  140. package/dist/unpkg/dev/declarations/model/-private/attr.d.ts +0 -170
  141. package/dist/unpkg/dev/declarations/model/-private/belongs-to.d.ts +0 -174
  142. package/dist/unpkg/dev/declarations/model/-private/debug/assert-polymorphic-type.d.ts +0 -5
  143. package/dist/unpkg/dev/declarations/model/-private/errors.d.ts +0 -289
  144. package/dist/unpkg/dev/declarations/model/-private/has-many.d.ts +0 -162
  145. package/dist/unpkg/dev/declarations/model/-private/hooks.d.ts +0 -10
  146. package/dist/unpkg/dev/declarations/model/-private/legacy-relationships-support.d.ts +0 -47
  147. package/dist/unpkg/dev/declarations/model/-private/model-for-mixin.d.ts +0 -3
  148. package/dist/unpkg/dev/declarations/model/-private/model-methods.d.ts +0 -39
  149. package/dist/unpkg/dev/declarations/model/-private/model.d.ts +0 -1269
  150. package/dist/unpkg/dev/declarations/model/-private/notify-changes.d.ts +0 -4
  151. package/dist/unpkg/dev/declarations/model/-private/promise-belongs-to.d.ts +0 -40
  152. package/dist/unpkg/dev/declarations/model/-private/promise-many-array.d.ts +0 -124
  153. package/dist/unpkg/dev/declarations/model/-private/record-state.d.ts +0 -58
  154. package/dist/unpkg/dev/declarations/model/-private/references/belongs-to.d.ts +0 -498
  155. package/dist/unpkg/dev/declarations/model/-private/references/has-many.d.ts +0 -500
  156. package/dist/unpkg/dev/declarations/model/-private/schema-provider.d.ts +0 -56
  157. package/dist/unpkg/dev/declarations/model/-private/type-utils.d.ts +0 -57
  158. package/dist/unpkg/dev/declarations/model/-private/util.d.ts +0 -5
  159. package/dist/unpkg/dev/declarations/model/-private.d.ts +0 -8
  160. package/dist/unpkg/dev/declarations/model/migration-support.d.ts +0 -280
  161. package/dist/unpkg/dev/declarations/model-fragments/extensions/fragment-array.d.ts +0 -16
  162. package/dist/unpkg/dev/declarations/model-fragments/extensions/fragment.d.ts +0 -15
  163. package/dist/unpkg/dev/declarations/model-fragments/hooks/model-for.d.ts +0 -20
  164. package/dist/unpkg/dev/declarations/model-fragments/index.d.ts +0 -5
  165. package/dist/unpkg/dev/declarations/model-fragments/instance-initializers/fragment-extensions.d.ts +0 -9
  166. package/dist/unpkg/dev/declarations/model-fragments/utilities/with-array-defaults.d.ts +0 -15
  167. package/dist/unpkg/dev/declarations/model-fragments/utilities/with-fragment-array-defaults.d.ts +0 -20
  168. package/dist/unpkg/dev/declarations/model-fragments/utilities/with-fragment-defaults.d.ts +0 -19
  169. package/dist/unpkg/dev/declarations/model-fragments/utilities/with-legacy.d.ts +0 -3
  170. package/dist/unpkg/dev/declarations/model-fragments.d.ts +0 -9
  171. package/dist/unpkg/dev/declarations/model.d.ts +0 -49
  172. package/dist/unpkg/dev/declarations/serializer/-private/embedded-records-mixin.d.ts +0 -91
  173. package/dist/unpkg/dev/declarations/serializer/-private/transforms/boolean.d.ts +0 -47
  174. package/dist/unpkg/dev/declarations/serializer/-private/transforms/date.d.ts +0 -28
  175. package/dist/unpkg/dev/declarations/serializer/-private/transforms/number.d.ts +0 -29
  176. package/dist/unpkg/dev/declarations/serializer/-private/transforms/string.d.ts +0 -29
  177. package/dist/unpkg/dev/declarations/serializer/-private/transforms/transform.d.ts +0 -118
  178. package/dist/unpkg/dev/declarations/serializer/-private/utils.d.ts +0 -3
  179. package/dist/unpkg/dev/declarations/serializer/json-api.d.ts +0 -123
  180. package/dist/unpkg/dev/declarations/serializer/json.d.ts +0 -75
  181. package/dist/unpkg/dev/declarations/serializer/rest.d.ts +0 -51
  182. package/dist/unpkg/dev/declarations/serializer/transform.d.ts +0 -5
  183. package/dist/unpkg/dev/declarations/serializer.d.ts +0 -254
  184. package/dist/unpkg/dev/declarations/store/-private.d.ts +0 -223
  185. package/dist/unpkg/dev/declarations/store.d.ts +0 -3
  186. package/dist/unpkg/dev/hooks-QqRnX108.js +0 -74
  187. package/dist/unpkg/dev/utils-Cqw9eRj5.js +0 -23
  188. package/dist/unpkg/dev-deprecated/declarations/adapter/-private/build-url-mixin.d.ts +0 -33
  189. package/dist/unpkg/dev-deprecated/declarations/adapter/-private/fastboot-interface.d.ts +0 -8
  190. package/dist/unpkg/dev-deprecated/declarations/adapter/-private/utils/continue-on-reject.d.ts +0 -1
  191. package/dist/unpkg/dev-deprecated/declarations/adapter/-private/utils/determine-body-promise.d.ts +0 -4
  192. package/dist/unpkg/dev-deprecated/declarations/adapter/-private/utils/fetch.d.ts +0 -8
  193. package/dist/unpkg/dev-deprecated/declarations/adapter/-private/utils/parse-response-headers.d.ts +0 -1
  194. package/dist/unpkg/dev-deprecated/declarations/adapter/-private/utils/serialize-into-hash.d.ts +0 -6
  195. package/dist/unpkg/dev-deprecated/declarations/adapter/-private/utils/serialize-query-params.d.ts +0 -5
  196. package/dist/unpkg/dev-deprecated/declarations/adapter/-private.d.ts +0 -5
  197. package/dist/unpkg/dev-deprecated/declarations/adapter/error.d.ts +0 -215
  198. package/dist/unpkg/dev-deprecated/declarations/adapter/json-api.d.ts +0 -231
  199. package/dist/unpkg/dev-deprecated/declarations/adapter/rest.d.ts +0 -815
  200. package/dist/unpkg/dev-deprecated/declarations/adapter.d.ts +0 -770
  201. package/dist/unpkg/dev-deprecated/declarations/compat/-private.d.ts +0 -13
  202. package/dist/unpkg/dev-deprecated/declarations/compat/builders/find-all.d.ts +0 -35
  203. package/dist/unpkg/dev-deprecated/declarations/compat/builders/find-record.d.ts +0 -56
  204. package/dist/unpkg/dev-deprecated/declarations/compat/builders/query.d.ts +0 -66
  205. package/dist/unpkg/dev-deprecated/declarations/compat/builders/save-record.d.ts +0 -34
  206. package/dist/unpkg/dev-deprecated/declarations/compat/builders/utils.d.ts +0 -3
  207. package/dist/unpkg/dev-deprecated/declarations/compat/builders.d.ts +0 -14
  208. package/dist/unpkg/dev-deprecated/declarations/compat/extensions.d.ts +0 -59
  209. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/fetch-manager.d.ts +0 -55
  210. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/identifier-has-id.d.ts +0 -2
  211. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/legacy-data-fetch.d.ts +0 -11
  212. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/legacy-data-utils.d.ts +0 -5
  213. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/legacy-network-handler.d.ts +0 -2
  214. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/minimum-adapter-interface.d.ts +0 -524
  215. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/minimum-serializer-interface.d.ts +0 -213
  216. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/serializer-response.d.ts +0 -6
  217. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/snapshot-record-array.d.ts +0 -110
  218. package/dist/unpkg/dev-deprecated/declarations/compat/legacy-network-handler/snapshot.d.ts +0 -255
  219. package/dist/unpkg/dev-deprecated/declarations/compat/utils.d.ts +0 -137
  220. package/dist/unpkg/dev-deprecated/declarations/compat.d.ts +0 -157
  221. package/dist/unpkg/dev-deprecated/declarations/index.d.ts +0 -70
  222. package/dist/unpkg/dev-deprecated/declarations/model/-private/attr.d.ts +0 -170
  223. package/dist/unpkg/dev-deprecated/declarations/model/-private/belongs-to.d.ts +0 -174
  224. package/dist/unpkg/dev-deprecated/declarations/model/-private/debug/assert-polymorphic-type.d.ts +0 -5
  225. package/dist/unpkg/dev-deprecated/declarations/model/-private/errors.d.ts +0 -289
  226. package/dist/unpkg/dev-deprecated/declarations/model/-private/has-many.d.ts +0 -162
  227. package/dist/unpkg/dev-deprecated/declarations/model/-private/hooks.d.ts +0 -10
  228. package/dist/unpkg/dev-deprecated/declarations/model/-private/legacy-relationships-support.d.ts +0 -47
  229. package/dist/unpkg/dev-deprecated/declarations/model/-private/model-for-mixin.d.ts +0 -3
  230. package/dist/unpkg/dev-deprecated/declarations/model/-private/model-methods.d.ts +0 -39
  231. package/dist/unpkg/dev-deprecated/declarations/model/-private/model.d.ts +0 -1269
  232. package/dist/unpkg/dev-deprecated/declarations/model/-private/notify-changes.d.ts +0 -4
  233. package/dist/unpkg/dev-deprecated/declarations/model/-private/promise-belongs-to.d.ts +0 -40
  234. package/dist/unpkg/dev-deprecated/declarations/model/-private/promise-many-array.d.ts +0 -124
  235. package/dist/unpkg/dev-deprecated/declarations/model/-private/record-state.d.ts +0 -58
  236. package/dist/unpkg/dev-deprecated/declarations/model/-private/references/belongs-to.d.ts +0 -498
  237. package/dist/unpkg/dev-deprecated/declarations/model/-private/references/has-many.d.ts +0 -500
  238. package/dist/unpkg/dev-deprecated/declarations/model/-private/schema-provider.d.ts +0 -56
  239. package/dist/unpkg/dev-deprecated/declarations/model/-private/type-utils.d.ts +0 -57
  240. package/dist/unpkg/dev-deprecated/declarations/model/-private/util.d.ts +0 -5
  241. package/dist/unpkg/dev-deprecated/declarations/model/-private.d.ts +0 -8
  242. package/dist/unpkg/dev-deprecated/declarations/model/migration-support.d.ts +0 -280
  243. package/dist/unpkg/dev-deprecated/declarations/model-fragments/extensions/fragment-array.d.ts +0 -16
  244. package/dist/unpkg/dev-deprecated/declarations/model-fragments/extensions/fragment.d.ts +0 -15
  245. package/dist/unpkg/dev-deprecated/declarations/model-fragments/hooks/model-for.d.ts +0 -20
  246. package/dist/unpkg/dev-deprecated/declarations/model-fragments/index.d.ts +0 -5
  247. package/dist/unpkg/dev-deprecated/declarations/model-fragments/instance-initializers/fragment-extensions.d.ts +0 -9
  248. package/dist/unpkg/dev-deprecated/declarations/model-fragments/utilities/with-array-defaults.d.ts +0 -15
  249. package/dist/unpkg/dev-deprecated/declarations/model-fragments/utilities/with-fragment-array-defaults.d.ts +0 -20
  250. package/dist/unpkg/dev-deprecated/declarations/model-fragments/utilities/with-fragment-defaults.d.ts +0 -19
  251. package/dist/unpkg/dev-deprecated/declarations/model-fragments/utilities/with-legacy.d.ts +0 -3
  252. package/dist/unpkg/dev-deprecated/declarations/model-fragments.d.ts +0 -9
  253. package/dist/unpkg/dev-deprecated/declarations/model.d.ts +0 -49
  254. package/dist/unpkg/dev-deprecated/declarations/serializer/-private/embedded-records-mixin.d.ts +0 -91
  255. package/dist/unpkg/dev-deprecated/declarations/serializer/-private/transforms/boolean.d.ts +0 -47
  256. package/dist/unpkg/dev-deprecated/declarations/serializer/-private/transforms/date.d.ts +0 -28
  257. package/dist/unpkg/dev-deprecated/declarations/serializer/-private/transforms/number.d.ts +0 -29
  258. package/dist/unpkg/dev-deprecated/declarations/serializer/-private/transforms/string.d.ts +0 -29
  259. package/dist/unpkg/dev-deprecated/declarations/serializer/-private/transforms/transform.d.ts +0 -118
  260. package/dist/unpkg/dev-deprecated/declarations/serializer/-private/utils.d.ts +0 -3
  261. package/dist/unpkg/dev-deprecated/declarations/serializer/json-api.d.ts +0 -123
  262. package/dist/unpkg/dev-deprecated/declarations/serializer/json.d.ts +0 -75
  263. package/dist/unpkg/dev-deprecated/declarations/serializer/rest.d.ts +0 -51
  264. package/dist/unpkg/dev-deprecated/declarations/serializer/transform.d.ts +0 -5
  265. package/dist/unpkg/dev-deprecated/declarations/serializer.d.ts +0 -254
  266. package/dist/unpkg/dev-deprecated/declarations/store/-private.d.ts +0 -223
  267. package/dist/unpkg/dev-deprecated/declarations/store.d.ts +0 -3
  268. package/dist/unpkg/dev-deprecated/util-Dul6TZts.js +0 -35
  269. package/dist/unpkg/dev-deprecated/utils-Cqw9eRj5.js +0 -23
  270. package/dist/unpkg/prod/declarations/adapter/-private/build-url-mixin.d.ts +0 -33
  271. package/dist/unpkg/prod/declarations/adapter/-private/fastboot-interface.d.ts +0 -8
  272. package/dist/unpkg/prod/declarations/adapter/-private/utils/continue-on-reject.d.ts +0 -1
  273. package/dist/unpkg/prod/declarations/adapter/-private/utils/determine-body-promise.d.ts +0 -4
  274. package/dist/unpkg/prod/declarations/adapter/-private/utils/fetch.d.ts +0 -8
  275. package/dist/unpkg/prod/declarations/adapter/-private/utils/parse-response-headers.d.ts +0 -1
  276. package/dist/unpkg/prod/declarations/adapter/-private/utils/serialize-into-hash.d.ts +0 -6
  277. package/dist/unpkg/prod/declarations/adapter/-private/utils/serialize-query-params.d.ts +0 -5
  278. package/dist/unpkg/prod/declarations/adapter/-private.d.ts +0 -5
  279. package/dist/unpkg/prod/declarations/adapter/error.d.ts +0 -215
  280. package/dist/unpkg/prod/declarations/adapter/json-api.d.ts +0 -231
  281. package/dist/unpkg/prod/declarations/adapter/rest.d.ts +0 -815
  282. package/dist/unpkg/prod/declarations/adapter.d.ts +0 -770
  283. package/dist/unpkg/prod/declarations/compat/-private.d.ts +0 -13
  284. package/dist/unpkg/prod/declarations/compat/builders/find-all.d.ts +0 -35
  285. package/dist/unpkg/prod/declarations/compat/builders/find-record.d.ts +0 -56
  286. package/dist/unpkg/prod/declarations/compat/builders/query.d.ts +0 -66
  287. package/dist/unpkg/prod/declarations/compat/builders/save-record.d.ts +0 -34
  288. package/dist/unpkg/prod/declarations/compat/builders/utils.d.ts +0 -3
  289. package/dist/unpkg/prod/declarations/compat/builders.d.ts +0 -14
  290. package/dist/unpkg/prod/declarations/compat/extensions.d.ts +0 -59
  291. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/fetch-manager.d.ts +0 -55
  292. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/identifier-has-id.d.ts +0 -2
  293. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/legacy-data-fetch.d.ts +0 -11
  294. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/legacy-data-utils.d.ts +0 -5
  295. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/legacy-network-handler.d.ts +0 -2
  296. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/minimum-adapter-interface.d.ts +0 -524
  297. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/minimum-serializer-interface.d.ts +0 -213
  298. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/serializer-response.d.ts +0 -6
  299. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/snapshot-record-array.d.ts +0 -110
  300. package/dist/unpkg/prod/declarations/compat/legacy-network-handler/snapshot.d.ts +0 -255
  301. package/dist/unpkg/prod/declarations/compat/utils.d.ts +0 -137
  302. package/dist/unpkg/prod/declarations/compat.d.ts +0 -157
  303. package/dist/unpkg/prod/declarations/index.d.ts +0 -70
  304. package/dist/unpkg/prod/declarations/model/-private/attr.d.ts +0 -170
  305. package/dist/unpkg/prod/declarations/model/-private/belongs-to.d.ts +0 -174
  306. package/dist/unpkg/prod/declarations/model/-private/debug/assert-polymorphic-type.d.ts +0 -5
  307. package/dist/unpkg/prod/declarations/model/-private/errors.d.ts +0 -289
  308. package/dist/unpkg/prod/declarations/model/-private/has-many.d.ts +0 -162
  309. package/dist/unpkg/prod/declarations/model/-private/hooks.d.ts +0 -10
  310. package/dist/unpkg/prod/declarations/model/-private/legacy-relationships-support.d.ts +0 -47
  311. package/dist/unpkg/prod/declarations/model/-private/model-for-mixin.d.ts +0 -3
  312. package/dist/unpkg/prod/declarations/model/-private/model-methods.d.ts +0 -39
  313. package/dist/unpkg/prod/declarations/model/-private/model.d.ts +0 -1269
  314. package/dist/unpkg/prod/declarations/model/-private/notify-changes.d.ts +0 -4
  315. package/dist/unpkg/prod/declarations/model/-private/promise-belongs-to.d.ts +0 -40
  316. package/dist/unpkg/prod/declarations/model/-private/promise-many-array.d.ts +0 -124
  317. package/dist/unpkg/prod/declarations/model/-private/record-state.d.ts +0 -58
  318. package/dist/unpkg/prod/declarations/model/-private/references/belongs-to.d.ts +0 -498
  319. package/dist/unpkg/prod/declarations/model/-private/references/has-many.d.ts +0 -500
  320. package/dist/unpkg/prod/declarations/model/-private/schema-provider.d.ts +0 -56
  321. package/dist/unpkg/prod/declarations/model/-private/type-utils.d.ts +0 -57
  322. package/dist/unpkg/prod/declarations/model/-private/util.d.ts +0 -5
  323. package/dist/unpkg/prod/declarations/model/-private.d.ts +0 -8
  324. package/dist/unpkg/prod/declarations/model/migration-support.d.ts +0 -280
  325. package/dist/unpkg/prod/declarations/model-fragments/extensions/fragment-array.d.ts +0 -16
  326. package/dist/unpkg/prod/declarations/model-fragments/extensions/fragment.d.ts +0 -15
  327. package/dist/unpkg/prod/declarations/model-fragments/hooks/model-for.d.ts +0 -20
  328. package/dist/unpkg/prod/declarations/model-fragments/index.d.ts +0 -5
  329. package/dist/unpkg/prod/declarations/model-fragments/instance-initializers/fragment-extensions.d.ts +0 -9
  330. package/dist/unpkg/prod/declarations/model-fragments/utilities/with-array-defaults.d.ts +0 -15
  331. package/dist/unpkg/prod/declarations/model-fragments/utilities/with-fragment-array-defaults.d.ts +0 -20
  332. package/dist/unpkg/prod/declarations/model-fragments/utilities/with-fragment-defaults.d.ts +0 -19
  333. package/dist/unpkg/prod/declarations/model-fragments/utilities/with-legacy.d.ts +0 -3
  334. package/dist/unpkg/prod/declarations/model-fragments.d.ts +0 -9
  335. package/dist/unpkg/prod/declarations/model.d.ts +0 -49
  336. package/dist/unpkg/prod/declarations/serializer/-private/embedded-records-mixin.d.ts +0 -91
  337. package/dist/unpkg/prod/declarations/serializer/-private/transforms/boolean.d.ts +0 -47
  338. package/dist/unpkg/prod/declarations/serializer/-private/transforms/date.d.ts +0 -28
  339. package/dist/unpkg/prod/declarations/serializer/-private/transforms/number.d.ts +0 -29
  340. package/dist/unpkg/prod/declarations/serializer/-private/transforms/string.d.ts +0 -29
  341. package/dist/unpkg/prod/declarations/serializer/-private/transforms/transform.d.ts +0 -118
  342. package/dist/unpkg/prod/declarations/serializer/-private/utils.d.ts +0 -3
  343. package/dist/unpkg/prod/declarations/serializer/json-api.d.ts +0 -123
  344. package/dist/unpkg/prod/declarations/serializer/json.d.ts +0 -75
  345. package/dist/unpkg/prod/declarations/serializer/rest.d.ts +0 -51
  346. package/dist/unpkg/prod/declarations/serializer/transform.d.ts +0 -5
  347. package/dist/unpkg/prod/declarations/serializer.d.ts +0 -254
  348. package/dist/unpkg/prod/declarations/store/-private.d.ts +0 -223
  349. package/dist/unpkg/prod/declarations/store.d.ts +0 -3
  350. package/dist/unpkg/prod/hooks-QqRnX108.js +0 -74
  351. package/dist/unpkg/prod/util-Dul6TZts.js +0 -35
  352. package/dist/unpkg/prod/utils-Cqw9eRj5.js +0 -23
  353. package/dist/unpkg/prod-deprecated/declarations/adapter/-private/build-url-mixin.d.ts +0 -33
  354. package/dist/unpkg/prod-deprecated/declarations/adapter/-private/fastboot-interface.d.ts +0 -8
  355. package/dist/unpkg/prod-deprecated/declarations/adapter/-private/utils/continue-on-reject.d.ts +0 -1
  356. package/dist/unpkg/prod-deprecated/declarations/adapter/-private/utils/determine-body-promise.d.ts +0 -4
  357. package/dist/unpkg/prod-deprecated/declarations/adapter/-private/utils/fetch.d.ts +0 -8
  358. package/dist/unpkg/prod-deprecated/declarations/adapter/-private/utils/parse-response-headers.d.ts +0 -1
  359. package/dist/unpkg/prod-deprecated/declarations/adapter/-private/utils/serialize-into-hash.d.ts +0 -6
  360. package/dist/unpkg/prod-deprecated/declarations/adapter/-private/utils/serialize-query-params.d.ts +0 -5
  361. package/dist/unpkg/prod-deprecated/declarations/adapter/-private.d.ts +0 -5
  362. package/dist/unpkg/prod-deprecated/declarations/adapter/error.d.ts +0 -215
  363. package/dist/unpkg/prod-deprecated/declarations/adapter/json-api.d.ts +0 -231
  364. package/dist/unpkg/prod-deprecated/declarations/adapter/rest.d.ts +0 -815
  365. package/dist/unpkg/prod-deprecated/declarations/adapter.d.ts +0 -770
  366. package/dist/unpkg/prod-deprecated/declarations/compat/-private.d.ts +0 -13
  367. package/dist/unpkg/prod-deprecated/declarations/compat/builders/find-all.d.ts +0 -35
  368. package/dist/unpkg/prod-deprecated/declarations/compat/builders/find-record.d.ts +0 -56
  369. package/dist/unpkg/prod-deprecated/declarations/compat/builders/query.d.ts +0 -66
  370. package/dist/unpkg/prod-deprecated/declarations/compat/builders/save-record.d.ts +0 -34
  371. package/dist/unpkg/prod-deprecated/declarations/compat/builders/utils.d.ts +0 -3
  372. package/dist/unpkg/prod-deprecated/declarations/compat/builders.d.ts +0 -14
  373. package/dist/unpkg/prod-deprecated/declarations/compat/extensions.d.ts +0 -59
  374. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/fetch-manager.d.ts +0 -55
  375. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/identifier-has-id.d.ts +0 -2
  376. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/legacy-data-fetch.d.ts +0 -11
  377. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/legacy-data-utils.d.ts +0 -5
  378. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/legacy-network-handler.d.ts +0 -2
  379. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/minimum-adapter-interface.d.ts +0 -524
  380. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/minimum-serializer-interface.d.ts +0 -213
  381. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/serializer-response.d.ts +0 -6
  382. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/snapshot-record-array.d.ts +0 -110
  383. package/dist/unpkg/prod-deprecated/declarations/compat/legacy-network-handler/snapshot.d.ts +0 -255
  384. package/dist/unpkg/prod-deprecated/declarations/compat/utils.d.ts +0 -137
  385. package/dist/unpkg/prod-deprecated/declarations/compat.d.ts +0 -157
  386. package/dist/unpkg/prod-deprecated/declarations/index.d.ts +0 -70
  387. package/dist/unpkg/prod-deprecated/declarations/model/-private/attr.d.ts +0 -170
  388. package/dist/unpkg/prod-deprecated/declarations/model/-private/belongs-to.d.ts +0 -174
  389. package/dist/unpkg/prod-deprecated/declarations/model/-private/debug/assert-polymorphic-type.d.ts +0 -5
  390. package/dist/unpkg/prod-deprecated/declarations/model/-private/errors.d.ts +0 -289
  391. package/dist/unpkg/prod-deprecated/declarations/model/-private/has-many.d.ts +0 -162
  392. package/dist/unpkg/prod-deprecated/declarations/model/-private/hooks.d.ts +0 -10
  393. package/dist/unpkg/prod-deprecated/declarations/model/-private/legacy-relationships-support.d.ts +0 -47
  394. package/dist/unpkg/prod-deprecated/declarations/model/-private/model-for-mixin.d.ts +0 -3
  395. package/dist/unpkg/prod-deprecated/declarations/model/-private/model-methods.d.ts +0 -39
  396. package/dist/unpkg/prod-deprecated/declarations/model/-private/model.d.ts +0 -1269
  397. package/dist/unpkg/prod-deprecated/declarations/model/-private/notify-changes.d.ts +0 -4
  398. package/dist/unpkg/prod-deprecated/declarations/model/-private/promise-belongs-to.d.ts +0 -40
  399. package/dist/unpkg/prod-deprecated/declarations/model/-private/promise-many-array.d.ts +0 -124
  400. package/dist/unpkg/prod-deprecated/declarations/model/-private/record-state.d.ts +0 -58
  401. package/dist/unpkg/prod-deprecated/declarations/model/-private/references/belongs-to.d.ts +0 -498
  402. package/dist/unpkg/prod-deprecated/declarations/model/-private/references/has-many.d.ts +0 -500
  403. package/dist/unpkg/prod-deprecated/declarations/model/-private/schema-provider.d.ts +0 -56
  404. package/dist/unpkg/prod-deprecated/declarations/model/-private/type-utils.d.ts +0 -57
  405. package/dist/unpkg/prod-deprecated/declarations/model/-private/util.d.ts +0 -5
  406. package/dist/unpkg/prod-deprecated/declarations/model/-private.d.ts +0 -8
  407. package/dist/unpkg/prod-deprecated/declarations/model/migration-support.d.ts +0 -280
  408. package/dist/unpkg/prod-deprecated/declarations/model-fragments/extensions/fragment-array.d.ts +0 -16
  409. package/dist/unpkg/prod-deprecated/declarations/model-fragments/extensions/fragment.d.ts +0 -15
  410. package/dist/unpkg/prod-deprecated/declarations/model-fragments/hooks/model-for.d.ts +0 -20
  411. package/dist/unpkg/prod-deprecated/declarations/model-fragments/index.d.ts +0 -5
  412. package/dist/unpkg/prod-deprecated/declarations/model-fragments/instance-initializers/fragment-extensions.d.ts +0 -9
  413. package/dist/unpkg/prod-deprecated/declarations/model-fragments/utilities/with-array-defaults.d.ts +0 -15
  414. package/dist/unpkg/prod-deprecated/declarations/model-fragments/utilities/with-fragment-array-defaults.d.ts +0 -20
  415. package/dist/unpkg/prod-deprecated/declarations/model-fragments/utilities/with-fragment-defaults.d.ts +0 -19
  416. package/dist/unpkg/prod-deprecated/declarations/model-fragments/utilities/with-legacy.d.ts +0 -3
  417. package/dist/unpkg/prod-deprecated/declarations/model-fragments.d.ts +0 -9
  418. package/dist/unpkg/prod-deprecated/declarations/model.d.ts +0 -49
  419. package/dist/unpkg/prod-deprecated/declarations/serializer/-private/embedded-records-mixin.d.ts +0 -91
  420. package/dist/unpkg/prod-deprecated/declarations/serializer/-private/transforms/boolean.d.ts +0 -47
  421. package/dist/unpkg/prod-deprecated/declarations/serializer/-private/transforms/date.d.ts +0 -28
  422. package/dist/unpkg/prod-deprecated/declarations/serializer/-private/transforms/number.d.ts +0 -29
  423. package/dist/unpkg/prod-deprecated/declarations/serializer/-private/transforms/string.d.ts +0 -29
  424. package/dist/unpkg/prod-deprecated/declarations/serializer/-private/transforms/transform.d.ts +0 -118
  425. package/dist/unpkg/prod-deprecated/declarations/serializer/-private/utils.d.ts +0 -3
  426. package/dist/unpkg/prod-deprecated/declarations/serializer/json-api.d.ts +0 -123
  427. package/dist/unpkg/prod-deprecated/declarations/serializer/json.d.ts +0 -75
  428. package/dist/unpkg/prod-deprecated/declarations/serializer/rest.d.ts +0 -51
  429. package/dist/unpkg/prod-deprecated/declarations/serializer/transform.d.ts +0 -5
  430. package/dist/unpkg/prod-deprecated/declarations/serializer.d.ts +0 -254
  431. package/dist/unpkg/prod-deprecated/declarations/store/-private.d.ts +0 -223
  432. package/dist/unpkg/prod-deprecated/declarations/store.d.ts +0 -3
  433. package/dist/unpkg/prod-deprecated/utils-Cqw9eRj5.js +0 -23
@@ -2,39 +2,38 @@ import { getOwner } from '@ember/application';
2
2
  import { recordIdentifierFor } from '@warp-drive/core';
3
3
  import { assertPrivateStore, waitFor, _deprecatingNormalize } from '@warp-drive/core/store/-private';
4
4
  import '@warp-drive/core/reactive/-private';
5
- import { p as payloadIsNotBlank, n as normalizeResponseHelper, i as iterateData, F as FetchManager, S as SaveOp, a as assertIdentifierHasId, b as SnapshotRecordArray } from "./-private-B1pSSN52.js";
6
- import { macroCondition, getGlobalConfig } from '@embroider/macros';
5
+ import { p as payloadIsNotBlank, n as normalizeResponseHelper, i as iterateData, F as FetchManager, S as SaveOp, a as assertIdentifierHasId, b as SnapshotRecordArray } from "./-private-DbaSCSym.js";
7
6
  function _findHasMany(adapter, store, identifier, link, relationship, options) {
8
7
  const promise = Promise.resolve().then(() => {
9
8
  const snapshot = store._fetchManager.createSnapshot(identifier, options);
10
9
  const useLink = !link || typeof link === 'string';
11
10
  const relatedLink = useLink ? link : link.href;
12
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
11
+ (test => {
13
12
  if (!test) {
14
13
  throw new Error(`Attempted to load a hasMany relationship from a specified 'link' in the original payload, but the specified link is empty. You must provide a valid 'link' in the original payload to use 'findHasMany'`);
15
14
  }
16
- })(relatedLink) : {};
17
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
15
+ })(relatedLink);
16
+ (test => {
18
17
  if (!test) {
19
18
  throw new Error(`Expected the adapter to implement 'findHasMany' but it does not`);
20
19
  }
21
- })(typeof adapter.findHasMany === 'function') : {};
20
+ })(typeof adapter.findHasMany === 'function');
22
21
  return adapter.findHasMany(store, snapshot, relatedLink, relationship);
23
22
  });
24
23
  return promise.then(adapterPayload => {
25
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
24
+ (test => {
26
25
  if (!test) {
27
26
  throw new Error(`You made a 'findHasMany' request for a ${identifier.type}'s '${relationship.name}' relationship, using link '${JSON.stringify(link)}' , but the adapter's response did not have any data`);
28
27
  }
29
- })(payloadIsNotBlank(adapterPayload)) : {};
28
+ })(payloadIsNotBlank(adapterPayload));
30
29
  const modelClass = store.modelFor(relationship.type);
31
30
  const serializer = store.serializerFor(relationship.type);
32
31
  let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findHasMany');
33
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
32
+ (test => {
34
33
  if (!test) {
35
34
  throw new Error(`fetched the hasMany relationship '${relationship.name}' for ${identifier.type}:${identifier.id} with link '${JSON.stringify(link)}', but no data member is present in the response. If no data exists, the response should set { data: [] }`);
36
35
  }
37
- })('data' in payload && Array.isArray(payload.data)) : {};
36
+ })('data' in payload && Array.isArray(payload.data));
38
37
  payload = syncRelationshipDataFromLink(store, payload, identifier, relationship);
39
38
  return store._push(payload, true);
40
39
  }, null);
@@ -42,35 +41,35 @@ function _findHasMany(adapter, store, identifier, link, relationship, options) {
42
41
  function _findBelongsTo(store, identifier, link, relationship, options) {
43
42
  const promise = Promise.resolve().then(() => {
44
43
  const adapter = store.adapterFor(identifier.type);
45
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
44
+ (test => {
46
45
  if (!test) {
47
46
  throw new Error(`You tried to load a belongsTo relationship but you have no adapter (for ${identifier.type})`);
48
47
  }
49
- })(adapter) : {};
50
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
48
+ })(adapter);
49
+ (test => {
51
50
  if (!test) {
52
51
  throw new Error(`You tried to load a belongsTo relationship from a specified 'link' in the original payload but your adapter does not implement 'findBelongsTo'`);
53
52
  }
54
- })(typeof adapter.findBelongsTo === 'function') : {};
53
+ })(typeof adapter.findBelongsTo === 'function');
55
54
  const snapshot = store._fetchManager.createSnapshot(identifier, options);
56
55
  const useLink = !link || typeof link === 'string';
57
56
  const relatedLink = useLink ? link : link.href;
58
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
57
+ (test => {
59
58
  if (!test) {
60
59
  throw new Error(`Attempted to load a belongsTo relationship from a specified 'link' in the original payload, but the specified link is empty. You must provide a valid 'link' in the original payload to use 'findBelongsTo'`);
61
60
  }
62
- })(relatedLink) : {};
61
+ })(relatedLink);
63
62
  return adapter.findBelongsTo(store, snapshot, relatedLink, relationship);
64
63
  });
65
64
  return promise.then(adapterPayload => {
66
65
  const modelClass = store.modelFor(relationship.type);
67
66
  const serializer = store.serializerFor(relationship.type);
68
67
  let payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findBelongsTo');
69
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
68
+ (test => {
70
69
  if (!test) {
71
70
  throw new Error(`fetched the belongsTo relationship '${relationship.name}' for ${identifier.type}:${identifier.id} with link '${JSON.stringify(link)}', but no data member is present in the response. If no data exists, the response should set { data: null }`);
72
71
  }
73
- })('data' in payload && (payload.data === null || typeof payload.data === 'object' && !Array.isArray(payload.data))) : {};
72
+ })('data' in payload && (payload.data === null || typeof payload.data === 'object' && !Array.isArray(payload.data)));
74
73
  if (!payload.data && !payload.links && !payload.meta) {
75
74
  return null;
76
75
  }
@@ -143,7 +142,7 @@ function ensureRelationshipIsSetToParent(payload, parentIdentifier, store, paren
143
142
  kind
144
143
  } = inverse;
145
144
  const relationshipData = relationships[inverseKey]?.data;
146
- if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
145
+ {
147
146
  if (typeof relationshipData !== 'undefined' && !relationshipDataPointsToParent(relationshipData, parentIdentifier)) {
148
147
  const inspect = function inspect(thing) {
149
148
  return `'${JSON.stringify(thing)}'`;
@@ -163,11 +162,11 @@ function ensureRelationshipIsSetToParent(payload, parentIdentifier, store, paren
163
162
  const relationshipFetched = `${expectedModel}.${parentRelationship.kind}("${parentRelationship.name}")`;
164
163
  const includedRecord = `<${type}:${id}>`;
165
164
  const message = [`Encountered mismatched relationship: Ember Data expected ${path} in the payload from ${relationshipFetched} to include ${expected} but got ${got} instead.\n`, `The ${includedRecord} record loaded at ${prefix} in the payload specified ${other} as its ${quotedInverse}, but should have specified ${expectedModel} (the record the relationship is being loaded from) as its ${quotedInverse} instead.`, `This could mean that the response for ${relationshipFetched} may have accidentally returned ${quotedType} records that aren't related to ${expectedModel} and could be related to a different ${parentIdentifier.type} record instead.`, `Ember Data has corrected the ${includedRecord} record's ${quotedInverse} relationship to ${expectedModel} so that ${relationshipFetched} will include ${includedRecord}.`, `Please update the response from the server or change your serializer to either ensure that the response for only includes ${quotedType} records that specify ${expectedModel} as their ${quotedInverse}, or omit the ${quotedInverse} relationship from the response.`].join('\n');
166
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
165
+ (test => {
167
166
  {
168
167
  throw new Error(message);
169
168
  }
170
- })() : {};
169
+ })();
171
170
  }
172
171
  }
173
172
  if (kind !== 'hasMany' || typeof relationshipData !== 'undefined') {
@@ -181,16 +180,16 @@ function inverseForRelationship(store, identifier, key) {
181
180
  if (!definition) {
182
181
  return null;
183
182
  }
184
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
183
+ (test => {
185
184
  if (!test) {
186
185
  throw new Error(`Expected the field definition to be a relationship`);
187
186
  }
188
- })(definition.kind === 'hasMany' || definition.kind === 'belongsTo') : {};
189
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
187
+ })(definition.kind === 'hasMany' || definition.kind === 'belongsTo');
188
+ (test => {
190
189
  if (!test) {
191
190
  throw new Error(`Expected the relationship defintion to specify the inverse type or null.`);
192
191
  }
193
- })(definition.options?.inverse === null || typeof definition.options?.inverse === 'string' && definition.options.inverse.length > 0) : {};
192
+ })(definition.options?.inverse === null || typeof definition.options?.inverse === 'string' && definition.options.inverse.length > 0);
194
193
  return definition.options.inverse;
195
194
  }
196
195
  function getInverse(store, parentIdentifier, parentRelationship, type) {
@@ -207,11 +206,11 @@ function getInverse(store, parentIdentifier, parentRelationship, type) {
207
206
  const definition = store.schema.fields({
208
207
  type
209
208
  }).get(inverseKey);
210
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
209
+ (test => {
211
210
  if (!test) {
212
211
  throw new Error(`Expected the field definition to be a relationship`);
213
212
  }
214
- })(definition && (definition.kind === 'hasMany' || definition.kind === 'belongsTo')) : {};
213
+ })(definition && (definition.kind === 'hasMany' || definition.kind === 'belongsTo'));
215
214
  return {
216
215
  inverseKey,
217
216
  kind: definition.kind
@@ -249,11 +248,11 @@ function fixRelationshipData(relationshipData, relationshipKind, {
249
248
  if (relationshipKind === 'hasMany') {
250
249
  const relData = relationshipData || [];
251
250
  if (relationshipData) {
252
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
251
+ (test => {
253
252
  if (!test) {
254
253
  throw new Error('expected the relationship data to be an array');
255
254
  }
256
- })(Array.isArray(relationshipData)) : {};
255
+ })(Array.isArray(relationshipData));
257
256
  // these arrays could be massive so this is better than filter
258
257
  // Note: this is potentially problematic if type/id are not in the
259
258
  // same state of normalization.
@@ -281,6 +280,141 @@ function validateRelationshipEntry({
281
280
  }) {
282
281
  return !!id && id.toString() === parentModelID;
283
282
  }
283
+
284
+ /*
285
+ These are the runtime implementations for the javascript macros that have
286
+ runtime implementations.
287
+
288
+ Not every macro has a runtime implementation, some only make sense in the
289
+ build and always run there.
290
+
291
+ Even when we have runtime implementations, we are still careful to emit static
292
+ errors during the build wherever possible, and runtime errors when necessary,
293
+ so that you're not surprised when you switch from runtime-mode to compile-time
294
+ mode.
295
+ */
296
+
297
+ // This is here as a compile target for `getConfig` and `getOwnConfig` when
298
+ // we're in runtime mode. This is not public API to call from your own code.
299
+ function config(packageRoot) {
300
+ return runtimeConfig.packages[packageRoot];
301
+ }
302
+ function getGlobalConfig() {
303
+ return runtimeConfig.global;
304
+ }
305
+ const runtimeConfig = initializeRuntimeMacrosConfig();
306
+
307
+ // this exists to be targeted by our babel plugin
308
+ function initializeRuntimeMacrosConfig() {
309
+ return {
310
+ "packages": {},
311
+ "global": {
312
+ "@embroider/macros": {
313
+ "isTesting": false
314
+ },
315
+ "WarpDrive": {
316
+ "debug": {
317
+ "DEBUG_RELATIONSHIP_NOTIFICATIONS": false,
318
+ "LOG_CACHE": false,
319
+ "LOG_CACHE_POLICY": false,
320
+ "LOG_GRAPH": false,
321
+ "LOG_IDENTIFIERS": false,
322
+ "LOG_INSTANCE_CACHE": false,
323
+ "LOG_METRIC_COUNTS": false,
324
+ "LOG_MUTATIONS": false,
325
+ "LOG_NOTIFICATIONS": false,
326
+ "LOG_OPERATIONS": false,
327
+ "LOG_PAYLOADS": false,
328
+ "LOG_REACT_SIGNAL_INTEGRATION": false,
329
+ "LOG_REQUESTS": false,
330
+ "LOG_REQUEST_STATUS": false,
331
+ "__INTERNAL_LOG_NATIVE_MAP_SET_COUNTS": false
332
+ },
333
+ "polyfillUUID": false,
334
+ "includeDataAdapter": true,
335
+ "compatWith": null,
336
+ "deprecations": {
337
+ "DEPRECATE_CATCH_ALL": true,
338
+ "DEPRECATE_COMPUTED_CHAINS": true,
339
+ "DEPRECATE_EMBER_INFLECTOR": true,
340
+ "DEPRECATE_LEGACY_IMPORTS": true,
341
+ "DEPRECATE_MANY_ARRAY_DUPLICATES": true,
342
+ "DEPRECATE_NON_STRICT_ID": true,
343
+ "DEPRECATE_NON_STRICT_TYPES": true,
344
+ "DEPRECATE_NON_UNIQUE_PAYLOADS": true,
345
+ "DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE": true,
346
+ "DEPRECATE_STORE_EXTENDS_EMBER_OBJECT": true,
347
+ "DEPRECATE_TRACKING_PACKAGE": true,
348
+ "DISABLE_7X_DEPRECATIONS": true,
349
+ "ENABLE_LEGACY_REQUEST_METHODS": true,
350
+ "ENABLE_LEGACY_SCHEMA_SERVICE": true
351
+ },
352
+ "features": {
353
+ "ENFORCE_STRICT_RESOURCE_FINALIZATION": false,
354
+ "JSON_API_CACHE_VALIDATION_ERRORS": false,
355
+ "SAMPLE_FEATURE_FLAG": null
356
+ },
357
+ "activeLogging": {
358
+ "DEBUG_RELATIONSHIP_NOTIFICATIONS": true,
359
+ "LOG_CACHE": true,
360
+ "LOG_CACHE_POLICY": true,
361
+ "LOG_GRAPH": true,
362
+ "LOG_IDENTIFIERS": true,
363
+ "LOG_INSTANCE_CACHE": true,
364
+ "LOG_METRIC_COUNTS": true,
365
+ "LOG_MUTATIONS": true,
366
+ "LOG_NOTIFICATIONS": true,
367
+ "LOG_OPERATIONS": true,
368
+ "LOG_PAYLOADS": true,
369
+ "LOG_REACT_SIGNAL_INTEGRATION": true,
370
+ "LOG_REQUESTS": true,
371
+ "LOG_REQUEST_STATUS": true,
372
+ "__INTERNAL_LOG_NATIVE_MAP_SET_COUNTS": true
373
+ },
374
+ "env": {
375
+ "TESTING": true,
376
+ "PRODUCTION": false,
377
+ "DEBUG": true,
378
+ "IS_RECORDING": false,
379
+ "IS_CI": true,
380
+ "SHOULD_RECORD": false
381
+ }
382
+ }
383
+ }
384
+ };
385
+ }
386
+ function updaterMethods() {
387
+ return {
388
+ config,
389
+ getGlobalConfig,
390
+ setConfig(packageRoot, value) {
391
+ runtimeConfig.packages[packageRoot] = value;
392
+ },
393
+ setGlobalConfig(key, value) {
394
+ runtimeConfig.global[key] = value;
395
+ }
396
+ };
397
+ }
398
+
399
+ // this is how runtime config can get injected at boot. I'm not sure yet if this
400
+ // should be public API, but we certainly need it internally to set things like
401
+ // the global fastboot.isRunning.
402
+ //
403
+ // consumers of this API push a function onto
404
+ // window._embroider_macros_runtime_config. The function is given four methods
405
+ // which allow it to read and write the per-package and global configs. The
406
+ // reason for allowing both read & write is that merging strategies are up to
407
+ // each consumers -- read first, then merge, then write.
408
+ //
409
+ // For an example user of this API, see where we generate
410
+ // embroider_macros_fastboot_init.js' in @embroider/core.
411
+ let updaters = typeof window !== 'undefined' ? window._embroider_macros_runtime_config : undefined;
412
+ if (updaters) {
413
+ let methods = updaterMethods();
414
+ for (let updater of updaters) {
415
+ updater(methods);
416
+ }
417
+ }
284
418
  const PotentialLegacyOperations = new Set(['findRecord', 'findAll', 'query', 'queryRecord', 'findBelongsTo', 'findHasMany', 'updateRecord', 'createRecord', 'deleteRecord']);
285
419
  const LegacyNetworkHandler = {
286
420
  request(context, next) {
@@ -339,18 +473,18 @@ function findBelongsTo(context) {
339
473
  return pendingRequest;
340
474
  }
341
475
  if (useLink) {
342
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
476
+ (test => {
343
477
  if (!test) {
344
478
  throw new Error(`Expected a related link when calling store.findBelongsTo, found ${String(links)}`);
345
479
  }
346
- })(links && links.related) : {};
480
+ })(links && links.related);
347
481
  return _findBelongsTo(store, record, links.related, field, options);
348
482
  }
349
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
483
+ (test => {
350
484
  if (!test) {
351
485
  throw new Error(`Expected an identifier`);
352
486
  }
353
- })(Array.isArray(identifiers) && identifiers.length === 1) : {};
487
+ })(Array.isArray(identifiers) && identifiers.length === 1);
354
488
  const manager = store._fetchManager;
355
489
  assertIdentifierHasId(identifier);
356
490
  return options.reload ? manager.scheduleFetch(identifier, options, context.request) : manager.fetchDataIfNeededForIdentifier(identifier, options, context.request);
@@ -381,30 +515,30 @@ function findHasMany(context) {
381
515
  The usual use-case is for the server to register a URL as a link, and
382
516
  then use that URL in the future to make a request for the relationship.
383
517
  */
384
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
518
+ (test => {
385
519
  if (!test) {
386
520
  throw new Error(`You tried to load a hasMany relationship but you have no adapter (for ${record.type})`);
387
521
  }
388
- })(adapter) : {};
389
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
522
+ })(adapter);
523
+ (test => {
390
524
  if (!test) {
391
525
  throw new Error(`You tried to load a hasMany relationship from a specified 'link' in the original payload but your adapter does not implement 'findHasMany'`);
392
526
  }
393
- })(typeof adapter.findHasMany === 'function') : {};
394
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
527
+ })(typeof adapter.findHasMany === 'function');
528
+ (test => {
395
529
  if (!test) {
396
530
  throw new Error(`Expected a related link when calling store.findHasMany, found ${String(links)}`);
397
531
  }
398
- })(links && links.related) : {};
532
+ })(links && links.related);
399
533
  return _findHasMany(adapter, store, record, links.related, field, options);
400
534
  }
401
535
 
402
536
  // identifiers case
403
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
537
+ (test => {
404
538
  if (!test) {
405
539
  throw new Error(`Expected an array of identifiers to fetch`);
406
540
  }
407
- })(Array.isArray(identifiers)) : {};
541
+ })(Array.isArray(identifiers));
408
542
  const fetches = new Array(identifiers.length);
409
543
  const manager = store._fetchManager;
410
544
  for (let i = 0; i < identifiers.length; i++) {
@@ -474,11 +608,11 @@ function adapterDidInvalidate(store, identifier, error) {
474
608
  }
475
609
  const cache = store.cache;
476
610
  if (error.errors) {
477
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
611
+ (test => {
478
612
  if (!test) {
479
613
  throw new Error(`Expected the cache in use by resource ${String(identifier)} to have a getErrors(identifier) method for retrieving errors.`);
480
614
  }
481
- })(typeof cache.getErrors === 'function') : {};
615
+ })(typeof cache.getErrors === 'function');
482
616
  let jsonApiErrors = error.errors;
483
617
  if (jsonApiErrors.length === 0) {
484
618
  jsonApiErrors = [{
@@ -549,25 +683,19 @@ function findRecord(context) {
549
683
  // Refetch the record if the adapter thinks the record is stale
550
684
  if (typeof options.reload === 'undefined' && adapter.shouldReloadRecord && adapter.shouldReloadRecord(store, snapshot = store._fetchManager.createSnapshot(identifier, options))) {
551
685
  assertIdentifierHasId(identifier);
552
- if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
686
+ {
553
687
  promise = store._fetchManager.scheduleFetch(identifier, Object.assign({}, options, {
554
688
  reload: true
555
689
  }), context.request);
556
- } else {
557
- options.reload = true;
558
- promise = store._fetchManager.scheduleFetch(identifier, options, context.request);
559
690
  }
560
691
  } else {
561
692
  // Trigger the background refetch if backgroundReload option is passed
562
693
  if (options.backgroundReload !== false && (options.backgroundReload || !adapter.shouldBackgroundReloadRecord || adapter.shouldBackgroundReloadRecord(store, snapshot = snapshot || store._fetchManager.createSnapshot(identifier, options)))) {
563
694
  assertIdentifierHasId(identifier);
564
- if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
695
+ {
565
696
  void store._fetchManager.scheduleFetch(identifier, Object.assign({}, options, {
566
697
  backgroundReload: true
567
698
  }), context.request);
568
- } else {
569
- options.backgroundReload = true;
570
- void store._fetchManager.scheduleFetch(identifier, options, context.request);
571
699
  }
572
700
  }
573
701
 
@@ -588,16 +716,16 @@ function findAll(context) {
588
716
  } = data;
589
717
  assertPrivateStore(store);
590
718
  const adapter = store.adapterFor(type);
591
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
719
+ (test => {
592
720
  if (!test) {
593
721
  throw new Error(`You tried to load all records but you have no adapter (for ${type})`);
594
722
  }
595
- })(adapter) : {};
596
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
723
+ })(adapter);
724
+ (test => {
597
725
  if (!test) {
598
726
  throw new Error(`You tried to load all records but your adapter does not implement 'findAll'`);
599
727
  }
600
- })(typeof adapter.findAll === 'function') : {};
728
+ })(typeof adapter.findAll === 'function');
601
729
 
602
730
  // avoid initializing the liveArray just to set `isUpdating`
603
731
  const maybeRecordArray = store.recordArrayManager._live.get(type);
@@ -622,16 +750,16 @@ function _findAll(adapter, store, type, snapshotArray, request, isAsyncFlush) {
622
750
  const schema = store.modelFor(type);
623
751
  let promise = Promise.resolve().then(() => adapter.findAll(store, schema, null, snapshotArray));
624
752
  promise = promise.then(adapterPayload => {
625
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
753
+ (test => {
626
754
  if (!test) {
627
755
  throw new Error(`You made a 'findAll' request for '${type}' records, but the adapter's response did not have any data`);
628
756
  }
629
- })(payloadIsNotBlank(adapterPayload)) : {};
757
+ })(payloadIsNotBlank(adapterPayload));
630
758
  const serializer = store.serializerFor(type);
631
759
  const payload = normalizeResponseHelper(serializer, store, schema, adapterPayload, null, 'findAll');
632
760
  store._push(payload, isAsyncFlush);
633
761
  snapshotArray._recordArray.isUpdating = false;
634
- if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_REQUESTS)) {
762
+ {
635
763
  if (getGlobalConfig().WarpDrive.debug.LOG_REQUESTS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REQUESTS) {
636
764
  // eslint-disable-next-line no-console
637
765
  console.log(`request: findAll<${type}> background reload complete`);
@@ -639,7 +767,7 @@ function _findAll(adapter, store, type, snapshotArray, request, isAsyncFlush) {
639
767
  }
640
768
  return snapshotArray._recordArray;
641
769
  });
642
- if (macroCondition(getGlobalConfig().WarpDrive.env.TESTING)) {
770
+ {
643
771
  if (!request.disableTestWaiter) {
644
772
  promise = waitFor(promise);
645
773
  }
@@ -661,25 +789,23 @@ function query(context) {
661
789
  query
662
790
  } = data;
663
791
  const adapter = store.adapterFor(type);
664
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
792
+ (test => {
665
793
  if (!test) {
666
794
  throw new Error(`You tried to make a query but you have no adapter (for ${type})`);
667
795
  }
668
- })(adapter) : {};
669
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
796
+ })(adapter);
797
+ (test => {
670
798
  if (!test) {
671
799
  throw new Error(`You tried to make a query but your adapter does not implement 'query'`);
672
800
  }
673
- })(typeof adapter.query === 'function') : {};
801
+ })(typeof adapter.query === 'function');
674
802
  const recordArray = options._recordArray || store.recordArrayManager.getCollection({
675
803
  type,
676
804
  query
677
805
  });
678
- if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
806
+ {
679
807
  options = Object.assign({}, options);
680
808
  delete options._recordArray;
681
- } else {
682
- delete options._recordArray;
683
809
  }
684
810
  const schema = store.modelFor(type);
685
811
  const promise = Promise.resolve().then(() => adapter.query(store, schema, query, recordArray, options));
@@ -687,21 +813,21 @@ function query(context) {
687
813
  const serializer = store.serializerFor(type);
688
814
  const payload = normalizeResponseHelper(serializer, store, schema, adapterPayload, null, 'query');
689
815
  const identifiers = store._push(payload, true);
690
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
816
+ (test => {
691
817
  if (!test) {
692
818
  throw new Error('The response to store.query is expected to be an array but it was a single record. Please wrap your response in an array or use `store.queryRecord` to query for a single record.');
693
819
  }
694
- })(Array.isArray(identifiers)) : {};
820
+ })(Array.isArray(identifiers));
695
821
  store.recordArrayManager.populateManagedArray(recordArray, identifiers, payload);
696
822
  return recordArray;
697
823
  });
698
824
  }
699
825
  function assertSingleResourceDocument(payload) {
700
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
826
+ (test => {
701
827
  if (!test) {
702
828
  throw new Error(`Expected the primary data returned by the serializer for a 'queryRecord' response to be a single object or null but instead it was an array.`);
703
829
  }
704
- })(!Array.isArray(payload.data)) : {};
830
+ })(!Array.isArray(payload.data));
705
831
  }
706
832
  function queryRecord(context) {
707
833
  const {
@@ -715,16 +841,16 @@ function queryRecord(context) {
715
841
  options
716
842
  } = data;
717
843
  const adapter = store.adapterFor(type);
718
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
844
+ (test => {
719
845
  if (!test) {
720
846
  throw new Error(`You tried to make a query but you have no adapter (for ${type})`);
721
847
  }
722
- })(adapter) : {};
723
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
848
+ })(adapter);
849
+ (test => {
724
850
  if (!test) {
725
851
  throw new Error(`You tried to make a query but your adapter does not implement 'queryRecord'`);
726
852
  }
727
- })(typeof adapter.queryRecord === 'function') : {};
853
+ })(typeof adapter.queryRecord === 'function');
728
854
  const schema = store.modelFor(type);
729
855
  const promise = Promise.resolve().then(() => adapter.queryRecord(store, schema, query, options));
730
856
  return promise.then(adapterPayload => {
@@ -763,21 +889,21 @@ function queryRecord(context) {
763
889
  */
764
890
 
765
891
  function adapterFor(modelName, _allowMissing) {
766
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
892
+ (test => {
767
893
  if (!test) {
768
894
  throw new Error(`Attempted to call store.adapterFor(), but the store instance has already been destroyed.`);
769
895
  }
770
- })(!(this.isDestroying || this.isDestroyed)) : {};
771
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
896
+ })(!(this.isDestroying || this.isDestroyed));
897
+ (test => {
772
898
  if (!test) {
773
899
  throw new Error(`You need to pass a model name to the store's adapterFor method`);
774
900
  }
775
- })(modelName) : {};
776
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
901
+ })(modelName);
902
+ (test => {
777
903
  if (!test) {
778
904
  throw new Error(`Passing classes to store.adapterFor has been removed. Please pass a dasherized string instead of ${modelName}`);
779
905
  }
780
- })(typeof modelName === 'string') : {};
906
+ })(typeof modelName === 'string');
781
907
  this._adapterCache = this._adapterCache || Object.create(null);
782
908
  const normalizedModelName = _deprecatingNormalize(modelName);
783
909
  const {
@@ -803,11 +929,11 @@ function adapterFor(modelName, _allowMissing) {
803
929
  _adapterCache.application = adapter;
804
930
  return adapter;
805
931
  }
806
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
932
+ (test => {
807
933
  if (!test) {
808
934
  throw new Error(`No adapter was found for '${modelName}' and no 'application' adapter was found as a fallback.`);
809
935
  }
810
- })(_allowMissing) : {};
936
+ })(_allowMissing);
811
937
  }
812
938
 
813
939
  /**
@@ -826,21 +952,21 @@ function adapterFor(modelName, _allowMissing) {
826
952
  @param modelName the record to serialize
827
953
  */
828
954
  function serializerFor(modelName) {
829
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
955
+ (test => {
830
956
  if (!test) {
831
957
  throw new Error(`Attempted to call store.serializerFor(), but the store instance has already been destroyed.`);
832
958
  }
833
- })(!(this.isDestroying || this.isDestroyed)) : {};
834
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
959
+ })(!(this.isDestroying || this.isDestroyed));
960
+ (test => {
835
961
  if (!test) {
836
962
  throw new Error(`You need to pass a model name to the store's serializerFor method`);
837
963
  }
838
- })(modelName) : {};
839
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
964
+ })(modelName);
965
+ (test => {
840
966
  if (!test) {
841
967
  throw new Error(`Passing classes to store.serializerFor has been removed. Please pass a dasherized string instead of ${modelName}`);
842
968
  }
843
- })(typeof modelName === 'string') : {};
969
+ })(typeof modelName === 'string');
844
970
  this._serializerCache = this._serializerCache || Object.create(null);
845
971
  const normalizedModelName = _deprecatingNormalize(modelName);
846
972
  const {
@@ -895,29 +1021,29 @@ function serializerFor(modelName) {
895
1021
  */
896
1022
  // TODO @runspired @deprecate users should call normalize on the associated serializer directly
897
1023
  function normalize(modelName, payload) {
898
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
1024
+ (test => {
899
1025
  if (!test) {
900
1026
  throw new Error(`Attempted to call store.normalize(), but the store instance has already been destroyed.`);
901
1027
  }
902
- })(!(this.isDestroying || this.isDestroyed)) : {};
903
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
1028
+ })(!(this.isDestroying || this.isDestroyed));
1029
+ (test => {
904
1030
  if (!test) {
905
1031
  throw new Error(`You need to pass a model name to the store's normalize method`);
906
1032
  }
907
- })(modelName) : {};
908
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
1033
+ })(modelName);
1034
+ (test => {
909
1035
  if (!test) {
910
1036
  throw new Error(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${typeof modelName}`);
911
1037
  }
912
- })(typeof modelName === 'string') : {};
1038
+ })(typeof modelName === 'string');
913
1039
  const normalizedModelName = _deprecatingNormalize(modelName);
914
1040
  const serializer = this.serializerFor(normalizedModelName);
915
1041
  const schema = this.modelFor(normalizedModelName);
916
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
1042
+ (test => {
917
1043
  if (!test) {
918
1044
  throw new Error(`You must define a normalize method in your serializer in order to call store.normalize`);
919
1045
  }
920
- })(typeof serializer?.normalize === 'function') : {};
1046
+ })(typeof serializer?.normalize === 'function');
921
1047
  return serializer.normalize(schema, payload);
922
1048
  }
923
1049
 
@@ -978,19 +1104,19 @@ function normalize(modelName, payload) {
978
1104
  */
979
1105
  // TODO @runspired @deprecate pushPayload in favor of looking up the serializer
980
1106
  function pushPayload(modelName, inputPayload) {
981
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
1107
+ (test => {
982
1108
  if (!test) {
983
1109
  throw new Error(`Attempted to call store.pushPayload(), but the store instance has already been destroyed.`);
984
1110
  }
985
- })(!(this.isDestroying || this.isDestroyed)) : {};
1111
+ })(!(this.isDestroying || this.isDestroyed));
986
1112
  const payload = inputPayload || modelName;
987
1113
  const normalizedModelName = inputPayload ? _deprecatingNormalize(modelName) : 'application';
988
1114
  const serializer = this.serializerFor(normalizedModelName);
989
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
1115
+ (test => {
990
1116
  if (!test) {
991
1117
  throw new Error(`You cannot use 'store.pushPayload(<type>, <payload>)' unless the serializer for '${normalizedModelName}' defines 'pushPayload'`);
992
1118
  }
993
- })(serializer && typeof serializer.pushPayload === 'function') : {};
1119
+ })(serializer && typeof serializer.pushPayload === 'function');
994
1120
  serializer.pushPayload(this, payload);
995
1121
  }
996
1122