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,22 +1,10 @@
import {
Credentials,
IExecuteFunctions,
} from 'n8n-core';
import { Credentials, IExecuteFunctions } from 'n8n-core';
import {
IDataObject,
ILoadOptionsFunctions,
NodeApiError,
NodeOperationError,
} from 'n8n-workflow';
import { IDataObject, ILoadOptionsFunctions, NodeApiError, NodeOperationError } from 'n8n-workflow';
import {
OptionsWithUri,
} from 'request';
import { OptionsWithUri } from 'request';
import {
LoaderGetResponse,
} from './types';
import { LoaderGetResponse } from './types';
export async function monicaCrmApiRequest(
this: IExecuteFunctions | ILoadOptionsFunctions,
@@ -25,7 +13,11 @@ export async function monicaCrmApiRequest(
body: IDataObject = {},
qs: IDataObject = {},
) {
const credentials = await this.getCredentials('monicaCrmApi') as { apiToken: string, environment: string, domain: string };
const credentials = (await this.getCredentials('monicaCrmApi')) as {
apiToken: string;
environment: string;
domain: string;
};
if (credentials === undefined) {
throw new NodeOperationError(this.getNode(), 'No credentials got returned!');
@@ -96,8 +88,7 @@ export async function monicaCrmApiRequestAllItems(
/**
* Get day, month, and year from the n8n UI datepicker.
*/
export const getDateParts = (date: string) =>
date.split('T')[0].split('-').map(Number).reverse();
export const getDateParts = (date: string) => date.split('T')[0].split('-').map(Number).reverse();
export const toOptions = (response: LoaderGetResponse) =>
response.data.map(({ id, name }) => ({ value: id, name }));