@vforsh/argus-watcher 0.1.11 → 0.1.13

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 (329) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/cdp/mouse.d.ts +19 -3
  3. package/dist/cdp/mouse.d.ts.map +1 -1
  4. package/dist/cdp/mouse.js +57 -9
  5. package/dist/cdp/mouse.js.map +1 -1
  6. package/dist/cdp/pageIndicator.d.ts +5 -0
  7. package/dist/cdp/pageIndicator.d.ts.map +1 -1
  8. package/dist/cdp/pageIndicator.js +22 -254
  9. package/dist/cdp/pageIndicator.js.map +1 -1
  10. package/dist/cdp/pageIndicatorScript.d.ts +20 -0
  11. package/dist/cdp/pageIndicatorScript.d.ts.map +1 -0
  12. package/dist/cdp/pageIndicatorScript.js +405 -0
  13. package/dist/cdp/pageIndicatorScript.js.map +1 -0
  14. package/dist/cdp/recording.d.ts +15 -0
  15. package/dist/cdp/recording.d.ts.map +1 -0
  16. package/dist/cdp/recording.js +389 -0
  17. package/dist/cdp/recording.js.map +1 -0
  18. package/dist/cdp/screenshot.d.ts.map +1 -1
  19. package/dist/cdp/screenshot.js +2 -133
  20. package/dist/cdp/screenshot.js.map +1 -1
  21. package/dist/cdp/visualCapture.d.ts +38 -0
  22. package/dist/cdp/visualCapture.d.ts.map +1 -0
  23. package/dist/cdp/visualCapture.js +156 -0
  24. package/dist/cdp/visualCapture.js.map +1 -0
  25. package/dist/events.d.ts +1 -1
  26. package/dist/events.d.ts.map +1 -1
  27. package/dist/http/routes/authCookies.d.ts +5 -10
  28. package/dist/http/routes/authCookies.d.ts.map +1 -1
  29. package/dist/http/routes/authCookies.js +17 -30
  30. package/dist/http/routes/authCookies.js.map +1 -1
  31. package/dist/http/routes/defineDomTargetRoute.d.ts +14 -5
  32. package/dist/http/routes/defineDomTargetRoute.d.ts.map +1 -1
  33. package/dist/http/routes/defineDomTargetRoute.js +27 -33
  34. package/dist/http/routes/defineDomTargetRoute.js.map +1 -1
  35. package/dist/http/routes/defineRoute.d.ts +9 -0
  36. package/dist/http/routes/defineRoute.d.ts.map +1 -1
  37. package/dist/http/routes/defineRoute.js +9 -9
  38. package/dist/http/routes/defineRoute.js.map +1 -1
  39. package/dist/http/routes/domSelectorRoute.d.ts +4 -11
  40. package/dist/http/routes/domSelectorRoute.d.ts.map +1 -1
  41. package/dist/http/routes/domSelectorRoute.js +9 -17
  42. package/dist/http/routes/domSelectorRoute.js.map +1 -1
  43. package/dist/http/routes/getAuthCookies.d.ts +1 -2
  44. package/dist/http/routes/getAuthCookies.d.ts.map +1 -1
  45. package/dist/http/routes/getAuthCookies.js +14 -14
  46. package/dist/http/routes/getAuthCookies.js.map +1 -1
  47. package/dist/http/routes/getAuthState.d.ts +1 -2
  48. package/dist/http/routes/getAuthState.d.ts.map +1 -1
  49. package/dist/http/routes/getAuthState.js +13 -13
  50. package/dist/http/routes/getAuthState.js.map +1 -1
  51. package/dist/http/routes/getDialog.d.ts +1 -2
  52. package/dist/http/routes/getDialog.d.ts.map +1 -1
  53. package/dist/http/routes/getDialog.js +7 -10
  54. package/dist/http/routes/getDialog.js.map +1 -1
  55. package/dist/http/routes/getEmulation.d.ts +1 -2
  56. package/dist/http/routes/getEmulation.d.ts.map +1 -1
  57. package/dist/http/routes/getEmulation.js +7 -7
  58. package/dist/http/routes/getEmulation.js.map +1 -1
  59. package/dist/http/routes/getExtensionDiagnostics.d.ts +2 -0
  60. package/dist/http/routes/getExtensionDiagnostics.d.ts.map +1 -0
  61. package/dist/http/routes/getExtensionDiagnostics.js +16 -0
  62. package/dist/http/routes/getExtensionDiagnostics.js.map +1 -0
  63. package/dist/http/routes/getExtensionTabs.d.ts +1 -2
  64. package/dist/http/routes/getExtensionTabs.d.ts.map +1 -1
  65. package/dist/http/routes/getExtensionTabs.js +18 -16
  66. package/dist/http/routes/getExtensionTabs.js.map +1 -1
  67. package/dist/http/routes/getLogs.d.ts +1 -2
  68. package/dist/http/routes/getLogs.d.ts.map +1 -1
  69. package/dist/http/routes/getLogs.js +31 -26
  70. package/dist/http/routes/getLogs.js.map +1 -1
  71. package/dist/http/routes/getNet.d.ts +1 -2
  72. package/dist/http/routes/getNet.d.ts.map +1 -1
  73. package/dist/http/routes/getNet.js +19 -21
  74. package/dist/http/routes/getNet.js.map +1 -1
  75. package/dist/http/routes/getNetRequest.d.ts +1 -2
  76. package/dist/http/routes/getNetRequest.d.ts.map +1 -1
  77. package/dist/http/routes/getNetRequest.js +22 -20
  78. package/dist/http/routes/getNetRequest.js.map +1 -1
  79. package/dist/http/routes/getNetRequestBody.d.ts +1 -2
  80. package/dist/http/routes/getNetRequestBody.d.ts.map +1 -1
  81. package/dist/http/routes/getNetRequestBody.js +53 -51
  82. package/dist/http/routes/getNetRequestBody.js.map +1 -1
  83. package/dist/http/routes/getNetRequests.d.ts +1 -2
  84. package/dist/http/routes/getNetRequests.d.ts.map +1 -1
  85. package/dist/http/routes/getNetRequests.js +19 -21
  86. package/dist/http/routes/getNetRequests.js.map +1 -1
  87. package/dist/http/routes/getNetSse.d.ts +1 -2
  88. package/dist/http/routes/getNetSse.d.ts.map +1 -1
  89. package/dist/http/routes/getNetSse.js +19 -21
  90. package/dist/http/routes/getNetSse.js.map +1 -1
  91. package/dist/http/routes/getNetTail.d.ts +1 -2
  92. package/dist/http/routes/getNetTail.d.ts.map +1 -1
  93. package/dist/http/routes/getNetTail.js +21 -30
  94. package/dist/http/routes/getNetTail.js.map +1 -1
  95. package/dist/http/routes/getNetWebSocketConnection.d.ts +1 -2
  96. package/dist/http/routes/getNetWebSocketConnection.d.ts.map +1 -1
  97. package/dist/http/routes/getNetWebSocketConnection.js +22 -17
  98. package/dist/http/routes/getNetWebSocketConnection.js.map +1 -1
  99. package/dist/http/routes/getNetWebSockets.d.ts +1 -2
  100. package/dist/http/routes/getNetWebSockets.d.ts.map +1 -1
  101. package/dist/http/routes/getNetWebSockets.js +19 -21
  102. package/dist/http/routes/getNetWebSockets.js.map +1 -1
  103. package/dist/http/routes/getStatus.d.ts +1 -2
  104. package/dist/http/routes/getStatus.d.ts.map +1 -1
  105. package/dist/http/routes/getStatus.js +6 -4
  106. package/dist/http/routes/getStatus.js.map +1 -1
  107. package/dist/http/routes/getTail.d.ts +1 -2
  108. package/dist/http/routes/getTail.d.ts.map +1 -1
  109. package/dist/http/routes/getTail.js +31 -26
  110. package/dist/http/routes/getTail.js.map +1 -1
  111. package/dist/http/routes/getTargets.d.ts +1 -2
  112. package/dist/http/routes/getTargets.d.ts.map +1 -1
  113. package/dist/http/routes/getTargets.js +14 -13
  114. package/dist/http/routes/getTargets.js.map +1 -1
  115. package/dist/http/routes/getThrottle.d.ts +1 -2
  116. package/dist/http/routes/getThrottle.d.ts.map +1 -1
  117. package/dist/http/routes/getThrottle.js +7 -7
  118. package/dist/http/routes/getThrottle.js.map +1 -1
  119. package/dist/http/routes/index.d.ts +5 -1
  120. package/dist/http/routes/index.d.ts.map +1 -1
  121. package/dist/http/routes/index.js +121 -114
  122. package/dist/http/routes/index.js.map +1 -1
  123. package/dist/http/routes/netFilters.d.ts +10 -0
  124. package/dist/http/routes/netFilters.d.ts.map +1 -1
  125. package/dist/http/routes/netFilters.js +23 -1
  126. package/dist/http/routes/netFilters.js.map +1 -1
  127. package/dist/http/routes/netMock.d.ts +3 -0
  128. package/dist/http/routes/netMock.d.ts.map +1 -0
  129. package/dist/http/routes/netMock.js +141 -0
  130. package/dist/http/routes/netMock.js.map +1 -0
  131. package/dist/http/routes/postAttach.d.ts +1 -2
  132. package/dist/http/routes/postAttach.d.ts.map +1 -1
  133. package/dist/http/routes/postAttach.js +23 -22
  134. package/dist/http/routes/postAttach.js.map +1 -1
  135. package/dist/http/routes/postAuthStateLoad.d.ts +1 -2
  136. package/dist/http/routes/postAuthStateLoad.d.ts.map +1 -1
  137. package/dist/http/routes/postAuthStateLoad.js +29 -34
  138. package/dist/http/routes/postAuthStateLoad.js.map +1 -1
  139. package/dist/http/routes/postCodeEdit.d.ts +1 -2
  140. package/dist/http/routes/postCodeEdit.d.ts.map +1 -1
  141. package/dist/http/routes/postCodeEdit.js +20 -25
  142. package/dist/http/routes/postCodeEdit.js.map +1 -1
  143. package/dist/http/routes/postCodeGrep.d.ts +1 -2
  144. package/dist/http/routes/postCodeGrep.d.ts.map +1 -1
  145. package/dist/http/routes/postCodeGrep.js +20 -25
  146. package/dist/http/routes/postCodeGrep.js.map +1 -1
  147. package/dist/http/routes/postCodeList.d.ts +1 -2
  148. package/dist/http/routes/postCodeList.d.ts.map +1 -1
  149. package/dist/http/routes/postCodeList.js +14 -19
  150. package/dist/http/routes/postCodeList.js.map +1 -1
  151. package/dist/http/routes/postCodeRead.d.ts +1 -2
  152. package/dist/http/routes/postCodeRead.d.ts.map +1 -1
  153. package/dist/http/routes/postCodeRead.js +24 -29
  154. package/dist/http/routes/postCodeRead.js.map +1 -1
  155. package/dist/http/routes/postDetach.d.ts +1 -2
  156. package/dist/http/routes/postDetach.d.ts.map +1 -1
  157. package/dist/http/routes/postDetach.js +23 -22
  158. package/dist/http/routes/postDetach.js.map +1 -1
  159. package/dist/http/routes/postDialog.d.ts +1 -2
  160. package/dist/http/routes/postDialog.d.ts.map +1 -1
  161. package/dist/http/routes/postDialog.js +30 -29
  162. package/dist/http/routes/postDialog.js.map +1 -1
  163. package/dist/http/routes/postDomAdd.d.ts +1 -2
  164. package/dist/http/routes/postDomAdd.d.ts.map +1 -1
  165. package/dist/http/routes/postDomAdd.js +44 -48
  166. package/dist/http/routes/postDomAdd.js.map +1 -1
  167. package/dist/http/routes/postDomClick.d.ts +0 -1
  168. package/dist/http/routes/postDomClick.d.ts.map +1 -1
  169. package/dist/http/routes/postDomClick.js +12 -21
  170. package/dist/http/routes/postDomClick.js.map +1 -1
  171. package/dist/http/routes/postDomDrag.d.ts +2 -0
  172. package/dist/http/routes/postDomDrag.d.ts.map +1 -0
  173. package/dist/http/routes/postDomDrag.js +54 -0
  174. package/dist/http/routes/postDomDrag.js.map +1 -0
  175. package/dist/http/routes/postDomFill.d.ts +1 -2
  176. package/dist/http/routes/postDomFill.d.ts.map +1 -1
  177. package/dist/http/routes/postDomFill.js +17 -49
  178. package/dist/http/routes/postDomFill.js.map +1 -1
  179. package/dist/http/routes/postDomInfo.d.ts +1 -2
  180. package/dist/http/routes/postDomInfo.d.ts.map +1 -1
  181. package/dist/http/routes/postDomInfo.js +14 -20
  182. package/dist/http/routes/postDomInfo.js.map +1 -1
  183. package/dist/http/routes/postDomKeydown.d.ts +1 -2
  184. package/dist/http/routes/postDomKeydown.d.ts.map +1 -1
  185. package/dist/http/routes/postDomKeydown.js +26 -30
  186. package/dist/http/routes/postDomKeydown.js.map +1 -1
  187. package/dist/http/routes/postDomModify.d.ts +1 -2
  188. package/dist/http/routes/postDomModify.d.ts.map +1 -1
  189. package/dist/http/routes/postDomModify.js +30 -41
  190. package/dist/http/routes/postDomModify.js.map +1 -1
  191. package/dist/http/routes/postDomRemove.d.ts +1 -2
  192. package/dist/http/routes/postDomRemove.d.ts.map +1 -1
  193. package/dist/http/routes/postDomRemove.js +13 -18
  194. package/dist/http/routes/postDomRemove.js.map +1 -1
  195. package/dist/http/routes/postDomScroll.d.ts +1 -2
  196. package/dist/http/routes/postDomScroll.d.ts.map +1 -1
  197. package/dist/http/routes/postDomScroll.js +37 -42
  198. package/dist/http/routes/postDomScroll.js.map +1 -1
  199. package/dist/http/routes/postDomScrollTo.d.ts +1 -2
  200. package/dist/http/routes/postDomScrollTo.d.ts.map +1 -1
  201. package/dist/http/routes/postDomScrollTo.js +42 -48
  202. package/dist/http/routes/postDomScrollTo.js.map +1 -1
  203. package/dist/http/routes/postDomSetFile.d.ts +1 -2
  204. package/dist/http/routes/postDomSetFile.d.ts.map +1 -1
  205. package/dist/http/routes/postDomSetFile.js +29 -32
  206. package/dist/http/routes/postDomSetFile.js.map +1 -1
  207. package/dist/http/routes/postDomTree.d.ts +1 -2
  208. package/dist/http/routes/postDomTree.d.ts.map +1 -1
  209. package/dist/http/routes/postDomTree.js +13 -17
  210. package/dist/http/routes/postDomTree.js.map +1 -1
  211. package/dist/http/routes/postEmulation.d.ts +1 -2
  212. package/dist/http/routes/postEmulation.d.ts.map +1 -1
  213. package/dist/http/routes/postEmulation.js +29 -39
  214. package/dist/http/routes/postEmulation.js.map +1 -1
  215. package/dist/http/routes/postEval.d.ts +1 -2
  216. package/dist/http/routes/postEval.d.ts.map +1 -1
  217. package/dist/http/routes/postEval.js +22 -26
  218. package/dist/http/routes/postEval.js.map +1 -1
  219. package/dist/http/routes/postLocate.d.ts +2 -4
  220. package/dist/http/routes/postLocate.d.ts.map +1 -1
  221. package/dist/http/routes/postLocate.js +40 -60
  222. package/dist/http/routes/postLocate.js.map +1 -1
  223. package/dist/http/routes/postNetClear.d.ts +1 -2
  224. package/dist/http/routes/postNetClear.d.ts.map +1 -1
  225. package/dist/http/routes/postNetClear.js +14 -13
  226. package/dist/http/routes/postNetClear.js.map +1 -1
  227. package/dist/http/routes/postRecord.d.ts +3 -0
  228. package/dist/http/routes/postRecord.d.ts.map +1 -0
  229. package/dist/http/routes/postRecord.js +88 -0
  230. package/dist/http/routes/postRecord.js.map +1 -0
  231. package/dist/http/routes/postReload.d.ts +1 -2
  232. package/dist/http/routes/postReload.d.ts.map +1 -1
  233. package/dist/http/routes/postReload.js +10 -16
  234. package/dist/http/routes/postReload.js.map +1 -1
  235. package/dist/http/routes/postScreenshot.d.ts +1 -2
  236. package/dist/http/routes/postScreenshot.d.ts.map +1 -1
  237. package/dist/http/routes/postScreenshot.js +11 -22
  238. package/dist/http/routes/postScreenshot.js.map +1 -1
  239. package/dist/http/routes/postShutdown.d.ts +1 -2
  240. package/dist/http/routes/postShutdown.d.ts.map +1 -1
  241. package/dist/http/routes/postShutdown.js +15 -11
  242. package/dist/http/routes/postShutdown.js.map +1 -1
  243. package/dist/http/routes/postSnapshot.d.ts +1 -2
  244. package/dist/http/routes/postSnapshot.d.ts.map +1 -1
  245. package/dist/http/routes/postSnapshot.js +21 -26
  246. package/dist/http/routes/postSnapshot.js.map +1 -1
  247. package/dist/http/routes/postThrottle.d.ts +1 -2
  248. package/dist/http/routes/postThrottle.d.ts.map +1 -1
  249. package/dist/http/routes/postThrottle.js +26 -35
  250. package/dist/http/routes/postThrottle.js.map +1 -1
  251. package/dist/http/routes/postTraceStart.d.ts +1 -2
  252. package/dist/http/routes/postTraceStart.d.ts.map +1 -1
  253. package/dist/http/routes/postTraceStart.js +8 -16
  254. package/dist/http/routes/postTraceStart.js.map +1 -1
  255. package/dist/http/routes/postTraceStop.d.ts +1 -2
  256. package/dist/http/routes/postTraceStop.d.ts.map +1 -1
  257. package/dist/http/routes/postTraceStop.js +8 -16
  258. package/dist/http/routes/postTraceStop.js.map +1 -1
  259. package/dist/http/routes/postVisibility.d.ts +1 -2
  260. package/dist/http/routes/postVisibility.d.ts.map +1 -1
  261. package/dist/http/routes/postVisibility.js +21 -27
  262. package/dist/http/routes/postVisibility.js.map +1 -1
  263. package/dist/http/routes/storage.d.ts +2 -4
  264. package/dist/http/routes/storage.d.ts.map +1 -1
  265. package/dist/http/routes/storage.js +13 -25
  266. package/dist/http/routes/storage.js.map +1 -1
  267. package/dist/http/server.d.ts +6 -1
  268. package/dist/http/server.d.ts.map +1 -1
  269. package/dist/http/server.js.map +1 -1
  270. package/dist/index.d.ts +5 -5
  271. package/dist/index.d.ts.map +1 -1
  272. package/dist/index.js.map +1 -1
  273. package/dist/native-messaging/control-session-manager.d.ts +36 -0
  274. package/dist/native-messaging/control-session-manager.d.ts.map +1 -0
  275. package/dist/native-messaging/control-session-manager.js +96 -0
  276. package/dist/native-messaging/control-session-manager.js.map +1 -0
  277. package/dist/native-messaging/messaging.d.ts +4 -4
  278. package/dist/native-messaging/messaging.d.ts.map +1 -1
  279. package/dist/native-messaging/messaging.js.map +1 -1
  280. package/dist/native-messaging/session-manager.d.ts +2 -15
  281. package/dist/native-messaging/session-manager.d.ts.map +1 -1
  282. package/dist/native-messaging/session-manager.js +0 -34
  283. package/dist/native-messaging/session-manager.js.map +1 -1
  284. package/dist/native-messaging/types.d.ts +78 -2
  285. package/dist/native-messaging/types.d.ts.map +1 -1
  286. package/dist/net/NetMockController.d.ts +26 -0
  287. package/dist/net/NetMockController.d.ts.map +1 -0
  288. package/dist/net/NetMockController.js +264 -0
  289. package/dist/net/NetMockController.js.map +1 -0
  290. package/dist/runtime/watcherServices.d.ts +3 -0
  291. package/dist/runtime/watcherServices.d.ts.map +1 -1
  292. package/dist/runtime/watcherServices.js +14 -1
  293. package/dist/runtime/watcherServices.js.map +1 -1
  294. package/dist/runtime/watcherSetup.d.ts +3 -0
  295. package/dist/runtime/watcherSetup.d.ts.map +1 -1
  296. package/dist/runtime/watcherSetup.js +4 -0
  297. package/dist/runtime/watcherSetup.js.map +1 -1
  298. package/dist/scripts/install-host.js +58 -54
  299. package/dist/scripts/install-host.js.map +1 -1
  300. package/dist/sources/extension-control-source.d.ts +9 -0
  301. package/dist/sources/extension-control-source.d.ts.map +1 -0
  302. package/dist/sources/extension-control-source.js +109 -0
  303. package/dist/sources/extension-control-source.js.map +1 -0
  304. package/dist/sources/extension-frame-state.d.ts +5 -0
  305. package/dist/sources/extension-frame-state.d.ts.map +1 -1
  306. package/dist/sources/extension-frame-state.js +7 -0
  307. package/dist/sources/extension-frame-state.js.map +1 -1
  308. package/dist/sources/extension-source.d.ts +3 -1
  309. package/dist/sources/extension-source.d.ts.map +1 -1
  310. package/dist/sources/extension-source.js +50 -137
  311. package/dist/sources/extension-source.js.map +1 -1
  312. package/dist/sources/extension-target-recovery.d.ts +32 -0
  313. package/dist/sources/extension-target-recovery.d.ts.map +1 -0
  314. package/dist/sources/extension-target-recovery.js +114 -0
  315. package/dist/sources/extension-target-recovery.js.map +1 -0
  316. package/dist/sources/types.d.ts +8 -3
  317. package/dist/sources/types.d.ts.map +1 -1
  318. package/dist/startWatcherRuntime.d.ts.map +1 -1
  319. package/dist/startWatcherRuntime.js +12 -2
  320. package/dist/startWatcherRuntime.js.map +1 -1
  321. package/package.json +1 -1
  322. package/dist/http/routes/postStorageLocal.d.ts +0 -2
  323. package/dist/http/routes/postStorageLocal.d.ts.map +0 -1
  324. package/dist/http/routes/postStorageLocal.js +0 -3
  325. package/dist/http/routes/postStorageLocal.js.map +0 -1
  326. package/dist/http/routes/postStorageSession.d.ts +0 -2
  327. package/dist/http/routes/postStorageSession.d.ts.map +0 -1
  328. package/dist/http/routes/postStorageSession.js +0 -3
  329. package/dist/http/routes/postStorageSession.js.map +0 -1
