mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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 = 'Instance started' | undefined;
|
||||
|
||||
@@ -29,7 +25,8 @@ export class N8nTrigger implements INodeType {
|
||||
type: 'multiOptions',
|
||||
required: true,
|
||||
default: [],
|
||||
description: 'Specifies under which conditions an execution should happen: <b>Instance started</b>: Triggers when this n8n instance is started or re-started',
|
||||
description:
|
||||
'Specifies under which conditions an execution should happen: <b>Instance started</b>: Triggers when this n8n instance is started or re-started',
|
||||
options: [
|
||||
{
|
||||
name: 'Instance Started',
|
||||
@@ -41,7 +38,6 @@ export class N8nTrigger implements INodeType {
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
async trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {
|
||||
const events = this.getNodeParameter('events', []) as string[];
|
||||
|
||||
@@ -54,14 +50,22 @@ export class N8nTrigger 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