@vforsh/argus-watcher 0.1.2 → 0.1.3

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 (327) hide show
  1. package/README.md +66 -14
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/artifacts.d.ts +13 -0
  4. package/dist/artifacts.d.ts.map +1 -0
  5. package/dist/artifacts.js +27 -0
  6. package/dist/artifacts.js.map +1 -0
  7. package/dist/buffer/LogBuffer.d.ts +8 -3
  8. package/dist/buffer/LogBuffer.d.ts.map +1 -1
  9. package/dist/buffer/LogBuffer.js +9 -1
  10. package/dist/buffer/LogBuffer.js.map +1 -1
  11. package/dist/buffer/NetBuffer.d.ts +29 -0
  12. package/dist/buffer/NetBuffer.d.ts.map +1 -0
  13. package/dist/buffer/NetBuffer.js +85 -0
  14. package/dist/buffer/NetBuffer.js.map +1 -0
  15. package/dist/cdp/accessibility.d.ts +18 -0
  16. package/dist/cdp/accessibility.d.ts.map +1 -0
  17. package/dist/cdp/accessibility.js +300 -0
  18. package/dist/cdp/accessibility.js.map +1 -0
  19. package/dist/cdp/connection.d.ts +24 -0
  20. package/dist/cdp/connection.d.ts.map +1 -0
  21. package/dist/cdp/connection.js +131 -0
  22. package/dist/cdp/connection.js.map +1 -0
  23. package/dist/cdp/dom/fill.d.ts +22 -0
  24. package/dist/cdp/dom/fill.d.ts.map +1 -0
  25. package/dist/cdp/dom/fill.js +59 -0
  26. package/dist/cdp/dom/fill.js.map +1 -0
  27. package/dist/cdp/dom/info.d.ts +14 -0
  28. package/dist/cdp/dom/info.d.ts.map +1 -0
  29. package/dist/cdp/dom/info.js +52 -0
  30. package/dist/cdp/dom/info.js.map +1 -0
  31. package/dist/cdp/dom/insert.d.ts +19 -0
  32. package/dist/cdp/dom/insert.d.ts.map +1 -0
  33. package/dist/cdp/dom/insert.js +30 -0
  34. package/dist/cdp/dom/insert.js.map +1 -0
  35. package/dist/cdp/dom/modify.d.ts +50 -0
  36. package/dist/cdp/dom/modify.d.ts.map +1 -0
  37. package/dist/cdp/dom/modify.js +100 -0
  38. package/dist/cdp/dom/modify.js.map +1 -0
  39. package/dist/cdp/dom/remove.d.ts +17 -0
  40. package/dist/cdp/dom/remove.d.ts.map +1 -0
  41. package/dist/cdp/dom/remove.js +27 -0
  42. package/dist/cdp/dom/remove.js.map +1 -0
  43. package/dist/cdp/dom/selector.d.ts +19 -0
  44. package/dist/cdp/dom/selector.d.ts.map +1 -0
  45. package/dist/cdp/dom/selector.js +64 -0
  46. package/dist/cdp/dom/selector.js.map +1 -0
  47. package/dist/cdp/dom/setFile.d.ts +21 -0
  48. package/dist/cdp/dom/setFile.d.ts.map +1 -0
  49. package/dist/cdp/dom/setFile.js +82 -0
  50. package/dist/cdp/dom/setFile.js.map +1 -0
  51. package/dist/cdp/dom/submit.d.ts +15 -0
  52. package/dist/cdp/dom/submit.d.ts.map +1 -0
  53. package/dist/cdp/dom/submit.js +130 -0
  54. package/dist/cdp/dom/submit.js.map +1 -0
  55. package/dist/cdp/dom/tree.d.ts +16 -0
  56. package/dist/cdp/dom/tree.d.ts.map +1 -0
  57. package/dist/cdp/dom/tree.js +100 -0
  58. package/dist/cdp/dom/tree.js.map +1 -0
  59. package/dist/cdp/dom/types.d.ts +16 -0
  60. package/dist/cdp/dom/types.d.ts.map +1 -0
  61. package/dist/cdp/dom/types.js +2 -0
  62. package/dist/cdp/dom/types.js.map +1 -0
  63. package/dist/cdp/dom.d.ts +17 -0
  64. package/dist/cdp/dom.d.ts.map +1 -0
  65. package/dist/cdp/dom.js +10 -0
  66. package/dist/cdp/dom.js.map +1 -0
  67. package/dist/cdp/emulation.d.ts +16 -0
  68. package/dist/cdp/emulation.d.ts.map +1 -0
  69. package/dist/cdp/emulation.js +40 -0
  70. package/dist/cdp/emulation.js.map +1 -0
  71. package/dist/cdp/eval.d.ts +10 -0
  72. package/dist/cdp/eval.d.ts.map +1 -0
  73. package/dist/cdp/eval.js +34 -0
  74. package/dist/cdp/eval.js.map +1 -0
  75. package/dist/cdp/keyboard.d.ts +38 -0
  76. package/dist/cdp/keyboard.d.ts.map +1 -0
  77. package/dist/cdp/keyboard.js +148 -0
  78. package/dist/cdp/keyboard.js.map +1 -0
  79. package/dist/cdp/mouse.d.ts +49 -0
  80. package/dist/cdp/mouse.d.ts.map +1 -0
  81. package/dist/cdp/mouse.js +199 -0
  82. package/dist/cdp/mouse.js.map +1 -0
  83. package/dist/cdp/networkCapture.d.ts +11 -0
  84. package/dist/cdp/networkCapture.d.ts.map +1 -0
  85. package/dist/cdp/networkCapture.js +99 -0
  86. package/dist/cdp/networkCapture.js.map +1 -0
  87. package/dist/cdp/pageIndicator.d.ts +41 -0
  88. package/dist/cdp/pageIndicator.d.ts.map +1 -0
  89. package/dist/cdp/pageIndicator.js +395 -0
  90. package/dist/cdp/pageIndicator.js.map +1 -0
  91. package/dist/cdp/redaction.d.ts +3 -0
  92. package/dist/cdp/redaction.d.ts.map +1 -0
  93. package/dist/cdp/redaction.js +35 -0
  94. package/dist/cdp/redaction.js.map +1 -0
  95. package/dist/cdp/remoteObject.d.ts +6 -0
  96. package/dist/cdp/remoteObject.d.ts.map +1 -0
  97. package/dist/cdp/remoteObject.js +94 -0
  98. package/dist/cdp/remoteObject.js.map +1 -0
  99. package/dist/cdp/screenshot.d.ts +10 -0
  100. package/dist/cdp/screenshot.d.ts.map +1 -0
  101. package/dist/cdp/screenshot.js +87 -0
  102. package/dist/cdp/screenshot.js.map +1 -0
  103. package/dist/cdp/storageLocal.d.ts +8 -0
  104. package/dist/cdp/storageLocal.d.ts.map +1 -0
  105. package/dist/cdp/storageLocal.js +70 -0
  106. package/dist/cdp/storageLocal.js.map +1 -0
  107. package/dist/cdp/text-filter.d.ts +19 -0
  108. package/dist/cdp/text-filter.d.ts.map +1 -0
  109. package/dist/cdp/text-filter.js +54 -0
  110. package/dist/cdp/text-filter.js.map +1 -0
  111. package/dist/cdp/throttle.d.ts +6 -0
  112. package/dist/cdp/throttle.d.ts.map +1 -0
  113. package/dist/cdp/throttle.js +9 -0
  114. package/dist/cdp/throttle.js.map +1 -0
  115. package/dist/cdp/tracing.d.ts +14 -0
  116. package/dist/cdp/tracing.d.ts.map +1 -0
  117. package/dist/cdp/tracing.js +115 -0
  118. package/dist/cdp/tracing.js.map +1 -0
  119. package/dist/cdp/watcher.d.ts +17 -2
  120. package/dist/cdp/watcher.d.ts.map +1 -1
  121. package/dist/cdp/watcher.js +124 -175
  122. package/dist/cdp/watcher.js.map +1 -1
  123. package/dist/emulation/EmulationController.d.ts +12 -0
  124. package/dist/emulation/EmulationController.d.ts.map +1 -0
  125. package/dist/emulation/EmulationController.js +83 -0
  126. package/dist/emulation/EmulationController.js.map +1 -0
  127. package/dist/events.d.ts +86 -0
  128. package/dist/events.d.ts.map +1 -0
  129. package/dist/events.js +2 -0
  130. package/dist/events.js.map +1 -0
  131. package/dist/fileLogs/WatcherFileLogger.d.ts +5 -2
  132. package/dist/fileLogs/WatcherFileLogger.d.ts.map +1 -1
  133. package/dist/fileLogs/WatcherFileLogger.js +30 -12
  134. package/dist/fileLogs/WatcherFileLogger.js.map +1 -1
  135. package/dist/http/httpUtils.d.ts +25 -0
  136. package/dist/http/httpUtils.d.ts.map +1 -0
  137. package/dist/http/httpUtils.js +170 -0
  138. package/dist/http/httpUtils.js.map +1 -0
  139. package/dist/http/router.d.ts +5 -0
  140. package/dist/http/router.d.ts.map +1 -0
  141. package/dist/http/router.js +81 -0
  142. package/dist/http/router.js.map +1 -0
  143. package/dist/http/routes/getEmulation.d.ts +3 -0
  144. package/dist/http/routes/getEmulation.d.ts.map +1 -0
  145. package/dist/http/routes/getEmulation.js +8 -0
  146. package/dist/http/routes/getEmulation.js.map +1 -0
  147. package/dist/http/routes/getLogs.d.ts +3 -0
  148. package/dist/http/routes/getLogs.d.ts.map +1 -0
  149. package/dist/http/routes/getLogs.js +28 -0
  150. package/dist/http/routes/getLogs.js.map +1 -0
  151. package/dist/http/routes/getNet.d.ts +3 -0
  152. package/dist/http/routes/getNet.d.ts.map +1 -0
  153. package/dist/http/routes/getNet.js +17 -0
  154. package/dist/http/routes/getNet.js.map +1 -0
  155. package/dist/http/routes/getNetTail.d.ts +3 -0
  156. package/dist/http/routes/getNetTail.d.ts.map +1 -0
  157. package/dist/http/routes/getNetTail.js +18 -0
  158. package/dist/http/routes/getNetTail.js.map +1 -0
  159. package/dist/http/routes/getStatus.d.ts +3 -0
  160. package/dist/http/routes/getStatus.d.ts.map +1 -0
  161. package/dist/http/routes/getStatus.js +21 -0
  162. package/dist/http/routes/getStatus.js.map +1 -0
  163. package/dist/http/routes/getTail.d.ts +3 -0
  164. package/dist/http/routes/getTail.d.ts.map +1 -0
  165. package/dist/http/routes/getTail.js +28 -0
  166. package/dist/http/routes/getTail.js.map +1 -0
  167. package/dist/http/routes/getTargets.d.ts +3 -0
  168. package/dist/http/routes/getTargets.d.ts.map +1 -0
  169. package/dist/http/routes/getTargets.js +16 -0
  170. package/dist/http/routes/getTargets.js.map +1 -0
  171. package/dist/http/routes/getThrottle.d.ts +3 -0
  172. package/dist/http/routes/getThrottle.d.ts.map +1 -0
  173. package/dist/http/routes/getThrottle.js +8 -0
  174. package/dist/http/routes/getThrottle.js.map +1 -0
  175. package/dist/http/routes/postAttach.d.ts +3 -0
  176. package/dist/http/routes/postAttach.d.ts.map +1 -0
  177. package/dist/http/routes/postAttach.js +23 -0
  178. package/dist/http/routes/postAttach.js.map +1 -0
  179. package/dist/http/routes/postDetach.d.ts +3 -0
  180. package/dist/http/routes/postDetach.d.ts.map +1 -0
  181. package/dist/http/routes/postDetach.js +23 -0
  182. package/dist/http/routes/postDetach.js.map +1 -0
  183. package/dist/http/routes/postDomAdd.d.ts +7 -0
  184. package/dist/http/routes/postDomAdd.d.ts.map +1 -0
  185. package/dist/http/routes/postDomAdd.js +97 -0
  186. package/dist/http/routes/postDomAdd.js.map +1 -0
  187. package/dist/http/routes/postDomClick.d.ts +3 -0
  188. package/dist/http/routes/postDomClick.d.ts.map +1 -0
  189. package/dist/http/routes/postDomClick.js +85 -0
  190. package/dist/http/routes/postDomClick.js.map +1 -0
  191. package/dist/http/routes/postDomFill.d.ts +3 -0
  192. package/dist/http/routes/postDomFill.d.ts.map +1 -0
  193. package/dist/http/routes/postDomFill.js +58 -0
  194. package/dist/http/routes/postDomFill.js.map +1 -0
  195. package/dist/http/routes/postDomFocus.d.ts +3 -0
  196. package/dist/http/routes/postDomFocus.d.ts.map +1 -0
  197. package/dist/http/routes/postDomFocus.js +40 -0
  198. package/dist/http/routes/postDomFocus.js.map +1 -0
  199. package/dist/http/routes/postDomHover.d.ts +3 -0
  200. package/dist/http/routes/postDomHover.d.ts.map +1 -0
  201. package/dist/http/routes/postDomHover.js +40 -0
  202. package/dist/http/routes/postDomHover.js.map +1 -0
  203. package/dist/http/routes/postDomInfo.d.ts +3 -0
  204. package/dist/http/routes/postDomInfo.d.ts.map +1 -0
  205. package/dist/http/routes/postDomInfo.js +40 -0
  206. package/dist/http/routes/postDomInfo.js.map +1 -0
  207. package/dist/http/routes/postDomKeydown.d.ts +3 -0
  208. package/dist/http/routes/postDomKeydown.d.ts.map +1 -0
  209. package/dist/http/routes/postDomKeydown.js +36 -0
  210. package/dist/http/routes/postDomKeydown.js.map +1 -0
  211. package/dist/http/routes/postDomModify.d.ts +3 -0
  212. package/dist/http/routes/postDomModify.d.ts.map +1 -0
  213. package/dist/http/routes/postDomModify.js +45 -0
  214. package/dist/http/routes/postDomModify.js.map +1 -0
  215. package/dist/http/routes/postDomRemove.d.ts +3 -0
  216. package/dist/http/routes/postDomRemove.d.ts.map +1 -0
  217. package/dist/http/routes/postDomRemove.js +39 -0
  218. package/dist/http/routes/postDomRemove.js.map +1 -0
  219. package/dist/http/routes/postDomScroll.d.ts +3 -0
  220. package/dist/http/routes/postDomScroll.d.ts.map +1 -0
  221. package/dist/http/routes/postDomScroll.js +75 -0
  222. package/dist/http/routes/postDomScroll.js.map +1 -0
  223. package/dist/http/routes/postDomScrollTo.d.ts +3 -0
  224. package/dist/http/routes/postDomScrollTo.d.ts.map +1 -0
  225. package/dist/http/routes/postDomScrollTo.js +69 -0
  226. package/dist/http/routes/postDomScrollTo.js.map +1 -0
  227. package/dist/http/routes/postDomSetFile.d.ts +3 -0
  228. package/dist/http/routes/postDomSetFile.d.ts.map +1 -0
  229. package/dist/http/routes/postDomSetFile.js +67 -0
  230. package/dist/http/routes/postDomSetFile.js.map +1 -0
  231. package/dist/http/routes/postDomSubmit.d.ts +3 -0
  232. package/dist/http/routes/postDomSubmit.d.ts.map +1 -0
  233. package/dist/http/routes/postDomSubmit.js +49 -0
  234. package/dist/http/routes/postDomSubmit.js.map +1 -0
  235. package/dist/http/routes/postDomTree.d.ts +3 -0
  236. package/dist/http/routes/postDomTree.d.ts.map +1 -0
  237. package/dist/http/routes/postDomTree.js +41 -0
  238. package/dist/http/routes/postDomTree.js.map +1 -0
  239. package/dist/http/routes/postEmulation.d.ts +3 -0
  240. package/dist/http/routes/postEmulation.d.ts.map +1 -0
  241. package/dist/http/routes/postEmulation.js +70 -0
  242. package/dist/http/routes/postEmulation.js.map +1 -0
  243. package/dist/http/routes/postEval.d.ts +3 -0
  244. package/dist/http/routes/postEval.d.ts.map +1 -0
  245. package/dist/http/routes/postEval.js +26 -0
  246. package/dist/http/routes/postEval.js.map +1 -0
  247. package/dist/http/routes/postReload.d.ts +3 -0
  248. package/dist/http/routes/postReload.d.ts.map +1 -0
  249. package/dist/http/routes/postReload.js +20 -0
  250. package/dist/http/routes/postReload.js.map +1 -0
  251. package/dist/http/routes/postScreenshot.d.ts +3 -0
  252. package/dist/http/routes/postScreenshot.d.ts.map +1 -0
  253. package/dist/http/routes/postScreenshot.js +17 -0
  254. package/dist/http/routes/postScreenshot.js.map +1 -0
  255. package/dist/http/routes/postShutdown.d.ts +3 -0
  256. package/dist/http/routes/postShutdown.d.ts.map +1 -0
  257. package/dist/http/routes/postShutdown.js +13 -0
  258. package/dist/http/routes/postShutdown.js.map +1 -0
  259. package/dist/http/routes/postSnapshot.d.ts +3 -0
  260. package/dist/http/routes/postSnapshot.d.ts.map +1 -0
  261. package/dist/http/routes/postSnapshot.js +28 -0
  262. package/dist/http/routes/postSnapshot.js.map +1 -0
  263. package/dist/http/routes/postStorageLocal.d.ts +3 -0
  264. package/dist/http/routes/postStorageLocal.d.ts.map +1 -0
  265. package/dist/http/routes/postStorageLocal.js +31 -0
  266. package/dist/http/routes/postStorageLocal.js.map +1 -0
  267. package/dist/http/routes/postThrottle.d.ts +3 -0
  268. package/dist/http/routes/postThrottle.d.ts.map +1 -0
  269. package/dist/http/routes/postThrottle.js +38 -0
  270. package/dist/http/routes/postThrottle.js.map +1 -0
  271. package/dist/http/routes/postTraceStart.d.ts +3 -0
  272. package/dist/http/routes/postTraceStart.d.ts.map +1 -0
  273. package/dist/http/routes/postTraceStart.js +17 -0
  274. package/dist/http/routes/postTraceStart.js.map +1 -0
  275. package/dist/http/routes/postTraceStop.d.ts +3 -0
  276. package/dist/http/routes/postTraceStop.d.ts.map +1 -0
  277. package/dist/http/routes/postTraceStop.js +17 -0
  278. package/dist/http/routes/postTraceStop.js.map +1 -0
  279. package/dist/http/routes/types.d.ts +9 -0
  280. package/dist/http/routes/types.d.ts.map +1 -0
  281. package/dist/http/routes/types.js +10 -0
  282. package/dist/http/routes/types.js.map +1 -0
  283. package/dist/http/server.d.ts +40 -1
  284. package/dist/http/server.d.ts.map +1 -1
  285. package/dist/http/server.js +3 -82
  286. package/dist/http/server.js.map +1 -1
  287. package/dist/index.d.ts +117 -14
  288. package/dist/index.d.ts.map +1 -1
  289. package/dist/index.js +330 -44
  290. package/dist/index.js.map +1 -1
  291. package/dist/native-messaging/messaging.d.ts +18 -0
  292. package/dist/native-messaging/messaging.d.ts.map +1 -0
  293. package/dist/native-messaging/messaging.js +94 -0
  294. package/dist/native-messaging/messaging.js.map +1 -0
  295. package/dist/native-messaging/session-manager.d.ts +105 -0
  296. package/dist/native-messaging/session-manager.d.ts.map +1 -0
  297. package/dist/native-messaging/session-manager.js +259 -0
  298. package/dist/native-messaging/session-manager.js.map +1 -0
  299. package/dist/native-messaging/types.d.ts +79 -0
  300. package/dist/native-messaging/types.d.ts.map +1 -0
  301. package/dist/native-messaging/types.js +6 -0
  302. package/dist/native-messaging/types.js.map +1 -0
  303. package/dist/registry/registry.d.ts +9 -2
  304. package/dist/registry/registry.d.ts.map +1 -1
  305. package/dist/registry/registry.js +53 -9
  306. package/dist/registry/registry.js.map +1 -1
  307. package/dist/scripts/install-host.d.ts +10 -0
  308. package/dist/scripts/install-host.d.ts.map +1 -0
  309. package/dist/scripts/install-host.js +189 -0
  310. package/dist/scripts/install-host.js.map +1 -0
  311. package/dist/sources/cdp-source.d.ts +24 -0
  312. package/dist/sources/cdp-source.d.ts.map +1 -0
  313. package/dist/sources/cdp-source.js +48 -0
  314. package/dist/sources/cdp-source.js.map +1 -0
  315. package/dist/sources/extension-source.d.ts +15 -0
  316. package/dist/sources/extension-source.d.ts.map +1 -0
  317. package/dist/sources/extension-source.js +256 -0
  318. package/dist/sources/extension-source.js.map +1 -0
  319. package/dist/sources/types.d.ts +92 -0
  320. package/dist/sources/types.d.ts.map +1 -0
  321. package/dist/sources/types.js +7 -0
  322. package/dist/sources/types.js.map +1 -0
  323. package/dist/throttle/ThrottleController.d.ts +12 -0
  324. package/dist/throttle/ThrottleController.d.ts.map +1 -0
  325. package/dist/throttle/ThrottleController.js +67 -0
  326. package/dist/throttle/ThrottleController.js.map +1 -0
  327. package/package.json +3 -2
