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

@@ -6,7 +6,6 @@ import {
NodeOperationError,
} from 'n8n-workflow';
export class Interval implements INodeType {
description: INodeTypeDescription = {
displayName: 'Interval',
@@ -16,7 +15,8 @@ export class Interval implements INodeType {
version: 1,
description: 'Triggers the workflow in a given interval',
eventTriggerDescription: '',
activationMessage: 'Your interval trigger will now trigger executions on the schedule you have defined.',
activationMessage:
'Your interval trigger will now trigger executions on the schedule you have defined.',
defaults: {
name: 'Interval',
color: '#00FF00',
@@ -26,7 +26,8 @@ export class Interval implements INodeType {
outputs: ['main'],
properties: [
{
displayName: 'This workflow will run on the schedule you define here once you <a data-key="activate">activate</a> it.<br><br>For testing, you can also trigger it manually: by going back to the canvas and clicking execute workflow',
displayName:
'This workflow will run on the schedule you define here once you <a data-key="activate">activate</a> it.<br><br>For testing, you can also trigger it manually: by going back to the canvas and clicking execute workflow',
name: 'notice',
type: 'notice',
default: '',
@@ -65,14 +66,15 @@ export class Interval implements INodeType {
],
};
async trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {
const interval = this.getNodeParameter('interval') as number;
const unit = this.getNodeParameter('unit') as string;
if (interval <= 0) {
throw new NodeOperationError(this.getNode(), 'The interval has to be set to at least 1 or higher!');
throw new NodeOperationError(
this.getNode(),
'The interval has to be set to at least 1 or higher!',
);
}
let intervalValue = interval;
@@ -108,6 +110,5 @@ export class Interval implements INodeType {
closeFunction,
manualTriggerFunction,
};
}
}