@atom8n/n8n-core 2.2.0

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 (352) hide show
  1. package/README.md +13 -0
  2. package/bin/common.js +19 -0
  3. package/bin/copy-static-files +24 -0
  4. package/bin/generate-metadata +75 -0
  5. package/bin/generate-translations +99 -0
  6. package/dist/binary-data/binary-data.config.d.ts +15 -0
  7. package/dist/binary-data/binary-data.config.js +62 -0
  8. package/dist/binary-data/binary-data.config.js.map +1 -0
  9. package/dist/binary-data/binary-data.service.d.ts +32 -0
  10. package/dist/binary-data/binary-data.service.js +243 -0
  11. package/dist/binary-data/binary-data.service.js.map +1 -0
  12. package/dist/binary-data/file-system.manager.d.ts +31 -0
  13. package/dist/binary-data/file-system.manager.js +154 -0
  14. package/dist/binary-data/file-system.manager.js.map +1 -0
  15. package/dist/binary-data/index.d.ts +5 -0
  16. package/dist/binary-data/index.js +27 -0
  17. package/dist/binary-data/index.js.map +1 -0
  18. package/dist/binary-data/object-store/object-store.config.d.ts +19 -0
  19. package/dist/binary-data/object-store/object-store.config.js +83 -0
  20. package/dist/binary-data/object-store/object-store.config.js.map +1 -0
  21. package/dist/binary-data/object-store/object-store.service.ee.d.ts +46 -0
  22. package/dist/binary-data/object-store/object-store.service.ee.js +235 -0
  23. package/dist/binary-data/object-store/object-store.service.ee.js.map +1 -0
  24. package/dist/binary-data/object-store/types.d.ts +8 -0
  25. package/dist/binary-data/object-store/types.js +3 -0
  26. package/dist/binary-data/object-store/types.js.map +1 -0
  27. package/dist/binary-data/object-store.manager.d.ts +23 -0
  28. package/dist/binary-data/object-store.manager.js +86 -0
  29. package/dist/binary-data/object-store.manager.js.map +1 -0
  30. package/dist/binary-data/types.d.ts +46 -0
  31. package/dist/binary-data/types.js +3 -0
  32. package/dist/binary-data/types.js.map +1 -0
  33. package/dist/binary-data/utils.d.ts +15 -0
  34. package/dist/binary-data/utils.js +66 -0
  35. package/dist/binary-data/utils.js.map +1 -0
  36. package/dist/build.tsbuildinfo +1 -0
  37. package/dist/constants.d.ts +19 -0
  38. package/dist/constants.js +23 -0
  39. package/dist/constants.js.map +1 -0
  40. package/dist/credentials.d.ts +12 -0
  41. package/dist/credentials.js +99 -0
  42. package/dist/credentials.js.map +1 -0
  43. package/dist/data-deduplication-service.d.ts +16 -0
  44. package/dist/data-deduplication-service.js +95 -0
  45. package/dist/data-deduplication-service.js.map +1 -0
  46. package/dist/encryption/cipher.d.ts +8 -0
  47. package/dist/encryption/cipher.js +57 -0
  48. package/dist/encryption/cipher.js.map +1 -0
  49. package/dist/encryption/index.d.ts +1 -0
  50. package/dist/encryption/index.js +6 -0
  51. package/dist/encryption/index.js.map +1 -0
  52. package/dist/errors/abstract/binary-data.error.d.ts +3 -0
  53. package/dist/errors/abstract/binary-data.error.js +8 -0
  54. package/dist/errors/abstract/binary-data.error.js.map +1 -0
  55. package/dist/errors/abstract/filesystem.error.d.ts +4 -0
  56. package/dist/errors/abstract/filesystem.error.js +11 -0
  57. package/dist/errors/abstract/filesystem.error.js.map +1 -0
  58. package/dist/errors/binary-data-file-not-found.error.d.ts +4 -0
  59. package/dist/errors/binary-data-file-not-found.error.js +11 -0
  60. package/dist/errors/binary-data-file-not-found.error.js.map +1 -0
  61. package/dist/errors/disallowed-filepath.error.d.ts +4 -0
  62. package/dist/errors/disallowed-filepath.error.js +11 -0
  63. package/dist/errors/disallowed-filepath.error.js.map +1 -0
  64. package/dist/errors/error-reporter.d.ts +35 -0
  65. package/dist/errors/error-reporter.js +256 -0
  66. package/dist/errors/error-reporter.js.map +1 -0
  67. package/dist/errors/file-not-found.error.d.ts +4 -0
  68. package/dist/errors/file-not-found.error.js +11 -0
  69. package/dist/errors/file-not-found.error.js.map +1 -0
  70. package/dist/errors/file-too-large.error.d.ts +9 -0
  71. package/dist/errors/file-too-large.error.js +13 -0
  72. package/dist/errors/file-too-large.error.js.map +1 -0
  73. package/dist/errors/index.d.ts +11 -0
  74. package/dist/errors/index.js +26 -0
  75. package/dist/errors/index.js.map +1 -0
  76. package/dist/errors/invalid-execution-metadata.error.d.ts +5 -0
  77. package/dist/errors/invalid-execution-metadata.error.js +12 -0
  78. package/dist/errors/invalid-execution-metadata.error.js.map +1 -0
  79. package/dist/errors/invalid-manager.error.d.ts +4 -0
  80. package/dist/errors/invalid-manager.error.js +11 -0
  81. package/dist/errors/invalid-manager.error.js.map +1 -0
  82. package/dist/errors/invalid-source-type.error.d.ts +4 -0
  83. package/dist/errors/invalid-source-type.error.js +11 -0
  84. package/dist/errors/invalid-source-type.error.js.map +1 -0
  85. package/dist/errors/missing-source-id.error.d.ts +4 -0
  86. package/dist/errors/missing-source-id.error.js +11 -0
  87. package/dist/errors/missing-source-id.error.js.map +1 -0
  88. package/dist/errors/unrecognized-credential-type.error.d.ts +4 -0
  89. package/dist/errors/unrecognized-credential-type.error.js +11 -0
  90. package/dist/errors/unrecognized-credential-type.error.js.map +1 -0
  91. package/dist/errors/unrecognized-node-type.error.d.ts +4 -0
  92. package/dist/errors/unrecognized-node-type.error.js +11 -0
  93. package/dist/errors/unrecognized-node-type.error.js.map +1 -0
  94. package/dist/errors/workflow-has-issues.error.d.ts +4 -0
  95. package/dist/errors/workflow-has-issues.error.js +11 -0
  96. package/dist/errors/workflow-has-issues.error.js.map +1 -0
  97. package/dist/execution-engine/active-workflows.d.ts +23 -0
  98. package/dist/execution-engine/active-workflows.js +153 -0
  99. package/dist/execution-engine/active-workflows.js.map +1 -0
  100. package/dist/execution-engine/execution-context-hook-registry.service.d.ts +12 -0
  101. package/dist/execution-engine/execution-context-hook-registry.service.js +69 -0
  102. package/dist/execution-engine/execution-context-hook-registry.service.js.map +1 -0
  103. package/dist/execution-engine/execution-context.d.ts +2 -0
  104. package/dist/execution-engine/execution-context.js +56 -0
  105. package/dist/execution-engine/execution-context.js.map +1 -0
  106. package/dist/execution-engine/execution-context.service.d.ts +17 -0
  107. package/dist/execution-engine/execution-context.service.js +108 -0
  108. package/dist/execution-engine/execution-context.service.js.map +1 -0
  109. package/dist/execution-engine/execution-lifecycle-hooks.d.ts +20 -0
  110. package/dist/execution-engine/execution-lifecycle-hooks.js +31 -0
  111. package/dist/execution-engine/execution-lifecycle-hooks.js.map +1 -0
  112. package/dist/execution-engine/external-secrets-proxy.d.ts +18 -0
  113. package/dist/execution-engine/external-secrets-proxy.js +38 -0
  114. package/dist/execution-engine/external-secrets-proxy.js.map +1 -0
  115. package/dist/execution-engine/index.d.ts +26 -0
  116. package/dist/execution-engine/index.js +31 -0
  117. package/dist/execution-engine/index.js.map +1 -0
  118. package/dist/execution-engine/interfaces.d.ts +7 -0
  119. package/dist/execution-engine/interfaces.js +3 -0
  120. package/dist/execution-engine/interfaces.js.map +1 -0
  121. package/dist/execution-engine/node-execution-context/base-execute-context.d.ts +47 -0
  122. package/dist/execution-engine/node-execution-context/base-execute-context.js +150 -0
  123. package/dist/execution-engine/node-execution-context/base-execute-context.js.map +1 -0
  124. package/dist/execution-engine/node-execution-context/credentials-test-context.d.ts +7 -0
  125. package/dist/execution-engine/node-execution-context/credentials-test-context.js +37 -0
  126. package/dist/execution-engine/node-execution-context/credentials-test-context.js.map +1 -0
  127. package/dist/execution-engine/node-execution-context/execute-context.d.ts +24 -0
  128. package/dist/execution-engine/node-execution-context/execute-context.js +108 -0
  129. package/dist/execution-engine/node-execution-context/execute-context.js.map +1 -0
  130. package/dist/execution-engine/node-execution-context/execute-single-context.d.ts +15 -0
  131. package/dist/execution-engine/node-execution-context/execute-single-context.js +53 -0
  132. package/dist/execution-engine/node-execution-context/execute-single-context.js.map +1 -0
  133. package/dist/execution-engine/node-execution-context/hook-context.d.ts +13 -0
  134. package/dist/execution-engine/node-execution-context/hook-context.js +35 -0
  135. package/dist/execution-engine/node-execution-context/hook-context.js.map +1 -0
  136. package/dist/execution-engine/node-execution-context/index.d.ts +17 -0
  137. package/dist/execution-engine/node-execution-context/index.js +51 -0
  138. package/dist/execution-engine/node-execution-context/index.js.map +1 -0
  139. package/dist/execution-engine/node-execution-context/load-options-context.d.ts +10 -0
  140. package/dist/execution-engine/node-execution-context/load-options-context.js +43 -0
  141. package/dist/execution-engine/node-execution-context/load-options-context.js.map +1 -0
  142. package/dist/execution-engine/node-execution-context/local-load-options-context.d.ts +10 -0
  143. package/dist/execution-engine/node-execution-context/local-load-options-context.js +51 -0
  144. package/dist/execution-engine/node-execution-context/local-load-options-context.js.map +1 -0
  145. package/dist/execution-engine/node-execution-context/node-execution-context.d.ts +68 -0
  146. package/dist/execution-engine/node-execution-context/node-execution-context.js +324 -0
  147. package/dist/execution-engine/node-execution-context/node-execution-context.js.map +1 -0
  148. package/dist/execution-engine/node-execution-context/poll-context.d.ts +11 -0
  149. package/dist/execution-engine/node-execution-context/poll-context.js +38 -0
  150. package/dist/execution-engine/node-execution-context/poll-context.js.map +1 -0
  151. package/dist/execution-engine/node-execution-context/supply-data-context.d.ts +26 -0
  152. package/dist/execution-engine/node-execution-context/supply-data-context.js +181 -0
  153. package/dist/execution-engine/node-execution-context/supply-data-context.js.map +1 -0
  154. package/dist/execution-engine/node-execution-context/trigger-context.d.ts +11 -0
  155. package/dist/execution-engine/node-execution-context/trigger-context.js +40 -0
  156. package/dist/execution-engine/node-execution-context/trigger-context.js.map +1 -0
  157. package/dist/execution-engine/node-execution-context/utils/binary-helper-functions.d.ts +10 -0
  158. package/dist/execution-engine/node-execution-context/utils/binary-helper-functions.js +213 -0
  159. package/dist/execution-engine/node-execution-context/utils/binary-helper-functions.js.map +1 -0
  160. package/dist/execution-engine/node-execution-context/utils/cleanup-parameter-data.d.ts +2 -0
  161. package/dist/execution-engine/node-execution-context/utils/cleanup-parameter-data.js +27 -0
  162. package/dist/execution-engine/node-execution-context/utils/cleanup-parameter-data.js.map +1 -0
  163. package/dist/execution-engine/node-execution-context/utils/construct-execution-metadata.d.ts +4 -0
  164. package/dist/execution-engine/node-execution-context/utils/construct-execution-metadata.js +11 -0
  165. package/dist/execution-engine/node-execution-context/utils/construct-execution-metadata.js.map +1 -0
  166. package/dist/execution-engine/node-execution-context/utils/copy-input-items.d.ts +2 -0
  167. package/dist/execution-engine/node-execution-context/utils/copy-input-items.js +19 -0
  168. package/dist/execution-engine/node-execution-context/utils/copy-input-items.js.map +1 -0
  169. package/dist/execution-engine/node-execution-context/utils/create-node-as-tool.d.ts +21 -0
  170. package/dist/execution-engine/node-execution-context/utils/create-node-as-tool.js +65 -0
  171. package/dist/execution-engine/node-execution-context/utils/create-node-as-tool.js.map +1 -0
  172. package/dist/execution-engine/node-execution-context/utils/data-table-helper-functions.d.ts +2 -0
  173. package/dist/execution-engine/node-execution-context/utils/data-table-helper-functions.js +13 -0
  174. package/dist/execution-engine/node-execution-context/utils/data-table-helper-functions.js.map +1 -0
  175. package/dist/execution-engine/node-execution-context/utils/deduplication-helper-functions.d.ts +2 -0
  176. package/dist/execution-engine/node-execution-context/utils/deduplication-helper-functions.js +38 -0
  177. package/dist/execution-engine/node-execution-context/utils/deduplication-helper-functions.js.map +1 -0
  178. package/dist/execution-engine/node-execution-context/utils/ensure-type.d.ts +6 -0
  179. package/dist/execution-engine/node-execution-context/utils/ensure-type.js +75 -0
  180. package/dist/execution-engine/node-execution-context/utils/ensure-type.js.map +1 -0
  181. package/dist/execution-engine/node-execution-context/utils/execution-metadata.d.ts +6 -0
  182. package/dist/execution-engine/node-execution-context/utils/execution-metadata.js +57 -0
  183. package/dist/execution-engine/node-execution-context/utils/execution-metadata.js.map +1 -0
  184. package/dist/execution-engine/node-execution-context/utils/extract-value.d.ts +2 -0
  185. package/dist/execution-engine/node-execution-context/utils/extract-value.js +135 -0
  186. package/dist/execution-engine/node-execution-context/utils/extract-value.js.map +1 -0
  187. package/dist/execution-engine/node-execution-context/utils/file-system-helper-functions.d.ts +2 -0
  188. package/dist/execution-engine/node-execution-context/utils/file-system-helper-functions.js +144 -0
  189. package/dist/execution-engine/node-execution-context/utils/file-system-helper-functions.js.map +1 -0
  190. package/dist/execution-engine/node-execution-context/utils/get-additional-keys.d.ts +4 -0
  191. package/dist/execution-engine/node-execution-context/utils/get-additional-keys.js +57 -0
  192. package/dist/execution-engine/node-execution-context/utils/get-additional-keys.js.map +1 -0
  193. package/dist/execution-engine/node-execution-context/utils/get-input-connection-data.d.ts +5 -0
  194. package/dist/execution-engine/node-execution-context/utils/get-input-connection-data.js +211 -0
  195. package/dist/execution-engine/node-execution-context/utils/get-input-connection-data.js.map +1 -0
  196. package/dist/execution-engine/node-execution-context/utils/get-secrets-proxy.d.ts +2 -0
  197. package/dist/execution-engine/node-execution-context/utils/get-secrets-proxy.js +68 -0
  198. package/dist/execution-engine/node-execution-context/utils/get-secrets-proxy.js.map +1 -0
  199. package/dist/execution-engine/node-execution-context/utils/normalize-items.d.ts +2 -0
  200. package/dist/execution-engine/node-execution-context/utils/normalize-items.js +36 -0
  201. package/dist/execution-engine/node-execution-context/utils/normalize-items.js.map +1 -0
  202. package/dist/execution-engine/node-execution-context/utils/parse-incoming-message.d.ts +16 -0
  203. package/dist/execution-engine/node-execution-context/utils/parse-incoming-message.js +57 -0
  204. package/dist/execution-engine/node-execution-context/utils/parse-incoming-message.js.map +1 -0
  205. package/dist/execution-engine/node-execution-context/utils/request-helper-functions.d.ts +18 -0
  206. package/dist/execution-engine/node-execution-context/utils/request-helper-functions.js +1213 -0
  207. package/dist/execution-engine/node-execution-context/utils/request-helper-functions.js.map +1 -0
  208. package/dist/execution-engine/node-execution-context/utils/return-json-array.d.ts +2 -0
  209. package/dist/execution-engine/node-execution-context/utils/return-json-array.js +19 -0
  210. package/dist/execution-engine/node-execution-context/utils/return-json-array.js.map +1 -0
  211. package/dist/execution-engine/node-execution-context/utils/scheduling-helper-functions.d.ts +2 -0
  212. package/dist/execution-engine/node-execution-context/utils/scheduling-helper-functions.js +22 -0
  213. package/dist/execution-engine/node-execution-context/utils/scheduling-helper-functions.js.map +1 -0
  214. package/dist/execution-engine/node-execution-context/utils/ssh-tunnel-helper-functions.d.ts +2 -0
  215. package/dist/execution-engine/node-execution-context/utils/ssh-tunnel-helper-functions.js +14 -0
  216. package/dist/execution-engine/node-execution-context/utils/ssh-tunnel-helper-functions.js.map +1 -0
  217. package/dist/execution-engine/node-execution-context/utils/validate-value-against-schema.d.ts +2 -0
  218. package/dist/execution-engine/node-execution-context/utils/validate-value-against-schema.js +132 -0
  219. package/dist/execution-engine/node-execution-context/utils/validate-value-against-schema.js.map +1 -0
  220. package/dist/execution-engine/node-execution-context/utils/webhook-helper-functions.d.ts +3 -0
  221. package/dist/execution-engine/node-execution-context/utils/webhook-helper-functions.js +31 -0
  222. package/dist/execution-engine/node-execution-context/utils/webhook-helper-functions.js.map +1 -0
  223. package/dist/execution-engine/node-execution-context/webhook-context.d.ts +21 -0
  224. package/dist/execution-engine/node-execution-context/webhook-context.js +87 -0
  225. package/dist/execution-engine/node-execution-context/webhook-context.js.map +1 -0
  226. package/dist/execution-engine/node-execution-context/workflow-node-context.d.ts +6 -0
  227. package/dist/execution-engine/node-execution-context/workflow-node-context.js +14 -0
  228. package/dist/execution-engine/node-execution-context/workflow-node-context.js.map +1 -0
  229. package/dist/execution-engine/partial-execution-utils/clean-run-data.d.ts +3 -0
  230. package/dist/execution-engine/partial-execution-utils/clean-run-data.js +28 -0
  231. package/dist/execution-engine/partial-execution-utils/clean-run-data.js.map +1 -0
  232. package/dist/execution-engine/partial-execution-utils/directed-graph.d.ts +65 -0
  233. package/dist/execution-engine/partial-execution-utils/directed-graph.js +370 -0
  234. package/dist/execution-engine/partial-execution-utils/directed-graph.js.map +1 -0
  235. package/dist/execution-engine/partial-execution-utils/filter-disabled-nodes.d.ts +2 -0
  236. package/dist/execution-engine/partial-execution-utils/filter-disabled-nodes.js +17 -0
  237. package/dist/execution-engine/partial-execution-utils/filter-disabled-nodes.js.map +1 -0
  238. package/dist/execution-engine/partial-execution-utils/find-start-nodes.d.ts +10 -0
  239. package/dist/execution-engine/partial-execution-utils/find-start-nodes.js +74 -0
  240. package/dist/execution-engine/partial-execution-utils/find-start-nodes.js.map +1 -0
  241. package/dist/execution-engine/partial-execution-utils/find-subgraph.d.ts +7 -0
  242. package/dist/execution-engine/partial-execution-utils/find-subgraph.js +59 -0
  243. package/dist/execution-engine/partial-execution-utils/find-subgraph.js.map +1 -0
  244. package/dist/execution-engine/partial-execution-utils/find-trigger-for-partial-execution.d.ts +4 -0
  245. package/dist/execution-engine/partial-execution-utils/find-trigger-for-partial-execution.js +102 -0
  246. package/dist/execution-engine/partial-execution-utils/find-trigger-for-partial-execution.js.map +1 -0
  247. package/dist/execution-engine/partial-execution-utils/get-incoming-data.d.ts +6 -0
  248. package/dist/execution-engine/partial-execution-utils/get-incoming-data.js +21 -0
  249. package/dist/execution-engine/partial-execution-utils/get-incoming-data.js.map +1 -0
  250. package/dist/execution-engine/partial-execution-utils/get-source-data-groups.d.ts +8 -0
  251. package/dist/execution-engine/partial-execution-utils/get-source-data-groups.js +65 -0
  252. package/dist/execution-engine/partial-execution-utils/get-source-data-groups.js.map +1 -0
  253. package/dist/execution-engine/partial-execution-utils/handle-cycles.d.ts +3 -0
  254. package/dist/execution-engine/partial-execution-utils/handle-cycles.js +60 -0
  255. package/dist/execution-engine/partial-execution-utils/handle-cycles.js.map +1 -0
  256. package/dist/execution-engine/partial-execution-utils/index.d.ts +10 -0
  257. package/dist/execution-engine/partial-execution-utils/index.js +25 -0
  258. package/dist/execution-engine/partial-execution-utils/index.js.map +1 -0
  259. package/dist/execution-engine/partial-execution-utils/recreate-node-execution-stack.d.ts +9 -0
  260. package/dist/execution-engine/partial-execution-utils/recreate-node-execution-stack.js +146 -0
  261. package/dist/execution-engine/partial-execution-utils/recreate-node-execution-stack.js.map +1 -0
  262. package/dist/execution-engine/partial-execution-utils/rewire-graph.d.ts +3 -0
  263. package/dist/execution-engine/partial-execution-utils/rewire-graph.js +72 -0
  264. package/dist/execution-engine/partial-execution-utils/rewire-graph.js.map +1 -0
  265. package/dist/execution-engine/partial-execution-utils/run-data-utils.d.ts +2 -0
  266. package/dist/execution-engine/partial-execution-utils/run-data-utils.js +15 -0
  267. package/dist/execution-engine/partial-execution-utils/run-data-utils.js.map +1 -0
  268. package/dist/execution-engine/requests-response.d.ts +23 -0
  269. package/dist/execution-engine/requests-response.js +128 -0
  270. package/dist/execution-engine/requests-response.js.map +1 -0
  271. package/dist/execution-engine/routing-node.d.ts +17 -0
  272. package/dist/execution-engine/routing-node.js +571 -0
  273. package/dist/execution-engine/routing-node.js.map +1 -0
  274. package/dist/execution-engine/scheduled-task-manager.d.ts +27 -0
  275. package/dist/execution-engine/scheduled-task-manager.js +140 -0
  276. package/dist/execution-engine/scheduled-task-manager.js.map +1 -0
  277. package/dist/execution-engine/ssh-clients-manager.d.ts +27 -0
  278. package/dist/execution-engine/ssh-clients-manager.js +170 -0
  279. package/dist/execution-engine/ssh-clients-manager.js.map +1 -0
  280. package/dist/execution-engine/triggers-and-pollers.d.ts +6 -0
  281. package/dist/execution-engine/triggers-and-pollers.js +66 -0
  282. package/dist/execution-engine/triggers-and-pollers.js.map +1 -0
  283. package/dist/execution-engine/workflow-execute.d.ts +46 -0
  284. package/dist/execution-engine/workflow-execute.js +1490 -0
  285. package/dist/execution-engine/workflow-execute.js.map +1 -0
  286. package/dist/html-sandbox.d.ts +3 -0
  287. package/dist/html-sandbox.js +19 -0
  288. package/dist/html-sandbox.js.map +1 -0
  289. package/dist/http-proxy.d.ts +6 -0
  290. package/dist/http-proxy.js +109 -0
  291. package/dist/http-proxy.js.map +1 -0
  292. package/dist/index.d.ts +17 -0
  293. package/dist/index.js +57 -0
  294. package/dist/index.js.map +1 -0
  295. package/dist/instance-settings/index.d.ts +1 -0
  296. package/dist/instance-settings/index.js +6 -0
  297. package/dist/instance-settings/index.js.map +1 -0
  298. package/dist/instance-settings/instance-settings.d.ts +49 -0
  299. package/dist/instance-settings/instance-settings.js +210 -0
  300. package/dist/instance-settings/instance-settings.js.map +1 -0
  301. package/dist/instance-settings/worker-missing-encryption-key.error.d.ts +4 -0
  302. package/dist/instance-settings/worker-missing-encryption-key.error.js +15 -0
  303. package/dist/instance-settings/worker-missing-encryption-key.error.js.map +1 -0
  304. package/dist/interfaces.d.ts +16 -0
  305. package/dist/interfaces.js +3 -0
  306. package/dist/interfaces.js.map +1 -0
  307. package/dist/node-execute-functions.d.ts +3 -0
  308. package/dist/node-execute-functions.js +12 -0
  309. package/dist/node-execute-functions.js.map +1 -0
  310. package/dist/nodes-loader/constants.d.ts +5 -0
  311. package/dist/nodes-loader/constants.js +106 -0
  312. package/dist/nodes-loader/constants.js.map +1 -0
  313. package/dist/nodes-loader/custom-directory-loader.d.ts +6 -0
  314. package/dist/nodes-loader/custom-directory-loader.js +34 -0
  315. package/dist/nodes-loader/custom-directory-loader.js.map +1 -0
  316. package/dist/nodes-loader/directory-loader.d.ts +41 -0
  317. package/dist/nodes-loader/directory-loader.js +371 -0
  318. package/dist/nodes-loader/directory-loader.js.map +1 -0
  319. package/dist/nodes-loader/index.d.ts +5 -0
  320. package/dist/nodes-loader/index.js +12 -0
  321. package/dist/nodes-loader/index.js.map +1 -0
  322. package/dist/nodes-loader/lazy-package-directory-loader.d.ts +4 -0
  323. package/dist/nodes-loader/lazy-package-directory-loader.js +42 -0
  324. package/dist/nodes-loader/lazy-package-directory-loader.js.map +1 -0
  325. package/dist/nodes-loader/load-class-in-isolation.d.ts +1 -0
  326. package/dist/nodes-loader/load-class-in-isolation.js +20 -0
  327. package/dist/nodes-loader/load-class-in-isolation.js.map +1 -0
  328. package/dist/nodes-loader/package-directory-loader.d.ts +12 -0
  329. package/dist/nodes-loader/package-directory-loader.js +86 -0
  330. package/dist/nodes-loader/package-directory-loader.js.map +1 -0
  331. package/dist/nodes-loader/types.d.ts +14 -0
  332. package/dist/nodes-loader/types.js +3 -0
  333. package/dist/nodes-loader/types.js.map +1 -0
  334. package/dist/utils/assertions.d.ts +2 -0
  335. package/dist/utils/assertions.js +16 -0
  336. package/dist/utils/assertions.js.map +1 -0
  337. package/dist/utils/deep-merge.d.ts +1 -0
  338. package/dist/utils/deep-merge.js +33 -0
  339. package/dist/utils/deep-merge.js.map +1 -0
  340. package/dist/utils/index.d.ts +2 -0
  341. package/dist/utils/index.js +19 -0
  342. package/dist/utils/index.js.map +1 -0
  343. package/dist/utils/is-json-compatible.d.ts +7 -0
  344. package/dist/utils/is-json-compatible.js +81 -0
  345. package/dist/utils/is-json-compatible.js.map +1 -0
  346. package/dist/utils/serialized-buffer.d.ts +6 -0
  347. package/dist/utils/serialized-buffer.js +16 -0
  348. package/dist/utils/serialized-buffer.js.map +1 -0
  349. package/dist/utils/signature-helpers.d.ts +2 -0
  350. package/dist/utils/signature-helpers.js +16 -0
  351. package/dist/utils/signature-helpers.js.map +1 -0
  352. package/package.json +81 -0
@@ -0,0 +1,65 @@
1
+ import type { IConnections, INode, WorkflowParameters, NodeConnectionType } from 'n8n-workflow';
2
+ import { Workflow } from 'n8n-workflow';
3
+ export type GraphConnection = {
4
+ from: INode;
5
+ to: INode;
6
+ type: NodeConnectionType;
7
+ outputIndex: number;
8
+ inputIndex: number;
9
+ };
10
+ type RemoveNodeBaseOptions = {
11
+ reconnectConnections: boolean;
12
+ skipConnectionFn?: (connection: GraphConnection) => boolean;
13
+ };
14
+ export declare class DirectedGraph {
15
+ private nodes;
16
+ private connections;
17
+ hasNode(nodeName: string): boolean;
18
+ getNodes(): Map<string, INode>;
19
+ getNodesByNames(names: string[]): Set<INode>;
20
+ getConnections(filter?: {
21
+ to?: INode;
22
+ }): GraphConnection[];
23
+ addNode(node: INode): this;
24
+ addNodes(...nodes: INode[]): this;
25
+ removeNode(node: INode, options?: {
26
+ reconnectConnections: true;
27
+ } & RemoveNodeBaseOptions): GraphConnection[];
28
+ removeNode(node: INode, options?: {
29
+ reconnectConnections: false;
30
+ } & RemoveNodeBaseOptions): undefined;
31
+ addConnection(connectionInput: {
32
+ from: INode;
33
+ to: INode;
34
+ type?: NodeConnectionType;
35
+ outputIndex?: number;
36
+ inputIndex?: number;
37
+ }): this;
38
+ addConnections(...connectionInputs: Array<{
39
+ from: INode;
40
+ to: INode;
41
+ type?: NodeConnectionType;
42
+ outputIndex?: number;
43
+ inputIndex?: number;
44
+ }>): this;
45
+ getDirectChildConnections(node: INode): GraphConnection[];
46
+ private getChildrenRecursive;
47
+ getChildren(node: INode): Set<INode>;
48
+ getDirectParentConnections(node: INode): GraphConnection[];
49
+ private getParentConnectionsRecursive;
50
+ getParentConnections(node: INode): Set<GraphConnection>;
51
+ getConnection(from: INode, outputIndex: number, type: NodeConnectionType, inputIndex: number, to: INode): GraphConnection | undefined;
52
+ getStronglyConnectedComponents(): Array<Set<INode>>;
53
+ private depthFirstSearchRecursive;
54
+ depthFirstSearch({ from, fn }: {
55
+ from: INode;
56
+ fn: (node: INode) => boolean;
57
+ }): INode | undefined;
58
+ toWorkflow(parameters: Omit<WorkflowParameters, 'nodes' | 'connections'>): Workflow;
59
+ static fromWorkflow(workflow: Workflow): DirectedGraph;
60
+ static fromNodesAndConnections(nodes: INode[], connections: IConnections): DirectedGraph;
61
+ clone(): DirectedGraph;
62
+ private toIConnections;
63
+ private makeKey;
64
+ }
65
+ export {};
@@ -0,0 +1,370 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.DirectedGraph = void 0;
37
+ const a = __importStar(require("assert"));
38
+ const n8n_workflow_1 = require("n8n-workflow");
39
+ class DirectedGraph {
40
+ constructor() {
41
+ this.nodes = new Map();
42
+ this.connections = new Map();
43
+ }
44
+ hasNode(nodeName) {
45
+ return this.nodes.has(nodeName);
46
+ }
47
+ getNodes() {
48
+ return new Map(this.nodes.entries());
49
+ }
50
+ getNodesByNames(names) {
51
+ const nodes = new Set();
52
+ for (const name of names) {
53
+ const node = this.nodes.get(name);
54
+ if (node) {
55
+ nodes.add(node);
56
+ }
57
+ }
58
+ return nodes;
59
+ }
60
+ getConnections(filter = {}) {
61
+ const filteredCopy = [];
62
+ for (const connection of this.connections.values()) {
63
+ const toMatches = filter.to ? connection.to === filter.to : true;
64
+ if (toMatches) {
65
+ filteredCopy.push(connection);
66
+ }
67
+ }
68
+ return filteredCopy;
69
+ }
70
+ addNode(node) {
71
+ this.nodes.set(node.name, node);
72
+ return this;
73
+ }
74
+ addNodes(...nodes) {
75
+ for (const node of nodes) {
76
+ this.addNode(node);
77
+ }
78
+ return this;
79
+ }
80
+ removeNode(node, options = { reconnectConnections: false }) {
81
+ if (options.reconnectConnections) {
82
+ const incomingConnections = this.getDirectParentConnections(node);
83
+ const outgoingConnections = this.getDirectChildConnections(node);
84
+ const newConnections = [];
85
+ for (const incomingConnection of incomingConnections) {
86
+ if (options.skipConnectionFn?.(incomingConnection)) {
87
+ continue;
88
+ }
89
+ for (const outgoingConnection of outgoingConnections) {
90
+ if (options.skipConnectionFn?.(outgoingConnection)) {
91
+ continue;
92
+ }
93
+ const newConnection = {
94
+ ...incomingConnection,
95
+ to: outgoingConnection.to,
96
+ inputIndex: outgoingConnection.inputIndex,
97
+ };
98
+ newConnections.push(newConnection);
99
+ }
100
+ }
101
+ for (const [key, connection] of this.connections.entries()) {
102
+ if (connection.to === node || connection.from === node) {
103
+ this.connections.delete(key);
104
+ }
105
+ }
106
+ for (const newConnection of newConnections) {
107
+ this.connections.set(this.makeKey(newConnection), newConnection);
108
+ }
109
+ this.nodes.delete(node.name);
110
+ return newConnections;
111
+ }
112
+ else {
113
+ for (const [key, connection] of this.connections.entries()) {
114
+ if (connection.to === node || connection.from === node) {
115
+ this.connections.delete(key);
116
+ }
117
+ }
118
+ this.nodes.delete(node.name);
119
+ return;
120
+ }
121
+ }
122
+ addConnection(connectionInput) {
123
+ const { from, to } = connectionInput;
124
+ const fromExists = this.nodes.get(from.name) === from;
125
+ const toExists = this.nodes.get(to.name) === to;
126
+ a.ok(fromExists);
127
+ a.ok(toExists);
128
+ const connection = {
129
+ ...connectionInput,
130
+ type: connectionInput.type ?? n8n_workflow_1.NodeConnectionTypes.Main,
131
+ outputIndex: connectionInput.outputIndex ?? 0,
132
+ inputIndex: connectionInput.inputIndex ?? 0,
133
+ };
134
+ this.connections.set(this.makeKey(connection), connection);
135
+ return this;
136
+ }
137
+ addConnections(...connectionInputs) {
138
+ for (const connectionInput of connectionInputs) {
139
+ this.addConnection(connectionInput);
140
+ }
141
+ return this;
142
+ }
143
+ getDirectChildConnections(node) {
144
+ const nodeExists = this.nodes.get(node.name) === node;
145
+ a.ok(nodeExists);
146
+ const directChildren = [];
147
+ for (const connection of this.connections.values()) {
148
+ if (connection.from !== node) {
149
+ continue;
150
+ }
151
+ directChildren.push(connection);
152
+ }
153
+ return directChildren;
154
+ }
155
+ getChildrenRecursive(node, children) {
156
+ const directChildren = this.getDirectChildConnections(node);
157
+ for (const directChild of directChildren) {
158
+ if (children.has(directChild.to)) {
159
+ continue;
160
+ }
161
+ children.add(directChild.to);
162
+ this.getChildrenRecursive(directChild.to, children);
163
+ }
164
+ return children;
165
+ }
166
+ getChildren(node) {
167
+ return this.getChildrenRecursive(node, new Set());
168
+ }
169
+ getDirectParentConnections(node) {
170
+ const nodeExists = this.nodes.get(node.name) === node;
171
+ a.ok(nodeExists);
172
+ const directParents = [];
173
+ for (const connection of this.connections.values()) {
174
+ if (connection.to !== node) {
175
+ continue;
176
+ }
177
+ directParents.push(connection);
178
+ }
179
+ return directParents;
180
+ }
181
+ getParentConnectionsRecursive(node, connections) {
182
+ const parentConnections = this.getDirectParentConnections(node);
183
+ for (const connection of parentConnections) {
184
+ if (connections.has(connection)) {
185
+ continue;
186
+ }
187
+ connections.add(connection);
188
+ this.getParentConnectionsRecursive(connection.from, connections);
189
+ }
190
+ return connections;
191
+ }
192
+ getParentConnections(node) {
193
+ return this.getParentConnectionsRecursive(node, new Set());
194
+ }
195
+ getConnection(from, outputIndex, type, inputIndex, to) {
196
+ return this.connections.get(this.makeKey({
197
+ from,
198
+ outputIndex,
199
+ type,
200
+ inputIndex,
201
+ to,
202
+ }));
203
+ }
204
+ getStronglyConnectedComponents() {
205
+ let id = 0;
206
+ const visited = new Set();
207
+ const ids = new Map();
208
+ const lowLinkValues = new Map();
209
+ const stack = [];
210
+ const stronglyConnectedComponents = [];
211
+ const followNode = (node) => {
212
+ if (visited.has(node)) {
213
+ return;
214
+ }
215
+ visited.add(node);
216
+ lowLinkValues.set(node, id);
217
+ ids.set(node, id);
218
+ id++;
219
+ stack.push(node);
220
+ const directChildren = this.getDirectChildConnections(node).map((c) => c.to);
221
+ for (const child of directChildren) {
222
+ followNode(child);
223
+ if (stack.includes(child)) {
224
+ const childLowLinkValue = lowLinkValues.get(child);
225
+ const ownLowLinkValue = lowLinkValues.get(node);
226
+ a.ok(childLowLinkValue !== undefined);
227
+ a.ok(ownLowLinkValue !== undefined);
228
+ const lowestLowLinkValue = Math.min(childLowLinkValue, ownLowLinkValue);
229
+ lowLinkValues.set(node, lowestLowLinkValue);
230
+ }
231
+ }
232
+ const ownId = ids.get(node);
233
+ const ownLowLinkValue = lowLinkValues.get(node);
234
+ a.ok(ownId !== undefined);
235
+ a.ok(ownLowLinkValue !== undefined);
236
+ if (ownId === ownLowLinkValue) {
237
+ const scc = new Set();
238
+ let next = stack.at(-1);
239
+ while (next && lowLinkValues.get(next) === ownId) {
240
+ stack.pop();
241
+ scc.add(next);
242
+ next = stack.at(-1);
243
+ }
244
+ if (scc.size > 0) {
245
+ stronglyConnectedComponents.push(scc);
246
+ }
247
+ }
248
+ };
249
+ for (const node of this.nodes.values()) {
250
+ followNode(node);
251
+ }
252
+ return stronglyConnectedComponents;
253
+ }
254
+ depthFirstSearchRecursive(from, fn, seen) {
255
+ if (seen.has(from)) {
256
+ return undefined;
257
+ }
258
+ seen.add(from);
259
+ if (fn(from)) {
260
+ return from;
261
+ }
262
+ for (const childConnection of this.getDirectChildConnections(from)) {
263
+ const found = this.depthFirstSearchRecursive(childConnection.to, fn, seen);
264
+ if (found) {
265
+ return found;
266
+ }
267
+ }
268
+ return undefined;
269
+ }
270
+ depthFirstSearch({ from, fn }) {
271
+ return this.depthFirstSearchRecursive(from, fn, new Set());
272
+ }
273
+ toWorkflow(parameters) {
274
+ return new n8n_workflow_1.Workflow({
275
+ ...parameters,
276
+ nodes: [...this.nodes.values()],
277
+ connections: this.toIConnections(),
278
+ });
279
+ }
280
+ static fromWorkflow(workflow) {
281
+ const graph = new DirectedGraph();
282
+ graph.addNodes(...Object.values(workflow.nodes));
283
+ for (const [fromNodeName, iConnection] of Object.entries(workflow.connectionsBySourceNode)) {
284
+ const from = workflow.getNode(fromNodeName);
285
+ if (!from) {
286
+ continue;
287
+ }
288
+ for (const [outputType, outputs] of Object.entries(iConnection)) {
289
+ for (const [outputIndex, conns] of outputs.entries()) {
290
+ for (const conn of conns ?? []) {
291
+ const { node: toNodeName, type: _inputType, index: inputIndex } = conn;
292
+ const to = workflow.getNode(toNodeName);
293
+ if (!to) {
294
+ continue;
295
+ }
296
+ graph.addConnection({
297
+ from,
298
+ to,
299
+ type: outputType,
300
+ outputIndex,
301
+ inputIndex,
302
+ });
303
+ }
304
+ }
305
+ }
306
+ }
307
+ return graph;
308
+ }
309
+ static fromNodesAndConnections(nodes, connections) {
310
+ const graph = new DirectedGraph();
311
+ graph.addNodes(...nodes);
312
+ const nodeMap = new Map();
313
+ for (const node of nodes) {
314
+ nodeMap.set(node.name, node);
315
+ }
316
+ for (const [fromNodeName, iConnection] of Object.entries(connections)) {
317
+ const from = nodeMap.get(fromNodeName);
318
+ if (!from) {
319
+ continue;
320
+ }
321
+ for (const [outputType, outputs] of Object.entries(iConnection)) {
322
+ for (const [outputIndex, conns] of outputs.entries()) {
323
+ for (const conn of conns ?? []) {
324
+ const { node: toNodeName, type: _inputType, index: inputIndex } = conn;
325
+ const to = nodeMap.get(toNodeName);
326
+ if (!to) {
327
+ continue;
328
+ }
329
+ graph.addConnection({
330
+ from,
331
+ to,
332
+ type: outputType,
333
+ outputIndex,
334
+ inputIndex,
335
+ });
336
+ }
337
+ }
338
+ }
339
+ }
340
+ return graph;
341
+ }
342
+ clone() {
343
+ return new DirectedGraph()
344
+ .addNodes(...this.getNodes().values())
345
+ .addConnections(...this.getConnections().values());
346
+ }
347
+ toIConnections() {
348
+ const result = {};
349
+ for (const connection of this.connections.values()) {
350
+ const { from, to, type, outputIndex, inputIndex } = connection;
351
+ result[from.name] = result[from.name] ?? {
352
+ [type]: [],
353
+ };
354
+ const resultConnection = result[from.name];
355
+ resultConnection[type][outputIndex] = resultConnection[type][outputIndex] ?? [];
356
+ const group = resultConnection[type][outputIndex];
357
+ group.push({
358
+ node: to.name,
359
+ type,
360
+ index: inputIndex,
361
+ });
362
+ }
363
+ return result;
364
+ }
365
+ makeKey(connection) {
366
+ return `${connection.from.name}-${connection.type}-${connection.outputIndex}-${connection.inputIndex}-${connection.to.name}`;
367
+ }
368
+ }
369
+ exports.DirectedGraph = DirectedGraph;
370
+ //# sourceMappingURL=directed-graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directed-graph.js","sourceRoot":"","sources":["../../../src/execution-engine/partial-execution-utils/directed-graph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA4B;AAE5B,+CAA6D;AAqC7D,MAAa,aAAa;IAA1B;QACS,UAAK,GAAuB,IAAI,GAAG,EAAE,CAAC;QAEtC,gBAAW,GAA2C,IAAI,GAAG,EAAE,CAAC;IAuhBzE,CAAC;IArhBA,OAAO,CAAC,QAAgB;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC;IAOD,eAAe,CAAC,KAAe;QAC9B,MAAM,KAAK,GAAe,IAAI,GAAG,EAAE,CAAC;QAEpC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAElC,IAAI,IAAI,EAAE,CAAC;gBACV,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACjB,CAAC;QACF,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;IAED,cAAc,CAAC,SAAyB,EAAE;QACzC,MAAM,YAAY,GAAsB,EAAE,CAAC;QAE3C,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;YACpD,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YAEjE,IAAI,SAAS,EAAE,CAAC;gBACf,YAAY,CAAC,IAAI,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ph } from './directed-graph';
2
+ export declare function filterDisabledNodes(graph: DirectedGraph): DirectedGraph;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.filterDisabledNodes = filterDisabledNodes;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ function filterDisabledNodes(graph) {
6
+ const filteredGraph = graph.clone();
7
+ for (const node of filteredGraph.getNodes().values()) {
8
+ if (node.disabled) {
9
+ filteredGraph.removeNode(node, {
10
+ reconnectConnections: true,
11
+ skipConnectionFn: (c) => c.type !== n8n_workflow_1.NodeConnectionTypes.Main,
12
+ });
13
+ }
14
+ }
15
+ return filteredGraph;
16
+ }
17
+ //# sourceMappingURL=filter-disabled-nodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-disabled-nodes.js","sourceRoot":"","sources":["../../../src/execution-engine/partial-execution-utils/filter-disabled-nodes.ts"],"names":[],"mappings":";;AAIA,kDAaC;AAjBD,+CAAmD;AAInD,SAAgB,mBAAmB,CAAC,KAAoB;IACvD,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IAEpC,KAAK,MAAM,IAAI,IAAI,aAAa,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QACtD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,aAAa,CAAC,UAAU,CAAC,IAAI,EAAE;gBAC9B,oBAAoB,EAAE,IAAI;gBAC1B,gBAAgB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,kCAAmB,CAAC,IAAI;aAC5D,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAED,OAAO,aAAa,CAAC;AACtB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type INode, type IPinData, type IRunData } from 'n8n-workflow';
2
+ import type { DirectedGraph } from './directed-graph';
3
+ export declare function isDirty(node: INode, runData?: IRunData, pinData?: IPinData): boolean;
4
+ export declare function findStartNodes(options: {
5
+ graph: DirectedGraph;
6
+ trigger: INode;
7
+ destination: INode;
8
+ pinData: IPinData;
9
+ runData: IRunData;
10
+ }): Set<INode>;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDirty = isDirty;
4
+ exports.findStartNodes = findStartNodes;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const get_incoming_data_1 = require("./get-incoming-data");
7
+ function isDirty(node, runData = {}, pinData = {}) {
8
+ const propertiesOrOptionsChanged = false;
9
+ if (propertiesOrOptionsChanged) {
10
+ return true;
11
+ }
12
+ const parentNodeGotDisabled = false;
13
+ if (parentNodeGotDisabled) {
14
+ return true;
15
+ }
16
+ const hasAnError = false;
17
+ if (hasAnError) {
18
+ return true;
19
+ }
20
+ const hasPinnedData = pinData[node.name] !== undefined;
21
+ if (hasPinnedData) {
22
+ return false;
23
+ }
24
+ const hasRunData = runData?.[node.name];
25
+ if (hasRunData) {
26
+ return false;
27
+ }
28
+ return true;
29
+ }
30
+ function findStartNodesRecursive(graph, current, destination, runData, pinData, startNodes, seen) {
31
+ const nodeIsDirty = isDirty(current, runData, pinData);
32
+ if (nodeIsDirty) {
33
+ startNodes.add(current);
34
+ return startNodes;
35
+ }
36
+ if (current === destination) {
37
+ startNodes.add(current);
38
+ return startNodes;
39
+ }
40
+ if (current.type === 'n8n-nodes-base.splitInBatches') {
41
+ const nodeRunData = (0, get_incoming_data_1.getIncomingData)(runData, current.name, -1, n8n_workflow_1.NodeConnectionTypes.Main, isALoop(graph, current) ? 0 : 1);
42
+ if (nodeRunData === null || nodeRunData.length === 0) {
43
+ startNodes.add(current);
44
+ return startNodes;
45
+ }
46
+ }
47
+ if (seen.has(current)) {
48
+ return startNodes;
49
+ }
50
+ const outGoingConnections = graph.getDirectChildConnections(current);
51
+ for (const outGoingConnection of outGoingConnections) {
52
+ const nodeRunData = (0, get_incoming_data_1.getIncomingDataFromAnyRun)(runData, outGoingConnection.from.name, outGoingConnection.type, outGoingConnection.outputIndex);
53
+ const hasNoRunData = nodeRunData === null || nodeRunData === undefined || nodeRunData.data.length === 0;
54
+ const hasNoPinnedData = pinData[outGoingConnection.from.name] === undefined;
55
+ if (hasNoRunData && hasNoPinnedData) {
56
+ continue;
57
+ }
58
+ findStartNodesRecursive(graph, outGoingConnection.to, destination, runData, pinData, startNodes, new Set(seen).add(current));
59
+ }
60
+ return startNodes;
61
+ }
62
+ function isALoop(graph, node) {
63
+ return graph.getChildren(node).has(node);
64
+ }
65
+ function findStartNodes(options) {
66
+ const graph = options.graph;
67
+ const trigger = options.trigger;
68
+ const destination = options.destination;
69
+ const runData = { ...options.runData };
70
+ const pinData = options.pinData;
71
+ const startNodes = findStartNodesRecursive(graph, trigger, destination, runData, pinData, new Set(), new Set());
72
+ return startNodes;
73
+ }
74
+ //# sourceMappingURL=find-start-nodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-start-nodes.js","sourceRoot":"","sources":["../../../src/execution-engine/partial-execution-utils/find-start-nodes.ts"],"names":[],"mappings":";;AAYA,0BAmCC;AA+GD,wCA0BC;AAxLD,+CAA6F;AAG7F,2DAAiF;AASjF,SAAgB,OAAO,CAAC,IAAW,EAAE,UAAoB,EAAE,EAAE,UAAoB,EAAE;IAElF,MAAM,0BAA0B,GAAG,KAAK,CAAC;IAEzC,IAAI,0BAA0B,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACb,CAAC;IAGD,MAAM,qBAAqB,GAAG,KAAK,CAAC;IAEpC,IAAI,qBAAqB,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACb,CAAC;IAGD,MAAM,UAAU,GAAG,KAAK,CAAC;IAEzB,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IAEvD,IAAI,aAAa,EAAE,CAAC;QACnB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O,EACP,OAAO,EAEP,IAAI,GAAG,EAAE,EAET,IAAI,GAAG,EAAE,CACT,CAAC;IAEF,OAAO,UAAU,CAAC;AACnB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type INode } from 'n8n-workflow';
2
+ import { DirectedGraph } from './directed-graph';
3
+ export declare function findSubgraph(options: {
4
+ graph: DirectedGraph;
5
+ destination: INode;
6
+ trigger: INode;
7
+ }): DirectedGraph;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findSubgraph = findSubgraph;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const directed_graph_1 = require("./directed-graph");
6
+ function findSubgraphRecursive(graph, destinationNode, current, trigger, newGraph, currentBranch) {
7
+ if (current === trigger) {
8
+ newGraph.addNode(trigger);
9
+ for (const connection of currentBranch) {
10
+ newGraph.addNodes(connection.from, connection.to);
11
+ newGraph.addConnection(connection);
12
+ }
13
+ return;
14
+ }
15
+ const parentConnections = graph.getDirectParentConnections(current);
16
+ if (parentConnections.length === 0) {
17
+ return;
18
+ }
19
+ const isCycleWithDestinationNode = current === destinationNode && currentBranch.some((c) => c.to === destinationNode);
20
+ if (isCycleWithDestinationNode) {
21
+ return;
22
+ }
23
+ const isCycleWithCurrentNode = currentBranch.some((c) => c.to === current);
24
+ if (isCycleWithCurrentNode) {
25
+ for (const connection of currentBranch) {
26
+ newGraph.addNodes(connection.from, connection.to);
27
+ newGraph.addConnection(connection);
28
+ }
29
+ return;
30
+ }
31
+ for (const parentConnection of parentConnections) {
32
+ if (parentConnection.type !== n8n_workflow_1.NodeConnectionTypes.Main) {
33
+ continue;
34
+ }
35
+ findSubgraphRecursive(graph, destinationNode, parentConnection.from, trigger, newGraph, [
36
+ ...currentBranch,
37
+ parentConnection,
38
+ ]);
39
+ }
40
+ }
41
+ function findSubgraph(options) {
42
+ const graph = options.graph;
43
+ const destination = options.destination;
44
+ const trigger = options.trigger;
45
+ const subgraph = new directed_graph_1.DirectedGraph();
46
+ findSubgraphRecursive(graph, destination, destination, trigger, subgraph, []);
47
+ for (const node of subgraph.getNodes().values()) {
48
+ const parentConnections = graph.getParentConnections(node);
49
+ for (const connection of parentConnections) {
50
+ if (connection.type === n8n_workflow_1.NodeConnectionTypes.Main) {
51
+ continue;
52
+ }
53
+ subgraph.addNodes(connection.from, connection.to);
54
+ subgraph.addConnection(connection);
55
+ }
56
+ }
57
+ return subgraph;
58
+ }
59
+ //# sourceMappingURL=find-subgraph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-subgraph.js","sourceRoot":"","sources":["../../../src/execution-engine/partial-execution-utils/find-subgraph.ts"],"names":[],"mappings":";;AAuFA,oCAgCC;AAvHD,+CAA+D;AAG/D,qDAAiD;AAEjD,SAAS,qBAAqB,CAC7B,KAAoB,EACpB,eAAsB,EACtB,OAAc,EACd,OAAc,EACd,QAAuB,EACvB,aAAgC;IAGhC,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QAKzB,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE1B,KAAK,MAAM,UAAU,IAAI,aAAa,EAAE,CAAC;YACxC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;YAClD,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACpC,CAAC;QAED,OAAO;IACR,CAAC;IAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;IAGpE,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpC,OAAO;IACR,CAAC;IAGD,MAAM,0BAA0B,GAC/B,OAAO,KAAK,eAAe,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,eAAe,CAAC,CAAC;IACpF,IAAI,0BAA0B,EAAE,CAAC;QAChC,OAAO;IAC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E,CAAC;YAC5C,IAAI,UAAU,CAAC,IAAI,KAAK,kCAAmB,CAAC,IAAI,EAAE,CAAC;gBAClD,SAAS;YACV,CAAC;YAED,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;YAClD,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACpC,CAAC;IACF,CAAC;IAED,OAAO,QAAQ,CAAC;AACjB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { INode, IRunData, Workflow } from 'n8n-workflow';
2
+ import type { DirectedGraph } from './directed-graph';
3
+ export declare function anyReachableRootHasRunData(workflow: DirectedGraph, destinationNodeName: string, runData: IRunData): boolean;
4
+ export declare function findTriggerForPartialExecution(workflow: Workflow, destinationNodeName: string, runData: IRunData): INode | undefined;