octoparse-cli 0.1.14

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 (278) hide show
  1. package/README.md +271 -0
  2. package/RUNTIME_SECURITY_NOTICE.txt +41 -0
  3. package/SECURITY.md +24 -0
  4. package/dist/cli/args.js +34 -0
  5. package/dist/cli/help.js +214 -0
  6. package/dist/cli/output.js +39 -0
  7. package/dist/commands/auth.js +283 -0
  8. package/dist/commands/capabilities.js +118 -0
  9. package/dist/commands/cloud.js +241 -0
  10. package/dist/commands/data.js +220 -0
  11. package/dist/commands/doctor.js +73 -0
  12. package/dist/commands/env.js +63 -0
  13. package/dist/commands/local.js +251 -0
  14. package/dist/commands/run.js +622 -0
  15. package/dist/commands/runs.js +171 -0
  16. package/dist/commands/task.js +101 -0
  17. package/dist/index.js +133 -0
  18. package/dist/runtime/account-capabilities.js +71 -0
  19. package/dist/runtime/api-client.js +290 -0
  20. package/dist/runtime/artifacts.js +33 -0
  21. package/dist/runtime/auth.js +94 -0
  22. package/dist/runtime/bridge-hub.js +173 -0
  23. package/dist/runtime/client-headers.js +23 -0
  24. package/dist/runtime/cloud-data.js +75 -0
  25. package/dist/runtime/config.js +48 -0
  26. package/dist/runtime/data-exporter.js +267 -0
  27. package/dist/runtime/engine-host.js +449 -0
  28. package/dist/runtime/local-runs.js +92 -0
  29. package/dist/runtime/naming.js +13 -0
  30. package/dist/runtime/run-control.js +363 -0
  31. package/dist/runtime/run-services.js +380 -0
  32. package/dist/runtime/security-notice.js +78 -0
  33. package/dist/runtime/task-definition-provider.js +282 -0
  34. package/dist/types.js +4 -0
  35. package/examples/minimal-task.json +6 -0
  36. package/examples/navigate-example-task.json +6 -0
  37. package/node_modules/@octopus/bpmn/index.js +3 -0
  38. package/node_modules/@octopus/bpmn/lib/Context.js +245 -0
  39. package/node_modules/@octopus/bpmn/lib/Definition.js +258 -0
  40. package/node_modules/@octopus/bpmn/lib/Engine.js +275 -0
  41. package/node_modules/@octopus/bpmn/lib/PrematureStopError.js +7 -0
  42. package/node_modules/@octopus/bpmn/lib/activities/Activity.js +202 -0
  43. package/node_modules/@octopus/bpmn/lib/activities/BaseProcess.js +308 -0
  44. package/node_modules/@octopus/bpmn/lib/activities/BaseTask.js +145 -0
  45. package/node_modules/@octopus/bpmn/lib/activities/BoundaryEvent.js +12 -0
  46. package/node_modules/@octopus/bpmn/lib/activities/Dummy.js +10 -0
  47. package/node_modules/@octopus/bpmn/lib/activities/EventDefinition.js +99 -0
  48. package/node_modules/@octopus/bpmn/lib/activities/Flow.js +52 -0
  49. package/node_modules/@octopus/bpmn/lib/activities/Form.js +67 -0
  50. package/node_modules/@octopus/bpmn/lib/activities/InputOutput.js +53 -0
  51. package/node_modules/@octopus/bpmn/lib/activities/IntermediateCatchEvent.js +12 -0
  52. package/node_modules/@octopus/bpmn/lib/activities/MessageFlow.js +19 -0
  53. package/node_modules/@octopus/bpmn/lib/activities/MultiInstanceLoopCharacteristics.js +160 -0
  54. package/node_modules/@octopus/bpmn/lib/activities/Properties.js +27 -0
  55. package/node_modules/@octopus/bpmn/lib/activities/SequenceFlow.js +56 -0
  56. package/node_modules/@octopus/bpmn/lib/activities/ServiceConnector.js +71 -0
  57. package/node_modules/@octopus/bpmn/lib/context-helper.js +198 -0
  58. package/node_modules/@octopus/bpmn/lib/events/EndEvent.js +22 -0
  59. package/node_modules/@octopus/bpmn/lib/events/ErrorEvent.js +41 -0
  60. package/node_modules/@octopus/bpmn/lib/events/MessageEvent.js +19 -0
  61. package/node_modules/@octopus/bpmn/lib/events/StartEvent.js +55 -0
  62. package/node_modules/@octopus/bpmn/lib/events/TimerEvent.js +75 -0
  63. package/node_modules/@octopus/bpmn/lib/expressions.js +41 -0
  64. package/node_modules/@octopus/bpmn/lib/gateways/ExclusiveGateway.js +86 -0
  65. package/node_modules/@octopus/bpmn/lib/gateways/InclusiveGateway.js +56 -0
  66. package/node_modules/@octopus/bpmn/lib/gateways/ParallelGateway.js +195 -0
  67. package/node_modules/@octopus/bpmn/lib/getPropertyValue.js +83 -0
  68. package/node_modules/@octopus/bpmn/lib/index.js +6 -0
  69. package/node_modules/@octopus/bpmn/lib/mapper.js +55 -0
  70. package/node_modules/@octopus/bpmn/lib/parameter.js +119 -0
  71. package/node_modules/@octopus/bpmn/lib/script-helper.js +45 -0
  72. package/node_modules/@octopus/bpmn/lib/tasks/ManualTask.js +31 -0
  73. package/node_modules/@octopus/bpmn/lib/tasks/ReceiveTask.js +31 -0
  74. package/node_modules/@octopus/bpmn/lib/tasks/ScriptTask.js +35 -0
  75. package/node_modules/@octopus/bpmn/lib/tasks/SendTask.js +16 -0
  76. package/node_modules/@octopus/bpmn/lib/tasks/ServiceTask.js +68 -0
  77. package/node_modules/@octopus/bpmn/lib/tasks/SubProcess.js +17 -0
  78. package/node_modules/@octopus/bpmn/lib/tasks/Task.js +16 -0
  79. package/node_modules/@octopus/bpmn/lib/tasks/UserTask.js +47 -0
  80. package/node_modules/@octopus/bpmn/lib/transformer.js +13 -0
  81. package/node_modules/@octopus/bpmn/lib/validation.js +111 -0
  82. package/node_modules/@octopus/bpmn/package.json +17 -0
  83. package/node_modules/@octopus/bpmn/types/bpmn.d.ts +85 -0
  84. package/node_modules/@octopus/engine/README.md +370 -0
  85. package/node_modules/@octopus/engine/dist/actions/BackPreWebPageAction.d.ts +4 -0
  86. package/node_modules/@octopus/engine/dist/actions/BackPreWebPageAction.js +1 -0
  87. package/node_modules/@octopus/engine/dist/actions/BaseAction.d.ts +339 -0
  88. package/node_modules/@octopus/engine/dist/actions/BaseAction.js +1559 -0
  89. package/node_modules/@octopus/engine/dist/actions/BranchAction.d.ts +9 -0
  90. package/node_modules/@octopus/engine/dist/actions/BranchAction.js +1 -0
  91. package/node_modules/@octopus/engine/dist/actions/ClickAction.d.ts +22 -0
  92. package/node_modules/@octopus/engine/dist/actions/ClickAction.js +1 -0
  93. package/node_modules/@octopus/engine/dist/actions/ConditionAction.d.ts +4 -0
  94. package/node_modules/@octopus/engine/dist/actions/ConditionAction.js +1 -0
  95. package/node_modules/@octopus/engine/dist/actions/EmptyAction.d.ts +4 -0
  96. package/node_modules/@octopus/engine/dist/actions/EmptyAction.js +12 -0
  97. package/node_modules/@octopus/engine/dist/actions/EnterCaptchaAction.d.ts +28 -0
  98. package/node_modules/@octopus/engine/dist/actions/EnterCaptchaAction.js +1 -0
  99. package/node_modules/@octopus/engine/dist/actions/EnterTextAction.d.ts +20 -0
  100. package/node_modules/@octopus/engine/dist/actions/EnterTextAction.js +1 -0
  101. package/node_modules/@octopus/engine/dist/actions/ExtractDataAction.d.ts +40 -0
  102. package/node_modules/@octopus/engine/dist/actions/ExtractDataAction.js +1 -0
  103. package/node_modules/@octopus/engine/dist/actions/LoopAction.d.ts +41 -0
  104. package/node_modules/@octopus/engine/dist/actions/LoopAction.js +526 -0
  105. package/node_modules/@octopus/engine/dist/actions/LoopStartAction.d.ts +47 -0
  106. package/node_modules/@octopus/engine/dist/actions/LoopStartAction.js +607 -0
  107. package/node_modules/@octopus/engine/dist/actions/MouseOverAction.d.ts +8 -0
  108. package/node_modules/@octopus/engine/dist/actions/MouseOverAction.js +34 -0
  109. package/node_modules/@octopus/engine/dist/actions/NavigateAction.d.ts +38 -0
  110. package/node_modules/@octopus/engine/dist/actions/NavigateAction.js +535 -0
  111. package/node_modules/@octopus/engine/dist/actions/SwitchComboAction.d.ts +13 -0
  112. package/node_modules/@octopus/engine/dist/actions/SwitchComboAction.js +69 -0
  113. package/node_modules/@octopus/engine/dist/browser.d.ts +17 -0
  114. package/node_modules/@octopus/engine/dist/browser.js +157 -0
  115. package/node_modules/@octopus/engine/dist/browserProxy.d.ts +90 -0
  116. package/node_modules/@octopus/engine/dist/browserProxy.js +1 -0
  117. package/node_modules/@octopus/engine/dist/configs/BaseConfig.d.ts +20 -0
  118. package/node_modules/@octopus/engine/dist/configs/BaseConfig.js +88 -0
  119. package/node_modules/@octopus/engine/dist/configs/BranchConfig.d.ts +7 -0
  120. package/node_modules/@octopus/engine/dist/configs/BranchConfig.js +1 -0
  121. package/node_modules/@octopus/engine/dist/configs/ClickConfig.d.ts +36 -0
  122. package/node_modules/@octopus/engine/dist/configs/ClickConfig.js +65 -0
  123. package/node_modules/@octopus/engine/dist/configs/EnterCaptchaConfig.d.ts +19 -0
  124. package/node_modules/@octopus/engine/dist/configs/EnterCaptchaConfig.js +25 -0
  125. package/node_modules/@octopus/engine/dist/configs/EnterTextConfig.d.ts +24 -0
  126. package/node_modules/@octopus/engine/dist/configs/EnterTextConfig.js +36 -0
  127. package/node_modules/@octopus/engine/dist/configs/ExtractDataConfig.d.ts +12 -0
  128. package/node_modules/@octopus/engine/dist/configs/ExtractDataConfig.js +1 -0
  129. package/node_modules/@octopus/engine/dist/configs/LoopConfig.d.ts +25 -0
  130. package/node_modules/@octopus/engine/dist/configs/LoopConfig.js +40 -0
  131. package/node_modules/@octopus/engine/dist/configs/LoopStartConfig.d.ts +4 -0
  132. package/node_modules/@octopus/engine/dist/configs/LoopStartConfig.js +12 -0
  133. package/node_modules/@octopus/engine/dist/configs/MouseOverConfig.d.ts +8 -0
  134. package/node_modules/@octopus/engine/dist/configs/MouseOverConfig.js +15 -0
  135. package/node_modules/@octopus/engine/dist/configs/NavigateConfig.d.ts +41 -0
  136. package/node_modules/@octopus/engine/dist/configs/NavigateConfig.js +121 -0
  137. package/node_modules/@octopus/engine/dist/configs/SwitchComboConfig.d.ts +8 -0
  138. package/node_modules/@octopus/engine/dist/configs/SwitchComboConfig.js +15 -0
  139. package/node_modules/@octopus/engine/dist/enums/index.d.ts +419 -0
  140. package/node_modules/@octopus/engine/dist/enums/index.js +314 -0
  141. package/node_modules/@octopus/engine/dist/extension/BrowserWebSocketTransport-D_zAGZMQ.js +1 -0
  142. package/node_modules/@octopus/engine/dist/extension/LaunchOptions-DxvePrV4.js +6 -0
  143. package/node_modules/@octopus/engine/dist/extension/NodeWebSocketTransport-BTgRVB7Z.js +6 -0
  144. package/node_modules/@octopus/engine/dist/extension/background.js +396 -0
  145. package/node_modules/@octopus/engine/dist/extension/bidi-C_GIZ8Uz.js +131 -0
  146. package/node_modules/@octopus/engine/dist/extension/manifest.json +27 -0
  147. package/node_modules/@octopus/engine/dist/extension/src/content/anti-detection.js +1 -0
  148. package/node_modules/@octopus/engine/dist/extension-bridge/BaseExtensionBridge.d.ts +21 -0
  149. package/node_modules/@octopus/engine/dist/extension-bridge/BaseExtensionBridge.js +117 -0
  150. package/node_modules/@octopus/engine/dist/extension-bridge/SessionExtensionBridge.d.ts +17 -0
  151. package/node_modules/@octopus/engine/dist/extension-bridge/SessionExtensionBridge.js +29 -0
  152. package/node_modules/@octopus/engine/dist/extension-bridge/index.d.ts +2 -0
  153. package/node_modules/@octopus/engine/dist/extension-bridge/index.js +5 -0
  154. package/node_modules/@octopus/engine/dist/extension-bridge/types.d.ts +159 -0
  155. package/node_modules/@octopus/engine/dist/extension-bridge/types.js +5 -0
  156. package/node_modules/@octopus/engine/dist/extensions/ublock-origin/uBlock0.chromium.tar.xz +0 -0
  157. package/node_modules/@octopus/engine/dist/extensions/ublock-origin-lite/uBOLite.chromium.tar.xz +0 -0
  158. package/node_modules/@octopus/engine/dist/index.d.ts +169 -0
  159. package/node_modules/@octopus/engine/dist/index.js +1 -0
  160. package/node_modules/@octopus/engine/dist/models/actionItem.d.ts +16 -0
  161. package/node_modules/@octopus/engine/dist/models/actionItem.js +15 -0
  162. package/node_modules/@octopus/engine/dist/models/conditionCheckArgs.d.ts +11 -0
  163. package/node_modules/@octopus/engine/dist/models/conditionCheckArgs.js +11 -0
  164. package/node_modules/@octopus/engine/dist/models/customizeCookie.d.ts +14 -0
  165. package/node_modules/@octopus/engine/dist/models/customizeCookie.js +6 -0
  166. package/node_modules/@octopus/engine/dist/models/downloadFileConfig.d.ts +17 -0
  167. package/node_modules/@octopus/engine/dist/models/downloadFileConfig.js +26 -0
  168. package/node_modules/@octopus/engine/dist/models/elementNotFoundArgs.d.ts +8 -0
  169. package/node_modules/@octopus/engine/dist/models/elementNotFoundArgs.js +12 -0
  170. package/node_modules/@octopus/engine/dist/models/elementNotFoundError.d.ts +2 -0
  171. package/node_modules/@octopus/engine/dist/models/elementNotFoundError.js +6 -0
  172. package/node_modules/@octopus/engine/dist/models/extractItem.d.ts +37 -0
  173. package/node_modules/@octopus/engine/dist/models/extractItem.js +35 -0
  174. package/node_modules/@octopus/engine/dist/models/extractTemplate.d.ts +11 -0
  175. package/node_modules/@octopus/engine/dist/models/extractTemplate.js +48 -0
  176. package/node_modules/@octopus/engine/dist/models/extractTextItem.d.ts +10 -0
  177. package/node_modules/@octopus/engine/dist/models/extractTextItem.js +17 -0
  178. package/node_modules/@octopus/engine/dist/models/globalConfig.d.ts +5 -0
  179. package/node_modules/@octopus/engine/dist/models/globalConfig.js +1 -0
  180. package/node_modules/@octopus/engine/dist/models/httpHeader.d.ts +4 -0
  181. package/node_modules/@octopus/engine/dist/models/httpHeader.js +10 -0
  182. package/node_modules/@octopus/engine/dist/models/operation.d.ts +27 -0
  183. package/node_modules/@octopus/engine/dist/models/operation.js +242 -0
  184. package/node_modules/@octopus/engine/dist/models/retryCondition.d.ts +7 -0
  185. package/node_modules/@octopus/engine/dist/models/retryCondition.js +10 -0
  186. package/node_modules/@octopus/engine/dist/models/task.d.ts +89 -0
  187. package/node_modules/@octopus/engine/dist/models/task.js +120 -0
  188. package/node_modules/@octopus/engine/dist/models/trigger.d.ts +66 -0
  189. package/node_modules/@octopus/engine/dist/models/trigger.js +117 -0
  190. package/node_modules/@octopus/engine/dist/package.json +26 -0
  191. package/node_modules/@octopus/engine/dist/public-types.d.ts +13 -0
  192. package/node_modules/@octopus/engine/dist/public-types.js +2 -0
  193. package/node_modules/@octopus/engine/dist/settings.d.ts +41 -0
  194. package/node_modules/@octopus/engine/dist/settings.js +20 -0
  195. package/node_modules/@octopus/engine/dist/solvers/captcha/ClickCaptchaSolver.d.ts +6 -0
  196. package/node_modules/@octopus/engine/dist/solvers/captcha/ClickCaptchaSolver.js +1 -0
  197. package/node_modules/@octopus/engine/dist/solvers/captcha/HCaptchaSolver.d.ts +4 -0
  198. package/node_modules/@octopus/engine/dist/solvers/captcha/HCaptchaSolver.js +73 -0
  199. package/node_modules/@octopus/engine/dist/solvers/captcha/ImageCaptchaSolver.d.ts +2 -0
  200. package/node_modules/@octopus/engine/dist/solvers/captcha/ImageCaptchaSolver.js +74 -0
  201. package/node_modules/@octopus/engine/dist/solvers/captcha/RecaptchaSolver.d.ts +9 -0
  202. package/node_modules/@octopus/engine/dist/solvers/captcha/RecaptchaSolver.js +371 -0
  203. package/node_modules/@octopus/engine/dist/solvers/captcha/SliderCaptchaSolver.d.ts +6 -0
  204. package/node_modules/@octopus/engine/dist/solvers/captcha/SliderCaptchaSolver.js +184 -0
  205. package/node_modules/@octopus/engine/dist/solvers/captcha/SlidingTrajectory.d.ts +50 -0
  206. package/node_modules/@octopus/engine/dist/solvers/captcha/SlidingTrajectory.js +125 -0
  207. package/node_modules/@octopus/engine/dist/solvers/captcha/types.d.ts +68 -0
  208. package/node_modules/@octopus/engine/dist/solvers/captcha/types.js +34 -0
  209. package/node_modules/@octopus/engine/dist/solvers/captcha/utils.d.ts +2 -0
  210. package/node_modules/@octopus/engine/dist/solvers/captcha/utils.js +15 -0
  211. package/node_modules/@octopus/engine/dist/translator/actionFactory.d.ts +6 -0
  212. package/node_modules/@octopus/engine/dist/translator/actionFactory.js +1 -0
  213. package/node_modules/@octopus/engine/dist/translator/activityTypeEnum.d.ts +22 -0
  214. package/node_modules/@octopus/engine/dist/translator/activityTypeEnum.js +1 -0
  215. package/node_modules/@octopus/engine/dist/translator/backPreWebPageAction.d.ts +5 -0
  216. package/node_modules/@octopus/engine/dist/translator/backPreWebPageAction.js +1 -0
  217. package/node_modules/@octopus/engine/dist/translator/baseAction.d.ts +31 -0
  218. package/node_modules/@octopus/engine/dist/translator/baseAction.js +1 -0
  219. package/node_modules/@octopus/engine/dist/translator/breakActivity.d.ts +5 -0
  220. package/node_modules/@octopus/engine/dist/translator/breakActivity.js +1 -0
  221. package/node_modules/@octopus/engine/dist/translator/clickAction.d.ts +5 -0
  222. package/node_modules/@octopus/engine/dist/translator/clickAction.js +1 -0
  223. package/node_modules/@octopus/engine/dist/translator/completeWF.d.ts +5 -0
  224. package/node_modules/@octopus/engine/dist/translator/completeWF.js +1 -0
  225. package/node_modules/@octopus/engine/dist/translator/conditionAction.d.ts +6 -0
  226. package/node_modules/@octopus/engine/dist/translator/conditionAction.js +1 -0
  227. package/node_modules/@octopus/engine/dist/translator/emptyAction.d.ts +5 -0
  228. package/node_modules/@octopus/engine/dist/translator/emptyAction.js +1 -0
  229. package/node_modules/@octopus/engine/dist/translator/enterCapachaAction.d.ts +5 -0
  230. package/node_modules/@octopus/engine/dist/translator/enterCapachaAction.js +1 -0
  231. package/node_modules/@octopus/engine/dist/translator/enterTextAction.d.ts +5 -0
  232. package/node_modules/@octopus/engine/dist/translator/enterTextAction.js +1 -0
  233. package/node_modules/@octopus/engine/dist/translator/extractDataAction.d.ts +13 -0
  234. package/node_modules/@octopus/engine/dist/translator/extractDataAction.js +1 -0
  235. package/node_modules/@octopus/engine/dist/translator/loopAction.d.ts +5 -0
  236. package/node_modules/@octopus/engine/dist/translator/loopAction.js +1 -0
  237. package/node_modules/@octopus/engine/dist/translator/mouseOverAction.d.ts +5 -0
  238. package/node_modules/@octopus/engine/dist/translator/mouseOverAction.js +19 -0
  239. package/node_modules/@octopus/engine/dist/translator/navigateAction.d.ts +5 -0
  240. package/node_modules/@octopus/engine/dist/translator/navigateAction.js +117 -0
  241. package/node_modules/@octopus/engine/dist/translator/rootAction.d.ts +6 -0
  242. package/node_modules/@octopus/engine/dist/translator/rootAction.js +80 -0
  243. package/node_modules/@octopus/engine/dist/translator/switchCombo2Action.d.ts +5 -0
  244. package/node_modules/@octopus/engine/dist/translator/switchCombo2Action.js +19 -0
  245. package/node_modules/@octopus/engine/dist/translator/translator.d.ts +1 -0
  246. package/node_modules/@octopus/engine/dist/translator/translator.js +36 -0
  247. package/node_modules/@octopus/engine/dist/type.d.ts +25 -0
  248. package/node_modules/@octopus/engine/dist/type.js +2 -0
  249. package/node_modules/@octopus/engine/dist/types/browser.d.ts +191 -0
  250. package/node_modules/@octopus/engine/dist/types/browser.js +1 -0
  251. package/node_modules/@octopus/engine/dist/types/browserManager.d.ts +41 -0
  252. package/node_modules/@octopus/engine/dist/types/browserManager.js +1 -0
  253. package/node_modules/@octopus/engine/dist/types/index.d.ts +40 -0
  254. package/node_modules/@octopus/engine/dist/types/index.js +2 -0
  255. package/node_modules/@octopus/engine/dist/types/plugin.d.ts +29 -0
  256. package/node_modules/@octopus/engine/dist/types/plugin.js +2 -0
  257. package/node_modules/@octopus/engine/dist/utils/AsyncEmitter.d.ts +15 -0
  258. package/node_modules/@octopus/engine/dist/utils/AsyncEmitter.js +1 -0
  259. package/node_modules/@octopus/engine/dist/utils/DataStore.d.ts +58 -0
  260. package/node_modules/@octopus/engine/dist/utils/DataStore.js +1 -0
  261. package/node_modules/@octopus/engine/dist/utils/DateTimeFormatHelper.d.ts +22 -0
  262. package/node_modules/@octopus/engine/dist/utils/DateTimeFormatHelper.js +173 -0
  263. package/node_modules/@octopus/engine/dist/utils/FileDownloader.d.ts +108 -0
  264. package/node_modules/@octopus/engine/dist/utils/FileDownloader.js +1 -0
  265. package/node_modules/@octopus/engine/dist/utils/HttpRequester.d.ts +43 -0
  266. package/node_modules/@octopus/engine/dist/utils/HttpRequester.js +174 -0
  267. package/node_modules/@octopus/engine/dist/utils/JsonParser.d.ts +95 -0
  268. package/node_modules/@octopus/engine/dist/utils/JsonParser.js +439 -0
  269. package/node_modules/@octopus/engine/dist/utils/Operations.d.ts +27 -0
  270. package/node_modules/@octopus/engine/dist/utils/Operations.js +115 -0
  271. package/node_modules/@octopus/engine/dist/utils/index.d.ts +28 -0
  272. package/node_modules/@octopus/engine/dist/utils/index.js +356 -0
  273. package/node_modules/@octopus/engine/package.json +58 -0
  274. package/package.json +79 -0
  275. package/schemas/capabilities-v1.schema.json +234 -0
  276. package/schemas/detached-bootstrap-v1.schema.json +42 -0
  277. package/schemas/json-envelope-v1.schema.json +39 -0
  278. package/schemas/run-event-v1.schema.json +47 -0
