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
@@ -0,0 +1,28 @@
1
+ export {
2
+ AsyncboxError,
3
+ TimeoutError,
4
+ ConditionUnmetError,
5
+ LockTimeoutError,
6
+ LockQueueFullError,
7
+ PromiseCancellationError,
8
+ } from './errors.js';
9
+ export {sleep} from './sleep.js';
10
+ export {withTimeout} from './with-timeout.js';
11
+ export {longSleep} from './long-sleep.js';
12
+ export {retry, retryInterval} from './retry.js';
13
+ export {asyncmap} from './asyncmap.js';
14
+ export {asyncfilter} from './asyncfilter.js';
15
+ export {waitForCondition} from './wait-for-condition.js';
16
+ export {AsyncLock} from './lock.js';
17
+
18
+ export type {AsyncLockOptions, AcquireOptions} from './lock.js';
19
+ export type {
20
+ CancellablePromise,
21
+ Progress,
22
+ ProgressCallback,
23
+ LongSleepOptions,
24
+ MapFilterOptions,
25
+ SleepArg,
26
+ SleepOptions,
27
+ WaitForConditionOptions,
28
+ } from './types.js';
@@ -0,0 +1,18 @@
1
+ import type {limitFunction} from 'p-limit';
2
+
3
+ type PLimitModule = {limitFunction: typeof limitFunction};
4
+
5
+ // p-limit is ESM-only. tsc downlevels a plain `import()` in CommonJS output into a
6
+ // require()-in-a-microtask, which still hits Node's require(esm) interop and can race with a
7
+ // concurrent dynamic import() of the same module elsewhere in the process
8
+ // (ERR_REQUIRE_ESM_RACE_CONDITION). Route through `new Function` so tsc can't see or rewrite the
9
+ // import() call, keeping it a genuine native dynamic import in both the ESM and CJS builds.
10
+ const dynamicImport = new Function('specifier', 'return import(specifier)') as (
11
+ specifier: string,
12
+ ) => Promise<PLimitModule>;
13
+
14
+ let limitFunctionPromise: Promise<PLimitModule> | undefined;
15
+ export async function getLimitFunction() {
16
+ limitFunctionPromise ??= dynamicImport('p-limit');
17
+ return (await limitFunctionPromise).limitFunction;
18
+ }
@@ -1,6 +1,6 @@
1
1
  import {AsyncResource} from 'node:async_hooks';
2
2
 
3
- import {LockQueueFullError, LockTimeoutError} from '../shared/errors.js';
3
+ import {LockQueueFullError, LockTimeoutError} from './errors.js';
4
4
 
5
5
  const DEFAULT_MAX_PENDING = 1000;
6
6
  // setTimeout fires after 1 ms for anything above this
@@ -94,7 +94,7 @@ export class AsyncLock {
94
94
  }
95
95
  validateOptions(opts);
96
96
  // A canonical order keeps overlapping multi-key calls, e.g. ['a', 'b'] and ['b', 'a'], from deadlocking
97
- const keys = typeof key === 'string' ? [key] : [...new Set(key)].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
97
+ const keys = typeof key === 'string' ? [key] : [...new Set(key)].sort();
98
98
  const acquisition = new Acquisition(this.queues, keys, fn, {...this.defaults, ...stripUndefined(opts)});
99
99
  acquisition.enqueue();
100
100
  return acquisition.promise;
@@ -285,17 +285,10 @@ class Acquisition<T> {
285
285
  maxExecutionTime,
286
286
  );
287
287
  }
288
- void this.runTask();
289
- }
290
-
291
- private async runTask(): Promise<void> {
292
- let outcome: Outcome<T>;
293
- try {
294
- outcome = {value: await this.task()};
295
- } catch (error) {
296
- outcome = {error};
297
- }
298
- this.finish(outcome);
288
+ new Promise<T>((resolve) => resolve(this.task())).then(
289
+ (value) => this.finish({value}),
290
+ (error) => this.finish({error}),
291
+ );
299
292
  }
300
293
 
