From 96fd2c51bd702419c84cb4708484358902715bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Wed, 22 Nov 2023 17:45:26 +0100 Subject: [PATCH] fix(core): Show webhook urls for all webhook nodes (no-changelog) (#7783) This reverts parts of https://github.com/n8n-io/n8n/pull/7113 --- packages/core/bin/generate-ui-types | 16 ---------------- .../editor-ui/src/components/NodeWebhooks.vue | 2 +- packages/workflow/src/Interfaces.ts | 1 - 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/core/bin/generate-ui-types b/packages/core/bin/generate-ui-types index 681cd809dd..988462d604 100755 --- a/packages/core/bin/generate-ui-types +++ b/packages/core/bin/generate-ui-types @@ -26,21 +26,6 @@ function findReferencedMethods(obj, refs = {}, latestName = '') { return refs; } -function addWebhookLifecycle(nodeType) { - if (nodeType.description.webhooks) { - nodeType.description.webhooks = nodeType.description.webhooks.map((webhook) => { - const webhookMethods = - nodeType?.webhookMethods?.[webhook.name] ?? nodeType?.webhookMethods?.default; - webhook.hasLifecycleMethods = Boolean( - webhookMethods?.checkExists && webhookMethods?.create && webhookMethods?.delete, - ); - return webhook; - }); - } - - return nodeType; -} - (async () => { const loader = new PackageDirectoryLoader(packageDir); await loader.loadAll(); @@ -79,7 +64,6 @@ function addWebhookLifecycle(nodeType) { .map((data) => { const nodeType = NodeHelpers.getVersionedNodeType(data.type); NodeHelpers.applySpecialNodeParameters(nodeType); - addWebhookLifecycle(nodeType); return data.type; }) .flatMap((nodeType) => diff --git a/packages/editor-ui/src/components/NodeWebhooks.vue b/packages/editor-ui/src/components/NodeWebhooks.vue index 0fec295a7f..2e7e31bfe6 100644 --- a/packages/editor-ui/src/components/NodeWebhooks.vue +++ b/packages/editor-ui/src/components/NodeWebhooks.vue @@ -94,7 +94,7 @@ export default defineComponent({ } return (this.nodeType as INodeTypeDescription).webhooks!.filter( - (webhookData) => webhookData.restartWebhook !== true && !webhookData.hasLifecycleMethods, + (webhookData) => webhookData.restartWebhook !== true, ); }, baseText() { diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index 6e7ce8d5e2..4b35633ec8 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -1650,7 +1650,6 @@ export interface IWebhookDescription { responseMode?: WebhookResponseMode | string; responseData?: WebhookResponseData | string; restartWebhook?: boolean; - hasLifecycleMethods?: boolean; // set automatically by generate-ui-types ndvHideUrl?: boolean; // If true the webhook will not be displayed in the editor ndvHideMethod?: boolean; // If true the method will not be displayed in the editor }