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

@@ -128,6 +128,7 @@ import {
setAllWorkflowExecutionMetadata,
setWorkflowExecutionMetadata,
} from './WorkflowExecutionMetadata';
import { getUserN8nFolderPath } from './UserSettings';
axios.defaults.timeout = 300000;
// Prevent axios from adding x-form-www-urlencoded headers by default
@@ -2245,6 +2246,9 @@ const getFileSystemHelperFunctions = (node: INode): FileSystemHelperFunctions =>
}
return createReadStream(filePath);
},
getStoragePath() {
return path.join(getUserN8nFolderPath(), `storage/${node.type}`);
},
});
const getNodeHelperFunctions = ({