mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
import { ITriggerFunctions } from 'n8n-core';
|
||||
import {
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
ITriggerResponse,
|
||||
} from 'n8n-workflow';
|
||||
import { INodeType, INodeTypeDescription, ITriggerResponse } from 'n8n-workflow';
|
||||
|
||||
type eventType = 'Workflow activated' | 'Workflow updated' | undefined;
|
||||
type activationType = 'activate' | 'update';
|
||||
@@ -53,7 +49,6 @@ export class WorkflowTrigger implements INodeType {
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
async trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {
|
||||
const events = this.getNodeParameter('events', []) as activationType[];
|
||||
|
||||
@@ -69,14 +64,22 @@ export class WorkflowTrigger implements INodeType {
|
||||
}
|
||||
this.emit([
|
||||
this.helpers.returnJsonArray([
|
||||
{ event, timestamp: (new Date()).toISOString(), workflow_id: this.getWorkflow().id },
|
||||
{ event, timestamp: new Date().toISOString(), workflow_id: this.getWorkflow().id },
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
const self = this;
|
||||
async function manualTriggerFunction() {
|
||||
self.emit([self.helpers.returnJsonArray([{ event: 'Manual execution', timestamp: (new Date()).toISOString(), workflow_id: self.getWorkflow().id }])]);
|
||||
self.emit([
|
||||
self.helpers.returnJsonArray([
|
||||
{
|
||||
event: 'Manual execution',
|
||||
timestamp: new Date().toISOString(),
|
||||
workflow_id: self.getWorkflow().id,
|
||||
},
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user