@@ -0,0 +1,28 @@
1
+ import { emitRequest } from './types.js';
2
+ import { respondJson, respondInvalidMatch, respondInvalidMatchCase, clampNumber, parseLevels, resolveMatchCase, normalizeMatchPatterns, compileMatchPatterns, normalizeQueryValue, } from '../httpUtils.js';
3
+ export const handle = (_req, res, url, ctx) => {
4
+ const after = clampNumber(url.searchParams.get('after'), 0);
5
+ const limit = clampNumber(url.searchParams.get('limit'), 500, 1, 5000);
6
+ const levels = parseLevels(url.searchParams.get('levels'));
7
+ const match = url.searchParams.getAll('match');
8
+ const matchCase = resolveMatchCase(url.searchParams.get('matchCase'));
9
+ if (!matchCase) {
10
+ return respondInvalidMatchCase(res);
11
+ }
12
+ const source = normalizeQueryValue(url.searchParams.get('source'));
13
+ const sinceTs = clampNumber(url.searchParams.get('sinceTs'), undefined);
14
+ const matchPatterns = normalizeMatchPatterns(match);
15
+ if (matchPatterns.error) {
16
+ return respondInvalidMatch(res, matchPatterns.error);
17
+ }
18
+ const compiledMatch = compileMatchPatterns(matchPatterns.patterns, matchCase);
19
+ if (compiledMatch.error) {
20
+ return respondInvalidMatch(res, compiledMatch.error);
21
+ }
22
+ emitRequest(ctx, res, 'logs', { after, limit, levels, match: matchPatterns.patterns, matchCase, source, sinceTs });
23
+ const events = ctx.buffer.listAfter(after, { levels, match: compiledMatch.match, source, sinceTs }, limit);
24
+ const nextAfter = events.length > 0 ? (events[events.length - 1]?.id ?? after) : after;
25
+ const response = { ok: true, events, nextAfter };
26
+ respondJson(res, response);
27
+ };
28
+ //# sourceMappingURL=getLogs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLogs.js","sourceRoot":"","sources":["../../../src/http/routes/getLogs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EACN,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,iBAAiB,CAAA;AAExB,MAAM,CAAC,MAAM,MAAM,GAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3D,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,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MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,CAAA;IAC1G,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IACtF,MAAM,QAAQ,GAAiB,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;IAC9D,WAAW,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;AAC3B,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=getNet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNet.d.ts","sourceRoot":"","sources":["../../../src/http/routes/getNet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,eAAO,MAAM,MAAM,EAAE,YAgBpB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { emitRequest } from './types.js';
2
+ import { respondJson, clampNumber, normalizeQueryValue } from '../httpUtils.js';
3
+ export const handle = (_req, res, url, ctx) => {
4
+ if (!ctx.netBuffer) {
5
+ return respondJson(res, { ok: false, error: { code: 'net_disabled', message: 'Network capture is disabled for this watcher' } }, 400);
6
+ }
7
+ const after = clampNumber(url.searchParams.get('after'), 0);
8
+ const limit = clampNumber(url.searchParams.get('limit'), 500, 1, 5000);
9
+ const sinceTs = clampNumber(url.searchParams.get('sinceTs'), undefined);
10
+ const grep = normalizeQueryValue(url.searchParams.get('grep'));
11
+ emitRequest(ctx, res, 'net', { after, limit, sinceTs, grep });
12
+ const requests = ctx.netBuffer.listAfter(after, { sinceTs, grep }, limit);
13
+ const nextAfter = requests.length > 0 ? (requests[requests.length - 1]?.id ?? after) : after;
14
+ const response = { ok: true, requests, nextAfter };
15
+ respondJson(res, response);
16
+ };
17
+ //# sourceMappingURL=getNet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNet.js","sourceRoot":"","sources":["../../../src/http/routes/getNet.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE/E,MAAM,CAAC,MAAM,MAAM,GAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IAC3D,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QACpB,OAAO,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,8CAA8C,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;IACtI,CAAC;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3D,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IACtE,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAA;IACvE,MAAM,IAAI,GAAG,mBAAmB,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAE9D,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAA;IAE7D,MAAM,QAAQ,GAAG,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,CAAC,CAAA;IACzE,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IAC5F,MAAM,QAAQ,GAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA;IAC/D,WAAW,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;AAC3B,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=getNetTail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNetTail.d.ts","sourceRoot":"","sources":["../../../src/http/routes/getNetTail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,eAAO,MAAM,MAAM,EAAE,YAiBpB,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { emitRequest } from './types.js';
2
+ import { respondJson, clampNumber, normalizeQueryValue } from '../httpUtils.js';
3
+ export const handle = async (_req, res, url, ctx) => {
4
+ if (!ctx.netBuffer) {
5
+ return respondJson(res, { ok: false, error: { code: 'net_disabled', message: 'Network capture is disabled for this watcher' } }, 400);
6
+ }
7
+ const after = clampNumber(url.searchParams.get('after'), 0);
8
+ const limit = clampNumber(url.searchParams.get('limit'), 500, 1, 5000);
9
+ const timeoutMs = clampNumber(url.searchParams.get('timeoutMs'), 25_000, 1000, 120_000);
10
+ const sinceTs = clampNumber(url.searchParams.get('sinceTs'), undefined);
11
+ const grep = normalizeQueryValue(url.searchParams.get('grep'));
12
+ emitRequest(ctx, res, 'net/tail', { after, limit, sinceTs, timeoutMs, grep });
13
+ const requests = await ctx.netBuffer.waitForAfter(after, { sinceTs, grep }, limit, timeoutMs);
14
+ const nextAfter = requests.length > 0 ? (requests[requests.length - 1]?.id ?? after) : after;
15
+ const response = { ok: true, requests, nextAfter, timedOut: requests.length === 0 };
16
+ respondJson(res, response);
17
+ };
18
+ //# sourceMappingURL=getNetTail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNetTail.js","sourceRoot":"","sources":["../../../src/http/routes/getNetTail.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE/E,MAAM,CAAC,MAAM,MAAM,GAAiB,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IACjE,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QACpB,OAAO,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,8CAA8C,EAAE,EAAE,EAAE,GAAG,CAAC,CAAA;IACtI,CAAC;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3D,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IACtE,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IACvF,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAA;IACvE,MAAM,IAAI,GAAG,mBAAmB,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAE9D,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAE7E,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;IAC7F,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;IAC5F,MAAM,QAAQ,GAAoB,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAA;IACpG,WAAW,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;AAC3B,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=getStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStatus.d.ts","sourceRoot":"","sources":["../../../src/http/routes/getStatus.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,YAAY,CAAA;AAG5D,eAAO,MAAM,MAAM,EAAE,YAEpB,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { ARGUS_PROTOCOL_VERSION } from '@vforsh/argus-core';
2
+ import { respondJson } from '../httpUtils.js';
3
+ export const handle = (_req, res, _url, ctx) => {
4
+ respondJson(res, buildStatus(ctx));
5
+ };
6
+ const buildStatus = (ctx) => {
7
+ const watcher = ctx.getWatcher();
8
+ const buffer = ctx.buffer.getStats();
9
+ const cdpStatus = ctx.getCdpStatus();
10
+ return {
11
+ ok: true,
12
+ id: watcher.id,
13
+ pid: watcher.pid,
14
+ attached: cdpStatus.attached,
15
+ target: cdpStatus.target,
16
+ buffer,
17
+ watcher,
18
+ protocolVersion: ARGUS_PROTOCOL_VERSION,
19
+ };
20
+ };
21
+ //# sourceMappingURL=getStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStatus.js","sourceRoot":"","sources":["../../../src/http/routes/getStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,MAAM,CAAC,MAAM,MAAM,GAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAC5D,WAAW,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAAiB,EAAkB,EAAE;IACzD,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAE,CAAA;IAChC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAA;IACpC,MAAM,SAAS,GAAG,GAAG,CAAC,YAAY,EAAE,CAAA;IAEpC,OAAO;QACN,EAAE,EAAE,IAAI;QACR,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,MAAM;QACN,OAAO;QACP,eAAe,EAAE,sBAAsB;KACvC,CAAA;AACF,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=getTail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTail.d.ts","sourceRoot":"","sources":["../../../src/http/routes/getTail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAc9C,eAAO,MAAM,MAAM,EAAE,YA2BpB,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { emitRequest } from './types.js';
2
+ import { respondJson, respondInvalidMatch, respondInvalidMatchCase, clampNumber, parseLevels, resolveMatchCase, normalizeMatchPatterns, compileMatchPatterns, normalizeQueryValue, } from '../httpUtils.js';
3
+ export const handle = async (_req, res, url, ctx) => {
4
+ const after = clampNumber(url.searchParams.get('after'), 0);
5
+ const limit = clampNumber(url.searchParams.get('limit'), 500, 1, 5000);
6
+ const timeoutMs = clampNumber(url.searchParams.get('timeoutMs'), 25_000, 1000, 120_000);
7
+ const levels = parseLevels(url.searchParams.get('levels'));
8
+ const match = url.searchParams.getAll('match');
9
+ const matchCase = resolveMatchCase(url.searchParams.get('matchCase'));
10
+ if (!matchCase) {
11
+ return respondInvalidMatchCase(res);
12
+ }
13
+ const source = normalizeQueryValue(url.searchParams.get('source'));
14
+ const matchPatterns = normalizeMatchPatterns(match);
15
+ if (matchPatterns.error) {
16
+ return respondInvalidMatch(res, matchPatterns.error);
17
+ }
18
+ const compiledMatch = compileMatchPatterns(matchPatterns.patterns, matchCase);
19
+ if (compiledMatch.error) {
20
+ return respondInvalidMatch(res, compiledMatch.error);
21
+ }
22
+ emitRequest(ctx, res, 'tail', { after, limit, levels, match: matchPatterns.patterns, matchCase, source, timeoutMs });
23
+ const events = await ctx.buffer.waitForAfter(after, { levels, match: compiledMatch.match, source }, limit, timeoutMs);
24
+ const nextAfter = events.length > 0 ? (events[events.length - 1]?.id ?? after) : after;
25
+ const response = { ok: true, events, nextAfter, timedOut: events.length === 0 };
26
+ respondJson(res, response);
27
+ };
28
+ //# sourceMappingURL=getTail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTail.js","sourceRoot":"","sources":["../../../src/http/routes/getTail.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EACN,WAAW,EACX,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,iBAAiB,CAAA;AAExB,MAAM,CAAC,MAAM,MAAM,GAAiB,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;IACjE,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3D,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IACtE,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IACvF,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC1D,MAAM,KAAK,GAAG,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAC9C,MAAM,SAAS,GAAG,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAA;IACrE,IAAI,CAAC,SAAS,EAAE,CAAC;QAChB,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAA;IACpC,CA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C,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=getTargets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTargets.d.ts","sourceRoot":"","sources":["../../../src/http/routes/getTargets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,eAAO,MAAM,MAAM,EAAE,YAapB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { emitRequest } from './types.js';
2
+ import { respondJson, respondError } from '../httpUtils.js';
3
+ export const handle = async (_req, res, _url, ctx) => {
4
+ if (!ctx.sourceHandle?.listTargets) {
5
+ return respondJson(res, { ok: false, error: { message: 'Not available', code: 'not_available' } }, 400);
6
+ }
7
+ emitRequest(ctx, res, 'targets');
8
+ try {
9
+ const targets = await ctx.sourceHandle.listTargets();
10
+ respondJson(res, { ok: true, targets });
11
+ }
12
+ catch (error) {
13
+ respondError(res, error);
14
+ }
15
+ };
16
+ //# sourceMappingURL=getTargets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTargets.js","sourceRoot":"","sources":["../../../src/http/routes/getTargets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE3D,MAAM,CAAC,MAAM,MAAM,GAAiB,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAClE,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,CAAC;QACpC,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,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAA;IAEhC,IAAI,CAAC;QACJ,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,WAAW,EAAE,CAAA;QACpD,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;IACxC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACzB,CAAC;AACF,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=getThrottle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getThrottle.d.ts","sourceRoot":"","sources":["../../../src/http/routes/getThrottle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,eAAO,MAAM,MAAM,EAAE,YAIpB,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { emitRequest } from './types.js';
2
+ import { respondJson } from '../httpUtils.js';
3
+ export const handle = (_req, res, _url, ctx) => {
4
+ emitRequest(ctx, res, 'throttle');
5
+ const status = ctx.throttleController.getStatus({ attached: ctx.getCdpStatus().attached });
6
+ respondJson(res, status);
7
+ };
8
+ //# sourceMappingURL=getThrottle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getThrottle.js","sourceRoot":"","sources":["../../../src/http/routes/getThrottle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,MAAM,CAAC,MAAM,MAAM,GAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAC5D,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,CAAC,CAAA;IACjC,MAAM,MAAM,GAAG,GAAG,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC1F,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;AACzB,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=postAttach.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postAttach.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postAttach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,eAAO,MAAM,MAAM,EAAE,YAsBpB,CAAA"}
@@ -0,0 +1,23 @@
1
+ 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?.attachTarget) {
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
+ if (typeof payload.tabId !== 'number') {
12
+ return respondInvalidBody(res, 'tabId is required');
13
+ }
14
+ emitRequest(ctx, res, 'attach');
15
+ try {
16
+ ctx.sourceHandle.attachTarget(payload.tabId);
17
+ respondJson(res, { ok: true, message: 'Attach request sent' });
18
+ }
19
+ catch (error) {
20
+ respondError(res, error);
21
+ }
22
+ };
23
+ //# sourceMappingURL=postAttach.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postAttach.js","sourceRoot":"","sources":["../../../src/http/routes/postAttach.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,CAAoB,GAAG,EAAE,GAAG,CAAC,CAAA;IAC/D,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAM;IACP,CAAC;IAED,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,OAAO,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAA;IACpD,CAAC;IAED,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAA;IAE/B,IAAI,CAAC;QACJ,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAC5C,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC,CAAA;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACzB,CAAC;AACF,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=postDetach.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postDetach.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDetach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,eAAO,MAAM,MAAM,EAAE,YAsBpB,CAAA"}
@@ -0,0 +1,23 @@
1
+ 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
+ if (typeof payload.tabId !== 'number') {
12
+ return respondInvalidBody(res, 'tabId is required');
13
+ }
14
+ emitRequest(ctx, res, 'detach');
15
+ try {
16
+ ctx.sourceHandle.detachTarget(payload.tabId);
17
+ respondJson(res, { ok: true, message: 'Detach request sent' });
18
+ }
19
+ catch (error) {
20
+ respondError(res, error);
21
+ }
22
+ };
23
+ //# sourceMappingURL=postDetach.js.map
@@ -0,0 +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,CAAoB,GAAG,EAAE,GAAG,CAAC,CAAA;IAC/D,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAM;IACP,CAAC;IAED,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,OAAO,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAA;IACpD,CAAC;IAED,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAA;IAE/B,IAAI,CAAC;QACJ,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QAC5C,WAAW,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC,CAAA;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACzB,CAAC;AACF,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ export declare const selectDomAddNodeIds: (allNodeIds: number[], options: {
4
+ all: boolean;
5
+ nth?: number;
6
+ }) => number[];
7
+ //# sourceMappingURL=postDomAdd.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,97 @@
1
+ import { emitRequest } from './types.js';
2
+ import { insertAdjacentHtml } from '../../cdp/dom.js';
3
+ 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 {
41
+ const { allNodeIds } = await resolveDomSelectorMatches(ctx.cdpSession, payload.selector, true);
42
+ if (expect != null && allNodeIds.length !== expect) {
43
+ return respondJson(res, {
44
+ ok: false,
45
+ error: {
46
+ message: `Expected ${expect} matches for selector "${payload.selector}", found ${allNodeIds.length}`,
47
+ code: 'unexpected_matches',
48
+ },
49
+ }, 400);
50
+ }
51
+ if (nth != null && nth >= allNodeIds.length) {
52
+ return respondJson(res, {
53
+ ok: false,
54
+ error: {
55
+ message: `nth index ${nth} is out of range for ${allNodeIds.length} matches`,
56
+ code: 'nth_out_of_range',
57
+ },
58
+ }, 400);
59
+ }
60
+ if (!all && nth == null && allNodeIds.length > 1) {
61
+ return respondJson(res, {
62
+ ok: false,
63
+ error: {
64
+ message: `Selector matched ${allNodeIds.length} elements; pass --all to insert at all matches (or use --nth/--first)`,
65
+ code: 'multiple_matches',
66
+ },
67
+ }, 400);
68
+ }
69
+ if (allNodeIds.length === 0) {
70
+ const response = { ok: true, matches: 0, inserted: 0 };
71
+ return respondJson(res, response);
72
+ }
73
+ const nodeIds = selectDomAddNodeIds(allNodeIds, { all, nth });
74
+ const { insertedCount } = await insertAdjacentHtml(ctx.cdpSession, {
75
+ nodeIds,
76
+ html: payload.html,
77
+ position: payload.position,
78
+ text,
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
+ };
87
+ export const selectDomAddNodeIds = (allNodeIds, options) => {
88
+ if (options.all) {
89
+ return allNodeIds;
90
+ }
91
+ if (options.nth != null) {
92
+ const nodeId = allNodeIds[options.nth];
93
+ return nodeId == null ? [] : [nodeId];
94
+ }
95
+ return allNodeIds.slice(0, 1);
96
+ };
97
+ //# sourceMappingURL=postDomAdd.js.map
@@ -0,0 +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,IAA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EAAE,CAAC;QAChB,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACzB,CAAC;AACF,CAAC,CAAA;AAED,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"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=postDomClick.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postDomClick.d.ts","sourceRoot":"","sources":["../../../src/http/routes/postDomClick.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAM9C,eAAO,MAAM,MAAM,EAAE,YA+FpB,CAAA"}
@@ -0,0 +1,85 @@
1
+ import { emitRequest } from './types.js';
2
+ import { resolveDomSelectorMatches, clickDomNodes, clickAtPoint, resolveNodeTopLeft } from '../../cdp/mouse.js';
3
+ import { waitForSelectorMatches } from '../../cdp/dom/selector.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
+ const hasSelector = typeof payload.selector === 'string' && payload.selector.length > 0;
11
+ const hasCoords = payload.x != null || payload.y != null;
12
+ if (!hasSelector && !hasCoords) {
13
+ return respondInvalidBody(res, 'selector or x,y coordinates are required');
14
+ }
15
+ if (hasCoords) {
16
+ if (payload.x == null || payload.y == null || !Number.isFinite(payload.x) || !Number.isFinite(payload.y)) {
17
+ return respondInvalidBody(res, 'both x and y must be finite numbers');
18
+ }
19
+ }
20
+ const all = payload.all ?? false;
21
+ if (typeof all !== 'boolean') {
22
+ return respondInvalidBody(res, 'all must be a boolean');
23
+ }
24
+ const validButtons = ['left', 'middle', 'right'];
25
+ const button = payload.button ?? 'left';
26
+ if (!validButtons.includes(button)) {
27
+ return respondInvalidBody(res, `button must be one of: ${validButtons.join(', ')}`);
28
+ }
29
+ const waitMs = payload.wait ?? 0;
30
+ if (typeof waitMs !== 'number' || !Number.isFinite(waitMs) || waitMs < 0) {
31
+ return respondInvalidBody(res, 'wait must be a non-negative number (ms)');
32
+ }
33
+ emitRequest(ctx, res, 'dom/click');
34
+ try {
35
+ // Coordinate-only click (no selector)
36
+ if (!hasSelector) {
37
+ await clickAtPoint(ctx.cdpSession, payload.x, payload.y, button);
38
+ const response = { ok: true, matches: 0, clicked: 1 };
39
+ return respondJson(res, response);
40
+ }
41
+ let allNodeIds;
42
+ let nodeIds;
43
+ if (waitMs > 0) {
44
+ await ctx.cdpSession.sendAndWait('DOM.enable');
45
+ const result = await waitForSelectorMatches(ctx.cdpSession, payload.selector, all, payload.text, waitMs);
46
+ allNodeIds = result.allNodeIds;
47
+ nodeIds = result.nodeIds;
48
+ }
49
+ else {
50
+ const result = await resolveDomSelectorMatches(ctx.cdpSession, payload.selector, all, payload.text);
51
+ allNodeIds = result.allNodeIds;
52
+ nodeIds = result.nodeIds;
53
+ }
54
+ if (!all && allNodeIds.length > 1) {
55
+ return respondJson(res, {
56
+ ok: false,
57
+ error: {
58
+ message: `Selector matched ${allNodeIds.length} elements; pass all=true to click all matches`,
59
+ code: 'multiple_matches',
60
+ },
61
+ }, 400);
62
+ }
63
+ if (allNodeIds.length === 0) {
64
+ const response = { ok: true, matches: 0, clicked: 0 };
65
+ return respondJson(res, response);
66
+ }
67
+ // Selector + coordinates: click at offset from each element's top-left
68
+ if (hasCoords) {
69
+ for (const nodeId of nodeIds) {
70
+ const topLeft = await resolveNodeTopLeft(ctx.cdpSession, nodeId);
71
+ await clickAtPoint(ctx.cdpSession, topLeft.x + payload.x, topLeft.y + payload.y, button);
72
+ }
73
+ const response = { ok: true, matches: allNodeIds.length, clicked: nodeIds.length };
74
+ return respondJson(res, response);
75
+ }
76
+ // Selector only: click element center (existing behavior)
77
+ await clickDomNodes(ctx.cdpSession, nodeIds, button);
78
+ const response = { ok: true, matches: allNodeIds.length, clicked: nodeIds.length };
79
+ respondJson(res, response);
80
+ }
81
+ catch (error) {
82
+ respondError(res, error);
83
+ }
84
+ };
85
+ //# sourceMappingURL=postDomClick.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postDomClick.js","sourceRoot":"","sources":["../../../src/http/routes/postDomClick.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAC/G,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAClE,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,CAAkB,GAAG,EAAE,GAAG,CAAC,CAAA;IAC7D,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAM;IACP,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,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E,QAAQ,CAAC,CAAA;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IACzB,CAAC;AACF,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { RouteHandler } from './types.js';
2
+ export declare const handle: RouteHandler;
3
+ //# sourceMappingURL=postDomFill.d.ts.map
@@ -0,0 +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;AAM9C,eAAO,MAAM,MAAM,EAAE,YA+DpB,CAAA"}
@@ -0,0 +1,58 @@
1
+ import { emitRequest } from './types.js';
2
+ import { fillResolvedNodes } from '../../cdp/dom.js';
3
+ import { getDomRootId, resolveSelectorMatches, waitForSelectorMatches } from '../../cdp/dom/selector.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 (typeof payload.value !== 'string') {
14
+ return respondInvalidBody(res, 'value is required');
15
+ }
16
+ const all = payload.all ?? false;
17
+ if (typeof all !== 'boolean') {
18
+ return respondInvalidBody(res, 'all must be a boolean');
19
+ }
20
+ const waitMs = payload.wait ?? 0;
21
+ if (typeof waitMs !== 'number' || !Number.isFinite(waitMs) || waitMs < 0) {
22
+ return respondInvalidBody(res, 'wait must be a non-negative number (ms)');
23
+ }
24
+ emitRequest(ctx, res, 'dom/fill');
25
+ try {
26
+ let allNodeIds;
27
+ let nodeIds;
28
+ if (waitMs > 0) {
29
+ await ctx.cdpSession.sendAndWait('DOM.enable');
30
+ const result = await waitForSelectorMatches(ctx.cdpSession, payload.selector, all, payload.text, waitMs);
31
+ allNodeIds = result.allNodeIds;
32
+ nodeIds = result.nodeIds;
33
+ }
34
+ else {
35
+ await ctx.cdpSession.sendAndWait('DOM.enable');
36
+ const rootId = await getDomRootId(ctx.cdpSession);
37
+ const result = await resolveSelectorMatches(ctx.cdpSession, rootId, payload.selector, all, payload.text);
38
+ allNodeIds = result.allNodeIds;
39
+ nodeIds = result.nodeIds;
40
+ }
41
+ if (!all && allNodeIds.length > 1) {
42
+ return respondJson(res, {
43
+ ok: false,
44
+ error: {
45
+ message: `Selector matched ${allNodeIds.length} elements; pass all=true to fill all matches`,
46
+ code: 'multiple_matches',
47
+ },
48
+ }, 400);
49
+ }
50
+ const filledCount = await fillResolvedNodes(ctx.cdpSession, nodeIds, payload.value);
51
+ const response = { ok: true, matches: allNodeIds.length, filled: filledCount };
52
+ respondJson(res, response);
53
+ }
54
+ catch (error) {
55
+ respondError(res, error);
56
+ }
57
+ };
58
+ //# sourceMappingURL=postDomFill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postDomFill.js","sourceRoot":"","sources":["../../../src/http/routes/postDomFill.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACxG,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,CAAiB,GAAG,EAAE,GAAG,CAAC,CAAA;IAC5D,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAM;IACP,CAAC;IAED,IAAI,CAAC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