refactor: Format nodes-base package (A-F) (#3800)

* 🔨 prettier formated nodes - A

* 🔨 prettier formated nodes - B

*  prettier formated nodes - C

*  prettier formated nodes - D

*  prettier formated nodes - E-F

* 🎨 Adjust nodes-base formatting command (#3805)

* Format additional files in nodes A-F (#3811)

*  fixes

* 🎨 Add Mindee to ignored dirs

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
Michael Kret
2022-08-01 23:47:55 +03:00
committed by GitHub
parent 2c17e6f3ca
commit 0ecbb4a19d
411 changed files with 12906 additions and 20148 deletions

View File

@@ -1,17 +1,8 @@
import {
IExecuteFunctions,
IHookFunctions,
} from 'n8n-core';
import { IExecuteFunctions, IHookFunctions } from 'n8n-core';
import {
IDataObject,
ILoadOptionsFunctions,
NodeApiError,
} from 'n8n-workflow';
import { IDataObject, ILoadOptionsFunctions, NodeApiError } from 'n8n-workflow';
import {
OptionsWithUri,
} from 'request';
import { OptionsWithUri } from 'request';
/**
* Make an authenticated API request to Bubble.
@@ -23,13 +14,14 @@ export async function bubbleApiRequest(
body: IDataObject,
qs: IDataObject,
) {
const { apiToken, appName, domain, environment, hosting } = await this.getCredentials('bubbleApi') as {
apiToken: string,
appName: string,
domain: string,
environment: 'development' | 'live',
hosting: 'bubbleHosted' | 'selfHosted',
const { apiToken, appName, domain, environment, hosting } = (await this.getCredentials(
'bubbleApi',
)) as {
apiToken: string;
appName: string;
domain: string;
environment: 'development' | 'live';
hosting: 'bubbleHosted' | 'selfHosted';
};
const rootUrl = hosting === 'bubbleHosted' ? `https://${appName}.bubbleapps.io` : domain;
@@ -38,7 +30,7 @@ export async function bubbleApiRequest(
const options: OptionsWithUri = {
headers: {
'user-agent': 'n8n',
'Authorization': `Bearer ${apiToken}`,
Authorization: `Bearer ${apiToken}`,
},
method,
uri: `${rootUrl}${urlSegment}${endpoint}`,
@@ -80,14 +72,13 @@ export async function bubbleApiRequestAllItems(
responseData = await bubbleApiRequest.call(this, method, endpoint, body, qs);
qs.cursor = responseData.cursor;
returnData.push.apply(returnData, responseData['response']['results']);
} while (
responseData.response.remaining !== 0
);
} while (responseData.response.remaining !== 0);
return returnData;
}
export function validateJSON(json: string | undefined): any { // tslint:disable-line:no-any
// tslint:disable-next-line:no-any
export function validateJSON(json: string | undefined): any {
let result;
try {
result = JSON.parse(json!);