fix(editor): Make the frontend work again when NODE_FUNCTION_ALLOW_EXTERNAL is set (no-changelog) (#6058)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-04-25 16:18:46 +00:00 committed by GitHub
parent 70aaf24784
commit 6335e0938d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -16,6 +16,7 @@ if (inE2ETests) {
N8N_PUBLIC_API_DISABLED: 'true',
EXTERNAL_FRONTEND_HOOKS_URLS: '',
N8N_PERSONALIZATION_ENABLED: 'false',
NODE_FUNCTION_ALLOW_EXTERNAL: 'node-fetch',
};
} else if (inTest) {
process.env.N8N_PUBLIC_API_DISABLED = 'true';

View file

@ -235,11 +235,8 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, {
setPromptsData(promptsData: IN8nPrompts): void {
Vue.set(this, 'promptsData', promptsData);
},
setAllowedModules(allowedModules: { builtIn?: string; external?: string }): void {
this.settings.allowedModules = {
...(allowedModules.builtIn && { builtIn: allowedModules.builtIn.split(',') }),
...(allowedModules.external && { external: allowedModules.external.split(',') }),
};
setAllowedModules(allowedModules: { builtIn?: string[]; external?: string[] }): void {
this.settings.allowedModules = allowedModules;
},
async fetchPromptsData(): Promise<void> {
if (!this.isTelemetryEnabled) {