mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
fix(core): Show webhook urls for all webhook nodes (no-changelog) (#7783)
This reverts parts of https://github.com/n8n-io/n8n/pull/7113
This commit is contained in:
parent
50f568560f
commit
96fd2c51bd
|
@ -26,21 +26,6 @@ function findReferencedMethods(obj, refs = {}, latestName = '') {
|
||||||
return refs;
|
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 () => {
|
(async () => {
|
||||||
const loader = new PackageDirectoryLoader(packageDir);
|
const loader = new PackageDirectoryLoader(packageDir);
|
||||||
await loader.loadAll();
|
await loader.loadAll();
|
||||||
|
@ -79,7 +64,6 @@ function addWebhookLifecycle(nodeType) {
|
||||||
.map((data) => {
|
.map((data) => {
|
||||||
const nodeType = NodeHelpers.getVersionedNodeType(data.type);
|
const nodeType = NodeHelpers.getVersionedNodeType(data.type);
|
||||||
NodeHelpers.applySpecialNodeParameters(nodeType);
|
NodeHelpers.applySpecialNodeParameters(nodeType);
|
||||||
addWebhookLifecycle(nodeType);
|
|
||||||
return data.type;
|
return data.type;
|
||||||
})
|
})
|
||||||
.flatMap((nodeType) =>
|
.flatMap((nodeType) =>
|
||||||
|
|
|
@ -94,7 +94,7 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
return (this.nodeType as INodeTypeDescription).webhooks!.filter(
|
return (this.nodeType as INodeTypeDescription).webhooks!.filter(
|
||||||
(webhookData) => webhookData.restartWebhook !== true && !webhookData.hasLifecycleMethods,
|
(webhookData) => webhookData.restartWebhook !== true,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
baseText() {
|
baseText() {
|
||||||
|
|
|
@ -1650,7 +1650,6 @@ export interface IWebhookDescription {
|
||||||
responseMode?: WebhookResponseMode | string;
|
responseMode?: WebhookResponseMode | string;
|
||||||
responseData?: WebhookResponseData | string;
|
responseData?: WebhookResponseData | string;
|
||||||
restartWebhook?: boolean;
|
restartWebhook?: boolean;
|
||||||
hasLifecycleMethods?: boolean; // set automatically by generate-ui-types
|
|
||||||
ndvHideUrl?: boolean; // If true the webhook will not be displayed in the editor
|
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
|
ndvHideMethod?: boolean; // If true the method will not be displayed in the editor
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue