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,11 +1,6 @@
import {
OptionsWithUri,
} from 'request';
import { OptionsWithUri } from 'request';
import {
IExecuteFunctions,
ILoadOptionsFunctions,
} from 'n8n-core';
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core';
import {
IDataObject,
@@ -15,15 +10,22 @@ import {
NodeOperationError,
} from 'n8n-workflow';
export async function postmarkApiRequest(this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method : string, endpoint : string, body: any = {}, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
export async function postmarkApiRequest(
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,
method: string,
endpoint: string,
// tslint:disable-next-line:no-any
body: any = {},
option: IDataObject = {},
// tslint:disable-next-line:no-any
): Promise<any> {
const credentials = await this.getCredentials('postmarkApi');
let options: OptionsWithUri = {
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Postmark-Server-Token' : credentials.serverToken,
Accept: 'application/json',
'X-Postmark-Server-Token': credentials.serverToken,
},
method,
body,
@@ -43,9 +45,9 @@ export async function postmarkApiRequest(this: IExecuteFunctions | IWebhookFunct
}
// tslint:disable-next-line: no-any
export function convertTriggerObjectToStringArray (webhookObject : any) : string[] {
export function convertTriggerObjectToStringArray(webhookObject: any): string[] {
const triggers = webhookObject.Triggers;
const webhookEvents : string[] = [];
const webhookEvents: string[] = [];
// Translate Webhook trigger settings to string array
if (triggers.Open.Enabled) {
@@ -81,7 +83,7 @@ export function convertTriggerObjectToStringArray (webhookObject : any) : string
return webhookEvents;
}
export function eventExists (currentEvents : string[], webhookEvents: string[]) {
export function eventExists(currentEvents: string[], webhookEvents: string[]) {
for (const currentEvent of currentEvents) {
if (!webhookEvents.includes(currentEvent)) {
return false;