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,242 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Operation = void 0;
7
+ const utils_1 = require("../utils");
8
+ const DateTimeFormatHelper_1 = __importDefault(require("../utils/DateTimeFormatHelper"));
9
+ const moment_1 = __importDefault(require("moment"));
10
+ class Operation {
11
+ constructor() {
12
+ this.index = 0;
13
+ this.name = '';
14
+ this.input = '';
15
+ this.output = '';
16
+ }
17
+ regexTra(v) {
18
+ let traObj = {
19
+ '\\\\': '\\\\',
20
+ '\\)': '\\)',
21
+ '\\(': '\\(',
22
+ '\\*': '\\*',
23
+ '\\.': '\\.',
24
+ '\\?': '\\?',
25
+ '\\+': '\\+',
26
+ '\\$': '\\$',
27
+ '\\^': '\\^',
28
+ '\\[': '\\[',
29
+ '\\]': '\\]',
30
+ '\\{': '\\{',
31
+ '\\}': '\\}',
32
+ '\\|': '\\|',
33
+ '\\/': '\\/'
34
+ };
35
+ let r = v;
36
+ for (let k in traObj) {
37
+ let reg = new RegExp(k, 'g');
38
+ r = r.replace(reg, traObj[k]);
39
+ }
40
+ return r;
41
+ }
42
+ /** 把v7版本里面的\b替换为等价的式子 */
43
+ transPatternForV7(pattern) {
44
+ const p = /\\b/g;
45
+ const transp = '((?<![^a-zA-Z0-9_\\u4e00-\\u9fa5])(?=[^a-zA-Z0-9_\\u4e00-\\u9fa5])|(?<=[^a-zA-Z0-9_\\u4e00-\\u9fa5])(?![^a-zA-Z0-9_\\u4e00-\\u9fa5])|$)';
46
+ let patternNew = pattern.replace(p, transp);
47
+ return patternNew;
48
+ }
49
+ htmlDecode(source) {
50
+ if (source.length == 0)
51
+ return '';
52
+ let s = '';
53
+ s = source.replace(/&amp;/g, '&');
54
+ s = s.replace(/&lt;/g, '<');
55
+ s = s.replace(/&gt;/g, '>');
56
+ s = s.replace(/&nbsp;/g, ' ');
57
+ s = s.replace(/&#39;/g, "'");
58
+ s = s.replace(/&quot;/g, '"');
59
+ return s;
60
+ }
61
+ async caculate(input) {
62
+ this.input = input;
63
+ switch (this.formatType) {
64
+ case "Replace" /* FormatType.Replace */:
65
+ {
66
+ const regex = new RegExp(this.regexTra(this.parameters[0]), 'g');
67
+ this.output = this.input.replace(regex, this.parameters[1]);
68
+ }
69
+ break;
70
+ case "RegReplace" /* FormatType.RegReplace */:
71
+ {
72
+ const pattern = this.transPatternForV7(this.parameters[0]);
73
+ const regexMatch = pattern.match(/^\/(.+)\/([gimyus]*)$/);
74
+ let regex;
75
+ if (regexMatch) {
76
+ const pattern_new = regexMatch[1];
77
+ const flags_new = regexMatch[2];
78
+ regex = new RegExp(pattern_new, flags_new);
79
+ }
80
+ else {
81
+ regex = new RegExp(pattern, 'g');
82
+ }
83
+ /**
84
+ * 在 Worker 线程中执行正则替换,防止某些耗时正则表达式卡死 UI 线程
85
+ * PS:这里未设置执行超时时间,默认是 10s,如果觉得等待太久可以传入超时时间
86
+ * 使用 encodeURI/decodeURI 来转义字符串,这样字符串含有换行符等特殊字符能正常传递
87
+ * 这里暂时未做错误提示,用户会不知道正则替换失败,看是否需要提示
88
+ */
89
+ const str = encodeURI(this.input);
90
+ const replaceValue = encodeURI(this.parameters[1]);
91
+ const code = `decodeURI("${str}").replace(${regex}, decodeURI("${replaceValue}"))`;
92
+ const result = await (0, utils_1.executeJavaScriptInWorker)(code).catch((error) => console.error(error));
93
+ this.output = typeof result === 'string' ? result : this.input;
94
+ }
95
+ break;
96
+ case "RegMatch" /* FormatType.RegMatch */:
97
+ {
98
+ const isMatchAll = this.parameters[1].toLowerCase() === 'true';
99
+ const pattern = this.transPatternForV7(this.parameters[0]);
100
+ const regexMatch = pattern.match(/^\/(.+)\/([gimyus]*)$/);
101
+ let basePattern = pattern;
102
+ let flags = '';
103
+ if (regexMatch) {
104
+ basePattern = regexMatch[1];
105
+ flags = regexMatch[2];
106
+ }
107
+ else {
108
+ flags = isMatchAll ? 'gm' : '';
109
+ }
110
+ const regex = new RegExp(basePattern, flags);
111
+ // 情况1:显式需要全局(勾选“匹配所有”或用户正则带 g)→ 整体匹配并合并
112
+ if (isMatchAll || flags.includes('g')) {
113
+ const str = encodeURI(this.input);
114
+ const code = `decodeURI("${str}").match(${regex})`;
115
+ const result = await (0, utils_1.executeJavaScriptInWorker)(code).catch((error) => console.error(error));
116
+ this.output = result
117
+ ? Array.isArray(result)
118
+ ? result.join('\r\n')
119
+ : String(result)
120
+ : '';
121
+ }
122
+ else {
123
+ // 情况2:默认(不勾选“匹配所有”,且正则不含 g)→ 按行取每行的第一个命中
124
+ const normalized = this.input.replace(/@\/n/g, '\n');
125
+ const lines = normalized.split(/\r?\n/);
126
+ const matches = [];
127
+ for (const line of lines) {
128
+ const m = line.match(regex);
129
+ if (m && m[0] !== undefined) {
130
+ matches.push(m[0]);
131
+ }
132
+ }
133
+ this.output = matches.join('\r\n');
134
+ }
135
+ }
136
+ break;
137
+ case "AddPrefix" /* FormatType.AddPrefix */:
138
+ {
139
+ this.output = this.parameters[0] + this.input;
140
+ }
141
+ break;
142
+ case "AddSuffix" /* FormatType.AddSuffix */:
143
+ {
144
+ this.output = this.input + this.parameters[0];
145
+ }
146
+ break;
147
+ case "Trim" /* FormatType.Trim */:
148
+ {
149
+ let trimType = parseInt(this.parameters[0]);
150
+ switch (trimType) {
151
+ case 0 /* TrimType.TrimBoth */:
152
+ this.output = this.input.trim();
153
+ break;
154
+ case 1 /* TrimType.TrimStart */:
155
+ this.output = this.input.trimLeft();
156
+ break;
157
+ case 2 /* TrimType.TrimEnd */:
158
+ this.output = this.input.trimRight();
159
+ break;
160
+ default:
161
+ break;
162
+ }
163
+ }
164
+ break;
165
+ case "FormatDateTime" /* FormatType.FormatDateTime */:
166
+ {
167
+ // 去除首尾全部空格
168
+ const input = this.input.trim();
169
+ // 先匹配特殊时间字符串转换为时间对象
170
+ let date = (0, utils_1.transformDate)(input);
171
+ if (!date) {
172
+ date = new Date(DateTimeFormatHelper_1.default.formatChinese(input));
173
+ }
174
+ /** 兼容荷兰语的3月,5月, 10月无法生效的问题 (BZY-15444) */
175
+ if (isNaN(date.getTime())) {
176
+ const mon = input.toLocaleLowerCase();
177
+ if (mon.includes('maart')) {
178
+ date = new Date(input.replace(/maart/gi, 'Mar'));
179
+ }
180
+ if (mon.includes('mei')) {
181
+ date = new Date(input.replace(/mei/gi, 'May'));
182
+ }
183
+ if (mon.includes('oktober')) {
184
+ date = new Date(input.replace(/oktober/gi, 'Oct'));
185
+ }
186
+ }
187
+ if (!isNaN(date.getTime())) {
188
+ this.output = DateTimeFormatHelper_1.default.format(date, this.parameters[0]);
189
+ }
190
+ else {
191
+ this.output = this.input;
192
+ }
193
+ }
194
+ break;
195
+ case "FormatTimestamp" /* FormatType.FormatTimestamp */:
196
+ {
197
+ const timestampType = Number(this.parameters[0]);
198
+ switch (timestampType) {
199
+ case 0 /* TimestampType.TimestampToDateTime */:
200
+ {
201
+ const input = this.input.trim();
202
+ /** 判断字符串是否是纯数字组成,有其它字符则不格式化 */
203
+ const isNumber = /^\d+$/.test(input);
204
+ if (!isNumber) {
205
+ this.output = this.input;
206
+ break;
207
+ }
208
+ const time = parseInt(input);
209
+ let date = input.length === 13 ? (0, moment_1.default)(time) : moment_1.default.unix(time);
210
+ if (date.isValid())
211
+ this.output = date.format('YYYY-MM-DD HH:mm:ss');
212
+ else
213
+ this.output = this.input;
214
+ }
215
+ break;
216
+ case 1 /* TimestampType.DateTimeToTimestamp */:
217
+ {
218
+ const date = (0, moment_1.default)(this.input.trim());
219
+ if (date.isValid())
220
+ this.output = date.unix().toString();
221
+ else
222
+ this.output = this.input;
223
+ }
224
+ break;
225
+ }
226
+ }
227
+ break;
228
+ case "FormatTimeZone" /* FormatType.FormatTimeZone */:
229
+ this.output = DateTimeFormatHelper_1.default.timeZone(this.input, this.parameters[0]);
230
+ break;
231
+ case "HtmlDecode" /* FormatType.HtmlDecode */:
232
+ {
233
+ this.output = this.htmlDecode(this.input);
234
+ }
235
+ break;
236
+ default:
237
+ break;
238
+ }
239
+ return this.output;
240
+ }
241
+ }
242
+ exports.Operation = Operation;
@@ -0,0 +1,7 @@
1
+ import { RetryConditionType } from '../enums';
2
+ export declare class RetryCondition {
3
+ mainValue: string;
4
+ containsOrNot: boolean;
5
+ minorValue?: string;
6
+ conditionType: RetryConditionType;
7
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetryCondition = void 0;
4
+ class RetryCondition {
5
+ constructor() {
6
+ this.mainValue = '';
7
+ this.containsOrNot = false;
8
+ }
9
+ }
10
+ exports.RetryCondition = RetryCondition;
@@ -0,0 +1,89 @@
1
+ import { TaskType } from '../enums';
2
+ export declare class WorkflowSetting {
3
+ /** 是否在任务设置界面显示自动跳过无效的循环点击选项 */
4
+ showJumpInvalidClickSetting: boolean;
5
+ /** 多少次后开始判断无效循环点击 */
6
+ repeatPageLoopCount: number;
7
+ /** 连续判断多少次循环点击才选无效 */
8
+ continuousJudgeCount: number;
9
+ }
10
+ export declare class CookiesRule {
11
+ /** 需要排除在顶级域名设置 Cookies 的域名列表 */
12
+ excludeSetTopDomainList: Array<string>;
13
+ }
14
+ export declare enum IpProxyFromType {
15
+ /** 不使用代理 IP */
16
+ None = 0,
17
+ /** 收费优质代理 IP */
18
+ Strong = 1,
19
+ /** 自定义代理 IP */
20
+ Custom = 2,
21
+ /** 伪造 IP */
22
+ Fake = 3
23
+ }
24
+ export declare enum UserAgentSwitchType {
25
+ /** 不切换 UA */
26
+ None = 0,
27
+ /** 自定义切换周期 */
28
+ Custom = 1,
29
+ /** 切换代理 IP 时切换 */
30
+ FollowIP = 2
31
+ }
32
+ export declare enum CookieClearType {
33
+ /** 不清除 Cookies */
34
+ None = 0,
35
+ /** 自定义清除周期 */
36
+ Custom = 1,
37
+ /** 切换代理 IP 时清除 */
38
+ FollowIP = 2
39
+ }
40
+ export declare class BrokerSettings {
41
+ ipProxySettings: {
42
+ ipProxyFromType: IpProxyFromType;
43
+ strongIpProxySettings: {
44
+ period: number;
45
+ };
46
+ customIpProxySettings: {
47
+ switchPeriod: number;
48
+ proxies: any[];
49
+ };
50
+ };
51
+ userAgentSwitchSettings: {
52
+ switchType: UserAgentSwitchType;
53
+ customPeriod: number;
54
+ userAgents: any[];
55
+ };
56
+ cookieClearSettings: {
57
+ clearType: CookieClearType;
58
+ customPeriod: number;
59
+ };
60
+ }
61
+ export declare class Task {
62
+ /** 任务 ID */
63
+ taskID: string;
64
+ /** 任务名 */
65
+ taskName: string;
66
+ /** 任务类型 */
67
+ taskType: TaskType;
68
+ /** 任务流程原始文档 */
69
+ xml: string;
70
+ /** 任务适配 bpmn 格式的文档 */
71
+ xoml: string;
72
+ /** 屏蔽广告 */
73
+ disableAD: boolean;
74
+ /** 禁用图片加载 */
75
+ disableImage: boolean;
76
+ /** 浏览器使用的 UA,未设定则使用默认 UA */
77
+ userAgent: string;
78
+ /** 工作流服务端保存的全局配置 */
79
+ workflowSetting: WorkflowSetting;
80
+ /** Cookies 设置规则 */
81
+ cookiesRule: CookiesRule;
82
+ /** 防封设置 */
83
+ brokerSettings: BrokerSettings;
84
+ update({ taskId, taskName, workFlowType, adBlockEnable, disableImage, userAgent, brokerSettings }: any): void;
85
+ }
86
+ export declare class SubTask extends Task {
87
+ /** 子任务 ID */
88
+ subTaskID: string;
89
+ }
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubTask = exports.Task = exports.BrokerSettings = exports.CookieClearType = exports.UserAgentSwitchType = exports.IpProxyFromType = exports.CookiesRule = exports.WorkflowSetting = void 0;
4
+ const enums_1 = require("../enums");
5
+ const lodash_1 = require("lodash");
6
+ class WorkflowSetting {
7
+ constructor() {
8
+ /** 是否在任务设置界面显示自动跳过无效的循环点击选项 */
9
+ this.showJumpInvalidClickSetting = true;
10
+ /** 多少次后开始判断无效循环点击 */
11
+ this.repeatPageLoopCount = 50;
12
+ /** 连续判断多少次循环点击才选无效 */
13
+ this.continuousJudgeCount = 5;
14
+ }
15
+ }
16
+ exports.WorkflowSetting = WorkflowSetting;
17
+ class CookiesRule {
18
+ constructor() {
19
+ /** 需要排除在顶级域名设置 Cookies 的域名列表 */
20
+ this.excludeSetTopDomainList = [];
21
+ }
22
+ }
23
+ exports.CookiesRule = CookiesRule;
24
+ var IpProxyFromType;
25
+ (function (IpProxyFromType) {
26
+ /** 不使用代理 IP */
27
+ IpProxyFromType[IpProxyFromType["None"] = 0] = "None";
28
+ /** 收费优质代理 IP */
29
+ IpProxyFromType[IpProxyFromType["Strong"] = 1] = "Strong";
30
+ /** 自定义代理 IP */
31
+ IpProxyFromType[IpProxyFromType["Custom"] = 2] = "Custom";
32
+ /** 伪造 IP */
33
+ IpProxyFromType[IpProxyFromType["Fake"] = 3] = "Fake";
34
+ })(IpProxyFromType || (exports.IpProxyFromType = IpProxyFromType = {}));
35
+ var UserAgentSwitchType;
36
+ (function (UserAgentSwitchType) {
37
+ /** 不切换 UA */
38
+ UserAgentSwitchType[UserAgentSwitchType["None"] = 0] = "None";
39
+ /** 自定义切换周期 */
40
+ UserAgentSwitchType[UserAgentSwitchType["Custom"] = 1] = "Custom";
41
+ /** 切换代理 IP 时切换 */
42
+ UserAgentSwitchType[UserAgentSwitchType["FollowIP"] = 2] = "FollowIP";
43
+ })(UserAgentSwitchType || (exports.UserAgentSwitchType = UserAgentSwitchType = {}));
44
+ var CookieClearType;
45
+ (function (CookieClearType) {
46
+ /** 不清除 Cookies */
47
+ CookieClearType[CookieClearType["None"] = 0] = "None";
48
+ /** 自定义清除周期 */
49
+ CookieClearType[CookieClearType["Custom"] = 1] = "Custom";
50
+ /** 切换代理 IP 时清除 */
51
+ CookieClearType[CookieClearType["FollowIP"] = 2] = "FollowIP";
52
+ })(CookieClearType || (exports.CookieClearType = CookieClearType = {}));
53
+ class BrokerSettings {
54
+ constructor() {
55
+ this.ipProxySettings = {
56
+ ipProxyFromType: IpProxyFromType.None,
57
+ strongIpProxySettings: {
58
+ period: 0,
59
+ },
60
+ customIpProxySettings: {
61
+ switchPeriod: 0,
62
+ proxies: [],
63
+ },
64
+ };
65
+ this.userAgentSwitchSettings = {
66
+ switchType: UserAgentSwitchType.None,
67
+ customPeriod: 0,
68
+ userAgents: [],
69
+ };
70
+ this.cookieClearSettings = {
71
+ clearType: CookieClearType.None,
72
+ customPeriod: 0,
73
+ };
74
+ }
75
+ }
76
+ exports.BrokerSettings = BrokerSettings;
77
+ class Task {
78
+ constructor() {
79
+ /** 任务 ID */
80
+ this.taskID = '';
81
+ /** 任务名 */
82
+ this.taskName = '';
83
+ /** 任务类型 */
84
+ this.taskType = enums_1.TaskType.Customize;
85
+ /** 任务流程原始文档 */
86
+ this.xml = '';
87
+ /** 任务适配 bpmn 格式的文档 */
88
+ this.xoml = '';
89
+ /** 屏蔽广告 */
90
+ this.disableAD = false;
91
+ /** 禁用图片加载 */
92
+ this.disableImage = false;
93
+ /** 浏览器使用的 UA,未设定则使用默认 UA */
94
+ this.userAgent = '';
95
+ /** 工作流服务端保存的全局配置 */
96
+ this.workflowSetting = new WorkflowSetting();
97
+ /** Cookies 设置规则 */
98
+ this.cookiesRule = new CookiesRule();
99
+ /** 防封设置 */
100
+ this.brokerSettings = new BrokerSettings();
101
+ }
102
+ update({ taskId, taskName, workFlowType, adBlockEnable, disableImage, userAgent, brokerSettings }) {
103
+ this.taskID = taskId;
104
+ this.taskName = taskName;
105
+ this.taskType = workFlowType;
106
+ this.disableAD = adBlockEnable;
107
+ this.disableImage = disableImage;
108
+ this.userAgent = userAgent;
109
+ (0, lodash_1.merge)(this.brokerSettings, brokerSettings);
110
+ }
111
+ }
112
+ exports.Task = Task;
113
+ class SubTask extends Task {
114
+ constructor() {
115
+ super(...arguments);
116
+ /** 子任务 ID */
117
+ this.subTaskID = '';
118
+ }
119
+ }
120
+ exports.SubTask = SubTask;
@@ -0,0 +1,66 @@
1
+ import { Operation } from './operation';
2
+ export declare class Trigger {
3
+ Name: string;
4
+ Status: number;
5
+ Priority: number;
6
+ LoopLevel: number;
7
+ Enabled: boolean;
8
+ TriggerAdditionGroups: TriggerAdditionGroup[];
9
+ clone(): Trigger;
10
+ }
11
+ export declare class TriggerAdditionGroup {
12
+ Id: number;
13
+ TriggerAdditions: TriggerAddition[];
14
+ clone(): TriggerAdditionGroup;
15
+ }
16
+ export declare class TriggerAddition {
17
+ Id: number;
18
+ OperatingSymbol: OperatingSymbol;
19
+ FieldName: string;
20
+ Content: string;
21
+ FormatTemplate: string;
22
+ DateTimeType: DateTimeType;
23
+ FormatDateTimeType: DateTimeType;
24
+ Increase: boolean;
25
+ Year: number;
26
+ Month: number;
27
+ Day: number;
28
+ Hour: number;
29
+ Minute: number;
30
+ Second: number;
31
+ Operations: Operation[];
32
+ clone(): TriggerAddition;
33
+ }
34
+ export declare enum OperatingSymbol {
35
+ StringEqual = "StringEqual",
36
+ StringNotEqual = "StringNotEqual",
37
+ StringContains = "StringContains",
38
+ StringNotContains = "StringNotContains",
39
+ StringNotEmpty = "StringNotEmpty",
40
+ StringEmpty = "StringEmpty",
41
+ IntGreaterThan = "IntGreaterThan",
42
+ IntLessThan = "IntLessThan",
43
+ IntGreaterThanOrEqual = "IntGreaterThanOrEqual",
44
+ IntLessThanOrEqual = "IntLessThanOrEqual",
45
+ DateGreaterThan = "DateGreaterThan",
46
+ DateLessThan = "DateLessThan",
47
+ DateGreaterThanOrEqual = "DateGreaterThanOrEqual",
48
+ DateLessThanOrEqual = "DateLessThanOrEqual"
49
+ }
50
+ export declare enum DateTimeType {
51
+ CurrentTime = "CurrentTime",
52
+ ZeroPoint = "ZeroPoint",
53
+ Custom = "Custom"
54
+ }
55
+ export declare enum ExtractTriggerStatus {
56
+ UploadExtractedData = 0,
57
+ NotSave = 1,
58
+ BreakLoop = 2,
59
+ EndWorkflow = 3,
60
+ Other = 100
61
+ }
62
+ export interface ExtractTriggerConfig {
63
+ status: ExtractTriggerStatus;
64
+ loopLevel: number;
65
+ name: string;
66
+ }
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExtractTriggerStatus = exports.DateTimeType = exports.OperatingSymbol = exports.TriggerAddition = exports.TriggerAdditionGroup = exports.Trigger = void 0;
4
+ const operation_1 = require("./operation");
5
+ class Trigger {
6
+ constructor() {
7
+ this.Name = '';
8
+ this.Status = 0;
9
+ this.Priority = 0;
10
+ this.LoopLevel = 0;
11
+ this.Enabled = false;
12
+ this.TriggerAdditionGroups = [];
13
+ }
14
+ clone() {
15
+ let trigger = new Trigger();
16
+ trigger.Name = this.Name;
17
+ trigger.Status = this.Status;
18
+ trigger.Priority = this.Priority;
19
+ trigger.LoopLevel = this.LoopLevel;
20
+ trigger.Enabled = this.Enabled;
21
+ trigger.TriggerAdditionGroups = this.TriggerAdditionGroups.map((g) => g.clone());
22
+ return trigger;
23
+ }
24
+ }
25
+ exports.Trigger = Trigger;
26
+ class TriggerAdditionGroup {
27
+ constructor() {
28
+ this.Id = 0;
29
+ this.TriggerAdditions = [];
30
+ }
31
+ clone() {
32
+ let group = new TriggerAdditionGroup();
33
+ group.Id = this.Id;
34
+ group.TriggerAdditions = this.TriggerAdditions.map((ta) => ta.clone());
35
+ return group;
36
+ }
37
+ }
38
+ exports.TriggerAdditionGroup = TriggerAdditionGroup;
39
+ class TriggerAddition {
40
+ constructor() {
41
+ this.Id = 0;
42
+ this.OperatingSymbol = OperatingSymbol.StringNotEmpty;
43
+ this.FieldName = '';
44
+ this.Content = '';
45
+ this.FormatTemplate = '';
46
+ this.DateTimeType = null;
47
+ this.FormatDateTimeType = null;
48
+ this.Increase = false;
49
+ this.Year = 0;
50
+ this.Month = 0;
51
+ this.Day = 0;
52
+ this.Hour = 0;
53
+ this.Minute = 0;
54
+ this.Second = 0;
55
+ this.Operations = [];
56
+ }
57
+ clone() {
58
+ let triggerAddition = new TriggerAddition();
59
+ triggerAddition.FieldName = this.FieldName;
60
+ triggerAddition.OperatingSymbol = this.OperatingSymbol;
61
+ triggerAddition.Content = this.Content;
62
+ triggerAddition.DateTimeType = this.DateTimeType;
63
+ triggerAddition.FormatDateTimeType = this.FormatDateTimeType;
64
+ triggerAddition.Increase = this.Increase;
65
+ triggerAddition.Year = this.Year;
66
+ triggerAddition.Month = this.Month;
67
+ triggerAddition.Day = this.Day;
68
+ triggerAddition.Hour = this.Hour;
69
+ triggerAddition.Minute = this.Minute;
70
+ triggerAddition.Second = this.Second;
71
+ triggerAddition.Id = this.Id;
72
+ triggerAddition.FormatTemplate = this.FormatTemplate;
73
+ triggerAddition.Operations = this.Operations.map((o) => {
74
+ let op = new operation_1.Operation();
75
+ op.input = o.input;
76
+ op.formatType = o.formatType;
77
+ op.index = o.index;
78
+ op.input = o.input;
79
+ op.parameters = o.parameters;
80
+ op.output = o.output;
81
+ return op;
82
+ });
83
+ return triggerAddition;
84
+ }
85
+ }
86
+ exports.TriggerAddition = TriggerAddition;
87
+ var OperatingSymbol;
88
+ (function (OperatingSymbol) {
89
+ OperatingSymbol["StringEqual"] = "StringEqual";
90
+ OperatingSymbol["StringNotEqual"] = "StringNotEqual";
91
+ OperatingSymbol["StringContains"] = "StringContains";
92
+ OperatingSymbol["StringNotContains"] = "StringNotContains";
93
+ OperatingSymbol["StringNotEmpty"] = "StringNotEmpty";
94
+ OperatingSymbol["StringEmpty"] = "StringEmpty";
95
+ OperatingSymbol["IntGreaterThan"] = "IntGreaterThan";
96
+ OperatingSymbol["IntLessThan"] = "IntLessThan";
97
+ OperatingSymbol["IntGreaterThanOrEqual"] = "IntGreaterThanOrEqual";
98
+ OperatingSymbol["IntLessThanOrEqual"] = "IntLessThanOrEqual";
99
+ OperatingSymbol["DateGreaterThan"] = "DateGreaterThan";
100
+ OperatingSymbol["DateLessThan"] = "DateLessThan";
101
+ OperatingSymbol["DateGreaterThanOrEqual"] = "DateGreaterThanOrEqual";
102
+ OperatingSymbol["DateLessThanOrEqual"] = "DateLessThanOrEqual";
103
+ })(OperatingSymbol || (exports.OperatingSymbol = OperatingSymbol = {}));
104
+ var DateTimeType;
105
+ (function (DateTimeType) {
106
+ DateTimeType["CurrentTime"] = "CurrentTime";
107
+ DateTimeType["ZeroPoint"] = "ZeroPoint";
108
+ DateTimeType["Custom"] = "Custom";
109
+ })(DateTimeType || (exports.DateTimeType = DateTimeType = {}));
110
+ var ExtractTriggerStatus;
111
+ (function (ExtractTriggerStatus) {
112
+ ExtractTriggerStatus[ExtractTriggerStatus["UploadExtractedData"] = 0] = "UploadExtractedData";
113
+ ExtractTriggerStatus[ExtractTriggerStatus["NotSave"] = 1] = "NotSave";
114
+ ExtractTriggerStatus[ExtractTriggerStatus["BreakLoop"] = 2] = "BreakLoop";
115
+ ExtractTriggerStatus[ExtractTriggerStatus["EndWorkflow"] = 3] = "EndWorkflow";
116
+ ExtractTriggerStatus[ExtractTriggerStatus["Other"] = 100] = "Other";
117
+ })(ExtractTriggerStatus || (exports.ExtractTriggerStatus = ExtractTriggerStatus = {}));
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@octopus/engine",
3
+ "version": "1.0.21",
4
+ "description": "run octoparse in real browser",
5
+ "main": "./index.js",
6
+ "types": "./index.d.ts",
7
+ "type": "commonjs",
8
+ "keywords": [],
9
+ "dependencies": {},
10
+ "exports": {
11
+ ".": "./index.js",
12
+ "./transformer": "./translator/translator.js",
13
+ "./enums": "./enums/index.js",
14
+ "./browser": "./browser.js",
15
+ "./type": "./type.js",
16
+ "./settings": "./settings.js"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "22.9.0",
20
+ "@types/ws": "8.5.14",
21
+ "@types/xmldom": "0.1.34",
22
+ "glob": "11.0.3",
23
+ "javascript-obfuscator": "4.1.1",
24
+ "typescript": "catalog:"
25
+ }
26
+ }