301
294
  private finish(outcome: Outcome<T>): void {
@@ -1,5 +1,5 @@
1
- import type {LongSleepOptions} from '../shared/types.js';
2
1
  import {sleep} from './sleep.js';
2
+ import type {LongSleepOptions} from './types.js';
3
3
 
4
4
  const LONG_SLEEP_THRESHOLD = 5000; // anything over 5000ms will turn into a spin
5
5
 
@@ -1,5 +1,5 @@
1
- import {PromiseCancellationError} from '../shared/errors.js';
2
- import type {CancellablePromise, SleepArg, SleepOptions} from '../shared/types.js';
1
+ import {PromiseCancellationError} from './errors.js';
2
+ import type {CancellablePromise, SleepArg, SleepOptions} from './types.js';
3
3
 
4
4
  /**
5
5
  * An async/await version of `setTimeout`. The returned promise has a `cancel()` method that clears
@@ -1,6 +1,6 @@
1
- import {ConditionUnmetError} from '../shared/errors.js';
2
- import type {WaitForConditionOptions} from '../shared/types.js';
1
+ import {ConditionUnmetError} from './errors.js';
3
2
  import {sleep} from './sleep.js';
3
+ import type {WaitForConditionOptions} from './types.js';
4
4
 
5
5
  /**
6
6
  * Takes a condition (a function returning a boolean or boolean promise), and
@@ -1,4 +1,4 @@
1
- import {TimeoutError} from '../shared/errors.js';
1
+ import {TimeoutError} from './errors.js';
2
2
 
3
3
  /**
4
4
  * Resolves with `promise` or rejects if it does not settle before `timeoutMs`.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asyncbox",
3
- "version": "7.0.0",
3
+ "version": "6.6.1",
4
4
  "description": "A collection of small async/await utilities",
5
5
  "keywords": [
6
6
  "async",
@@ -22,39 +22,53 @@
22
22
  },
23
23
  "files": [
24
24
  "lib/**/*",
25
- "build/lib/**/*"
25
+ "build/cjs/lib/**/*",
26
+ "build/cjs/package.json",
27
+ "build/esm/lib/**/*",
28
+ "build/esm/package.json"
26
29
  ],
27
30
  "type": "module",
28
- "module": "./build/lib/index.js",
29
- "types": "./build/lib/index.d.ts",
31
+ "main": "./build/cjs/lib/index.js",
32
+ "module": "./build/esm/lib/index.js",
33
+ "types": "./build/cjs/lib/index.d.ts",
30
34
  "exports": {
31
35
  ".": {
32
- "types": "./build/lib/index.d.ts",
33
- "default": "./build/lib/index.js"
36
+ "import": {
37
+ "types": "./build/esm/lib/index.d.ts",
38
+ "default": "./build/esm/lib/index.js"
39
+ },
40
+ "require": {
41
+ "types": "./build/cjs/lib/index.d.ts",
42
+ "default": "./build/cjs/lib/index.js"
43
+ }
34
44
  },
35
45
  "./package.json": "./package.json"
36
46
  },
37
47
  "scripts": {
38
- "build": "tsc -b",
48
+ "build": "tsc -b tsconfig.esm.json tsconfig.cjs.json",
49
+ "postbuild": "node scripts/postbuild.mjs",
39
50
  "clean": "node -e \"require('fs').rmSync('build', {recursive: true, force: true})\"",
40
51
  "rebuild": "npm run clean; npm run build",
41
52
  "dev": "npm run build -- --watch",
42
53
  "prepare": "npm run rebuild",
43
- "test": "node --test --enable-source-maps --test-force-exit --test-timeout=60000 \"./build/test/**/*.spec.js\"",
54
+ "test": "node --test --enable-source-maps --test-force-exit --test-timeout=60000 \"./build/esm/test/**/*.spec.js\" \"./test/*.spec.cjs\"",
44
55
  "lint": "oxlint -c oxlint.config.mjs .",
45
56
  "lint:fix": "oxlint -c oxlint.config.mjs --fix .",
46
57
  "format": "oxfmt -c oxfmt.config.mjs .",
47
58
  "format:check": "oxfmt -c oxfmt.config.mjs --check .",
48
59
  "watch": "npm run dev"
49
60
  },
