refactor(core): Move more code out of NodeExecutionFunctions, and add unit tests (no-changelog) (#13131)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-02-07 17:35:51 +01:00
committed by GitHub
parent ccdca6b39f
commit 4577ce0846
26 changed files with 2254 additions and 1688 deletions

View File

@@ -28,18 +28,20 @@ import {
copyInputItems,
normalizeItems,
constructExecutionMetaData,
assertBinaryData,
getBinaryDataBuffer,
copyBinaryFile,
getRequestHelperFunctions,
getBinaryHelperFunctions,
getSSHTunnelFunctions,
getFileSystemHelperFunctions,
getCheckProcessedHelperFunctions,
detectBinaryEncoding,
} from '@/node-execute-functions';
import { BaseExecuteContext } from './base-execute-context';
import {
assertBinaryData,
getBinaryDataBuffer,
copyBinaryFile,
getBinaryHelperFunctions,
detectBinaryEncoding,
} from './utils/binary-helper-functions';
import { getDeduplicationHelperFunctions } from './utils/deduplication-helper-functions';
import { getFileSystemHelperFunctions } from './utils/file-system-helper-functions';
import { getInputConnectionData } from './utils/get-input-connection-data';
export class ExecuteContext extends BaseExecuteContext implements IExecuteFunctions {
@@ -91,7 +93,7 @@ export class ExecuteContext extends BaseExecuteContext implements IExecuteFuncti
...getBinaryHelperFunctions(additionalData, workflow.id),
...getSSHTunnelFunctions(),
...getFileSystemHelperFunctions(node),
...getCheckProcessedHelperFunctions(workflow, node),
...getDeduplicationHelperFunctions(workflow, node),
assertBinaryData: (itemIndex, propertyName) =>
assertBinaryData(inputData, node, itemIndex, propertyName, 0),