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 indexOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'index',
],
resource: ['index'],
},
},
options: [
@@ -56,12 +52,8 @@ export const indexFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'index',
],
operation: [
'create',
],
resource: ['index'],
operation: ['create'],
},
},
},
@@ -73,19 +65,16 @@ export const indexFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'index',
],
operation: [
'create',
],
resource: ['index'],
operation: ['create'],
},
},
options: [
{
displayName: 'Aliases',
name: 'aliases',
description: 'Index aliases which include the index, as an <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html">alias object</a>',
description:
'Index aliases which include the index, as an <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html">alias object</a>',
type: 'json',
typeOptions: {
alwaysOpenEditWindow: true,
@@ -96,14 +85,16 @@ export const indexFields: INodeProperties[] = [
{
displayName: 'Include Type Name',
name: 'include_type_name',
description: 'Whether a mapping type is expected in the body of mappings. Defaults to false.',
description:
'Whether a mapping type is expected in the body of mappings. Defaults to false.',
type: 'boolean',
default: false,
},
{
displayName: 'Mappings',
name: 'mappings',
description: 'Mapping for fields in the index, as <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html">mapping object</a>',
description:
'Mapping for fields in the index, as <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html">mapping object</a>',
type: 'json',
typeOptions: {
alwaysOpenEditWindow: true,
@@ -114,14 +105,16 @@ export const indexFields: INodeProperties[] = [
{
displayName: 'Master Timeout',
name: 'master_timeout',
description: 'Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Defaults to <code>1m</code>. 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 a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Defaults to <code>1m</code>. 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: 'Settings',
name: 'settings',
description: 'Configuration options for the index, as an <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings">index settings object</a>',
description:
'Configuration options for the index, as an <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings">index settings object</a>',
type: 'json',
typeOptions: {
alwaysOpenEditWindow: true,
@@ -132,14 +125,16 @@ export const indexFields: INodeProperties[] = [
{
displayName: 'Timeout',
name: 'timeout',
description: 'Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Defaults to <code>30s</code>. 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 a response. If no response is received before the timeout expires, the request fails and returns an error. Defaults to <code>30s</code>. 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: '30s',
},
{
displayName: 'Wait for Active Shards',
name: 'wait_for_active_shards',
description: 'The number of shard copies that must be active before proceeding with the operation. Set to <code>all</code> or any positive integer up to the total number of shards in the index. Default: 1, the primary shard',
description:
'The number of shard copies that must be active before proceeding with the operation. Set to <code>all</code> or any positive integer up to the total number of shards in the index. Default: 1, the primary shard',
type: 'string',
default: '1',
},
@@ -158,12 +153,8 @@ export const indexFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'index',
],
operation: [
'delete',
],
resource: ['index'],
operation: ['delete'],
},
},
},
@@ -180,12 +171,8 @@ export const indexFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
resource: [
'index',
],
operation: [
'get',
],
resource: ['index'],
operation: ['get'],
},
},
},
@@ -197,12 +184,8 @@ export const indexFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
resource: [
'index',
],
operation: [
'get',
],
resource: ['index'],
operation: ['get'],
},
},
options: [
@@ -210,14 +193,16 @@ export const indexFields: 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,
},
{
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: [
{
@@ -253,7 +238,8 @@ export const indexFields: INodeProperties[] = [
{
displayName: 'Ignore Unavailable',
name: 'ignore_unavailable',
description: 'Whether to request that target a missing index return an error. Defaults to false.',
description:
'Whether to request that target a missing index return an error. Defaults to false.',
type: 'boolean',
default: false,
},
@@ -274,7 +260,8 @@ export const indexFields: INodeProperties[] = [
{
displayName: 'Master Timeout',
name: 'master_timeout',
description: 'Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Defaults to <code>1m</code>. 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 a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Defaults to <code>1m</code>. 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',
},
@@ -292,12 +279,8 @@ export const indexFields: INodeProperties[] = [
description: 'Whether to return all results or only up to a given limit',
displayOptions: {
show: {
resource: [
'index',
],
operation: [
'getAll',
],
resource: ['index'],
operation: ['getAll'],
},
},
},
@@ -312,15 +295,9 @@ export const indexFields: INodeProperties[] = [
},
displayOptions: {
show: {
resource: [
'index',
],
operation: [
'getAll',
],
returnAll: [
false,
],
resource: ['index'],
operation: ['getAll'],
returnAll: [false],
},
},
},