mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix: Remove Request Options from sub nodes (no-changelog) (#9853)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -10,6 +10,7 @@ import get from 'lodash/get';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import uniqBy from 'lodash/uniqBy';
|
||||
|
||||
import { NodeConnectionType } from './Interfaces';
|
||||
import type {
|
||||
FieldType,
|
||||
IContextObject,
|
||||
@@ -351,8 +352,31 @@ const declarativeNodeOptionParameters: INodeProperties = {
|
||||
],
|
||||
};
|
||||
|
||||
/**
|
||||
* Determines if the provided node type has any output types other than the main connection type.
|
||||
* @param typeDescription The node's type description to check.
|
||||
*/
|
||||
export function isSubNodeType(
|
||||
typeDescription: Pick<INodeTypeDescription, 'outputs'> | null,
|
||||
): boolean {
|
||||
if (!typeDescription || !typeDescription.outputs || typeof typeDescription.outputs === 'string') {
|
||||
return false;
|
||||
}
|
||||
const outputTypes = getConnectionTypes(typeDescription.outputs);
|
||||
return outputTypes
|
||||
? outputTypes.filter((output) => output !== NodeConnectionType.Main).length > 0
|
||||
: false;
|
||||
}
|
||||
|
||||
/** Augments additional `Request Options` property on declarative node-type */
|
||||
export function applyDeclarativeNodeOptionParameters(nodeType: INodeType): void {
|
||||
if (nodeType.execute || nodeType.trigger || nodeType.webhook || nodeType.description.polling) {
|
||||
if (
|
||||
nodeType.execute ||
|
||||
nodeType.trigger ||
|
||||
nodeType.webhook ||
|
||||
nodeType.description.polling ||
|
||||
isSubNodeType(nodeType.description)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user