feat(editor): Add HTTP request nodes for credentials without a node (#7157)
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -17,8 +17,8 @@ export class CredentialTypes implements ICredentialTypes {
|
||||
return this.getCredential(credentialType).type;
|
||||
}
|
||||
|
||||
getNodeTypesToTestWith(type: string): string[] {
|
||||
return this.loadNodesAndCredentials.knownCredentials[type]?.nodesToTestWith ?? [];
|
||||
getSupportedNodes(type: string): string[] {
|
||||
return this.loadNodesAndCredentials.knownCredentials[type]?.supportedNodes ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -490,8 +490,8 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
};
|
||||
}
|
||||
|
||||
const nodeTypesToTestWith = this.credentialTypes.getNodeTypesToTestWith(credentialType);
|
||||
for (const nodeName of nodeTypesToTestWith) {
|
||||
const supportedNodes = this.credentialTypes.getSupportedNodes(credentialType);
|
||||
for (const nodeName of supportedNodes) {
|
||||
const node = this.nodeTypes.getByName(nodeName);
|
||||
|
||||
// Always set to an array even if node is not versioned to not having
|
||||
|
||||
@@ -290,15 +290,15 @@ export class LoadNodesAndCredentials {
|
||||
const {
|
||||
className,
|
||||
sourcePath,
|
||||
nodesToTestWith,
|
||||
supportedNodes,
|
||||
extends: extendsArr,
|
||||
} = known.credentials[type];
|
||||
this.known.credentials[type] = {
|
||||
className,
|
||||
sourcePath: path.join(directory, sourcePath),
|
||||
nodesToTestWith:
|
||||
supportedNodes:
|
||||
loader instanceof PackageDirectoryLoader
|
||||
? nodesToTestWith?.map((nodeName) => `${loader.packageName}.${nodeName}`)
|
||||
? supportedNodes?.map((nodeName) => `${loader.packageName}.${nodeName}`)
|
||||
: undefined,
|
||||
extends: extendsArr,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user