@@ -1,24 +1,25 @@
1
+ import { defineJsonRoute } from './defineRoute.js';
2
+ import { respondInvalidBody, respondJson } from '../httpUtils.js';
1
3
  import { emitRequest } from './types.js';
2
- import { respondJson, respondInvalidBody, respondError, readJsonBody } from '../httpUtils.js';
3
- export const handle = async (req, res, _url, ctx) => {
4
- if (!ctx.sourceHandle?.detachTarget) {
5
- return respondJson(res, { ok: false, error: { message: 'Not available', code: 'not_available' } }, 400);
6
- }
7
- const payload = await readJsonBody(req, res);
8
- if (!payload) {
9
- return;
10
- }
11
- const targetId = typeof payload.targetId === 'string' ? payload.targetId : typeof payload.tabId === 'number' ? String(payload.tabId) : null;
12
- if (!targetId) {
13
- return respondInvalidBody(res, 'targetId is required');
14
- }
15
- emitRequest(ctx, res, 'detach');
16
- try {
17
- ctx.sourceHandle.detachTarget(targetId);
18
- respondJson(res, { ok: true, message: 'Detach request sent' });
19
- }
20
- catch (error) {
21
- respondError(res, error);
22
- }
23
- };
4
+ export const route = defineJsonRoute({
5
+ method: 'POST',
6
+ path: '/detach',
7
+ parseBody: true,
8
+ extensionOnly: true,
9
+ handle: async ({ res, ctx, body: payload }) => {
10
+ if (!ctx.sourceHandle?.detachTarget) {
11
+ return respondJson(res, { ok: false, error: { message: 'Not available', code: 'not_available' } }, 400);
12
+ }
13
+ const targetId = typeof payload.targetId === 'string' ? payload.targetId : typeof payload.tabId === 'number' ? String(payload.tabId) : null;
14
+ if (!targetId) {
15
+ return respondInvalidBody(res, 'targetId is required');
16
+ }
17
+ emitRequest(ctx, res, 'detach');
18
+ return await ctx.sourceHandle.detachTarget(targetId);
19
+ },
20
+ handleError: (res, error) => {
21
+ respondJson(res, { ok: false, error: { message: error instanceof Error ? error.message : String(error), code: 'extension_action_failed' } }, 400);
22
+ return true;
23
+ },
24
+ });
24
25
  //# sourceMappingURL=postDetach.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postDetach.js","sourceRoot":"","sources":["../../../src/http/routes/postDetach.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE7F,MAAM,CAAC,MAAM,MAAM,GAAiB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IACjE,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,CAAC;QACrC,OAAO,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;IACxG,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,YAAY,CAAwC,GAAG,EAAE,GAAG,CAAC,CAAA;IACnF,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAM;IACP,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IAC3I,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,OAAO,kBAAkB,CAAC,GAAG,EAAE,sBAAsB,CAAC,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AK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAC3I,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,OAAO,kBAAkB,CAAC,GAAG,EAAE,sBAAsB,CAAC,CAAA;QACvD,CAAC;QAED,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAA;QAC/B,OAAO,MAAM,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAA;IACrD,CAAC;IACD,WAAW,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;QAC3B,WAAW,CACV,GAAG,EACH,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,EAAE,EAC1H,GAAG,CACH,CAAA;QACD,OAAO,IAAI,CAAA;IACZ,CAAC;CACD,CAAC,CAAA"}
