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,17 @@
1
+ 'use strict';
2
+
3
+ const BaseProcess = require('../activities/BaseProcess');
4
+
5
+ function SubProcess() {
6
+ BaseProcess.apply(this, arguments);
7
+ this.isSubProcess = true;
8
+ }
9
+
10
+ SubProcess.prototype = Object.create(BaseProcess.prototype);
11
+
12
+ SubProcess.prototype.run = function(message) {
13
+ const input = this.getInput(message);
14
+ return BaseProcess.prototype.run.call(this, input);
15
+ };
16
+
17
+ module.exports = SubProcess;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ const BaseTask = require('../activities/BaseTask');
4
+
5
+ function Task() {
6
+ BaseTask.apply(this, arguments);
7
+ }
8
+
9
+ Task.prototype = Object.create(BaseTask.prototype);
10
+
11
+ Task.prototype.execute = function(message) {
12
+ this.emit('start', this);
13
+ this.complete(message);
14
+ };
15
+
16
+ module.exports = Task;
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ const BaseTask = require('../activities/BaseTask');
4
+
5
+ function UserTask() {
6
+ BaseTask.apply(this, arguments);
7
+ this._debug(`<${this.id}> ${this.uuid}`, 'init');
8
+ this.form = this.parentContext.getActivityForm(this.activity);
9
+ }
10
+
11
+ UserTask.prototype = Object.create(BaseTask.prototype);
12
+
13
+ UserTask.prototype.execute = function(message) {
14
+ this._debug(`<${this.id}>`, 'execute');
15
+ if (this.form) {
16
+ this.form.init(this.getInput(message));
17
+ }
18
+
19
+ this.emit('start', this);
20
+ this.waiting = true;
21
+ this.emit('wait', this);
22
+ };
23
+
24
+ UserTask.prototype.signal = function(input) {
25
+ if (!this.waiting) {
26
+ return this.emit('error', new Error(`<${this.id}> is not waiting`), this);
27
+ }
28
+
29
+ this.waiting = false;
30
+
31
+ this.dataOutput = input;
32
+ this.taken = true;
33
+
34
+ this._debug(`<${this.id}>`, 'signaled', input);
35
+ this.complete(input);
36
+ };
37
+
38
+ UserTask.prototype.getState = function() {
39
+ const state = BaseTask.prototype.getState.call(this);
40
+ if (this.waiting) state.waiting = this.waiting;
41
+ if (this.form) {
42
+ state.form = this.form.getState();
43
+ }
44
+ return state;
45
+ };
46
+
47
+ module.exports = UserTask;
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ const BpmnModdle = require('bpmn-moddle');
4
+
5
+ const pub = {};
6
+
7
+ pub.transform = function(sourceXml, options, callback) {
8
+ if (!sourceXml || typeof sourceXml !== 'string') return callback(new Error('Nothing to transform'));
9
+ const moddle = new BpmnModdle(options);
10
+ return moddle.fromXML(sourceXml, callback);
11
+ };
12
+
13
+ module.exports = pub;
@@ -0,0 +1,111 @@
1
+ 'use strict';
2
+
3
+ const contextHelper = require('./context-helper');
4
+ const debug = require('debug')('bpmn-engine:validation');
5
+
6
+ const validExecuteOptions = ['listener', 'services', 'variables'];
7
+
8
+ const pub = {};
9
+
10
+ pub.validateModdleContext = function(moddleContext) {
11
+ if (!moddleContext) {
12
+ return [new Error('Nothing to validate')];
13
+ }
14
+ debug('validate start');
15
+ if (moddleContext.warnings && moddleContext.warnings.length) {
16
+ return moddleContext.warnings.map(makeErrors);
17
+ }
18
+
19
+ let warnings = moddleContext.warnings || [];
20
+ warnings = validateContext(moddleContext, warnings);
21
+
22
+ return warnings;
23
+ };
24
+
25
+ pub.validateOptions = function(options) {
26
+ if (!options) return true;
27
+
28
+ Object.keys(options).forEach((key) => {
29
+ if (validExecuteOptions.indexOf(key) === -1) throw new Error(`Execute option ${key} is unsupported`);
30
+ });
31
+
32
+ if (options.listener && typeof options.listener.emit !== 'function') {
33
+ throw new Error('listener "emit" function is required');
34
+ }
35
+ if (options.services) {
36
+ if (typeof options.services !== 'object') throw new Error('services must be an object');
37
+ validateServices(options.services);
38
+ }
39
+ if (options.variables) {
40
+ if (typeof options.variables !== 'object') throw new Error('variables must be an object');
41
+ }
42
+ return true;
43
+ };
44
+
45
+ function validateContext(context, warnings) {
46
+ Object.keys(context.elementsById).forEach((id) => {
47
+ const element = context.elementsById[id];
48
+ if (element.$type === 'bpmn:SequenceFlow') {
49
+ validateFlow(context, warnings, id, element);
50
+ } else if (element.$type === 'bpmn:ExclusiveGateway') {
51
+ const flows = contextHelper.getOutboundSequenceFlows(context, element.id);
52
+ if (!flows.length) {
53
+ warnings.push(new Error(`${element.$type} <${element.id}> has no outgoing flow`));
54
+ } else if (flows.length === 1) {
55
+ const flowElement = flows[0].element;
56
+ if (flowElement.conditionExpression) {
57
+ warnings.push(new Error(`${element.$type} <${element.id}> has a single diverging flow (${flowElement.$type} <${flowElement.id}>) with a condition`));
58
+ }
59
+ } else {
60
+ flows.forEach((flow) => {
61
+ const flowElement = flow.element;
62
+
63
+ if (!contextHelper.isDefaultSequenceFlow(context, flowElement.id) && !flowElement.conditionExpression) {
64
+ warnings.push(new Error(`${element.$type} <${element.id}> diverging flow (${flowElement.$type} <${flowElement.id}>) has no condition`));
65
+ }
66
+ });
67
+ }
68
+ }
69
+ });
70
+
71
+ if (warnings.length) {
72
+ debug(warnings[0].message);
73
+ }
74
+
75
+ debug('validate context end');
76
+
77
+ return warnings;
78
+ }
79
+
80
+ function validateFlow(context, warnings, id, element) {
81
+ const refs = context.references.filter((r) => r.element.id === id);
82
+
83
+ ['sourceRef', 'targetRef'].forEach((prop) => {
84
+ if (!refs.find((r) => r.property === `bpmn:${prop}`)) {
85
+ warnings.push(new Error(`${element.$type} <${element.id}> property "${prop}" is required`));
86
+ }
87
+ });
88
+ }
89
+
90
+ function validateServices(services) {
91
+ Object.keys(services).forEach((name) => {
92
+ const service = services[name];
93
+ if (!service) throw new Error(`Service "${name}" is undefined`);
94
+
95
+ const serviceType = typeof service;
96
+ if (['function', 'object'].indexOf(serviceType) === -1) throw new Error(`Service "${name}" is not a function or an object`);
97
+ if (serviceType === 'function') return;
98
+
99
+ if (!service.module || typeof service.module !== 'string') throw new Error(`Service "${name}" module must be a string`);
100
+ if (service.type && ['require', 'global'].indexOf(service.type) === -1) throw new Error(`Service "${name}" type <${service.type}> must be global or require`);
101
+ });
102
+ }
103
+
104
+ function makeErrors(eObj) {
105
+ const clone = Object.assign({}, eObj);
106
+ const err = new Error(clone.message);
107
+ delete clone.message;
108
+ return Object.assign(err, clone);
109
+ }
110
+
111
+ module.exports = pub;
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@octopus/bpmn",
3
+ "version": "1.0.4",
4
+ "description": "BPMN 2.0 execution engine. Open source javascript workflow engine.",
5
+ "author": "octopus",
6
+ "main": "index.js",
7
+ "types": "types/bpmn.d.ts",
8
+ "engines": {
9
+ "node": ">=4"
10
+ },
11
+ "files": [
12
+ "lib",
13
+ "types",
14
+ "index.js"
15
+ ],
16
+ "dependencies": {}
17
+ }
@@ -0,0 +1,85 @@
1
+ declare module "@octopus/bpmn" {
2
+ export class Definition {
3
+ constructor(moddleContext: any, options: any);
4
+
5
+ execute(optionsOrCallback: any, callback: any): any;
6
+
7
+ getChildActivityById(childId: any): any;
8
+
9
+ getPendingActivities(): any;
10
+
11
+ getProcessById(processId: any): any;
12
+
13
+ getProcesses(optionsOrCallback: any, callback: any): any;
14
+
15
+ getState(): any;
16
+
17
+ onEnd(process: any): void;
18
+
19
+ onError(...args: any[]): void;
20
+
21
+ onMessage(from: any, message: any, via: any): void;
22
+
23
+ signal(activityId: any, output: any): any;
24
+
25
+ stop(): void;
26
+
27
+ static resume(
28
+ state: any,
29
+ optionsOrCallback: any,
30
+ callback: any,
31
+ ...args: any[]
32
+ ): any;
33
+ }
34
+
35
+ export class Engine {
36
+ constructor(options: any);
37
+
38
+ addDefinitionByModdleContext(moddleContext: any): any;
39
+
40
+ addDefinitionBySource(
41
+ source: any,
42
+ moddleOptionsOrCallback: any,
43
+ callback: any
44
+ ): any;
45
+
46
+ execute(executeOptionsOrCallback: any, callback: any, ...args: any[]): any;
47
+
48
+ getDefinition(callback: any): any;
49
+
50
+ getDefinitionById(definitionId: any): any;
51
+
52
+ getDefinitions(callback: any): any;
53
+
54
+ getPendingActivities(): any;
55
+
56
+ getState(): any;
57
+
58
+ onEnd(lastReportingDefinition: any): void;
59
+
60
+ onError(...args: any[]): void;
61
+
62
+ signal(activityId: any, output: any): any;
63
+
64
+ stop(): void;
65
+
66
+ static resume(
67
+ engineState: any,
68
+ executeOptionsOrCallback: any,
69
+ callback: any,
70
+ ...args: any[]
71
+ ): any;
72
+
73
+ started?: boolean;
74
+ }
75
+
76
+ export namespace transformer {
77
+ function transform(sourceXml: any, options: any, callback: any): any;
78
+ }
79
+
80
+ export namespace validation {
81
+ function validateModdleContext(moddleContext: any): any;
82
+
83
+ function validateOptions(options: any): any;
84
+ }
85
+ }
@@ -0,0 +1,370 @@
1
+ # Octopus Workflow - 智能数据采集流程引擎
2
+
3
+ ## 概述
4
+
5
+ `@octopus/engine` 是一个基于浏览器自动化的智能数据采集流程引擎,专为 Octoparse 数据采集工具设计。该模块通过真实浏览器环境执行复杂的数据采集任务,支持页面导航、元素点击、数据提取、循环遍历等多种操作,实现高度灵活的自动化数据采集。
6
+
7
+ ## 技术栈
8
+
9
+ ### 核心技术
10
+ - **TypeScript**: 提供类型安全和现代化开发体验
11
+ - **Puppeteer**: 基于 Chrome DevTools Protocol 的浏览器自动化库
12
+ - **rebrowser-puppeteer-core**: 增强的 Puppeteer 核心,提供更好的反检测能力
13
+ - **puppeteer-extra**: Puppeteer 增强插件系统
14
+ - **@octopus/bpmn**: 业务流程建模与执行引擎
15
+
16
+ ### 解析与处理
17
+ - **xml2js/fast-xml-parser**: XML 文档解析与转换
18
+ - **xpath/xmldom**: XPath 查询和 XML DOM 操作
19
+ - **jsonpath**: JSON 路径查询
20
+ - **sax**: 流式 XML 解析器
21
+
22
+ ### 网络与代理
23
+ - **axios**: HTTP 请求客户端
24
+ - **puppeteer-proxy**: 代理支持
25
+ - **iconv-lite**: 字符编码转换
26
+
27
+ ### 工具库
28
+ - **lodash-es**: 实用工具函数库
29
+ - **moment**: 日期时间处理
30
+ - **uuid**: 唯一标识符生成
31
+ - **system-architecture**: 系统架构检测
32
+
33
+ ## 架构设计
34
+
35
+ ### 核心架构模式
36
+
37
+ #### 1. 策略模式 (Strategy Pattern)
38
+ ```typescript
39
+ // 动作类型映射
40
+ const ActionClass = {
41
+ [ActionType.Navigate]: NavigateAction,
42
+ [ActionType.Click]: ClickAction,
43
+ [ActionType.ExtractData]: ExtractDataAction,
44
+ [ActionType.Loop]: LoopAction,
45
+ // ... 更多动作类型
46
+ }
47
+ ```
48
+
49
+ #### 2. 模板方法模式 (Template Method)
50
+ 所有动作都继承自 `BaseAction`,提供统一的执行流程:
51
+ - `enter()` - 进入动作
52
+ - `start()` - 开始执行
53
+ - `wait()` - 等待条件
54
+ - `end()` - 结束处理
55
+ - `leave()` - 离开清理
56
+
57
+ #### 3. 观察者模式 (Observer Pattern)
58
+ 通过 `AsyncEmitter` 实现事件驱动的异步通信:
59
+ ```typescript
60
+ class WorkflowAgent extends EventEmitter {
61
+ // 工作流状态事件
62
+ WorkflowEvents = {
63
+ Log: 'log',
64
+ ExtraData: 'extra-data',
65
+ PauseTask: 'pause-task',
66
+ StopTask: 'stop-task',
67
+ // ...
68
+ }
69
+ }
70
+ ```
71
+
72
+ #### 4. 工厂模式 (Factory Pattern)
73
+ `ActionFactory` 负责根据任务配置创建相应的动作实例。
74
+
75
+ ## 核心组件
76
+
77
+ ### 1. WorkflowAgent (工作流代理)
78
+ - **职责**: 管理整个工作流的生命周期
79
+ - **功能**:
80
+ - 浏览器实例管理
81
+ - 任务执行控制 (启动/暂停/停止)
82
+ - 事件监听与分发
83
+ - 验证码处理
84
+ - 代理IP管理
85
+
86
+ ### 2. BaseAction (基础动作类)
87
+ - **职责**: 所有动作的基类,定义通用行为
88
+ - **核心功能**:
89
+ - 页面操作基础能力
90
+ - 重试机制
91
+ - 日志记录
92
+ - 代理IP切换
93
+ - 验证码处理
94
+ - 循环数据管理
95
+
96
+ ### 3. 具体动作实现
97
+
98
+ #### NavigateAction (页面导航)
99
+ - 页面跳转与加载
100
+ - Cookie 管理
101
+ - 缓存清理
102
+ - 重试条件检查
103
+
104
+ #### ClickAction (点击操作)
105
+ - 元素定位与点击
106
+ - 新窗口处理
107
+ - 链接有效性验证
108
+ - 点击重试机制
109
+
110
+ #### ExtractDataAction (数据提取)
111
+ - 多类型数据提取 (文本/HTML/链接/图片等)
112
+ - XPath/CSS选择器支持
113
+ - 数据清洗与格式化
114
+ - 触发器机制
115
+
116
+ #### LoopAction/LoopStartAction (循环处理)
117
+ - 固定列表循环
118
+ - 变量列表循环
119
+ - URL列表循环
120
+ - 滚动加载循环
121
+ - 循环状态管理
122
+
123
+ #### EnterTextAction (文本输入)
124
+ - 表单填写
125
+ - 输入验证
126
+ - 清空与覆盖模式
127
+
128
+ #### EnterCaptchaAction (验证码处理)
129
+ - 图片验证码识别
130
+ - 滑块验证码处理
131
+ - reCAPTCHA 处理
132
+ - hCaptcha 处理
133
+ - 自定义验证码策略
134
+
135
+ #### ConditionAction & BranchAction (条件分支)
136
+ - 条件判断逻辑
137
+ - 分支流程控制
138
+ - 动态路径选择
139
+
140
+ ### 4. Browser Management (浏览器管理)
141
+ - 自动下载与安装 Chrome
142
+ - 跨平台支持 (Windows/macOS/Linux)
143
+ - ARM64 架构适配
144
+ - 浏览器实例池管理
145
+
146
+ ### 5. 工具模块
147
+
148
+ #### AsyncEmitter (异步事件发射器)
149
+ - 支持异步事件监听
150
+ - Promise 化的事件处理
151
+
152
+ #### DataStore (数据存储)
153
+ - 循环数据缓存
154
+ - 提取结果存储
155
+ - 状态持久化
156
+
157
+ #### HttpRequester (HTTP 请求器)
158
+ - 网络请求封装
159
+ - 代理支持
160
+ - 重试机制
161
+
162
+ #### JsonParser (JSON 解析器)
163
+ - 复杂 JSON 数据解析
164
+ - JSONPath 查询支持
165
+
166
+ ## 实现策略
167
+
168
+ ### 1. 反检测策略
169
+ - 使用 `rebrowser-puppeteer-core` 提供更好的反检测能力
170
+ - 禁用自动化标识: `--disable-blink-features=AutomationControlled`
171
+ - 动态 User-Agent 切换
172
+ - 代理IP轮换机制
173
+
174
+ ### 2. 稳定性策略
175
+ - **重试机制**: 支持多种重试条件 (URL包含、文本包含、元素存在等)
176
+ - **超时控制**: 每个步骤设置最大执行时间 (默认3分钟)
177
+ - **异常恢复**: 页面崩溃自动恢复
178
+ - **资源清理**: 及时释放浏览器资源
179
+
180
+ ### 3. 性能优化策略
181
+ - **并发控制**: 支持多浏览器上下文并行执行
182
+ - **资源管理**: 可选择禁用图片/广告加载
183
+ - **内存优化**: 定期清理DOM缓存
184
+ - **网络优化**: 请求拦截与代理
185
+
186
+ ### 4. 数据处理策略
187
+ - **多格式支持**: 文本、HTML、JSON、图片、文件等
188
+ - **数据清洗**: 自动去除HTML标签、空白字符
189
+ - **编码处理**: 支持多种字符编码转换
190
+ - **重复检测**: 防止数据重复采集
191
+
192
+ ### 5. 循环采集策略
193
+ - **智能翻页**: 自动检测翻页按钮和加载更多
194
+ - **滚动加载**: 支持无限滚动页面
195
+ - **去重机制**: 基于XPath和内容的重复检测
196
+ - **异常跳过**: 无效页面自动跳过机制
197
+
198
+ ## 主要功能特性
199
+
200
+ ### 🌐 页面操作
201
+ - ✅ 页面导航与跳转
202
+ - ✅ 多标签页/窗口管理
203
+ - ✅ Cookie 和缓存管理
204
+ - ✅ JavaScript 执行
205
+ - ✅ 页面滚动和截图
206
+
207
+ ### 🎯 元素交互
208
+ - ✅ 智能元素定位 (XPath/CSS选择器)
209
+ - ✅ 点击、输入、鼠标悬停
210
+ - ✅ 下拉框选择
211
+ - ✅ 文件上传处理
212
+
213
+ ### 📊 数据提取
214
+ - ✅ 文本内容提取
215
+ - ✅ HTML源码获取
216
+ - ✅ 链接和图片地址提取
217
+ - ✅ 表格数据结构化提取
218
+ - ✅ JSON API数据解析
219
+ - ✅ OCR文字识别
220
+ - ✅ 自定义字段生成
221
+
222
+ ### 🔄 流程控制
223
+ - ✅ 条件判断与分支
224
+ - ✅ 循环遍历 (固定/动态列表)
225
+ - ✅ 异常处理与重试
226
+ - ✅ 任务暂停/恢复/停止
227
+
228
+ ### 🛡️ 反检测与防护
229
+ - ✅ User-Agent 伪装
230
+ - ✅ 代理IP轮换
231
+ - ✅ 请求频率控制
232
+ - ✅ 浏览器指纹隐藏
233
+ - ✅ 验证码智能处理
234
+
235
+ ### 🔧 高级功能
236
+ - ✅ 自定义JavaScript执行
237
+ - ✅ HTTP请求拦截与修改
238
+ - ✅ 文件下载管理
239
+ - ✅ 数据导出 (JSON/CSV/Excel)
240
+ - ✅ 实时监控与日志
241
+
242
+ ## 使用示例
243
+
244
+ ### 基本工作流执行
245
+ ```typescript
246
+ import { WorkflowAgent } from '@octopus/engine'
247
+
248
+ const agent = new WorkflowAgent({
249
+ taskId: 'task-001',
250
+ xml: '原始任务XML',
251
+ xoml: '转换后的BPMN格式',
252
+ fieldNames: ['title', 'content', 'url'],
253
+ workflowSetting: new WorkflowSetting(),
254
+ userAgent: 'Mozilla/5.0...',
255
+ brokerSettings: new BrokerSettings()
256
+ })
257
+
258
+ // 启动工作流
259
+ await agent.start({
260
+ headless: false,
261
+ path: '/path/to/chrome'
262
+ })
263
+
264
+ // 监听数据提取事件
265
+ agent.on('extra-data', (data) => {
266
+ console.log('提取到数据:', data)
267
+ })
268
+
269
+ // 控制工作流
270
+ agent.pause() // 暂停
271
+ agent.resume() // 恢复
272
+ agent.stop() // 停止
273
+ ```
274
+
275
+ ### 自定义动作扩展
276
+ ```typescript
277
+ import BaseAction from './actions/BaseAction'
278
+
279
+ class CustomAction extends BaseAction {
280
+ async start() {
281
+ // 自定义业务逻辑
282
+ const page = await this.getCurrentPage()
283
+ const result = await page.evaluate(() => {
284
+ // 页面内执行的代码
285
+ return document.title
286
+ })
287
+
288
+ this.log('CustomAction', result)
289
+ return result
290
+ }
291
+ }
292
+ ```
293
+
294
+ ## 配置选项
295
+
296
+ ### WorkflowSetting (工作流设置)
297
+ ```typescript
298
+ {
299
+ showJumpInvalidClickSetting: true, // 显示跳过无效点击选项
300
+ repeatPageLoopCount: 50, // 重复页面循环判断次数
301
+ continuousJudgeCount: 5, // 连续判断无效次数
302
+ actionWrapper: (action) => action // 动作包装器
303
+ }
304
+ ```
305
+
306
+ ### BrokerSettings (防封设置)
307
+ ```typescript
308
+ {
309
+ ipProxySettings: {
310
+ ipProxyFromType: IpProxyFromType.None,
311
+ strongIpProxySettings: { period: 0 },
312
+ customIpProxySettings: {
313
+ switchPeriod: 0,
314
+ proxies: []
315
+ }
316
+ },
317
+ userAgentSwitchSettings: {
318
+ switchType: UserAgentSwitchType.None,
319
+ customPeriod: 0,
320
+ userAgents: []
321
+ },
322
+ cookieClearSettings: {
323
+ clearType: CookieClearType.None,
324
+ customPeriod: 0
325
+ }
326
+ }
327
+ ```
328
+
329
+ ## 开发指南
330
+
331
+ ### 项目结构
332
+ ```
333
+ src/
334
+ ├── actions/ # 动作实现
335
+ ├── configs/ # 配置定义
336
+ ├── enums/ # 枚举常量
337
+ ├── models/ # 数据模型
338
+ ├── translator/ # 任务转换器
339
+ ├── types/ # 类型定义
340
+ ├── utils/ # 工具函数
341
+ ├── browser.ts # 浏览器管理
342
+ ├── browserProxy.ts # 浏览器代理
343
+ ├── index.ts # 主入口
344
+ └── settings.ts # 设置定义
345
+ ```
346
+
347
+ ### 构建与测试
348
+ ```bash
349
+ # 安装依赖
350
+ pnpm install
351
+
352
+ # 类型检查
353
+ pnpm lint
354
+
355
+ # 构建项目
356
+ pnpm build
357
+ ```
358
+
359
+ ## 许可证
360
+
361
+ MIT License
362
+
363
+ ## 贡献指南
364
+
365
+ 欢迎提交 Issue 和 Pull Request 来改进这个项目。在贡献代码前,请确保:
366
+
367
+ 1. 遵循现有的代码风格
368
+ 2. 添加适当的类型定义
369
+ 3. 编写必要的测试用例
370
+ 4. 更新相关文档
@@ -0,0 +1,4 @@
1
+ import BaseAction from './BaseAction';
2
+ export default class BackPreWebPageAction extends BaseAction {
3
+ wait(): Promise<void>;
4
+ }
@@ -0,0 +1 @@
1
+ 'use strict';var __importDefault=this&&this['__importDefault']||function(_0x27d8fe){return _0x27d8fe&&_0x27d8fe['__esModule']?_0x27d8fe:{'default':_0x27d8fe};};Object['defineProperty'](exports,'__esModule',{'value':!![]});const enums_1=require('../enums'),BaseAction_1=__importDefault(require('./BaseAction'));class BackPreWebPageAction extends BaseAction_1['default']{async['wait'](){if(this['getIsSkipCurrentLoop']()||this['getIsSkipActionUtilNextLoop'](this['getNodeId']())){this['finish']();return;}await super['wait'](),this['log'](enums_1['LogKey']['BackPreWebPage']['Begin'],this['name']);const _0x3fd7ca=await this['getCurrentPage']();try{await _0x3fd7ca['goBack']();}finally{this['finish']();}}}exports['default']=BackPreWebPageAction;