appium-espresso-driver 10.2.0 → 10.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (449) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
  3. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.bin +0 -0
  4. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.lock +0 -0
  5. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  6. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +1 -1
  7. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
  8. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
  9. package/node_modules/{appium-android-driver → @appium/base-driver}/node_modules/asyncbox/README.md +1 -1
  10. package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/index.ts +28 -0
  11. package/node_modules/{appium-android-driver → @appium/base-driver}/node_modules/asyncbox/package.json +26 -12
  12. package/node_modules/{appium-adb → @appium/support}/node_modules/asyncbox/README.md +1 -1
  13. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/cjs/lib}/asyncfilter.d.ts +1 -1
  14. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +1 -0
  15. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/cjs/lib}/asyncfilter.js +6 -3
  16. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +1 -0
  17. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/cjs/lib}/asyncmap.d.ts +1 -1
  18. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +1 -0
  19. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/cjs/lib}/asyncmap.js +6 -3
  20. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +1 -0
  21. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +1 -0
  22. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.js +55 -0
  23. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.js.map +1 -0
  24. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.d.ts +12 -0
  25. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +1 -0
  26. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.js +28 -0
  27. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.js.map +1 -0
  28. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +3 -0
  29. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +1 -0
  30. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.js +15 -0
  31. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +1 -0
  32. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +1 -0
  33. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/lock → @appium/support/node_modules/asyncbox/build/cjs/lib}/lock.js +15 -21
  34. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/lock.js.map +1 -0
  35. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/long-sleep.d.ts +1 -1
  36. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +1 -0
  37. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.js +36 -0
  38. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +1 -0
  39. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +1 -0
  40. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.js +57 -0
  41. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.js.map +1 -0
  42. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/sleep.d.ts +1 -1
  43. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +1 -0
  44. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/sleep.js +7 -4
  45. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/sleep.js.map +1 -0
  46. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +1 -0
  47. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js +3 -0
  48. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/cjs/lib}/types.js.map +1 -1
  49. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/wait-for-condition.d.ts +1 -1
  50. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +1 -0
  51. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/wait-for-condition.js +9 -6
  52. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +1 -0
  53. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +1 -0
  54. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/with-timeout.js +7 -4
  55. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +1 -0
  56. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/package.json +3 -0
  57. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +9 -0
  58. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +1 -0
  59. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/esm/lib}/asyncfilter.js +2 -2
  60. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +1 -0
  61. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/esm/lib}/asyncmap.d.ts +1 -1
  62. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +1 -0
  63. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/esm/lib}/asyncmap.js +2 -2
  64. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +1 -0
  65. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +1 -0
  66. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/errors.js.map +1 -0
  67. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.d.ts +12 -0
  68. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.d.ts.map +1 -0
  69. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.js +10 -0
  70. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.js.map +1 -0
  71. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +3 -0
  72. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +1 -0
  73. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.js +12 -0
  74. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.js.map +1 -0
  75. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +1 -0
  76. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/lock → @appium/support/node_modules/asyncbox/build/esm/lib}/lock.js +3 -13
  77. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/lock.js.map +1 -0
  78. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +15 -0
  79. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +1 -0
  80. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +1 -0
  81. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +1 -0
  82. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/retry.js.map +1 -0
  83. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/esm/lib}/sleep.d.ts +1 -1
  84. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +1 -0
  85. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/esm/lib}/sleep.js +1 -1
  86. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/sleep.js.map +1 -0
  87. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts.map +1 -0
  88. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/esm/lib}/types.js.map +1 -1
  89. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +18 -0
  90. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +1 -0
  91. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/esm/lib}/wait-for-condition.js +1 -1
  92. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +1 -0
  93. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +1 -0
  94. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/esm/lib}/with-timeout.js +1 -1
  95. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +1 -0
  96. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/package.json +3 -0
  97. package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/collections → @appium/support/node_modules/asyncbox/lib}/asyncfilter.ts +3 -3
  98. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/collections → @appium/support/node_modules/asyncbox/lib}/asyncmap.ts +3 -3
  99. package/node_modules/@appium/support/node_modules/asyncbox/lib/index.ts +28 -0
  100. package/node_modules/@appium/support/node_modules/asyncbox/lib/limit-function.ts +18 -0
  101. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/lock → @appium/support/node_modules/asyncbox/lib}/lock.ts +6 -13
  102. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/long-sleep.ts +1 -1
  103. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/sleep.ts +2 -2
  104. package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/wait-for-condition.ts +2 -2
  105. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/with-timeout.ts +1 -1
  106. package/node_modules/{appium-adb → @appium/support}/node_modules/asyncbox/package.json +26 -12
  107. package/node_modules/@appium/support/node_modules/p-limit/index.d.ts +138 -0
  108. package/node_modules/@appium/support/node_modules/p-limit/index.js +148 -0
  109. package/node_modules/@appium/support/node_modules/p-limit/license +9 -0
  110. package/node_modules/@appium/support/node_modules/p-limit/package.json +58 -0
  111. package/node_modules/@appium/support/node_modules/p-limit/readme.md +183 -0
  112. package/node_modules/asyncbox/README.md +1 -1
  113. package/node_modules/asyncbox/lib/index.ts +11 -11
  114. package/node_modules/asyncbox/package.json +12 -26
  115. package/package.json +2 -2
  116. package/node_modules/appium-adb/node_modules/asyncbox/lib/index.ts +0 -28
  117. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +0 -1
  118. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +0 -1
  119. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +0 -1
  120. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +0 -1
  121. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +0 -7
  122. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +0 -1
  123. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js +0 -35
  124. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +0 -1
  125. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts +0 -12
  126. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts.map +0 -1
  127. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js +0 -10
  128. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js.map +0 -1
  129. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +0 -1
  130. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.js.map +0 -1
  131. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +0 -1
  132. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.js.map +0 -1
  133. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +0 -1
  134. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +0 -1
  135. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +0 -1
  136. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +0 -1
  137. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.js.map +0 -1
  138. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +0 -1
  139. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.js.map +0 -1
  140. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +0 -1
  141. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +0 -1
  142. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +0 -1
  143. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +0 -1
  144. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/asyncmap.ts +0 -33
  145. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/limit-function.ts +0 -34
  146. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/index.ts +0 -28
  147. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/lock/lock.ts +0 -369
  148. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/long-sleep.ts +0 -38
  149. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/sleep.ts +0 -79
  150. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/with-timeout.ts +0 -43
  151. package/node_modules/appium-chromedriver/node_modules/asyncbox/LICENSE +0 -203
  152. package/node_modules/appium-chromedriver/node_modules/asyncbox/README.md +0 -272
  153. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +0 -9
  154. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +0 -1
  155. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +0 -1
  156. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +0 -1
  157. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +0 -1
  158. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +0 -7
  159. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +0 -1
  160. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js +0 -35
  161. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +0 -1
  162. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts +0 -12
  163. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts.map +0 -1
  164. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js +0 -10
  165. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js.map +0 -1
  166. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +0 -1
  167. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.js.map +0 -1
  168. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +0 -1
  169. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.js.map +0 -1
  170. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +0 -1
  171. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +0 -15
  172. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +0 -1
  173. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +0 -1
  174. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +0 -1
  175. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.js.map +0 -1
  176. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +0 -1
  177. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.js.map +0 -1
  178. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +0 -18
  179. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +0 -1
  180. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +0 -1
  181. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +0 -1
  182. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +0 -1
  183. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/asyncfilter.ts +0 -42
  184. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/limit-function.ts +0 -34
  185. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/index.ts +0 -28
  186. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/wait-for-condition.ts +0 -52
  187. package/node_modules/appium-chromedriver/node_modules/asyncbox/package.json +0 -60
  188. package/node_modules/asyncbox/build/esm/lib/errors.js +0 -46
  189. package/node_modules/asyncbox/build/esm/lib/long-sleep.js +0 -33
  190. package/node_modules/asyncbox/build/esm/lib/retry.js +0 -53
  191. package/node_modules/asyncbox/build/esm/lib/types.js +0 -2
  192. package/node_modules/asyncbox/lib/errors.ts +0 -51
  193. package/node_modules/asyncbox/lib/retry.ts +0 -61
  194. package/node_modules/asyncbox/lib/types.ts +0 -88
  195. package/node_modules/io.appium.settings/node_modules/asyncbox/LICENSE +0 -203
  196. package/node_modules/io.appium.settings/node_modules/asyncbox/README.md +0 -272
  197. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +0 -9
  198. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +0 -1
  199. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js +0 -36
  200. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +0 -1
  201. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +0 -9
  202. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +0 -1
  203. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js +0 -27
  204. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +0 -1
  205. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +0 -7
  206. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +0 -1
  207. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js +0 -35
  208. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js.map +0 -1
  209. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts +0 -12
  210. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts.map +0 -1
  211. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js +0 -10
  212. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js.map +0 -1
  213. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts +0 -74
  214. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +0 -1
  215. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js +0 -302
  216. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js.map +0 -1
  217. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts +0 -27
  218. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +0 -1
  219. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js +0 -46
  220. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js.map +0 -1
  221. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts +0 -84
  222. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts.map +0 -1
  223. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js +0 -2
  224. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js.map +0 -1
  225. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +0 -15
  226. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +0 -1
  227. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js +0 -33
  228. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js.map +0 -1
  229. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts +0 -17
  230. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts.map +0 -1
  231. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js +0 -53
  232. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js.map +0 -1
  233. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts +0 -20
  234. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +0 -1
  235. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js +0 -58
  236. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js.map +0 -1
  237. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +0 -18
  238. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +0 -1
  239. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js +0 -48
  240. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +0 -1
  241. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +0 -16
  242. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +0 -1
  243. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js +0 -42
  244. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js.map +0 -1
  245. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncfilter.ts +0 -42
  246. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncmap.ts +0 -33
  247. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/limit-function.ts +0 -34
  248. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/index.ts +0 -28
  249. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/lock/lock.ts +0 -369
  250. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/errors.ts +0 -51
  251. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/types.ts +0 -88
  252. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/long-sleep.ts +0 -38
  253. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/retry.ts +0 -61
  254. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/sleep.ts +0 -79
  255. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/wait-for-condition.ts +0 -52
  256. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/with-timeout.ts +0 -43
  257. package/node_modules/io.appium.settings/node_modules/asyncbox/package.json +0 -60
  258. /package/node_modules/{appium-adb → @appium/base-driver}/node_modules/asyncbox/LICENSE +0 -0
  259. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncfilter.d.ts +0 -0
  260. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncfilter.d.ts.map +0 -0
  261. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncfilter.js +0 -0
  262. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncfilter.js.map +0 -0
  263. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncmap.d.ts +0 -0
  264. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncmap.d.ts.map +0 -0
  265. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncmap.js +0 -0
  266. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncmap.js.map +0 -0
  267. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/shared → @appium/base-driver/node_modules/asyncbox/build/cjs/lib}/errors.d.ts +0 -0
  268. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/errors.d.ts.map +0 -0
  269. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/errors.js +0 -0
  270. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/errors.js.map +0 -0
  271. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/index.d.ts +0 -0
  272. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/index.d.ts.map +0 -0
  273. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/index.js +0 -0
  274. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/index.js.map +0 -0
  275. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/limit-function.d.ts +0 -0
  276. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/limit-function.d.ts.map +0 -0
  277. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/limit-function.js +0 -0
  278. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/limit-function.js.map +0 -0
  279. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/lock → @appium/base-driver/node_modules/asyncbox/build/cjs/lib}/lock.d.ts +0 -0
  280. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/lock.d.ts.map +0 -0
  281. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/lock.js +0 -0
  282. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/lock.js.map +0 -0
  283. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/long-sleep.d.ts +0 -0
  284. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/long-sleep.d.ts.map +0 -0
  285. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/long-sleep.js +0 -0
  286. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/long-sleep.js.map +0 -0
  287. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/time → @appium/base-driver/node_modules/asyncbox/build/cjs/lib}/retry.d.ts +0 -0
  288. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/retry.d.ts.map +0 -0
  289. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/retry.js +0 -0
  290. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/retry.js.map +0 -0
  291. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/sleep.d.ts +0 -0
  292. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/sleep.d.ts.map +0 -0
  293. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/sleep.js +0 -0
  294. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/sleep.js.map +0 -0
  295. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/shared → @appium/base-driver/node_modules/asyncbox/build/cjs/lib}/types.d.ts +0 -0
  296. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/types.d.ts.map +0 -0
  297. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/types.js +0 -0
  298. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/types.js.map +0 -0
  299. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/wait-for-condition.d.ts +0 -0
  300. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/wait-for-condition.d.ts.map +0 -0
  301. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/wait-for-condition.js +0 -0
  302. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/wait-for-condition.js.map +0 -0
  303. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/time → @appium/base-driver/node_modules/asyncbox/build/cjs/lib}/with-timeout.d.ts +0 -0
  304. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/with-timeout.d.ts.map +0 -0
  305. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/with-timeout.js +0 -0
  306. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/with-timeout.js.map +0 -0
  307. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/package.json +0 -0
  308. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncfilter.d.ts +0 -0
  309. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncfilter.d.ts.map +0 -0
  310. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncfilter.js +0 -0
  311. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncfilter.js.map +0 -0
  312. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncmap.d.ts +0 -0
  313. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncmap.d.ts.map +0 -0
  314. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncmap.js +0 -0
  315. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncmap.js.map +0 -0
  316. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/shared → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/errors.d.ts +0 -0
  317. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/errors.d.ts.map +0 -0
  318. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/shared → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/errors.js +0 -0
  319. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/errors.js.map +0 -0
  320. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/index.d.ts +0 -0
  321. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/index.d.ts.map +0 -0
  322. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/index.js +0 -0
  323. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/index.js.map +0 -0
  324. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/limit-function.d.ts +0 -0
  325. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/limit-function.d.ts.map +0 -0
  326. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/limit-function.js +0 -0
  327. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/limit-function.js.map +0 -0
  328. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/lock → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/lock.d.ts +0 -0
  329. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/lock.d.ts.map +0 -0
  330. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/lock.js +0 -0
  331. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/lock.js.map +0 -0
  332. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/long-sleep.d.ts +0 -0
  333. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/long-sleep.d.ts.map +0 -0
  334. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/time → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/long-sleep.js +0 -0
  335. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/long-sleep.js.map +0 -0
  336. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/retry.d.ts +0 -0
  337. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/retry.d.ts.map +0 -0
  338. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/time → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/retry.js +0 -0
  339. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/retry.js.map +0 -0
  340. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/sleep.d.ts +0 -0
  341. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/sleep.d.ts.map +0 -0
  342. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/sleep.js +0 -0
  343. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/sleep.js.map +0 -0
  344. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/shared → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/types.d.ts +0 -0
  345. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/types.d.ts.map +0 -0
  346. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/shared → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/types.js +0 -0
  347. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/types.js.map +0 -0
  348. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/wait-for-condition.d.ts +0 -0
  349. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/wait-for-condition.d.ts.map +0 -0
  350. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/wait-for-condition.js +0 -0
  351. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/wait-for-condition.js.map +0 -0
  352. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/with-timeout.d.ts +0 -0
  353. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/with-timeout.d.ts.map +0 -0
  354. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/with-timeout.js +0 -0
  355. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/with-timeout.js.map +0 -0
  356. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/package.json +0 -0
  357. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/asyncfilter.ts +0 -0
  358. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/asyncmap.ts +0 -0
  359. /package/node_modules/{appium-adb/node_modules/asyncbox/lib/shared → @appium/base-driver/node_modules/asyncbox/lib}/errors.ts +0 -0
  360. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/limit-function.ts +0 -0
  361. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/lock.ts +0 -0
  362. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/long-sleep.ts +0 -0
  363. /package/node_modules/{appium-adb/node_modules/asyncbox/lib/time → @appium/base-driver/node_modules/asyncbox/lib}/retry.ts +0 -0
  364. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/sleep.ts +0 -0
  365. /package/node_modules/{appium-adb/node_modules/asyncbox/lib/shared → @appium/base-driver/node_modules/asyncbox/lib}/types.ts +0 -0
  366. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/wait-for-condition.ts +0 -0
  367. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/with-timeout.ts +0 -0
  368. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/index.d.ts +0 -0
  369. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/index.js +0 -0
  370. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/license +0 -0
  371. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/package.json +0 -0
  372. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/readme.md +0 -0
  373. /package/node_modules/{appium-android-driver → @appium/support}/node_modules/asyncbox/LICENSE +0 -0
  374. /package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/cjs/lib}/errors.d.ts +0 -0
  375. /package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/lock → @appium/support/node_modules/asyncbox/build/cjs/lib}/lock.d.ts +0 -0
  376. /package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/retry.d.ts +0 -0
  377. /package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/cjs/lib}/types.d.ts +0 -0
  378. /package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/with-timeout.d.ts +0 -0
  379. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/errors.d.ts +0 -0
  380. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/esm/lib}/errors.js +0 -0
  381. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/lock.d.ts +0 -0
  382. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/esm/lib}/long-sleep.js +0 -0
  383. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/retry.d.ts +0 -0
  384. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/esm/lib}/retry.js +0 -0
  385. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/types.d.ts +0 -0
  386. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/esm/lib}/types.js +0 -0
  387. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/with-timeout.d.ts +0 -0
  388. /package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/shared → @appium/support/node_modules/asyncbox/lib}/errors.ts +0 -0
  389. /package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/retry.ts +0 -0
  390. /package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/shared → @appium/support/node_modules/asyncbox/lib}/types.ts +0 -0
  391. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncfilter.d.ts +0 -0
  392. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncfilter.d.ts.map +0 -0
  393. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncfilter.js +0 -0
  394. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncfilter.js.map +0 -0
  395. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncmap.d.ts +0 -0
  396. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncmap.d.ts.map +0 -0
  397. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncmap.js +0 -0
  398. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncmap.js.map +0 -0
  399. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/limit-function.d.ts +0 -0
  400. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/limit-function.d.ts.map +0 -0
  401. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/limit-function.js +0 -0
  402. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/limit-function.js.map +0 -0
  403. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/index.d.ts +0 -0
  404. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/index.d.ts.map +0 -0
  405. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/index.js +0 -0
  406. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/index.js.map +0 -0
  407. /package/node_modules/asyncbox/build/{esm/lib → lib/lock}/lock.d.ts +0 -0
  408. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/lock/lock.d.ts.map +0 -0
  409. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/lock/lock.js +0 -0
  410. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/lock/lock.js.map +0 -0
  411. /package/node_modules/asyncbox/build/{esm/lib → lib/shared}/errors.d.ts +0 -0
  412. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/shared/errors.d.ts.map +0 -0
  413. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/build/lib/shared/errors.js +0 -0
  414. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/shared/errors.js.map +0 -0
  415. /package/node_modules/asyncbox/build/{esm/lib → lib/shared}/types.d.ts +0 -0
  416. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/shared/types.d.ts.map +0 -0
  417. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/build/lib/shared/types.js +0 -0
  418. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/shared/types.js.map +0 -0
  419. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/long-sleep.d.ts +0 -0
  420. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/long-sleep.d.ts.map +0 -0
  421. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/build/lib/time/long-sleep.js +0 -0
  422. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/long-sleep.js.map +0 -0
  423. /package/node_modules/asyncbox/build/{esm/lib → lib/time}/retry.d.ts +0 -0
  424. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/retry.d.ts.map +0 -0
  425. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/build/lib/time/retry.js +0 -0
  426. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/retry.js.map +0 -0
  427. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/sleep.d.ts +0 -0
  428. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/sleep.d.ts.map +0 -0
  429. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/sleep.js +0 -0
  430. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/sleep.js.map +0 -0
  431. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/wait-for-condition.d.ts +0 -0
  432. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/wait-for-condition.d.ts.map +0 -0
  433. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/wait-for-condition.js +0 -0
  434. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/wait-for-condition.js.map +0 -0
  435. /package/node_modules/asyncbox/build/{esm/lib → lib/time}/with-timeout.d.ts +0 -0
  436. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/with-timeout.d.ts.map +0 -0
  437. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/with-timeout.js +0 -0
  438. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/with-timeout.js.map +0 -0
  439. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/collections/asyncfilter.ts +0 -0
  440. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/collections/asyncmap.ts +0 -0
  441. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/collections/limit-function.ts +0 -0
  442. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/lock/lock.ts +0 -0
  443. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/lib/shared/errors.ts +0 -0
  444. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/lib/shared/types.ts +0 -0
  445. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/time/long-sleep.ts +0 -0
  446. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/lib/time/retry.ts +0 -0
  447. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/time/sleep.ts +0 -0
  448. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/time/wait-for-condition.ts +0 -0
  449. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/time/with-timeout.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAC,KAAK,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC"}
@@ -1,74 +0,0 @@
1
- /** Options shared by the {@link AsyncLock} constructor and {@link AsyncLock.acquire}. */
2
- export interface AsyncLockOptions {
3
- /**
4
- * Max ms a task may wait in the queue before failing. `0` means never.
5
- * @default 0
6
- */
7
- timeout?: number;
8
- /**
9
- * Max ms between calling `acquire` and the task finishing (queue wait included). `0` means never.
10
- * @default 0
11
- */
12
- maxOccupationTime?: number;
13
- /**
14
- * Max ms the task may run once it holds the lock; the lock is then released. `0` means never.
15
- * @default 0
16
- */
17
- maxExecutionTime?: number;
18
- /**
19
- * Max number of tasks waiting per key; further ones are rejected right away. `0` rejects every
20
- * task that would have to wait.
21
- * @default 1000
22
- */
23
- maxPending?: number;
24
- }
25
- /** Per-call options of {@link AsyncLock.acquire}; override the constructor ones. */
26
- export interface AcquireOptions extends AsyncLockOptions {
27
- /**
28
- * Put the task at the front of the queue instead of the back.
29
- * @default false
30
- */
31
- skipQueue?: boolean;
32
- }
33
- type Task<T> = () => T | PromiseLike<T>;
34
- /**
35
- * Promise-based mutex keyed by string. Tasks with the same key run one at a time, in FIFO order.
36
- *
37
- * Each task runs in the async context (`AsyncLocalStorage`) of the code that called
38
- * {@link AsyncLock.acquire}, not in the context of the task that held the lock before it.
39
- */
40
- export declare class AsyncLock {
41
- private readonly queues;
42
- private readonly defaults;
43
- constructor(opts?: AsyncLockOptions);
44
- /**
45
- * Run `fn` once the lock for `key` is free and release the lock when it settles.
46
- *
47
- * Multiple keys are held together. They are acquired one by one in sorted order, whatever order
48
- * they are given in, so that overlapping calls cannot deadlock; duplicates are ignored. Keys that
49
- * are already held stay held while a later one is awaited. `timeout` and `maxOccupationTime` are
50
- * budgets for the whole call, while `maxExecutionTime` counts from the moment all the keys are
51
- * held and releases all of them.
52
- *
53
- * @param key - Resource key, or a non-empty array of keys
54
- * @param fn - Task to run while holding the lock; may be sync or async
55
- * @param opts - Per-call options
56
- * @returns The result of `fn`
57
- * @throws {TypeError} Synchronously, if an argument is invalid
58
- */
59
- acquire<T>(key: string | readonly string[], fn: Task<T>, opts?: AcquireOptions): Promise<T>;
60
- /**
61
- * Number of tasks waiting for `key`, not counting the running one.
62
- *
63
- * @param key - Resource key
64
- */
65
- getQueueLength(key: string): number;
66
- /**
67
- * Whether `key` has a running or pending task. Without a key, whether any key does.
68
- *
69
- * @param key - Resource key
70
- */
71
- isBusy(key?: string): boolean;
72
- }
73
- export {};
74
- //# sourceMappingURL=lock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../../lib/lock/lock.ts"],"names":[],"mappings":"AAQA,yFAAyF;AACzF,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,oFAAoF;AACpF,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,KAAK,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAMxC;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;gBAE1C,IAAI,GAAE,gBAAqB;IAWvC;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,CAAC,CAAC;IAkB/F;;;;OAIG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAInC;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO;CAG9B"}
@@ -1,302 +0,0 @@
1
- import { AsyncResource } from 'node:async_hooks';
2
- import { LockQueueFullError, LockTimeoutError } from '../shared/errors.js';
3
- const DEFAULT_MAX_PENDING = 1000;
4
- // setTimeout fires after 1 ms for anything above this
5
- const MAX_TIMER_MS = 2 ** 31 - 1;
6
- /**
7
- * Promise-based mutex keyed by string. Tasks with the same key run one at a time, in FIFO order.
8
- *
9
- * Each task runs in the async context (`AsyncLocalStorage`) of the code that called
10
- * {@link AsyncLock.acquire}, not in the context of the task that held the lock before it.
11
- */
12
- export class AsyncLock {
13
- queues = new Map();
14
- defaults;
15
- constructor(opts = {}) {
16
- validateOptions(opts);
17
- this.defaults = {
18
- timeout: 0,
19
- maxOccupationTime: 0,
20
- maxExecutionTime: 0,
21
- maxPending: DEFAULT_MAX_PENDING,
22
- ...stripUndefined(opts),
23
- };
24
- }
25
- /**
26
- * Run `fn` once the lock for `key` is free and release the lock when it settles.
27
- *
28
- * Multiple keys are held together. They are acquired one by one in sorted order, whatever order
29
- * they are given in, so that overlapping calls cannot deadlock; duplicates are ignored. Keys that
30
- * are already held stay held while a later one is awaited. `timeout` and `maxOccupationTime` are
31
- * budgets for the whole call, while `maxExecutionTime` counts from the moment all the keys are
32
- * held and releases all of them.
33
- *
34
- * @param key - Resource key, or a non-empty array of keys
35
- * @param fn - Task to run while holding the lock; may be sync or async
36
- * @param opts - Per-call options
37
- * @returns The result of `fn`
38
- * @throws {TypeError} Synchronously, if an argument is invalid
39
- */
40
- acquire(key, fn, opts = {}) {
41
- if (typeof fn !== 'function') {
42
- throw new TypeError('You must pass a function to execute');
43
- }
44
- if (typeof key !== 'string' &&
45
- !(Array.isArray(key) && key.length > 0 && [...key].every((k) => typeof k === 'string'))) {
46
- throw new TypeError('The key must be a string or a non-empty array of strings');
47
- }
48
- validateOptions(opts);
49
- // A canonical order keeps overlapping multi-key calls, e.g. ['a', 'b'] and ['b', 'a'], from deadlocking
50
- const keys = typeof key === 'string' ? [key] : [...new Set(key)].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
51
- const acquisition = new Acquisition(this.queues, keys, fn, { ...this.defaults, ...stripUndefined(opts) });
52
- acquisition.enqueue();
53
- return acquisition.promise;
54
- }
55
- /**
56
- * Number of tasks waiting for `key`, not counting the running one.
57
- *
58
- * @param key - Resource key
59
- */
60
- getQueueLength(key) {
61
- return this.queues.get(key)?.length ?? 0;
62
- }
63
- /**
64
- * Whether `key` has a running or pending task. Without a key, whether any key does.
65
- *
66
- * @param key - Resource key
67
- */
68
- isBusy(key) {
69
- return key === undefined ? this.queues.size > 0 : this.queues.has(key);
70
- }
71
- }
72
- /** The place of one acquisition in the queue of one key; once granted, it holds the key. */
73
- class KeyClaim {
74
- queues;
75
- key;
76
- opts;
77
- onGranted;
78
- onDenied;
79
- holding = false;
80
- dropped = false;
81
- queueTimer;
82
- constructor(queues, key, opts, onGranted, onDenied) {
83
- this.queues = queues;
84
- this.key = key;
85
- this.opts = opts;
86
- this.onGranted = onGranted;
87
- this.onDenied = onDenied;
88
- }
89
- /**
90
- * Take the key right away if it is free, otherwise wait in its queue.
91
- *
92
- * @returns Whether the key is held. If not, `onGranted` is called once it is, unless the claim
93
- * is denied.
94
- */
95
- join() {
96
- const { timeout, maxPending, skipQueue } = this.opts;
97
- const queue = this.queues.get(this.key);
98
- if (!queue) {
99
- this.queues.set(this.key, []);
100
- this.holding = true;
101
- return true;
102
- }
103
- if (queue.length >= maxPending) {
104
- this.onDenied(new LockQueueFullError(`Too many pending tasks in queue ${this.key}`));
105
- }
106
- else {
107
- if (skipQueue) {
108
- queue.unshift(this.grant);
109
- }
110
- else {
111
- queue.push(this.grant);
112
- }
113
- if (timeout) {
114
- this.queueTimer = setTimeout(() => this.onDenied(new LockTimeoutError(`async-lock timed out in queue ${this.key}`)), timeout);
115
- }
116
- }
117
- return false;
118
- }
119
- /**
120
- * Leave the queue, or release the key if it is held. Idempotent.
121
- *
122
- * @returns The handover of the key to its next waiter. The caller must run it only after it
123
- * has released all of its keys, so that no waiter starts while a batch is partially released.
124
- */
125
- drop() {
126
- if (this.dropped) {
127
- return undefined;
128
- }
129
- this.dropped = true;
130
- clearTimeout(this.queueTimer);
131
- if (this.holding) {
132
- return this.releaseKey();
133
- }
134
- const queue = this.queues.get(this.key);
135
- const idx = queue?.indexOf(this.grant) ?? -1;
136
- if (idx >= 0) {
137
- queue?.splice(idx, 1);
138
- }
139
- return undefined;
140
- }
141
- releaseKey() {
142
- const next = this.queues.get(this.key)?.shift();
143
- if (!next) {
144
- this.queues.delete(this.key);
145
- }
146
- return next;
147
- }
148
- // An arrow function, because this exact reference sits in the queue and is removed by drop()
149
- grant = () => {
150
- clearTimeout(this.queueTimer);
151
- this.holding = true;
152
- if (this.dropped) {
153
- // Dropped while the key was being handed over to it: pass the key on instead of using it
154
- this.releaseKey()?.();
155
- return;
156
- }
157
- this.onGranted();
158
- };
159
- }
160
- /**
161
- * One `acquire` call: its promise, its timers and its claims on all of its keys. The keys are
162
- * claimed one by one, the task runs once all of them are held and they are released together.
163
- */
164
- class Acquisition {
165
- queues;
166
- keys;
167
- opts;
168
- promise;
169
- resolve;
170
- reject;
171
- task;
172
- claims = [];
173
- running = false;
174
- settled = false;
175
- queueDeadline = 0;
176
- occupationTimer;
177
- executionTimer;
178
- constructor(queues, keys, task, opts) {
179
- this.queues = queues;
180
- this.keys = keys;
181
- this.opts = opts;
182
- // Queued tasks are started from the previous task's promise chain; bind to keep our context
183
- this.task = AsyncResource.bind(task);
184
- this.promise = new Promise((resolve, reject) => {
185
- this.resolve = resolve;
186
- this.reject = reject;
187
- });
188
- }
189
- /** Start the task right away if all the keys are free, otherwise wait for them. */
190
- enqueue() {
191
- const { timeout, maxOccupationTime } = this.opts;
192
- if (timeout) {
193
- this.queueDeadline = performance.now() + timeout;
194
- }
195
- if (maxOccupationTime) {
196
- this.occupationTimer = setTimeout(() => this.expire(), maxOccupationTime);
197
- }
198
- this.claimKeys(0);
199
- }
200
- // Free keys are claimed in a loop, not recursively, so that a large batch cannot overflow the stack
201
- claimKeys(from) {
202
- const { maxPending, skipQueue } = this.opts;
203
- try {
204
- for (let index = from; index < this.keys.length; index++) {
205
- // The queue timeout is a budget for waiting for all the keys, not for each one
206
- const timeout = this.queueDeadline ? Math.max(this.queueDeadline - performance.now(), 1) : 0;
207
- const claim = new KeyClaim(this.queues, this.keys[index], { timeout, maxPending, skipQueue }, () => this.claimKeys(index + 1), (error) => this.abort(error));
208
- this.claims.push(claim);
209
- if (!claim.join()) {
210
- return;
211
- }
212
- }
213
- this.execute();
214
- }
215
- catch (error) {
216
- this.abort(error);
217
- }
218
- }
219
- execute() {
220
- const { maxExecutionTime } = this.opts;
221
- this.running = true;
222
- if (maxExecutionTime) {
223
- this.executionTimer = setTimeout(() => this.abort(new LockTimeoutError(`Maximum execution time is exceeded ${this.keys.join(', ')}`)), maxExecutionTime);
224
- }
225
- void this.runTask();
226
- }
227
- async runTask() {
228
- let outcome;
229
- try {
230
- outcome = { value: await this.task() };
231
- }
232
- catch (error) {
233
- outcome = { error };
234
- }
235
- this.finish(outcome);
236
- }
237
- finish(outcome) {
238
- this.settle(outcome);
239
- this.release();
240
- }
241
- // Reject and release all the keys; a running task is left to finish on its own
242
- abort(error) {
243
- this.settle({ error });
244
- this.release();
245
- }
246
- // A running task keeps its keys until it finishes, an unstarted one gives them up
247
- expire() {
248
- const keys = this.keys.join(', ');
249
- if (this.running) {
250
- this.settle({ error: new LockTimeoutError(`Maximum occupation time is exceeded while executing ${keys}`) });
251
- }
252
- else {
253
- this.abort(new LockTimeoutError(`Maximum occupation time is exceeded in queue ${keys}`));
254
- }
255
- }
256
- settle(outcome) {
257
- if (this.settled) {
258
- return;
259
- }
260
- this.settled = true;
261
- clearTimeout(this.occupationTimer);
262
- if ('error' in outcome) {
263
- this.reject(outcome.error);
264
- }
265
- else {
266
- this.resolve(outcome.value);
267
- }
268
- }
269
- // Idempotent, so a task that outlives its execution timeout cannot release the keys twice
270
- release() {
271
- clearTimeout(this.executionTimer);
272
- const handovers = this.claims
273
- .splice(0)
274
- .reverse()
275
- .map((claim) => claim.drop());
276
- for (const handover of handovers) {
277
- handover?.();
278
- }
279
- }
280
- }
281
- function validateOptions(opts) {
282
- if (opts === null || typeof opts !== 'object') {
283
- throw new TypeError('The options must be an object');
284
- }
285
- for (const name of ['timeout', 'maxOccupationTime', 'maxExecutionTime']) {
286
- const value = opts[name];
287
- if (value !== undefined && !(Number.isFinite(value) && value >= 0 && value <= MAX_TIMER_MS)) {
288
- throw new TypeError(`${name} must be a number of milliseconds between 0 and ${MAX_TIMER_MS}`);
289
- }
290
- }
291
- if (opts.skipQueue !== undefined && typeof opts.skipQueue !== 'boolean') {
292
- throw new TypeError('skipQueue must be a boolean');
293
- }
294
- const { maxPending } = opts;
295
- if (maxPending !== undefined && maxPending !== Infinity && !(Number.isInteger(maxPending) && maxPending >= 0)) {
296
- throw new TypeError('maxPending must be a non-negative integer or Infinity');
297
- }
298
- }
299
- function stripUndefined(obj) {
300
- return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined));
301
- }
302
- //# sourceMappingURL=lock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../lib/lock/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAC,kBAAkB,EAAE,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAEzE,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACjC,sDAAsD;AACtD,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AA0CjC;;;;;GAKG;AACH,MAAM,OAAO,SAAS;IACH,MAAM,GAAW,IAAI,GAAG,EAAE,CAAC;IAC3B,QAAQ,CAA6B;IAEtD,YAAY,OAAyB,EAAE;QACrC,eAAe,CAAC,IAAI,CAAC,CAAC;QACtB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,KAAK,SAAS,CAAC,CAAe,CAAC;AAClG,CAAC"}
@@ -1,27 +0,0 @@
1
- /** Base class of the built-in typed errors of this package; match by `instanceof` or {@link AsyncboxError.code}. */
2
- export declare class AsyncboxError extends Error {
3
- /** Stable machine-readable identifier, e.g. `ERR_ASYNCBOX_TIMEOUT` */
4
- readonly code: string;
5
- constructor(message: string, code?: string);
6
- }
7
- /** Error thrown by {@link withTimeout} when the deadline is exceeded. */
8
- export declare class TimeoutError extends AsyncboxError {
9
- constructor(message?: string, code?: string);
10
- }
11
- /** Thrown by {@link waitForCondition} when the condition is not met in time. */
12
- export declare class ConditionUnmetError extends TimeoutError {
13
- constructor(message?: string);
14
- }
15
- /** Thrown by {@link AsyncLock} when a queue, execution or occupation time limit is exceeded. */
16
- export declare class LockTimeoutError extends TimeoutError {
17
- constructor(message?: string);
18
- }
19
- /** Thrown by {@link AsyncLock} when the queue of a key already holds `maxPending` tasks. */
20
- export declare class LockQueueFullError extends AsyncboxError {
21
- constructor(message?: string);
22
- }
23
- /** Thrown when a promise is cancelled via `cancel`. */
24
- export declare class PromiseCancellationError extends AsyncboxError {
25
- constructor(message?: string);
26
- }
27
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../lib/shared/errors.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,qBAAa,aAAc,SAAQ,KAAK;IACtC,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAuB;CAK3D;AAED,yEAAyE;AACzE,qBAAa,YAAa,SAAQ,aAAa;gBACjC,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,MAA+B;CAIpE;AAED,gFAAgF;AAChF,qBAAa,mBAAoB,SAAQ,YAAY;gBACvC,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,gGAAgG;AAChG,qBAAa,gBAAiB,SAAQ,YAAY;gBACpC,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,4FAA4F;AAC5F,qBAAa,kBAAmB,SAAQ,aAAa;gBACvC,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,uDAAuD;AACvD,qBAAa,wBAAyB,SAAQ,aAAa;gBAC7C,OAAO,GAAE,MAA4B;CAIlD"}
@@ -1,46 +0,0 @@
1
- /** Base class of the built-in typed errors of this package; match by `instanceof` or {@link AsyncboxError.code}. */
2
- export class AsyncboxError extends Error {
3
- /** Stable machine-readable identifier, e.g. `ERR_ASYNCBOX_TIMEOUT` */
4
- code;
5
- constructor(message, code = 'ERR_ASYNCBOX') {
6
- super(message);
7
- this.name = 'AsyncboxError';
8
- this.code = code;
9
- }
10
- }
11
- /** Error thrown by {@link withTimeout} when the deadline is exceeded. */
12
- export class TimeoutError extends AsyncboxError {
13
- constructor(message, code = 'ERR_ASYNCBOX_TIMEOUT') {
14
- super(message ?? 'Operation timed out', code);
15
- this.name = 'TimeoutError';
16
- }
17
- }
18
- /** Thrown by {@link waitForCondition} when the condition is not met in time. */
19
- export class ConditionUnmetError extends TimeoutError {
20
- constructor(message) {
21
- super(message ?? 'Condition unmet', 'ERR_ASYNCBOX_CONDITION_UNMET');
22
- this.name = 'ConditionUnmetError';
23
- }
24
- }
25
- /** Thrown by {@link AsyncLock} when a queue, execution or occupation time limit is exceeded. */
26
- export class LockTimeoutError extends TimeoutError {
27
- constructor(message) {
28
- super(message ?? 'Lock timed out', 'ERR_ASYNCBOX_LOCK_TIMEOUT');
29
- this.name = 'LockTimeoutError';
30
- }
31
- }
32
- /** Thrown by {@link AsyncLock} when the queue of a key already holds `maxPending` tasks. */
33
- export class LockQueueFullError extends AsyncboxError {
34
- constructor(message) {
35
- super(message ?? 'Too many pending tasks in queue', 'ERR_ASYNCBOX_LOCK_QUEUE_FULL');
36
- this.name = 'LockQueueFullError';
37
- }
38
- }
39
- /** Thrown when a promise is cancelled via `cancel`. */
40
- export class PromiseCancellationError extends AsyncboxError {
41
- constructor(message = 'Promise cancelled') {
42
- super(message, 'ERR_ASYNCBOX_CANCELLED');
43
- this.name = 'PromiseCancellationError';
44
- }
45
- }
46
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../lib/shared/errors.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,sEAAsE;IAC7D,IAAI,CAAS;IAEtB,YAAY,OAAe,EAAE,OAAe,cAAc;QACxD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED,yEAAyE;AACzE,MAAM,OAAO,YAAa,SAAQ,aAAa;IAC7C,YAAY,OAAgB,EAAE,OAAe,sBAAsB;QACjE,KAAK,CAAC,OAAO,IAAI,qBAAqB,EAAE,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED,gFAAgF;AAChF,MAAM,OAAO,mBAAoB,SAAQ,YAAY;IACnD,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,IAAI,iBAAiB,EAAE,8BAA8B,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED,gGAAgG;AAChG,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAChD,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,IAAI,gBAAgB,EAAE,2BAA2B,CAAC,CAAC;QAChE,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED,4FAA4F;AAC5F,MAAM,OAAO,kBAAmB,SAAQ,aAAa;IACnD,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,IAAI,iCAAiC,EAAE,8BAA8B,CAAC,CAAC;QACpF,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AAED,uDAAuD;AACvD,MAAM,OAAO,wBAAyB,SAAQ,aAAa;IACzD,YAAY,UAAkB,mBAAmB;QAC/C,KAAK,CAAC,OAAO,EAAE,wBAAwB,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF"}
@@ -1,84 +0,0 @@
1
- /**
2
- * Parameter provided to a progress callback
3
- */
4
- export interface Progress {
5
- /** Elapsed time in milliseconds since the operation started */
6
- elapsedMs: number;
7
- /** Remaining time in milliseconds until the operation completes */
8
- timeLeft: number;
9
- /** Progress as a number between 0 and 1 (0 = not started, 1 = complete) */
10
- progress: number;
11
- }
12
- /**
13
- * Progress callback for {@link longSleep}
14
- */
15
- export type ProgressCallback = (progress: Progress) => void;
16
- /**
17
- * Options for {@link longSleep}
18
- */
19
- export interface LongSleepOptions {
20
- /** Minimum duration in milliseconds before using long sleep behavior.
21
- * @default 5000
22
- */
23
- thresholdMs?: number;
24
- /** Interval in milliseconds between progress callbacks.
25
- * @default 1000
26
- */
27
- intervalMs?: number;
28
- /** Optional callback function to receive progress updates during the sleep */
29
- progressCb?: ProgressCallback | null;
30
- }
31
- /**
32
- * Options for {@link asyncmap} and {@link asyncfilter}
33
- */
34
- export type MapFilterOptions = boolean | {
35
- concurrency: number;
36
- };
37
- /**
38
- * Object form of {@link sleep}'s argument: duration plus optional cancellation rejection override.
39
- * Structural typing allows class instances; {@link sleep} accepts any non-array object with a finite `ms`.
40
- */
41
- export interface SleepOptions {
42
- /** Duration in milliseconds */
43
- ms: number;
44
- /**
45
- * When {@link sleep}'s `cancel` runs: a non-empty string becomes {@link PromiseCancellationError}
46
- * with that message; an `Error` rejects with that same instance; `null` resolves the promise
47
- * instead of rejecting; omitted, `undefined`, or `''` use the default {@link PromiseCancellationError}.
48
- */
49
- cancelError?: string | Error | null;
50
- }
51
- /**
52
- * Argument to {@link sleep}: either milliseconds or an options object (see {@link SleepOptions}).
53
- */
54
- export type SleepArg = number | SleepOptions;
55
- /**
56
- * A promise with a {@linkcode cancel} method (e.g. from {@link sleep}).
57
- *
58
- * @typeParam T - Resolved value type; {@link sleep} uses `void`.
59
- */
60
- export type CancellablePromise<T = void> = Promise<T> & {
61
- cancel: () => void;
62
- };
63
- /**
64
- * Options for {@link waitForCondition}
65
- */
66
- export interface WaitForConditionOptions {
67
- /** Maximum time to wait in milliseconds.
68
- * @default 5000
69
- */
70
- waitMs?: number;
71
- /** Interval in milliseconds between condition checks.
72
- * @default 500
73
- */
74
- intervalMs?: number;
75
- /** Optional logger object with a debug method for logging wait progress */
76
- logger?: {
77
- debug: (...args: any[]) => void;
78
- };
79
- /** Custom error message (string) or Error object to throw if condition is not met.
80
- * If not provided, a default error is thrown
81
- */
82
- error?: string | Error;
83
- }
84
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/shared/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,YAAY,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG;IACtD,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KACjC,CAAC;IACF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACxB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/shared/types.ts"],"names":[],"mappings":""}
@@ -1,15 +0,0 @@
1
- import type { LongSleepOptions } from '../shared/types.js';
2
- /**
3
- * Sometimes `Promise.delay` or `setTimeout` are inaccurate for large wait
4
- * times. To safely wait for these long times (e.g. in the 5+ minute range), you
5
- * can use `longSleep`.
6
- *
7
- * You can also pass a `progressCb` option which is a callback function that
8
- * receives an object with the properties `elapsedMs`, `timeLeft`, and
9
- * `progress`. This will be called on every wait interval so you can do your
10
- * wait logging or whatever.
11
- * @param ms - The number of milliseconds to wait
12
- * @param options - Options for controlling the long sleep behavior
13
- */
14
- export declare function longSleep(ms: number, { thresholdMs, intervalMs, progressCb }?: LongSleepOptions): Promise<void>;
15
- //# sourceMappingURL=long-sleep.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"long-sleep.d.ts","sourceRoot":"","sources":["../../../lib/time/long-sleep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAKzD;;;;;;;;;;;GAWG;AACH,wBAAsB,SAAS,CAC7B,EAAE,EAAE,MAAM,EACV,EAAC,WAAkC,EAAE,UAAiB,EAAE,UAAiB,EAAC,GAAE,gBAAqB,GAChG,OAAO,CAAC,IAAI,CAAC,CAiBf"}
@@ -1,33 +0,0 @@
1
- import { sleep } from './sleep.js';
2
- const LONG_SLEEP_THRESHOLD = 5000; // anything over 5000ms will turn into a spin
3
- /**
4
- * Sometimes `Promise.delay` or `setTimeout` are inaccurate for large wait
5
- * times. To safely wait for these long times (e.g. in the 5+ minute range), you
6
- * can use `longSleep`.
7
- *
8
- * You can also pass a `progressCb` option which is a callback function that
9
- * receives an object with the properties `elapsedMs`, `timeLeft`, and
10
- * `progress`. This will be called on every wait interval so you can do your
11
- * wait logging or whatever.
12
- * @param ms - The number of milliseconds to wait
13
- * @param options - Options for controlling the long sleep behavior
14
- */
15
- export async function longSleep(ms, { thresholdMs = LONG_SLEEP_THRESHOLD, intervalMs = 1000, progressCb = null } = {}) {
16
- if (ms < thresholdMs) {
17
- return await sleep(ms);
18
- }
19
- const endAt = performance.now() + ms;
20
- let timeLeft;
21
- let elapsedMs = 0;
22
- do {
23
- const pre = performance.now();
24
- await sleep(intervalMs);
25
- const post = performance.now();
26
- timeLeft = endAt - post;
27
- elapsedMs = elapsedMs + (post - pre);
28
- if (typeof progressCb === 'function') {
29
- progressCb({ elapsedMs: Math.round(elapsedMs), timeLeft: Math.round(timeLeft), progress: elapsedMs / ms });
30
- }
31
- } while (timeLeft > 0);
32
- }
33
- //# sourceMappingURL=long-sleep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"long-sleep.js","sourceRoot":"","sources":["../../../lib/time/long-sleep.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEjC,MAAM,oBAAoB,GAAG,IAAI,CAAC,CAAC,6CAA6C;AAEhF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,EAAU,EACV,EAAC,WAAW,GAAG,oBAAoB,EAAE,UAAU,GAAG,IAAI,EAAE,UAAU,GAAG,IAAI,KAAsB,EAAE;IAEjG,IAAI,EAAE,GAAG,WAAW,EAAE,CAAC;QACrB,OAAO,MAAM,KAAK,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IACD,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IACrC,IAAI,QAAgB,CAAC;IACrB,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,GAAG,CAAC;QACF,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAC9B,MAAM,KAAK,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAC/B,QAAQ,GAAG,KAAK,GAAG,IAAI,CAAC;QACxB,SAAS,GAAG,SAAS,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;QACrC,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE,CAAC;YACrC,UAAU,CAAC,EAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,EAAC,CAAC,CAAC;QAC3G,CAAC;IACH,CAAC,QAAQ,QAAQ,GAAG,CAAC,EAAE;AACzB,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * An async/await way of running a method until it doesn't throw an error
3
- * @param times - The maximum number of times to retry the function
4
- * @param fn - The async function to retry
5
- * @param args - Arguments to pass to the function
6
- */
7
- export declare function retry<T = any>(times: number, fn: (...args: any[]) => Promise<T>, ...args: any[]): Promise<T | null>;
8
- /**
9
- * You can also use `retryInterval` to add a sleep in between retries. This can
10
- * be useful if you want to throttle how fast we retry.
11
- * @param times - The maximum number of times to retry the function
12
- * @param sleepMs - The number of milliseconds to wait between retries
13
- * @param fn - The async function to retry
14
- * @param args - Arguments to pass to the function
15
- */
16
- export declare function retryInterval<T = any>(times: number, sleepMs: number, fn: (...args: any[]) => Promise<T>, ...args: any[]): Promise<T | null>;
17
- //# sourceMappingURL=retry.d.ts.map