appium-espresso-driver 10.0.3 → 10.1.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 (447) hide show
  1. package/CHANGELOG.md +6 -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/library/src/main/java/io/appium/espressoserver/lib/helpers/Version.kt +1 -1
  11. package/node_modules/@appium/base-driver/build/lib/basedriver/helpers/caps.js +1 -1
  12. package/node_modules/@appium/base-driver/lib/basedriver/helpers/caps.ts +1 -1
  13. package/node_modules/@appium/base-driver/package.json +4 -4
  14. package/node_modules/@appium/logger/CHANGELOG.md +37 -0
  15. package/node_modules/@appium/logger/package.json +2 -2
  16. package/node_modules/@appium/schema/package.json +2 -2
  17. package/node_modules/@appium/support/build/lib/zip.d.ts.map +1 -1
  18. package/node_modules/@appium/support/build/lib/zip.js +11 -11
  19. package/node_modules/@appium/support/build/lib/zip.js.map +1 -1
  20. package/node_modules/@appium/support/lib/zip.ts +11 -12
  21. package/node_modules/@appium/support/node_modules/teen_process/CHANGELOG.md +1122 -0
  22. package/node_modules/@appium/support/node_modules/teen_process/LICENSE +201 -0
  23. package/node_modules/@appium/support/node_modules/teen_process/README.md +270 -0
  24. package/node_modules/@appium/support/node_modules/teen_process/lib/circular-buffer.ts +60 -0
  25. package/node_modules/@appium/support/node_modules/teen_process/lib/exec.ts +176 -0
  26. package/node_modules/@appium/support/node_modules/teen_process/lib/helpers.ts +45 -0
  27. package/node_modules/@appium/support/node_modules/teen_process/lib/index.ts +4 -0
  28. package/node_modules/@appium/support/node_modules/teen_process/lib/subprocess.ts +358 -0
  29. package/node_modules/@appium/support/node_modules/teen_process/lib/types.ts +83 -0
  30. package/node_modules/@appium/support/node_modules/teen_process/package.json +81 -0
  31. package/node_modules/@appium/support/package.json +5 -5
  32. package/node_modules/@appium/types/package.json +5 -5
  33. package/node_modules/appium-adb/CHANGELOG.md +14 -0
  34. package/node_modules/appium-adb/node_modules/asyncbox/LICENSE +203 -0
  35. package/node_modules/appium-adb/node_modules/asyncbox/README.md +272 -0
  36. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
  37. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
  38. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
  39. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
  40. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
  41. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
  42. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
  43. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
  44. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
  45. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
  46. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
  47. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
  48. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.d.ts +12 -0
  49. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
  50. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.js +10 -0
  51. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/index.js.map +1 -0
  52. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
  53. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
  54. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
  55. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
  56. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
  57. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
  58. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
  59. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
  60. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
  61. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
  62. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.js +2 -0
  63. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
  64. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
  65. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
  66. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
  67. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
  68. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
  69. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
  70. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.js +53 -0
  71. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
  72. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
  73. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
  74. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
  75. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
  76. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
  77. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
  78. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
  79. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
  80. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
  81. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
  82. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
  83. package/node_modules/appium-adb/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
  84. package/node_modules/appium-adb/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
  85. package/node_modules/appium-adb/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
  86. package/node_modules/appium-adb/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
  87. package/node_modules/appium-adb/node_modules/asyncbox/lib/index.ts +28 -0
  88. package/node_modules/appium-adb/node_modules/asyncbox/lib/lock/lock.ts +369 -0
  89. package/node_modules/appium-adb/node_modules/asyncbox/lib/shared/errors.ts +51 -0
  90. package/node_modules/appium-adb/node_modules/asyncbox/lib/shared/types.ts +88 -0
  91. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
  92. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/retry.ts +61 -0
  93. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/sleep.ts +79 -0
  94. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
  95. package/node_modules/appium-adb/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
  96. package/node_modules/appium-adb/node_modules/asyncbox/package.json +60 -0
  97. package/node_modules/appium-adb/package.json +4 -4
  98. package/node_modules/appium-android-driver/CHANGELOG.md +29 -0
  99. package/node_modules/appium-android-driver/README.md +4 -0
  100. package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.d.ts +16 -0
  101. package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.d.ts.map +1 -0
  102. package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.js +42 -0
  103. package/node_modules/appium-android-driver/build/lib/commands/media-stream/batcher.js.map +1 -0
  104. package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.d.ts +11 -0
  105. package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.d.ts.map +1 -0
  106. package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.js +96 -0
  107. package/node_modules/appium-android-driver/build/lib/commands/media-stream/capabilities.js.map +1 -0
  108. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts +14 -0
  109. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.d.ts.map +1 -0
  110. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js +16 -0
  111. package/node_modules/appium-android-driver/build/lib/commands/media-stream/constants.js.map +1 -0
  112. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts +42 -0
  113. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.d.ts.map +1 -0
  114. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js +123 -0
  115. package/node_modules/appium-android-driver/build/lib/commands/media-stream/exports.js.map +1 -0
  116. package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.d.ts +6 -0
  117. package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.d.ts.map +1 -0
  118. package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.js +17 -0
  119. package/node_modules/appium-android-driver/build/lib/commands/media-stream/jpeg.js.map +1 -0
  120. package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.d.ts +12 -0
  121. package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.d.ts.map +1 -0
  122. package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.js +196 -0
  123. package/node_modules/appium-android-driver/build/lib/commands/media-stream/sps.js.map +1 -0
  124. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts +65 -0
  125. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.d.ts.map +1 -0
  126. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js +339 -0
  127. package/node_modules/appium-android-driver/build/lib/commands/media-stream/stream.js.map +1 -0
  128. package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.d.ts +67 -0
  129. package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.d.ts.map +1 -0
  130. package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.js +2 -0
  131. package/node_modules/appium-android-driver/build/lib/commands/media-stream/types.js.map +1 -0
  132. package/node_modules/appium-android-driver/build/lib/driver.d.ts +19 -0
  133. package/node_modules/appium-android-driver/build/lib/driver.d.ts.map +1 -1
  134. package/node_modules/appium-android-driver/build/lib/driver.js +8 -0
  135. package/node_modules/appium-android-driver/build/lib/driver.js.map +1 -1
  136. package/node_modules/appium-android-driver/build/lib/execute-method-map.d.ts +16 -0
  137. package/node_modules/appium-android-driver/build/lib/execute-method-map.d.ts.map +1 -1
  138. package/node_modules/appium-android-driver/build/lib/execute-method-map.js +16 -0
  139. package/node_modules/appium-android-driver/build/lib/execute-method-map.js.map +1 -1
  140. package/node_modules/appium-android-driver/lib/commands/media-stream/batcher.ts +44 -0
  141. package/node_modules/appium-android-driver/lib/commands/media-stream/capabilities.ts +101 -0
  142. package/node_modules/appium-android-driver/lib/commands/media-stream/constants.ts +15 -0
  143. package/node_modules/appium-android-driver/lib/commands/media-stream/exports.ts +179 -0
  144. package/node_modules/appium-android-driver/lib/commands/media-stream/jpeg.ts +16 -0
  145. package/node_modules/appium-android-driver/lib/commands/media-stream/sps.ts +208 -0
  146. package/node_modules/appium-android-driver/lib/commands/media-stream/stream.ts +385 -0
  147. package/node_modules/appium-android-driver/lib/commands/media-stream/types.ts +65 -0
  148. package/node_modules/appium-android-driver/lib/driver.ts +15 -0
  149. package/node_modules/appium-android-driver/lib/execute-method-map.ts +17 -0
  150. package/node_modules/appium-android-driver/node_modules/asyncbox/LICENSE +203 -0
  151. package/node_modules/appium-android-driver/node_modules/asyncbox/README.md +272 -0
  152. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
  153. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
  154. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
  155. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
  156. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
  157. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
  158. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
  159. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
  160. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
  161. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
  162. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
  163. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
  164. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts +12 -0
  165. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
  166. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js +10 -0
  167. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/index.js.map +1 -0
  168. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
  169. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
  170. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
  171. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
  172. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
  173. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
  174. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
  175. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
  176. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
  177. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
  178. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.js +2 -0
  179. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
  180. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
  181. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
  182. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
  183. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
  184. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
  185. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
  186. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.js +53 -0
  187. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
  188. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
  189. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
  190. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
  191. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
  192. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
  193. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
  194. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
  195. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
  196. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
  197. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
  198. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
  199. package/node_modules/appium-android-driver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
  200. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
  201. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
  202. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
  203. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/index.ts +28 -0
  204. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/lock/lock.ts +369 -0
  205. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/shared/errors.ts +51 -0
  206. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/shared/types.ts +88 -0
  207. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
  208. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/retry.ts +61 -0
  209. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/sleep.ts +79 -0
  210. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
  211. package/node_modules/appium-android-driver/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
  212. package/node_modules/appium-android-driver/node_modules/asyncbox/package.json +60 -0
  213. package/node_modules/appium-android-driver/package.json +7 -7
  214. package/node_modules/appium-chromedriver/CHANGELOG.md +14 -0
  215. package/node_modules/appium-chromedriver/node_modules/asyncbox/LICENSE +203 -0
  216. package/node_modules/appium-chromedriver/node_modules/asyncbox/README.md +272 -0
  217. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
  218. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
  219. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
  220. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
  221. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
  222. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
  223. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
  224. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
  225. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
  226. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
  227. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
  228. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
  229. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts +12 -0
  230. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
  231. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js +10 -0
  232. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/index.js.map +1 -0
  233. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
  234. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
  235. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
  236. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
  237. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
  238. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
  239. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
  240. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
  241. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
  242. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
  243. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.js +2 -0
  244. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
  245. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
  246. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
  247. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
  248. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
  249. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
  250. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
  251. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.js +53 -0
  252. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
  253. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
  254. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
  255. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
  256. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
  257. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
  258. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
  259. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
  260. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
  261. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
  262. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
  263. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
  264. package/node_modules/appium-chromedriver/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
  265. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
  266. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
  267. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
  268. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/index.ts +28 -0
  269. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/lock/lock.ts +369 -0
  270. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/shared/errors.ts +51 -0
  271. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/shared/types.ts +88 -0
  272. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
  273. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/retry.ts +61 -0
  274. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/sleep.ts +79 -0
  275. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
  276. package/node_modules/appium-chromedriver/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
  277. package/node_modules/appium-chromedriver/node_modules/asyncbox/package.json +60 -0
  278. package/node_modules/appium-chromedriver/package.json +4 -4
  279. package/node_modules/io.appium.settings/CHANGELOG.md +21 -0
  280. package/node_modules/io.appium.settings/apks/settings_apk-debug.apk +0 -0
  281. package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts +9 -0
  282. package/node_modules/io.appium.settings/build/lib/commands/video-stream.d.ts.map +1 -1
  283. package/node_modules/io.appium.settings/build/lib/commands/video-stream.js +16 -1
  284. package/node_modules/io.appium.settings/build/lib/commands/video-stream.js.map +1 -1
  285. package/node_modules/io.appium.settings/build/lib/constants.d.ts +2 -0
  286. package/node_modules/io.appium.settings/build/lib/constants.d.ts.map +1 -1
  287. package/node_modules/io.appium.settings/build/lib/constants.js +2 -0
  288. package/node_modules/io.appium.settings/build/lib/constants.js.map +1 -1
  289. package/node_modules/io.appium.settings/build/lib/index.d.ts +3 -0
  290. package/node_modules/io.appium.settings/build/lib/index.d.ts.map +1 -1
  291. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts +3 -1
  292. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.d.ts.map +1 -1
  293. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js +2 -0
  294. package/node_modules/io.appium.settings/build/lib/utils/streaming-protocol.js.map +1 -1
  295. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts +11 -0
  296. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.d.ts.map +1 -1
  297. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js +40 -0
  298. package/node_modules/io.appium.settings/build/lib/utils/streaming-transport.js.map +1 -1
  299. package/node_modules/io.appium.settings/lib/commands/video-stream.ts +17 -0
  300. package/node_modules/io.appium.settings/lib/constants.ts +2 -0
  301. package/node_modules/io.appium.settings/lib/index.ts +3 -0
  302. package/node_modules/io.appium.settings/lib/utils/streaming-protocol.ts +2 -0
  303. package/node_modules/io.appium.settings/lib/utils/streaming-transport.ts +43 -0
  304. package/node_modules/io.appium.settings/node_modules/asyncbox/LICENSE +203 -0
  305. package/node_modules/io.appium.settings/node_modules/asyncbox/README.md +272 -0
  306. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts +9 -0
  307. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.d.ts.map +1 -0
  308. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js +36 -0
  309. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncfilter.js.map +1 -0
  310. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts +9 -0
  311. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.d.ts.map +1 -0
  312. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js +27 -0
  313. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/asyncmap.js.map +1 -0
  314. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts +7 -0
  315. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.d.ts.map +1 -0
  316. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js +35 -0
  317. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/collections/limit-function.js.map +1 -0
  318. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts +12 -0
  319. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.d.ts.map +1 -0
  320. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js +10 -0
  321. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/index.js.map +1 -0
  322. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts +74 -0
  323. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.d.ts.map +1 -0
  324. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js +302 -0
  325. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/lock/lock.js.map +1 -0
  326. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts +27 -0
  327. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.d.ts.map +1 -0
  328. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js +46 -0
  329. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/errors.js.map +1 -0
  330. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts +84 -0
  331. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.d.ts.map +1 -0
  332. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js +2 -0
  333. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/shared/types.js.map +1 -0
  334. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts +15 -0
  335. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.d.ts.map +1 -0
  336. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js +33 -0
  337. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/long-sleep.js.map +1 -0
  338. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts +17 -0
  339. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.d.ts.map +1 -0
  340. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js +53 -0
  341. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/retry.js.map +1 -0
  342. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts +20 -0
  343. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.d.ts.map +1 -0
  344. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js +58 -0
  345. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/sleep.js.map +1 -0
  346. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts +18 -0
  347. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.d.ts.map +1 -0
  348. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js +48 -0
  349. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/wait-for-condition.js.map +1 -0
  350. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts +16 -0
  351. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.d.ts.map +1 -0
  352. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js +42 -0
  353. package/node_modules/io.appium.settings/node_modules/asyncbox/build/lib/time/with-timeout.js.map +1 -0
  354. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncfilter.ts +42 -0
  355. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/asyncmap.ts +33 -0
  356. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/collections/limit-function.ts +34 -0
  357. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/index.ts +28 -0
  358. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/lock/lock.ts +369 -0
  359. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/errors.ts +51 -0
  360. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/shared/types.ts +88 -0
  361. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/long-sleep.ts +38 -0
  362. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/retry.ts +61 -0
  363. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/sleep.ts +79 -0
  364. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/wait-for-condition.ts +52 -0
  365. package/node_modules/io.appium.settings/node_modules/asyncbox/lib/time/with-timeout.ts +43 -0
  366. package/node_modules/io.appium.settings/node_modules/asyncbox/package.json +60 -0
  367. package/node_modules/io.appium.settings/package.json +5 -5
  368. package/node_modules/teen_process/CHANGELOG.md +17 -0
  369. package/node_modules/teen_process/README.md +2 -2
  370. package/node_modules/teen_process/build/lib/circular-buffer.d.ts +13 -0
  371. package/node_modules/teen_process/build/lib/circular-buffer.d.ts.map +1 -0
  372. package/node_modules/teen_process/build/lib/circular-buffer.js +53 -0
  373. package/node_modules/teen_process/build/lib/circular-buffer.js.map +1 -0
  374. package/node_modules/teen_process/build/lib/exec.d.ts +33 -0
  375. package/node_modules/teen_process/build/lib/exec.d.ts.map +1 -0
  376. package/node_modules/teen_process/build/lib/exec.js +164 -0
  377. package/node_modules/teen_process/build/lib/exec.js.map +1 -0
  378. package/node_modules/teen_process/build/lib/helpers.d.ts +2 -0
  379. package/node_modules/teen_process/build/lib/helpers.d.ts.map +1 -0
  380. package/node_modules/teen_process/build/lib/helpers.js +41 -0
  381. package/node_modules/teen_process/build/lib/helpers.js.map +1 -0
  382. package/node_modules/teen_process/build/lib/index.d.ts +5 -0
  383. package/node_modules/teen_process/build/lib/index.d.ts.map +1 -0
  384. package/node_modules/teen_process/build/lib/index.js +4 -0
  385. package/node_modules/teen_process/build/lib/index.js.map +1 -0
  386. package/node_modules/teen_process/build/lib/subprocess.d.ts +131 -0
  387. package/node_modules/teen_process/build/lib/subprocess.d.ts.map +1 -0
  388. package/node_modules/teen_process/build/lib/subprocess.js +336 -0
  389. package/node_modules/teen_process/build/lib/subprocess.js.map +1 -0
  390. package/node_modules/teen_process/build/lib/types.d.ts +71 -0
  391. package/node_modules/teen_process/build/lib/types.d.ts.map +1 -0
  392. package/node_modules/teen_process/build/lib/types.js +2 -0
  393. package/node_modules/teen_process/build/lib/types.js.map +1 -0
  394. package/node_modules/teen_process/lib/exec.ts +15 -2
  395. package/node_modules/teen_process/lib/subprocess.ts +146 -110
  396. package/node_modules/teen_process/package.json +14 -25
  397. package/package.json +5 -5
  398. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.d.ts +0 -0
  399. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.d.ts.map +0 -0
  400. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.js +0 -0
  401. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/circular-buffer.js.map +0 -0
  402. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.d.ts +0 -0
  403. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.d.ts.map +0 -0
  404. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.js +0 -0
  405. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/exec.js.map +0 -0
  406. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.d.ts +0 -0
  407. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.d.ts.map +0 -0
  408. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.js +0 -0
  409. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/helpers.js.map +0 -0
  410. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.d.ts +0 -0
  411. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.d.ts.map +0 -0
  412. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.js +0 -0
  413. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/index.js.map +0 -0
  414. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.d.ts +0 -0
  415. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.d.ts.map +0 -0
  416. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.js +0 -0
  417. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/subprocess.js.map +0 -0
  418. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.d.ts +0 -0
  419. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.d.ts.map +0 -0
  420. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.js +0 -0
  421. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/lib/types.js.map +0 -0
  422. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/cjs/package.json +0 -0
  423. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.d.ts +0 -0
  424. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.d.ts.map +0 -0
  425. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.js +0 -0
  426. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/circular-buffer.js.map +0 -0
  427. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.d.ts +0 -0
  428. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.d.ts.map +0 -0
  429. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.js +0 -0
  430. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/exec.js.map +0 -0
  431. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.d.ts +0 -0
  432. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.d.ts.map +0 -0
  433. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.js +0 -0
  434. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/helpers.js.map +0 -0
  435. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.d.ts +0 -0
  436. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.d.ts.map +0 -0
  437. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.js +0 -0
  438. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/index.js.map +0 -0
  439. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.d.ts +0 -0
  440. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.d.ts.map +0 -0
  441. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.js +0 -0
  442. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/subprocess.js.map +0 -0
  443. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.d.ts +0 -0
  444. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.d.ts.map +0 -0
  445. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.js +0 -0
  446. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/lib/types.js.map +0 -0
  447. /package/node_modules/{teen_process → @appium/support/node_modules/teen_process}/build/esm/package.json +0 -0
