mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user