@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,371 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.DirectoryLoader = void 0;
40
+ const backend_common_1 = require("@n8n/backend-common");
41
+ const di_1 = require("@n8n/di");
42
+ const uniqBy_1 = __importDefault(require("lodash/uniqBy"));
43
+ const n8n_workflow_1 = require("n8n-workflow");
44
+ const node_fs_1 = require("node:fs");
45
+ const path = __importStar(require("path"));
46
+ const unrecognized_credential_type_error_1 = require("../errors/unrecognized-credential-type.error");
47
+ const unrecognized_node_type_error_1 = require("../errors/unrecognized-node-type.error");
48
+ const constants_1 = require("./constants");
49
+ const load_class_in_isolation_1 = require("./load-class-in-isolation");
50
+ function toJSON() {
51
+ return {
52
+ ...this,
53
+ authenticate: typeof this.authenticate === 'function' ? {} : this.authenticate,
54
+ };
55
+ }
56
+ class DirectoryLoader {
57
+ constructor(directory, excludeNodes = [], includeNodes = []) {
58
+ this.directory = directory;
59
+ this.excludeNodes = excludeNodes;
60
+ this.includeNodes = includeNodes;
61
+ this.isLazyLoaded = false;
62
+ this.loadedNodes = [];
63
+ this.nodeTypes = {};
64
+ this.credentialTypes = {};
65
+ this.known = { nodes: {}, credentials: {} };
66
+ this.types = { nodes: [], credentials: [] };
67
+ this.nodesByCredential = {};
68
+ this.logger = di_1.Container.get(backend_common_1.Logger);
69
+ this.removeNonIncludedNodes = false;
70
+ try {
71
+ this.directory = (0, node_fs_1.realpathSync)(directory);
72
+ }
73
+ catch (error) {
74
+ if (error.code !== 'ENOENT')
75
+ throw error;
76
+ }
77
+ this.removeNonIncludedNodes = this.includeNodes.length > 0;
78
+ }
79
+ reset() {
80
+ this.unloadAll();
81
+ this.loadedNodes = [];
82
+ this.nodeTypes = {};
83
+ this.credentialTypes = {};
84
+ this.known = { nodes: {}, credentials: {} };
85
+ this.types = { nodes: [], credentials: [] };
86
+ }
87
+ resolvePath(file) {
88
+ return path.resolve(this.directory, file);
89
+ }
90
+ extractNodeTypes(fullNodeTypes, packageName) {
91
+ return fullNodeTypes
92
+ .map((fullNodeType) => fullNodeType.split('.'))
93
+ .filter(([pkg]) => pkg === packageName)
94
+ .map(([_, nodeType]) => nodeType);
95
+ }
96
+ loadClass(sourcePath) {
97
+ const filePath = this.resolvePath(sourcePath);
98
+ const [className] = path.parse(sourcePath).name.split('.');
99
+ try {
100
+ return (0, load_class_in_isolation_1.loadClassInIsolation)(filePath, className);
101
+ }
102
+ catch (error) {
103
+ throw error instanceof TypeError
104
+ ? new n8n_workflow_1.ApplicationError('Class could not be found. Please check if the class is named correctly.', { extra: { className } })
105
+ : error;
106
+ }
107
+ }
108
+ loadNodeFromFile(filePath, packageVersion) {
109
+ const tempNode = this.loadClass(filePath);
110
+ this.addCodex(tempNode, filePath);
111
+ const nodeType = tempNode.description.name;
112
+ if (this.removeNonIncludedNodes && !this.includeNodes.includes(nodeType)) {
113
+ return;
114
+ }
115
+ if (this.excludeNodes.includes(nodeType)) {
116
+ return;
117
+ }
118
+ this.fixIconPaths(tempNode.description, filePath);
119
+ let nodeVersion = 1;
120
+ if ('nodeVersions' in tempNode) {
121
+ for (const versionNode of Object.values(tempNode.nodeVersions)) {
122
+ this.fixIconPaths(versionNode.description, filePath);
123
+ }
124
+ for (const version of Object.values(tempNode.nodeVersions)) {
125
+ version.description.communityNodePackageVersion = packageVersion;
126
+ this.addLoadOptionsMethods(version);
127
+ this.applySpecialNodeParameters(version);
128
+ }
129
+ const currentVersionNode = tempNode.nodeVersions[tempNode.currentVersion];
130
+ this.addCodex(currentVersionNode, filePath);
131
+ nodeVersion = tempNode.currentVersion;
132
+ if (currentVersionNode.hasOwnProperty('executeSingle')) {
133
+ throw new n8n_workflow_1.ApplicationError('"executeSingle" has been removed. Please update the code of this node to use "execute" instead.', { extra: { nodeType } });
134
+ }
135
+ }
136
+ else {
137
+ tempNode.description.communityNodePackageVersion = packageVersion;
138
+ this.addLoadOptionsMethods(tempNode);
139
+ this.applySpecialNodeParameters(tempNode);
140
+ nodeVersion = Array.isArray(tempNode.description.version)
141
+ ? tempNode.description.version.slice(-1)[0]
142
+ : tempNode.description.version;
143
+ }
144
+ this.known.nodes[nodeType] = {
145
+ className: tempNode.constructor.name,
146
+ sourcePath: filePath,
147
+ };
148
+ this.nodeTypes[nodeType] = {
149
+ type: tempNode,
150
+ sourcePath: filePath,
151
+ };
152
+ this.loadedNodes.push({
153
+ name: nodeType,
154
+ version: nodeVersion,
155
+ });
156
+ this.getVersionedNodeTypeAll(tempNode).forEach(({ description }) => {
157
+ this.types.nodes.push(description);
158
+ });
159
+ for (const credential of this.getCredentialsForNode(tempNode)) {
160
+ if (!this.nodesByCredential[credential.name]) {
161
+ this.nodesByCredential[credential.name] = [];
162
+ }
163
+ this.nodesByCredential[credential.name].push(nodeType);
164
+ }
165
+ }
166
+ getNode(nodeType) {
167
+ const { nodeTypes, known: { nodes: knownNodes }, } = this;
168
+ if (!(nodeType in nodeTypes) && nodeType in knownNodes) {
169
+ const { sourcePath } = knownNodes[nodeType];
170
+ this.loadNodeFromFile(sourcePath);
171
+ }
172
+ if (nodeType in nodeTypes) {
173
+ return nodeTypes[nodeType];
174
+ }
175
+ throw new unrecognized_node_type_error_1.UnrecognizedNodeTypeError(this.packageName, nodeType);
176
+ }
177
+ loadCredentialFromFile(filePath) {
178
+ const tempCredential = this.loadClass(filePath);
179
+ Object.assign(tempCredential, { toJSON });
180
+ this.fixIconPaths(tempCredential, filePath);
181
+ const credentialType = tempCredential.name;
182
+ this.known.credentials[credentialType] = {
183
+ className: tempCredential.constructor.name,
184
+ sourcePath: filePath,
185
+ extends: tempCredential.extends,
186
+ supportedNodes: this.nodesByCredential[credentialType],
187
+ };
188
+ this.credentialTypes[credentialType] = {
189
+ type: tempCredential,
190
+ sourcePath: filePath,
191
+ };
192
+ if (this.isLazyLoaded)
193
+ return;
194
+ this.types.credentials.push(tempCredential);
195
+ }
196
+ getCredential(credentialType) {
197
+ const { credentialTypes, known: { credentials: knownCredentials }, } = this;
198
+ if (!(credentialType in credentialTypes) && credentialType in knownCredentials) {
199
+ const { sourcePath } = knownCredentials[credentialType];
200
+ this.loadCredentialFromFile(sourcePath);
201
+ }
202
+ if (credentialType in credentialTypes) {
203
+ return credentialTypes[credentialType];
204
+ }
205
+ throw new unrecognized_credential_type_error_1.UnrecognizedCredentialTypeError(credentialType);
206
+ }
207
+ getCredentialsForNode(object) {
208
+ if ('nodeVersions' in object) {
209
+ const credentials = Object.values(object.nodeVersions).flatMap(({ description }) => description.credentials ?? []);
210
+ return (0, uniqBy_1.default)(credentials, 'name');
211
+ }
212
+ return object.description.credentials ?? [];
213
+ }
214
+ getVersionedNodeTypeAll(object) {
215
+ if ('nodeVersions' in object) {
216
+ const nodeVersions = Object.values(object.nodeVersions).map((element) => {
217
+ element.description.name = object.description.name;
218
+ element.description.codex = object.description.codex;
219
+ return element;
220
+ });
221
+ return (0, uniqBy_1.default)(nodeVersions.reverse(), (node) => {
222
+ const { version } = node.description;
223
+ return Array.isArray(version) ? version.join(',') : version.toString();
224
+ });
225
+ }
226
+ return [object];
227
+ }
228
+ getCodex(filePath) {
229
+ const codexFilePath = this.resolvePath(`${filePath}on`);
230
+ const { categories, subcategories, resources: { primaryDocumentation, credentialDocumentation }, alias, } = module.require(codexFilePath);
231
+ return {
232
+ ...(categories && { categories }),
233
+ ...(subcategories && { subcategories }),
234
+ ...(alias && { alias }),
235
+ resources: {
236
+ primaryDocumentation,
237
+ credentialDocumentation,
238
+ },
239
+ };
240
+ }
241
+ addCodex(node, filePath) {
242
+ const isCustom = this.packageName === 'CUSTOM';
243
+ try {
244
+ let codex;
245
+ if (!isCustom) {
246
+ codex = node.description.codex;
247
+ }
248
+ if (codex === undefined) {
249
+ codex = this.getCodex(filePath);
250
+ }
251
+ if (isCustom) {
252
+ codex.categories = codex.categories
253
+ ? codex.categories.concat(constants_1.CUSTOM_NODES_CATEGORY)
254
+ : [constants_1.CUSTOM_NODES_CATEGORY];
255
+ }
256
+ node.description.codex = codex;
257
+ }
258
+ catch {
259
+ this.logger.debug(`No codex available for: ${node.description.name}`);
260
+ if (isCustom) {
261
+ node.description.codex = {
262
+ categories: [constants_1.CUSTOM_NODES_CATEGORY],
263
+ };
264
+ }
265
+ }
266
+ }
267
+ addLoadOptionsMethods(node) {
268
+ if (node?.methods?.loadOptions) {
269
+ node.description.__loadOptionsMethods = Object.keys(node.methods.loadOptions);
270
+ }
271
+ }
272
+ applySpecialNodeParameters(nodeType) {
273
+ const { properties, polling, supportsCORS } = nodeType.description;
274
+ if (polling) {
275
+ properties.unshift(...constants_1.commonPollingParameters);
276
+ }
277
+ if (nodeType.webhook && supportsCORS) {
278
+ const optionsProperty = properties.find(({ name }) => name === 'options');
279
+ if (optionsProperty)
280
+ optionsProperty.options = [
281
+ ...constants_1.commonCORSParameters,
282
+ ...optionsProperty.options,
283
+ ];
284
+ else
285
+ properties.push(...constants_1.commonCORSParameters);
286
+ }
287
+ DirectoryLoader.applyDeclarativeNodeOptionParameters(nodeType);
288
+ }
289
+ getIconPath(icon, filePath) {
290
+ const iconPath = path.join(path.dirname(filePath), icon.replace('file:', ''));
291
+ if (!(0, backend_common_1.isContainedWithin)(this.directory, path.join(this.directory, iconPath))) {
292
+ throw new n8n_workflow_1.UnexpectedError(`Icon path "${iconPath}" is not contained within the package directory "${this.directory}"`);
293
+ }
294
+ return `icons/${this.packageName}/${iconPath}`;
295
+ }
296
+ fixIconPaths(obj, filePath) {
297
+ const { icon } = obj;
298
+ if (!icon)
299
+ return;
300
+ const hasExpression = typeof icon === 'string'
301
+ ? (0, n8n_workflow_1.isExpression)(icon)
302
+ : (0, n8n_workflow_1.isExpression)(icon.light) || (0, n8n_workflow_1.isExpression)(icon.dark);
303
+ if (hasExpression) {
304
+ obj.iconBasePath = `icons/${this.packageName}/${path.dirname(filePath)}`;
305
+ return;
306
+ }
307
+ const processIconPath = (iconValue) => iconValue.startsWith('file:') ? this.getIconPath(iconValue, filePath) : null;
308
+ let iconUrl;
309
+ if (typeof icon === 'string') {
310
+ iconUrl = processIconPath(icon);
311
+ }
312
+ else {
313
+ const light = processIconPath(icon.light);
314
+ const dark = processIconPath(icon.dark);
315
+ iconUrl = light && dark ? { light, dark } : null;
316
+ }
317
+ if (iconUrl) {
318
+ obj.iconUrl = iconUrl;
319
+ obj.icon = undefined;
320
+ }
321
+ }
322
+ static applyDeclarativeNodeOptionParameters(nodeType) {
323
+ if (!!nodeType.execute ||
324
+ !!nodeType.trigger ||
325
+ !!nodeType.webhook ||
326
+ !!nodeType.description.polling ||
327
+ (0, n8n_workflow_1.isSubNodeType)(nodeType.description)) {
328
+ return;
329
+ }
330
+ const parameters = nodeType.description.properties;
331
+ if (!parameters) {
332
+ return;
333
+ }
334
+ const existingRequestOptionsIndex = parameters.findIndex((parameter) => parameter.name === 'requestOptions');
335
+ if (existingRequestOptionsIndex !== -1) {
336
+ parameters[existingRequestOptionsIndex] = {
337
+ ...constants_1.commonDeclarativeNodeOptionParameters,
338
+ options: [
339
+ ...(constants_1.commonDeclarativeNodeOptionParameters.options ?? []),
340
+ ...(parameters[existingRequestOptionsIndex]?.options ?? []),
341
+ ],
342
+ };
343
+ const options = parameters[existingRequestOptionsIndex]?.options;
344
+ if (options) {
345
+ options.sort((a, b) => {
346
+ if ('displayName' in a && 'displayName' in b) {
347
+ if (a.displayName < b.displayName) {
348
+ return -1;
349
+ }
350
+ if (a.displayName > b.displayName) {
351
+ return 1;
352
+ }
353
+ }
354
+ return 0;
355
+ });
356
+ }
357
+ }
358
+ else {
359
+ parameters.push(constants_1.commonDeclarativeNodeOptionParameters);
360
+ }
361
+ return;
362
+ }
363
+ unloadAll() {
364
+ const filesToUnload = Object.keys(require.cache).filter((filePath) => filePath.startsWith(this.directory));
365
+ filesToUnload.forEach((filePath) => {
366
+ delete require.cache[filePath];
367
+ });
368
+ }
369
+ }
370
+ exports.DirectoryLoader = DirectoryLoader;
371
+ //# sourceMappingURL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EAAE,CAAC;wBAC9C,IAAI,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;4BACnC,OAAO,CAAC,CAAC,CAAC;wBACX,CAAC;wBACD,IAAI,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;4BACnC,OAAO,CAAC,CAAC;wBACV,CAAC;oBACF,CAAC;oBAED,OAAO,CAAC,CAAC;gBACV,CAAC,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;aAAM,CAAC;YACP,UAAU,CAAC,IAAI,CAAC,iDAAqC,CAAC,CAAC;QACxD,CAAC;QAED,OAAO;IACR,CAAC;IAEO,SAAS;QAChB,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CACpE,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CACnC,CAAC;QACF,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YAClC,OAAO,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AA/bD,0CA+bC"}
@@ -0,0 +1,5 @@
1
+ export { DirectoryLoader, type Types } from './directory-loader';
2
+ export { CustomDirectoryLoader } from './custom-directory-loader';
3
+ export { PackageDirectoryLoader } from './package-directory-loader';
4
+ export { LazyPackageDirectoryLoader } from './lazy-package-directory-loader';
5
+ export type { n8n } from './types';
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LazyPackageDirectoryLoader = exports.PackageDirectoryLoader = exports.CustomDirectoryLoader = exports.DirectoryLoader = void 0;
4
+ var directory_loader_1 = require("./directory-loader");
5
+ Object.defineProperty(exports, "DirectoryLoader", { enumerable: true, get: function () { return directory_loader_1.DirectoryLoader; } });
6
+ var custom_directory_loader_1 = require("./custom-directory-loader");
7
+ Object.defineProperty(exports, "CustomDirectoryLoader", { enumerable: true, get: function () { return custom_directory_loader_1.CustomDirectoryLoader; } });
8
+ var package_directory_loader_1 = require("./package-directory-loader");
9
+ Object.defineProperty(exports, "PackageDirectoryLoader", { enumerable: true, get: function () { return package_directory_loader_1.PackageDirectoryLoader; } });
10
+ var lazy_package_directory_loader_1 = require("./lazy-package-directory-loader");
11
+ Object.defineProperty(exports, "LazyPackageDirectoryLoader", { enumerable: true, get: function () { return lazy_package_directory_loader_1.LazyPackageDirectoryLoader; } });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodes-loader/index.ts"],"names":[],"mappings":";;;AAAA,uDAAiE;AAAxD,mHAAA,eAAe,OAAA;AACxB,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA;AAC9B,uEAAoE;AAA3D,kIAAA,sBAAsB,OAAA;AAC/B,iFAA6E;AAApE,2IAAA,0BAA0B,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { PackageDirectoryLoader } from './package-directory-loader';
2
+ export declare class LazyPackageDirectoryLoader extends PackageDirectoryLoader {
3
+ loadAll(): Promise<void>;
4
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LazyPackageDirectoryLoader = void 0;
4
+ const package_directory_loader_1 = require("./package-directory-loader");
5
+ class LazyPackageDirectoryLoader extends package_directory_loader_1.PackageDirectoryLoader {
6
+ async loadAll() {
7
+ try {
8
+ this.known.nodes = await this.readJSON('dist/known/nodes.json');
9
+ this.known.credentials = await this.readJSON('dist/known/credentials.json');
10
+ this.types.nodes = await this.readJSON('dist/types/nodes.json');
11
+ this.types.credentials = await this.readJSON('dist/types/credentials.json');
12
+ if (this.removeNonIncludedNodes) {
13
+ const allowedNodes = {};
14
+ for (const nodeType of this.includeNodes) {
15
+ if (nodeType in this.known.nodes) {
16
+ allowedNodes[nodeType] = this.known.nodes[nodeType];
17
+ }
18
+ }
19
+ this.known.nodes = allowedNodes;
20
+ this.types.nodes = this.types.nodes.filter((nodeType) => this.includeNodes.includes(nodeType.name));
21
+ }
22
+ if (this.excludeNodes.length) {
23
+ for (const nodeType of this.excludeNodes) {
24
+ delete this.known.nodes[nodeType];
25
+ }
26
+ this.types.nodes = this.types.nodes.filter((nodeType) => !this.excludeNodes.includes(nodeType.name));
27
+ }
28
+ this.logger.debug(`Lazy-loading nodes and credentials from ${this.packageJson.name}`, {
29
+ nodes: this.types.nodes?.length ?? 0,
30
+ credentials: this.types.credentials?.length ?? 0,
31
+ });
32
+ this.isLazyLoaded = true;
33
+ return;
34
+ }
35
+ catch {
36
+ this.logger.debug("Can't enable lazy-loading");
37
+ await super.loadAll();
38
+ }
39
+ }
40
+ }
41
+ exports.LazyPackageDirectoryLoader = LazyPackageDirectoryLoader;
42
+ //# sourceMappingURL=lazy-package-directory-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazy-package-directory-loader.js","sourceRoot":"","sources":["../../src/nodes-loader/lazy-package-directory-loader.ts"],"names":[],"mappings":";;;AAAA,yEAAoE;AAKpE,MAAa,0BAA2B,SAAQ,iDAAsB;IAC5D,KAAK,CAAC,OAAO;QACrB,IAAI,CAAC;YACJ,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;YAChE,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC;YAE5E,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;YAChE,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC;YAE5E,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;gBACjC,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,YAAY,GAAG,IAAI,CAAC;YAEzB,OAAO;QACR,CAAC;QAAC,MAAM,CAAC;YACR,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;YAC/C,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QACvB,CAAC;IACF,CAAC;CACD;AA9CD,gEA8CC"}
@@ -0,0 +1 @@
1
+ export declare const loadClassInIsolation: <T>(filePath: string, className: string) => T;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadClassInIsolation = void 0;
4
+ const backend_common_1 = require("@n8n/backend-common");
5
+ const vm_1 = require("vm");
6
+ const context = (0, vm_1.createContext)({ require });
7
+ const loadClassInIsolation = (filePath, className) => {
8
+ if (process.platform === 'win32') {
9
+ filePath = filePath.replace(/\\/g, '/');
10
+ }
11
+ if (backend_common_1.inTest) {
12
+ return new (require(filePath)[className])();
13
+ }
14
+ else {
15
+ const script = new vm_1.Script(`new (require('${filePath}').${className})()`);
16
+ return script.runInContext(context);
17
+ }
18
+ };
19
+ exports.loadClassInIsolation = loadClassInIsolation;
20
+ //# sourceMappingURL=load-class-in-isolation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-class-in-isolation.js","sourceRoot":"","sources":["../../src/nodes-loader/load-class-in-isolation.ts"],"names":[],"mappings":";;;AAAA,wDAA6C;AAC7C,2BAA2C;AAE3C,MAAM,OAAO,GAAG,IAAA,kBAAa,EAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AACpC,MAAM,oBAAoB,GAAG,CAAI,QAAgB,EAAE,SAAiB,EAAE,EAAE;IAC9E,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QAClC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAGD,IAAI,uBAAM,EAAE,CAAC;QAEZ,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,EAAO,CAAC;IAClD,CAAC;SAAM,CAAC;QACP,MAAM,MAAM,GAAG,IAAI,WAAM,CAAC,iBAAiB,QAAQ,MAAM,SAAS,KAAK,CAAC,CAAC;QACzE,OAAO,MAAM,CAAC,YAAY,CAAC,OAAO,CAAM,CAAC;IAC1C,CAAC;AACF,CAAC,CAAC;AAbW,QAAA,oBAAoB,wBAa/B"}
@@ -0,0 +1,12 @@
1
+ import { DirectoryLoader } from './directory-loader';
2
+ import type { n8n } from './types';
3
+ export declare class PackageDirectoryLoader extends DirectoryLoader {
4
+ packageJson: n8n.PackageJson;
5
+ packageName: string;
6
+ constructor(directory: string, excludeNodes?: string[], includeNodes?: string[]);
7
+ loadAll(): Promise<void>;
8
+ private inferSupportedNodes;
9
+ private parseJSON;
10
+ protected readJSONSync<T>(file: string): T;
11
+ protected readJSON<T>(file: string): Promise<T>;
12
+ }
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PackageDirectoryLoader = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const node_fs_1 = require("node:fs");
6
+ const promises_1 = require("node:fs/promises");
7
+ const directory_loader_1 = require("./directory-loader");
8
+ class PackageDirectoryLoader extends directory_loader_1.DirectoryLoader {
9
+ constructor(directory, excludeNodes = [], includeNodes = []) {
10
+ super(directory, excludeNodes, includeNodes);
11
+ this.packageJson = this.readJSONSync('package.json');
12
+ this.packageName = this.packageJson.name;
13
+ this.excludeNodes = this.extractNodeTypes(excludeNodes, this.packageName);
14
+ this.includeNodes = this.extractNodeTypes(includeNodes, this.packageName);
15
+ }
16
+ async loadAll() {
17
+ const { n8n, version, name } = this.packageJson;
18
+ if (!n8n)
19
+ return;
20
+ const { nodes, credentials } = n8n;
21
+ const packageVersion = !['n8n-nodes-base', '@n8n/n8n-nodes-langchain'].includes(name)
22
+ ? version
23
+ : undefined;
24
+ if (Array.isArray(nodes)) {
25
+ for (const nodePath of nodes) {
26
+ this.loadNodeFromFile(nodePath, packageVersion);
27
+ }
28
+ }
29
+ if (Array.isArray(credentials)) {
30
+ for (const credentialPath of credentials) {
31
+ this.loadCredentialFromFile(credentialPath);
32
+ }
33
+ }
34
+ this.inferSupportedNodes();
35
+ this.logger.debug(`Loaded all credentials and nodes from ${this.packageName}`, {
36
+ credentials: credentials?.length ?? 0,
37
+ nodes: nodes?.length ?? 0,
38
+ });
39
+ }
40
+ inferSupportedNodes() {
41
+ const knownCredentials = this.known.credentials;
42
+ for (const { type: credentialType } of Object.values(this.credentialTypes)) {
43
+ const supportedNodes = knownCredentials[credentialType.name].supportedNodes ?? [];
44
+ if (supportedNodes.length > 0 && credentialType.httpRequestNode) {
45
+ credentialType.httpRequestNode.hidden = true;
46
+ }
47
+ credentialType.supportedNodes = supportedNodes;
48
+ if (!credentialType.iconUrl && !credentialType.icon) {
49
+ for (const supportedNode of supportedNodes) {
50
+ const nodeDescription = this.nodeTypes[supportedNode]?.type.description;
51
+ if (!nodeDescription)
52
+ continue;
53
+ if (nodeDescription.icon) {
54
+ credentialType.icon = nodeDescription.icon;
55
+ credentialType.iconColor = nodeDescription.iconColor;
56
+ break;
57
+ }
58
+ if (nodeDescription.iconUrl) {
59
+ credentialType.iconUrl = nodeDescription.iconUrl;
60
+ break;
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ parseJSON(fileString, filePath) {
67
+ try {
68
+ return (0, n8n_workflow_1.jsonParse)(fileString);
69
+ }
70
+ catch (error) {
71
+ throw new n8n_workflow_1.ApplicationError('Failed to parse JSON', { extra: { filePath } });
72
+ }
73
+ }
74
+ readJSONSync(file) {
75
+ const filePath = this.resolvePath(file);
76
+ const fileString = (0, node_fs_1.readFileSync)(filePath, 'utf8');
77
+ return this.parseJSON(fileString, filePath);
78
+ }
79
+ async readJSON(file) {
80
+ const filePath = this.resolvePath(file);
81
+ const fileString = await (0, promises_1.readFile)(filePath, 'utf8');
82
+ return this.parseJSON(fileString, filePath);
83
+ }
84
+ }
85
+ exports.PackageDirectoryLoader = PackageDirectoryLoader;
86
+ //# sourceMappingURL=package-directory-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-directory-loader.js","sourceRoot":"","sources":["../../src/nodes-loader/package-directory-loader.ts"],"names":[],"mappings":";;;AAAA,+CAA2D;AAC3D,qCAAuC;AACvC,+CAA4C;AAE5C,yDAAqD;AAOrD,MAAa,sBAAuB,SAAQ,kCAAe;IAK1D,YAAY,SAAiB,EAAE,eAAyB,EAAE,EAAE,eAAyB,EAAE;QACtF,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;QAE7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;QACrD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAEzC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC1E,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3E,CAAC;IAEQ,KAAK,CAAC,OAAO;QACrB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC;QAChD,IAAI,CAAC,GAAG;YAAE,OAAO;QAEjB,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC;QAEnC,MAAM,cAAc,GAAG,CAAC,CAAC,gBAAgB,EAAE,0BAA0B,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;YACpF,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,SAAS,CAAC;QAEb,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,KAAK,MAAM,QAAQ,IAAI,KAA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
+ interface PackageJson {
3
+ name: string;
4
+ version: string;
5
+ n8n?: {
6
+ credentials?: string[];
7
+ nodes?: string[];
8
+ };
9
+ author?: {
10
+ name?: string;
11
+ email?: string;
12
+ };
13
+ }
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/nodes-loader/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { type IRunExecutionData, type IWorkflowExecuteAdditionalData, type Workflow, type WorkflowExecuteMode } from 'n8n-workflow';
2
+ export declare function assertExecutionDataExists(executionData: IRunExecutionData['executionData'], workflow: Workflow, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode): asserts executionData is NonNullable<IRunExecutionData['executionData']>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertExecutionDataExists = assertExecutionDataExists;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ function assertExecutionDataExists(executionData, workflow, additionalData, mode) {
6
+ if (!executionData) {
7
+ throw new n8n_workflow_1.UnexpectedError('Failed to run workflow due to missing execution data', {
8
+ extra: {
9
+ workflowId: workflow.id,
10
+ executionId: additionalData.executionId,
11
+ mode,
12
+ },
13
+ });
14
+ }
15
+ }
16
+ //# sourceMappingURL=assertions.js.map