fix(Code Node): Install python modules always in a user-writable folder (#6568)

* upgrade pyodide

* install pyodide modules to a custom user-writable path

* in `augmentObject` `newData` is never undefined
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-07-07 16:43:45 +02:00
committed by GitHub
parent 071e56f7fd
commit bf351243df
15 changed files with 98 additions and 77 deletions

View File

@@ -108,10 +108,8 @@ export class Code implements INodeType {
}
if (language === 'python') {
const modules = this.getNodeParameter('modules', index) as string;
const moduleImports: string[] = modules ? modules.split(',').map((m) => m.trim()) : [];
context.printOverwrite = workflowMode === 'manual' ? this.sendMessageToUI : null;
return new PythonSandbox(context, code, moduleImports, index, this.helpers);
return new PythonSandbox(context, code, index, this.helpers);
} else {
const sandbox = new JavaScriptSandbox(context, code, index, workflowMode, this.helpers);
if (workflowMode === 'manual') {