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 {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
import * as placeholders from './placeholders';
@@ -12,9 +10,7 @@ export const documentOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'document',
],
resource: ['document'],
},
},
options: [
@@ -66,12 +62,8 @@ export const documentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'delete',
],
resource: ['document'],
operation: ['delete'],
},
},
},
@@ -84,12 +76,8 @@ export const documentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'delete',
],
resource: ['document'],
operation: ['delete'],
},
},
},
@@ -106,12 +94,8 @@ export const documentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'get',
],
resource: ['document'],
operation: ['get'],
},
},
},
@@ -124,12 +108,8 @@ export const documentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'get',
],
resource: ['document'],
operation: ['get'],
},
},
},
@@ -141,12 +121,8 @@ export const documentFields: INodeProperties[] = [
description: 'Whether to return a simplified version of the response instead of the raw data',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'get',
],
resource: ['document'],
operation: ['get'],
},
},
},
@@ -158,12 +134,8 @@ export const documentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'get',
],
resource: ['document'],
operation: ['get'],
},
},
options: [
@@ -184,7 +156,8 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Stored Fields',
name: 'stored_fields',
description: 'Whether to retrieve the document fields stored in the index rather than the document <code>_source</code>. Defaults to false.',
description:
'Whether to retrieve the document fields stored in the index rather than the document <code>_source</code>. Defaults to false.',
type: 'boolean',
default: false,
},
@@ -203,12 +176,8 @@ export const documentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'getAll',
],
resource: ['document'],
operation: ['getAll'],
},
},
},
@@ -220,12 +189,8 @@ export const documentFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'getAll',
],
resource: ['document'],
operation: ['getAll'],
},
},
},
@@ -240,15 +205,9 @@ export const documentFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['document'],
operation: ['getAll'],
returnAll: [false],
},
},
},
@@ -260,12 +219,8 @@ export const documentFields: INodeProperties[] = [
description: 'Whether to return a simplified version of the response instead of the raw data',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'getAll',
],
resource: ['document'],
operation: ['getAll'],
},
},
},
@@ -277,12 +232,8 @@ export const documentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'getAll',
],
resource: ['document'],
operation: ['getAll'],
},
},
options: [
@@ -290,7 +241,8 @@ export const documentFields: INodeProperties[] = [
displayName: 'Allow No Indices',
name: 'allow_no_indices',
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
description: 'If false, return an error if any of the following targets only missing/closed indices: wildcard expression, index alias, or <code>_all</code> value. Defaults to true.',
description:
'If false, return an error if any of the following targets only missing/closed indices: wildcard expression, index alias, or <code>_all</code> value. Defaults to true.',
type: 'boolean',
default: true,
},
@@ -298,14 +250,16 @@ export const documentFields: INodeProperties[] = [
displayName: 'Allow Partial Search Results',
name: 'allow_partial_search_results',
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
description: '<p>If true, return partial results if there are shard request timeouts or shard failures.</p><p>If false, returns an error with no partial results. Defaults to true.</p>.',
description:
'<p>If true, return partial results if there are shard request timeouts or shard failures.</p><p>If false, returns an error with no partial results. Defaults to true.</p>.',
type: 'boolean',
default: true,
},
{
displayName: 'Batched Reduce Size',
name: 'batched_reduce_size',
description: 'Number of shard results that should be reduced at once on the coordinating node. Defaults to 512.',
description:
'Number of shard results that should be reduced at once on the coordinating node. Defaults to 512.',
type: 'number',
typeOptions: {
minValue: 2,
@@ -315,21 +269,24 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'CCS Minimize Roundtrips',
name: 'ccs_minimize_roundtrips',
description: 'Whether network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. Defaults to true.',
description:
'Whether network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. Defaults to true.',
type: 'boolean',
default: true,
},
{
displayName: 'Doc Value Fields',
name: 'docvalue_fields',
description: 'Comma-separated list of fields to return as the docvalue representation of a field for each hit',
description:
'Comma-separated list of fields to return as the docvalue representation of a field for each hit',
type: 'string',
default: '',
},
{
displayName: 'Expand Wildcards',
name: 'expand_wildcards',
description: 'Type of index that wildcard expressions can match. Defaults to <code>open</code>',
description:
'Type of index that wildcard expressions can match. Defaults to <code>open</code>',
type: 'options',
options: [
{
@@ -358,35 +315,40 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Explain',
name: 'explain',
description: 'Whether to return detailed information about score computation as part of a hit. Defaults to false.',
description:
'Whether to return detailed information about score computation as part of a hit. Defaults to false.',
type: 'boolean',
default: false,
},
{
displayName: 'Ignore Throttled',
name: 'ignore_throttled',
description: 'Whether concrete, expanded or aliased indices are ignored when frozen. Defaults to true.',
description:
'Whether concrete, expanded or aliased indices are ignored when frozen. Defaults to true.',
type: 'boolean',
default: true,
},
{
displayName: 'Ignore Unavailable',
name: 'ignore_unavailable',
description: 'Whether missing or closed indices are not included in the response. Defaults to false.',
description:
'Whether missing or closed indices are not included in the response. Defaults to false.',
type: 'boolean',
default: false,
},
{
displayName: 'Max Concurrent Shard Requests',
name: 'max_concurrent_shard_requests',
description: 'Define the number of shard requests per node this search executes concurrently. Defaults to 5.',
description:
'Define the number of shard requests per node this search executes concurrently. Defaults to 5.',
type: 'number',
default: 5,
},
{
displayName: 'Pre-Filter Shard Size',
name: 'pre_filter_shard_size',
description: 'Define a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting. Only used if the number of shards the search request expands to exceeds the threshold.',
description:
'Define a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting. Only used if the number of shards the search request expands to exceeds the threshold.',
type: 'number',
typeOptions: {
minValue: 1,
@@ -396,7 +358,8 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Query',
name: 'query',
description: 'Query in the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html">Elasticsearch Query DSL</a>',
description:
'Query in the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html">Elasticsearch Query DSL</a>',
type: 'json',
typeOptions: {
alwaysOpenEditWindow: true,
@@ -407,7 +370,8 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Request Cache',
name: 'request_cache',
description: 'Whether the caching of search results is enabled for requests where size is 0. See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-request-cache.html">Elasticsearch shard request cache settings</a>.',
description:
'Whether the caching of search results is enabled for requests where size is 0. See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/shard-request-cache.html">Elasticsearch shard request cache settings</a>.',
type: 'boolean',
default: false,
},
@@ -421,7 +385,8 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Search Type',
name: 'search_type',
description: 'How distributed term frequencies are calculated for relevance scoring. Defaults to Query then Fetch.',
description:
'How distributed term frequencies are calculated for relevance scoring. Defaults to Query then Fetch.',
type: 'options',
options: [
{
@@ -438,7 +403,8 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Sequence Number and Primary Term',
name: 'seq_no_primary_term',
description: 'Whether to return the sequence number and primary term of the last modification of each hit. See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html">Optimistic concurrency control</a>.',
description:
'Whether to return the sequence number and primary term of the last modification of each hit. See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/optimistic-concurrency-control.html">Optimistic concurrency control</a>.',
type: 'boolean',
default: false,
},
@@ -473,7 +439,8 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Stored Fields',
name: 'stored_fields',
description: 'Whether to retrieve the document fields stored in the index rather than the document <code>_source</code>. Defaults to false.',
description:
'Whether to retrieve the document fields stored in the index rather than the document <code>_source</code>. Defaults to false.',
type: 'boolean',
default: false,
},
@@ -487,14 +454,16 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Timeout',
name: 'timeout',
description: 'Period to wait for active shards. Defaults to <code>1m</code> (one minute). See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units">Elasticsearch time units reference</a>',
description:
'Period to wait for active shards. Defaults to <code>1m</code> (one minute). See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units">Elasticsearch time units reference</a>',
type: 'string',
default: '1m',
},
{
displayName: 'Track Scores',
name: 'track_scores',
description: 'Whether to calculate and return document scores, even if the scores are not used for sorting. Defaults to false.',
description:
'Whether to calculate and return document scores, even if the scores are not used for sorting. Defaults to false.',
type: 'boolean',
default: false,
},
@@ -527,12 +496,8 @@ export const documentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'create',
],
resource: ['document'],
operation: ['create'],
},
},
},
@@ -554,12 +519,8 @@ export const documentFields: INodeProperties[] = [
],
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'create',
],
resource: ['document'],
operation: ['create'],
},
},
default: 'defineBelow',
@@ -571,19 +532,14 @@ export const documentFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'create',
],
dataToSend: [
'autoMapInputData',
],
resource: ['document'],
operation: ['create'],
dataToSend: ['autoMapInputData'],
},
},
default: '',
description: 'List of input properties to avoid sending, separated by commas. Leave empty to send all properties.',
description:
'List of input properties to avoid sending, separated by commas. Leave empty to send all properties.',
placeholder: 'Enter properties...',
},
{
@@ -597,15 +553,9 @@ export const documentFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'create',
],
dataToSend: [
'defineBelow',
],
resource: ['document'],
operation: ['create'],
dataToSend: ['defineBelow'],
},
},
default: {},
@@ -638,12 +588,8 @@ export const documentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'create',
],
resource: ['document'],
operation: ['create'],
},
},
options: [
@@ -664,7 +610,8 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Timeout',
name: 'timeout',
description: 'Period to wait for active shards. Defaults to <code>1m</code> (one minute). See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units">Elasticsearch time units reference</a>',
description:
'Period to wait for active shards. Defaults to <code>1m</code> (one minute). See the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units">Elasticsearch time units reference</a>',
type: 'string',
default: '1m',
},
@@ -678,12 +625,8 @@ export const documentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'create',
],
resource: ['document'],
operation: ['create'],
},
},
options: [
@@ -697,7 +640,8 @@ export const documentFields: INodeProperties[] = [
{
displayName: 'Refresh',
name: 'refresh',
description: 'If true, Elasticsearch refreshes the affected shards to make this operation visible to search,if wait_for then wait for a refresh to make this operation visible to search,if false do nothing with refreshes',
description:
'If true, Elasticsearch refreshes the affected shards to make this operation visible to search,if wait_for then wait for a refresh to make this operation visible to search,if false do nothing with refreshes',
type: 'options',
default: 'false',
options: [
@@ -733,12 +677,8 @@ export const documentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'update',
],
resource: ['document'],
operation: ['update'],
},
},
},
@@ -751,12 +691,8 @@ export const documentFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'update',
],
resource: ['document'],
operation: ['update'],
},
},
},
@@ -778,12 +714,8 @@ export const documentFields: INodeProperties[] = [
],
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'update',
],
resource: ['document'],
operation: ['update'],
},
},
default: 'defineBelow',
@@ -795,19 +727,14 @@ export const documentFields: INodeProperties[] = [
type: 'string',
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'update',
],
dataToSend: [
'autoMapInputData',
],
resource: ['document'],
operation: ['update'],
dataToSend: ['autoMapInputData'],
},
},
default: '',
description: 'List of input properties to avoid sending, separated by commas. Leave empty to send all properties.',
description:
'List of input properties to avoid sending, separated by commas. Leave empty to send all properties.',
placeholder: 'Enter properties...',
},
{
@@ -821,15 +748,9 @@ export const documentFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'update',
],
dataToSend: [
'defineBelow',
],
resource: ['document'],
operation: ['update'],
dataToSend: ['defineBelow'],
},
},
default: {},
@@ -862,19 +783,16 @@ export const documentFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'document',
],
operation: [
'update',
],
resource: ['document'],
operation: ['update'],
},
},
options: [
{
displayName: 'Refresh',
name: 'refresh',
description: 'If true, Elasticsearch refreshes the affected shards to make this operation visible to search,if wait_for then wait for a refresh to make this operation visible to search,if false do nothing with refreshes',
description:
'If true, Elasticsearch refreshes the affected shards to make this operation visible to search,if wait_for then wait for a refresh to make this operation visible to search,if false do nothing with refreshes',
type: 'options',
default: 'false',
options: [