mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
⚡ Make it possible to set credentials to fixed values
This commit is contained in:
@@ -2,6 +2,7 @@ import { set } from 'lodash';
|
||||
|
||||
import {
|
||||
ICredentialDataDecryptedObject,
|
||||
ICredentialsHelper,
|
||||
IExecuteWorkflowInfo,
|
||||
INodeExecutionData,
|
||||
INodeParameters,
|
||||
@@ -16,11 +17,25 @@ import {
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
Credentials,
|
||||
IDeferredPromise,
|
||||
IExecuteFunctions,
|
||||
} from '../src';
|
||||
|
||||
|
||||
export class CredentialsHelper extends ICredentialsHelper {
|
||||
getDecrypted(name: string, type: string): ICredentialDataDecryptedObject {
|
||||
return {};
|
||||
}
|
||||
|
||||
getCredentials(name: string, type: string): Credentials {
|
||||
return new Credentials('', '', [], '');
|
||||
}
|
||||
|
||||
async updateCredentials(name: string, type: string, data: ICredentialDataDecryptedObject): Promise<void> {}
|
||||
}
|
||||
|
||||
|
||||
class NodeTypesClass implements INodeTypes {
|
||||
|
||||
nodeTypes: INodeTypeData = {
|
||||
@@ -276,12 +291,12 @@ export function WorkflowExecuteAdditionalData(waitPromise: IDeferredPromise<IRun
|
||||
|
||||
return {
|
||||
credentials: {},
|
||||
credentialsHelper: new CredentialsHelper({}, ''),
|
||||
hooks: new WorkflowHooks(hookFunctions, 'trigger', '1', workflowData),
|
||||
executeWorkflow: async (workflowInfo: IExecuteWorkflowInfo): Promise<any> => {}, // tslint:disable-line:no-any
|
||||
restApiUrl: '',
|
||||
encryptionKey: 'test',
|
||||
timezone: 'America/New_York',
|
||||
updateCredentials: async (name: string, type: string, data: ICredentialDataDecryptedObject, encryptionKey: string): Promise<void> => {},
|
||||
webhookBaseUrl: 'webhook',
|
||||
webhookTestBaseUrl: 'webhook-test',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user