@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
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createNodeAsTool = createNodeAsTool;
4
+ const tools_1 = require("@langchain/core/tools");
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const zod_1 = require("zod");
7
+ function getSchema(node) {
8
+ const collectedArguments = [];
9
+ try {
10
+ (0, n8n_workflow_1.traverseNodeParameters)(node.parameters, collectedArguments);
11
+ }
12
+ catch (error) {
13
+ throw new n8n_workflow_1.NodeOperationError(node, error);
14
+ }
15
+ const nameValidationRegex = /^[a-zA-Z0-9_-]{1,64}$/;
16
+ const keyMap = new Map();
17
+ for (const argument of collectedArguments) {
18
+ if (argument.key.length === 0 || !nameValidationRegex.test(argument.key)) {
19
+ const isEmptyError = 'You must specify a key when using $fromAI()';
20
+ const isInvalidError = `Parameter key \`${argument.key}\` is invalid`;
21
+ const error = new Error(argument.key.length === 0 ? isEmptyError : isInvalidError);
22
+ throw new n8n_workflow_1.NodeOperationError(node, error, {
23
+ description: 'Invalid parameter key, must be between 1 and 64 characters long and only contain letters, numbers, underscores, and hyphens',
24
+ });
25
+ }
26
+ if (keyMap.has(argument.key)) {
27
+ const existingArg = keyMap.get(argument.key);
28
+ if (existingArg.description !== argument.description || existingArg.type !== argument.type) {
29
+ throw new n8n_workflow_1.NodeOperationError(node, `Duplicate key '${argument.key}' found with different description or type`, {
30
+ description: 'Ensure all $fromAI() calls with the same key have consistent descriptions and types',
31
+ });
32
+ }
33
+ }
34
+ else {
35
+ keyMap.set(argument.key, argument);
36
+ }
37
+ }
38
+ const uniqueArgsMap = collectedArguments.reduce((map, arg) => {
39
+ map.set(arg.key, arg);
40
+ return map;
41
+ }, new Map());
42
+ const uniqueArguments = Array.from(uniqueArgsMap.values());
43
+ const schemaObj = uniqueArguments.reduce((acc, placeholder) => {
44
+ acc[placeholder.key] = (0, n8n_workflow_1.generateZodSchema)(placeholder);
45
+ return acc;
46
+ }, {});
47
+ return zod_1.z.object(schemaObj).required();
48
+ }
49
+ function createTool(options) {
50
+ const { node, nodeType, handleToolInvocation } = options;
51
+ const schema = getSchema(node);
52
+ const description = n8n_workflow_1.NodeHelpers.getToolDescriptionForNode(node, nodeType);
53
+ const nodeName = (0, n8n_workflow_1.nodeNameToToolName)(node);
54
+ const name = nodeName || nodeType.description.name;
55
+ return new tools_1.DynamicStructuredTool({
56
+ name,
57
+ description,
58
+ schema,
59
+ func: async (toolArgs) => await handleToolInvocation(toolArgs),
60
+ });
61
+ }
62
+ function createNodeAsTool(options) {
63
+ return { response: createTool(options) };
64
+ }
65
+ //# sourceMappingURL=create-node-as-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-node-as-tool.js","sourceRoot":"","sources":["../../../../src/execution-engine/node-execution-context/utils/create-node-as-tool.ts"],"names":[],"mappings":";;AAoHA,4CAEC;AAtHD,iDAA8D;AAE9D,+CAMsB;AACtB,6BAAwB;AAoBxB,SAAS,SAAS,CAAC,IAAW;IAC7B,MAAM,kBAAkB,GAAqB,EAAE,CAAC;IAChD,IAAI,CAAC;QACJ,IAAA,qCAAsB,EAAC,IAAI,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;IAC7D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,IAAI,iCAAkB,CAAC,IAAI,EAAE,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,EAAE,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { DataTableProxyFunctions, INode, Workflow, IWorkflowExecuteAdditionalData } from 'n8n-workflow';
2
+ export declare function getDataTableHelperFunctions(additionalData: IWorkflowExecuteAdditionalData, workflow: Workflow, node: INode): Partial<DataTableProxyFunctions>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDataTableHelperFunctions = getDataTableHelperFunctions;
4
+ function getDataTableHelperFunctions(additionalData, workflow, node) {
5
+ const dataTableProxyProvider = additionalData['data-table']?.dataTableProxyProvider;
6
+ if (!dataTableProxyProvider)
7
+ return {};
8
+ return {
9
+ getDataTableAggregateProxy: async () => await dataTableProxyProvider.getDataTableAggregateProxy(workflow, node, additionalData.dataTableProjectId),
10
+ getDataTableProxy: async (dataTableId) => await dataTableProxyProvider.getDataTableProxy(workflow, node, dataTableId, additionalData.dataTableProjectId),
11
+ };
12
+ }
13
+ //# sourceMappingURL=data-table-helper-functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table-helper-functions.js","sourceRoot":"","sources":["../../../../src/execution-engine/node-execution-context/utils/data-table-helper-functions.ts"],"names":[],"mappings":";;AAOA,kEAsBC;AAtBD,SAAgB,2BAA2B,CAC1C,cAA8C,EAC9C,QAAkB,EAClB,IAAW;IAEX,MAAM,sBAAsB,GAAG,cAAc,CAAC,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACpF,IAAI,CAAC,sBAAsB;QAAE,OAAO,EAAE,CAAC;IACvC,OAAO;QACN,0BAA0B,EAAE,KAAK,IAAI,EAAE,CACtC,MAAM,sBAAsB,CAAC,0BAA0B,CACtD,QAAQ,EACR,IAAI,EACJ,cAAc,CAAC,kBAAkB,CACjC;QACF,iBAAiB,EAAE,KAAK,EAAE,WAAmB,EAAE,EAAE,CAChD,MAAM,sBAAsB,CAAC,iBAAiB,CAC7C,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,cAAc,CAAC,kBAAkB,CACjC;KACF,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INode, Workflow, DeduplicationHelperFunctions } from 'n8n-workflow';
2
+ export declare const getDeduplicationHelperFunctions: (workflow: Workflow, node: INode) => DeduplicationHelperFunctions;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDeduplicationHelperFunctions = void 0;
4
+ const data_deduplication_service_1 = require("../../../data-deduplication-service");
5
+ async function checkProcessedAndRecord(items, scope, contextData, options) {
6
+ return await data_deduplication_service_1.DataDeduplicationService.getInstance().checkProcessedAndRecord(items, scope, contextData, options);
7
+ }
8
+ async function checkProcessedItemsAndRecord(key, items, scope, contextData, options) {
9
+ return await data_deduplication_service_1.DataDeduplicationService.getInstance().checkProcessedItemsAndRecord(key, items, scope, contextData, options);
10
+ }
11
+ async function removeProcessed(items, scope, contextData, options) {
12
+ return await data_deduplication_service_1.DataDeduplicationService.getInstance().removeProcessed(items, scope, contextData, options);
13
+ }
14
+ async function clearAllProcessedItems(scope, contextData, options) {
15
+ return await data_deduplication_service_1.DataDeduplicationService.getInstance().clearAllProcessedItems(scope, contextData, options);
16
+ }
17
+ async function getProcessedDataCount(scope, contextData, options) {
18
+ return await data_deduplication_service_1.DataDeduplicationService.getInstance().getProcessedDataCount(scope, contextData, options);
19
+ }
20
+ const getDeduplicationHelperFunctions = (workflow, node) => ({
21
+ async checkProcessedAndRecord(items, scope, options) {
22
+ return await checkProcessedAndRecord(items, scope, { node, workflow }, options);
23
+ },
24
+ async checkProcessedItemsAndRecord(propertyName, items, scope, options) {
25
+ return await checkProcessedItemsAndRecord(propertyName, items, scope, { node, workflow }, options);
26
+ },
27
+ async removeProcessed(items, scope, options) {
28
+ return await removeProcessed(items, scope, { node, workflow }, options);
29
+ },
30
+ async clearAllProcessedItems(scope, options) {
31
+ return await clearAllProcessedItems(scope, { node, workflow }, options);
32
+ },
33
+ async getProcessedDataCount(scope, options) {
34
+ return await getProcessedDataCount(scope, { node, workflow }, options);
35
+ },
36
+ });
37
+ exports.getDeduplicationHelperFunctions = getDeduplicationHelperFunctions;
38
+ //# sourceMappingURL=deduplication-helper-functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deduplication-helper-functions.js","sourceRoot":"","sources":["../../../../src/execution-engine/node-execution-context/utils/deduplication-helper-functions.ts"],"names":[],"mappings":";;;AAaA,6EAAwE;AAExE,KAAK,UAAU,uBAAuB,CACrC,KAA+B,EAC/B,KAAyB,EACzB,WAAuC,EACvC,OAA+B;IAE/B,OAAO,MAAM,qDAAwB,CAAC,WAAW,EAAE,CAAC,uBAAuB,CAC1E,KAAK,EACL,KAAK,EACL,WAAW,EACX,OAAO,CACP,CAAC;AACH,CAAC;AAED,KAAK,UAAU,4BAA4B,CAC1C,GAAW,EACX,KAAoB,EACpB,KAAyB,EACzB,WAAuC,EACvC,OAA+B;IAE/B,OAAO,MAAM,qDAAwB,CAAC,WAAW,EAAE,CAAC,4BAA4B,CAC/E,GAAG,EACH,KAAK,EACL,KAAK,EACL,WAAW,EACX,OAAO,CACP,CAAC;AACH,CAAC;AAED,KAAK,UAAU,eAAe,CAC7B,KAA+B,EAC/B,KAAyB,EACzB,WAAuC,EACvC,OAA+B;IAE/B,OAAO,MAAM,qDAAwB,CAAC,WAAW,EAAE,CAAC,eAAe,CAClE,KAAK,EACL,KAAK,EACL,WAAW,EACX,OAAO,CACP,CAAC;AACH,CAAC;AAED,KAAK,UAAU,sBAAsB,CACpC,KAAyB,EACzB,WAAuC,EACvC,OAA+B;IAE/B,OAAO,MAAM,qDAAwB,CAAC,WAAW,EAAE,CAAC,sBAAsB,CACzE,KAAK,EACL,WAAW,EACX,OAAO,CACP,CAAC;AACH,CAAC;AAED,KAAK,UAAU,qBAAqB,CACnC,KAAyB,EACzB,WAAuC,EACvC,OAA+B;IAE/B,OAAO,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TypeOptions, parameterValue: any, parameterName: string, errorOptions?: {
3
+ itemIndex?: number;
4
+ runIndex?: number;
5
+ nodeCause?: string;
6
+ }): string | number | boolean | object;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ensureType = ensureType;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ function ensureType(toType, parameterValue, parameterName, errorOptions) {
6
+ let returnData = parameterValue;
7
+ if (returnData === null) {
8
+ throw new n8n_workflow_1.ExpressionError(`Parameter '${parameterName}' must not be null`, errorOptions);
9
+ }
10
+ if (returnData === undefined) {
11
+ throw new n8n_workflow_1.ExpressionError(`Parameter '${parameterName}' could not be 'undefined'`, errorOptions);
12
+ }
13
+ if (['object', 'array', 'json'].includes(toType)) {
14
+ if (typeof returnData !== 'object') {
15
+ if (typeof returnData === 'string' && returnData.length) {
16
+ try {
17
+ const parsedValue = JSON.parse(returnData);
18
+ returnData = parsedValue;
19
+ }
20
+ catch (error) {
21
+ throw new n8n_workflow_1.ExpressionError(`Parameter '${parameterName}' could not be parsed`, {
22
+ ...errorOptions,
23
+ description: error.message,
24
+ });
25
+ }
26
+ }
27
+ else {
28
+ throw new n8n_workflow_1.ExpressionError(`Parameter '${parameterName}' must be an ${toType}, but we got '${String(parameterValue)}'`, errorOptions);
29
+ }
30
+ }
31
+ else if (toType === 'json') {
32
+ try {
33
+ JSON.stringify(returnData);
34
+ }
35
+ catch (error) {
36
+ throw new n8n_workflow_1.ExpressionError(`Parameter '${parameterName}' is not valid JSON`, {
37
+ ...errorOptions,
38
+ description: error.message,
39
+ });
40
+ }
41
+ }
42
+ if (toType === 'array' && !Array.isArray(returnData)) {
43
+ throw new n8n_workflow_1.ExpressionError(`Parameter '${parameterName}' must be an array, but we got object`, errorOptions);
44
+ }
45
+ }
46
+ try {
47
+ if (toType === 'string') {
48
+ if (typeof returnData === 'object') {
49
+ returnData = JSON.stringify(returnData);
50
+ }
51
+ else {
52
+ returnData = String(returnData);
53
+ }
54
+ }
55
+ if (toType === 'number') {
56
+ returnData = Number(returnData);
57
+ if (Number.isNaN(returnData)) {
58
+ throw new n8n_workflow_1.ExpressionError(`Parameter '${parameterName}' must be a number, but we got '${parameterValue}'`, errorOptions);
59
+ }
60
+ }
61
+ if (toType === 'boolean') {
62
+ returnData = Boolean(returnData);
63
+ }
64
+ }
65
+ catch (error) {
66
+ if (error instanceof n8n_workflow_1.ExpressionError)
67
+ throw error;
68
+ throw new n8n_workflow_1.ExpressionError(`Parameter '${parameterName}' could not be converted to ${toType}`, {
69
+ ...errorOptions,
70
+ description: error.message,
71
+ });
72
+ }
73
+ return returnData;
74
+ }
75
+ //# sourceMappingURL=ensure-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure-type.js","sourceRoot":"","sources":["../../../../src/execution-engine/node-execution-context/utils/ensure-type.ts"],"names":[],"mappings":";;AAGA,gCAmGC;AArGD,+CAA+C;AAE/C,SAAgB,UAAU,CACzB,MAAyB,EAEzB,cAAmB,EACnB,aAAqB,EACrB,YAA4E;IAG5E,IAAI,UAAU,GAAG,cAAc,CAAC;IAEhC,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACzB,MAAM,IAAI,8BAAe,CAAC,cAAc,aAAa,oBAAoB,EAAE,YAAY,CAAC,CAAC;IAC1F,CAAC;IAED,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,IAAI,8BAAe,CACxB,cAAc,aAAa,4BAA4B,EACvD,YAAY,CACZ,CAAC;IACH,CAAC;IAED,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;YAEpC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;gBACzD,IAAI,CAAC;oBAEJ,MAAM,WAAW,GAAG,IAAI,C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AE,CAAC;YACzB,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;YAChC,IAAI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC9B,MAAM,IAAI,8BAAe,CACxB,cAAc,aAAa,mCAAmC,cAAc,GAAG,EAC/E,YAAY,CACZ,CAAC;YACH,CAAC;QACF,CAAC;QAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC;IACF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,IAAI,KAAK,YAAY,8BAAe;YAAE,MAAM,KAAK,CAAC;QAElD,MAAM,IAAI,8BAAe,CAAC,cAAc,aAAa,+BAA+B,MAAM,EAAE,EAAE;YAC7F,GAAG,YAAY;YAEf,WAAW,EAAE,KAAK,CAAC,OAAO;SAC1B,CAAC,CAAC;IACJ,CAAC;IAGD,OAAO,UAAU,CAAC;AACnB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { IRunExecutionData } from 'n8n-workflow';
2
+ export declare const KV_LIMIT = 10;
3
+ export declare function setWorkflowExecutionMetadata(executionData: IRunExecutionData, key: string, value: unknown): void;
4
+ export declare function setAllWorkflowExecutionMetadata(executionData: IRunExecutionData, obj: Record<string, string>): void;
5
+ export declare function getAllWorkflowExecutionMetadata(executionData: IRunExecutionData): Record<string, string>;
6
+ export declare function getWorkflowExecutionMetadata(executionData: IRunExecutionData, key: string): string;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KV_LIMIT = void 0;
4
+ exports.setWorkflowExecutionMetadata = setWorkflowExecutionMetadata;
5
+ exports.setAllWorkflowExecutionMetadata = setAllWorkflowExecutionMetadata;
6
+ exports.getAllWorkflowExecutionMetadata = getAllWorkflowExecutionMetadata;
7
+ exports.getWorkflowExecutionMetadata = getWorkflowExecutionMetadata;
8
+ const n8n_workflow_1 = require("n8n-workflow");
9
+ const invalid_execution_metadata_error_1 = require("../../../errors/invalid-execution-metadata.error");
10
+ exports.KV_LIMIT = 10;
11
+ function setWorkflowExecutionMetadata(executionData, key, value) {
12
+ if (!executionData.resultData.metadata) {
13
+ executionData.resultData.metadata = {};
14
+ }
15
+ if (!(key in executionData.resultData.metadata) &&
16
+ Object.keys(executionData.resultData.metadata).length >= exports.KV_LIMIT) {
17
+ return;
18
+ }
19
+ if (typeof key !== 'string') {
20
+ throw new invalid_execution_metadata_error_1.InvalidExecutionMetadataError('key', key);
21
+ }
22
+ if (key.replace(/[A-Za-z0-9_]/g, '').length !== 0) {
23
+ throw new invalid_execution_metadata_error_1.InvalidExecutionMetadataError('key', key, `Custom date key can only contain characters "A-Za-z0-9_" (key "${key}")`);
24
+ }
25
+ if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'bigint') {
26
+ throw new invalid_execution_metadata_error_1.InvalidExecutionMetadataError('value', key);
27
+ }
28
+ const val = String(value);
29
+ if (key.length > 50) {
30
+ n8n_workflow_1.LoggerProxy.error('Custom data key over 50 characters long. Truncating to 50 characters.');
31
+ }
32
+ if (val.length > 255) {
33
+ n8n_workflow_1.LoggerProxy.error('Custom data value over 512 characters long. Truncating to 512 characters.');
34
+ }
35
+ executionData.resultData.metadata[key.slice(0, 50)] = val.slice(0, 512);
36
+ }
37
+ function setAllWorkflowExecutionMetadata(executionData, obj) {
38
+ const errors = [];
39
+ Object.entries(obj).forEach(([key, value]) => {
40
+ try {
41
+ setWorkflowExecutionMetadata(executionData, key, value);
42
+ }
43
+ catch (e) {
44
+ errors.push(e);
45
+ }
46
+ });
47
+ if (errors.length) {
48
+ throw errors[0];
49
+ }
50
+ }
51
+ function getAllWorkflowExecutionMetadata(executionData) {
52
+ return executionData.resultData.metadata ? { ...executionData.resultData.metadata } : {};
53
+ }
54
+ function getWorkflowExecutionMetadata(executionData, key) {
55
+ return getAllWorkflowExecutionMetadata(executionData)[String(key).slice(0, 50)];
56
+ }
57
+ //# sourceMappingURL=execution-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-metadata.js","sourceRoot":"","sources":["../../../../src/execution-engine/node-execution-context/utils/execution-metadata.ts"],"names":[],"mappings":";;;AAOA,oEAoCC;AAED,0EAeC;AAED,0EAKC;AAED,oEAKC;AAzED,+CAAqD;AAErD,gGAA0F;AAE7E,QAAA,QAAQ,GAAG,EAAE,CAAC;AAE3B,SAAgB,4BAA4B,CAC3C,aAAgC,EAChC,GAAW,EACX,KAAc;IAEd,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxC,aAAa,CAAC,UAAU,CAAC,QAAQ,GAAG,EAAE,CAAC;IACxC,CAAC;IAED,IACC,CAAC,CAAC,GAAG,IAAI,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,IAAI,gBAAQ,EAChE,CAAC;QACF,OAAO;IACR,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,gEAA6B,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACrD,CAAC;IACD,IAAI,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,gEAA6B,CACtC,KAAK,EACL,GAAG,EACH,kEAAkE,GAAG,IAAI,CACzE,CAAC;IACH,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACzF,MAAM,IAAI,gEAA6B,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACvD,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1B,IAAI,GAAG,CA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,CAAC,CAAC,CAAC;AACjF,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type INode, type INodeType, type NodeParameterValueType } from 'n8n-workflow';
2
+ export declare function extractValue(value: NodeParameterValueType | object, parameterName: string, node: INode, nodeType: INodeType, itemIndex?: number): NodeParameterValueType | object;
@@ -0,0 +1,135 @@
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.extractValue = extractValue;
7
+ const get_1 = __importDefault(require("lodash/get"));
8
+ const n8n_workflow_1 = require("n8n-workflow");
9
+ function findPropertyFromParameterName(parameterName, nodeType, node, nodeParameters) {
10
+ let property;
11
+ const paramParts = parameterName.split('.');
12
+ let currentParamPath = '';
13
+ const findProp = (name, options) => {
14
+ return options.find((i) => i.name === name &&
15
+ n8n_workflow_1.NodeHelpers.displayParameterPath(nodeParameters, i, currentParamPath, node, nodeType.description));
16
+ };
17
+ for (const p of paramParts) {
18
+ const param = p.split('[')[0];
19
+ if (!property) {
20
+ property = findProp(param, nodeType.description.properties);
21
+ }
22
+ else if ('options' in property && property.options) {
23
+ property = findProp(param, property.options);
24
+ currentParamPath += `.${param}`;
25
+ }
26
+ else if ('values' in property) {
27
+ property = findProp(param, property.values);
28
+ currentParamPath += `.${param}`;
29
+ }
30
+ else {
31
+ throw new n8n_workflow_1.ApplicationError('Could not find property', { extra: { parameterName } });
32
+ }
33
+ if (!property) {
34
+ throw new n8n_workflow_1.ApplicationError('Could not find property', { extra: { parameterName } });
35
+ }
36
+ }
37
+ if (!property) {
38
+ throw new n8n_workflow_1.ApplicationError('Could not find property', { extra: { parameterName } });
39
+ }
40
+ return property;
41
+ }
42
+ function executeRegexExtractValue(value, regex, parameterName, parameterDisplayName) {
43
+ const extracted = regex.exec(value);
44
+ if (!extracted) {
45
+ throw new n8n_workflow_1.WorkflowOperationError(`ERROR: ${parameterDisplayName} parameter's value is invalid. This is likely because the URL entered is incorrect`);
46
+ }
47
+ if (extracted.length < 2 || extracted.length > 2) {
48
+ throw new n8n_workflow_1.WorkflowOperationError(`Property "${parameterName}" has an invalid extractValue regex "${regex.source}". extractValue expects exactly one group to be returned.`);
49
+ }
50
+ return extracted[1];
51
+ }
52
+ function extractValueRLC(value, property, parameterName) {
53
+ if (typeof value !== 'object' || !value || !('mode' in value) || !('value' in value)) {
54
+ return value;
55
+ }
56
+ const modeProp = (property.modes ?? []).find((i) => i.name === value.mode);
57
+ if (!modeProp) {
58
+ return value.value;
59
+ }
60
+ if (!('extractValue' in modeProp) || !modeProp.extractValue) {
61
+ return value.value;
62
+ }
63
+ if (typeof value.value !== 'string') {
64
+ let typeName = value.value?.constructor.name;
65
+ if (value.value === null) {
66
+ typeName = 'null';
67
+ }
68
+ else if (typeName === undefined) {
69
+ typeName = 'undefined';
70
+ }
71
+ n8n_workflow_1.LoggerProxy.error(`Only strings can be passed to extractValue. Parameter "${parameterName}" passed "${typeName}"`);
72
+ throw new n8n_workflow_1.ApplicationError("ERROR: This parameter's value is invalid. Please enter a valid mode.", { extra: { parameter: property.displayName, modeProp: modeProp.displayName } });
73
+ }
74
+ if (modeProp.extractValue.type !== 'regex') {
75
+ throw new n8n_workflow_1.ApplicationError('Property with unknown `extractValue`', {
76
+ extra: { parameter: parameterName, extractValueType: modeProp.extractValue.type },
77
+ });
78
+ }
79
+ const regex = new RegExp(modeProp.extractValue.regex);
80
+ return executeRegexExtractValue(value.value, regex, parameterName, property.displayName);
81
+ }
82
+ function extractValueFilter(value, property, parameterName, itemIndex) {
83
+ if (!(0, n8n_workflow_1.isFilterValue)(value)) {
84
+ return value;
85
+ }
86
+ if (property.extractValue?.type) {
87
+ throw new n8n_workflow_1.ApplicationError(`Property "${parameterName}" has an invalid extractValue type. Filter parameters only support extractValue: true`, { extra: { parameter: parameterName } });
88
+ }
89
+ return (0, n8n_workflow_1.executeFilter)(value, { itemIndex });
90
+ }
91
+ function extractValueOther(value, property, parameterName) {
92
+ if (!('extractValue' in property) || !property.extractValue) {
93
+ return value;
94
+ }
95
+ if (typeof value !== 'string') {
96
+ let typeName = value?.constructor.name;
97
+ if (value === null) {
98
+ typeName = 'null';
99
+ }
100
+ else if (typeName === undefined) {
101
+ typeName = 'undefined';
102
+ }
103
+ n8n_workflow_1.LoggerProxy.error(`Only strings can be passed to extractValue. Parameter "${parameterName}" passed "${typeName}"`);
104
+ throw new n8n_workflow_1.ApplicationError("This parameter's value is invalid", {
105
+ extra: { parameter: property.displayName },
106
+ });
107
+ }
108
+ if (property.extractValue.type !== 'regex') {
109
+ throw new n8n_workflow_1.ApplicationError('Property with unknown `extractValue`', {
110
+ extra: { parameter: parameterName, extractValueType: property.extractValue.type },
111
+ });
112
+ }
113
+ const regex = new RegExp(property.extractValue.regex);
114
+ return executeRegexExtractValue(value, regex, parameterName, property.displayName);
115
+ }
116
+ function extractValue(value, parameterName, node, nodeType, itemIndex = 0) {
117
+ let property;
118
+ try {
119
+ property = findPropertyFromParameterName(parameterName, nodeType, node, node.parameters);
120
+ if (!('type' in property)) {
121
+ return value;
122
+ }
123
+ if (property.type === 'resourceLocator') {
124
+ return extractValueRLC(value, property, parameterName);
125
+ }
126
+ else if (property.type === 'filter') {
127
+ return extractValueFilter(value, property, parameterName, itemIndex);
128
+ }
129
+ return extractValueOther(value, property, parameterName);
130
+ }
131
+ catch (error) {
132
+ throw new n8n_workflow_1.NodeOperationError(node, error, { description: (0, get_1.default)(error, 'description') });
133
+ }
134
+ }
135
+ //# sourceMappingURL=extract-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-value.js","sourceRoot":"","sources":["../../../../src/execution-engine/node-execution-context/utils/extract-value.ts"],"names":[],"mappings":";;;;;AA0LA,oCA0BC;AApND,qDAA6B;AAC7B,+CAesB;AAEtB,SAAS,6BAA6B,CACrC,aAAqB,EACrB,QAAmB,EACnB,IAAW,EACX,cAA+B;IAE/B,IAAI,QAAsF,CAAC;IAC3F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+ import type { FileSystemHelperFunctions, INode } from 'n8n-workflow';
2
+ export declare const getFileSystemHelperFunctions: (node: INode) => FileSystemHelperFunctions;
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFileSystemHelperFunctions = void 0;
4
+ const backend_common_1 = require("@n8n/backend-common");
5
+ const config_1 = require("@n8n/config");
6
+ const di_1 = require("@n8n/di");
7
+ const n8n_workflow_1 = require("n8n-workflow");
8
+ const node_fs_1 = require("node:fs");
9
+ const promises_1 = require("node:fs/promises");
10
+ const node_os_1 = require("node:os");
11
+ const node_path_1 = require("node:path");
12
+ const constants_1 = require("../../../constants");
13
+ const instance_settings_1 = require("../../../instance-settings");
14
+ const getAllowedPaths = () => {
15
+ const { restrictFileAccessTo } = di_1.Container.get(config_1.SecurityConfig);
16
+ if (restrictFileAccessTo === '')
17
+ return [];
18
+ const allowedPaths = restrictFileAccessTo
19
+ .split(';')
20
+ .map((path) => path.trim())
21
+ .filter((path) => path)
22
+ .map((path) => (path.startsWith('~') ? path.replace('~', (0, node_os_1.homedir)()) : path));
23
+ return allowedPaths;
24
+ };
25
+ async function resolvePath(path) {
26
+ try {
27
+ return (await (0, promises_1.realpath)(path));
28
+ }
29
+ catch (error) {
30
+ if (error instanceof Error && 'code' in error && error.code === 'ENOENT') {
31
+ return (0, node_path_1.resolve)(path.toString());
32
+ }
33
+ throw error;
34
+ }
35
+ }
36
+ function isFilePatternBlocked(resolvedFilePath) {
37
+ const { blockFilePatterns } = di_1.Container.get(config_1.SecurityConfig);
38
+ return blockFilePatterns
39
+ .split(';')
40
+ .map((pattern) => pattern.trim())
41
+ .filter((pattern) => pattern)
42
+ .some((pattern) => {
43
+ try {
44
+ return new RegExp(pattern, 'mi').test(resolvedFilePath);
45
+ }
46
+ catch {
47
+ return true;
48
+ }
49
+ });
50
+ }
51
+ function isFilePathBlocked(resolvedFilePath) {
52
+ const allowedPaths = getAllowedPaths();
53
+ const blockFileAccessToN8nFiles = process.env[constants_1.BLOCK_FILE_ACCESS_TO_N8N_FILES] !== 'false';
54
+ const restrictedPaths = blockFileAccessToN8nFiles ? getN8nRestrictedPaths() : [];
55
+ if (restrictedPaths.some((restrictedPath) => (0, backend_common_1.isContainedWithin)(restrictedPath, resolvedFilePath))) {
56
+ return true;
57
+ }
58
+ if (isFilePatternBlocked(resolvedFilePath)) {
59
+ return true;
60
+ }
61
+ if (allowedPaths.length) {
62
+ return !allowedPaths.some((allowedPath) => (0, backend_common_1.isContainedWithin)(allowedPath, resolvedFilePath));
63
+ }
64
+ return false;
65
+ }
66
+ const getFileSystemHelperFunctions = (node) => ({
67
+ async createReadStream(resolvedFilePath) {
68
+ if (isFilePathBlocked(resolvedFilePath)) {
69
+ const allowedPaths = getAllowedPaths();
70
+ const message = allowedPaths.length ? ` Allowed paths: ${allowedPaths.join(', ')}` : '';
71
+ throw new n8n_workflow_1.NodeOperationError(node, `Access to the file is not allowed.${message}`, {
72
+ level: 'warning',
73
+ });
74
+ }
75
+ try {
76
+ await (0, promises_1.access)(resolvedFilePath);
77
+ }
78
+ catch (error) {
79
+ throw error.code === 'ENOENT'
80
+ ?
81
+ new n8n_workflow_1.NodeOperationError(node, error, {
82
+ message: `The file "${String(resolvedFilePath)}" could not be accessed.`,
83
+ level: 'warning',
84
+ })
85
+ : error;
86
+ }
87
+ const stream = (0, node_fs_1.createReadStream)(resolvedFilePath, {
88
+ flags: (node_fs_1.constants.O_RDONLY | node_fs_1.constants.O_NOFOLLOW),
89
+ });
90
+ return await new Promise((resolve, reject) => {
91
+ stream.once('error', (error) => {
92
+ if (error.code === 'ELOOP') {
93
+ reject(new n8n_workflow_1.NodeOperationError(node, error, {
94
+ level: 'warning',
95
+ description: 'Symlinks are not allowed.',
96
+ }));
97
+ }
98
+ else {
99
+ reject(error);
100
+ }
101
+ });
102
+ stream.once('open', () => resolve(stream));
103
+ });
104
+ },
105
+ getStoragePath() {
106
+ return (0, backend_common_1.safeJoinPath)(di_1.Container.get(instance_settings_1.InstanceSettings).n8nFolder, `storage/${node.type}`);
107
+ },
108
+ async writeContentToFile(resolvedFilePath, content, flag) {
109
+ if (isFilePathBlocked(resolvedFilePath)) {
110
+ throw new n8n_workflow_1.NodeOperationError(node, `The file "${String(resolvedFilePath)}" is not writable.`, {
111
+ level: 'warning',
112
+ });
113
+ }
114
+ return await (0, promises_1.writeFile)(resolvedFilePath, content, {
115
+ encoding: 'binary',
116
+ flag: (flag ?? 0) | node_fs_1.constants.O_NOFOLLOW,
117
+ });
118
+ },
119
+ resolvePath,
120
+ isFilePathBlocked,
121
+ });
122
+ exports.getFileSystemHelperFunctions = getFileSystemHelperFunctions;
123
+ function getN8nRestrictedPaths() {
124
+ const { n8nFolder, staticCacheDir } = di_1.Container.get(instance_settings_1.InstanceSettings);
125
+ const restrictedPaths = [n8nFolder, staticCacheDir];
126
+ if (process.env[constants_1.CONFIG_FILES]) {
127
+ restrictedPaths.push(...process.env[constants_1.CONFIG_FILES].split(','));
128
+ }
129
+ if (process.env[constants_1.CUSTOM_EXTENSION_ENV]) {
130
+ const customExtensionFolders = process.env[constants_1.CUSTOM_EXTENSION_ENV].split(';');
131
+ restrictedPaths.push(...customExtensionFolders);
132
+ }
133
+ if (process.env[constants_1.BINARY_DATA_STORAGE_PATH]) {
134
+ restrictedPaths.push(process.env[constants_1.BINARY_DATA_STORAGE_PATH]);
135
+ }
136
+ if (process.env[constants_1.UM_EMAIL_TEMPLATES_INVITE]) {
137
+ restrictedPaths.push(process.env[constants_1.UM_EMAIL_TEMPLATES_INVITE]);
138
+ }
139
+ if (process.env[constants_1.UM_EMAIL_TEMPLATES_PWRESET]) {
140
+ restrictedPaths.push(process.env[constants_1.UM_EMAIL_TEMPLATES_PWRESET]);
141
+ }
142
+ return restrictedPaths;
143
+ }
144
+ //# sourceMappingURL=file-system-helper-functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system-helper-functions.js","sourceRoot":"","sources":["../../../../src/execution-engine/node-execution-context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AAG,CAAC,wBAAY,CAAC,EAAE,CAAC;QAC/B,eAAe,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAY,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,gCAAoB,CAAC,EAAE,CAAC;QACvC,MAAM,sBAAsB,GAAG,OAAO,CAAC,GAAG,CAAC,gCAAoB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5E,eAAe,CAAC,IAAI,CAAC,GAAG,sBAAsB,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,oCAAwB,CAAC,EAAE,CAAC;QAC3C,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAwB,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,qCAAyB,CAAC,EAAE,CAAC;QAC5C,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qCAAyB,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,sCAA0B,CAAC,EAAE,CAAC;QAC7C,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sCAA0B,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,eAAe,CAAC;AACxB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { IRunExecutionData, IWorkflowDataProxyAdditionalKeys, IWorkflowExecuteAdditionalData, WorkflowExecuteMode } from 'n8n-workflow';
2
+ export declare function getAdditionalKeys(additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, runExecutionData: IRunExecutionData | null, options?: {
3
+ secretsEnabled?: boolean;
4
+ }): IWorkflowDataProxyAdditionalKeys;