@@ -1,3 +1,2 @@
1
- import type { RouteHandler } from './types.js';
2
- export declare const handle: RouteHandler;
1
+ export declare const route: import("./defineRoute.js").WatcherRouteDefinition;
3
2
  //# sourceMappingURL=postDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postDialog.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDialog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,eAAO,MAAM,MAAM,EAAE,YA4CpB,CAAA"}
1
+ {"version":3,"file":"postDialog.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDialog.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,mDA2ChB,CAAA"}
@@ -1,26 +1,30 @@
1
- import { emitRequest } from './types.js';
2
- import { readJsonBody, respondError, respondInvalidBody, respondJson } from '../httpUtils.js';
3
- export const handle = async (req, res, _url, ctx) => {
4
- const payload = await readJsonBody(req, res);
5
- if (!payload) {
6
- return;
7
- }
8
- emitRequest(ctx, res, 'dialog/handle');
9
- const action = payload.action;
10
- if (action !== 'accept' && action !== 'dismiss') {
11
- respondInvalidBody(res, 'Dialog action must be "accept" or "dismiss"');
12
- return;
13
- }
14
- const dialog = ctx.getDialog();
15
- if (!dialog) {
16
- respondJson(res, { ok: false, error: { message: 'No active browser dialog', code: 'no_active_dialog' } }, 409);
17
- return;
18
- }
19
- if (payload.promptText != null && dialog.type !== 'prompt') {
20
- respondJson(res, { ok: false, error: { message: 'Prompt text can only be sent to prompt dialogs', code: 'dialog_not_prompt' } }, 409);
21
- return;
22
- }
23
- try {
1
+ import { defineJsonRoute } from './defineRoute.js';
2
+ import { respondJson } from '../httpUtils.js';
3
+ export const route = defineJsonRoute({
4
+ method: 'POST',
5
+ path: '/dialog',
6
+ parseBody: true,
7
+ endpoint: 'dialog/handle',
8
+ validate: (payload) => {
9
+ if (payload.action !== 'accept' && payload.action !== 'dismiss') {
10
+ return 'Dialog action must be "accept" or "dismiss"';
11
+ }
12
+ return null;
13
+ },
14
+ handle: async ({ res, ctx, body: payload }) => {
15
+ const action = payload.action;
16
+ const dialog = ctx.getDialog();
17
+ if (!dialog) {
18
+ respondJson(res, { ok: false, error: { message: 'No active browser dialog', code: 'no_active_dialog' } }, 409);
19
+ return;
20
+ }
21
+ if (payload.promptText != null && dialog.type !== 'prompt') {
22
+ respondJson(res, {
23
+ ok: false,
24
+ error: { message: 'Prompt text can only be sent to prompt dialogs', code: 'dialog_not_prompt' },
25
+ }, 409);
26
+ return;
27
+ }
24
28
  await ctx.pageCdpSession.sendAndWait('Page.handleJavaScriptDialog', {
25
29
  accept: action === 'accept',
26
30
  promptText: payload.promptText,
@@ -30,10 +34,7 @@ export const handle = async (req, res, _url, ctx) => {
30
34
  action,
31
35
  dialog,
32
36
  };
33
- respondJson(res, response);
34
- }
35
- catch (error) {
36
- respondError(res, error);
37
- }
38
- };
37
+ return response;
38
+ },
39
+ });
39
40
  //# sourceMappingURL=postDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postDialog.js","sourceRoot":"","sources":["../../../src/http/routes/postDialog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7F,MAAM,CAAC,MAAM,MAAM,GAAiB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IACjE,MAAM,OAAO,GAAG,MAAM,YAAY,CAAsB,GAAG,EAAE,GAAG,CAAC,CAAA;IACjE,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAM;IACP,CAAC;IAED,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,eAAe,CAAC,CAAA;IAEtC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;IAC7B,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACjD,kBAAkB,CAAC,GAAG,EAAE,6CAA6C,CAAC,CAAA;QACtE,OAAM;IACP,CAAC;IAED,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,CAAA;IAC9B,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAA0B,EAAE,GAAG,CAAC,CAAA;QACtI,OAAM;IACP,CAAC;IAED,IAAI,OAAO,CAAC,UAAU,IAAI,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC5D,WAAW,CACV,GAAG,EACH,EAAE,EAAE,EAAE,KAAK,E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C7B,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,CAAA;QAC9B,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAA0B,EAAE,GAAG,CAAC,CAAA;YACtI,OAAM;QACP,CAAC;QAED,IAAI,OAAO,CAAC,UAAU,IAAI,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5D,WAAW,CACV,GAAG,EACH;gBACC,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,EAAE,OAAO,EAAE,gDAAgD,EAAE,IAAI,EAAE,mBAAmB,EAAE;aACvE,EACzB,GAAG,CACH,CAAA;YACD,OAAM;QACP,CAAC;QAED,MAAM,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,6BAA6B,EAAE;YACnE,MAAM,EAAE,MAAM,KAAK,QAAQ;YAC3B,UAAU,EAAE,OAAO,CAAC,UAAU;SAC9B,CAAC,CAAA;QAEF,MAAM,QAAQ,GAAyB;YACtC,EAAE,EAAE,IAAI;YACR,MAAM;YACN,MAAM;SACN,CAAA;QACD,OAAO,QAAQ,CAAA;IAChB,CAAC;CACD,CAAC,CAAA"}
@@ -1,5 +1,4 @@
1
- import type { RouteHandler } from './types.js';
2
- export declare const handle: RouteHandler;
1
+ export declare const route: import("./defineRoute.js").WatcherRouteDefinition;
3
2
  export declare const selectDomAddNodeIds: (allNodeIds: number[], options: {
4
3
  all: boolean;
5
4
  nth?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"postDomAdd.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomAdd.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAM9C,eAAO,MAAM,MAAM,EAAE,YA4GpB,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,EAAE,EAAE,SAAS;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,MAAM,EAWzG,CAAA"}
1
+ {"version":3,"file":"postDomAdd.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomAdd.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,KAAK,mDA8FhB,CAAA;AAEF,eAAO,MAAM,mBAAmB,GAAI,YAAY,MAAM,EAAE,EAAE,SAAS;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,MAAM,EAWzG,CAAA"}
@@ -1,43 +1,44 @@
1
- import { emitRequest } from './types.js';
2
1
  import { insertAdjacentHtml } from '../../cdp/dom.js';
3
2
  import { resolveDomSelectorMatches } from '../../cdp/mouse.js';
4
- import { respondJson, respondInvalidBody, respondError, readJsonBody } from '../httpUtils.js';
5
- export const handle = async (req, res, _url, ctx) => {
6
- const payload = await readJsonBody(req, res);
7
- if (!payload) {
8
- return;
9
- }
10
- if (!payload.selector || typeof payload.selector !== 'string') {
11
- return respondInvalidBody(res, 'selector is required');
12
- }
13
- if (!payload.html || typeof payload.html !== 'string') {
14
- return respondInvalidBody(res, 'html is required');
15
- }
16
- const validPositions = ['beforebegin', 'afterbegin', 'beforeend', 'afterend'];
17
- if (payload.position && !validPositions.includes(payload.position)) {
18
- return respondInvalidBody(res, `position must be one of: ${validPositions.join(', ')}`);
19
- }
20
- const all = payload.all ?? false;
21
- if (typeof all !== 'boolean') {
22
- return respondInvalidBody(res, 'all must be a boolean');
23
- }
24
- const nth = payload.nth;
25
- if (nth != null && (!Number.isFinite(nth) || !Number.isInteger(nth) || nth < 0)) {
26
- return respondInvalidBody(res, 'nth must be a non-negative integer');
27
- }
28
- const expect = payload.expect;
29
- if (expect != null && (!Number.isFinite(expect) || !Number.isInteger(expect) || expect < 0)) {
30
- return respondInvalidBody(res, 'expect must be a non-negative integer');
31
- }
32
- const text = payload.text ?? false;
33
- if (typeof text !== 'boolean') {
34
- return respondInvalidBody(res, 'text must be a boolean');
35
- }
36
- if (all && nth != null) {
37
- return respondInvalidBody(res, 'nth cannot be combined with all=true');
38
- }
39
- emitRequest(ctx, res, 'dom/add');
40
- try {
3
+ import { defineJsonRoute } from './defineRoute.js';
4
+ import { respondJson } from '../httpUtils.js';
5
+ const validPositions = ['beforebegin', 'afterbegin', 'beforeend', 'afterend'];
6
+ export const route = defineJsonRoute({
7
+ method: 'POST',
8
+ path: '/dom/add',
9
+ parseBody: true,
10
+ endpoint: 'dom/add',
11
+ validate: (payload) => {
12
+ if (!payload.selector || typeof payload.selector !== 'string') {
13
+ return 'selector is required';
14
+ }
15
+ if (!payload.html || typeof payload.html !== 'string') {
16
+ return 'html is required';
17
+ }
18
+ if (payload.position && !validPositions.includes(payload.position)) {
19
+ return `position must be one of: ${validPositions.join(', ')}`;
20
+ }
21
+ const all = payload.all ?? false;
22
+ if (typeof all !== 'boolean') {
23
+ return 'all must be a boolean';
24
+ }
25
+ if (payload.nth != null && (!Number.isFinite(payload.nth) || !Number.isInteger(payload.nth) || payload.nth < 0)) {
26
+ return 'nth must be a non-negative integer';
27
+ }
28
+ if (payload.expect != null && (!Number.isFinite(payload.expect) || !Number.isInteger(payload.expect) || payload.expect < 0)) {
29
+ return 'expect must be a non-negative integer';
30
+ }
31
+ if (typeof (payload.text ?? false) !== 'boolean') {
32
+ return 'text must be a boolean';
33
+ }
34
+ if (all && payload.nth != null) {
35
+ return 'nth cannot be combined with all=true';
36
+ }
37
+ return null;
38
+ },
39
+ handle: async ({ res, ctx, body: payload }) => {
40
+ const all = payload.all ?? false;
41
+ const { nth, expect } = payload;
41
42
  const { allNodeIds } = await resolveDomSelectorMatches(ctx.cdpSession, payload.selector, true);
42
43
  if (expect != null && allNodeIds.length !== expect) {
43
44
  return respondJson(res, {
@@ -67,23 +68,18 @@ export const handle = async (req, res, _url, ctx) => {
67
68
  }, 400);
68
69
  }
69
70
  if (allNodeIds.length === 0) {
70
- const response = { ok: true, matches: 0, inserted: 0 };
71
- return respondJson(res, response);
71
+ return { ok: true, matches: 0, inserted: 0 };
72
72
  }
73
73
  const nodeIds = selectDomAddNodeIds(allNodeIds, { all, nth });
74
74
  const { insertedCount } = await insertAdjacentHtml(ctx.cdpSession, {
75
75
  nodeIds,
76
76
  html: payload.html,
77
77
  position: payload.position,
78
- text,
78
+ text: payload.text ?? false,
79
79
  });
80
- const response = { ok: true, matches: allNodeIds.length, inserted: insertedCount };
81
- respondJson(res, response);
82
- }
83
- catch (error) {
84
- respondError(res, error);
85
- }
86
- };
80
+ return { ok: true, matches: allNodeIds.length, inserted: insertedCount };
81
+ },
82
+ });
87
83
  export const selectDomAddNodeIds = (allNodeIds, options) => {
88
84
  if (options.all) {
89
85
  return allNodeIds;
@@ -1 +1 @@
1
- {"version":3,"file":"postDomAdd.js","sourceRoot":"","sources":["../../../src/http/routes/postDomAdd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE7F,MAAM,CAAC,MAAM,MAAM,GAAiB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IACjE,MAAM,OAAO,GAAG,MAAM,YAAY,CAAgB,GAAG,EAAE,GAAG,CAAC,CAAA;IAC3D,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAM;IACP,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC/D,OAAO,kBAAkB,CAAC,GA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AG,EAAE,GAAG,EAAE,CAAC,CAAA;QAC7D,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,kBAAkB,CAAC,GAAG,CAAC,UAAU,EAAE;YAClE,OAAO;YACP,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,KAAK;SAC3B,CAAC,CAAA;QAEF,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;IACzE,CAAC;CACD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAoB,EAAE,OAAuC,EAAY,EAAE;IAC9G,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACjB,OAAO,UAAU,CAAA;IAClB,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QACtC,OAAO,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACtC,CAAC;IAED,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAC9B,CAAC,CAAA"}
@@ -1,3 +1,2 @@
1
1
  export declare const route: import("./defineRoute.js").WatcherRouteDefinition;
2
- export declare const handle: import("./types.js").RouteHandler;
3
2
  //# sourceMappingURL=postDomClick.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postDomClick.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomClick.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,KAAK,mDA6DhB,CAAA;AAEF,eAAO,MAAM,MAAM,mCAAgB,CAAA"}
1
+ {"version":3,"file":"postDomClick.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomClick.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,KAAK,mDAoDhB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { domClickRequestSchema } from '@vforsh/argus-core';
2
2
  import { respondMissingElementRef, respondMultipleMatches, respondTargetResolutionError } from './domSelectorRoute.js';
3
3
  import { defineJsonRoute } from './defineRoute.js';
4
- import { clickDomNodes, clickAtPoint, resolveNodeTopLeft } from '../../cdp/mouse.js';
4
+ import { clickDomNodes, clickAtPoint, resolveNodePoint } from '../../cdp/mouse.js';
5
5
  import { resolveElementTargets } from '../../cdp/dom/selector.js';
6
6
  export const route = defineJsonRoute({
7
7
  method: 'POST',
@@ -12,27 +12,19 @@ export const route = defineJsonRoute({
12
12
  const all = payload.all ?? false;
13
13
  const button = payload.button ?? 'left';
14
14
  const waitMs = payload.wait ?? 0;
15
- const hasSelector = payload.selector != null;
16
- const hasRef = payload.ref != null;
15
+ const hasElementTarget = payload.selector != null || payload.ref != null;
17
16
  const hasCoords = payload.x != null || payload.y != null;
18
- if (!hasSelector && !hasRef) {
17
+ if (!hasElementTarget) {
19
18
  await clickAtPoint(ctx.cdpSession, payload.x, payload.y, button);
20
19
  return { ok: true, matches: 0, clicked: 1 };
21
20
  }
22
- const resolved = waitMs > 0
23
- ? await resolveElementTargets(ctx.cdpSession, ctx.elementRefs, {
24
- selector: payload.selector,
25
- ref: payload.ref,
26
- all,
27
- text: payload.text,
28
- waitMs,
29
- })
30
- : await resolveElementTargets(ctx.cdpSession, ctx.elementRefs, {
31
- selector: payload.selector,
32
- ref: payload.ref,
33
- all,
34
- text: payload.text,
35
- });
21
+ const resolved = await resolveElementTargets(ctx.cdpSession, ctx.elementRefs, {
22
+ selector: payload.selector,
23
+ ref: payload.ref,
24
+ all,
25
+ text: payload.text,
26
+ waitMs,
27
+ });
36
28
  if (resolved.missingRef && payload.ref) {
37
29
  respondMissingElementRef(res, payload.ref);
38
30
  return;
@@ -47,8 +39,8 @@ export const route = defineJsonRoute({
47
39
  }
48
40
  if (hasCoords) {
49
41
  for (const handle of handles) {
50
- const topLeft = await resolveNodeTopLeft(ctx.cdpSession, handle);
51
- await clickAtPoint(ctx.cdpSession, topLeft.x + payload.x, topLeft.y + payload.y, button);
42
+ const point = await resolveNodePoint(ctx.cdpSession, handle, { x: payload.x, y: payload.y });
43
+ await clickAtPoint(ctx.cdpSession, point.x, point.y, button);
52
44
  }
53
45
  return { ok: true, matches: allHandles.length, clicked: handles.length };
54
46
  }
@@ -57,5 +49,4 @@ export const route = defineJsonRoute({
57
49
  },
58
50
  handleError: respondTargetResolutionError,
59
51
  });
60
- export const handle = route.handler;
61
52
  //# sourceMappingURL=postDomClick.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postDomClick.js","sourceRoot":"","sources":["../../../src/http/routes/postDomClick.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AACtH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAEjE,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;IACpC,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,qBAAqB;IACjC,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE;QAC7C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,KAAK,CAAA;QAChC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,MAAM,CAAA;QACvC,MAAM,MAAM,GAAG,OAAO,CA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AAM,EAA6B,CAAA;QACpG,CAAC;QAED,MAAM,aAAa,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;QACpD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAA6B,CAAA;IACpG,CAAC;IACD,WAAW,EAAE,4BAA4B;CACzC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const route: import("./defineRoute.js").WatcherRouteDefinition;
2
+ //# sourceMappingURL=postDomDrag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postDomDrag.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomDrag.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,KAAK,mDAqDhB,CAAA"}
@@ -0,0 +1,54 @@
1
+ import { domDragRequestSchema } from '@vforsh/argus-core';
2
+ import { dragAtPoints, dragDomNodes, resolveDragEndPoint } from '../../cdp/mouse.js';
3
+ import { resolveElementTargets } from '../../cdp/dom/selector.js';
4
+ import { defineJsonRoute } from './defineRoute.js';
5
+ import { respondMissingElementRef, respondMultipleMatches, respondTargetResolutionError } from './domSelectorRoute.js';
6
+ export const route = defineJsonRoute({
7
+ method: 'POST',
8
+ path: '/dom/drag',
9
+ bodySchema: domDragRequestSchema,
10
+ endpoint: 'dom/drag',
11
+ handle: async ({ body: payload, res, ctx }) => {
12
+ const all = payload.all ?? false;
13
+ const waitMs = payload.wait ?? 0;
14
+ const hasElementTarget = payload.selector != null || payload.ref != null;
15
+ const hasStartOffset = payload.x != null || payload.y != null;
16
+ const destination = payload.to ? { to: payload.to } : { delta: payload.delta };
17
+ const gesture = {
18
+ button: payload.button ?? 'left',
19
+ durationMs: payload.duration ?? 250,
20
+ steps: payload.steps ?? 12,
21
+ };
22
+ if (!hasElementTarget) {
23
+ const start = { x: payload.x, y: payload.y };
24
+ await dragAtPoints(ctx.cdpSession, start, resolveDragEndPoint(start, destination), gesture);
25
+ return { ok: true, matches: 0, dragged: 1 };
26
+ }
27
+ const resolved = await resolveElementTargets(ctx.cdpSession, ctx.elementRefs, {
28
+ selector: payload.selector,
29
+ ref: payload.ref,
30
+ all,
31
+ text: payload.text,
32
+ waitMs,
33
+ });
34
+ if (resolved.missingRef && payload.ref) {
35
+ respondMissingElementRef(res, payload.ref);
36
+ return;
37
+ }
38
+ const { allHandles, handles } = resolved;
39
+ if (!all && allHandles.length > 1) {
40
+ respondMultipleMatches(res, allHandles.length, 'drag');
41
+ return;
42
+ }
43
+ if (allHandles.length === 0) {
44
+ return { ok: true, matches: 0, dragged: 0 };
45
+ }
46
+ await dragDomNodes(ctx.cdpSession, handles, destination, {
47
+ ...gesture,
48
+ offset: hasStartOffset ? { x: payload.x, y: payload.y } : undefined,
49
+ });
50
+ return { ok: true, matches: allHandles.length, dragged: handles.length };
51
+ },
52
+ handleError: respondTargetResolutionError,
53
+ });
54
+ //# sourceMappingURL=postDomDrag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postDomDrag.js","sourceRoot":"","sources":["../../../src/http/routes/postDomDrag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AAEtH,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;IACpC,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,WAAW;IACjB,UAAU,EAAE,oBAAoB;IAChC,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,KAAK,EAAE,EAAE,IAAI,EAA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;YAC1B,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,GAAG;YACH,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM;SACN,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;YACxC,wBAAwB,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;YAC1C,OAAM;QACP,CAAC;QAED,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,QAAQ,CAAA;QACxC,IAAI,CAAC,GAAG,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,sBAAsB,CAAC,GAAG,EAAE,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;YACtD,OAAM;QACP,CAAC;QAED,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAA4B,CAAA;QACtE,CAAC;QAED,MAAM,YAAY,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE;YACxD,GAAG,OAAO;YACV,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAE,EAAE,CAAC,EAAE,OAAO,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC,SAAS;SACrE,CAAC,CAAA;QACF,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAA4B,CAAA;IACnG,CAAC;IACD,WAAW,EAAE,4BAA4B;CACzC,CAAC,CAAA"}
@@ -1,3 +1,2 @@
1
- import type { RouteHandler } from './types.js';
2
- export declare const handle: RouteHandler;
1
+ export declare const route: import("./defineRoute.js").WatcherRouteDefinition;
3
2
  //# sourceMappingURL=postDomFill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postDomFill.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomFill.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAO9C,eAAO,MAAM,MAAM,EAAE,YAsDpB,CAAA"}
1
+ {"version":3,"file":"postDomFill.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomFill.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,mDAkBhB,CAAA"}
@@ -1,54 +1,22 @@
1
- import { respondMissingElementRef, respondMultipleMatches, respondTargetResolutionError } from './domSelectorRoute.js';
2
- import { emitRequest } from './types.js';
3
1
  import { fillResolvedNodes } from '../../cdp/dom.js';
4
- import { resolveElementTargets } from '../../cdp/dom/selector.js';
5
- import { respondJson, respondInvalidBody, respondError, readJsonBody } from '../httpUtils.js';
6
- export const handle = async (req, res, _url, ctx) => {
7
- const payload = await readJsonBody(req, res);
8
- if (!payload) {
9
- return;
10
- }
11
- const hasSelector = typeof payload.selector === 'string' && payload.selector.trim() !== '';
12
- const hasRef = typeof payload.ref === 'string' && payload.ref.trim() !== '';
13
- if (hasSelector === hasRef) {
14
- return respondInvalidBody(res, 'Exactly one of selector or ref is required');
15
- }
16
- if (typeof payload.value !== 'string') {
17
- return respondInvalidBody(res, 'value is required');
18
- }
19
- const all = payload.all ?? false;
20
- if (typeof all !== 'boolean') {
21
- return respondInvalidBody(res, 'all must be a boolean');
22
- }
23
- const waitMs = payload.wait ?? 0;
24
- if (typeof waitMs !== 'number' || !Number.isFinite(waitMs) || waitMs < 0) {
25
- return respondInvalidBody(res, 'wait must be a non-negative number (ms)');
26
- }
27
- emitRequest(ctx, res, 'dom/fill');
28
- try {
29
- const resolved = await resolveElementTargets(ctx.cdpSession, ctx.elementRefs, {
30
- selector: payload.selector,
31
- ref: payload.ref,
32
- all,
33
- text: payload.text,
34
- waitMs,
35
- });
36
- if (resolved.missingRef && payload.ref) {
37
- return respondMissingElementRef(res, payload.ref);
2
+ import { defineDomTargetRoute } from './defineDomTargetRoute.js';
3
+ export const route = defineDomTargetRoute({
4
+ path: '/dom/fill',
5
+ endpoint: 'dom/fill',
6
+ action: 'fill',
7
+ validate: (payload) => {
8
+ if (typeof payload.value !== 'string') {
9
+ return 'value is required';
38
10
  }
39
- const { allHandles, handles } = resolved;
40
- if (!all && allHandles.length > 1) {
41
- return respondMultipleMatches(res, allHandles.length, 'fill');
11
+ const waitMs = payload.wait ?? 0;
12
+ if (typeof waitMs !== 'number' || !Number.isFinite(waitMs) || waitMs < 0) {
13
+ return 'wait must be a non-negative number (ms)';
42
14
  }
15
+ return null;
16
+ },
17
+ run: async ({ handles, ctx, payload }) => {
43
18
  const filledCount = await fillResolvedNodes(ctx.cdpSession, handles, payload.value);
44
- const response = { ok: true, matches: allHandles.length, filled: filledCount };
45
- respondJson(res, response);
46
- }
47
- catch (error) {
48
- if (respondTargetResolutionError(res, error)) {
49
- return;
50
- }
51
- respondError(res, error);
52
- }
53
- };
19
+ return { filled: filledCount };
20
+ },
21
+ });
54
22
  //# sourceMappingURL=postDomFill.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postDomFill.js","sourceRoot":"","sources":["../../../src/http/routes/postDomFill.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE7F,MAAM,CAAC,MAAM,MAAM,GAAiB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IACjE,MAAM,O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,CAAkD;IAC1F,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE;QACrB,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YACvC,OAAO,mBAAmB,CAAA;QAC3B,CAAC;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,CAAA;QAChC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1E,OAAO,yCAAyC,CAAA;QACjD,CAAC;QACD,OAAO,IAAI,CAAA;IACZ,CAAC;IACD,GAAG,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;QACxC,MAAM,WAAW,GAAG,MAAM,iBAAiB,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;QACnF,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAA;IAC/B,CAAC;CACD,CAAC,CAAA"}
@@ -1,3 +1,2 @@
1
- import type { RouteHandler } from './types.js';
2
- export declare const handle: RouteHandler;
1
+ export declare const route: import("./defineRoute.js").WatcherRouteDefinition;
3
2
  //# sourceMappingURL=postDomInfo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postDomInfo.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomInfo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAM9C,eAAO,MAAM,MAAM,EAAE,YA6BpB,CAAA"}
1
+ {"version":3,"file":"postDomInfo.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomInfo.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,KAAK,mDAuBhB,CAAA"}