fix: Expand nodes-base formatting validation (no-changelog) (#4689)

*  Simplify `format` command

* 🎨 Format more deeply nested files
This commit is contained in:
Iván Ovejero
2022-11-22 13:43:28 +01:00
committed by GitHub
parent ad6c6f60a1
commit eafef019d7
39 changed files with 8225 additions and 374 deletions

View File

@@ -47,21 +47,21 @@ export const blockFields: INodeProperties[] = [
displayName: 'Link',
name: 'url',
type: 'string',
placeholder:
'https://www.notion.so/My-Page-b4eeb113e118403ba450af65ac25f0b9',
placeholder: 'https://www.notion.so/My-Page-b4eeb113e118403ba450af65ac25f0b9',
validation: [
{
type: 'regex',
properties: {
regex:
'(?:https|http):\/\/www.notion.so\/(?:[a-z0-9\-]{2,}\/)?(?:[a-zA-Z0-9\-]{2,}-)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12}).*',
'(?:https|http)://www.notion.so/(?:[a-z0-9-]{2,}/)?(?:[a-zA-Z0-9-]{2,}-)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12}).*',
errorMessage: 'Not a valid Notion Block URL',
},
},
],
extractValue: {
type: 'regex',
regex: '(?:https|http):\/\/www.notion.so\/(?:[a-z0-9\-]{2,}\/)?(?:[a-zA-Z0-9\-]{2,}-)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})',
regex:
'(?:https|http)://www.notion.so/(?:[a-z0-9-]{2,}/)?(?:[a-zA-Z0-9-]{2,}-)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})',
},
},
{
@@ -73,7 +73,8 @@ export const blockFields: INodeProperties[] = [
{
type: 'regex',
properties: {
regex: '^(([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})|([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))[ \t]*',
regex:
'^(([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})|([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))[ \t]*',
errorMessage: 'Not a valid Notion Block ID',
},
},
@@ -91,7 +92,7 @@ export const blockFields: INodeProperties[] = [
operation: ['append'],
},
},
description: "The Notion Block to append blocks to",
description: 'The Notion Block to append blocks to',
},
...blocks('block', 'append'),
/* -------------------------------------------------------------------------- */
@@ -108,21 +109,21 @@ export const blockFields: INodeProperties[] = [
displayName: 'Link',
name: 'url',
type: 'string',
placeholder:
'https://www.notion.so/My-Page-b4eeb113e118403ba450af65ac25f0b9',
placeholder: 'https://www.notion.so/My-Page-b4eeb113e118403ba450af65ac25f0b9',
validation: [
{
type: 'regex',
properties: {
regex:
'(?:https|http):\/\/www.notion.so\/(?:[a-z0-9\-]{2,}\/)?(?:[a-zA-Z0-9\-]{2,}-)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12}).*',
'(?:https|http)://www.notion.so/(?:[a-z0-9-]{2,}/)?(?:[a-zA-Z0-9-]{2,}-)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12}).*',
errorMessage: 'Not a valid Notion Block URL',
},
},
],
extractValue: {
type: 'regex',
regex: '(?:https|http):\/\/www.notion.so\/(?:[a-z0-9\-]{2,}\/)?(?:[a-zA-Z0-9\-]{2,}-)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})',
regex:
'(?:https|http)://www.notion.so/(?:[a-z0-9-]{2,}/)?(?:[a-zA-Z0-9-]{2,}-)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})',
},
},
{
@@ -134,7 +135,8 @@ export const blockFields: INodeProperties[] = [
{
type: 'regex',
properties: {
regex: '^(([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})|([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))[ \t]*',
regex:
'^(([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})|([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))[ \t]*',
errorMessage: 'Not a valid Notion Block ID',
},
},
@@ -152,7 +154,7 @@ export const blockFields: INodeProperties[] = [
operation: ['getAll'],
},
},
description: "The Notion Block to get all children from",
description: 'The Notion Block to get all children from',
},
{
displayName: 'Return All',