@enbox/dwn-sdk-js 0.0.5 → 0.0.7

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 (363) hide show
  1. package/dist/browser.mjs +8 -8
  2. package/dist/browser.mjs.map +4 -4
  3. package/dist/esm/generated/precompiled-validators.js +1 -2
  4. package/dist/esm/generated/precompiled-validators.js.map +1 -1
  5. package/dist/esm/src/core/abstract-message.js +4 -0
  6. package/dist/esm/src/core/abstract-message.js.map +1 -1
  7. package/dist/esm/src/core/auth.js +22 -33
  8. package/dist/esm/src/core/auth.js.map +1 -1
  9. package/dist/esm/src/core/dwn-constant.js +7 -7
  10. package/dist/esm/src/core/dwn-constant.js.map +1 -1
  11. package/dist/esm/src/core/dwn-error.js +1 -0
  12. package/dist/esm/src/core/dwn-error.js.map +1 -1
  13. package/dist/esm/src/core/grant-authorization.js +37 -52
  14. package/dist/esm/src/core/grant-authorization.js.map +1 -1
  15. package/dist/esm/src/core/message.js +85 -116
  16. package/dist/esm/src/core/message.js.map +1 -1
  17. package/dist/esm/src/core/messages-grant-authorization.js +63 -78
  18. package/dist/esm/src/core/messages-grant-authorization.js.map +1 -1
  19. package/dist/esm/src/core/protocol-authorization-action.js +266 -0
  20. package/dist/esm/src/core/protocol-authorization-action.js.map +1 -0
  21. package/dist/esm/src/core/protocol-authorization-validation.js +254 -0
  22. package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -0
  23. package/dist/esm/src/core/protocol-authorization.js +122 -740
  24. package/dist/esm/src/core/protocol-authorization.js.map +1 -1
  25. package/dist/esm/src/core/protocols-grant-authorization.js +24 -38
  26. package/dist/esm/src/core/protocols-grant-authorization.js.map +1 -1
  27. package/dist/esm/src/core/record-chain.js +64 -0
  28. package/dist/esm/src/core/record-chain.js.map +1 -0
  29. package/dist/esm/src/core/records-grant-authorization.js +55 -72
  30. package/dist/esm/src/core/records-grant-authorization.js.map +1 -1
  31. package/dist/esm/src/core/resumable-task-manager.js +50 -65
  32. package/dist/esm/src/core/resumable-task-manager.js.map +1 -1
  33. package/dist/esm/src/core/tenant-gate.js +2 -13
  34. package/dist/esm/src/core/tenant-gate.js.map +1 -1
  35. package/dist/esm/src/dwn.js +69 -86
  36. package/dist/esm/src/dwn.js.map +1 -1
  37. package/dist/esm/src/event-stream/event-emitter-stream.js +17 -31
  38. package/dist/esm/src/event-stream/event-emitter-stream.js.map +1 -1
  39. package/dist/esm/src/handlers/messages-read.js +67 -77
  40. package/dist/esm/src/handlers/messages-read.js.map +1 -1
  41. package/dist/esm/src/handlers/messages-subscribe.js +51 -61
  42. package/dist/esm/src/handlers/messages-subscribe.js.map +1 -1
  43. package/dist/esm/src/handlers/messages-sync.js +75 -85
  44. package/dist/esm/src/handlers/messages-sync.js.map +1 -1
  45. package/dist/esm/src/handlers/protocols-configure.js +135 -155
  46. package/dist/esm/src/handlers/protocols-configure.js.map +1 -1
  47. package/dist/esm/src/handlers/protocols-query.js +52 -51
  48. package/dist/esm/src/handlers/protocols-query.js.map +1 -1
  49. package/dist/esm/src/handlers/records-count.js +96 -82
  50. package/dist/esm/src/handlers/records-count.js.map +1 -1
  51. package/dist/esm/src/handlers/records-delete.js +78 -88
  52. package/dist/esm/src/handlers/records-delete.js.map +1 -1
  53. package/dist/esm/src/handlers/records-query.js +116 -101
  54. package/dist/esm/src/handlers/records-query.js.map +1 -1
  55. package/dist/esm/src/handlers/records-read.js +124 -131
  56. package/dist/esm/src/handlers/records-read.js.map +1 -1
  57. package/dist/esm/src/handlers/records-subscribe.js +150 -103
  58. package/dist/esm/src/handlers/records-subscribe.js.map +1 -1
  59. package/dist/esm/src/handlers/records-write.js +250 -259
  60. package/dist/esm/src/handlers/records-write.js.map +1 -1
  61. package/dist/esm/src/interfaces/messages-read.js +24 -32
  62. package/dist/esm/src/interfaces/messages-read.js.map +1 -1
  63. package/dist/esm/src/interfaces/messages-subscribe.js +27 -41
  64. package/dist/esm/src/interfaces/messages-subscribe.js.map +1 -1
  65. package/dist/esm/src/interfaces/messages-sync.js +26 -40
  66. package/dist/esm/src/interfaces/messages-sync.js.map +1 -1
  67. package/dist/esm/src/interfaces/protocols-configure.js +63 -63
  68. package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
  69. package/dist/esm/src/interfaces/protocols-query.js +55 -68
  70. package/dist/esm/src/interfaces/protocols-query.js.map +1 -1
  71. package/dist/esm/src/interfaces/records-count.js +50 -66
  72. package/dist/esm/src/interfaces/records-count.js.map +1 -1
  73. package/dist/esm/src/interfaces/records-delete.js +45 -55
  74. package/dist/esm/src/interfaces/records-delete.js.map +1 -1
  75. package/dist/esm/src/interfaces/records-query.js +60 -76
  76. package/dist/esm/src/interfaces/records-query.js.map +1 -1
  77. package/dist/esm/src/interfaces/records-read.js +51 -67
  78. package/dist/esm/src/interfaces/records-read.js.map +1 -1
  79. package/dist/esm/src/interfaces/records-subscribe.js +52 -68
  80. package/dist/esm/src/interfaces/records-subscribe.js.map +1 -1
  81. package/dist/esm/src/interfaces/records-write-query.js +102 -0
  82. package/dist/esm/src/interfaces/records-write-query.js.map +1 -0
  83. package/dist/esm/src/interfaces/records-write-signing.js +92 -0
  84. package/dist/esm/src/interfaces/records-write-signing.js.map +1 -0
  85. package/dist/esm/src/interfaces/records-write.js +407 -602
  86. package/dist/esm/src/interfaces/records-write.js.map +1 -1
  87. package/dist/esm/src/jose/algorithms/signing/ed25519.js +10 -19
  88. package/dist/esm/src/jose/algorithms/signing/ed25519.js.map +1 -1
  89. package/dist/esm/src/jose/jws/general/builder.js +23 -35
  90. package/dist/esm/src/jose/jws/general/builder.js.map +1 -1
  91. package/dist/esm/src/jose/jws/general/verifier.js +56 -69
  92. package/dist/esm/src/jose/jws/general/verifier.js.map +1 -1
  93. package/dist/esm/src/protocols/permission-grant.js +44 -15
  94. package/dist/esm/src/protocols/permission-grant.js.map +1 -1
  95. package/dist/esm/src/protocols/permission-request.js +29 -15
  96. package/dist/esm/src/protocols/permission-request.js.map +1 -1
  97. package/dist/esm/src/protocols/permissions.js +216 -226
  98. package/dist/esm/src/protocols/permissions.js.map +1 -1
  99. package/dist/esm/src/smt/smt-store-level.js +42 -64
  100. package/dist/esm/src/smt/smt-store-level.js.map +1 -1
  101. package/dist/esm/src/smt/smt-store-memory.js +19 -45
  102. package/dist/esm/src/smt/smt-store-memory.js.map +1 -1
  103. package/dist/esm/src/smt/smt-utils.js +28 -45
  104. package/dist/esm/src/smt/smt-utils.js.map +1 -1
  105. package/dist/esm/src/smt/sparse-merkle-tree.js +426 -471
  106. package/dist/esm/src/smt/sparse-merkle-tree.js.map +1 -1
  107. package/dist/esm/src/state-index/state-index-level.js +115 -150
  108. package/dist/esm/src/state-index/state-index-level.js.map +1 -1
  109. package/dist/esm/src/store/blockstore-level.js +54 -156
  110. package/dist/esm/src/store/blockstore-level.js.map +1 -1
  111. package/dist/esm/src/store/blockstore-mock.js +48 -153
  112. package/dist/esm/src/store/blockstore-mock.js.map +1 -1
  113. package/dist/esm/src/store/data-store-level.js +59 -99
  114. package/dist/esm/src/store/data-store-level.js.map +1 -1
  115. package/dist/esm/src/store/index-level-compound.js +246 -0
  116. package/dist/esm/src/store/index-level-compound.js.map +1 -0
  117. package/dist/esm/src/store/index-level.js +295 -713
  118. package/dist/esm/src/store/index-level.js.map +1 -1
  119. package/dist/esm/src/store/level-wrapper.js +143 -244
  120. package/dist/esm/src/store/level-wrapper.js.map +1 -1
  121. package/dist/esm/src/store/message-store-level.js +71 -94
  122. package/dist/esm/src/store/message-store-level.js.map +1 -1
  123. package/dist/esm/src/store/resumable-task-store-level.js +62 -101
  124. package/dist/esm/src/store/resumable-task-store-level.js.map +1 -1
  125. package/dist/esm/src/store/storage-controller.js +129 -144
  126. package/dist/esm/src/store/storage-controller.js.map +1 -1
  127. package/dist/esm/src/utils/abort.js +8 -19
  128. package/dist/esm/src/utils/abort.js.map +1 -1
  129. package/dist/esm/src/utils/array.js +15 -49
  130. package/dist/esm/src/utils/array.js.map +1 -1
  131. package/dist/esm/src/utils/cid.js +29 -77
  132. package/dist/esm/src/utils/cid.js.map +1 -1
  133. package/dist/esm/src/utils/data-stream.js +37 -65
  134. package/dist/esm/src/utils/data-stream.js.map +1 -1
  135. package/dist/esm/src/utils/encryption.js +136 -162
  136. package/dist/esm/src/utils/encryption.js.map +1 -1
  137. package/dist/esm/src/utils/filter.js +1 -12
  138. package/dist/esm/src/utils/filter.js.map +1 -1
  139. package/dist/esm/src/utils/hd-key.js +45 -63
  140. package/dist/esm/src/utils/hd-key.js.map +1 -1
  141. package/dist/esm/src/utils/jws.js +9 -20
  142. package/dist/esm/src/utils/jws.js.map +1 -1
  143. package/dist/esm/src/utils/memory-cache.js +12 -23
  144. package/dist/esm/src/utils/memory-cache.js.map +1 -1
  145. package/dist/esm/src/utils/messages.js +9 -3
  146. package/dist/esm/src/utils/messages.js.map +1 -1
  147. package/dist/esm/src/utils/private-key-signer.js +9 -17
  148. package/dist/esm/src/utils/private-key-signer.js.map +1 -1
  149. package/dist/esm/src/utils/protocols.js +62 -70
  150. package/dist/esm/src/utils/protocols.js.map +1 -1
  151. package/dist/esm/src/utils/records.js +108 -140
  152. package/dist/esm/src/utils/records.js.map +1 -1
  153. package/dist/esm/src/utils/secp256k1.js +60 -96
  154. package/dist/esm/src/utils/secp256k1.js.map +1 -1
  155. package/dist/esm/src/utils/secp256r1.js +54 -71
  156. package/dist/esm/src/utils/secp256r1.js.map +1 -1
  157. package/dist/esm/src/utils/time.js +5 -18
  158. package/dist/esm/src/utils/time.js.map +1 -1
  159. package/dist/esm/src/utils/url.js +3 -3
  160. package/dist/esm/src/utils/url.js.map +1 -1
  161. package/dist/esm/tests/core/auth.spec.js +3 -12
  162. package/dist/esm/tests/core/auth.spec.js.map +1 -1
  163. package/dist/esm/tests/core/message.spec.js +50 -59
  164. package/dist/esm/tests/core/message.spec.js.map +1 -1
  165. package/dist/esm/tests/core/protocol-authorization.spec.js +9 -18
  166. package/dist/esm/tests/core/protocol-authorization.spec.js.map +1 -1
  167. package/dist/esm/tests/dwn.spec.js +45 -58
  168. package/dist/esm/tests/dwn.spec.js.map +1 -1
  169. package/dist/esm/tests/event-stream/event-emitter-stream.spec.js +24 -33
  170. package/dist/esm/tests/event-stream/event-emitter-stream.spec.js.map +1 -1
  171. package/dist/esm/tests/event-stream/event-stream.spec.js +46 -55
  172. package/dist/esm/tests/event-stream/event-stream.spec.js.map +1 -1
  173. package/dist/esm/tests/features/author-delegated-grant.spec.js +326 -343
  174. package/dist/esm/tests/features/author-delegated-grant.spec.js.map +1 -1
  175. package/dist/esm/tests/features/owner-delegated-grant.spec.js +153 -169
  176. package/dist/esm/tests/features/owner-delegated-grant.spec.js.map +1 -1
  177. package/dist/esm/tests/features/owner-signature.spec.js +67 -78
  178. package/dist/esm/tests/features/owner-signature.spec.js.map +1 -1
  179. package/dist/esm/tests/features/permissions.spec.js +446 -181
  180. package/dist/esm/tests/features/permissions.spec.js.map +1 -1
  181. package/dist/esm/tests/features/protocol-composition.spec.js +346 -356
  182. package/dist/esm/tests/features/protocol-composition.spec.js.map +1 -1
  183. package/dist/esm/tests/features/protocol-create-action.spec.js +42 -51
  184. package/dist/esm/tests/features/protocol-create-action.spec.js.map +1 -1
  185. package/dist/esm/tests/features/protocol-delete-action.spec.js +94 -103
  186. package/dist/esm/tests/features/protocol-delete-action.spec.js.map +1 -1
  187. package/dist/esm/tests/features/protocol-update-action.spec.js +105 -114
  188. package/dist/esm/tests/features/protocol-update-action.spec.js.map +1 -1
  189. package/dist/esm/tests/features/records-prune.spec.js +175 -191
  190. package/dist/esm/tests/features/records-prune.spec.js.map +1 -1
  191. package/dist/esm/tests/features/records-tags.spec.js +441 -460
  192. package/dist/esm/tests/features/records-tags.spec.js.map +1 -1
  193. package/dist/esm/tests/features/resumable-tasks.spec.js +82 -91
  194. package/dist/esm/tests/features/resumable-tasks.spec.js.map +1 -1
  195. package/dist/esm/tests/handlers/messages-read.spec.js +206 -207
  196. package/dist/esm/tests/handlers/messages-read.spec.js.map +1 -1
  197. package/dist/esm/tests/handlers/messages-subscribe.spec.js +145 -154
  198. package/dist/esm/tests/handlers/messages-subscribe.spec.js.map +1 -1
  199. package/dist/esm/tests/handlers/messages-sync.spec.js +174 -183
  200. package/dist/esm/tests/handlers/messages-sync.spec.js.map +1 -1
  201. package/dist/esm/tests/handlers/protocols-configure.spec.js +244 -238
  202. package/dist/esm/tests/handlers/protocols-configure.spec.js.map +1 -1
  203. package/dist/esm/tests/handlers/protocols-query.spec.js +156 -169
  204. package/dist/esm/tests/handlers/protocols-query.spec.js.map +1 -1
  205. package/dist/esm/tests/handlers/records-count.spec.js +93 -102
  206. package/dist/esm/tests/handlers/records-count.spec.js.map +1 -1
  207. package/dist/esm/tests/handlers/records-delete.spec.js +252 -264
  208. package/dist/esm/tests/handlers/records-delete.spec.js.map +1 -1
  209. package/dist/esm/tests/handlers/records-query.spec.js +917 -988
  210. package/dist/esm/tests/handlers/records-query.spec.js.map +1 -1
  211. package/dist/esm/tests/handlers/records-read.spec.js +553 -568
  212. package/dist/esm/tests/handlers/records-read.spec.js.map +1 -1
  213. package/dist/esm/tests/handlers/records-subscribe.spec.js +269 -278
  214. package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
  215. package/dist/esm/tests/handlers/records-write.spec.js +1057 -1082
  216. package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
  217. package/dist/esm/tests/interfaces/messages-get.spec.js +39 -48
  218. package/dist/esm/tests/interfaces/messages-get.spec.js.map +1 -1
  219. package/dist/esm/tests/interfaces/messages-subscribe.spec.js +4 -13
  220. package/dist/esm/tests/interfaces/messages-subscribe.spec.js.map +1 -1
  221. package/dist/esm/tests/interfaces/protocols-configure.spec.js +212 -88
  222. package/dist/esm/tests/interfaces/protocols-configure.spec.js.map +1 -1
  223. package/dist/esm/tests/interfaces/protocols-query.spec.js +8 -17
  224. package/dist/esm/tests/interfaces/protocols-query.spec.js.map +1 -1
  225. package/dist/esm/tests/interfaces/records-delete.spec.js +8 -17
  226. package/dist/esm/tests/interfaces/records-delete.spec.js.map +1 -1
  227. package/dist/esm/tests/interfaces/records-query.spec.js +20 -29
  228. package/dist/esm/tests/interfaces/records-query.spec.js.map +1 -1
  229. package/dist/esm/tests/interfaces/records-read.spec.js +42 -51
  230. package/dist/esm/tests/interfaces/records-read.spec.js.map +1 -1
  231. package/dist/esm/tests/interfaces/records-subscribe.spec.js +16 -25
  232. package/dist/esm/tests/interfaces/records-subscribe.spec.js.map +1 -1
  233. package/dist/esm/tests/interfaces/records-write.spec.js +152 -165
  234. package/dist/esm/tests/interfaces/records-write.spec.js.map +1 -1
  235. package/dist/esm/tests/jose/jws/general.spec.js +36 -45
  236. package/dist/esm/tests/jose/jws/general.spec.js.map +1 -1
  237. package/dist/esm/tests/protocols/permission-grant.spec.js +44 -50
  238. package/dist/esm/tests/protocols/permission-grant.spec.js.map +1 -1
  239. package/dist/esm/tests/protocols/permission-request.spec.js +23 -32
  240. package/dist/esm/tests/protocols/permission-request.spec.js.map +1 -1
  241. package/dist/esm/tests/protocols/permissions.spec.js +49 -55
  242. package/dist/esm/tests/protocols/permissions.spec.js.map +1 -1
  243. package/dist/esm/tests/scenarios/aggregator.spec.js +124 -135
  244. package/dist/esm/tests/scenarios/aggregator.spec.js.map +1 -1
  245. package/dist/esm/tests/scenarios/deleted-record.spec.js +23 -32
  246. package/dist/esm/tests/scenarios/deleted-record.spec.js.map +1 -1
  247. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js +52 -61
  248. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js.map +1 -1
  249. package/dist/esm/tests/scenarios/nested-roles.spec.js +63 -73
  250. package/dist/esm/tests/scenarios/nested-roles.spec.js.map +1 -1
  251. package/dist/esm/tests/scenarios/subscriptions.spec.js +377 -333
  252. package/dist/esm/tests/scenarios/subscriptions.spec.js.map +1 -1
  253. package/dist/esm/tests/smt/smt-store-level.spec.js +76 -87
  254. package/dist/esm/tests/smt/smt-store-level.spec.js.map +1 -1
  255. package/dist/esm/tests/smt/sparse-merkle-tree.spec.js +344 -353
  256. package/dist/esm/tests/smt/sparse-merkle-tree.spec.js.map +1 -1
  257. package/dist/esm/tests/state-index/state-index-level.spec.js +117 -126
  258. package/dist/esm/tests/state-index/state-index-level.spec.js.map +1 -1
  259. package/dist/esm/tests/store/blockstore-level.spec.js +44 -99
  260. package/dist/esm/tests/store/blockstore-level.spec.js.map +1 -1
  261. package/dist/esm/tests/store/blockstore-mock.spec.js +40 -120
  262. package/dist/esm/tests/store/blockstore-mock.spec.js.map +1 -1
  263. package/dist/esm/tests/store/data-store-level.spec.js +86 -95
  264. package/dist/esm/tests/store/data-store-level.spec.js.map +1 -1
  265. package/dist/esm/tests/store/index-level.spec.js +404 -414
  266. package/dist/esm/tests/store/index-level.spec.js.map +1 -1
  267. package/dist/esm/tests/store/message-store-level.spec.js +13 -22
  268. package/dist/esm/tests/store/message-store-level.spec.js.map +1 -1
  269. package/dist/esm/tests/store/message-store.spec.js +229 -238
  270. package/dist/esm/tests/store/message-store.spec.js.map +1 -1
  271. package/dist/esm/tests/test-event-stream.js +3 -3
  272. package/dist/esm/tests/test-event-stream.js.map +1 -1
  273. package/dist/esm/tests/test-stores.js +16 -13
  274. package/dist/esm/tests/test-stores.js.map +1 -1
  275. package/dist/esm/tests/test-suite.js +2 -11
  276. package/dist/esm/tests/test-suite.js.map +1 -1
  277. package/dist/esm/tests/utils/cid.spec.js +24 -33
  278. package/dist/esm/tests/utils/cid.spec.js.map +1 -1
  279. package/dist/esm/tests/utils/data-stream.spec.js +48 -57
  280. package/dist/esm/tests/utils/data-stream.spec.js.map +1 -1
  281. package/dist/esm/tests/utils/encryption-callbacks.spec.js +45 -54
  282. package/dist/esm/tests/utils/encryption-callbacks.spec.js.map +1 -1
  283. package/dist/esm/tests/utils/encryption.spec.js +291 -44
  284. package/dist/esm/tests/utils/encryption.spec.js.map +1 -1
  285. package/dist/esm/tests/utils/filters.spec.js +46 -55
  286. package/dist/esm/tests/utils/filters.spec.js.map +1 -1
  287. package/dist/esm/tests/utils/hd-key.spec.js +10 -19
  288. package/dist/esm/tests/utils/hd-key.spec.js.map +1 -1
  289. package/dist/esm/tests/utils/jws.spec.js +3 -12
  290. package/dist/esm/tests/utils/jws.spec.js.map +1 -1
  291. package/dist/esm/tests/utils/memory-cache.spec.js +9 -18
  292. package/dist/esm/tests/utils/memory-cache.spec.js.map +1 -1
  293. package/dist/esm/tests/utils/messages.spec.js +6 -15
  294. package/dist/esm/tests/utils/messages.spec.js.map +1 -1
  295. package/dist/esm/tests/utils/poller.js +22 -33
  296. package/dist/esm/tests/utils/poller.js.map +1 -1
  297. package/dist/esm/tests/utils/private-key-signer.spec.js +15 -24
  298. package/dist/esm/tests/utils/private-key-signer.spec.js.map +1 -1
  299. package/dist/esm/tests/utils/records.spec.js +10 -19
  300. package/dist/esm/tests/utils/records.spec.js.map +1 -1
  301. package/dist/esm/tests/utils/secp256k1.spec.js +16 -25
  302. package/dist/esm/tests/utils/secp256k1.spec.js.map +1 -1
  303. package/dist/esm/tests/utils/secp256r1.spec.js +18 -27
  304. package/dist/esm/tests/utils/secp256r1.spec.js.map +1 -1
  305. package/dist/esm/tests/utils/test-data-generator.js +414 -468
  306. package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
  307. package/dist/esm/tests/validation/json-schemas/definitions.spec.js +2 -11
  308. package/dist/esm/tests/validation/json-schemas/definitions.spec.js.map +1 -1
  309. package/dist/esm/tests/validation/json-schemas/jwk/general-jwk.spec.js +4 -13
  310. package/dist/esm/tests/validation/json-schemas/jwk/general-jwk.spec.js.map +1 -1
  311. package/dist/esm/tests/validation/json-schemas/jwk/public-jwk.spec.js +8 -17
  312. package/dist/esm/tests/validation/json-schemas/jwk/public-jwk.spec.js.map +1 -1
  313. package/dist/esm/tests/validation/json-schemas/jwk-verification-method.spec.js +3 -12
  314. package/dist/esm/tests/validation/json-schemas/jwk-verification-method.spec.js.map +1 -1
  315. package/dist/esm/tests/validation/json-schemas/protocols/protocols-configure.spec.js +4 -13
  316. package/dist/esm/tests/validation/json-schemas/protocols/protocols-configure.spec.js.map +1 -1
  317. package/dist/esm/tests/validation/json-schemas/records/records-query.spec.js +2 -11
  318. package/dist/esm/tests/validation/json-schemas/records/records-query.spec.js.map +1 -1
  319. package/dist/esm/tests/validation/json-schemas/records/records-read.spec.js +2 -11
  320. package/dist/esm/tests/validation/json-schemas/records/records-read.spec.js.map +1 -1
  321. package/dist/esm/tests/validation/json-schemas/records/records-write.spec.js +7 -16
  322. package/dist/esm/tests/validation/json-schemas/records/records-write.spec.js.map +1 -1
  323. package/dist/types/src/core/protocol-authorization-action.d.ts +42 -0
  324. package/dist/types/src/core/protocol-authorization-action.d.ts.map +1 -0
  325. package/dist/types/src/core/protocol-authorization-validation.d.ts +60 -0
  326. package/dist/types/src/core/protocol-authorization-validation.d.ts.map +1 -0
  327. package/dist/types/src/core/protocol-authorization.d.ts +10 -100
  328. package/dist/types/src/core/protocol-authorization.d.ts.map +1 -1
  329. package/dist/types/src/core/record-chain.d.ts +24 -0
  330. package/dist/types/src/core/record-chain.d.ts.map +1 -0
  331. package/dist/types/src/handlers/records-write.d.ts +2 -1
  332. package/dist/types/src/handlers/records-write.d.ts.map +1 -1
  333. package/dist/types/src/interfaces/protocols-configure.d.ts.map +1 -1
  334. package/dist/types/src/interfaces/records-write-query.d.ts +33 -0
  335. package/dist/types/src/interfaces/records-write-query.d.ts.map +1 -0
  336. package/dist/types/src/interfaces/records-write-signing.d.ts +35 -0
  337. package/dist/types/src/interfaces/records-write-signing.d.ts.map +1 -0
  338. package/dist/types/src/interfaces/records-write.d.ts +10 -44
  339. package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
  340. package/dist/types/src/store/index-level-compound.d.ts +70 -0
  341. package/dist/types/src/store/index-level-compound.d.ts.map +1 -0
  342. package/dist/types/src/store/index-level.d.ts +0 -58
  343. package/dist/types/src/store/index-level.d.ts.map +1 -1
  344. package/dist/types/src/utils/protocols.d.ts +5 -0
  345. package/dist/types/src/utils/protocols.d.ts.map +1 -1
  346. package/dist/types/src/utils/records.d.ts +3 -1
  347. package/dist/types/src/utils/records.d.ts.map +1 -1
  348. package/dist/types/tests/features/permissions.spec.d.ts.map +1 -1
  349. package/package.json +3 -3
  350. package/src/core/protocol-authorization-action.ts +377 -0
  351. package/src/core/protocol-authorization-validation.ts +391 -0
  352. package/src/core/protocol-authorization.ts +60 -849
  353. package/src/core/record-chain.ts +99 -0
  354. package/src/handlers/records-read.ts +1 -1
  355. package/src/handlers/records-write.ts +37 -21
  356. package/src/interfaces/protocols-configure.ts +33 -5
  357. package/src/interfaces/records-write-query.ts +139 -0
  358. package/src/interfaces/records-write-signing.ts +143 -0
  359. package/src/interfaces/records-write.ts +49 -221
  360. package/src/store/index-level-compound.ts +324 -0
  361. package/src/store/index-level.ts +24 -306
  362. package/src/utils/protocols.ts +8 -0
  363. package/src/utils/records.ts +9 -15
