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,17 +1,8 @@
import {
IExecuteFunctions,
IHookFunctions,
} from 'n8n-core';
import { IExecuteFunctions, IHookFunctions } from 'n8n-core';
import {
IDataObject,
NodeApiError,
NodeOperationError,
} from 'n8n-workflow';
import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
import {
OptionsWithUri,
} from 'request';
import { OptionsWithUri } from 'request';
/**
* Make an API request to Sms77
@@ -22,7 +13,14 @@ import {
* @param {object | undefined} data
* @returns {Promise<any>}
*/
export async function sms77ApiRequest(this: IHookFunctions | IExecuteFunctions, method: string, endpoint: string, body: IDataObject, qs: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
export async function sms77ApiRequest(
this: IHookFunctions | IExecuteFunctions,
method: string,
endpoint: string,
body: IDataObject,
qs: IDataObject = {},
// tslint:disable-next-line:no-any
): Promise<any> {
const options: OptionsWithUri = {
headers: {
SentWith: 'n8n',
@@ -41,7 +39,9 @@ export async function sms77ApiRequest(this: IHookFunctions | IExecuteFunctions,
const response = await this.helpers.requestWithAuthentication.call(this, 'sms77Api', options);
if (response.success !== '100') {
throw new NodeApiError(this.getNode(), response, { message: 'Invalid sms77 credentials or API error!' });
throw new NodeApiError(this.getNode(), response, {
message: 'Invalid sms77 credentials or API error!',
});
}
return response;

View File

@@ -1,6 +1,4 @@
import {
IExecuteFunctions,
} from 'n8n-core';
import { IExecuteFunctions } from 'n8n-core';
import {
IDataObject,
@@ -10,9 +8,7 @@ import {
NodeOperationError,
} from 'n8n-workflow';
import {
sms77ApiRequest,
} from './GenericFunctions';
import { sms77ApiRequest } from './GenericFunctions';
export class Sms77 implements INodeType {
description: INodeTypeDescription = {
@@ -62,9 +58,7 @@ export class Sms77 implements INodeType {
noDataExpression: true,
displayOptions: {
show: {
resource: [
'sms',
],
resource: ['sms'],
},
},
options: [
@@ -84,9 +78,7 @@ export class Sms77 implements INodeType {
noDataExpression: true,
displayOptions: {
show: {
resource: [
'voice',
],
resource: ['voice'],
},
},
options: [
@@ -107,15 +99,12 @@ export class Sms77 implements INodeType {
placeholder: '+4901234567890',
displayOptions: {
show: {
operation: [
'send',
],
resource: [
'sms',
],
operation: ['send'],
resource: ['sms'],
},
},
description: 'The caller ID displayed in the receivers display. Max 16 numeric or 11 alphanumeric characters.',
description:
'The caller ID displayed in the receivers display. Max 16 numeric or 11 alphanumeric characters.',
},
{
displayName: 'To',
@@ -126,16 +115,12 @@ export class Sms77 implements INodeType {
required: true,
displayOptions: {
show: {
operation: [
'send',
],
resource: [
'sms',
'voice',
],
operation: ['send'],
resource: ['sms', 'voice'],
},
},
description: 'The number of your recipient(s) separated by comma. Can be regular numbers or contact/groups from Sms77.',
description:
'The number of your recipient(s) separated by comma. Can be regular numbers or contact/groups from Sms77.',
},
{
displayName: 'Message',
@@ -148,13 +133,8 @@ export class Sms77 implements INodeType {
},
displayOptions: {
show: {
operation: [
'send',
],
resource: [
'sms',
'voice',
],
operation: ['send'],
resource: ['sms', 'voice'],
},
},
description: 'The message to send. Max. 1520 characters',
@@ -167,12 +147,8 @@ export class Sms77 implements INodeType {
default: {},
displayOptions: {
show: {
operation: [
'send',
],
resource: [
'sms',
],
operation: ['send'],
resource: ['sms'],
},
},
options: [
@@ -204,7 +180,7 @@ export class Sms77 implements INodeType {
type: 'boolean',
default: false,
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
description: 'Send as flash message being displayed directly the receiver\'s display',
description: "Send as flash message being displayed directly the receiver's display",
},
{
displayName: 'Label',
@@ -226,7 +202,8 @@ export class Sms77 implements INodeType {
name: 'performance_tracking',
type: 'boolean',
default: false,
description: 'Whether to enable performance tracking for URLs found in the message text',
description:
'Whether to enable performance tracking for URLs found in the message text',
},
{
displayName: 'TTL',
@@ -236,7 +213,8 @@ export class Sms77 implements INodeType {
typeOptions: {
minValue: 1,
},
description: 'Custom time to live specifying the validity period of a message in minutes',
description:
'Custom time to live specifying the validity period of a message in minutes',
},
],
},
@@ -248,12 +226,8 @@ export class Sms77 implements INodeType {
default: {},
displayOptions: {
show: {
operation: [
'send',
],
resource: [
'voice',
],
operation: ['send'],
resource: ['voice'],
},
},
options: [
@@ -270,7 +244,8 @@ export class Sms77 implements INodeType {
type: 'string',
default: '',
placeholder: '+4901234567890',
description: 'The caller ID. Please use only verified sender IDs, one of your virtual inbound numbers or one of our shared virtual numbers.',
description:
'The caller ID. Please use only verified sender IDs, one of your virtual inbound numbers or one of our shared virtual numbers.',
},
{
displayName: 'XML',
@@ -327,7 +302,6 @@ export class Sms77 implements INodeType {
} else if (responseData !== undefined) {
returnData.push(responseData as IDataObject);
}
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });