mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
fix: Lazy load nodes for credentials testing (#4760)
This commit is contained in:
committed by
GitHub
parent
3d67df490c
commit
0a7a2f3e41
@@ -181,11 +181,7 @@ export interface IHttpRequestHelper {
|
||||
helpers: { httpRequest: IAllExecuteFunctions['helpers']['httpRequest'] };
|
||||
}
|
||||
export abstract class ICredentialsHelper {
|
||||
encryptionKey: string;
|
||||
|
||||
constructor(encryptionKey: string) {
|
||||
this.encryptionKey = encryptionKey;
|
||||
}
|
||||
constructor(readonly encryptionKey: string) {}
|
||||
|
||||
abstract getParentTypes(name: string): string[];
|
||||
|
||||
@@ -329,6 +325,7 @@ export interface ICredentialType {
|
||||
export interface ICredentialTypes {
|
||||
recognizes(credentialType: string): boolean;
|
||||
getByName(credentialType: string): ICredentialType;
|
||||
getNodeTypesToTestWith(type: string): string[];
|
||||
}
|
||||
|
||||
// The way the credentials get saved in the database (data encrypted)
|
||||
@@ -1209,7 +1206,6 @@ export interface INodeCredentialTestResult {
|
||||
}
|
||||
|
||||
export interface INodeCredentialTestRequest {
|
||||
nodeToTestWith?: string; // node name i.e. slack
|
||||
credentials: ICredentialsDecrypted;
|
||||
}
|
||||
|
||||
@@ -1474,18 +1470,24 @@ export type WebhookResponseData = 'allEntries' | 'firstEntryJson' | 'firstEntryB
|
||||
export type WebhookResponseMode = 'onReceived' | 'lastNode';
|
||||
|
||||
export interface INodeTypes {
|
||||
getAll(): Array<INodeType | IVersionedNodeType>;
|
||||
getByNameAndVersion(nodeType: string, version?: number): INodeType | undefined;
|
||||
getByName(nodeType: string): INodeType | IVersionedNodeType;
|
||||
getByNameAndVersion(nodeType: string, version?: number): INodeType;
|
||||
}
|
||||
|
||||
export type LoadingDetails = {
|
||||
type LoadingDetails = {
|
||||
className: string;
|
||||
sourcePath: string;
|
||||
};
|
||||
|
||||
export type CredentialLoadingDetails = LoadingDetails & {
|
||||
nodesToTestWith?: string[];
|
||||
};
|
||||
|
||||
export type NodeLoadingDetails = LoadingDetails;
|
||||
|
||||
export type KnownNodesAndCredentials = {
|
||||
nodes: Record<string, LoadingDetails>;
|
||||
credentials: Record<string, LoadingDetails>;
|
||||
nodes: Record<string, NodeLoadingDetails>;
|
||||
credentials: Record<string, CredentialLoadingDetails>;
|
||||
};
|
||||
|
||||
export interface LoadedClass<T> {
|
||||
|
||||
Reference in New Issue
Block a user