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,6 +1,4 @@
import {
IPollFunctions,
} from 'n8n-core';
import { IPollFunctions } from 'n8n-core';
import {
IDataObject,
@@ -10,10 +8,7 @@ import {
NodeOperationError,
} from 'n8n-workflow';
import {
apiRequestAllItems,
downloadRecordAttachments,
} from './GenericFunctions';
import { apiRequestAllItems, downloadRecordAttachments } from './GenericFunctions';
import moment from 'moment';
@@ -60,7 +55,8 @@ export class AirtableTrigger implements INodeType {
name: 'triggerField',
type: 'string',
default: '',
description: 'A Created Time or Last Modified Time field that will be used to sort records. If you do not have a Created Time or Last Modified Time field in your schema, please create one, because without this field trigger will not work correctly.',
description:
'A Created Time or Last Modified Time field that will be used to sort records. If you do not have a Created Time or Last Modified Time field in your schema, please create one, because without this field trigger will not work correctly.',
required: true,
},
{
@@ -68,7 +64,7 @@ export class AirtableTrigger implements INodeType {
name: 'downloadAttachments',
type: 'boolean',
default: false,
description: 'Whether the attachment fields define in \'Download Fields\' will be downloaded',
description: "Whether the attachment fields define in 'Download Fields' will be downloaded",
},
{
displayName: 'Download Fields',
@@ -77,13 +73,12 @@ export class AirtableTrigger implements INodeType {
required: true,
displayOptions: {
show: {
downloadAttachments: [
true,
],
downloadAttachments: [true],
},
},
default: '',
description: 'Name of the fields of type \'attachment\' that should be downloaded. Multiple ones can be defined separated by comma. Case sensitive.',
description:
"Name of the fields of type 'attachment' that should be downloaded. Multiple ones can be defined separated by comma. Case sensitive.",
},
{
displayName: 'Additional Fields',
@@ -98,21 +93,24 @@ export class AirtableTrigger implements INodeType {
type: 'string',
default: '',
// eslint-disable-next-line n8n-nodes-base/node-param-description-miscased-id
description: 'Fields to be included in the response. Multiple ones can be set separated by comma. Example: <code>name, id</code>. By default just the trigger field will be included.',
description:
'Fields to be included in the response. Multiple ones can be set separated by comma. Example: <code>name, id</code>. By default just the trigger field will be included.',
},
{
displayName: 'Formula',
name: 'formula',
type: 'string',
default: '',
description: 'Formulas may involve functions, numeric operations, logical operations, and text operations that operate on fields. More info <a href="https://support.airtable.com/hc/en-us/articles/203255215-Formula-Field-Reference">here</a>.',
description:
'Formulas may involve functions, numeric operations, logical operations, and text operations that operate on fields. More info <a href="https://support.airtable.com/hc/en-us/articles/203255215-Formula-Field-Reference">here</a>.',
},
{
displayName: 'View ID',
name: 'viewId',
type: 'string',
default: '',
description: 'The name or ID of a view in the table. If set, only the records in that view will be returned.',
description:
'The name or ID of a view in the table. If set, only the records in that view will be returned.',
},
],
},
@@ -138,7 +136,7 @@ export class AirtableTrigger implements INodeType {
const now = moment().utc().format();
const startDate = webhookData.lastTimeChecked as string || now;
const startDate = (webhookData.lastTimeChecked as string) || now;
const endDate = now;
@@ -171,7 +169,9 @@ export class AirtableTrigger implements INodeType {
}
if (downloadAttachments === true) {
const downloadFieldNames = (this.getNodeParameter('downloadFieldNames', 0) as string).split(',');
const downloadFieldNames = (this.getNodeParameter('downloadFieldNames', 0) as string).split(
',',
);
const data = await downloadRecordAttachments.call(this, records, downloadFieldNames);
return [data];
}