fix(core): Fix supportedNodes for non-lazy loaded community packages (no-changelog) (#11329)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-12-10 14:48:39 +01:00
committed by GitHub
parent 1c52bf9362
commit 2d36b42798
28 changed files with 1435 additions and 586 deletions

View File

@@ -2015,7 +2015,6 @@ export interface IWebhookDescription {
responseData?: WebhookResponseData | string;
restartWebhook?: boolean;
isForm?: boolean;
hasLifecycleMethods?: boolean; // set automatically by generate-ui-types
ndvHideUrl?: string | boolean; // If true the webhook will not be displayed in the editor
ndvHideMethod?: string | boolean; // If true the method will not be displayed in the editor
}

View File

@@ -1,14 +1,10 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-use-before-define */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
/* eslint-disable prefer-spread */
import get from 'lodash/get';
import isEqual from 'lodash/isEqual';
import uniqBy from 'lodash/uniqBy';
import { SINGLE_EXECUTION_NODES } from './Constants';
import { ApplicationError } from './errors/application.error';
@@ -1972,40 +1968,6 @@ export function getVersionedNodeType(
return object;
}
export function getVersionedNodeTypeAll(object: IVersionedNodeType | INodeType): INodeType[] {
if ('nodeVersions' in object) {
return uniqBy(
Object.values(object.nodeVersions)
.map((element) => {
element.description.name = object.description.name;
element.description.codex = object.description.codex;
return element;
})
.reverse(),
(node) => {
const { version } = node.description;
return Array.isArray(version) ? version.join(',') : version.toString();
},
);
}
return [object];
}
export function getCredentialsForNode(
object: IVersionedNodeType | INodeType,
): INodeCredentialDescription[] {
if ('nodeVersions' in object) {
return uniqBy(
Object.values(object.nodeVersions).flatMap(
(version) => version.description.credentials ?? [],
),
'name',
);
}
return object.description.credentials ?? [];
}
export function isSingleExecution(type: string, parameters: INodeParameters): boolean {
const singleExecutionCase = SINGLE_EXECUTION_NODES[type];