61
+ "dependencies": {
62
+ "p-limit": "^7.2.0"
63
+ },
50
64
  "devDependencies": {
51
- "@appium/oxc-config": "^2.0.0-beta.2",
52
- "@appium/semantic-release-config": "^2.0.0-beta.1",
53
- "@appium/tsconfig": "^2.0.0-beta.1",
65
+ "@appium/oxc-config": "^1.1.0",
66
+ "@appium/semantic-release-config": "^1.1.0",
67
+ "@appium/tsconfig": "^1.2.0",
54
68
  "@types/node": "^26.1.0"
55
69
  },
56
70
  "engines": {
57
- "node": "^22.22.2 || ^24.15.0 || >=26.0.0",
71
+ "node": "^20.19.0 || ^22.12.0 || >=24.0.0",
58
72
  "npm": ">=10"
59
73
  }
60
74
  }
@@ -0,0 +1,138 @@
1
+ export type LimitFunction = {
2
+ /**
3
+ The number of promises that are currently running.
4
+ */
5
+ readonly activeCount: number;
6
+
7
+ /**
8
+ The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
9
+ */
10
+ readonly pendingCount: number;
11
+
12
+ /**
13
+ Get or set the concurrency limit.
14
+ */
15
+ concurrency: number;
16
+
17
+ /**
18
+ Discard pending promises that are waiting to run.
19
+
20
+ This might be useful if you want to tear down the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app.
21
+
22
+ Note: This does not cancel promises that are already running.
23
+
24
+ When `rejectOnClear` is enabled, pending promises are rejected with an `AbortError`.
25
+ This is recommended if you await the returned promises, for example with `Promise.all`, so pending tasks do not remain unresolved after `clearQueue()`.
26
+ */
27
+ clearQueue: () => void;
28
+
29
+ /**
30
+ Process an iterable of inputs with limited concurrency.
31
+
32
+ The mapper function receives the item value and its index.
33
+
34
+ If the iterable throws during iteration, the returned promise rejects with that error. Mapper functions that were already scheduled still run, and their results are discarded.
35
+
36
+ This is a convenience function for processing inputs that arrive in batches. For more complex use cases, see [p-map](https://github.com/sindresorhus/p-map).
37
+
38
+ @param iterable - An iterable containing an argument for the given function.
39
+ @param mapperFunction - Promise-returning/async function.
40
+ @returns A promise equivalent to `Promise.all(Array.from(iterable, (item, index) => limit(mapperFunction, item, index)))`.
41
+ */
42
+ map: <Input, ReturnType> (
43
+ iterable: Iterable<Input>,
44
+ mapperFunction: (input: Input, index: number) => PromiseLike<ReturnType> | ReturnType
45
+ ) => Promise<ReturnType[]>;
46
+
47
+ /**
48
+ @param fn - Promise-returning/async function.
49
+ @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions.
50
+
51
+ Warning: Avoid calling the same `limit` function inside a function that is already limited by it. This can create a deadlock where inner tasks never run. Use a separate limiter for inner tasks.
52
+
53
+ @returns The promise returned by calling `fn(...arguments)`.
54
+ */
55
+ <Arguments extends unknown[], ReturnType>(
56
+ function_: (...arguments_: Arguments) => PromiseLike<ReturnType> | ReturnType,
57
+ ...arguments_: Arguments
58
+ ): Promise<ReturnType>;
59
+ };
60
+
61
+ /**
62
+ Run multiple promise-returning & async functions with limited concurrency.
63
+
64
+ @param concurrency - Concurrency limit. Minimum: `1`. You can pass a number or an options object with a `concurrency` property.
65
+ @returns A `limit` function.
66
+
67
+ @example
68
+ ```
69
+ import pLimit from 'p-limit';
70
+
71
+ const limit = pLimit(1);
72
+
73
+ const input = [
74
+ limit(() => fetchSomething('foo')),
75
+ limit(() => fetchSomething('bar')),
76
+ limit(() => doSomething())
77
+ ];
78
+
79
+ // Only one promise is run at once
80
+ const result = await Promise.all(input);
81
+ console.log(result);
82
+ ```
83
+
84
+ @example
85
+ ```
86
+ import pLimit from 'p-limit';
87
+
88
+ const limit = pLimit({concurrency: 1});
89
+ ```
90
+ */
91
+ export default function pLimit(concurrency: number | Options): LimitFunction;
92
+
93
+ export type Options = {
94
+ /**
95
+ Concurrency limit.
96
+
97
+ Minimum: `1`.
98
+ */
99
+ readonly concurrency: number;
100
+
101
+ /**
102
+ Reject pending promises with an `AbortError` when `clearQueue()` is called.
103
+
104
+ Default: `false`.
105
+
106
+ This is recommended if you await the returned promises, for example with `Promise.all`, so pending tasks do not remain unresolved after `clearQueue()`.
107
+ */
108
+ readonly rejectOnClear?: boolean;
109
+ };
110
+
111
+ /**
112
+ Returns a function with limited concurrency.
113
+
114
+ The returned function manages its own concurrent executions, allowing you to call it multiple times without exceeding the specified concurrency limit.
115
+
116
+ Ideal for scenarios where you need to control the number of simultaneous executions of a single function, rather than managing concurrency across multiple functions.
117
+
118
+ @param function_ - Promise-returning/async function.
119
+ @return Function with limited concurrency.
120
+
121
+ @example
122
+ ```
123
+ import {limitFunction} from 'p-limit';
124
+
125
+ const limitedFunction = limitFunction(async () => {
126
+ return doSomething();
127
+ }, {concurrency: 1});
128
+
129
+ const input = Array.from({length: 10}, limitedFunction);
130
+
131
+ // Only one promise is run at once.
132
+ await Promise.all(input);
133
+ ```
134
+ */
135
+ export function limitFunction<Arguments extends unknown[], ReturnType>(
136
+ function_: (...arguments_: Arguments) => PromiseLike<ReturnType>,
137
+ options: Options
138
+ ): ((...arguments_: Arguments) => Promise<ReturnType>) & Pick<LimitFunction, 'clearQueue'>;
@@ -0,0 +1,148 @@
1
+ import Queue from 'yocto-queue';
2
+
3
+ export default function pLimit(concurrency) {
4
+ let rejectOnClear = false;
5
+
6
+ if (typeof concurrency === 'object') {
7
+ ({concurrency, rejectOnClear = false} = concurrency);
8
+ }
9
+
10
+ validateConcurrency(concurrency);
11
+
12
+ if (typeof rejectOnClear !== 'boolean') {
13
+ throw new TypeError('Expected `rejectOnClear` to be a boolean');
14
+ }
15
+
16
+ const queue = new Queue();
17
+ let activeCount = 0;
18
+
19
+ const resumeNext = () => {
20
+ // Process the next queued function if we're under the concurrency limit
21
+ if (activeCount < concurrency && queue.size > 0) {
22
+ activeCount++;
23
+ queue.dequeue().run();
24
+ }
25
+ };
26
+
27
+ const next = () => {
28
+ activeCount--;
29
+ resumeNext();
30
+ };
31
+
32
+ const run = async (function_, resolve, arguments_) => {
33
+ // Execute the function and capture the result promise
34
+ const result = (async () => function_(...arguments_))();
35
+
36
+ // Resolve immediately with the promise (don't wait for completion)
37
+ resolve(result);
38
+
39
+ // Wait for the function to complete (success or failure)
40
+ // We catch errors here to prevent unhandled rejections,
41
+ // but the original promise rejection is preserved for the caller
42
+ try {
43
+ await result;
44
+ } catch {}
45
+
46
+ // Decrement active count and process next queued function
47
+ next();
48
+ };
49
+
50
+ const enqueue = (function_, resolve, reject, arguments_) => {
51
+ const queueItem = {reject};
52
+
53
+ // Queue the internal resolve function instead of the run function
54
+ // to preserve the asynchronous execution context.
55
+ new Promise(internalResolve => { // eslint-disable-line promise/param-names
56
+ queueItem.run = internalResolve;
57
+ queue.enqueue(queueItem);
58
+ }).then(run.bind(undefined, function_, resolve, arguments_)); // eslint-disable-line promise/prefer-await-to-then
59
+
60
+ // Start processing immediately if we haven't reached the concurrency limit
61
+ if (activeCount < concurrency) {
62
+ resumeNext();
63
+ }
64
+ };
65
+
66
+ const generator = (function_, ...arguments_) => new Promise((resolve, reject) => {
67
+ enqueue(function_, resolve, reject, arguments_);
68
+ });
69
+
70
+ Object.defineProperties(generator, {
71
+ activeCount: {
72
+ get: () => activeCount,
73
+ },
74
+ pendingCount: {
75
+ get: () => queue.size,
76
+ },
77
+ clearQueue: {
78
+ value() {
79
+ if (!rejectOnClear) {
80
+ queue.clear();
81
+ return;
82
+ }
83
+
84
+ const abortError = AbortSignal.abort().reason;
85
+
86
+ while (queue.size > 0) {
87
+ queue.dequeue().reject(abortError);
88
+ }
89
+ },
90
+ },
91
+ concurrency: {
92
+ get: () => concurrency,
93
+
94
+ set(newConcurrency) {
95
+ validateConcurrency(newConcurrency);
96
+ concurrency = newConcurrency;
97
+
98
+ queueMicrotask(() => {
99
+ // eslint-disable-next-line no-unmodified-loop-condition
100
+ while (activeCount < concurrency && queue.size > 0) {
101
+ resumeNext();
102
+ }
103
+ });
104
+ },
105
+ },
106
+ map: {
107
+ async value(iterable, function_) {
108
+ const promises = [];
109
+
110
+ try {
111
+ Array.from(iterable, (value, index) => {
112
+ const promise = generator(function_, value, index);
113
+ promises.push(promise);
114
+ return promise;
115
+ });
116
+ } catch (error) {
117
+ // The iterable threw, so `Promise.all` never observes the already scheduled promises. Observe them here to avoid unhandled rejections.
118
+ for (const promise of promises) {
119
+ promise.catch(() => {}); // eslint-disable-line promise/prefer-await-to-then
120
+ }
121
+
122
+ throw error;
123
+ }
124
+
125
+ return Promise.all(promises);
126
+ },
127
+ },
128
+ });
129
+
130
+ return generator;
131
+ }
132
+
133
+ export function limitFunction(function_, options) {
134
+ const limit = pLimit(options);
135
+
136
+ const limitedFunction = (...arguments_) => limit(() => function_(...arguments_));
137
+ Object.defineProperty(limitedFunction, 'clearQueue', {
138
+ value: limit.clearQueue,
139
+ });
140
+
141
+ return limitedFunction;
142
+ }
143
+
144
+ function validateConcurrency(concurrency) {
145
+ if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
146
+ throw new TypeError('Expected `concurrency` to be a number from 1 and up');
147
+ }
148
+ }
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "p-limit",
3
+ "version": "7.3.3",
4
+ "description": "Run multiple promise-returning & async functions with limited concurrency",
5
+ "license": "MIT",
6
+ "repository": "sindresorhus/p-limit",
7
+ "funding": "https://github.com/sponsors/sindresorhus",
8
+ "author": {
9
+ "name": "Sindre Sorhus",
10
+ "email": "sindresorhus@gmail.com",
11
+ "url": "https://sindresorhus.com"
12
+ },
13
+ "type": "module",
14
+ "exports": {
15
+ "types": "./index.d.ts",
16
+ "default": "./index.js"
17
+ },
18
+ "sideEffects": false,
19
+ "engines": {
20
+ "node": ">=20"
21
+ },
22
+ "scripts": {
23
+ "test": "xo && ava && tsd",
24
+ "benchmark": "node benchmark.js"
25
+ },
26
+ "files": [
27
+ "index.js",
28
+ "index.d.ts"
29
+ ],
30
+ "keywords": [
31
+ "promise",
32
+ "limit",
33
+ "limited",
34
+ "concurrency",
35
+ "throttle",
36
+ "throat",
37
+ "rate",
38
+ "batch",
39
+ "ratelimit",
40
+ "task",
41
+ "queue",
42
+ "async",
43
+ "await",
44
+ "promises",
45
+ "bluebird"
46
+ ],
47
+ "dependencies": {
48
+ "yocto-queue": "^1.2.1"
49
+ },
50
+ "devDependencies": {
51
+ "ava": "^6.4.1",
52
+ "in-range": "^3.0.0",
53
+ "random-int": "^3.0.0",
54
+ "time-span": "^5.1.0",
55
+ "tsd": "^0.33.0",
56
+ "xo": "^1.2.1"
57
+ }
58
+ }