refactor: Remove n8n-core dependency in nodes-base (no-changelog) (#5649)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-03-09 18:13:15 +01:00
committed by GitHub
parent 5790e5e719
commit 7a4e9ef5fa
667 changed files with 1848 additions and 1590 deletions

View File

@@ -1,4 +1,3 @@
import { normalizeItems } from 'n8n-core';
import type { NodeVMOptions } from 'vm2';
import { NodeVM } from 'vm2';
import { ValidationError } from './ValidationError';
@@ -23,6 +22,7 @@ export class Sandbox extends NodeVM {
context: ReturnType<typeof getSandboxContext>,
workflowMode: WorkflowExecuteMode,
private nodeMode: CodeNodeMode,
private helpers: IExecuteFunctions['helpers'],
) {
super(Sandbox.getSandboxOptions(context, workflowMode));
}
@@ -138,7 +138,7 @@ export class Sandbox extends NodeVM {
}
}
return normalizeItems(executionResult as INodeExecutionData[]);
return this.helpers.normalizeItems(executionResult as INodeExecutionData[]);
}
private async runCodeEachItem() {