@@ -0,0 +1,314 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MutipleUrlSplitType = exports.DownloadFileNameRepeatType = exports.DownloadFileRenameType = exports.CaptchaEventType = exports.CookieClearType = exports.UserAgentSwitchType = exports.IpProxyFromType = exports.CaptchaAvailableStatus = exports.LocalCaptchaType = exports.ElementNotFoundHandleType = exports.extractFunctions = exports.CaptchaFailureElementType = exports.LogKey = exports.RunnerStatus = exports.LogType = exports.TaskType = void 0;
4
+ /** 任务类型 */
5
+ var TaskType;
6
+ (function (TaskType) {
7
+ /** 自定义任务 */
8
+ TaskType[TaskType["Customize"] = 1] = "Customize";
9
+ /** 模板任务 */
10
+ TaskType[TaskType["Template"] = 10] = "Template";
11
+ })(TaskType || (exports.TaskType = TaskType = {}));
12
+ var LogType;
13
+ (function (LogType) {
14
+ LogType[LogType["Info"] = 0] = "Info";
15
+ LogType[LogType["Error"] = 1] = "Error";
16
+ LogType[LogType["Resource"] = 2] = "Resource";
17
+ LogType[LogType["DebugLogger"] = 3] = "DebugLogger";
18
+ })(LogType || (exports.LogType = LogType = {}));
19
+ exports.RunnerStatus = {
20
+ Completed: 'completed',
21
+ Stopped: 'stopped'
22
+ };
23
+ exports.LogKey = {
24
+ Common: {
25
+ BeforeWaitTime: 'Common.BeforeWaitTime',
26
+ BeforeWaitXPath: 'Common.BeforeWaitXPath',
27
+ Retry: {
28
+ URL: {
29
+ Found: 'Common.Retry.URL.Found',
30
+ NotFound: 'Common.Retry.URL.NotFound'
31
+ },
32
+ Text: {
33
+ Found: 'Common.Retry.Text.Found',
34
+ NotFound: 'Common.Retry.Text.NotFound'
35
+ },
36
+ XPath: {
37
+ Found: 'Common.Retry.XPath.Found',
38
+ NotFound: 'Common.Retry.XPath.NotFound'
39
+ },
40
+ Success: 'Common.Retry.Success',
41
+ Failure: 'Common.Retry.Failure'
42
+ },
43
+ SwitchIP: 'Common.SwitchIP',
44
+ ResourceSWitchIp: 'Common.ResourceSWitchIp',
45
+ SwitchUA: 'Common.SwitchUA',
46
+ Scroll: {
47
+ Global: {
48
+ Screen: 'Common.Scroll.Global.Screen',
49
+ Bottom: 'Common.Scroll.Global.Bottom'
50
+ },
51
+ Local: {
52
+ Screen: 'Common.Scroll.Local.Screen',
53
+ Bottom: 'Common.Scroll.Local.Bottom'
54
+ },
55
+ Finish: 'Common.Scroll.Finish'
56
+ },
57
+ Ajax: {
58
+ Action: 'Common.Ajax.Action',
59
+ Success: 'Common.Ajax.Success',
60
+ Failure: 'Common.Ajax.Failure'
61
+ },
62
+ RemoteControlTip: 'Common.RemoteControlTip'
63
+ },
64
+ Navigate: {
65
+ Begin: 'Navigate.Begin',
66
+ BeginWithLoop: 'Navigate.BeginWithLoop',
67
+ ClearCache: {
68
+ Success: 'Navigate.ClearCache.Success',
69
+ Failure: 'Navigate.ClearCache.Failure'
70
+ },
71
+ Cookies: {
72
+ Success: 'Navigate.Cookies.Success',
73
+ Failure: 'Navigate.Cookies.Failure'
74
+ },
75
+ Goto: {
76
+ Loading: 'Navigate.Goto.Loading',
77
+ Success: 'Navigate.Goto.Success',
78
+ Failure: 'Navigate.Goto.Failure'
79
+ },
80
+ Error: {
81
+ Timeout: 'Navigate.Error.Timeout',
82
+ NotFondURL: 'Navigate.Error.NotFondURL'
83
+ }
84
+ },
85
+ Click: {
86
+ Begin: 'Click.Begin',
87
+ NewWindow: {
88
+ Action: 'Click.NewWindow.Action',
89
+ Loading: 'Click.NewWindow.Loading',
90
+ Success: 'Click.NewWindow.Success',
91
+ Failure: 'Click.NewWindow.Failure'
92
+ },
93
+ Error: {
94
+ Timeout: 'Click.Error.Timeout',
95
+ NotFound: 'Click.Error.NotFound',
96
+ HrefInvalid: 'Click.Error.HrefInvalid'
97
+ }
98
+ },
99
+ ExtractData: {
100
+ Begin: 'ExtractData.Begin',
101
+ Success: 'ExtractData.Success',
102
+ Trigger: {
103
+ NotSave: 'ExtractData.Trigger.NotSave',
104
+ BreakLoop: 'ExtractData.Trigger.BreakLoop',
105
+ EndWorkflow: 'ExtractData.Trigger.EndWorkflow'
106
+ },
107
+ Error: {
108
+ Empty: 'ExtractData.Error.Empty',
109
+ Trigger: {
110
+ NotFoundField: 'ExtractData.Error.Trigger.NotFoundField'
111
+ }
112
+ }
113
+ },
114
+ Loop: {
115
+ Begin: {
116
+ FixedItem: 'Loop.Begin.FixedItem',
117
+ FixedList: 'Loop.Begin.FixedList',
118
+ VarilableList: 'Loop.Begin.VarilableList',
119
+ URLList: 'Loop.Begin.URLList',
120
+ TextList: 'Loop.Begin.TextList',
121
+ Scroll: 'Loop.Begin.Scroll'
122
+ },
123
+ Action: 'Loop.Action',
124
+ Error: 'Loop.Error',
125
+ Finish: 'Loop.Finish'
126
+ },
127
+ EnterText: {
128
+ Begin: 'EnterText.Begin',
129
+ Action: 'EnterText.Action',
130
+ Enter: 'EnterText.Enter',
131
+ Error: {
132
+ NotString: 'EnterText.Error.NotString'
133
+ }
134
+ },
135
+ MouseOver: {
136
+ Begin: 'MouseOver.Begin'
137
+ },
138
+ EnterCapacha: {
139
+ Begin: 'EnterCapacha.Begin',
140
+ Action: 'EnterCapacha.Action',
141
+ Complete: 'EnterCapacha.Complete',
142
+ ResourceCpathca: 'EnterCapacha.ResourceCpathca',
143
+ PhotoCpathca: 'EnterCapacha.PhotoCpathca',
144
+ RecaptchaV2Cpathca: 'EnterCapacha.RecaptchaV2Cpathca',
145
+ RecaptchaV3Cpathca: 'EnterCapacha.RecaptchaV3Cpathca',
146
+ HcaptchaCpathca: 'EnterCapacha.HcaptchaCpathca',
147
+ Error: {
148
+ Retry: 'EnterCapacha.Error.Retry',
149
+ Distance: 'EnterCapacha.Error.Distance',
150
+ ClickArea: 'EnterCapacha.Error.ClickArea',
151
+ InputNotFound: 'EnterCapacha.Error.InputNotFound',
152
+ ImageNotFound: 'EnterCapacha.Error.ImageNotFound',
153
+ TipImageNotFound: 'EnterCapacha.Error.TipImageNotFound',
154
+ HuaKuaiImageNotFound: 'EnterCapacha.Error.HuaKuaiImageNotFound',
155
+ Captcha: 'EnterCapacha.Error.Captcha'
156
+ }
157
+ },
158
+ SwitchCombo: {
159
+ Begin: 'SwitchCombo.Begin'
160
+ },
161
+ BackPreWebPage: {
162
+ Begin: 'BackPreWebPage.Begin'
163
+ },
164
+ Condition: {
165
+ Begin: 'Condition.Begin'
166
+ },
167
+ Branch: {
168
+ Begin: 'Branch.Begin',
169
+ Action: {
170
+ Allow: 'Branch.Action.Allow',
171
+ Text: {
172
+ Normal: {
173
+ Success: 'Branch.Action.Text.Normal.Success',
174
+ Failure: 'Branch.Action.Text.Normal.Failure'
175
+ },
176
+ Loop: {
177
+ Success: 'Branch.Action.Text.Loop.Success',
178
+ Failure: 'Branch.Action.Text.Loop.Failure'
179
+ }
180
+ },
181
+ Element: {
182
+ Normal: {
183
+ Success: 'Branch.Action.Element.Normal.Success',
184
+ Failure: 'Branch.Action.Element.Normal.Failure'
185
+ },
186
+ Loop: {
187
+ Success: 'Branch.Action.Element.Loop.Success',
188
+ Failure: 'Branch.Action.Element.Loop.Failure'
189
+ }
190
+ }
191
+ }
192
+ },
193
+ GlobalCookies: {
194
+ Success: 'GlobalCookies.Success',
195
+ Failure: 'GlobalCookies.Failure'
196
+ }
197
+ };
198
+ var CaptchaFailureElementType;
199
+ (function (CaptchaFailureElementType) {
200
+ CaptchaFailureElementType["XPath"] = "XPath";
201
+ CaptchaFailureElementType["Text"] = "Text";
202
+ })(CaptchaFailureElementType || (exports.CaptchaFailureElementType = CaptchaFailureElementType = {}));
203
+ exports.extractFunctions = {
204
+ ["ExtractText" /* ExtractTextType.ExtractText */]: (ele) => {
205
+ var _a, _b;
206
+ const text = ((_a = ele.innerText) === null || _a === void 0 ? void 0 : _a.length) >= ((_b = ele.textContent) === null || _b === void 0 ? void 0 : _b.length)
207
+ ? ele.innerText
208
+ : ele.textContent;
209
+ return text;
210
+ },
211
+ ["ExtractHtml" /* ExtractTextType.ExtractHtml */]: (ele) => ele.innerHTML,
212
+ ["ExtractOuterHtml" /* ExtractTextType.ExtractOuterHtml */]: (ele) => ele.outerHTML,
213
+ ["ExtractHref" /* ExtractTextType.ExtractHref */]: (ele) => ele.href || ele.getAttribute('href'),
214
+ ["ExtractSrc" /* ExtractTextType.ExtractSrc */]: (ele) => ele.src || ele.getAttribute('src'),
215
+ ["ExtractValue" /* ExtractTextType.ExtractValue */]: (ele) => ele.value || ele.getAttribute('value'),
216
+ ["ExtractSelectText" /* ExtractTextType.ExtractSelectText */]: (ele) => {
217
+ var _a, _b;
218
+ const text = ((_a = ele.innerText) === null || _a === void 0 ? void 0 : _a.length) >= ((_b = ele.textContent) === null || _b === void 0 ? void 0 : _b.length)
219
+ ? ele.innerText
220
+ : ele.textContent;
221
+ return text;
222
+ }
223
+ };
224
+ var ElementNotFoundHandleType;
225
+ (function (ElementNotFoundHandleType) {
226
+ ElementNotFoundHandleType[ElementNotFoundHandleType["NotHandle"] = 0] = "NotHandle";
227
+ ElementNotFoundHandleType[ElementNotFoundHandleType["AllowEmpty"] = 1] = "AllowEmpty";
228
+ ElementNotFoundHandleType[ElementNotFoundHandleType["AllowSkip"] = 2] = "AllowSkip";
229
+ ElementNotFoundHandleType[ElementNotFoundHandleType["SetBackup"] = 3] = "SetBackup";
230
+ ElementNotFoundHandleType[ElementNotFoundHandleType["ModifyXPath"] = 4] = "ModifyXPath";
231
+ })(ElementNotFoundHandleType || (exports.ElementNotFoundHandleType = ElementNotFoundHandleType = {}));
232
+ var LocalCaptchaType;
233
+ (function (LocalCaptchaType) {
234
+ /** 图片验证码,答案是字符串的类型(text) */
235
+ LocalCaptchaType[LocalCaptchaType["TextInput"] = 0] = "TextInput";
236
+ /** 数字字母混合 */
237
+ LocalCaptchaType[LocalCaptchaType["Chars"] = 1] = "Chars";
238
+ /** 需要一次或者多次拖动([p1a, p1b, speed1], [p2a, p2b, speed2]) */
239
+ LocalCaptchaType[LocalCaptchaType["Drags"] = 2] = "Drags";
240
+ /** 谷歌验证码 V2 版本 */
241
+ LocalCaptchaType[LocalCaptchaType["reCAPTCHA_V2"] = 3] = "reCAPTCHA_V2";
242
+ /** hCaptcha */
243
+ LocalCaptchaType[LocalCaptchaType["HCaptcha"] = 4] = "HCaptcha";
244
+ /** 滑块拼图验证码 */
245
+ LocalCaptchaType[LocalCaptchaType["Silder"] = 64] = "Silder";
246
+ /** 点选验证码 */
247
+ LocalCaptchaType[LocalCaptchaType["Click"] = 65] = "Click";
248
+ /** 滑动验证码(没有缺口和背景图,直接滑动到底的类型) */
249
+ LocalCaptchaType[LocalCaptchaType["SilderWithoutImage"] = 128] = "SilderWithoutImage";
250
+ /** 谷歌验证码V3 版本 */
251
+ LocalCaptchaType[LocalCaptchaType["ReCAPTCHA_V3"] = 63] = "ReCAPTCHA_V3";
252
+ /** 使用callback解决的方式 */
253
+ LocalCaptchaType[LocalCaptchaType["reCAPTCHA_V2_Callback"] = 100] = "reCAPTCHA_V2_Callback";
254
+ LocalCaptchaType[LocalCaptchaType["HCaptcha_Callback"] = 101] = "HCaptcha_Callback";
255
+ LocalCaptchaType[LocalCaptchaType["reCAPTCHA_V3_Callback"] = 102] = "reCAPTCHA_V3_Callback";
256
+ LocalCaptchaType[LocalCaptchaType["Cloudflare"] = 999] = "Cloudflare";
257
+ })(LocalCaptchaType || (exports.LocalCaptchaType = LocalCaptchaType = {}));
258
+ var CaptchaAvailableStatus;
259
+ (function (CaptchaAvailableStatus) {
260
+ CaptchaAvailableStatus[CaptchaAvailableStatus["None"] = 0] = "None";
261
+ CaptchaAvailableStatus[CaptchaAvailableStatus["Success"] = 1] = "Success";
262
+ CaptchaAvailableStatus[CaptchaAvailableStatus["AccountExpired"] = 2] = "AccountExpired";
263
+ CaptchaAvailableStatus[CaptchaAvailableStatus["NoBalance"] = 3] = "NoBalance";
264
+ CaptchaAvailableStatus[CaptchaAvailableStatus["ReachTodayLimit"] = 4] = "ReachTodayLimit";
265
+ CaptchaAvailableStatus[CaptchaAvailableStatus["ServerError"] = 9] = "ServerError";
266
+ })(CaptchaAvailableStatus || (exports.CaptchaAvailableStatus = CaptchaAvailableStatus = {}));
267
+ var IpProxyFromType;
268
+ (function (IpProxyFromType) {
269
+ IpProxyFromType[IpProxyFromType["None"] = 0] = "None";
270
+ IpProxyFromType[IpProxyFromType["Strong"] = 1] = "Strong";
271
+ IpProxyFromType[IpProxyFromType["Custom"] = 2] = "Custom";
272
+ IpProxyFromType[IpProxyFromType["Fake"] = 3] = "Fake";
273
+ })(IpProxyFromType || (exports.IpProxyFromType = IpProxyFromType = {}));
274
+ var UserAgentSwitchType;
275
+ (function (UserAgentSwitchType) {
276
+ UserAgentSwitchType[UserAgentSwitchType["None"] = 0] = "None";
277
+ UserAgentSwitchType[UserAgentSwitchType["Custom"] = 1] = "Custom";
278
+ UserAgentSwitchType[UserAgentSwitchType["FollowIP"] = 2] = "FollowIP";
279
+ })(UserAgentSwitchType || (exports.UserAgentSwitchType = UserAgentSwitchType = {}));
280
+ var CookieClearType;
281
+ (function (CookieClearType) {
282
+ CookieClearType[CookieClearType["None"] = 0] = "None";
283
+ CookieClearType[CookieClearType["Custom"] = 1] = "Custom";
284
+ CookieClearType[CookieClearType["FollowIP"] = 2] = "FollowIP";
285
+ })(CookieClearType || (exports.CookieClearType = CookieClearType = {}));
286
+ var CaptchaEventType;
287
+ (function (CaptchaEventType) {
288
+ /** 发送验证码参数事件 */
289
+ CaptchaEventType["RequestCaptchaToken"] = "request-captcha-token";
290
+ /** 获取验证码Token事件 */
291
+ CaptchaEventType["DeliverCaptchaToken"] = "deliver-captcha-token";
292
+ })(CaptchaEventType || (exports.CaptchaEventType = CaptchaEventType = {}));
293
+ /** 下载文件字段文件命名方式 */
294
+ var DownloadFileRenameType;
295
+ (function (DownloadFileRenameType) {
296
+ DownloadFileRenameType[DownloadFileRenameType["SourceFileName"] = 0] = "SourceFileName";
297
+ DownloadFileRenameType[DownloadFileRenameType["SourceFileMD5"] = 1] = "SourceFileMD5";
298
+ DownloadFileRenameType[DownloadFileRenameType["AcquisitionTime"] = 2] = "AcquisitionTime";
299
+ DownloadFileRenameType[DownloadFileRenameType["FieldValue"] = 3] = "FieldValue";
300
+ })(DownloadFileRenameType || (exports.DownloadFileRenameType = DownloadFileRenameType = {}));
301
+ /** 文件名称重复时操作方式 */
302
+ var DownloadFileNameRepeatType;
303
+ (function (DownloadFileNameRepeatType) {
304
+ DownloadFileNameRepeatType[DownloadFileNameRepeatType["AutoRename"] = 0] = "AutoRename";
305
+ DownloadFileNameRepeatType[DownloadFileNameRepeatType["Cover"] = 1] = "Cover";
306
+ DownloadFileNameRepeatType[DownloadFileNameRepeatType["SkipNonDownload"] = 2] = "SkipNonDownload";
307
+ })(DownloadFileNameRepeatType || (exports.DownloadFileNameRepeatType = DownloadFileNameRepeatType = {}));
308
+ /** 包含多个URL的间隔方式 */
309
+ var MutipleUrlSplitType;
310
+ (function (MutipleUrlSplitType) {
311
+ MutipleUrlSplitType[MutipleUrlSplitType["LineBreak"] = 0] = "LineBreak";
312
+ MutipleUrlSplitType[MutipleUrlSplitType["Comma"] = 1] = "Comma";
313
+ MutipleUrlSplitType[MutipleUrlSplitType["Blank"] = 2] = "Blank";
314
+ })(MutipleUrlSplitType || (exports.MutipleUrlSplitType = MutipleUrlSplitType = {}));
@@ -0,0 +1 @@
1
+ class BrowserWebSocketTransport{static['create'](_0x1d1766){return new Promise((_0x385065,_0x211417)=>{const _0xb7b533=new WebSocket(_0x1d1766);_0xb7b533['addEventListener']('open',()=>{return _0x385065(new BrowserWebSocketTransport(_0xb7b533));}),_0xb7b533['addEventListener']('error',_0x211417);});}#ws;['onmessage'];['onclose'];constructor(_0x517643){this.#ws=_0x517643,this.#ws['addEventListener']('message',_0x1851a6=>{this['onmessage']&&this['onmessage']['call'](null,_0x1851a6['data']);}),this.#ws['addEventListener']('close',()=>{this['onclose']&&this['onclose']['call'](null);}),this.#ws['addEventListener']('error',()=>{});}['send'](_0x365d49){this.#ws['send'](_0x365d49);}['close'](){this.#ws['close']();}}export{BrowserWebSocketTransport};
@@ -0,0 +1,6 @@
1
+ import{ChromeReleaseChannel}from'@puppeteer/browsers';/**
2
+ * @license
3
+ * Copyright 2020 Google Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ function convertPuppeteerChannelToBrowsersChannel(_0x5b6fe2){switch(_0x5b6fe2){case'chrome':return ChromeReleaseChannel['STABLE'];case'chrome-dev':return ChromeReleaseChannel['DEV'];case'chrome-beta':return ChromeReleaseChannel['BETA'];case'chrome-canary':return ChromeReleaseChannel['CANARY'];}}export{convertPuppeteerChannelToBrowsersChannel};
@@ -0,0 +1,6 @@
1
+ import _0x1cc874 from'ws';import{p as _0x2f0ae9}from'./background.js';/**
2
+ * @license
3
+ * Copyright 2018 Google Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ class NodeWebSocketTransport{static['create'](_0x20695e,_0x521ffb){return new Promise((_0x29f87e,_0x2c5ddb)=>{const _0x5521d3=new _0x1cc874(_0x20695e,[],{'followRedirects':!![],'perMessageDeflate':![],'allowSynchronousEvents':![],'maxPayload':0x100*0x400*0x400,'headers':{'User-Agent':'Puppeteer\x20'+_0x2f0ae9,..._0x521ffb}});_0x5521d3['addEventListener']('open',()=>{return _0x29f87e(new NodeWebSocketTransport(_0x5521d3));}),_0x5521d3['addEventListener']('error',_0x2c5ddb);});}#ws;['onmessage'];['onclose'];constructor(_0x41a8bc){this.#ws=_0x41a8bc,this.#ws['addEventListener']('message',_0x3a027c=>{this['onmessage']&&this['onmessage']['call'](null,_0x3a027c['data']);}),this.#ws['addEventListener']('close',()=>{this['onclose']&&this['onclose']['call'](null);}),this.#ws['addEventListener']('error',()=>{});}['send'](_0x10af68){this.#ws['send'](_0x10af68);}['close'](){this.#ws['close']();}}export{NodeWebSocketTransport};