@@ -0,0 +1,176 @@
1
+ import {spawn} from 'node:child_process';
2
+
3
+ import {quote} from 'shell-quote';
4
+
5
+ import {CircularBuffer, MAX_BUFFER_SIZE} from './circular-buffer.js';
6
+ import {formatEnoent} from './helpers.js';
7
+ import type {TeenProcessExecOptions, TeenProcessExecResult, BufferProp, ExecError, StreamName} from './types.js';
8
+
9
+ /**
10
+ * Spawns a child process and collects its output.
11
+ *
12
+ * This is a promisified version of Node's spawn that collects stdout and stderr,
13
+ * handles timeouts, and provides error context.
14
+ *
15
+ * @template T - The options type extending TeenProcessExecOptions
16
+ * @param cmd - The command to execute
17
+ * @param args - Array of arguments to pass to the command (default: [])
18
+ * @param originalOpts - Execution options including timeout, encoding, environment, etc.
19
+ * @returns Promise resolving to an object with stdout, stderr, and exit code
20
+ *
21
+ * @throws {ExecError} When the process exits with non-zero code or times out
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * // Simple execution
26
+ * const {stdout, stderr, code} = await exec('ls', ['-la']);
27
+ *
28
+ * // With timeout and custom encoding
29
+ * const result = await exec('long-running-cmd', [], {
30
+ * timeout: 5000,
31
+ * encoding: 'utf8',
32
+ * cwd: '/custom/path'
33
+ * });
34
+ *
35
+ * // Return output as Buffer
36
+ * const {stdout} = await exec('cat', ['image.png'], {isBuffer: true});
37
+ * ```
38
+ */
39
+ export async function exec<T extends TeenProcessExecOptions = TeenProcessExecOptions>(
40
+ cmd: string,
41
+ args: string[] = [],
42
+ originalOpts: T = {} as T,
43
+ ): Promise<TeenProcessExecResult<BufferProp<T>>> {
44
+ // get a quoted representation of the command for error strings
45
+ const rep = quote([cmd, ...args]);
46
+
47
+ const defaults: TeenProcessExecOptions = {
48
+ timeout: undefined,
49
+ encoding: 'utf8',
50
+ killSignal: 'SIGTERM',
51
+ cwd: undefined,
52
+ env: process.env,
53
+ ignoreOutput: false,
54
+ stdio: 'inherit',
55
+ isBuffer: false,
56
+ shell: undefined,
57
+ logger: undefined,
58
+ maxStdoutBufferSize: MAX_BUFFER_SIZE,
59
+ maxStderrBufferSize: MAX_BUFFER_SIZE,
60
+ };
61
+
62
+ const opts = applyDefaults(defaults, originalOpts);
63
+ const isBuffer = Boolean(opts.isBuffer);
64
+ const spawnOpts = buildSpawnOptions(opts, originalOpts);
65
+
66
+ return await new Promise<TeenProcessExecResult<BufferProp<T>>>((resolve, reject) => {
67
+ const proc = spawn(cmd, args, spawnOpts);
68
+ const stdoutBuffer = new CircularBuffer(opts.maxStdoutBufferSize);
69
+ const stderrBuffer = new CircularBuffer(opts.maxStderrBufferSize);
70
+ let timer: NodeJS.Timeout | null = null;
71
+
72
+ proc.on('error', async (err: NodeJS.ErrnoException) => {
73
+ let error = err;
74
+ if (error.code === 'ENOENT') {
75
+ error = await formatEnoent(error, cmd, opts.cwd?.toString());
76
+ }
77
+ reject(error);
78
+ });
79
+
80
+ if (proc.stdin) {
81
+ proc.stdin.on('error', (err: NodeJS.ErrnoException) => {
82
+ reject(new Error(`Standard input '${err.syscall}' error: ${err.stack}`));
83
+ });
84
+ }
85
+
86
+ const handleStream = (streamType: StreamName, buffer: CircularBuffer) => {
87
+ const stream = proc[streamType];
88
+ if (!stream) {
89
+ return;
90
+ }
91
+
92
+ stream.on('error', (err: NodeJS.ErrnoException) => {
93
+ const capitalizedStreamType = streamType.charAt(0).toUpperCase() + streamType.slice(1).toLowerCase();
94
+ reject(new Error(`${capitalizedStreamType} '${err.syscall}' error: ${err.stack}`));
95
+ });
96
+
97
+ if (opts.ignoreOutput) {
98
+ // https://github.com/nodejs/node/issues/4236
99
+ stream.on('data', () => {});
100
+ return;
101
+ }
102
+
103
+ stream.on('data', (chunk: Buffer) => {
104
+ buffer.add(chunk);
105
+ if (typeof opts.logger?.debug === 'function') {
106
+ opts.logger.debug(chunk.toString());
107
+ }
108
+ });
109
+ };
110
+
111
+ handleStream('stdout', stdoutBuffer);
112
+ handleStream('stderr', stderrBuffer);
113
+
114
+ function getStdio<U extends boolean>(
115
+ wantBuffer: U,
116
+ ): U extends true ? {stdout: Buffer; stderr: Buffer} : {stdout: string; stderr: string} {
117
+ const stdout = wantBuffer ? stdoutBuffer.value() : stdoutBuffer.value().toString(opts.encoding);
118
+ const stderr = wantBuffer ? stderrBuffer.value() : stderrBuffer.value().toString(opts.encoding);
119
+ return {stdout, stderr} as U extends true ? {stdout: Buffer; stderr: Buffer} : {stdout: string; stderr: string};
120
+ }
121
+
122
+ proc.on('close', (code: number | null) => {
123
+ if (timer) {
124
+ clearTimeout(timer);
125
+ }
126
+ const {stdout, stderr} = getStdio(isBuffer);
127
+ if (code === 0) {
128
+ resolve({stdout, stderr, code} as TeenProcessExecResult<BufferProp<T>>);
129
+ } else {
130
+ const err = Object.assign(new Error(`Command '${rep}' exited with code ${code}`), {
131
+ stdout,
132
+ stderr,
133
+ code,
134
+ }) as ExecError;
135
+ reject(err);
136
+ }
137
+ });
138
+
139
+ if (opts.timeout) {
140
+ timer = setTimeout(() => {
141
+ const {stdout, stderr} = getStdio(isBuffer);
142
+ const err = Object.assign(new Error(`Command '${rep}' timed out after ${opts.timeout}ms`), {
143
+ stdout,
144
+ stderr,
145
+ code: null,
146
+ }) as ExecError;
147
+ reject(err);
148
+ proc.kill(opts.killSignal ?? 'SIGTERM');
149
+ }, opts.timeout);
150
+ }
151
+ });
152
+ }
153
+
154
+ function applyDefaults<T extends TeenProcessExecOptions>(defaults: TeenProcessExecOptions, originalOpts: T): T {
155
+ const normalizedOriginalOpts = originalOpts !== null && typeof originalOpts === 'object' ? originalOpts : ({} as T);
156
+ const definedOriginalOpts = Object.fromEntries(
157
+ Object.entries(normalizedOriginalOpts).filter(([, value]) => value !== undefined),
158
+ ) as Partial<T>;
159
+ return {...defaults, ...definedOriginalOpts} as T;
160
+ }
161
+
162
+ function buildSpawnOptions<T extends TeenProcessExecOptions>(opts: T, originalOpts: T) {
163
+ return {
164
+ cwd: opts.cwd,
165
+ env: opts.env,
166
+ shell: opts.shell,
167
+ argv0: opts.argv0,
168
+ uid: opts.uid,
169
+ gid: opts.gid,
170
+ detached: opts.detached,
171
+ windowsHide: opts.windowsHide,
172
+ windowsVerbatimArguments: opts.windowsVerbatimArguments,
173
+ signal: opts.signal,
174
+ ...(Object.prototype.hasOwnProperty.call(originalOpts, 'stdio') ? {stdio: opts.stdio} : {}),
175
+ };
176
+ }
@@ -0,0 +1,45 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+
4
+ /**
5
+ * Enhances ENOENT errors from spawn with descriptive messages.
6
+ *
7
+ * This is an internal helper that mutates the error object to provide context about:
8
+ * - Invalid working directory paths
9
+ * - Missing executables in PATH
10
+ *
11
+ * @param error - The original ENOENT error from spawn
12
+ * @param cmd - The command that was attempted to execute
13
+ * @param cwd - The working directory used (if any)
14
+ * @returns The same error object with an enhanced message
15
+ *
16
+ * @internal
17
+ */
18
+ export async function formatEnoent(
19
+ error: NodeJS.ErrnoException,
20
+ cmd: string,
21
+ cwd?: string,
22
+ ): Promise<NodeJS.ErrnoException> {
23
+ if (cwd) {
24
+ try {
25
+ const stat = await fs.stat(cwd);
26
+ if (!stat.isDirectory()) {
27
+ error.message = `The working directory '${cwd}' of '${cmd}' is not a valid folder path`;
28
+ return error;
29
+ }
30
+ } catch (e) {
31
+ const err = e as NodeJS.ErrnoException;
32
+ if (err.code === 'ENOENT') {
33
+ error.message = `The working directory '${cwd}' of '${cmd}' does not exist`;
34
+ return error;
35
+ }
36
+ }
37
+ }
38
+
39
+ const curDir = path.resolve(cwd ?? process.cwd());
40
+ const pathMsg = process.env.PATH ?? 'which is not defined for the process';
41
+ error.message =
42
+ `'${cmd}' executable is not found neither in the process working folder (${curDir}) ` +
43
+ `nor in any folders specified in the PATH environment variable (${pathMsg})`;
44
+ return error;
45
+ }
@@ -0,0 +1,4 @@
1
+ export {spawn} from 'node:child_process';
2
+ export {SubProcess} from './subprocess.js';
3
+ export {exec} from './exec.js';
4
+ export type {TeenProcessExecOptions, TeenProcessExecResult, ExecError, SubProcessOptions} from './types.js';
@@ -0,0 +1,358 @@
1
+ import {spawn} from 'node:child_process';
2
+ import type {ChildProcess} from 'node:child_process';
3
+ import {EventEmitter} from 'node:events';
4
+ import {createInterface} from 'node:readline';
5
+ import type {Readable} from 'node:stream';
6
+
7
+ import {quote} from 'shell-quote';
8
+
9
+ import {formatEnoent} from './helpers.js';
10
+ import type {SubProcessOptions, StartDetector, TIsBufferOpts, StreamName} from './types.js';
11
+
12
+ /**
13
+ * A wrapper around Node's spawn that provides event-driven process management.
14
+ *
15
+ * Extends EventEmitter to provide real-time output streaming and lifecycle events.
16
+ *
17
+ * @template TSubProcessOptions - Options type extending SubProcessOptions
18
+ *
19
+ * @fires SubProcess#output - Emitted when stdout or stderr receives data
20
+ * @fires SubProcess#line-stdout - Emitted for each line of stdout
21
+ * @fires SubProcess#line-stderr - Emitted for each line of stderr
22
+ * @fires SubProcess#lines-stdout - Legacy event emitting stdout lines (deprecated)
23
+ * @fires SubProcess#lines-stderr - Legacy event emitting stderr lines (deprecated)
24
+ * @fires SubProcess#stream-line - Emitted for combined stdout/stderr lines
25
+ * @fires SubProcess#exit - Emitted when process exits
26
+ * @fires SubProcess#stop - Emitted when process is stopped intentionally
27
+ * @fires SubProcess#die - Emitted when process dies unexpectedly with non-zero code
28
+ * @fires SubProcess#end - Emitted when process ends normally with code 0
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * const proc = new SubProcess('tail', ['-f', 'logfile.txt']);
33
+ *
34
+ * proc.on('output', (stdout, stderr) => {
35
+ * console.log('Output:', stdout);
36
+ * });
37
+ *
38
+ * proc.on('line-stdout', (line) => {
39
+ * console.log('Line:', line);
40
+ * });
41
+ *
42
+ * await proc.start();
43
+ * // ... later
44
+ * await proc.stop();
45
+ * ```
46
+ */
47
+ export class SubProcess<TSubProcessOptions extends SubProcessOptions = SubProcessOptions> extends EventEmitter {
48
+ proc: ChildProcess | null;
49
+ readonly rep: string;
50
+ private args: string[];
51
+ private cmd: string;
52
+ private opts: TSubProcessOptions;
53
+ private expectingExit: boolean;
54
+
55
+ constructor(cmd: string, args: string[] = [], opts?: TSubProcessOptions) {
56
+ super();
57
+
58
+ if (!cmd) {
59
+ throw new Error('Command is required');
60
+ }
61
+
62
+ if (typeof cmd !== 'string' && !((cmd as any) instanceof String)) {
63
+ throw new Error('Command must be a string');
64
+ }
65
+
66
+ if (!Array.isArray(args)) {
67
+ throw new Error('Args must be an array');
68
+ }
69
+
70
+ this.cmd = String(cmd);
71
+ this.args = args;
72
+ this.proc = null;
73
+ this.opts = opts ?? ({} as TSubProcessOptions);
74
+ this.expectingExit = false;
75
+
76
+ this.rep = quote([String(cmd), ...args]);
77
+ }
78
+
79
+ get isRunning(): boolean {
80
+ return !!this.proc;
81
+ }
82
+
83
+ get pid(): number | null {
84
+ return this.proc?.pid ?? null;
85
+ }
86
+
87
+ /**
88
+ * Starts the subprocess and waits for it to be ready.
89
+ *
90
+ * @param startDetector - Function to detect when process is ready, number for delay in ms,
91
+ * boolean true to detach immediately, or null for default behavior
92
+ * @param timeoutMs - Maximum time to wait for process to start (in ms), or boolean true to detach
93
+ * @param detach - Whether to detach the process (requires 'detached' option)
94
+ *
95
+ * @throws {Error} When process fails to start or times out
96
+ *
97
+ * @example
98
+ * ```typescript
99
+ * // Wait for any output
100
+ * await proc.start();
101
+ *
102
+ * // Wait 100ms then continue
103
+ * await proc.start(100);
104
+ *
105
+ * // Wait for specific output
106
+ * await proc.start((stdout) => stdout.includes('Server ready'));
107
+ *
108
+ * // With timeout
109
+ * await proc.start(null, 5000);
110
+ * ```
111
+ */
112
+ async start(
113
+ startDetector: StartDetector<TSubProcessOptions> | number | boolean | null = null,
114
+ timeoutMs: number | boolean | null = null,
115
+ detach: boolean = false,
116
+ ): Promise<void> {
117
+ let startDelay = 10;
118
+
119
+ const genericStartDetector: StartDetector<TSubProcessOptions> = (stdout, stderr) => stdout || stderr;
120
+ let detector: StartDetector<TSubProcessOptions> | null = null;
121
+
122
+ if (startDetector === null) {
123
+ detector = genericStartDetector;
124
+ }
125
+
126
+ if (typeof startDetector === 'number' || (startDetector as any) instanceof Number) {
127
+ startDelay = Number(startDetector);
128
+ detector = null;
129
+ } else if (typeof startDetector === 'function') {
130
+ detector = startDetector;
131
+ }
132
+
133
+ if ((typeof startDetector === 'boolean' || (startDetector as any) instanceof Boolean) && Boolean(startDetector)) {
134
+ if (!this.opts.detached) {
135
+ throw new Error(`Unable to detach process that is not started with 'detached' option`);
136
+ }
137
+ detach = true;
138
+ detector = genericStartDetector;
139
+ } else if ((typeof timeoutMs === 'boolean' || (timeoutMs as any) instanceof Boolean) && Boolean(timeoutMs)) {
140
+ if (!this.opts.detached) {
141
+ throw new Error(`Unable to detach process that is not started with 'detached' option`);
142
+ }
143
+ detach = true;
144
+ timeoutMs = null;
145
+ }
146
+
147
+ let startDelayTimer: NodeJS.Timeout | null = null;
148
+ let startTimeoutTimer: NodeJS.Timeout | null = null;
149
+
150
+ return await new Promise<void>((resolve, reject) => {
151
+ this.proc = spawn(this.cmd, this.args, this.opts);
152
+
153
+ const handleOutput = (streams: {
154
+ stdout: TSubProcessOptions extends TIsBufferOpts ? Buffer : string;
155
+ stderr: TSubProcessOptions extends TIsBufferOpts ? Buffer : string;
156
+ }) => {
157
+ const {stdout, stderr} = streams;
158
+
159
+ try {
160
+ if (detector && detector(stdout, stderr)) {
161
+ detector = null;
162
+ resolve();
163
+ }
164
+ } catch (e) {
165
+ reject(e as Error);
166
+ }
167
+
168
+ this.emit('output', stdout, stderr);
169
+ };
170
+
171
+ this.proc.on('error', async (err: NodeJS.ErrnoException) => {
172
+ this.proc?.removeAllListeners('exit');
173
+ this.proc?.kill('SIGINT');
174
+
175
+ let error = err;
176
+ if (error.code === 'ENOENT') {
177
+ error = await formatEnoent(error, this.cmd, this.opts?.cwd?.toString());
178
+ }
179
+ reject(error);
180
+
181
+ this.proc?.unref();
182
+ this.proc = null;
183
+ });
184
+
185
+ const handleStreamLines = (streamName: StreamName, input: Readable) => {
186
+ const rl = createInterface({input});
187
+ rl.on('line', (line) => {
188
+ if (this.listenerCount(`lines-${streamName}`)) {
189
+ this.emit(`lines-${streamName}`, [line]);
190
+ }
191
+ this.emit(`line-${streamName}`, line);
192
+ if (this.listenerCount('stream-line')) {
193
+ this.emitLines(streamName, line);
194
+ }
195
+ });
196
+ };
197
+
198
+ const isBuffer = Boolean(this.opts.isBuffer);
199
+ const encoding = this.opts.encoding || 'utf8';
200
+
201
+ if (this.proc.stdout) {
202
+ this.proc.stdout.on('data', (chunk: Buffer) =>
203
+ handleOutput({
204
+ stdout: (isBuffer ? chunk : chunk.toString(encoding)) as TSubProcessOptions extends TIsBufferOpts
205
+ ? Buffer
206
+ : string,
207
+ stderr: (isBuffer ? Buffer.alloc(0) : '') as TSubProcessOptions extends TIsBufferOpts ? Buffer : string,
208
+ }),
209
+ );
210
+ handleStreamLines('stdout', this.proc.stdout);
211
+ }
212
+
213
+ if (this.proc.stderr) {
214
+ this.proc.stderr.on('data', (chunk: Buffer) =>
215
+ handleOutput({
216
+ stdout: (isBuffer ? Buffer.alloc(0) : '') as TSubProcessOptions extends TIsBufferOpts ? Buffer : string,
217
+ stderr: (isBuffer ? chunk : chunk.toString(encoding)) as TSubProcessOptions extends TIsBufferOpts
218
+ ? Buffer
219
+ : string,
220
+ }),
221
+ );
222
+ handleStreamLines('stderr', this.proc.stderr);
223
+ }
224
+
225
+ this.proc.on('exit', (code: number | null, signal: NodeJS.Signals | null) => {
226
+ this.emit('exit', code, signal);
227
+
228
+ let event: 'stop' | 'die' | 'end' = this.expectingExit ? 'stop' : 'die';
229
+ if (!this.expectingExit && code === 0) {
230
+ event = 'end';
231
+ }
232
+ this.emit(event, code, signal);
233
+
234
+ this.proc = null;
235
+ this.expectingExit = false;
236
+ });
237
+
238
+ if (!detector) {
239
+ startDelayTimer = setTimeout(() => resolve(), startDelay);
240
+ }
241
+
242
+ if (typeof timeoutMs === 'number' || (timeoutMs as any) instanceof Number) {
243
+ startTimeoutTimer = setTimeout(() => {
244
+ reject(new Error(`The process did not start within ${timeoutMs}ms (cmd: '${this.rep}')`));
245
+ }, Number(timeoutMs));
246
+ }
247
+ }).finally(() => {
248
+ if (startDelayTimer) {
249
+ clearTimeout(startDelayTimer);
250
+ }
251
+ if (startTimeoutTimer) {
252
+ clearTimeout(startTimeoutTimer);
253
+ }
254
+ if (detach && this.proc) {
255
+ this.proc.unref();
256
+ }
257
+ });
258
+ }
259
+
260
+ /**
261
+ * Stops the running subprocess by sending a signal.
262
+ *
263
+ * @param signal - Signal to send to the process (default: 'SIGTERM')
264
+ * @param timeout - Maximum time to wait for process to exit in ms (default: 10000)
265
+ *
266
+ * @throws {Error} When process is not running or doesn't exit within timeout
267
+ *
268
+ * @example
269
+ * ```typescript
270
+ * // Graceful stop with SIGTERM
271
+ * await proc.stop();
272
+ *
273
+ * // Force kill with SIGKILL
274
+ * await proc.stop('SIGKILL');
275
+ *
276
+ * // Custom timeout
277
+ * await proc.stop('SIGTERM', 5000);
278
+ * ```
279
+ */
280
+ async stop(signal: NodeJS.Signals = 'SIGTERM', timeout = 10000): Promise<void> {
281
+ if (!this.isRunning) {
282
+ throw new Error(`Can't stop process; it's not currently running (cmd: '${this.rep}')`);
283
+ }
284
+ return await new Promise<void>((resolve, reject) => {
285
+ const stopTimeoutTimer = setTimeout(() => {
286
+ reject(new Error(`Process didn't end after ${timeout}ms (cmd: '${this.rep}')`));
287
+ }, timeout).unref();
288
+ this.proc?.once('close', () => {
289
+ clearTimeout(stopTimeoutTimer);
290
+ resolve();
291
+ });
292
+ this.expectingExit = true;
293
+ this.proc?.kill(signal);
294
+ });
295
+ }
296
+
297
+ /**
298
+ * Waits for the process to exit and validates its exit code.
299
+ *
300
+ * @param allowedExitCodes - Array of acceptable exit codes (default: [0])
301
+ * @returns Promise resolving to the exit code
302
+ *
303
+ * @throws {Error} When process is not running or exits with disallowed code
304
+ *
305
+ * @example
306
+ * ```typescript
307
+ * // Wait for successful exit (code 0)
308
+ * const code = await proc.join();
309
+ *
310
+ * // Allow multiple exit codes
311
+ * const code = await proc.join([0, 1, 2]);
312
+ * ```
313
+ */
314
+ async join(allowedExitCodes: number[] = [0]): Promise<number | null> {
315
+ if (!this.isRunning) {
316
+ throw new Error(`Cannot join process; it is not currently running (cmd: '${this.rep}')`);
317
+ }
318
+
319
+ return await new Promise<number | null>((resolve, reject) => {
320
+ this.proc?.once('exit', (code: number | null) => {
321
+ if (code !== null && !allowedExitCodes.includes(code)) {
322
+ reject(new Error(`Process ended with exitcode ${code} (cmd: '${this.rep}')`));
323
+ } else {
324
+ resolve(code);
325
+ }
326
+ });
327
+ });
328
+ }
329
+
330
+ /**
331
+ * Detaches the process so it continues running independently.
332
+ *
333
+ * The process must have been created with the 'detached' option.
334
+ * Once detached, the process will not be killed when the parent exits.
335
+ *
336
+ * @throws {Error} When process was not created with 'detached' option
337
+ */
338
+ detachProcess(): void {
339
+ if (!this.opts.detached) {
340
+ throw new Error(`Unable to detach process that is not started with 'detached' option`);
341
+ }
342
+ if (this.proc) {
343
+ this.proc.unref();
344
+ }
345
+ }
346
+
347
+ private emitLines(streamName: StreamName, lines: Iterable<string> | string): void {
348
+ const doEmit = (line: string) => this.emit('stream-line', `[${streamName.toUpperCase()}] ${line}`);
349
+
350
+ if (typeof lines === 'string' || (lines as any) instanceof String) {
351
+ doEmit(lines as string);
352
+ } else {
353
+ for (const line of lines) {
354
+ doEmit(line);
355
+ }
356
+ }
357
+ }
358
+ }
@@ -0,0 +1,83 @@
1
+ import type {SpawnOptions} from 'node:child_process';
2
+
3
+ /**
4
+ * Minimal logger interface used by teen_process for debug output.
5
+ */
6
+ export type TeenProcessLogger = {
7
+ /** Called for each debug message emitted by exec/SubProcess. */
8
+ debug: (...args: any[]) => void;
9
+ };
10
+
11
+ /**
12
+ * Extra options supported by teen_process on top of Node's SpawnOptions.
13
+ */
14
+ export interface TeenProcessProps {
15
+ /** Ignore and discard all child stdout/stderr (reduces memory use). */
16
+ ignoreOutput?: boolean;
17
+ /** When true, exec/SubProcess emits Buffers; otherwise strings (default). */
18
+ isBuffer?: boolean;
19
+ /** Optional logger for streaming debug output. */
20
+ logger?: TeenProcessLogger;
21
+ /** Maximum bytes retained in the stdout circular buffer. */
22
+ maxStdoutBufferSize?: number;
23
+ /** Maximum bytes retained in the stderr circular buffer. */
24
+ maxStderrBufferSize?: number;
25
+ /** Encoding used when returning string output (default: 'utf8'). */
26
+ encoding?: BufferEncoding;
27
+ }
28
+
29
+ /** Options accepted by exec (SpawnOptions + teen_process props). */
30
+ export type TeenProcessExecOptions = SpawnOptions & TeenProcessProps;
31
+
32
+ /** Additional properties attached to exec errors. */
33
+ export type TeenProcessExecErrorProps = {
34
+ stdout: string;
35
+ stderr: string;
36
+ code: number | null;
37
+ };
38
+
39
+ /** Error thrown by exec on non-zero exit or timeout. */
40
+ export type ExecError = Error & TeenProcessExecErrorProps;
41
+
42
+ /**
43
+ * Extracts the isBuffer property from options.
44
+ */
45
+ export type BufferProp<T extends {isBuffer?: boolean}> = T['isBuffer'] extends true ? Buffer : string;
46
+
47
+ /**
48
+ * Resolves to the correct exec result shape based on buffer mode.
49
+ * Defaults to string output when isBuffer is false/undefined.
50
+ */
51
+ export type TeenProcessExecResult<T extends string | Buffer> = {
52
+ stdout: T;
53
+ stderr: T;
54
+ code: number | null;
55
+ };
56
+
57
+ /** Supported stdio stream names. */
58
+ export type StreamName = 'stdout' | 'stderr';
59
+
60
+ /** Additional SubProcess-only options. */
61
+ export type SubProcessCustomOptions = {
62
+ /** When true, SubProcess emits Buffers instead of strings. */
63
+ isBuffer?: boolean;
64
+ /** Encoding used when isBuffer is false. */
65
+ encoding?: BufferEncoding;
66
+ };
67
+
68
+ /** Options accepted by SubProcess (extends spawn options). */
69
+ export type SubProcessOptions = SubProcessCustomOptions & SpawnOptions;
70
+
71
+ /** Helper type representing SubProcess buffer mode. */
72
+ export type TIsBufferOpts = {
73
+ isBuffer: true;
74
+ };
75
+
76
+ /**
77
+ * Function that detects when a subprocess has started.
78
+ * Receives stdout/stderr as Buffer when isBuffer is true, otherwise strings.
79
+ */
80
+ export type StartDetector<T extends SubProcessOptions> = (
81
+ stdout: T extends TIsBufferOpts ? Buffer : string,
82
+ stderr?: T extends TIsBufferOpts ? Buffer : string,
83
+ ) => unknown;