appium-espresso-driver 10.0.3 → 10.2.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 (457) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/execute-method-map.d.ts +16 -0
  3. package/build/lib/execute-method-map.d.ts.map +1 -1
  4. package/espresso-server/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk +0 -0
  5. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.bin +0 -0
  6. package/espresso-server/buildSrc/.gradle/9.7.1/executionHistory/executionHistory.lock +0 -0
  7. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  8. package/espresso-server/buildSrc/.gradle/buildOutputCleanup/cache.properties +1 -1
  9. package/espresso-server/buildSrc/build/kotlin/compileKotlin/cacheable/last-build.bin +0 -0
  10. package/espresso-server/gradle/libs.versions.toml +2 -0
  11. package/espresso-server/library/build.gradle.kts +3 -0
  12. package/espresso-server/library/src/composeOn/java/io/appium/espressoserver/lib/helpers/ComposeNodeFinder.kt +3 -3
  13. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/handlers/exceptions/XPathLookupException.kt +10 -2
  14. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
  15. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/helpers/ViewFinder.kt +3 -0
  16. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/model/SourceDocument.kt +4 -21
  17. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/model/XPathQuery.kt +64 -0
  18. package/espresso-server/library/src/main/java/io/appium/espressoserver/lib/viewmatcher/WithXPath.kt +3 -3
  19. package/espresso-server/library/src/test/java/io/appium/espressoserver/test/helpers/XPathQueryTests.kt +101 -0
  20. package/espresso-server/settings.gradle.kts +4 -0
  21. package/node_modules/@appium/base-driver/build/lib/basedriver/helpers/caps.js +1 -1
  22. package/node_modules/@appium/base-driver/lib/basedriver/helpers/caps.ts +1 -1
  23. package/node_modules/@appium/base-driver/package.json +4 -4
  24. package/node_modules/@appium/logger/CHANGELOG.md +37 -0
  25. package/node_modules/@appium/logger/package.json +2 -2
  26. package/node_modules/@appium/schema/package.json +2 -2
  27. package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
  28. package/node_modules/@appium/support/build/lib/zip.js +11 -11
  29. package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
  30. package/node_modules/@appium/support/lib/zip.ts +11 -12
  31. package/node_modules/@appium/support/node_modules/teen_process/CHANGELOG.md +1122 -0
  32. package/node_modules/@appium/support/node_modules/teen_process/LICENSE +201 -0
  33. package/node_modules/@appium/support/node_modules/teen_process/README.md +270 -0
  34. package/node_modules/@appium/support/node_modules/teen_process/lib/circular-buffer.ts +60 -0
  35. package/node_modules/@appium/support/node_modules/teen_process/lib/exec.ts +176 -0
  36. package/node_modules/@appium/support/node_modules/teen_process/lib/helpers.ts +45 -0
  37. package/node_modules/@appium/support/node_modules/teen_process/lib/index.ts +4 -0
  38. package/node_modules/@appium/support/node_modules/teen_process/lib/subprocess.ts +358 -0
  39. package/node_modules/@appium/support/node_modules/teen_process/lib/types.ts +83 -0
  40. package/node_modules/@appium/support/node_modules/teen_process/package.json +81 -0
  41. package/node_modules/@appium/support/package.json +5 -5
  42. package/node_modules/@appium/types/package.json +5 -5
  43. package/node_modules/appium-adb/CHANGELOG.md +14 -0
  44. package/node_modules/appium-adb/node_modules/asyncbox/LICENSE +203 -0
  45. package/node_modules/appium-adb/node_modules/asyncbox/README.md +272 -0
  46. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
  47. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
  48. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
  49. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
  50. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
  51. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
  52. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
  53. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
  54. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
  55. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
  56. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
  57. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
  58. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.d.ts +12 -0
  59. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
  60. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.js +10 -0
  61. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.js.map +1 -0
  62. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
  63. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
  64. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
  65. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
  66. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
  67. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
  68. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
  69. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
  70. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
  71. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
  72. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.js +2 -0
  73. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
  74. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
  75. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
  76. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
  77. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
  78. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
  79. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
  80. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.js +53 -0
  81. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
  82. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
  83. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
  84. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
  85. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
  86. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
  87. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
  88. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
  89. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
  90. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
  91. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
  92. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
  93. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
  94. package/node_modules/appium-adb/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
  95. package/node_modules/appium-adb/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
  96. package/node_modules/appium-adb/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
  97. package/node_modules/appium-adb/node_modules/asyncbox/lib/index.ts +28 -0
  98. package/node_modules/appium-adb/node_modules/asyncbox/lib/lock/lock.ts +369 -0
  99. package/node_modules/appium-adb/node_modules/asyncbox/lib/shared/errors.ts +51 -0
  100. package/node_modules/appium-adb/node_modules/asyncbox/lib/shared/types.ts +88 -0
  101. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
  102. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/retry.ts +61 -0
  103. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/sleep.ts +79 -0
  104. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
  105. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
  106. package/node_modules/appium-adb/node_modules/asyncbox/package.json +60 -0
  107. package/node_modules/appium-adb/package.json +4 -4
  108. package/node_modules/appium-android-driver/CHANGELOG.md +36 -0
  109. package/node_modules/appium-android-driver/README.md +4 -0
  110. package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.d.ts +16 -0
  111. package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.d.ts.map +1 -0
  112. package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.js +42 -0
  113. package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.js.map +1 -0
  114. package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.d.ts +11 -0
  115. package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.d.ts.map +1 -0
  116. package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.js +96 -0
  117. package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.js.map +1 -0
  118. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts +14 -0
  119. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts.map +1 -0
  120. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js +16 -0
  121. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js.map +1 -0
  122. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts +42 -0
  123. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts.map +1 -0
  124. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js +127 -0
  125. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js.map +1 -0
  126. package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.d.ts +6 -0
  127. package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.d.ts.map +1 -0
  128. package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.js +17 -0
  129. package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.js.map +1 -0
  130. package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.d.ts +12 -0
  131. package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.d.ts.map +1 -0
  132. package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.js +196 -0
  133. package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.js.map +1 -0
  134. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts +65 -0
  135. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts.map +1 -0
  136. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js +339 -0
  137. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js.map +1 -0
  138. package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.d.ts +67 -0
  139. package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.d.ts.map +1 -0
  140. package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.js +2 -0
  141. package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.js.map +1 -0
  142. package/node_modules/appium-android-driver/build/lib/driver.d.ts +20 -0
  143. package/node_modules/appium-android-driver/build/lib/driver.d.ts.map +1 -1
  144. package/node_modules/appium-android-driver/build/lib/driver.js +9 -0
  145. package/node_modules/appium-android-driver/build/lib/driver.js.map +1 -1
  146. package/node_modules/appium-android-driver/build/lib/execute-method-map.d.ts +16 -0
  147. package/node_modules/appium-android-driver/build/lib/execute-method-map.d.ts.map +1 -1
  148. package/node_modules/appium-android-driver/build/lib/execute-method-map.js +16 -0
  149. package/node_modules/appium-android-driver/build/lib/execute-method-map.js.map +1 -1
  150. package/node_modules/appium-android-driver/lib/commands/media-stream/batcher.ts +44 -0
  151. package/node_modules/appium-android-driver/lib/commands/media-stream/capabilities.ts +101 -0
  152. package/node_modules/appium-android-driver/lib/commands/media-stream/constants.ts +15 -0
  153. package/node_modules/appium-android-driver/lib/commands/media-stream/exports.ts +182 -0
  154. package/node_modules/appium-android-driver/lib/commands/media-stream/jpeg.ts +16 -0
  155. package/node_modules/appium-android-driver/lib/commands/media-stream/sps.ts +208 -0
  156. package/node_modules/appium-android-driver/lib/commands/media-stream/stream.ts +385 -0
  157. package/node_modules/appium-android-driver/lib/commands/media-stream/types.ts +65 -0
  158. package/node_modules/appium-android-driver/lib/driver.ts +16 -0
  159. package/node_modules/appium-android-driver/lib/execute-method-map.ts +17 -0
  160. package/node_modules/appium-android-driver/node_modules/asyncbox/LICENSE +203 -0
  161. package/node_modules/appium-android-driver/node_modules/asyncbox/README.md +272 -0
  162. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
  163. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
  164. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
  165. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
  166. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
  167. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
  168. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
  169. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
  170. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
  171. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
  172. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
  173. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
  174. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts +12 -0
  175. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
  176. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js +10 -0
  177. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js.map +1 -0
  178. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
  179. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
  180. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
  181. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
  182. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
  183. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
  184. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
  185. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
  186. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
  187. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
  188. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.js +2 -0
  189. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
  190. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
  191. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
  192. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
  193. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
  194. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
  195. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
  196. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.js +53 -0
  197. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
  198. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
  199. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
  200. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
  201. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
  202. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
  203. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
  204. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
  205. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
  206. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
  207. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
  208. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
  209. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
  210. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
  211. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
  212. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
  213. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/index.ts +28 -0
  214. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/lock/lock.ts +369 -0
  215. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/shared/errors.ts +51 -0
  216. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/shared/types.ts +88 -0
  217. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
  218. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/retry.ts +61 -0
  219. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/sleep.ts +79 -0
  220. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
  221. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
  222. package/node_modules/appium-android-driver/node_modules/asyncbox/package.json +60 -0
  223. package/node_modules/appium-android-driver/package.json +7 -7
  224. package/node_modules/appium-chromedriver/CHANGELOG.md +14 -0
  225. package/node_modules/appium-chromedriver/node_modules/asyncbox/LICENSE +203 -0
  226. package/node_modules/appium-chromedriver/node_modules/asyncbox/README.md +272 -0
  227. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
  228. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
  229. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
  230. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
  231. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
  232. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
  233. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
  234. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
  235. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
  236. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
  237. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
  238. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
  239. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts +12 -0
  240. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
  241. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js +10 -0
  242. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js.map +1 -0
  243. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
  244. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
  245. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
  246. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
  247. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
  248. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
  249. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
  250. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
  251. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
  252. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
  253. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.js +2 -0
  254. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
  255. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
  256. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
  257. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
  258. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
  259. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
  260. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
  261. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.js +53 -0
  262. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
  263. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
  264. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
  265. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
  266. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
  267. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
  268. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
  269. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
  270. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
  271. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
  272. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
  273. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
  274. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
  275. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
  276. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
  277. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
  278. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/index.ts +28 -0
  279. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/lock/lock.ts +369 -0
  280. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/shared/errors.ts +51 -0
  281. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/shared/types.ts +88 -0
  282. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
  283. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/retry.ts +61 -0
  284. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/sleep.ts +79 -0
  285. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
  286. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
  287. package/node_modules/appium-chromedriver/node_modules/asyncbox/package.json +60 -0
  288. package/node_modules/appium-chromedriver/package.json +4 -4
  289. package/node_modules/io.appium.settings/CHANGELOG.md +21 -0
  290. package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
  291. package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts +9 -0
  292. package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts.map +1 -1
  293. package/node_modules/io.appium.settings/build/lib/commands/video-stream.js +16 -1
  294. package/node_modules/io.appium.settings/build/lib/commands/video-stream.js.map +1 -1
  295. package/node_modules/io.appium.settings/build/lib/constants.d.ts +2 -0
  296. package/node_modules/io.appium.settings/build/lib/constants.d.ts.map +1 -1
  297. package/node_modules/io.appium.settings/build/lib/constants.js +2 -0
  298. package/node_modules/io.appium.settings/build/lib/constants.js.map +1 -1
  299. package/node_modules/io.appium.settings/build/lib/index.d.ts +3 -0
  300. package/node_modules/io.appium.settings/build/lib/index.d.ts.map +1 -1
  301. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts +3 -1
  302. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts.map +1 -1
  303. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js +2 -0
  304. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js.map +1 -1
  305. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts +11 -0
  306. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts.map +1 -1
  307. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js +40 -0
  308. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js.map +1 -1
  309. package/node_modules/io.appium.settings/lib/commands/video-stream.ts +17 -0
  310. package/node_modules/io.appium.settings/lib/constants.ts +2 -0
  311. package/node_modules/io.appium.settings/lib/index.ts +3 -0
  312. package/node_modules/io.appium.settings/lib/utils/streaming-protocol.ts +2 -0
  313. package/node_modules/io.appium.settings/lib/utils/streaming-transport.ts +43 -0
  314. package/node_modules/io.appium.settings/node_modules/asyncbox/LICENSE +203 -0
  315. package/node_modules/io.appium.settings/node_modules/asyncbox/README.md +272 -0
  316. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
  317. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
  318. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
  319. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
  320. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
  321. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
  322. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
  323. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
  324. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
  325. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
  326. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
  327. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
  328. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts +12 -0
  329. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
  330. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js +10 -0
  331. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js.map +1 -0
  332. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
  333. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
  334. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
  335. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
  336. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
  337. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
  338. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
  339. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
  340. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
  341. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
  342. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js +2 -0
  343. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
  344. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
  345. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
  346. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
  347. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
  348. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
  349. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
  350. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js +53 -0
  351. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
  352. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
  353. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
  354. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
  355. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
  356. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
  357. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
  358. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
  359. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
  360. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
  361. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
  362. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
  363. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
  364. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
  365. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
  366. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
  367. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/index.ts +28 -0
  368. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/lock/lock.ts +369 -0
  369. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/errors.ts +51 -0
  370. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/types.ts +88 -0
  371. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
  372. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/retry.ts +61 -0
  373. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/sleep.ts +79 -0
  374. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
  375. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
  376. package/node_modules/io.appium.settings/node_modules/asyncbox/package.json +60 -0
  377. package/node_modules/io.appium.settings/package.json +5 -5
  378. package/node_modules/teen_process/CHANGELOG.md +17 -0
  379. package/node_modules/teen_process/README.md +2 -2
  380. package/node_modules/teen_process/build/lib/circular-buffer.d.ts +13 -0
  381. package/node_modules/teen_process/build/lib/circular-buffer.d.ts.map +1 -0
  382. package/node_modules/teen_process/build/lib/circular-buffer.js +53 -0
  383. package/node_modules/teen_process/build/lib/circular-buffer.js.map +1 -0
  384. package/node_modules/teen_process/build/lib/exec.d.ts +33 -0
  385. package/node_modules/teen_process/build/lib/exec.d.ts.map +1 -0
  386. package/node_modules/teen_process/build/lib/exec.js +164 -0
  387. package/node_modules/teen_process/build/lib/exec.js.map +1 -0
  388. package/node_modules/teen_process/build/lib/helpers.d.ts +2 -0
  389. package/node_modules/teen_process/build/lib/helpers.d.ts.map +1 -0
  390. package/node_modules/teen_process/build/lib/helpers.js +41 -0
  391. package/node_modules/teen_process/build/lib/helpers.js.map +1 -0
  392. package/node_modules/teen_process/build/lib/index.d.ts +5 -0
  393. package/node_modules/teen_process/build/lib/index.d.ts.map +1 -0
  394. package/node_modules/teen_process/build/lib/index.js +4 -0
  395. package/node_modules/teen_process/build/lib/index.js.map +1 -0
  396. package/node_modules/teen_process/build/lib/subprocess.d.ts +131 -0
  397. package/node_modules/teen_process/build/lib/subprocess.d.ts.map +1 -0
  398. package/node_modules/teen_process/build/lib/subprocess.js +336 -0
  399. package/node_modules/teen_process/build/lib/subprocess.js.map +1 -0
  400. package/node_modules/teen_process/build/lib/types.d.ts +71 -0
  401. package/node_modules/teen_process/build/lib/types.d.ts.map +1 -0
  402. package/node_modules/teen_process/build/lib/types.js +2 -0
  403. package/node_modules/teen_process/build/lib/types.js.map +1 -0
  404. package/node_modules/teen_process/lib/exec.ts +15 -2
  405. package/node_modules/teen_process/lib/subprocess.ts +146 -110
  406. package/node_modules/teen_process/package.json +14 -25
  407. package/package.json +5 -5
  408. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.d.ts +0 -0
  409. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.d.ts.map +0 -0
  410. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.js +0 -0
  411. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.js.map +0 -0
  412. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.d.ts +0 -0
  413. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.d.ts.map +0 -0
  414. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.js +0 -0
  415. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.js.map +0 -0
  416. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.d.ts +0 -0
  417. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.d.ts.map +0 -0
  418. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.js +0 -0
  419. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.js.map +0 -0
  420. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.d.ts +0 -0
  421. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.d.ts.map +0 -0
  422. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.js +0 -0
  423. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.js.map +0 -0
  424. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.d.ts +0 -0
  425. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.d.ts.map +0 -0
  426. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.js +0 -0
  427. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.js.map +0 -0
  428. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.d.ts +0 -0
  429. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.d.ts.map +0 -0
  430. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.js +0 -0
  431. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.js.map +0 -0
  432. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/package.json +0 -0
  433. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.d.ts +0 -0
  434. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.d.ts.map +0 -0
  435. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.js +0 -0
  436. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.js.map +0 -0
  437. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.d.ts +0 -0
  438. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.d.ts.map +0 -0
  439. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.js +0 -0
  440. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.js.map +0 -0
  441. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.d.ts +0 -0
  442. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.d.ts.map +0 -0
  443. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.js +0 -0
  444. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.js.map +0 -0
  445. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.d.ts +0 -0
  446. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.d.ts.map +0 -0
  447. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.js +0 -0
  448. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.js.map +0 -0
  449. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.d.ts +0 -0
  450. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.d.ts.map +0 -0
  451. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.js +0 -0
  452. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.js.map +0 -0
  453. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.d.ts +0 -0
  454. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.d.ts.map +0 -0
  455. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.js +0 -0
  456. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.js.map +0 -0
  457. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/package.json +0 -0
@@ -227,6 +227,22 @@ export const executeMethodMap = {
227
227
  optional: ['timeoutMs'],
228
228
  },
229
229
  },
230
+ 'mobile: startMediaStream': {
231
+ command: 'mobileStartMediaStream',
232
+ params: {
233
+ required: ['kind'],
234
+ optional: ['codec', 'fps', 'bitrate', 'quality', 'scale', 'resolution', 'audio', 'batchMs', 'idleHeartbeatMs'],
235
+ },
236
+ },
237
+ 'mobile: getMediaStreamCapabilities': {
238
+ command: 'mobileGetMediaStreamCapabilities',
239
+ },
240
+ 'mobile: stopMediaStream': {
241
+ command: 'mobileStopMediaStream',
242
+ params: {
243
+ required: ['streamId'],
244
+ },
245
+ },
230
246
  'mobile: startMediaProjectionRecording': {
231
247
  command: 'mobileStartMediaProjectionRecording',
232
248
  params: {
@@ -1 +1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,CAAC;SACtB;KACF;IACD,sBAAsB,EAAE;QACtB,OAAO,EAAE,oBAAoB;QAC7B,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,OAAO,CAAC;SACpB;KACF;IACD,mBAAmB,EAAE;QACnB,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC;SAClC;KACF;IAED,4BAA4B,EAAE;QAC5B,OAAO,EAAE,oBAAoB;KAC9B;IACD,2BAA2B,EAAE;QAC3B,OAAO,EAAE,mBAAmB;KAC7B;IAED,wBAAwB,EAAE;QACxB,OAAO,EAAE,sBAAsB;QAC/B,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;YACnC,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;SACrE;KACF;IACD,wBAAwB,EAAE;QACxB,OAAO,EAAE,sBAAsB;KAChC;IACD,0BAA0B,EAAE;QAC1B,OAAO,EAAE,wBAAwB;KAClC;IAED,8BAA8B,EAAE;QAC9B,OAAO,EAAE,sBAAsB;QAC/B,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;IAED,uBAAuB,EAAE;QACvB,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;SACrC;KACF;CACuC,CAAC"}
1
+ {"version":3,"file":"execute-method-map.js","sourceRoot":"","sources":["../../lib/execute-method-map.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAG;IACpB,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,KAAK;IACL,UAAU;IACV,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,OAAO;CACC,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,eAAe,EAAE;QACf,OAAO,EAAE,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ACF;IACD,uBAAuB,EAAE;QACvB,OAAO,EAAE,qBAAqB;QAC9B,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;IACD,sBAAsB,EAAE;QACtB,OAAO,EAAE,oBAAoB;QAC7B,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,OAAO,CAAC;SACpB;KACF;IACD,mBAAmB,EAAE;QACnB,OAAO,EAAE,WAAW;QACpB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC;SAClC;KACF;IAED,4BAA4B,EAAE;QAC5B,OAAO,EAAE,oBAAoB;KAC9B;IACD,2BAA2B,EAAE;QAC3B,OAAO,EAAE,mBAAmB;KAC7B;IAED,wBAAwB,EAAE;QACxB,OAAO,EAAE,sBAAsB;QAC/B,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;YACnC,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;SACrE;KACF;IACD,wBAAwB,EAAE;QACxB,OAAO,EAAE,sBAAsB;KAChC;IACD,0BAA0B,EAAE;QAC1B,OAAO,EAAE,wBAAwB;KAClC;IAED,8BAA8B,EAAE;QAC9B,OAAO,EAAE,sBAAsB;QAC/B,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;IAED,uBAAuB,EAAE;QACvB,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;SACrC;KACF;CACuC,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type {MediaUnit} from './types.js';
2
+
3
+ /**
4
+ * Groups units into events that are homogeneous by track and cut at video
5
+ * keyframes (a keyframe always starts a new batch).
6
+ */
7
+ export class UnitBatcher {
8
+ private pending: MediaUnit[] = [];
9
+ private timer?: NodeJS.Timeout;
10
+
11
+ constructor(
12
+ private readonly batchMs: number,
13
+ private readonly onBatch: (units: MediaUnit[]) => void,
14
+ ) {}
15
+
16
+ push(unit: MediaUnit): void {
17
+ const [first] = this.pending;
18
+ if (first && (first.track !== unit.track || (unit.track === 'video' && unit.key))) {
19
+ this.flush();
20
+ }
21
+ this.pending.push(unit);
22
+ if (this.batchMs <= 0 || unit.track === 'jpeg') {
23
+ this.flush();
24
+ } else if (!this.timer) {
25
+ this.timer = setTimeout(() => this.flush(), this.batchMs);
26
+ }
27
+ }
28
+
29
+ flush(): void {
30
+ clearTimeout(this.timer);
31
+ this.timer = undefined;
32
+ if (this.pending.length) {
33
+ const batch = this.pending;
34
+ this.pending = [];
35
+ this.onBatch(batch);
36
+ }
37
+ }
38
+
39
+ close(): void {
40
+ clearTimeout(this.timer);
41
+ this.timer = undefined;
42
+ this.pending = [];
43
+ }
44
+ }
@@ -0,0 +1,101 @@
1
+ import type {ADB} from 'appium-adb';
2
+ import {SETTINGS_HELPER_ID} from 'io.appium.settings';
3
+
4
+ import {MIN_API_LEVEL} from './constants.js';
5
+ import type {MediaStreamCapabilities, VideoEncoderInfo} from './types.js';
6
+
7
+ const VIDEO_MIMES = {'video/avc': 'h264', 'video/hevc': 'hevc'} as const;
8
+
9
+ /**
10
+ * Extracts the video encoders from the `dumpsys media.player` codec listing
11
+ * (Android 13+). Returns null if the listing has no encoder section at all.
12
+ */
13
+ export function parseVideoEncoders(dump: string): VideoEncoderInfo[] | null {
14
+ const encoders: VideoEncoderInfo[] = [];
15
+ let mime: string | undefined;
16
+ let current: VideoEncoderInfo | undefined;
17
+ let sawEncoder = false;
18
+ for (const line of dump.split('\n')) {
19
+ const mimeMatch = /^Media type '([^']+)':/.exec(line);
20
+ if (mimeMatch) {
21
+ mime = mimeMatch[1];
22
+ current = undefined;
23
+ continue;
24
+ }
25
+ const encoderMatch = /^\s+Encoder "([^"]+)" supports/.exec(line);
26
+ if (encoderMatch) {
27
+ sawEncoder = true;
28
+ const codec = mime && VIDEO_MIMES[mime as keyof typeof VIDEO_MIMES];
29
+ current = codec ? {name: encoderMatch[1], codec, softwareOnly: false} : undefined;
30
+ if (current) {
31
+ encoders.push(current);
32
+ }
33
+ continue;
34
+ }
35
+ if (/^\s+Decoder "/.test(line)) {
36
+ current = undefined;
37
+ continue;
38
+ }
39
+ if (!current) {
40
+ continue;
41
+ }
42
+ const software = /software-only: (\d)/.exec(line);
43
+ if (software) {
44
+ current.softwareOnly = software[1] === '1';
45
+ }
46
+ const size = /size-range = "(\d+)x(\d+)-(\d+)x(\d+)"/.exec(line);
47
+ if (size) {
48
+ current.maxWidth = Number(size[3]);
49
+ current.maxHeight = Number(size[4]);
50
+ }
51
+ }
52
+ return sawEncoder ? encoders : null;
53
+ }
54
+
55
+ /** Returns null if the device does not list its codecs. */
56
+ export async function queryVideoEncoders(adb: ADB): Promise<VideoEncoderInfo[] | null> {
57
+ try {
58
+ return parseVideoEncoders(await adb.shell(['dumpsys', 'media.player']));
59
+ } catch {
60
+ return null;
61
+ }
62
+ }
63
+
64
+ export async function getCapabilities(adb: ADB): Promise<MediaStreamCapabilities> {
65
+ const apiLevel = await adb.getApiLevel();
66
+ if (apiLevel < MIN_API_LEVEL) {
67
+ return {
68
+ supported: false,
69
+ reason: {
70
+ code: 'api_level_too_low',
71
+ message: `Media streaming requires API Level ${MIN_API_LEVEL}+, the device has ${apiLevel}`,
72
+ },
73
+ apiLevel,
74
+ kinds: [],
75
+ };
76
+ }
77
+ if (!(await adb.isAppInstalled(SETTINGS_HELPER_ID))) {
78
+ return {
79
+ supported: false,
80
+ reason: {code: 'settings_app_missing', message: `${SETTINGS_HELPER_ID} is not installed on the device`},
81
+ apiLevel,
82
+ kinds: [],
83
+ };
84
+ }
85
+ const encoders = await queryVideoEncoders(adb);
86
+ // A listing without any video encoder means video streams cannot start
87
+ const hasVideo = !encoders || encoders.length > 0;
88
+ return {
89
+ supported: true,
90
+ apiLevel,
91
+ kinds: hasVideo ? ['video', 'jpeg'] : ['jpeg'],
92
+ audio: hasVideo,
93
+ // Without a codec listing (older Android) the codecs are assumed rather than verified
94
+ codecs: encoders
95
+ ? {
96
+ h264: encoders.filter((e) => e.codec === 'h264'),
97
+ hevc: encoders.filter((e) => e.codec === 'hevc'),
98
+ }
99
+ : null,
100
+ };
101
+ }
@@ -0,0 +1,15 @@
1
+ export const MEDIA_STREAM_MODULE = 'appium:mediaStream';
2
+ export const MEDIA_UNITS_EVENT = `${MEDIA_STREAM_MODULE}.units`;
3
+ export const MEDIA_STARTED_EVENT = `${MEDIA_STREAM_MODULE}.started`;
4
+ export const MEDIA_FORMAT_CHANGED_EVENT = `${MEDIA_STREAM_MODULE}.formatChanged`;
5
+ export const MEDIA_ENDED_EVENT = `${MEDIA_STREAM_MODULE}.ended`;
6
+ export const BACKPRESSURE_EVENT_NAME = 'bidiBackpressure';
7
+ export const MIN_API_LEVEL = 29;
8
+ export const KEYFRAME_REQUEST_MIN_INTERVAL_MS = 1000;
9
+ // The video encoder reports its config right after it starts, regardless of screen activity
10
+ export const FIRST_UNIT_TIMEOUT_MS = 5000;
11
+ export const DEFAULT_BATCH_MS = 40;
12
+ export const DEFAULT_IDLE_HEARTBEAT_MS = 1000;
13
+ // settings app defaults, reported in `started` (ADTS AAC-LC)
14
+ export const AUDIO_SAMPLE_RATE = 44100;
15
+ export const AUDIO_CHANNELS = 1;
@@ -0,0 +1,182 @@
1
+ import {errors} from 'appium/driver.js';
2
+
3
+ import type {AndroidDriverConstraints} from '../../constraints.js';
4
+ import type {AndroidDriver} from '../../driver.js';
5
+ import {BIDI_EVENT_NAME} from '../bidi/constants.js';
6
+ import {getCapabilities, queryVideoEncoders} from './capabilities.js';
7
+ import {
8
+ DEFAULT_BATCH_MS,
9
+ DEFAULT_IDLE_HEARTBEAT_MS,
10
+ MEDIA_STREAM_MODULE,
11
+ MEDIA_UNITS_EVENT,
12
+ MIN_API_LEVEL,
13
+ } from './constants.js';
14
+ import {MediaStream} from './stream.js';
15
+ import type {MediaKind, MediaStreamCapabilities, MediaStreamInfo, StartMediaStreamOpts} from './types.js';
16
+
17
+ declare module '../../driver.js' {
18
+ interface AndroidDriver<C extends AndroidDriverConstraints> {
19
+ mobileStartMediaStream(
20
+ ...args: Parameters<typeof mobileStartMediaStream>
21
+ ): ReturnType<typeof mobileStartMediaStream>;
22
+ mobileGetMediaStreamCapabilities(
23
+ ...args: Parameters<typeof mobileGetMediaStreamCapabilities>
24
+ ): ReturnType<typeof mobileGetMediaStreamCapabilities>;
25
+ mobileStopMediaStream(...args: Parameters<typeof mobileStopMediaStream>): ReturnType<typeof mobileStopMediaStream>;
26
+ }
27
+ }
28
+
29
+ /**
30
+ * Starts streaming the screen as `appium:mediaStream.*` BiDi events.
31
+ * Subscribe to `appium:mediaStream` before calling this. The result and the `started` event of a
32
+ * video stream carry the frame size (after any scaling to the encoder's limits).
33
+ *
34
+ * @param kind 'video' (H.264/HEVC, optionally with AAC audio) or 'jpeg'.
35
+ * @param codec Video codec, 'h264' by default.
36
+ * @param fps Requested frames per second.
37
+ * @param bitrate Video bitrate in bits per second.
38
+ * @param quality JPEG quality, 1-100.
39
+ * @param scale JPEG scale in percent, 1-100.
40
+ * @param resolution Video resolution as 'WxH'.
41
+ * @param audio Whether to add an AAC audio track (video only).
42
+ * @param batchMs Units batching window for video/audio. 40 by default.
43
+ * @param idleHeartbeatMs Re-send the last JPEG after this idle time. 1000 by default, 0 disables.
44
+ */
45
+ export async function mobileStartMediaStream(
46
+ this: AndroidDriver,
47
+ kind: MediaKind,
48
+ codec?: 'h264' | 'hevc',
49
+ fps?: number,
50
+ bitrate?: number,
51
+ quality?: number,
52
+ scale?: number,
53
+ resolution?: string,
54
+ audio?: boolean,
55
+ batchMs: number = DEFAULT_BATCH_MS,
56
+ idleHeartbeatMs: number = DEFAULT_IDLE_HEARTBEAT_MS,
57
+ ): Promise<MediaStreamInfo> {
58
+ const opts: StartMediaStreamOpts & {batchMs: number; idleHeartbeatMs: number} = {
59
+ kind,
60
+ codec,
61
+ fps,
62
+ bitrate,
63
+ quality,
64
+ scale,
65
+ resolution,
66
+ audio,
67
+ batchMs,
68
+ idleHeartbeatMs,
69
+ };
70
+ validateOpts(opts);
71
+
72
+ const apiLevel = await this.adb.getApiLevel();
73
+ if (apiLevel < MIN_API_LEVEL) {
74
+ throw new errors.InvalidArgumentError(
75
+ `Media streaming is not available on API Level ${apiLevel}. Minimum required API Level is ${MIN_API_LEVEL}.`,
76
+ );
77
+ }
78
+ if (kind === 'video') {
79
+ const wanted = codec ?? 'h264';
80
+ const encoders = await queryVideoEncoders(this.adb);
81
+ if (encoders && !encoders.some((e) => e.codec === wanted)) {
82
+ const others = [...new Set(encoders.map((e) => e.codec))];
83
+ throw new errors.InvalidArgumentError(
84
+ `This device has no ${wanted.toUpperCase()} encoder` +
85
+ (others.length ? `, use codec=${others[0]}` : ', use kind=jpeg'),
86
+ );
87
+ }
88
+ }
89
+ const streams = (this._mediaStreams ??= new Map());
90
+ const ended = (this._endedMediaStreamIds ??= new Set());
91
+ for (const [id, s] of streams) {
92
+ if (s.isStopped) {
93
+ streams.delete(id);
94
+ ended.add(id);
95
+ }
96
+ }
97
+ if ([...streams.values()].some((s) => s.kind === kind)) {
98
+ throw new errors.InvalidArgumentError(`A ${kind} media stream is already running in this session`);
99
+ }
100
+
101
+ // No await between the check above and the registration below, or concurrent starts could both pass
102
+ const session =
103
+ kind === 'video' ? this.settingsApp.makeVideoStreamSession() : this.settingsApp.makeJpegStreamSession();
104
+ const stream = new MediaStream(session, opts, {
105
+ emit: (event) => {
106
+ if (hasSubscribers(this, event.method)) {
107
+ this.eventEmitter.emit(BIDI_EVENT_NAME, event);
108
+ }
109
+ },
110
+ emitter: this.eventEmitter,
111
+ hasSubscribers: () => hasSubscribers(this, MEDIA_UNITS_EVENT),
112
+ log: this.log,
113
+ // Ended streams are moved to the ended ids on the next start, see mobileStopMediaStream
114
+ onEnded: () => {},
115
+ });
116
+ streams.set(stream.streamId, stream);
117
+ try {
118
+ await this.settingsApp.adjustMediaProjectionServicePermissions();
119
+ return await stream.start();
120
+ } catch (e) {
121
+ streams.delete(stream.streamId);
122
+ await stream.stop('failed to start');
123
+ throw e instanceof TypeError || e instanceof RangeError ? new errors.InvalidArgumentError(e.message) : e;
124
+ }
125
+ }
126
+
127
+ /**
128
+ * Reports whether media streaming works on the device, and which video codecs it can encode.
129
+ * A software-only encoder may be limited to small frame sizes, the stream is scaled down to fit.
130
+ */
131
+ export async function mobileGetMediaStreamCapabilities(this: AndroidDriver): Promise<MediaStreamCapabilities> {
132
+ return await getCapabilities(this.adb);
133
+ }
134
+
135
+ /**
136
+ * Stops a media stream started by `mobile: startMediaStream`.
137
+ * Stopping a stream that has already ended is a no-op, also after other streams were started.
138
+ *
139
+ * @param streamId The id returned by `mobile: startMediaStream`.
140
+ */
141
+ export async function mobileStopMediaStream(this: AndroidDriver, streamId: string): Promise<void> {
142
+ const stream = this._mediaStreams?.get(streamId);
143
+ if (stream) {
144
+ await stream.stop();
145
+ } else if (!this._endedMediaStreamIds?.has(streamId)) {
146
+ throw new errors.InvalidArgumentError(`Unknown media stream id '${streamId}'`);
147
+ }
148
+ }
149
+
150
+ /** Stops all streams of the session; used on session deletion. */
151
+ export async function stopAllMediaStreams(this: AndroidDriver): Promise<void> {
152
+ await Promise.all([...(this._mediaStreams?.values() ?? [])].map((s) => s.stop('session ended')));
153
+ }
154
+
155
+ function hasSubscribers(driver: AndroidDriver, method: string): boolean {
156
+ return [method, MEDIA_STREAM_MODULE].some((e) => (driver.bidiEventSubs[e]?.length ?? 0) > 0);
157
+ }
158
+
159
+ function validateOpts({
160
+ kind,
161
+ codec,
162
+ bitrate,
163
+ quality,
164
+ scale,
165
+ audio,
166
+ batchMs,
167
+ idleHeartbeatMs,
168
+ }: StartMediaStreamOpts & {batchMs: number; idleHeartbeatMs: number}): void {
169
+ if (kind !== 'video' && kind !== 'jpeg') {
170
+ throw new errors.InvalidArgumentError(`'kind' must be either 'video' or 'jpeg', got '${String(kind)}'`);
171
+ }
172
+ const wrongKind = kind === 'video' ? {quality, scale} : {codec, bitrate, audio};
173
+ const offending = Object.entries(wrongKind).filter(([, v]) => v !== undefined);
174
+ if (offending.length) {
175
+ throw new errors.InvalidArgumentError(
176
+ `${offending.map(([k]) => `'${k}'`).join(', ')} not supported for kind '${kind}'`,
177
+ );
178
+ }
179
+ if (!Number.isInteger(batchMs) || batchMs < 0 || !Number.isInteger(idleHeartbeatMs) || idleHeartbeatMs < 0) {
180
+ throw new errors.InvalidArgumentError(`'batchMs' and 'idleHeartbeatMs' must be non-negative integers`);
181
+ }
182
+ }
@@ -0,0 +1,16 @@
1
+ /** Reads the dimensions from the first SOFn marker; null if not found. */
2
+ export function readJpegSize(buf: Buffer): {width: number; height: number} | null {
3
+ let i = 2;
4
+ while (i + 9 < buf.length) {
5
+ if (buf[i] !== 0xff) {
6
+ return null;
7
+ }
8
+ const marker = buf[i + 1];
9
+ // SOF0..SOF15 except DHT (C4), JPG (C8) and DAC (CC)
10
+ if (marker >= 0xc0 && marker <= 0xcf && ![0xc4, 0xc8, 0xcc].includes(marker)) {
11
+ return {height: buf.readUInt16BE(i + 5), width: buf.readUInt16BE(i + 7)};
12
+ }
13
+ i += 2 + buf.readUInt16BE(i + 2);
14
+ }
15
+ return null;
16
+ }
@@ -0,0 +1,208 @@
1
+ export interface VideoSize {
2
+ width: number;
3
+ height: number;
4
+ }
5
+
6
+ class BitReader {
7
+ private pos = 0;
8
+
9
+ constructor(private readonly data: Buffer) {}
10
+
11
+ bit(): number {
12
+ const byte = this.data[this.pos >> 3];
13
+ if (byte === undefined) {
14
+ throw new RangeError('Unexpected end of the SPS');
15
+ }
16
+ return (byte >> (7 - (this.pos++ & 7))) & 1;
17
+ }
18
+
19
+ bits(n: number): number {
20
+ let value = 0;
21
+ for (let i = 0; i < n; i++) {
22
+ value = value * 2 + this.bit();
23
+ }
24
+ return value;
25
+ }
26
+
27
+ skip(n: number): void {
28
+ this.pos += n;
29
+ }
30
+
31
+ ue(): number {
32
+ let zeros = 0;
33
+ while (this.bit() === 0) {
34
+ if (++zeros > 31) {
35
+ throw new RangeError('Invalid Exp-Golomb code in the SPS');
36
+ }
37
+ }
38
+ return 2 ** zeros - 1 + this.bits(zeros);
39
+ }
40
+
41
+ se(): number {
42
+ const k = this.ue();
43
+ return k % 2 ? (k + 1) / 2 : -k / 2;
44
+ }
45
+ }
46
+
47
+ /** Splits an Annex-B buffer into NAL units (without start codes). */
48
+ export function splitNalUnits(data: Buffer): Buffer[] {
49
+ const starts: number[] = [];
50
+ for (let i = 0; i + 2 < data.length; i++) {
51
+ if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 1) {
52
+ starts.push(i + 3);
53
+ i += 2;
54
+ }
55
+ }
56
+ return starts.map((start, idx) => {
57
+ let end = idx + 1 < starts.length ? starts[idx + 1] - 3 : data.length;
58
+ // A 4-byte start code leaves one trailing zero on the previous unit
59
+ while (end > start && data[end - 1] === 0) {
60
+ end--;
61
+ }
62
+ return data.subarray(start, end);
63
+ });
64
+ }
65
+
66
+ // RBSP: drops the emulation prevention bytes (00 00 03 -> 00 00)
67
+ function unescape(nal: Buffer): Buffer {
68
+ const out: number[] = [];
69
+ let zeros = 0;
70
+ for (const byte of nal) {
71
+ if (zeros >= 2 && byte === 3) {
72
+ zeros = 0;
73
+ continue;
74
+ }
75
+ zeros = byte === 0 ? zeros + 1 : 0;
76
+ out.push(byte);
77
+ }
78
+ return Buffer.from(out);
79
+ }
80
+
81
+ const H264_SPS = 7;
82
+ const HEVC_SPS = 33;
83
+ const H264_HIGH_PROFILES = new Set([100, 110, 122, 244, 44, 83, 86, 118, 128, 138, 139, 134, 135]);
84
+
85
+ function skipH264ScalingList(r: BitReader, size: number): void {
86
+ let last = 8;
87
+ let next = 8;
88
+ for (let j = 0; j < size; j++) {
89
+ if (next !== 0) {
90
+ next = (last + r.se() + 256) % 256;
91
+ }
92
+ last = next === 0 ? last : next;
93
+ }
94
+ }
95
+
96
+ function parseH264Sps(rbsp: Buffer): VideoSize {
97
+ const r = new BitReader(rbsp);
98
+ r.skip(8); // NAL header
99
+ const profile = r.bits(8);
100
+ r.skip(16); // constraint flags + level
101
+ r.ue(); // sps id
102
+ let chroma = 1;
103
+ if (H264_HIGH_PROFILES.has(profile)) {
104
+ chroma = r.ue();
105
+ if (chroma === 3) {
106
+ r.skip(1);
107
+ }
108
+ r.ue();
109
+ r.ue();
110
+ r.skip(1);
111
+ if (r.bit()) {
112
+ for (let i = 0; i < (chroma !== 3 ? 8 : 12); i++) {
113
+ if (r.bit()) {
114
+ skipH264ScalingList(r, i < 6 ? 16 : 64);
115
+ }
116
+ }
117
+ }
118
+ }
119
+ r.ue(); // log2_max_frame_num_minus4
120
+ const pocType = r.ue();
121
+ if (pocType === 0) {
122
+ r.ue();
123
+ } else if (pocType === 1) {
124
+ r.skip(1);
125
+ r.se();
126
+ r.se();
127
+ for (let i = r.ue(); i > 0; i--) {
128
+ r.se();
129
+ }
130
+ }
131
+ r.ue(); // max_num_ref_frames
132
+ r.skip(1);
133
+ const widthMbs = r.ue() + 1;
134
+ const heightMapUnits = r.ue() + 1;
135
+ const frameMbsOnly = r.bit();
136
+ if (!frameMbsOnly) {
137
+ r.skip(1);
138
+ }
139
+ r.skip(1); // direct_8x8_inference
140
+ let crop = [0, 0, 0, 0];
141
+ if (r.bit()) {
142
+ crop = [r.ue(), r.ue(), r.ue(), r.ue()];
143
+ }
144
+ const cropX = chroma === 0 || chroma === 3 ? 1 : 2;
145
+ const cropY = (chroma === 1 ? 2 : 1) * (2 - frameMbsOnly);
146
+ return {
147
+ width: widthMbs * 16 - cropX * (crop[0] + crop[1]),
148
+ height: (2 - frameMbsOnly) * heightMapUnits * 16 - cropY * (crop[2] + crop[3]),
149
+ };
150
+ }
151
+
152
+ function parseHevcSps(rbsp: Buffer): VideoSize {
153
+ const r = new BitReader(rbsp);
154
+ r.skip(16); // NAL header
155
+ r.skip(4); // vps id
156
+ const maxSubLayersMinus1 = r.bits(3);
157
+ r.skip(1);
158
+ r.skip(96); // general profile_tier_level
159
+ const profilePresent: number[] = [];
160
+ const levelPresent: number[] = [];
161
+ for (let i = 0; i < maxSubLayersMinus1; i++) {
162
+ profilePresent.push(r.bit());
163
+ levelPresent.push(r.bit());
164
+ }
165
+ if (maxSubLayersMinus1 > 0) {
166
+ r.skip(2 * (8 - maxSubLayersMinus1));
167
+ }
168
+ for (let i = 0; i < maxSubLayersMinus1; i++) {
169
+ r.skip(profilePresent[i] * 88 + levelPresent[i] * 8);
170
+ }
171
+ r.ue(); // sps id
172
+ const chroma = r.ue();
173
+ if (chroma === 3) {
174
+ r.skip(1);
175
+ }
176
+ const width = r.ue();
177
+ const height = r.ue();
178
+ let crop = [0, 0, 0, 0];
179
+ if (r.bit()) {
180
+ crop = [r.ue(), r.ue(), r.ue(), r.ue()];
181
+ }
182
+ const subWidth = chroma === 1 || chroma === 2 ? 2 : 1;
183
+ const subHeight = chroma === 1 ? 2 : 1;
184
+ return {
185
+ width: width - subWidth * (crop[0] + crop[1]),
186
+ height: height - subHeight * (crop[2] + crop[3]),
187
+ };
188
+ }
189
+
190
+ /**
191
+ * Reads the frame size from the SPS in a video config unit (Annex-B).
192
+ * Returns null if there is no SPS or it cannot be parsed.
193
+ */
194
+ export function parseVideoSize(config: Buffer, codec: 'h264' | 'hevc'): VideoSize | null {
195
+ try {
196
+ for (const nal of splitNalUnits(config)) {
197
+ if (codec === 'h264' && (nal[0] & 0x1f) === H264_SPS) {
198
+ return parseH264Sps(unescape(nal));
199
+ }
200
+ if (codec === 'hevc' && ((nal[0] >> 1) & 0x3f) === HEVC_SPS) {
201
+ return parseHevcSps(unescape(nal));
202
+ }
203
+ }
204
+ } catch {
205
+ // Not decodable here; the stream itself is unaffected
206
+ }
207
+ return null;
208
+ }