fix(Code Node): Consistent redirection of stdout for JS and Python sandboxes (#6818)

Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-08-01 17:47:43 +02:00
committed by GitHub
parent 34df8b6238
commit f718c2291f
5 changed files with 28 additions and 31 deletions

View File

@@ -1,3 +1,4 @@
import { EventEmitter } from 'events';
import { ValidationError } from './ValidationError';
import { isObject } from './utils';
@@ -31,12 +32,14 @@ export function getSandboxContext(this: IExecuteFunctions, index: number): Sandb
};
}
export abstract class Sandbox {
export abstract class Sandbox extends EventEmitter {
constructor(
private textKeys: SandboxTextKeys,
protected itemIndex: number | undefined,
protected helpers: IExecuteFunctions['helpers'],
) {}
) {
super();
}
abstract runCodeAllItems(): Promise<INodeExecutionData[]>;