Merge pull request #16 from n8n-io/general-improvements-pre-community-release
General improvements pre-community release
This commit is contained in:
		
				commit
				
					
						691f1ad780
					
				
			
		
					 9 changed files with 73 additions and 50 deletions
				
			
		|  | @ -1,2 +0,0 @@ | ||||||
| packages/editor-ui |  | ||||||
| packages/design-system |  | ||||||
							
								
								
									
										51
									
								
								.prettierrc.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								.prettierrc.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,51 @@ | ||||||
|  | module.exports = { | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#semicolons
 | ||||||
|  | 	 */ | ||||||
|  | 	semi: true, | ||||||
|  | 
 | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#trailing-commas
 | ||||||
|  | 	 */ | ||||||
|  | 	trailingComma: 'all', | ||||||
|  | 
 | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#bracket-spacing
 | ||||||
|  | 	 */ | ||||||
|  | 	bracketSpacing: true, | ||||||
|  | 
 | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#tabs
 | ||||||
|  | 	 */ | ||||||
|  | 	useTabs: true, | ||||||
|  | 
 | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#tab-width
 | ||||||
|  | 	 */ | ||||||
|  | 	tabWidth: 2, | ||||||
|  | 
 | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#arrow-function-parentheses
 | ||||||
|  | 	 */ | ||||||
|  | 	arrowParens: 'always', | ||||||
|  | 
 | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#quotes
 | ||||||
|  | 	 */ | ||||||
|  | 	singleQuote: true, | ||||||
|  | 
 | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#quote-props
 | ||||||
|  | 	 */ | ||||||
|  | 	quoteProps: 'as-needed', | ||||||
|  | 
 | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#end-of-line
 | ||||||
|  | 	 */ | ||||||
|  | 	endOfLine: 'lf', | ||||||
|  | 
 | ||||||
|  | 	/** | ||||||
|  | 	 * https://prettier.io/docs/en/options.html#print-width
 | ||||||
|  | 	 */ | ||||||
|  | 	printWidth: 100, | ||||||
|  | }; | ||||||
|  | @ -1,8 +1,4 @@ | ||||||
| import { | import { ICredentialType, NodePropertyTypes } from 'n8n-workflow'; | ||||||
| 	ICredentialType, |  | ||||||
| 	NodePropertyTypes, |  | ||||||
| } from 'n8n-workflow'; |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
| export class ExampleCredentials implements ICredentialType { | export class ExampleCredentials implements ICredentialType { | ||||||
| 	name = 'exampleCredentials'; | 	name = 'exampleCredentials'; | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								gulpfile.js
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								gulpfile.js
									
										
									
									
									
								
							|  | @ -1,11 +1,11 @@ | ||||||
| const { src, dest } = require('gulp'); | const { task, src, dest } = require('gulp'); | ||||||
|  | 
 | ||||||
|  | task('build:icons', copyIcons); | ||||||
| 
 | 
 | ||||||
| function copyIcons() { | function copyIcons() { | ||||||
| 	src('nodes/**/*.{png,svg}') | 	src('nodes/**/*.{png,svg}').pipe(dest('dist/nodes')); | ||||||
| 		.pipe(dest('dist/nodes')) |  | ||||||
| 
 | 
 | ||||||
| 	return src('credentials/**/*.{png,svg}') | 	return src('credentials/**/*.{png,svg}').pipe(dest('dist/credentials')); | ||||||
| 		.pipe(dest('dist/credentials')); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| exports.default = copyIcons; | // TODO: Add i18n to pipeline
 | ||||||
|  |  | ||||||
|  | @ -1,10 +1,5 @@ | ||||||
| import { IExecuteFunctions } from 'n8n-core'; | import { IExecuteFunctions } from 'n8n-core'; | ||||||
| import { | import { INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow'; | ||||||
| 	INodeExecutionData, |  | ||||||
| 	INodeType, |  | ||||||
| 	INodeTypeDescription, |  | ||||||
| } from 'n8n-workflow'; |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
| export class ExampleNode implements INodeType { | export class ExampleNode implements INodeType { | ||||||
| 	description: INodeTypeDescription = { | 	description: INodeTypeDescription = { | ||||||
|  | @ -33,9 +28,7 @@ export class ExampleNode implements INodeType { | ||||||
| 		], | 		], | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| 	async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> { | 	async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> { | ||||||
| 
 |  | ||||||
| 		const items = this.getInputData(); | 		const items = this.getInputData(); | ||||||
| 
 | 
 | ||||||
| 		let item: INodeExecutionData; | 		let item: INodeExecutionData; | ||||||
|  | @ -52,6 +45,5 @@ export class ExampleNode implements INodeType { | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		return this.prepareOutputData(items); | 		return this.prepareOutputData(items); | ||||||
| 
 |  | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -2,10 +2,7 @@ | ||||||
| 	"node": "n8n-nodes-base.httpbin", | 	"node": "n8n-nodes-base.httpbin", | ||||||
| 	"nodeVersion": "1.0", | 	"nodeVersion": "1.0", | ||||||
| 	"codexVersion": "1.0", | 	"codexVersion": "1.0", | ||||||
| 	"categories": [ | 	"categories": ["Development", "Developer Tools"], | ||||||
| 		"Development", |  | ||||||
| 		"Developer Tools" |  | ||||||
| 	], |  | ||||||
| 	"resources": { | 	"resources": { | ||||||
| 		"credentialDocumentation": [ | 		"credentialDocumentation": [ | ||||||
| 			{ | 			{ | ||||||
|  |  | ||||||
|  | @ -64,7 +64,7 @@ const getOperation: INodeProperties[] = [ | ||||||
| 	{ | 	{ | ||||||
| 		name: 'arguments', | 		name: 'arguments', | ||||||
| 		default: {}, | 		default: {}, | ||||||
| 		description: 'The request\'s query parameters', | 		description: "The request's query parameters", | ||||||
| 		displayName: 'Query Parameters', | 		displayName: 'Query Parameters', | ||||||
| 		displayOptions: { | 		displayOptions: { | ||||||
| 			show: { | 			show: { | ||||||
|  | @ -115,8 +115,7 @@ const deleteOperation: INodeProperties[] = [ | ||||||
| 	{ | 	{ | ||||||
| 		name: 'typeofData', | 		name: 'typeofData', | ||||||
| 		default: 'queryParameter', | 		default: 'queryParameter', | ||||||
| 		description: | 		description: 'Select type of data to send [Query Parameter Arguments, JSON-Body]', | ||||||
| 			'Select type of data to send [Query Parameter Arguments, JSON-Body]', |  | ||||||
| 		displayName: 'Type of Data', | 		displayName: 'Type of Data', | ||||||
| 		displayOptions: { | 		displayOptions: { | ||||||
| 			show: { | 			show: { | ||||||
|  | @ -140,7 +139,7 @@ const deleteOperation: INodeProperties[] = [ | ||||||
| 	{ | 	{ | ||||||
| 		name: 'arguments', | 		name: 'arguments', | ||||||
| 		default: {}, | 		default: {}, | ||||||
| 		description: 'The request\'s query parameters', | 		description: "The request's query parameters", | ||||||
| 		displayName: 'Query Parameters', | 		displayName: 'Query Parameters', | ||||||
| 		displayOptions: { | 		displayOptions: { | ||||||
| 			show: { | 			show: { | ||||||
|  | @ -187,7 +186,7 @@ const deleteOperation: INodeProperties[] = [ | ||||||
| 	{ | 	{ | ||||||
| 		name: 'arguments', | 		name: 'arguments', | ||||||
| 		default: {}, | 		default: {}, | ||||||
| 		description: 'The request\'s JSON properties', | 		description: "The request's JSON properties", | ||||||
| 		displayName: 'JSON Object', | 		displayName: 'JSON Object', | ||||||
| 		displayOptions: { | 		displayOptions: { | ||||||
| 			show: { | 			show: { | ||||||
|  |  | ||||||
							
								
								
									
										17
									
								
								package.json
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								package.json
									
										
									
									
									
								
							|  | @ -17,12 +17,11 @@ | ||||||
|   }, |   }, | ||||||
|   "main": "index.js", |   "main": "index.js", | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "dev": "npm run watch", |     "build": "tsc && gulp build:icons", | ||||||
|     "build": "tsc && gulp", |     "dev": "tsc --watch", | ||||||
|  |     "format": "prettier nodes credentials --write", | ||||||
|     "lint": "tslint -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js ./nodes", |     "lint": "tslint -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js ./nodes", | ||||||
|     "lintfix": "tslint --fix -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js --fix ./nodes", |     "lintfix": "tslint --fix -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js --fix ./nodes" | ||||||
|     "watch": "tsc --watch", |  | ||||||
|     "test": "jest" |  | ||||||
|   }, |   }, | ||||||
|   "files": [ |   "files": [ | ||||||
|     "dist" |     "dist" | ||||||
|  | @ -43,16 +42,12 @@ | ||||||
|     "@typescript-eslint/parser": "^5.29.0", |     "@typescript-eslint/parser": "^5.29.0", | ||||||
|     "eslint-plugin-n8n-nodes-base": "^1.0.43", |     "eslint-plugin-n8n-nodes-base": "^1.0.43", | ||||||
|     "gulp": "^4.0.2", |     "gulp": "^4.0.2", | ||||||
|     "jest": "^26.4.2", |  | ||||||
|     "n8n-workflow": "~0.104.0", |     "n8n-workflow": "~0.104.0", | ||||||
|     "ts-jest": "^26.3.0", |     "prettier": "^2.7.1", | ||||||
|     "tslint": "^6.1.2", |     "tslint": "^6.1.2", | ||||||
|     "typescript": "~4.3.5" |     "typescript": "~4.6.0" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "n8n-core": "~0.122.1" |     "n8n-core": "~0.122.1" | ||||||
|   }, |  | ||||||
|   "overrides": { |  | ||||||
|     "glob-parent": "5.1.2" |  | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -2,11 +2,10 @@ | ||||||
| 	"compilerOptions": { | 	"compilerOptions": { | ||||||
| 		"lib": [ | 		"lib": [ | ||||||
| 			"es2017", | 			"es2017", | ||||||
| 			"es2019.array" | 			"es2019" | ||||||
| 		], | 		], | ||||||
| 		"types": [ | 		"types": [ | ||||||
| 			"node", | 			"node", | ||||||
| 			"jest" |  | ||||||
| 		], | 		], | ||||||
| 		"module": "commonjs", | 		"module": "commonjs", | ||||||
| 		"noImplicitAny": true, | 		"noImplicitAny": true, | ||||||
|  | @ -19,16 +18,12 @@ | ||||||
| 		"outDir": "./dist/", | 		"outDir": "./dist/", | ||||||
| 		"target": "es2019", | 		"target": "es2019", | ||||||
| 		"sourceMap": true, | 		"sourceMap": true, | ||||||
| 		"esModuleInterop": true | 		"esModuleInterop": true, | ||||||
|  | 		"useUnknownInCatchVariables": false, | ||||||
| 	}, | 	}, | ||||||
| 	"include": [ | 	"include": [ | ||||||
| 		"credentials/**/*", | 		"credentials/**/*", | ||||||
| 		"src/**/*", |  | ||||||
| 		"nodes/**/*", | 		"nodes/**/*", | ||||||
| 		"nodes/**/*.json", | 		"nodes/**/*.json", | ||||||
| 		"test/**/*" |  | ||||||
| 	], | 	], | ||||||
| 	"exclude": [ |  | ||||||
| 		"**/*.spec.ts" |  | ||||||
| 	] |  | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue