@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.
- package/README.md +13 -0
- package/bin/common.js +19 -0
- package/bin/copy-static-files +24 -0
- package/bin/generate-metadata +75 -0
- package/bin/generate-translations +99 -0
- package/dist/binary-data/binary-data.config.d.ts +15 -0
- package/dist/binary-data/binary-data.config.js +62 -0
- package/dist/binary-data/binary-data.config.js.map +1 -0
- package/dist/binary-data/binary-data.service.d.ts +32 -0
- package/dist/binary-data/binary-data.service.js +243 -0
- package/dist/binary-data/binary-data.service.js.map +1 -0
- package/dist/binary-data/file-system.manager.d.ts +31 -0
- package/dist/binary-data/file-system.manager.js +154 -0
- package/dist/binary-data/file-system.manager.js.map +1 -0
- package/dist/binary-data/index.d.ts +5 -0
- package/dist/binary-data/index.js +27 -0
- package/dist/binary-data/index.js.map +1 -0
- package/dist/binary-data/object-store/object-store.config.d.ts +19 -0
- package/dist/binary-data/object-store/object-store.config.js +83 -0
- package/dist/binary-data/object-store/object-store.config.js.map +1 -0
- package/dist/binary-data/object-store/object-store.service.ee.d.ts +46 -0
- package/dist/binary-data/object-store/object-store.service.ee.js +235 -0
- package/dist/binary-data/object-store/object-store.service.ee.js.map +1 -0
- package/dist/binary-data/object-store/types.d.ts +8 -0
- package/dist/binary-data/object-store/types.js +3 -0
- package/dist/binary-data/object-store/types.js.map +1 -0
- package/dist/binary-data/object-store.manager.d.ts +23 -0
- package/dist/binary-data/object-store.manager.js +86 -0
- package/dist/binary-data/object-store.manager.js.map +1 -0
- package/dist/binary-data/types.d.ts +46 -0
- package/dist/binary-data/types.js +3 -0
- package/dist/binary-data/types.js.map +1 -0
- package/dist/binary-data/utils.d.ts +15 -0
- package/dist/binary-data/utils.js +66 -0
- package/dist/binary-data/utils.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -0
- package/dist/constants.d.ts +19 -0
- package/dist/constants.js +23 -0
- package/dist/constants.js.map +1 -0
- package/dist/credentials.d.ts +12 -0
- package/dist/credentials.js +99 -0
- package/dist/credentials.js.map +1 -0
- package/dist/data-deduplication-service.d.ts +16 -0
- package/dist/data-deduplication-service.js +95 -0
- package/dist/data-deduplication-service.js.map +1 -0
- package/dist/encryption/cipher.d.ts +8 -0
- package/dist/encryption/cipher.js +57 -0
- package/dist/encryption/cipher.js.map +1 -0
- package/dist/encryption/index.d.ts +1 -0
- package/dist/encryption/index.js +6 -0
- package/dist/encryption/index.js.map +1 -0
- package/dist/errors/abstract/binary-data.error.d.ts +3 -0
- package/dist/errors/abstract/binary-data.error.js +8 -0
- package/dist/errors/abstract/binary-data.error.js.map +1 -0
- package/dist/errors/abstract/filesystem.error.d.ts +4 -0
- package/dist/errors/abstract/filesystem.error.js +11 -0
- package/dist/errors/abstract/filesystem.error.js.map +1 -0
- package/dist/errors/binary-data-file-not-found.error.d.ts +4 -0
- package/dist/errors/binary-data-file-not-found.error.js +11 -0
- package/dist/errors/binary-data-file-not-found.error.js.map +1 -0
- package/dist/errors/disallowed-filepath.error.d.ts +4 -0
- package/dist/errors/disallowed-filepath.error.js +11 -0
- package/dist/errors/disallowed-filepath.error.js.map +1 -0
- package/dist/errors/error-reporter.d.ts +35 -0
- package/dist/errors/error-reporter.js +256 -0
- package/dist/errors/error-reporter.js.map +1 -0
- package/dist/errors/file-not-found.error.d.ts +4 -0
- package/dist/errors/file-not-found.error.js +11 -0
- package/dist/errors/file-not-found.error.js.map +1 -0
- package/dist/errors/file-too-large.error.d.ts +9 -0
- package/dist/errors/file-too-large.error.js +13 -0
- package/dist/errors/file-too-large.error.js.map +1 -0
- package/dist/errors/index.d.ts +11 -0
- package/dist/errors/index.js +26 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/invalid-execution-metadata.error.d.ts +5 -0
- package/dist/errors/invalid-execution-metadata.error.js +12 -0
- package/dist/errors/invalid-execution-metadata.error.js.map +1 -0
- package/dist/errors/invalid-manager.error.d.ts +4 -0
- package/dist/errors/invalid-manager.error.js +11 -0
- package/dist/errors/invalid-manager.error.js.map +1 -0
- package/dist/errors/invalid-source-type.error.d.ts +4 -0
- package/dist/errors/invalid-source-type.error.js +11 -0
- package/dist/errors/invalid-source-type.error.js.map +1 -0
- package/dist/errors/missing-source-id.error.d.ts +4 -0
- package/dist/errors/missing-source-id.error.js +11 -0
- package/dist/errors/missing-source-id.error.js.map +1 -0
- package/dist/errors/unrecognized-credential-type.error.d.ts +4 -0
- package/dist/errors/unrecognized-credential-type.error.js +11 -0
- package/dist/errors/unrecognized-credential-type.error.js.map +1 -0
- package/dist/errors/unrecognized-node-type.error.d.ts +4 -0
- package/dist/errors/unrecognized-node-type.error.js +11 -0
- package/dist/errors/unrecognized-node-type.error.js.map +1 -0
- package/dist/errors/workflow-has-issues.error.d.ts +4 -0
- package/dist/errors/workflow-has-issues.error.js +11 -0
- package/dist/errors/workflow-has-issues.error.js.map +1 -0
- package/dist/execution-engine/active-workflows.d.ts +23 -0
- package/dist/execution-engine/active-workflows.js +153 -0
- package/dist/execution-engine/active-workflows.js.map +1 -0
- package/dist/execution-engine/execution-context-hook-registry.service.d.ts +12 -0
- package/dist/execution-engine/execution-context-hook-registry.service.js +69 -0
- package/dist/execution-engine/execution-context-hook-registry.service.js.map +1 -0
- package/dist/execution-engine/execution-context.d.ts +2 -0
- package/dist/execution-engine/execution-context.js +56 -0
- package/dist/execution-engine/execution-context.js.map +1 -0
- package/dist/execution-engine/execution-context.service.d.ts +17 -0
- package/dist/execution-engine/execution-context.service.js +108 -0
- package/dist/execution-engine/execution-context.service.js.map +1 -0
- package/dist/execution-engine/execution-lifecycle-hooks.d.ts +20 -0
- package/dist/execution-engine/execution-lifecycle-hooks.js +31 -0
- package/dist/execution-engine/execution-lifecycle-hooks.js.map +1 -0
- package/dist/execution-engine/external-secrets-proxy.d.ts +18 -0
- package/dist/execution-engine/external-secrets-proxy.js +38 -0
- package/dist/execution-engine/external-secrets-proxy.js.map +1 -0
- package/dist/execution-engine/index.d.ts +26 -0
- package/dist/execution-engine/index.js +31 -0
- package/dist/execution-engine/index.js.map +1 -0
- package/dist/execution-engine/interfaces.d.ts +7 -0
- package/dist/execution-engine/interfaces.js +3 -0
- package/dist/execution-engine/interfaces.js.map +1 -0
- package/dist/execution-engine/node-execution-context/base-execute-context.d.ts +47 -0
- package/dist/execution-engine/node-execution-context/base-execute-context.js +150 -0
- package/dist/execution-engine/node-execution-context/base-execute-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/credentials-test-context.d.ts +7 -0
- package/dist/execution-engine/node-execution-context/credentials-test-context.js +37 -0
- package/dist/execution-engine/node-execution-context/credentials-test-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/execute-context.d.ts +24 -0
- package/dist/execution-engine/node-execution-context/execute-context.js +108 -0
- package/dist/execution-engine/node-execution-context/execute-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/execute-single-context.d.ts +15 -0
- package/dist/execution-engine/node-execution-context/execute-single-context.js +53 -0
- package/dist/execution-engine/node-execution-context/execute-single-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/hook-context.d.ts +13 -0
- package/dist/execution-engine/node-execution-context/hook-context.js +35 -0
- package/dist/execution-engine/node-execution-context/hook-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/index.d.ts +17 -0
- package/dist/execution-engine/node-execution-context/index.js +51 -0
- package/dist/execution-engine/node-execution-context/index.js.map +1 -0
- package/dist/execution-engine/node-execution-context/load-options-context.d.ts +10 -0
- package/dist/execution-engine/node-execution-context/load-options-context.js +43 -0
- package/dist/execution-engine/node-execution-context/load-options-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/local-load-options-context.d.ts +10 -0
- package/dist/execution-engine/node-execution-context/local-load-options-context.js +51 -0
- package/dist/execution-engine/node-execution-context/local-load-options-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/node-execution-context.d.ts +68 -0
- package/dist/execution-engine/node-execution-context/node-execution-context.js +324 -0
- package/dist/execution-engine/node-execution-context/node-execution-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/poll-context.d.ts +11 -0
- package/dist/execution-engine/node-execution-context/poll-context.js +38 -0
- package/dist/execution-engine/node-execution-context/poll-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/supply-data-context.d.ts +26 -0
- package/dist/execution-engine/node-execution-context/supply-data-context.js +181 -0
- package/dist/execution-engine/node-execution-context/supply-data-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/trigger-context.d.ts +11 -0
- package/dist/execution-engine/node-execution-context/trigger-context.js +40 -0
- package/dist/execution-engine/node-execution-context/trigger-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/binary-helper-functions.d.ts +10 -0
- package/dist/execution-engine/node-execution-context/utils/binary-helper-functions.js +213 -0
- package/dist/execution-engine/node-execution-context/utils/binary-helper-functions.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/cleanup-parameter-data.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/cleanup-parameter-data.js +27 -0
- package/dist/execution-engine/node-execution-context/utils/cleanup-parameter-data.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/construct-execution-metadata.d.ts +4 -0
- package/dist/execution-engine/node-execution-context/utils/construct-execution-metadata.js +11 -0
- package/dist/execution-engine/node-execution-context/utils/construct-execution-metadata.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/copy-input-items.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/copy-input-items.js +19 -0
- package/dist/execution-engine/node-execution-context/utils/copy-input-items.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/create-node-as-tool.d.ts +21 -0
- package/dist/execution-engine/node-execution-context/utils/create-node-as-tool.js +65 -0
- package/dist/execution-engine/node-execution-context/utils/create-node-as-tool.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/data-table-helper-functions.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/data-table-helper-functions.js +13 -0
- package/dist/execution-engine/node-execution-context/utils/data-table-helper-functions.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/deduplication-helper-functions.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/deduplication-helper-functions.js +38 -0
- package/dist/execution-engine/node-execution-context/utils/deduplication-helper-functions.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/ensure-type.d.ts +6 -0
- package/dist/execution-engine/node-execution-context/utils/ensure-type.js +75 -0
- package/dist/execution-engine/node-execution-context/utils/ensure-type.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/execution-metadata.d.ts +6 -0
- package/dist/execution-engine/node-execution-context/utils/execution-metadata.js +57 -0
- package/dist/execution-engine/node-execution-context/utils/execution-metadata.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/extract-value.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/extract-value.js +135 -0
- package/dist/execution-engine/node-execution-context/utils/extract-value.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/file-system-helper-functions.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/file-system-helper-functions.js +144 -0
- package/dist/execution-engine/node-execution-context/utils/file-system-helper-functions.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/get-additional-keys.d.ts +4 -0
- package/dist/execution-engine/node-execution-context/utils/get-additional-keys.js +57 -0
- package/dist/execution-engine/node-execution-context/utils/get-additional-keys.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/get-input-connection-data.d.ts +5 -0
- package/dist/execution-engine/node-execution-context/utils/get-input-connection-data.js +211 -0
- package/dist/execution-engine/node-execution-context/utils/get-input-connection-data.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/get-secrets-proxy.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/get-secrets-proxy.js +68 -0
- package/dist/execution-engine/node-execution-context/utils/get-secrets-proxy.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/normalize-items.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/normalize-items.js +36 -0
- package/dist/execution-engine/node-execution-context/utils/normalize-items.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/parse-incoming-message.d.ts +16 -0
- package/dist/execution-engine/node-execution-context/utils/parse-incoming-message.js +57 -0
- package/dist/execution-engine/node-execution-context/utils/parse-incoming-message.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/request-helper-functions.d.ts +18 -0
- package/dist/execution-engine/node-execution-context/utils/request-helper-functions.js +1213 -0
- package/dist/execution-engine/node-execution-context/utils/request-helper-functions.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/return-json-array.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/return-json-array.js +19 -0
- package/dist/execution-engine/node-execution-context/utils/return-json-array.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/scheduling-helper-functions.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/scheduling-helper-functions.js +22 -0
- package/dist/execution-engine/node-execution-context/utils/scheduling-helper-functions.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/ssh-tunnel-helper-functions.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/ssh-tunnel-helper-functions.js +14 -0
- package/dist/execution-engine/node-execution-context/utils/ssh-tunnel-helper-functions.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/validate-value-against-schema.d.ts +2 -0
- package/dist/execution-engine/node-execution-context/utils/validate-value-against-schema.js +132 -0
- package/dist/execution-engine/node-execution-context/utils/validate-value-against-schema.js.map +1 -0
- package/dist/execution-engine/node-execution-context/utils/webhook-helper-functions.d.ts +3 -0
- package/dist/execution-engine/node-execution-context/utils/webhook-helper-functions.js +31 -0
- package/dist/execution-engine/node-execution-context/utils/webhook-helper-functions.js.map +1 -0
- package/dist/execution-engine/node-execution-context/webhook-context.d.ts +21 -0
- package/dist/execution-engine/node-execution-context/webhook-context.js +87 -0
- package/dist/execution-engine/node-execution-context/webhook-context.js.map +1 -0
- package/dist/execution-engine/node-execution-context/workflow-node-context.d.ts +6 -0
- package/dist/execution-engine/node-execution-context/workflow-node-context.js +14 -0
- package/dist/execution-engine/node-execution-context/workflow-node-context.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/clean-run-data.d.ts +3 -0
- package/dist/execution-engine/partial-execution-utils/clean-run-data.js +28 -0
- package/dist/execution-engine/partial-execution-utils/clean-run-data.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/directed-graph.d.ts +65 -0
- package/dist/execution-engine/partial-execution-utils/directed-graph.js +370 -0
- package/dist/execution-engine/partial-execution-utils/directed-graph.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/filter-disabled-nodes.d.ts +2 -0
- package/dist/execution-engine/partial-execution-utils/filter-disabled-nodes.js +17 -0
- package/dist/execution-engine/partial-execution-utils/filter-disabled-nodes.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/find-start-nodes.d.ts +10 -0
- package/dist/execution-engine/partial-execution-utils/find-start-nodes.js +74 -0
- package/dist/execution-engine/partial-execution-utils/find-start-nodes.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/find-subgraph.d.ts +7 -0
- package/dist/execution-engine/partial-execution-utils/find-subgraph.js +59 -0
- package/dist/execution-engine/partial-execution-utils/find-subgraph.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/find-trigger-for-partial-execution.d.ts +4 -0
- package/dist/execution-engine/partial-execution-utils/find-trigger-for-partial-execution.js +102 -0
- package/dist/execution-engine/partial-execution-utils/find-trigger-for-partial-execution.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/get-incoming-data.d.ts +6 -0
- package/dist/execution-engine/partial-execution-utils/get-incoming-data.js +21 -0
- package/dist/execution-engine/partial-execution-utils/get-incoming-data.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/get-source-data-groups.d.ts +8 -0
- package/dist/execution-engine/partial-execution-utils/get-source-data-groups.js +65 -0
- package/dist/execution-engine/partial-execution-utils/get-source-data-groups.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/handle-cycles.d.ts +3 -0
- package/dist/execution-engine/partial-execution-utils/handle-cycles.js +60 -0
- package/dist/execution-engine/partial-execution-utils/handle-cycles.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/index.d.ts +10 -0
- package/dist/execution-engine/partial-execution-utils/index.js +25 -0
- package/dist/execution-engine/partial-execution-utils/index.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/recreate-node-execution-stack.d.ts +9 -0
- package/dist/execution-engine/partial-execution-utils/recreate-node-execution-stack.js +146 -0
- package/dist/execution-engine/partial-execution-utils/recreate-node-execution-stack.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/rewire-graph.d.ts +3 -0
- package/dist/execution-engine/partial-execution-utils/rewire-graph.js +72 -0
- package/dist/execution-engine/partial-execution-utils/rewire-graph.js.map +1 -0
- package/dist/execution-engine/partial-execution-utils/run-data-utils.d.ts +2 -0
- package/dist/execution-engine/partial-execution-utils/run-data-utils.js +15 -0
- package/dist/execution-engine/partial-execution-utils/run-data-utils.js.map +1 -0
- package/dist/execution-engine/requests-response.d.ts +23 -0
- package/dist/execution-engine/requests-response.js +128 -0
- package/dist/execution-engine/requests-response.js.map +1 -0
- package/dist/execution-engine/routing-node.d.ts +17 -0
- package/dist/execution-engine/routing-node.js +571 -0
- package/dist/execution-engine/routing-node.js.map +1 -0
- package/dist/execution-engine/scheduled-task-manager.d.ts +27 -0
- package/dist/execution-engine/scheduled-task-manager.js +140 -0
- package/dist/execution-engine/scheduled-task-manager.js.map +1 -0
- package/dist/execution-engine/ssh-clients-manager.d.ts +27 -0
- package/dist/execution-engine/ssh-clients-manager.js +170 -0
- package/dist/execution-engine/ssh-clients-manager.js.map +1 -0
- package/dist/execution-engine/triggers-and-pollers.d.ts +6 -0
- package/dist/execution-engine/triggers-and-pollers.js +66 -0
- package/dist/execution-engine/triggers-and-pollers.js.map +1 -0
- package/dist/execution-engine/workflow-execute.d.ts +46 -0
- package/dist/execution-engine/workflow-execute.js +1490 -0
- package/dist/execution-engine/workflow-execute.js.map +1 -0
- package/dist/html-sandbox.d.ts +3 -0
- package/dist/html-sandbox.js +19 -0
- package/dist/html-sandbox.js.map +1 -0
- package/dist/http-proxy.d.ts +6 -0
- package/dist/http-proxy.js +109 -0
- package/dist/http-proxy.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/instance-settings/index.d.ts +1 -0
- package/dist/instance-settings/index.js +6 -0
- package/dist/instance-settings/index.js.map +1 -0
- package/dist/instance-settings/instance-settings.d.ts +49 -0
- package/dist/instance-settings/instance-settings.js +210 -0
- package/dist/instance-settings/instance-settings.js.map +1 -0
- package/dist/instance-settings/worker-missing-encryption-key.error.d.ts +4 -0
- package/dist/instance-settings/worker-missing-encryption-key.error.js +15 -0
- package/dist/instance-settings/worker-missing-encryption-key.error.js.map +1 -0
- package/dist/interfaces.d.ts +16 -0
- package/dist/interfaces.js +3 -0
- package/dist/interfaces.js.map +1 -0
- package/dist/node-execute-functions.d.ts +3 -0
- package/dist/node-execute-functions.js +12 -0
- package/dist/node-execute-functions.js.map +1 -0
- package/dist/nodes-loader/constants.d.ts +5 -0
- package/dist/nodes-loader/constants.js +106 -0
- package/dist/nodes-loader/constants.js.map +1 -0
- package/dist/nodes-loader/custom-directory-loader.d.ts +6 -0
- package/dist/nodes-loader/custom-directory-loader.js +34 -0
- package/dist/nodes-loader/custom-directory-loader.js.map +1 -0
- package/dist/nodes-loader/directory-loader.d.ts +41 -0
- package/dist/nodes-loader/directory-loader.js +371 -0
- package/dist/nodes-loader/directory-loader.js.map +1 -0
- package/dist/nodes-loader/index.d.ts +5 -0
- package/dist/nodes-loader/index.js +12 -0
- package/dist/nodes-loader/index.js.map +1 -0
- package/dist/nodes-loader/lazy-package-directory-loader.d.ts +4 -0
- package/dist/nodes-loader/lazy-package-directory-loader.js +42 -0
- package/dist/nodes-loader/lazy-package-directory-loader.js.map +1 -0
- package/dist/nodes-loader/load-class-in-isolation.d.ts +1 -0
- package/dist/nodes-loader/load-class-in-isolation.js +20 -0
- package/dist/nodes-loader/load-class-in-isolation.js.map +1 -0
- package/dist/nodes-loader/package-directory-loader.d.ts +12 -0
- package/dist/nodes-loader/package-directory-loader.js +86 -0
- package/dist/nodes-loader/package-directory-loader.js.map +1 -0
- package/dist/nodes-loader/types.d.ts +14 -0
- package/dist/nodes-loader/types.js +3 -0
- package/dist/nodes-loader/types.js.map +1 -0
- package/dist/utils/assertions.d.ts +2 -0
- package/dist/utils/assertions.js +16 -0
- package/dist/utils/assertions.js.map +1 -0
- package/dist/utils/deep-merge.d.ts +1 -0
- package/dist/utils/deep-merge.js +33 -0
- package/dist/utils/deep-merge.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +19 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/is-json-compatible.d.ts +7 -0
- package/dist/utils/is-json-compatible.js +81 -0
- package/dist/utils/is-json-compatible.js.map +1 -0
- package/dist/utils/serialized-buffer.d.ts +6 -0
- package/dist/utils/serialized-buffer.js +16 -0
- package/dist/utils/serialized-buffer.js.map +1 -0
- package/dist/utils/signature-helpers.d.ts +2 -0
- package/dist/utils/signature-helpers.js +16 -0
- package/dist/utils/signature-helpers.js.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const CUSTOM_EXTENSION_ENV = "N8N_CUSTOM_EXTENSIONS";
|
|
2
|
+
export declare const PLACEHOLDER_EMPTY_EXECUTION_ID = "__UNKNOWN__";
|
|
3
|
+
export declare const PLACEHOLDER_EMPTY_WORKFLOW_ID = "__EMPTY__";
|
|
4
|
+
export declare const HTTP_REQUEST_NODE_TYPE = "n8n-nodes-base.httpRequest";
|
|
5
|
+
export declare const HTTP_REQUEST_AS_TOOL_NODE_TYPE = "n8n-nodes-base.httpRequestTool";
|
|
6
|
+
export declare const HTTP_REQUEST_TOOL_NODE_TYPE = "@n8n/n8n-nodes-langchain.toolHttpRequest";
|
|
7
|
+
export declare const RESTRICT_FILE_ACCESS_TO = "N8N_RESTRICT_FILE_ACCESS_TO";
|
|
8
|
+
export declare const BLOCK_FILE_ACCESS_TO_N8N_FILES = "N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES";
|
|
9
|
+
export declare const CONFIG_FILES = "N8N_CONFIG_FILES";
|
|
10
|
+
export declare const BINARY_DATA_STORAGE_PATH = "N8N_BINARY_DATA_STORAGE_PATH";
|
|
11
|
+
export declare const UM_EMAIL_TEMPLATES_INVITE = "N8N_UM_EMAIL_TEMPLATES_INVITE";
|
|
12
|
+
export declare const UM_EMAIL_TEMPLATES_PWRESET = "N8N_UM_EMAIL_TEMPLATES_PWRESET";
|
|
13
|
+
export declare const CREDENTIAL_ERRORS: {
|
|
14
|
+
NO_DATA: string;
|
|
15
|
+
DECRYPTION_FAILED: string;
|
|
16
|
+
INVALID_JSON: string;
|
|
17
|
+
INVALID_DATA: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const WAITING_TOKEN_QUERY_PARAM = "signature";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WAITING_TOKEN_QUERY_PARAM = exports.CREDENTIAL_ERRORS = exports.UM_EMAIL_TEMPLATES_PWRESET = exports.UM_EMAIL_TEMPLATES_INVITE = exports.BINARY_DATA_STORAGE_PATH = exports.CONFIG_FILES = exports.BLOCK_FILE_ACCESS_TO_N8N_FILES = exports.RESTRICT_FILE_ACCESS_TO = exports.HTTP_REQUEST_TOOL_NODE_TYPE = exports.HTTP_REQUEST_AS_TOOL_NODE_TYPE = exports.HTTP_REQUEST_NODE_TYPE = exports.PLACEHOLDER_EMPTY_WORKFLOW_ID = exports.PLACEHOLDER_EMPTY_EXECUTION_ID = exports.CUSTOM_EXTENSION_ENV = void 0;
|
|
4
|
+
exports.CUSTOM_EXTENSION_ENV = 'N8N_CUSTOM_EXTENSIONS';
|
|
5
|
+
exports.PLACEHOLDER_EMPTY_EXECUTION_ID = '__UNKNOWN__';
|
|
6
|
+
exports.PLACEHOLDER_EMPTY_WORKFLOW_ID = '__EMPTY__';
|
|
7
|
+
exports.HTTP_REQUEST_NODE_TYPE = 'n8n-nodes-base.httpRequest';
|
|
8
|
+
exports.HTTP_REQUEST_AS_TOOL_NODE_TYPE = 'n8n-nodes-base.httpRequestTool';
|
|
9
|
+
exports.HTTP_REQUEST_TOOL_NODE_TYPE = '@n8n/n8n-nodes-langchain.toolHttpRequest';
|
|
10
|
+
exports.RESTRICT_FILE_ACCESS_TO = 'N8N_RESTRICT_FILE_ACCESS_TO';
|
|
11
|
+
exports.BLOCK_FILE_ACCESS_TO_N8N_FILES = 'N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES';
|
|
12
|
+
exports.CONFIG_FILES = 'N8N_CONFIG_FILES';
|
|
13
|
+
exports.BINARY_DATA_STORAGE_PATH = 'N8N_BINARY_DATA_STORAGE_PATH';
|
|
14
|
+
exports.UM_EMAIL_TEMPLATES_INVITE = 'N8N_UM_EMAIL_TEMPLATES_INVITE';
|
|
15
|
+
exports.UM_EMAIL_TEMPLATES_PWRESET = 'N8N_UM_EMAIL_TEMPLATES_PWRESET';
|
|
16
|
+
exports.CREDENTIAL_ERRORS = {
|
|
17
|
+
NO_DATA: 'No data is set on this credentials.',
|
|
18
|
+
DECRYPTION_FAILED: 'Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.',
|
|
19
|
+
INVALID_JSON: 'Decrypted credentials data is not valid JSON.',
|
|
20
|
+
INVALID_DATA: 'Credentials data is not in a valid format.',
|
|
21
|
+
};
|
|
22
|
+
exports.WAITING_TOKEN_QUERY_PARAM = 'signature';
|
|
23
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,uBAAuB,CAAC;AAC/C,QAAA,8BAA8B,GAAG,aAAa,CAAC;AAC/C,QAAA,6BAA6B,GAAG,WAAW,CAAC;AAC5C,QAAA,sBAAsB,GAAG,4BAA4B,CAAC;AACtD,QAAA,8BAA8B,GAAG,gCAAgC,CAAC;AAClE,QAAA,2BAA2B,GAAG,0CAA0C,CAAC;AAEzE,QAAA,uBAAuB,GAAG,6BAA6B,CAAC;AACxD,QAAA,8BAA8B,GAAG,oCAAoC,CAAC;AACtE,QAAA,YAAY,GAAG,kBAAkB,CAAC;AAClC,QAAA,wBAAwB,GAAG,8BAA8B,CAAC;AAC1D,QAAA,yBAAyB,GAAG,+BAA+B,CAAC;AAC5D,QAAA,0BAA0B,GAAG,gCAAgC,CAAC;AAE9D,QAAA,iBAAiB,GAAG;IAChC,OAAO,EAAE,qCAAqC;IAC9C,iBAAiB,EAChB,yHAAyH;IAC1H,YAAY,EAAE,+CAA+C;IAC7D,YAAY,EAAE,4CAA4C;CAC1D,CAAC;AAEW,QAAA,yBAAyB,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ICredentialDataDecryptedObject, ICredentialsEncrypted } from 'n8n-workflow';
|
|
2
|
+
import { ApplicationError, ICredentials } from 'n8n-workflow';
|
|
3
|
+
export declare class CredentialDataError extends ApplicationError {
|
|
4
|
+
constructor({ name, type, id }: Credentials<object>, message: string, cause?: unknown);
|
|
5
|
+
}
|
|
6
|
+
export declare class Credentials<T extends object = ICredentialDataDecryptedObject> extends ICredentials<T> {
|
|
7
|
+
private readonly cipher;
|
|
8
|
+
setData(data: T): void;
|
|
9
|
+
updateData(toUpdate: Partial<T>, toDelete?: Array<keyof T>): void;
|
|
10
|
+
getData(): T;
|
|
11
|
+
getDataToSave(): ICredentialsEncrypted;
|
|
12
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Credentials = exports.CredentialDataError = void 0;
|
|
37
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
38
|
+
const di_1 = require("@n8n/di");
|
|
39
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
40
|
+
const a = __importStar(require("node:assert"));
|
|
41
|
+
const constants_1 = require("./constants");
|
|
42
|
+
const cipher_1 = require("./encryption/cipher");
|
|
43
|
+
class CredentialDataError extends n8n_workflow_1.ApplicationError {
|
|
44
|
+
constructor({ name, type, id }, message, cause) {
|
|
45
|
+
super(message, {
|
|
46
|
+
extra: { name, type, id },
|
|
47
|
+
cause,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.CredentialDataError = CredentialDataError;
|
|
52
|
+
class Credentials extends n8n_workflow_1.ICredentials {
|
|
53
|
+
constructor() {
|
|
54
|
+
super(...arguments);
|
|
55
|
+
this.cipher = di_1.Container.get(cipher_1.Cipher);
|
|
56
|
+
}
|
|
57
|
+
setData(data) {
|
|
58
|
+
a.ok((0, backend_common_1.isObjectLiteral)(data));
|
|
59
|
+
this.data = this.cipher.encrypt(data);
|
|
60
|
+
}
|
|
61
|
+
updateData(toUpdate, toDelete = []) {
|
|
62
|
+
const updatedData = { ...this.getData(), ...toUpdate };
|
|
63
|
+
for (const key of toDelete) {
|
|
64
|
+
delete updatedData[key];
|
|
65
|
+
}
|
|
66
|
+
this.setData(updatedData);
|
|
67
|
+
}
|
|
68
|
+
getData() {
|
|
69
|
+
if (this.data === undefined) {
|
|
70
|
+
throw new CredentialDataError(this, constants_1.CREDENTIAL_ERRORS.NO_DATA);
|
|
71
|
+
}
|
|
72
|
+
let decryptedData;
|
|
73
|
+
try {
|
|
74
|
+
decryptedData = this.cipher.decrypt(this.data);
|
|
75
|
+
}
|
|
76
|
+
catch (cause) {
|
|
77
|
+
throw new CredentialDataError(this, constants_1.CREDENTIAL_ERRORS.DECRYPTION_FAILED, cause);
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
return (0, n8n_workflow_1.jsonParse)(decryptedData);
|
|
81
|
+
}
|
|
82
|
+
catch (cause) {
|
|
83
|
+
throw new CredentialDataError(this, constants_1.CREDENTIAL_ERRORS.INVALID_JSON, cause);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
getDataToSave() {
|
|
87
|
+
if (this.data === undefined) {
|
|
88
|
+
throw new n8n_workflow_1.ApplicationError('No credentials were set to save.');
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
id: this.id,
|
|
92
|
+
name: this.name,
|
|
93
|
+
type: this.type,
|
|
94
|
+
data: this.data,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.Credentials = Credentials;
|
|
99
|
+
//# sourceMappingURL=credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAsD;AACtD,gCAAoC;AAEpC,+CAAyE;AACzE,+CAAiC;AAEjC,2CAAgD;AAChD,gDAA6C;AAE7C,MAAa,mBAAoB,SAAQ,+BAAgB;IACxD,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAuB,EAAE,OAAe,EAAE,KAAe;QACpF,KAAK,CAAC,OAAO,EAAE;YACd,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;YACzB,KAAK;SACL,CAAC,CAAC;IACJ,CAAC;CACD;AAPD,kDAOC;AAED,MAAa,WAEX,SAAQ,2BAAe;IAFzB;;QAGkB,WAAM,GAAG,cAAS,CAAC,GAAG,CAAC,eAAM,CAAC,CAAC;IA4DjD,CAAC;IAvDA,OAAO,CAAC,IAAO;QACd,CAAC,CAAC,EAAE,CAAC,IAAA,gCAAe,EAAC,IAAI,CAAC,CAAC,CAAC;QAE5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAMD,UAAU,CAAC,QAAoB,EAAE,WAA2B,EAAE;QAC7D,MAAM,WAAW,GAAM,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,GAAG,QAAQ,EAAE,CAAC;QAC1D,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC5B,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3B,CAAC;IAKD,OAAO;QACN,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,mBAAmB,CAAC,IAAI,EAAE,6BAAiB,CAAC,OAAO,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,aAAqB,CAAC;QAC1B,IAAI,CAAC;YACJ,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,mBAAmB,CAAC,IAAI,EAAE,6BAAiB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;QACjF,CAAC;QAED,IAAI,CAAC;YACJ,OAAO,IAAA,wBAAS,EAAC,aAAa,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,mBAAmB,CAAC,IAAI,EAAE,6BAAiB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC5E,CAAC;IACF,CAAC;IAKD,aAAa;QACZ,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,+BAAgB,CAAC,kCAAkC,CAAC,CAAC;QAChE,CAAC;QAED,OAAO;YACN,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SACf,CAAC;IACH,CAAC;CACD;AA/DD,kCA+DC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IDataDeduplicator, ICheckProcessedOptions, IDeduplicationOutput, IDeduplicationOutputItems, IDataObject, DeduplicationScope, DeduplicationItemTypes, ICheckProcessedContextData } from 'n8n-workflow';
|
|
2
|
+
export declare class DataDeduplicationService {
|
|
3
|
+
private static instance;
|
|
4
|
+
private deduplicator;
|
|
5
|
+
private constructor();
|
|
6
|
+
private assertDeduplicator;
|
|
7
|
+
private static assertInstance;
|
|
8
|
+
private static assertSingleInstance;
|
|
9
|
+
static init(deduplicator: IDataDeduplicator): Promise<void>;
|
|
10
|
+
static getInstance(): DataDeduplicationService;
|
|
11
|
+
checkProcessedItemsAndRecord(propertyName: string, items: IDataObject[], scope: DeduplicationScope, contextData: ICheckProcessedContextData, options: ICheckProcessedOptions): Promise<IDeduplicationOutputItems>;
|
|
12
|
+
checkProcessedAndRecord(items: DeduplicationItemTypes[], scope: DeduplicationScope, contextData: ICheckProcessedContextData, options: ICheckProcessedOptions): Promise<IDeduplicationOutput>;
|
|
13
|
+
removeProcessed(items: DeduplicationItemTypes[], scope: DeduplicationScope, contextData: ICheckProcessedContextData, options: ICheckProcessedOptions): Promise<void>;
|
|
14
|
+
clearAllProcessedItems(scope: DeduplicationScope, contextData: ICheckProcessedContextData, options: ICheckProcessedOptions): Promise<void>;
|
|
15
|
+
getProcessedDataCount(scope: DeduplicationScope, contextData: ICheckProcessedContextData, options: ICheckProcessedOptions): Promise<number>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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.DataDeduplicationService = void 0;
|
|
40
|
+
const get_1 = __importDefault(require("lodash/get"));
|
|
41
|
+
const assert = __importStar(require("node:assert/strict"));
|
|
42
|
+
class DataDeduplicationService {
|
|
43
|
+
constructor(deduplicator) {
|
|
44
|
+
this.deduplicator = deduplicator;
|
|
45
|
+
}
|
|
46
|
+
assertDeduplicator() {
|
|
47
|
+
assert.ok(this.deduplicator, 'Manager needs to initialized before use. Make sure to call init()');
|
|
48
|
+
}
|
|
49
|
+
static assertInstance() {
|
|
50
|
+
assert.ok(DataDeduplicationService.instance, 'Instance needs to initialized before use. Make sure to call init()');
|
|
51
|
+
}
|
|
52
|
+
static assertSingleInstance() {
|
|
53
|
+
assert.ok(!DataDeduplicationService.instance, 'Instance already initialized. Multiple initializations are not allowed.');
|
|
54
|
+
}
|
|
55
|
+
static async init(deduplicator) {
|
|
56
|
+
this.assertSingleInstance();
|
|
57
|
+
DataDeduplicationService.instance = new DataDeduplicationService(deduplicator);
|
|
58
|
+
}
|
|
59
|
+
static getInstance() {
|
|
60
|
+
this.assertInstance();
|
|
61
|
+
return DataDeduplicationService.instance;
|
|
62
|
+
}
|
|
63
|
+
async checkProcessedItemsAndRecord(propertyName, items, scope, contextData, options) {
|
|
64
|
+
this.assertDeduplicator();
|
|
65
|
+
let value;
|
|
66
|
+
const itemLookup = items.reduce((acc, cur, index) => {
|
|
67
|
+
value = JSON.stringify((0, get_1.default)(cur, propertyName));
|
|
68
|
+
acc[value ? value.toString() : ''] = index;
|
|
69
|
+
return acc;
|
|
70
|
+
}, {});
|
|
71
|
+
const checkedItems = await this.deduplicator.checkProcessedAndRecord(Object.keys(itemLookup), scope, contextData, options);
|
|
72
|
+
return {
|
|
73
|
+
new: checkedItems.new.map((key) => items[itemLookup[key]]),
|
|
74
|
+
processed: checkedItems.processed.map((key) => items[itemLookup[key]]),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
async checkProcessedAndRecord(items, scope, contextData, options) {
|
|
78
|
+
this.assertDeduplicator();
|
|
79
|
+
return await this.deduplicator.checkProcessedAndRecord(items, scope, contextData, options);
|
|
80
|
+
}
|
|
81
|
+
async removeProcessed(items, scope, contextData, options) {
|
|
82
|
+
this.assertDeduplicator();
|
|
83
|
+
return await this.deduplicator.removeProcessed(items, scope, contextData, options);
|
|
84
|
+
}
|
|
85
|
+
async clearAllProcessedItems(scope, contextData, options) {
|
|
86
|
+
this.assertDeduplicator();
|
|
87
|
+
return await this.deduplicator.clearAllProcessedItems(scope, contextData, options);
|
|
88
|
+
}
|
|
89
|
+
async getProcessedDataCount(scope, contextData, options) {
|
|
90
|
+
this.assertDeduplicator();
|
|
91
|
+
return await this.deduplicator.getProcessedDataCount(scope, contextData, options);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.DataDeduplicationService = DataDeduplicationService;
|
|
95
|
+
//# sourceMappingURL=data-deduplication-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-deduplication-service.js","sourceRoot":"","sources":["../src/data-deduplication-service.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InstanceSettings } from '../instance-settings';
|
|
2
|
+
export declare class Cipher {
|
|
3
|
+
private readonly instanceSettings;
|
|
4
|
+
constructor(instanceSettings: InstanceSettings);
|
|
5
|
+
encrypt(data: string | object, customEncryptionKey?: string): string;
|
|
6
|
+
decrypt(data: string, customEncryptionKey?: string): string;
|
|
7
|
+
private getKeyAndIv;
|
|
8
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Cipher = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const crypto_1 = require("crypto");
|
|
15
|
+
const instance_settings_1 = require("../instance-settings");
|
|
16
|
+
const RANDOM_BYTES = Buffer.from('53616c7465645f5f', 'hex');
|
|
17
|
+
let Cipher = class Cipher {
|
|
18
|
+
constructor(instanceSettings) {
|
|
19
|
+
this.instanceSettings = instanceSettings;
|
|
20
|
+
}
|
|
21
|
+
encrypt(data, customEncryptionKey) {
|
|
22
|
+
const salt = (0, crypto_1.randomBytes)(8);
|
|
23
|
+
const [key, iv] = this.getKeyAndIv(salt, customEncryptionKey);
|
|
24
|
+
const cipher = (0, crypto_1.createCipheriv)('aes-256-cbc', key, iv);
|
|
25
|
+
const encrypted = cipher.update(typeof data === 'string' ? data : JSON.stringify(data));
|
|
26
|
+
return Buffer.concat([RANDOM_BYTES, salt, encrypted, cipher.final()]).toString('base64');
|
|
27
|
+
}
|
|
28
|
+
decrypt(data, customEncryptionKey) {
|
|
29
|
+
const input = Buffer.from(data, 'base64');
|
|
30
|
+
if (input.length < 16)
|
|
31
|
+
return '';
|
|
32
|
+
const salt = input.subarray(8, 16);
|
|
33
|
+
const [key, iv] = this.getKeyAndIv(salt, customEncryptionKey);
|
|
34
|
+
const contents = input.subarray(16);
|
|
35
|
+
const decipher = (0, crypto_1.createDecipheriv)('aes-256-cbc', key, iv);
|
|
36
|
+
return Buffer.concat([decipher.update(contents), decipher.final()]).toString('utf-8');
|
|
37
|
+
}
|
|
38
|
+
getKeyAndIv(salt, customEncryptionKey) {
|
|
39
|
+
const encryptionKey = customEncryptionKey ?? this.instanceSettings.encryptionKey;
|
|
40
|
+
const password = Buffer.concat([Buffer.from(encryptionKey, 'binary'), salt]);
|
|
41
|
+
const hash1 = (0, crypto_1.createHash)('md5').update(password).digest();
|
|
42
|
+
const hash2 = (0, crypto_1.createHash)('md5')
|
|
43
|
+
.update(Buffer.concat([hash1, password]))
|
|
44
|
+
.digest();
|
|
45
|
+
const iv = (0, crypto_1.createHash)('md5')
|
|
46
|
+
.update(Buffer.concat([hash2, password]))
|
|
47
|
+
.digest();
|
|
48
|
+
const key = Buffer.concat([hash1, hash2]);
|
|
49
|
+
return [key, iv];
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports.Cipher = Cipher;
|
|
53
|
+
exports.Cipher = Cipher = __decorate([
|
|
54
|
+
(0, di_1.Service)(),
|
|
55
|
+
__metadata("design:paramtypes", [instance_settings_1.InstanceSettings])
|
|
56
|
+
], Cipher);
|
|
57
|
+
//# sourceMappingURL=cipher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cipher.js","sourceRoot":"","sources":["../../src/encryption/cipher.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Cipher } from './cipher';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Cipher = void 0;
|
|
4
|
+
var cipher_1 = require("./cipher");
|
|
5
|
+
Object.defineProperty(exports, "Cipher", { enumerable: true, get: function () { return cipher_1.Cipher; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/encryption/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BinaryDataError = void 0;
|
|
4
|
+
const errors_1 = require("@n8n/errors");
|
|
5
|
+
class BinaryDataError extends errors_1.ApplicationError {
|
|
6
|
+
}
|
|
7
|
+
exports.BinaryDataError = BinaryDataError;
|
|
8
|
+
//# sourceMappingURL=binary-data.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-data.error.js","sourceRoot":"","sources":["../../../src/errors/abstract/binary-data.error.ts"],"names":[],"mappings":";;;AAAA,wCAA+C;AAE/C,MAAsB,eAAgB,SAAQ,yBAAgB;CAAG;AAAjE,0CAAiE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileSystemError = void 0;
|
|
4
|
+
const errors_1 = require("@n8n/errors");
|
|
5
|
+
class FileSystemError extends errors_1.ApplicationError {
|
|
6
|
+
constructor(message, filePath) {
|
|
7
|
+
super(message, { extra: { filePath } });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.FileSystemError = FileSystemError;
|
|
11
|
+
//# sourceMappingURL=filesystem.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filesystem.error.js","sourceRoot":"","sources":["../../../src/errors/abstract/filesystem.error.ts"],"names":[],"mappings":";;;AAAA,wCAA+C;AAE/C,MAAsB,eAAgB,SAAQ,yBAAgB;IAC7D,YAAY,OAAe,EAAE,QAAgB;QAC5C,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;CACD;AAJD,0CAIC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BinaryDataFileNotFoundError = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class BinaryDataFileNotFoundError extends n8n_workflow_1.UnexpectedError {
|
|
6
|
+
constructor(fileId) {
|
|
7
|
+
super('Binary data file not found', { extra: { fileId } });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.BinaryDataFileNotFoundError = BinaryDataFileNotFoundError;
|
|
11
|
+
//# sourceMappingURL=binary-data-file-not-found.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-data-file-not-found.error.js","sourceRoot":"","sources":["../../src/errors/binary-data-file-not-found.error.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAE/C,MAAa,2BAA4B,SAAQ,8BAAe;IAC/D,YAAY,MAAc;QACzB,KAAK,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC;CACD;AAJD,kEAIC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DisallowedFilepathError = void 0;
|
|
4
|
+
const filesystem_error_1 = require("./abstract/filesystem.error");
|
|
5
|
+
class DisallowedFilepathError extends filesystem_error_1.FileSystemError {
|
|
6
|
+
constructor(filePath) {
|
|
7
|
+
super('Disallowed path detected', filePath);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.DisallowedFilepathError = DisallowedFilepathError;
|
|
11
|
+
//# sourceMappingURL=disallowed-filepath.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disallowed-filepath.error.js","sourceRoot":"","sources":["../../src/errors/disallowed-filepath.error.ts"],"names":[],"mappings":";;;AAAA,kEAA8D;AAE9D,MAAa,uBAAwB,SAAQ,kCAAe;IAC3D,YAAY,QAAgB;QAC3B,KAAK,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;CACD;AAJD,0DAIC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Logger } from '@n8n/backend-common';
|
|
2
|
+
import { type InstanceType } from '@n8n/constants';
|
|
3
|
+
import type { ReportingOptions } from '@n8n/errors';
|
|
4
|
+
import type { ErrorEvent, EventHint } from '@sentry/core';
|
|
5
|
+
type ErrorReporterInitOptions = {
|
|
6
|
+
serverType: InstanceType | 'task_runner';
|
|
7
|
+
dsn: string;
|
|
8
|
+
release: string;
|
|
9
|
+
environment: string;
|
|
10
|
+
serverName: string;
|
|
11
|
+
releaseDate?: Date;
|
|
12
|
+
withEventLoopBlockDetection: boolean;
|
|
13
|
+
beforeSendFilter?: (event: ErrorEvent, hint: EventHint) => boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare class ErrorReporter {
|
|
16
|
+
private readonly logger;
|
|
17
|
+
private expirationTimer?;
|
|
18
|
+
private seenErrors;
|
|
19
|
+
private report;
|
|
20
|
+
private beforeSendFilter?;
|
|
21
|
+
constructor(logger: Logger);
|
|
22
|
+
private defaultReport;
|
|
23
|
+
shutdown(timeoutInMs?: number): Promise<void>;
|
|
24
|
+
init({ beforeSendFilter, dsn, serverType, release, environment, serverName, releaseDate, withEventLoopBlockDetection, }: ErrorReporterInitOptions): Promise<void>;
|
|
25
|
+
beforeSend(event: ErrorEvent, hint: EventHint): Promise<ErrorEvent | null>;
|
|
26
|
+
error(e: unknown, options?: ReportingOptions): void;
|
|
27
|
+
warn(warning: Error | string, options?: ReportingOptions): void;
|
|
28
|
+
info(msg: string, options?: ReportingOptions): void;
|
|
29
|
+
private wrap;
|
|
30
|
+
private isIgnoredSqliteError;
|
|
31
|
+
private isIgnoredN8nError;
|
|
32
|
+
private extractEventDetailsFromN8nError;
|
|
33
|
+
private getEventLoopBlockIntegration;
|
|
34
|
+
}
|
|
35
|
+
export {};
|