@@ -1,12 +1,3 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
1
  import EventEmitter from 'events';
11
2
  import minimalProtocolDefinition from '../vectors/protocol-definitions/minimal.json' with { type: 'json' };
12
3
  import sinon from 'sinon';
@@ -38,7 +29,7 @@ export function testResumableTasks() {
38
29
  ;
39
30
  // important to follow the `before` and `after` pattern to initialize and clean the stores in tests
40
31
  // so that different test suites can reuse the same backend store for testing
41
- beforeAll(() => __awaiter(this, void 0, void 0, function* () {
32
+ beforeAll(async () => {
42
33
  // suppress console.error output during tests
43
34
  consoleError = console.error;
44
35
  console.error = () => { };
@@ -49,41 +40,41 @@ export function testResumableTasks() {
49
40
  resumableTaskStore = stores.resumableTaskStore;
50
41
  stateIndex = stores.stateIndex;
51
42
  eventStream = TestEventStream.get();
52
- dwn = yield Dwn.create({ didResolver, messageStore, dataStore, stateIndex, eventStream, resumableTaskStore });
53
- }));
54
- beforeEach(() => __awaiter(this, void 0, void 0, function* () {
43
+ dwn = await Dwn.create({ didResolver, messageStore, dataStore, stateIndex, eventStream, resumableTaskStore });
44
+ });
45
+ beforeEach(async () => {
55
46
  sinon.restore(); // wipe all previous stubs/spies/mocks/fakes/clock
56
47
  clock = useFakeTimers({ shouldAdvanceTime: true }); // IMPORTANT: MUST be called AFTER `sinon.restore()` because `sinon.restore()`
57
48
  // clean up before each test rather than after so that a test does not depend on other tests to do the clean up
58
- yield messageStore.clear();
59
- yield dataStore.clear();
60
- yield resumableTaskStore.clear();
61
- yield stateIndex.clear();
62
- }));
63
- afterEach(() => __awaiter(this, void 0, void 0, function* () {
49
+ await messageStore.clear();
50
+ await dataStore.clear();
51
+ await resumableTaskStore.clear();
52
+ await stateIndex.clear();
53
+ });
54
+ afterEach(async () => {
64
55
  if (clock !== undefined) {
65
56
  clock.restore(); // IMPORTANT: MUST be called, else some clock tests the heavily rely on timers and event emitters may hang forever.
66
57
  }
67
- }));
68
- afterAll(() => __awaiter(this, void 0, void 0, function* () {
58
+ });
59
+ afterAll(async () => {
69
60
  // restore console.error
70
61
  console.error = consoleError;
71
- yield dwn.close();
72
- }));
73
- it('should resume tasks that are not completed when DWN starts', () => __awaiter(this, void 0, void 0, function* () {
62
+ await dwn.close();
63
+ });
64
+ it('should resume tasks that are not completed when DWN starts', async () => {
74
65
  // Scenario: DWN has a `RecordsDelete` task that is not completed, it should resume the task upon restart
75
66
  // 1. Write a record to DWN (for deletion later).
76
67
  // 2. Insert a resumable `RecordDelete` task into the resumable task store bypassing message handler to avoid it being processed.
77
68
  // 3. Restart the DWN to trigger the resumable task to be resumed.
78
69
  // 4. Verify that the record is deleted.
79
- const alice = yield TestDataGenerator.generateDidKeyPersona();
70
+ const alice = await TestDataGenerator.generateDidKeyPersona();
80
71
  // install a protocol to allow records to be written
81
72
  const protocolDefinition = minimalProtocolDefinition;
82
- const protocolsConfig = yield ProtocolsConfigure.create({
73
+ const protocolsConfig = await ProtocolsConfigure.create({
83
74
  definition: protocolDefinition,
84
75
  signer: Jws.createSigner(alice)
85
76
  });
86
- const protocolsConfigureReply = yield dwn.processMessage(alice.did, protocolsConfig.message);
77
+ const protocolsConfigureReply = await dwn.processMessage(alice.did, protocolsConfig.message);
87
78
  expect(protocolsConfigureReply.status.code).toBe(202);
88
79
  // 1. Write a record to DWN (for deletion later).
89
80
  const data = TestDataGenerator.randomBytes(100);
@@ -94,13 +85,13 @@ export function testResumableTasks() {
94
85
  dataFormat: 'any-data-format',
95
86
  data: data
96
87
  };
97
- const recordsWrite = yield RecordsWrite.create(messageOptions);
98
- const recordsWriteResponse = yield dwn.processMessage(alice.did, recordsWrite.message, { dataStream: DataStream.fromBytes(data) });
88
+ const recordsWrite = await RecordsWrite.create(messageOptions);
89
+ const recordsWriteResponse = await dwn.processMessage(alice.did, recordsWrite.message, { dataStream: DataStream.fromBytes(data) });
99
90
  expect(recordsWriteResponse.status.code).toBe(202);
100
91
  // 2. Insert a resumable `RecordDelete` task into the resumable task store bypassing message handler to avoid it being processed.
101
92
  // IMPORTANT!!! This is to avoid `RecordsDelete` having the same timestamp as `RecordsWrite` which causes the delete to be disgarded.
102
- yield clock.tickAsync(1);
103
- const recordsDelete = yield RecordsDelete.create({
93
+ await clock.tickAsync(1);
94
+ const recordsDelete = await RecordsDelete.create({
104
95
  recordId: recordsWrite.message.recordId,
105
96
  prune: true,
106
97
  signer: Jws.createSigner(alice)
@@ -112,24 +103,24 @@ export function testResumableTasks() {
112
103
  message: recordsDelete.message
113
104
  }
114
105
  };
115
- yield resumableTaskStore.register(resumableTask, 0); // 0 timeout to ensure it immediately times out for resuming
106
+ await resumableTaskStore.register(resumableTask, 0); // 0 timeout to ensure it immediately times out for resuming
116
107
  // sanity check that the record is still there
117
- const recordsRead = yield RecordsRead.create({
108
+ const recordsRead = await RecordsRead.create({
118
109
  signer: Jws.createSigner(alice),
119
110
  filter: { recordId: recordsWrite.message.recordId }
120
111
  });
121
- const readReply = yield dwn.processMessage(alice.did, recordsRead.message);
112
+ const readReply = await dwn.processMessage(alice.did, recordsRead.message);
122
113
  expect(readReply.status.code).toBe(200);
123
114
  expect(readReply.entry.recordsWrite).toBeDefined();
124
115
  // 3. Restart the DWN to trigger the resumable task to be resumed.
125
- yield dwn.close();
126
- yield dwn.open();
116
+ await dwn.close();
117
+ await dwn.open();
127
118
  // 4. Verify that the record is deleted.
128
- const readReply2 = yield dwn.processMessage(alice.did, recordsRead.message);
119
+ const readReply2 = await dwn.processMessage(alice.did, recordsRead.message);
129
120
  expect(readReply2.status.code).toBe(404);
130
121
  expect(readReply2.entry.recordsWrite).toBeUndefined();
131
- }));
132
- it('should only resume tasks that are timed-out up to the batch size when DWN starts', () => __awaiter(this, void 0, void 0, function* () {
122
+ });
123
+ it('should only resume tasks that are timed-out up to the batch size when DWN starts', async () => {
133
124
  // Scenario: DWN has multiple `RecordsDelete` tasks that are not completed,
134
125
  // it should grab tasks no greater than the batch size and only tasks that are timed-out.
135
126
  // 1. Set ResumableTaskManager.resumableTaskBatchSize to 2.
@@ -142,14 +133,14 @@ export function testResumableTasks() {
142
133
  // 6. Verify that 3 processed resumable tasks are deleted from resumable task store.
143
134
  // 7. Verify that only 1 record remains in the DWN.
144
135
  // 8. Set ResumableTaskManager.resumableTaskBatchSize back to original value.
145
- const alice = yield TestDataGenerator.generateDidKeyPersona();
136
+ const alice = await TestDataGenerator.generateDidKeyPersona();
146
137
  // install a protocol to allow records to be written
147
138
  const protocolDefinition = minimalProtocolDefinition;
148
- const protocolsConfig = yield ProtocolsConfigure.create({
139
+ const protocolsConfig = await ProtocolsConfigure.create({
149
140
  definition: protocolDefinition,
150
141
  signer: Jws.createSigner(alice)
151
142
  });
152
- const protocolsConfigureReply = yield dwn.processMessage(alice.did, protocolsConfig.message);
143
+ const protocolsConfigureReply = await dwn.processMessage(alice.did, protocolsConfig.message);
153
144
  expect(protocolsConfigureReply.status.code).toBe(202);
154
145
  // 1. Set ResumableTaskManager.resumableTaskBatchSize to 2.
155
146
  const originalResumableTaskBatchSize = dwn['resumableTaskManager']['resumableTaskBatchSize'];
@@ -165,8 +156,8 @@ export function testResumableTasks() {
165
156
  dataFormat: 'any-data-format',
166
157
  data: data
167
158
  };
168
- const recordsWrite = yield RecordsWrite.create(messageOptions);
169
- const recordsWriteResponse = yield dwn.processMessage(alice.did, recordsWrite.message, { dataStream: DataStream.fromBytes(data) });
159
+ const recordsWrite = await RecordsWrite.create(messageOptions);
160
+ const recordsWriteResponse = await dwn.processMessage(alice.did, recordsWrite.message, { dataStream: DataStream.fromBytes(data) });
170
161
  expect(recordsWriteResponse.status.code).toBe(202);
171
162
  recordsWrites.push(recordsWrite);
172
163
  }
@@ -174,9 +165,9 @@ export function testResumableTasks() {
174
165
  // a. 1 task that is not timed-out (currently in-flight).
175
166
  // b. 3 tasks that are already timed-out.
176
167
  // IMPORTANT!!! This is to avoid `RecordsDelete` having the same timestamp as `RecordsWrite` which causes the delete to be discarded.
177
- yield clock.tickAsync(1);
168
+ await clock.tickAsync(1);
178
169
  for (let i = 0; i < 4; i++) {
179
- const recordsDelete = yield RecordsDelete.create({
170
+ const recordsDelete = await RecordsDelete.create({
180
171
  recordId: recordsWrites[i].message.recordId,
181
172
  prune: true,
182
173
  signer: Jws.createSigner(alice)
@@ -188,46 +179,46 @@ export function testResumableTasks() {
188
179
  message: recordsDelete.message
189
180
  }
190
181
  };
191
- yield resumableTaskStore.register(resumableTask, i === 0 ? 1000 : 0); // 1000 second timeout for the first task, 0 timeout for the rest
182
+ await resumableTaskStore.register(resumableTask, i === 0 ? 1000 : 0); // 1000 second timeout for the first task, 0 timeout for the rest
192
183
  }
193
184
  // 4. Restart the DWN to trigger the resumable task to be resumed.
194
185
  const grabSpy = sinon.spy(resumableTaskStore, 'grab');
195
- yield dwn.close();
196
- yield dwn.open();
186
+ await dwn.close();
187
+ await dwn.open();
197
188
  // 5. Verify tasks were resumed in 2 batches (2 calls of `ResumableTaskStore.grab()`).
198
189
  expect(grabSpy.calledThrice).toBe(true);
199
- const resumeTaskBatch1 = yield grabSpy.firstCall.returnValue;
200
- const resumeTaskBatch2 = yield grabSpy.secondCall.returnValue;
201
- const resumeTaskBatch3 = yield grabSpy.thirdCall.returnValue;
190
+ const resumeTaskBatch1 = await grabSpy.firstCall.returnValue;
191
+ const resumeTaskBatch2 = await grabSpy.secondCall.returnValue;
192
+ const resumeTaskBatch3 = await grabSpy.thirdCall.returnValue;
202
193
  expect(resumeTaskBatch1.length).toBe(2);
203
194
  expect(resumeTaskBatch2.length).toBe(1);
204
195
  expect(resumeTaskBatch3.length).toBe(0);
205
196
  // 6. Verify that 3 processed resumable tasks are deleted from resumable task store.
206
197
  const [task2, task3] = resumeTaskBatch1;
207
198
  const [task4] = resumeTaskBatch2;
208
- expect(yield resumableTaskStore.read(task2.id)).toBeUndefined();
209
- expect(yield resumableTaskStore.read(task3.id)).toBeUndefined();
210
- expect(yield resumableTaskStore.read(task4.id)).toBeUndefined();
199
+ expect(await resumableTaskStore.read(task2.id)).toBeUndefined();
200
+ expect(await resumableTaskStore.read(task3.id)).toBeUndefined();
201
+ expect(await resumableTaskStore.read(task4.id)).toBeUndefined();
211
202
  // 7. Verify that only 1 record remains in the DWN.
212
- const recordsQuery = yield RecordsQuery.create({
203
+ const recordsQuery = await RecordsQuery.create({
213
204
  signer: Jws.createSigner(alice),
214
205
  filter: { protocol: protocolDefinition.protocol }
215
206
  });
216
- const recordsQueryResponse = yield dwn.processMessage(alice.did, recordsQuery.message);
207
+ const recordsQueryResponse = await dwn.processMessage(alice.did, recordsQuery.message);
217
208
  expect(recordsQueryResponse.status.code).toBe(200);
218
209
  expect(recordsQueryResponse.entries).toHaveLength(1);
219
210
  expect(recordsQueryResponse.entries[0].recordId).toBe(recordsWrites[0].message.recordId);
220
211
  // 8. Set ResumableTaskManager.resumableTaskBatchSize back to original value.
221
212
  dwn['resumableTaskManager']['resumableTaskBatchSize'] = originalResumableTaskBatchSize;
222
- }));
223
- it('should continue to retry tasks that throw exceptions until success when DWN starts', () => __awaiter(this, void 0, void 0, function* () {
213
+ });
214
+ it('should continue to retry tasks that throw exceptions until success when DWN starts', async () => {
224
215
  // Scenario:
225
216
  // 1. Insert a 1 resumable `RecordDelete` task into the resumable task store bypassing message handler to avoid it being processed.
226
217
  // 2. Restart the DWN to trigger the resumable task to be resumed, force the task to throw an exception on the first attempt.
227
218
  // 3. Verify the task is retried until it succeeds.
228
- const alice = yield TestDataGenerator.generateDidKeyPersona();
219
+ const alice = await TestDataGenerator.generateDidKeyPersona();
229
220
  // 1. Insert a 1 resumable `RecordDelete` task into the resumable task store bypassing message handler to avoid it being processed.
230
- const recordsDelete = yield RecordsDelete.create({
221
+ const recordsDelete = await RecordsDelete.create({
231
222
  recordId: 'non-existent-record-id', // opportunistically testing non-existent record delete path
232
223
  prune: true,
233
224
  signer: Jws.createSigner(alice)
@@ -239,23 +230,23 @@ export function testResumableTasks() {
239
230
  message: recordsDelete.message
240
231
  }
241
232
  };
242
- yield resumableTaskStore.register(resumableTask, 0); // 0 timeout to ensure it immediately times out for resuming
233
+ await resumableTaskStore.register(resumableTask, 0); // 0 timeout to ensure it immediately times out for resuming
243
234
  // 2. Restart the DWN to trigger the resumable task to be resumed, force the task to throw an exception on the first attempt.
244
235
  const originalPerformRecordsDelete = dwn['storageController']['performRecordsDelete'].bind(dwn['storageController']);
245
236
  let attemptCount = 0;
246
- sinon.stub(dwn['storageController'], 'performRecordsDelete').callsFake((input) => __awaiter(this, void 0, void 0, function* () {
237
+ sinon.stub(dwn['storageController'], 'performRecordsDelete').callsFake(async (input) => {
247
238
  attemptCount++;
248
239
  if (attemptCount === 1) {
249
240
  throw new Error('This is fine, we deliberately force an error in the first attempt in this test.');
250
241
  }
251
- yield originalPerformRecordsDelete(input);
252
- }));
253
- yield dwn.close();
254
- yield dwn.open();
242
+ await originalPerformRecordsDelete(input);
243
+ });
244
+ await dwn.close();
245
+ await dwn.open();
255
246
  // 3. Verify the task is retried until it succeeds.
256
247
  expect(attemptCount).toBe(2);
257
- }));
258
- it('should extend long running tasks automatically to prevent it from timing out', () => __awaiter(this, void 0, void 0, function* () {
248
+ });
249
+ it('should extend long running tasks automatically to prevent it from timing out', async () => {
259
250
  // Scenario: DWN is executing a long running `RecordsDelete`, it extends the timeout automatically to prevent it from timing out
260
251
  // 1. Mock code to never complete the `RecordsDelete` until given a signal to complete.
261
252
  // 2. Write a record to DWN.
@@ -264,23 +255,23 @@ export function testResumableTasks() {
264
255
  // 5. Signal the mocked code to complete the `RecordsDelete`.
265
256
  // 6. Verify that automatic timeout extension loop is cleared.
266
257
  // 7. Verify that the resumable task is deleted.
267
- const alice = yield TestDataGenerator.generateDidKeyPersona();
258
+ const alice = await TestDataGenerator.generateDidKeyPersona();
268
259
  // install a protocol to allow records to be written
269
260
  const protocolDefinition = minimalProtocolDefinition;
270
- const protocolsConfig = yield ProtocolsConfigure.create({
261
+ const protocolsConfig = await ProtocolsConfigure.create({
271
262
  definition: protocolDefinition,
272
263
  signer: Jws.createSigner(alice)
273
264
  });
274
- const protocolsConfigureReply = yield dwn.processMessage(alice.did, protocolsConfig.message);
265
+ const protocolsConfigureReply = await dwn.processMessage(alice.did, protocolsConfig.message);
275
266
  expect(protocolsConfigureReply.status.code).toBe(202);
276
267
  // 1. Mock code to never complete the `RecordsDelete` until given a signal to complete.
277
268
  const completeDeleteSignal = new EventEmitter();
278
269
  const completeDeletePromise = new Promise((resolve) => {
279
270
  completeDeleteSignal.once('complete-delete', resolve);
280
271
  });
281
- sinon.stub(dwn['storageController'], 'performRecordsDelete').callsFake(() => __awaiter(this, void 0, void 0, function* () {
282
- yield completeDeletePromise;
283
- }));
272
+ sinon.stub(dwn['storageController'], 'performRecordsDelete').callsFake(async () => {
273
+ await completeDeletePromise;
274
+ });
284
275
  // 2. Write a record to DWN.
285
276
  const data = TestDataGenerator.randomBytes(100);
286
277
  const messageOptions = {
@@ -290,15 +281,15 @@ export function testResumableTasks() {
290
281
  dataFormat: 'any-data-format',
291
282
  data: data
292
283
  };
293
- const recordsWrite = yield RecordsWrite.create(messageOptions);
294
- const recordsWriteResponse = yield dwn.processMessage(alice.did, recordsWrite.message, { dataStream: DataStream.fromBytes(data) });
284
+ const recordsWrite = await RecordsWrite.create(messageOptions);
285
+ const recordsWriteResponse = await dwn.processMessage(alice.did, recordsWrite.message, { dataStream: DataStream.fromBytes(data) });
295
286
  expect(recordsWriteResponse.status.code).toBe(202);
296
287
  // 3. Submit a `RecordsDelete` without awaiting on its completion.
297
288
  const resumableTaskRegisterSpy = sinon.spy(resumableTaskStore, 'register');
298
289
  const clearTimeoutExtensionTimerSpy = sinon.spy(ResumableTaskManager, 'clearTimeoutExtensionTimer');
299
290
  // IMPORTANT!!! This is to avoid `RecordsDelete` having the same timestamp as `RecordsWrite` which causes the delete to be discarded.
300
- yield clock.tickAsync(1);
301
- const recordsDelete = yield RecordsDelete.create({
291
+ await clock.tickAsync(1);
292
+ const recordsDelete = await RecordsDelete.create({
302
293
  recordId: recordsWrite.message.recordId,
303
294
  prune: true,
304
295
  signer: Jws.createSigner(alice)
@@ -306,7 +297,7 @@ export function testResumableTasks() {
306
297
  let isDeleteComplete = false;
307
298
  const recordsDeletePromise = dwn.processMessage(alice.did, recordsDelete.message).then(() => isDeleteComplete = true);
308
299
  // wait until the resumable `RecordsDelete` task is registered
309
- yield new Promise((resolve) => {
300
+ await new Promise((resolve) => {
310
301
  const interval = setInterval(() => {
311
302
  if (resumableTaskRegisterSpy.called) {
312
303
  clearInterval(interval);
@@ -314,34 +305,34 @@ export function testResumableTasks() {
314
305
  }
315
306
  }, 10);
316
307
  });
317
- const initialResumableTaskState = yield resumableTaskRegisterSpy.firstCall.returnValue;
308
+ const initialResumableTaskState = await resumableTaskRegisterSpy.firstCall.returnValue;
318
309
  // 4. Verify that the task timeout is automatically extended.
319
- yield clock.tickAsync(ResumableTaskManager.timeoutExtensionFrequencyInSeconds * 2 * 1000); // advancing time up to 2 extension cycles
310
+ await clock.tickAsync(ResumableTaskManager.timeoutExtensionFrequencyInSeconds * 2 * 1000); // advancing time up to 2 extension cycles
320
311
  // IMPORTANT: This call ensures all scheduled timers are executed
321
312
  // In theory calling `tickAsync()` or `runToLastAsync()` alone should execute all scheduled timers
322
313
  // but for some reason this behavior does not happen ONLY in Safari. I found 2 workarounds:
323
314
  // 1. call BOTH `tickAsync()` and `runToLastAsync()`.
324
315
  // 2. call `tickAsync()` with a longer time.
325
316
  // Chose the first workaround because it is should be the more reliable of the two.
326
- yield clock.runToLastAsync();
317
+ await clock.runToLastAsync();
327
318
  let latestResumableTaskState;
328
- yield Poller.pollUntilSuccessOrTimeout(() => __awaiter(this, void 0, void 0, function* () {
329
- latestResumableTaskState = yield resumableTaskStore.read(initialResumableTaskState.id);
319
+ await Poller.pollUntilSuccessOrTimeout(async () => {
320
+ latestResumableTaskState = await resumableTaskStore.read(initialResumableTaskState.id);
330
321
  expect(latestResumableTaskState.timeout).toBeGreaterThan(initialResumableTaskState.timeout);
331
- }));
322
+ });
332
323
  // 5. Signal the mocked code to complete the `RecordsDelete`.
333
324
  completeDeleteSignal.emit('complete-delete');
334
325
  // wait until the `RecordsDelete` is completed
335
- yield recordsDeletePromise;
326
+ await recordsDeletePromise;
336
327
  expect(isDeleteComplete).toBe(true);
337
328
  // 6. Verify that automatic timeout extension loop is cleared.
338
329
  expect(clearTimeoutExtensionTimerSpy.calledOnce).toBe(true);
339
330
  // 7. Verify that the resumable task is deleted.
340
- yield Poller.pollUntilSuccessOrTimeout(() => __awaiter(this, void 0, void 0, function* () {
341
- latestResumableTaskState = yield resumableTaskStore.read(initialResumableTaskState.id);
331
+ await Poller.pollUntilSuccessOrTimeout(async () => {
332
+ latestResumableTaskState = await resumableTaskStore.read(initialResumableTaskState.id);
342
333
  expect(latestResumableTaskState).toBeUndefined();
343
- }));
344
- }));
334
+ });
335
+ });
345
336
  });
346
337
  }
347
338
  //# sourceMappingURL=resumable-tasks.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resumable-tasks.spec.js","sourceRoot":"","sources":["../../../../tests/features/resumable-tasks.spec.ts"],"names":[],"mappings":";;;;;;;;;AAKA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,yBAAyB,MAAM,8CAA8C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3G,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAGn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