n8n-3867-progressively-apply-prettier-to-all (#3873)

* 🔨 formatting nodes with prettier
This commit is contained in:
Michael Kret
2022-08-17 18:50:24 +03:00
committed by GitHub
parent f2d326c7f0
commit 91d7e16c81
1072 changed files with 42357 additions and 59109 deletions

View File

@@ -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 {