appium-espresso-driver 10.2.0 → 10.3.0

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 (639) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/server/builder.d.ts +9 -0
  3. package/build/lib/commands/server/builder.d.ts.map +1 -1
  4. package/build/lib/commands/server/builder.js +23 -0
  5. package/build/lib/commands/server/builder.js.map +1 -1
  6. package/build/lib/commands/server/hints.d.ts +28 -0
  7. package/build/lib/commands/server/hints.d.ts.map +1 -0
  8. package/build/lib/commands/server/hints.js +54 -0
  9. package/build/lib/commands/server/hints.js.map +1 -0
  10. package/build/lib/commands/server/runner.d.ts +7 -0
  11. package/build/lib/commands/server/runner.d.ts.map +1 -1
  12. package/build/lib/commands/server/runner.js +43 -4
  13. package/build/lib/commands/server/runner.js.map +1 -1
  14. package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
  15. package/espresso-server/app/build.gradle.kts +91 -1
  16. package/espresso-server/app/src/androidTestShaded/AndroidManifest.xml +16 -0
  17. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.bin +0 -0
  18. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.lock +0 -0
  19. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  20. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +1 -1
  21. package/espresso-server/buildSrc/build/classes/kotlin/main/META-INF/buildSrc.kotlin_module +0 -0
  22. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/AnnotationSkipper$visitField$1$1.class +0 -0
  23. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/AnnotationSkipper$visitMethod$1$1.class +0 -0
  24. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/AnnotationSkipper.class +0 -0
  25. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/MemberRef.class +0 -0
  26. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/PrefixRemapper.class +0 -0
  27. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask$run$$inlined$groupingBy$1.class +0 -0
  28. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask$run$$inlined$sortedByDescending$1.class +0 -0
  29. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask$run$9$1.class +0 -0
  30. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask$run$remapper$1.class +0 -0
  31. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocateClassesTask.class +0 -0
  32. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt$memberReferences$1$visitMethod$1.class +0 -0
  33. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt$memberReferences$1.class +0 -0
  34. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt$referencedClasses$collector$1.class +0 -0
  35. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt$shareNonPublicDependents$Declared.class +0 -0
  36. package/espresso-server/buildSrc/build/classes/kotlin/main/io/appium/espressoserver/gradle/RelocationKt.class +0 -0
  37. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  38. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  39. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  40. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  41. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  42. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  43. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  44. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  45. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  46. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  47. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  48. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  49. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  50. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  51. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  52. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  53. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  54. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  55. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  56. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  57. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  58. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  59. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  60. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  61. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  62. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  63. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  64. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  65. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  66. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  67. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  68. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  69. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
  70. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
  71. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
  72. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  73. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
  74. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  75. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  76. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  77. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  78. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  79. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  80. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  81. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  82. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  83. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  84. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  85. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  86. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  87. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  88. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  89. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  90. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  91. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  92. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  93. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  94. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  95. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  96. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  97. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  98. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  99. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  100. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
  101. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  102. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  103. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  104. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  105. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  106. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  107. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  108. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  109. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  110. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  111. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  112. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  113. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  114. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  115. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  116. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  117. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  118. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  119. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
  120. package/espresso-server/buildSrc/build/kotlin/compileKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  121. package/espresso-server/buildSrc/build/libs/buildSrc.jar +0 -0
  122. package/espresso-server/buildSrc/build.gradle.kts +6 -0
  123. package/espresso-server/buildSrc/src/main/kotlin/io/appium/espressoserver/gradle/RelocateClassesTask.kt +141 -0
  124. package/espresso-server/buildSrc/src/main/kotlin/io/appium/espressoserver/gradle/Relocation.kt +342 -0
  125. package/espresso-server/buildSrc/src/test/kotlin/io/appium/espressoserver/gradle/RelocationTest.kt +186 -0
  126. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/handlers/ListIdlingResources.kt +2 -1
  127. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/ShadingHelpers.kt +45 -0
  128. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
  129. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/http/response/AppiumResponse.kt +3 -2
  130. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/model/HamcrestMatcher.kt +8 -5
  131. package/espresso-server/library/src/test/java/io/appium/espressoserver/test/helpers/ShadingHelpersTest.kt +37 -0
  132. package/lib/commands/server/builder.ts +29 -0
  133. package/lib/commands/server/hints.ts +69 -0
  134. package/lib/commands/server/runner.ts +53 -5
  135. package/node_modules/{appium-android-driver → @appium/base-driver}/node_modules/asyncbox/README.md +1 -1
  136. package/node_modules/@appium/base-driver/node_modules/asyncbox/lib/index.ts +28 -0
  137. package/node_modules/{appium-android-driver → @appium/base-driver}/node_modules/asyncbox/package.json +26 -12
  138. package/node_modules/{appium-adb → @appium/support}/node_modules/asyncbox/README.md +1 -1
  139. 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
  140. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncfilter.d.ts.map +1 -0
  141. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/cjs/lib}/asyncfilter.js +6 -3
  142. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncfilter.js.map +1 -0
  143. 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
  144. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncmap.d.ts.map +1 -0
  145. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/cjs/lib}/asyncmap.js +6 -3
  146. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/asyncmap.js.map +1 -0
  147. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.d.ts.map +1 -0
  148. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.js +55 -0
  149. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/errors.js.map +1 -0
  150. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.d.ts +12 -0
  151. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.d.ts.map +1 -0
  152. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.js +28 -0
  153. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/index.js.map +1 -0
  154. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts +3 -0
  155. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.d.ts.map +1 -0
  156. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.js +15 -0
  157. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/limit-function.js.map +1 -0
  158. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/lock.d.ts.map +1 -0
  159. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/lock → @appium/support/node_modules/asyncbox/build/cjs/lib}/lock.js +15 -21
  160. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/lock.js.map +1 -0
  161. 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
  162. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.d.ts.map +1 -0
  163. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.js +36 -0
  164. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/long-sleep.js.map +1 -0
  165. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.d.ts.map +1 -0
  166. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.js +57 -0
  167. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/retry.js.map +1 -0
  168. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/sleep.d.ts +1 -1
  169. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/sleep.d.ts.map +1 -0
  170. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/sleep.js +7 -4
  171. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/sleep.js.map +1 -0
  172. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.d.ts.map +1 -0
  173. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/types.js +3 -0
  174. 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
  175. 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
  176. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/wait-for-condition.d.ts.map +1 -0
  177. 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
  178. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/wait-for-condition.js.map +1 -0
  179. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/with-timeout.d.ts.map +1 -0
  180. 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
  181. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/lib/with-timeout.js.map +1 -0
  182. package/node_modules/@appium/support/node_modules/asyncbox/build/cjs/package.json +3 -0
  183. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts +9 -0
  184. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.d.ts.map +1 -0
  185. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/esm/lib}/asyncfilter.js +2 -2
  186. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncfilter.js.map +1 -0
  187. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/esm/lib}/asyncmap.d.ts +1 -1
  188. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncmap.d.ts.map +1 -0
  189. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/collections → @appium/support/node_modules/asyncbox/build/esm/lib}/asyncmap.js +2 -2
  190. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/asyncmap.js.map +1 -0
  191. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/errors.d.ts.map +1 -0
  192. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/errors.js.map +1 -0
  193. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.d.ts +12 -0
  194. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.d.ts.map +1 -0
  195. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.js +10 -0
  196. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/index.js.map +1 -0
  197. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.d.ts +3 -0
  198. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.d.ts.map +1 -0
  199. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.js +12 -0
  200. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/limit-function.js.map +1 -0
  201. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/lock.d.ts.map +1 -0
  202. package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/lock → @appium/support/node_modules/asyncbox/build/esm/lib}/lock.js +3 -13
  203. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/lock.js.map +1 -0
  204. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts +15 -0
  205. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.d.ts.map +1 -0
  206. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/long-sleep.js.map +1 -0
  207. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/retry.d.ts.map +1 -0
  208. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/retry.js.map +1 -0
  209. 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
  210. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/sleep.d.ts.map +1 -0
  211. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/esm/lib}/sleep.js +1 -1
  212. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/sleep.js.map +1 -0
  213. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/types.d.ts.map +1 -0
  214. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/esm/lib}/types.js.map +1 -1
  215. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts +18 -0
  216. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.d.ts.map +1 -0
  217. 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
  218. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/wait-for-condition.js.map +1 -0
  219. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/with-timeout.d.ts.map +1 -0
  220. package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/esm/lib}/with-timeout.js +1 -1
  221. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/lib/with-timeout.js.map +1 -0
  222. package/node_modules/@appium/support/node_modules/asyncbox/build/esm/package.json +3 -0
  223. package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/collections → @appium/support/node_modules/asyncbox/lib}/asyncfilter.ts +3 -3
  224. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/collections → @appium/support/node_modules/asyncbox/lib}/asyncmap.ts +3 -3
  225. package/node_modules/@appium/support/node_modules/asyncbox/lib/index.ts +28 -0
  226. package/node_modules/@appium/support/node_modules/asyncbox/lib/limit-function.ts +18 -0
  227. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/lock → @appium/support/node_modules/asyncbox/lib}/lock.ts +6 -13
  228. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/long-sleep.ts +1 -1
  229. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/sleep.ts +2 -2
  230. package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/wait-for-condition.ts +2 -2
  231. package/node_modules/{appium-chromedriver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/with-timeout.ts +1 -1
  232. package/node_modules/{appium-adb → @appium/support}/node_modules/asyncbox/package.json +26 -12
  233. package/node_modules/@appium/support/node_modules/p-limit/index.d.ts +138 -0
  234. package/node_modules/@appium/support/node_modules/p-limit/index.js +148 -0
  235. package/node_modules/@appium/support/node_modules/p-limit/license +9 -0
  236. package/node_modules/@appium/support/node_modules/p-limit/package.json +58 -0
  237. package/node_modules/@appium/support/node_modules/p-limit/readme.md +183 -0
  238. package/node_modules/appium-adb/CHANGELOG.md +7 -0
  239. package/node_modules/appium-adb/package.json +3 -3
  240. package/node_modules/appium-android-driver/CHANGELOG.md +23 -0
  241. package/node_modules/appium-android-driver/build/lib/commands/bidi/helpers.d.ts +10 -0
  242. package/node_modules/appium-android-driver/build/lib/commands/bidi/helpers.d.ts.map +1 -0
  243. package/node_modules/appium-android-driver/build/lib/commands/bidi/helpers.js +15 -0
  244. package/node_modules/appium-android-driver/build/lib/commands/bidi/helpers.js.map +1 -0
  245. package/node_modules/appium-android-driver/build/lib/commands/bidi/logcat-level.d.ts +9 -0
  246. package/node_modules/appium-android-driver/build/lib/commands/bidi/logcat-level.d.ts.map +1 -0
  247. package/node_modules/appium-android-driver/build/lib/commands/bidi/logcat-level.js +37 -0
  248. package/node_modules/appium-android-driver/build/lib/commands/bidi/logcat-level.js.map +1 -0
  249. package/node_modules/appium-android-driver/build/lib/commands/device/common.d.ts.map +1 -1
  250. package/node_modules/appium-android-driver/build/lib/commands/device/common.js +2 -0
  251. package/node_modules/appium-android-driver/build/lib/commands/device/common.js.map +1 -1
  252. package/node_modules/appium-android-driver/build/lib/commands/log.d.ts.map +1 -1
  253. package/node_modules/appium-android-driver/build/lib/commands/log.js +5 -1
  254. package/node_modules/appium-android-driver/build/lib/commands/log.js.map +1 -1
  255. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts.map +1 -1
  256. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js +2 -4
  257. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js.map +1 -1
  258. package/node_modules/appium-android-driver/lib/commands/bidi/helpers.ts +16 -0
  259. package/node_modules/appium-android-driver/lib/commands/bidi/logcat-level.ts +40 -0
  260. package/node_modules/appium-android-driver/lib/commands/device/common.ts +2 -0
  261. package/node_modules/appium-android-driver/lib/commands/log.ts +5 -1
  262. package/node_modules/appium-android-driver/lib/commands/media-stream/exports.ts +2 -11
  263. package/node_modules/appium-android-driver/package.json +5 -5
  264. package/node_modules/appium-chromedriver/CHANGELOG.md +7 -0
  265. package/node_modules/appium-chromedriver/config/mapping.json +1 -0
  266. package/node_modules/appium-chromedriver/package.json +2 -2
  267. package/node_modules/asyncbox/README.md +1 -1
  268. package/node_modules/asyncbox/lib/index.ts +11 -11
  269. package/node_modules/asyncbox/package.json +12 -26
  270. package/node_modules/bare-buffer/CMakeLists.txt +3 -3
  271. package/node_modules/bare-buffer/package.json +1 -1
  272. package/node_modules/bare-buffer/prebuilds/android-arm/bare-buffer.bare +0 -0
  273. package/node_modules/bare-buffer/prebuilds/android-arm64/bare-buffer.bare +0 -0
  274. package/node_modules/bare-buffer/prebuilds/android-ia32/bare-buffer.bare +0 -0
  275. package/node_modules/bare-buffer/prebuilds/android-x64/bare-buffer.bare +0 -0
  276. package/node_modules/bare-buffer/prebuilds/darwin-arm64/bare-buffer.bare +0 -0
  277. package/node_modules/bare-buffer/prebuilds/darwin-x64/bare-buffer.bare +0 -0
  278. package/node_modules/bare-buffer/prebuilds/ios-arm64/bare-buffer.bare +0 -0
  279. package/node_modules/bare-buffer/prebuilds/ios-arm64-simulator/bare-buffer.bare +0 -0
  280. package/node_modules/bare-buffer/prebuilds/ios-x64-simulator/bare-buffer.bare +0 -0
  281. package/node_modules/bare-buffer/prebuilds/linux-arm64/bare-buffer.bare +0 -0
  282. package/node_modules/bare-buffer/prebuilds/linux-x64/bare-buffer.bare +0 -0
  283. package/node_modules/bare-buffer/prebuilds/win32-arm64/bare-buffer.bare +0 -0
  284. package/node_modules/bare-buffer/prebuilds/win32-x64/bare-buffer.bare +0 -0
  285. package/node_modules/bare-url/CMakeLists.txt +5 -5
  286. package/node_modules/bare-url/package.json +1 -1
  287. package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
  288. package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
  289. package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
  290. package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
  291. package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
  292. package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
  293. package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
  294. package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
  295. package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
  296. package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
  297. package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
  298. package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
  299. package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
  300. package/node_modules/ini/package.json +5 -5
  301. package/node_modules/io.appium.settings/CHANGELOG.md +7 -0
  302. package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
  303. package/node_modules/io.appium.settings/package.json +3 -3
  304. package/package.json +5 -5
  305. package/scripts/check-shaded-packages.mjs +106 -0
  306. package/node_modules/appium-adb/node_modules/asyncbox/lib/index.ts +0 -28
  307. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +0 -1
  308. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +0 -1
  309. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +0 -1
  310. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +0 -1
  311. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +0 -7
  312. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +0 -1
  313. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js +0 -35
  314. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +0 -1
  315. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts +0 -12
  316. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts.map +0 -1
  317. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js +0 -10
  318. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js.map +0 -1
  319. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +0 -1
  320. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.js.map +0 -1
  321. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +0 -1
  322. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.js.map +0 -1
  323. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +0 -1
  324. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +0 -1
  325. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +0 -1
  326. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +0 -1
  327. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.js.map +0 -1
  328. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +0 -1
  329. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.js.map +0 -1
  330. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +0 -1
  331. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +0 -1
  332. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +0 -1
  333. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +0 -1
  334. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/asyncmap.ts +0 -33
  335. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/limit-function.ts +0 -34
  336. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/index.ts +0 -28
  337. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/lock/lock.ts +0 -369
  338. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/long-sleep.ts +0 -38
  339. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/sleep.ts +0 -79
  340. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/with-timeout.ts +0 -43
  341. package/node_modules/appium-chromedriver/node_modules/asyncbox/LICENSE +0 -203
  342. package/node_modules/appium-chromedriver/node_modules/asyncbox/README.md +0 -272
  343. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +0 -9
  344. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +0 -1
  345. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +0 -1
  346. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +0 -1
  347. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +0 -1
  348. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +0 -7
  349. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +0 -1
  350. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js +0 -35
  351. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +0 -1
  352. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts +0 -12
  353. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts.map +0 -1
  354. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js +0 -10
  355. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js.map +0 -1
  356. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +0 -1
  357. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.js.map +0 -1
  358. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +0 -1
  359. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.js.map +0 -1
  360. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +0 -1
  361. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +0 -15
  362. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +0 -1
  363. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +0 -1
  364. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +0 -1
  365. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.js.map +0 -1
  366. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +0 -1
  367. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.js.map +0 -1
  368. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +0 -18
  369. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +0 -1
  370. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +0 -1
  371. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +0 -1
  372. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +0 -1
  373. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/asyncfilter.ts +0 -42
  374. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/limit-function.ts +0 -34
  375. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/index.ts +0 -28
  376. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/wait-for-condition.ts +0 -52
  377. package/node_modules/appium-chromedriver/node_modules/asyncbox/package.json +0 -60
  378. package/node_modules/asyncbox/build/esm/lib/errors.js +0 -46
  379. package/node_modules/asyncbox/build/esm/lib/long-sleep.js +0 -33
  380. package/node_modules/asyncbox/build/esm/lib/retry.js +0 -53
  381. package/node_modules/asyncbox/build/esm/lib/types.js +0 -2
  382. package/node_modules/asyncbox/lib/errors.ts +0 -51
  383. package/node_modules/asyncbox/lib/retry.ts +0 -61
  384. package/node_modules/asyncbox/lib/types.ts +0 -88
  385. package/node_modules/io.appium.settings/node_modules/asyncbox/LICENSE +0 -203
  386. package/node_modules/io.appium.settings/node_modules/asyncbox/README.md +0 -272
  387. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +0 -9
  388. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +0 -1
  389. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js +0 -36
  390. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +0 -1
  391. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +0 -9
  392. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +0 -1
  393. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js +0 -27
  394. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +0 -1
  395. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +0 -7
  396. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +0 -1
  397. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js +0 -35
  398. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js.map +0 -1
  399. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts +0 -12
  400. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts.map +0 -1
  401. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js +0 -10
  402. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js.map +0 -1
  403. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts +0 -74
  404. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +0 -1
  405. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js +0 -302
  406. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js.map +0 -1
  407. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts +0 -27
  408. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +0 -1
  409. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js +0 -46
  410. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js.map +0 -1
  411. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts +0 -84
  412. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts.map +0 -1
  413. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js +0 -2
  414. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js.map +0 -1
  415. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +0 -15
  416. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +0 -1
  417. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js +0 -33
  418. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js.map +0 -1
  419. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts +0 -17
  420. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts.map +0 -1
  421. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js +0 -53
  422. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js.map +0 -1
  423. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts +0 -20
  424. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +0 -1
  425. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js +0 -58
  426. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js.map +0 -1
  427. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +0 -18
  428. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +0 -1
  429. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js +0 -48
  430. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +0 -1
  431. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +0 -16
  432. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +0 -1
  433. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js +0 -42
  434. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js.map +0 -1
  435. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncfilter.ts +0 -42
  436. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncmap.ts +0 -33
  437. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/limit-function.ts +0 -34
  438. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/index.ts +0 -28
  439. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/lock/lock.ts +0 -369
  440. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/errors.ts +0 -51
  441. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/types.ts +0 -88
  442. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/long-sleep.ts +0 -38
  443. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/retry.ts +0 -61
  444. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/sleep.ts +0 -79
  445. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/wait-for-condition.ts +0 -52
  446. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/with-timeout.ts +0 -43
  447. package/node_modules/io.appium.settings/node_modules/asyncbox/package.json +0 -60
  448. /package/node_modules/{appium-adb → @appium/base-driver}/node_modules/asyncbox/LICENSE +0 -0
  449. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncfilter.d.ts +0 -0
  450. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncfilter.d.ts.map +0 -0
  451. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncfilter.js +0 -0
  452. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncfilter.js.map +0 -0
  453. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncmap.d.ts +0 -0
  454. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncmap.d.ts.map +0 -0
  455. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncmap.js +0 -0
  456. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/asyncmap.js.map +0 -0
  457. /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
  458. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/errors.d.ts.map +0 -0
  459. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/errors.js +0 -0
  460. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/errors.js.map +0 -0
  461. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/index.d.ts +0 -0
  462. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/index.d.ts.map +0 -0
  463. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/index.js +0 -0
  464. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/index.js.map +0 -0
  465. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/limit-function.d.ts +0 -0
  466. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/limit-function.d.ts.map +0 -0
  467. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/limit-function.js +0 -0
  468. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/limit-function.js.map +0 -0
  469. /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
  470. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/lock.d.ts.map +0 -0
  471. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/lock.js +0 -0
  472. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/lock.js.map +0 -0
  473. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/long-sleep.d.ts +0 -0
  474. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/long-sleep.d.ts.map +0 -0
  475. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/long-sleep.js +0 -0
  476. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/long-sleep.js.map +0 -0
  477. /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
  478. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/retry.d.ts.map +0 -0
  479. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/retry.js +0 -0
  480. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/retry.js.map +0 -0
  481. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/sleep.d.ts +0 -0
  482. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/sleep.d.ts.map +0 -0
  483. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/sleep.js +0 -0
  484. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/sleep.js.map +0 -0
  485. /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
  486. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/types.d.ts.map +0 -0
  487. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/types.js +0 -0
  488. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/types.js.map +0 -0
  489. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/wait-for-condition.d.ts +0 -0
  490. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/wait-for-condition.d.ts.map +0 -0
  491. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/wait-for-condition.js +0 -0
  492. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/wait-for-condition.js.map +0 -0
  493. /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
  494. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/with-timeout.d.ts.map +0 -0
  495. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/with-timeout.js +0 -0
  496. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/lib/with-timeout.js.map +0 -0
  497. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/cjs/package.json +0 -0
  498. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncfilter.d.ts +0 -0
  499. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncfilter.d.ts.map +0 -0
  500. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncfilter.js +0 -0
  501. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncfilter.js.map +0 -0
  502. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncmap.d.ts +0 -0
  503. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncmap.d.ts.map +0 -0
  504. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncmap.js +0 -0
  505. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/asyncmap.js.map +0 -0
  506. /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
  507. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/errors.d.ts.map +0 -0
  508. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/shared → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/errors.js +0 -0
  509. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/errors.js.map +0 -0
  510. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/index.d.ts +0 -0
  511. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/index.d.ts.map +0 -0
  512. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/index.js +0 -0
  513. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/index.js.map +0 -0
  514. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/limit-function.d.ts +0 -0
  515. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/limit-function.d.ts.map +0 -0
  516. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/limit-function.js +0 -0
  517. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/limit-function.js.map +0 -0
  518. /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
  519. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/lock.d.ts.map +0 -0
  520. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/lock.js +0 -0
  521. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/lock.js.map +0 -0
  522. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/long-sleep.d.ts +0 -0
  523. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/long-sleep.d.ts.map +0 -0
  524. /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
  525. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/long-sleep.js.map +0 -0
  526. /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
  527. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/retry.d.ts.map +0 -0
  528. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/time → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/retry.js +0 -0
  529. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/retry.js.map +0 -0
  530. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/sleep.d.ts +0 -0
  531. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/sleep.d.ts.map +0 -0
  532. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/sleep.js +0 -0
  533. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/sleep.js.map +0 -0
  534. /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
  535. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/types.d.ts.map +0 -0
  536. /package/node_modules/{appium-adb/node_modules/asyncbox/build/lib/shared → @appium/base-driver/node_modules/asyncbox/build/esm/lib}/types.js +0 -0
  537. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/types.js.map +0 -0
  538. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/wait-for-condition.d.ts +0 -0
  539. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/wait-for-condition.d.ts.map +0 -0
  540. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/wait-for-condition.js +0 -0
  541. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/wait-for-condition.js.map +0 -0
  542. /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
  543. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/with-timeout.d.ts.map +0 -0
  544. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/with-timeout.js +0 -0
  545. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/lib/with-timeout.js.map +0 -0
  546. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/build/esm/package.json +0 -0
  547. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/asyncfilter.ts +0 -0
  548. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/asyncmap.ts +0 -0
  549. /package/node_modules/{appium-adb/node_modules/asyncbox/lib/shared → @appium/base-driver/node_modules/asyncbox/lib}/errors.ts +0 -0
  550. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/limit-function.ts +0 -0
  551. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/lock.ts +0 -0
  552. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/long-sleep.ts +0 -0
  553. /package/node_modules/{appium-adb/node_modules/asyncbox/lib/time → @appium/base-driver/node_modules/asyncbox/lib}/retry.ts +0 -0
  554. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/sleep.ts +0 -0
  555. /package/node_modules/{appium-adb/node_modules/asyncbox/lib/shared → @appium/base-driver/node_modules/asyncbox/lib}/types.ts +0 -0
  556. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/wait-for-condition.ts +0 -0
  557. /package/node_modules/{asyncbox → @appium/base-driver/node_modules/asyncbox}/lib/with-timeout.ts +0 -0
  558. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/index.d.ts +0 -0
  559. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/index.js +0 -0
  560. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/license +0 -0
  561. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/package.json +0 -0
  562. /package/node_modules/{p-limit → @appium/base-driver/node_modules/p-limit}/readme.md +0 -0
  563. /package/node_modules/{appium-android-driver → @appium/support}/node_modules/asyncbox/LICENSE +0 -0
  564. /package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/cjs/lib}/errors.d.ts +0 -0
  565. /package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/lock → @appium/support/node_modules/asyncbox/build/cjs/lib}/lock.d.ts +0 -0
  566. /package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/cjs/lib}/retry.d.ts +0 -0
  567. /package/node_modules/{appium-chromedriver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/cjs/lib}/types.d.ts +0 -0
  568. /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
  569. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/errors.d.ts +0 -0
  570. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/esm/lib}/errors.js +0 -0
  571. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/lock.d.ts +0 -0
  572. /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
  573. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/retry.d.ts +0 -0
  574. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/time → @appium/support/node_modules/asyncbox/build/esm/lib}/retry.js +0 -0
  575. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/types.d.ts +0 -0
  576. /package/node_modules/{appium-android-driver/node_modules/asyncbox/build/lib/shared → @appium/support/node_modules/asyncbox/build/esm/lib}/types.js +0 -0
  577. /package/node_modules/{asyncbox/build/cjs → @appium/support/node_modules/asyncbox/build/esm}/lib/with-timeout.d.ts +0 -0
  578. /package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/shared → @appium/support/node_modules/asyncbox/lib}/errors.ts +0 -0
  579. /package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/time → @appium/support/node_modules/asyncbox/lib}/retry.ts +0 -0
  580. /package/node_modules/{appium-android-driver/node_modules/asyncbox/lib/shared → @appium/support/node_modules/asyncbox/lib}/types.ts +0 -0
  581. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncfilter.d.ts +0 -0
  582. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncfilter.d.ts.map +0 -0
  583. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncfilter.js +0 -0
  584. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncfilter.js.map +0 -0
  585. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncmap.d.ts +0 -0
  586. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncmap.d.ts.map +0 -0
  587. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncmap.js +0 -0
  588. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/asyncmap.js.map +0 -0
  589. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/limit-function.d.ts +0 -0
  590. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/limit-function.d.ts.map +0 -0
  591. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/limit-function.js +0 -0
  592. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/collections/limit-function.js.map +0 -0
  593. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/index.d.ts +0 -0
  594. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/index.d.ts.map +0 -0
  595. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/index.js +0 -0
  596. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/index.js.map +0 -0
  597. /package/node_modules/asyncbox/build/{esm/lib → lib/lock}/lock.d.ts +0 -0
  598. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/lock/lock.d.ts.map +0 -0
  599. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/lock/lock.js +0 -0
  600. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/lock/lock.js.map +0 -0
  601. /package/node_modules/asyncbox/build/{esm/lib → lib/shared}/errors.d.ts +0 -0
  602. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/shared/errors.d.ts.map +0 -0
  603. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/build/lib/shared/errors.js +0 -0
  604. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/shared/errors.js.map +0 -0
  605. /package/node_modules/asyncbox/build/{esm/lib → lib/shared}/types.d.ts +0 -0
  606. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/shared/types.d.ts.map +0 -0
  607. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/build/lib/shared/types.js +0 -0
  608. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/shared/types.js.map +0 -0
  609. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/long-sleep.d.ts +0 -0
  610. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/long-sleep.d.ts.map +0 -0
  611. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/build/lib/time/long-sleep.js +0 -0
  612. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/long-sleep.js.map +0 -0
  613. /package/node_modules/asyncbox/build/{esm/lib → lib/time}/retry.d.ts +0 -0
  614. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/retry.d.ts.map +0 -0
  615. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/build/lib/time/retry.js +0 -0
  616. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/retry.js.map +0 -0
  617. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/sleep.d.ts +0 -0
  618. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/sleep.d.ts.map +0 -0
  619. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/sleep.js +0 -0
  620. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/sleep.js.map +0 -0
  621. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/wait-for-condition.d.ts +0 -0
  622. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/wait-for-condition.d.ts.map +0 -0
  623. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/wait-for-condition.js +0 -0
  624. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/wait-for-condition.js.map +0 -0
  625. /package/node_modules/asyncbox/build/{esm/lib → lib/time}/with-timeout.d.ts +0 -0
  626. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/with-timeout.d.ts.map +0 -0
  627. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/with-timeout.js +0 -0
  628. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/build/lib/time/with-timeout.js.map +0 -0
  629. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/collections/asyncfilter.ts +0 -0
  630. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/collections/asyncmap.ts +0 -0
  631. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/collections/limit-function.ts +0 -0
  632. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/lock/lock.ts +0 -0
  633. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/lib/shared/errors.ts +0 -0
  634. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/lib/shared/types.ts +0 -0
  635. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/time/long-sleep.ts +0 -0
  636. /package/node_modules/{appium-chromedriver/node_modules/asyncbox → asyncbox}/lib/time/retry.ts +0 -0
  637. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/time/sleep.ts +0 -0
  638. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/time/wait-for-condition.ts +0 -0
  639. /package/node_modules/{appium-adb/node_modules/asyncbox → asyncbox}/lib/time/with-timeout.ts +0 -0
@@ -1,369 +0,0 @@
1
- import {AsyncResource} from 'node:async_hooks';
2
-
3
- import {LockQueueFullError, LockTimeoutError} from '../shared/errors.js';
4
-
5
- const DEFAULT_MAX_PENDING = 1000;
6
- // setTimeout fires after 1 ms for anything above this
7
- const MAX_TIMER_MS = 2 ** 31 - 1;
8
-
9
- /** Options shared by the {@link AsyncLock} constructor and {@link AsyncLock.acquire}. */
10
- export interface AsyncLockOptions {
11
- /**
12
- * Max ms a task may wait in the queue before failing. `0` means never.
13
- * @default 0
14
- */
15
- timeout?: number;
16
- /**
17
- * Max ms between calling `acquire` and the task finishing (queue wait included). `0` means never.
18
- * @default 0
19
- */
20
- maxOccupationTime?: number;
21
- /**
22
- * Max ms the task may run once it holds the lock; the lock is then released. `0` means never.
23
- * @default 0
24
- */
25
- maxExecutionTime?: number;
26
- /**
27
- * Max number of tasks waiting per key; further ones are rejected right away. `0` rejects every
28
- * task that would have to wait.
29
- * @default 1000
30
- */
31
- maxPending?: number;
32
- }
33
-
34
- /** Per-call options of {@link AsyncLock.acquire}; override the constructor ones. */
35
- export interface AcquireOptions extends AsyncLockOptions {
36
- /**
37
- * Put the task at the front of the queue instead of the back.
38
- * @default false
39
- */
40
- skipQueue?: boolean;
41
- }
42
-
43
- type Task<T> = () => T | PromiseLike<T>;
44
- type Outcome<T> = {value: T} | {error: unknown};
45
- type Queues = Map<string, Array<() => void>>;
46
- type ResolvedOptions = Required<AsyncLockOptions> & {skipQueue?: boolean};
47
- type ClaimOptions = Pick<ResolvedOptions, 'timeout' | 'maxPending' | 'skipQueue'>;
48
-
49
- /**
50
- * Promise-based mutex keyed by string. Tasks with the same key run one at a time, in FIFO order.
51
- *
52
- * Each task runs in the async context (`AsyncLocalStorage`) of the code that called
53
- * {@link AsyncLock.acquire}, not in the context of the task that held the lock before it.
54
- */
55
- export class AsyncLock {
56
- private readonly queues: Queues = new Map();
57
- private readonly defaults: Required<AsyncLockOptions>;
58
-
59
- constructor(opts: AsyncLockOptions = {}) {
60
- validateOptions(opts);
61
- this.defaults = {
62
- timeout: 0,
63
- maxOccupationTime: 0,
64
- maxExecutionTime: 0,
65
- maxPending: DEFAULT_MAX_PENDING,
66
- ...stripUndefined(opts),
67
- };
68
- }
69
-
70
- /**
71
- * Run `fn` once the lock for `key` is free and release the lock when it settles.
72
- *
73
- * Multiple keys are held together. They are acquired one by one in sorted order, whatever order
74
- * they are given in, so that overlapping calls cannot deadlock; duplicates are ignored. Keys that
75
- * are already held stay held while a later one is awaited. `timeout` and `maxOccupationTime` are
76
- * budgets for the whole call, while `maxExecutionTime` counts from the moment all the keys are
77
- * held and releases all of them.
78
- *
79
- * @param key - Resource key, or a non-empty array of keys
80
- * @param fn - Task to run while holding the lock; may be sync or async
81
- * @param opts - Per-call options
82
- * @returns The result of `fn`
83
- * @throws {TypeError} Synchronously, if an argument is invalid
84
- */
85
- acquire<T>(key: string | readonly string[], fn: Task<T>, opts: AcquireOptions = {}): Promise<T> {
86
- if (typeof fn !== 'function') {
87
- throw new TypeError('You must pass a function to execute');
88
- }
89
- if (
90
- typeof key !== 'string' &&
91
- !(Array.isArray(key) && key.length > 0 && [...key].every((k) => typeof k === 'string'))
92
- ) {
93
- throw new TypeError('The key must be a string or a non-empty array of strings');
94
- }
95
- validateOptions(opts);
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));
98
- const acquisition = new Acquisition(this.queues, keys, fn, {...this.defaults, ...stripUndefined(opts)});
99
- acquisition.enqueue();
100
- return acquisition.promise;
101
- }
102
-
103
- /**
104
- * Number of tasks waiting for `key`, not counting the running one.
105
- *
106
- * @param key - Resource key
107
- */
108
- getQueueLength(key: string): number {
109
- return this.queues.get(key)?.length ?? 0;
110
- }
111
-
112
- /**
113
- * Whether `key` has a running or pending task. Without a key, whether any key does.
114
- *
115
- * @param key - Resource key
116
- */
117
- isBusy(key?: string): boolean {
118
- return key === undefined ? this.queues.size > 0 : this.queues.has(key);
119
- }
120
- }
121
-
122
- /** The place of one acquisition in the queue of one key; once granted, it holds the key. */
123
- class KeyClaim {
124
- private holding = false;
125
- private dropped = false;
126
- private queueTimer?: NodeJS.Timeout;
127
-
128
- constructor(
129
- private readonly queues: Queues,
130
- private readonly key: string,
131
- private readonly opts: ClaimOptions,
132
- private readonly onGranted: () => void,
133
- private readonly onDenied: (error: Error) => void,
134
- ) {}
135
-
136
- /**
137
- * Take the key right away if it is free, otherwise wait in its queue.
138
- *
139
- * @returns Whether the key is held. If not, `onGranted` is called once it is, unless the claim
140
- * is denied.
141
- */
142
- join(): boolean {
143
- const {timeout, maxPending, skipQueue} = this.opts;
144
- const queue = this.queues.get(this.key);
145
- if (!queue) {
146
- this.queues.set(this.key, []);
147
- this.holding = true;
148
- return true;
149
- }
150
- if (queue.length >= maxPending) {
151
- this.onDenied(new LockQueueFullError(`Too many pending tasks in queue ${this.key}`));
152
- } else {
153
- if (skipQueue) {
154
- queue.unshift(this.grant);
155
- } else {
156
- queue.push(this.grant);
157
- }
158
- if (timeout) {
159
- this.queueTimer = setTimeout(
160
- () => this.onDenied(new LockTimeoutError(`async-lock timed out in queue ${this.key}`)),
161
- timeout,
162
- );
163
- }
164
- }
165
- return false;
166
- }
167
-
168
- /**
169
- * Leave the queue, or release the key if it is held. Idempotent.
170
- *
171
- * @returns The handover of the key to its next waiter. The caller must run it only after it
172
- * has released all of its keys, so that no waiter starts while a batch is partially released.
173
- */
174
- drop(): (() => void) | undefined {
175
- if (this.dropped) {
176
- return undefined;
177
- }
178
- this.dropped = true;
179
- clearTimeout(this.queueTimer);
180
- if (this.holding) {
181
- return this.releaseKey();
182
- }
183
- const queue = this.queues.get(this.key);
184
- const idx = queue?.indexOf(this.grant) ?? -1;
185
- if (idx >= 0) {
186
- queue?.splice(idx, 1);
187
- }
188
- return undefined;
189
- }
190
-
191
- private releaseKey(): (() => void) | undefined {
192
- const next = this.queues.get(this.key)?.shift();
193
- if (!next) {
194
- this.queues.delete(this.key);
195
- }
196
- return next;
197
- }
198
-
199
- // An arrow function, because this exact reference sits in the queue and is removed by drop()
200
- private readonly grant = (): void => {
201
- clearTimeout(this.queueTimer);
202
- this.holding = true;
203
- if (this.dropped) {
204
- // Dropped while the key was being handed over to it: pass the key on instead of using it
205
- this.releaseKey()?.();
206
- return;
207
- }
208
- this.onGranted();
209
- };
210
- }
211
-
212
- /**
213
- * One `acquire` call: its promise, its timers and its claims on all of its keys. The keys are
214
- * claimed one by one, the task runs once all of them are held and they are released together.
215
- */
216
- class Acquisition<T> {
217
- readonly promise: Promise<T>;
218
- private resolve!: (value: T) => void;
219
- private reject!: (error: unknown) => void;
220
- private readonly task: Task<T>;
221
- private readonly claims: KeyClaim[] = [];
222
- private running = false;
223
- private settled = false;
224
- private queueDeadline = 0;
225
- private occupationTimer?: NodeJS.Timeout;
226
- private executionTimer?: NodeJS.Timeout;
227
-
228
- constructor(
229
- private readonly queues: Queues,
230
- private readonly keys: string[],
231
- task: Task<T>,
232
- private readonly opts: ResolvedOptions,
233
- ) {
234
- // Queued tasks are started from the previous task's promise chain; bind to keep our context
235
- this.task = AsyncResource.bind(task);
236
- this.promise = new Promise<T>((resolve, reject) => {
237
- this.resolve = resolve;
238
- this.reject = reject;
239
- });
240
- }
241
-
242
- /** Start the task right away if all the keys are free, otherwise wait for them. */
243
- enqueue(): void {
244
- const {timeout, maxOccupationTime} = this.opts;
245
- if (timeout) {
246
- this.queueDeadline = performance.now() + timeout;
247
- }
248
- if (maxOccupationTime) {
249
- this.occupationTimer = setTimeout(() => this.expire(), maxOccupationTime);
250
- }
251
- this.claimKeys(0);
252
- }
253
-
254
- // Free keys are claimed in a loop, not recursively, so that a large batch cannot overflow the stack
255
- private claimKeys(from: number): void {
256
- const {maxPending, skipQueue} = this.opts;
257
- try {
258
- for (let index = from; index < this.keys.length; index++) {
259
- // The queue timeout is a budget for waiting for all the keys, not for each one
260
- const timeout = this.queueDeadline ? Math.max(this.queueDeadline - performance.now(), 1) : 0;
261
- const claim = new KeyClaim(
262
- this.queues,
263
- this.keys[index],
264
- {timeout, maxPending, skipQueue},
265
- () => this.claimKeys(index + 1),
266
- (error) => this.abort(error),
267
- );
268
- this.claims.push(claim);
269
- if (!claim.join()) {
270
- return;
271
- }
272
- }
273
- this.execute();
274
- } catch (error) {
275
- this.abort(error);
276
- }
277
- }
278
-
279
- private execute(): void {
280
- const {maxExecutionTime} = this.opts;
281
- this.running = true;
282
- if (maxExecutionTime) {
283
- this.executionTimer = setTimeout(
284
- () => this.abort(new LockTimeoutError(`Maximum execution time is exceeded ${this.keys.join(', ')}`)),
285
- maxExecutionTime,
286
- );
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);
299
- }
300
-
301
- private finish(outcome: Outcome<T>): void {
302
- this.settle(outcome);
303
- this.release();
304
- }
305
-
306
- // Reject and release all the keys; a running task is left to finish on its own
307
- private abort(error: unknown): void {
308
- this.settle({error});
309
- this.release();
310
- }
311
-
312
- // A running task keeps its keys until it finishes, an unstarted one gives them up
313
- private expire(): void {
314
- const keys = this.keys.join(', ');
315
- if (this.running) {
316
- this.settle({error: new LockTimeoutError(`Maximum occupation time is exceeded while executing ${keys}`)});
317
- } else {
318
- this.abort(new LockTimeoutError(`Maximum occupation time is exceeded in queue ${keys}`));
319
- }
320
- }
321
-
322
- private settle(outcome: Outcome<T>): void {
323
- if (this.settled) {
324
- return;
325
- }
326
- this.settled = true;
327
- clearTimeout(this.occupationTimer);
328
- if ('error' in outcome) {
329
- this.reject(outcome.error);
330
- } else {
331
- this.resolve(outcome.value);
332
- }
333
- }
334
-
335
- // Idempotent, so a task that outlives its execution timeout cannot release the keys twice
336
- private release(): void {
337
- clearTimeout(this.executionTimer);
338
- const handovers = this.claims
339
- .splice(0)
340
- .reverse()
341
- .map((claim) => claim.drop());
342
- for (const handover of handovers) {
343
- handover?.();
344
- }
345
- }
346
- }
347
-
348
- function validateOptions(opts: AcquireOptions): void {
349
- if (opts === null || typeof opts !== 'object') {
350
- throw new TypeError('The options must be an object');
351
- }
352
- for (const name of ['timeout', 'maxOccupationTime', 'maxExecutionTime'] as const) {
353
- const value = opts[name];
354
- if (value !== undefined && !(Number.isFinite(value) && value >= 0 && value <= MAX_TIMER_MS)) {
355
- throw new TypeError(`${name} must be a number of milliseconds between 0 and ${MAX_TIMER_MS}`);
356
- }
357
- }
358
- if (opts.skipQueue !== undefined && typeof opts.skipQueue !== 'boolean') {
359
- throw new TypeError('skipQueue must be a boolean');
360
- }
361
- const {maxPending} = opts;
362
- if (maxPending !== undefined && maxPending !== Infinity && !(Number.isInteger(maxPending) && maxPending >= 0)) {
363
- throw new TypeError('maxPending must be a non-negative integer or Infinity');
364
- }
365
- }
366
-
367
- function stripUndefined<T extends object>(obj: T): Partial<T> {
368
- return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined)) as Partial<T>;
369
- }
@@ -1,38 +0,0 @@
1
- import type {LongSleepOptions} from '../shared/types.js';
2
- import {sleep} from './sleep.js';
3
-
4
- const LONG_SLEEP_THRESHOLD = 5000; // anything over 5000ms will turn into a spin
5
-
6
- /**
7
- * Sometimes `Promise.delay` or `setTimeout` are inaccurate for large wait
8
- * times. To safely wait for these long times (e.g. in the 5+ minute range), you
9
- * can use `longSleep`.
10
- *
11
- * You can also pass a `progressCb` option which is a callback function that
12
- * receives an object with the properties `elapsedMs`, `timeLeft`, and
13
- * `progress`. This will be called on every wait interval so you can do your
14
- * wait logging or whatever.
15
- * @param ms - The number of milliseconds to wait
16
- * @param options - Options for controlling the long sleep behavior
17
- */
18
- export async function longSleep(
19
- ms: number,
20
- {thresholdMs = LONG_SLEEP_THRESHOLD, intervalMs = 1000, progressCb = null}: LongSleepOptions = {},
21
- ): Promise<void> {
22
- if (ms < thresholdMs) {
23
- return await sleep(ms);
24
- }
25
- const endAt = performance.now() + ms;
26
- let timeLeft: number;
27
- let elapsedMs = 0;
28
- do {
29
- const pre = performance.now();
30
- await sleep(intervalMs);
31
- const post = performance.now();
32
- timeLeft = endAt - post;
33
- elapsedMs = elapsedMs + (post - pre);
34
- if (typeof progressCb === 'function') {
35
- progressCb({elapsedMs: Math.round(elapsedMs), timeLeft: Math.round(timeLeft), progress: elapsedMs / ms});
36
- }
37
- } while (timeLeft > 0);
38
- }
@@ -1,79 +0,0 @@
1
- import {PromiseCancellationError} from '../shared/errors.js';
2
- import type {CancellablePromise, SleepArg, SleepOptions} from '../shared/types.js';
3
-
4
- /**
5
- * An async/await version of `setTimeout`. The returned promise has a `cancel()` method that clears
6
- * the timer and usually rejects with {@link PromiseCancellationError} unless you use the object form with
7
- * `cancelError: null` to resolve on cancel.
8
- *
9
- * @param ms - Milliseconds to wait
10
- * @returns A thenable you can `await`; call `.cancel()` to abort early.
11
- */
12
- export function sleep(ms: number): CancellablePromise<void>;
13
- /**
14
- * Object form: `ms` plus optional `cancelError` (non-empty string or `Error`, `null` to resolve on
15
- * cancel, or omitted / `undefined` / `''` for default {@link PromiseCancellationError}). Any non-array
16
- * object with a finite `ms` is accepted at runtime (including class instances), matching structural typing.
17
- *
18
- * @param options - Duration and optional cancellation behavior
19
- * @returns A thenable you can `await`; call `.cancel()` to abort early.
20
- */
21
- export function sleep(options: SleepOptions): CancellablePromise<void>;
22
- export function sleep(arg: SleepArg): CancellablePromise<void> {
23
- const {ms, cancelError} = parseSleepArg(arg);
24
- let timeoutId: NodeJS.Timeout | undefined;
25
- let resolveFn: ((value: void) => void) | undefined;
26
- let rejectFn: ((error: Error) => void) | undefined;
27
-
28
- const promise = new Promise<void>((resolve, reject) => {
29
- resolveFn = resolve;
30
- rejectFn = reject;
31
- timeoutId = setTimeout(resolve, ms);
32
- }) as CancellablePromise<void>;
33
-
34
- promise.cancel = () => {
35
- if (timeoutId) {
36
- clearTimeout(timeoutId);
37
- timeoutId = undefined;
38
- }
39
- if (cancelError === null) {
40
- resolveFn?.(undefined);
41
- } else {
42
- let err: Error;
43
- if (typeof cancelError === 'string' && cancelError) {
44
- err = new PromiseCancellationError(cancelError);
45
- } else if (cancelError instanceof Error) {
46
- err = cancelError;
47
- } else {
48
- err = new PromiseCancellationError();
49
- }
50
- rejectFn?.(err);
51
- }
52
- resolveFn = undefined;
53
- rejectFn = undefined;
54
- };
55
-
56
- return promise;
57
- }
58
-
59
- /** Non-array object values (including class instances); excludes `null` and arrays. */
60
- function isSleepArgObject(value: unknown): value is Record<PropertyKey, unknown> {
61
- return value !== null && typeof value === 'object' && !Array.isArray(value);
62
- }
63
-
64
- function parseSleepArg(arg: SleepArg): {ms: number; cancelError?: string | Error | null} {
65
- if (typeof arg === 'number') {
66
- if (!Number.isFinite(arg)) {
67
- throw new TypeError('sleep: expected a finite number or an object with ms');
68
- }
69
- return {ms: arg};
70
- }
71
- if (isSleepArgObject(arg)) {
72
- const ms = arg.ms;
73
- if (typeof ms !== 'number' || !Number.isFinite(ms)) {
74
- throw new TypeError('sleep: options.ms must be a finite number');
75
- }
76
- return {ms, cancelError: arg.cancelError as string | Error | null | undefined};
77
- }
78
- throw new TypeError('sleep: expected a finite number or an object with ms');
79
- }
@@ -1,43 +0,0 @@
1
- import {TimeoutError} from '../shared/errors.js';
2
-
3
- /**
4
- * Resolves with `promise` or rejects if it does not settle before `timeoutMs`.
5
- *
6
- * If the deadline passes first: with no third argument (or a falsy non-error value), rejects
7
- * with {@link TimeoutError} whose message includes `timeoutMs`; with a non-empty string,
8
- * rejects with {@link TimeoutError} using that message; with an `Error` instance, rejects
9
- * with that same instance.
10
- *
11
- * @param promise - Promise to race against the timeout.
12
- * @param timeoutMs - Maximum time in milliseconds before rejecting if `promise` has not settled.
13
- * @param messageOrError - Optional override for the timeout rejection: custom {@link TimeoutError}
14
- * message when the string is non-empty, or an existing `Error` to reject with verbatim.
15
- * Omitted, `undefined`, or other falsy non-error values use the default timeout message (includes `timeoutMs`).
16
- */
17
- export async function withTimeout<T>(
18
- promise: Promise<T>,
19
- timeoutMs: number,
20
- messageOrError?: string | Error,
21
- ): Promise<T> {
22
- let timer: NodeJS.Timeout | null = null;
23
- try {
24
- return await Promise.race([
25
- promise,
26
- new Promise<T>((_resolve, reject) => {
27
- timer = setTimeout(() => {
28
- if (typeof messageOrError === 'string' && messageOrError) {
29
- reject(new TimeoutError(messageOrError));
30
- } else if (!messageOrError) {
31
- reject(new TimeoutError(`Operation timed out after ${timeoutMs}ms`));
32
- } else {
33
- reject(messageOrError);
34
- }
35
- }, timeoutMs);
36
- }),
37
- ]);
38
- } finally {
39
- if (timer) {
40
- clearTimeout(timer);
41
- }
42
- }
43
- }