Skip to content

Commit 77a0fd8

Browse files
authored
Initial commit
0 parents  commit 77a0fd8

23 files changed

+5261
-0
lines changed

.editorconfig

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = tab
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[package.json]
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.md]
16+
trim_trailing_whitespace = false
17+
18+
[*.yml]
19+
indent_style = space
20+
indent_size = 2

.eslintrc.js

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/**
2+
* @type {import('@types/eslint').ESLint.ConfigData}
3+
*/
4+
module.exports = {
5+
root: true,
6+
7+
env: {
8+
browser: true,
9+
es6: true,
10+
node: true,
11+
},
12+
13+
parser: '@typescript-eslint/parser',
14+
15+
parserOptions: {
16+
project: ['./tsconfig.json'],
17+
sourceType: 'module',
18+
extraFileExtensions: ['.json'],
19+
},
20+
21+
ignorePatterns: ['.eslintrc.js', '**/*.js', '**/node_modules/**', '**/dist/**'],
22+
23+
overrides: [
24+
{
25+
files: ['package.json'],
26+
plugins: ['eslint-plugin-n8n-nodes-base'],
27+
extends: ['plugin:n8n-nodes-base/community'],
28+
rules: {
29+
'n8n-nodes-base/community-package-json-name-still-default': 'off',
30+
},
31+
},
32+
{
33+
files: ['./credentials/**/*.ts'],
34+
plugins: ['eslint-plugin-n8n-nodes-base'],
35+
extends: ['plugin:n8n-nodes-base/credentials'],
36+
rules: {
37+
'n8n-nodes-base/cred-class-field-documentation-url-missing': 'off',
38+
'n8n-nodes-base/cred-class-field-documentation-url-miscased': 'off',
39+
},
40+
},
41+
{
42+
files: ['./nodes/**/*.ts'],
43+
plugins: ['eslint-plugin-n8n-nodes-base'],
44+
extends: ['plugin:n8n-nodes-base/nodes'],
45+
rules: {
46+
'n8n-nodes-base/node-execute-block-missing-continue-on-fail': 'off',
47+
'n8n-nodes-base/node-resource-description-filename-against-convention': 'off',
48+
'n8n-nodes-base/node-param-fixed-collection-type-unsorted-items': 'off',
49+
},
50+
},
51+
],
52+
};

.eslintrc.prepublish.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* @type {import('@types/eslint').ESLint.ConfigData}
3+
*/
4+
module.exports = {
5+
extends: "./.eslintrc.js",
6+
7+
overrides: [
8+
{
9+
files: ['package.json'],
10+
plugins: ['eslint-plugin-n8n-nodes-base'],
11+
rules: {
12+
'n8n-nodes-base/community-package-json-name-still-default': 'error',
13+
},
14+
},
15+
],
16+
};

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
.DS_Store
3+
.tmp
4+
tmp
5+
dist
6+
npm-debug.log*
7+
yarn.lock
8+
.vscode/launch.json

.npmignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
*.tsbuildinfo

.prettierrc.js

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
module.exports = {
2+
/**
3+
* https://prettier.io/docs/en/options.html#semicolons
4+
*/
5+
semi: true,
6+
7+
/**
8+
* https://prettier.io/docs/en/options.html#trailing-commas
9+
*/
10+
trailingComma: 'all',
11+
12+
/**
13+
* https://prettier.io/docs/en/options.html#bracket-spacing
14+
*/
15+
bracketSpacing: true,
16+
17+
/**
18+
* https://prettier.io/docs/en/options.html#tabs
19+
*/
20+
useTabs: true,
21+
22+
/**
23+
* https://prettier.io/docs/en/options.html#tab-width
24+
*/
25+
tabWidth: 2,
26+
27+
/**
28+
* https://prettier.io/docs/en/options.html#arrow-function-parentheses
29+
*/
30+
arrowParens: 'always',
31+
32+
/**
33+
* https://prettier.io/docs/en/options.html#quotes
34+
*/
35+
singleQuote: true,
36+
37+
/**
38+
* https://prettier.io/docs/en/options.html#quote-props
39+
*/
40+
quoteProps: 'as-needed',
41+
42+
/**
43+
* https://prettier.io/docs/en/options.html#end-of-line
44+
*/
45+
endOfLine: 'lf',
46+
47+
/**
48+
* https://prettier.io/docs/en/options.html#print-width
49+
*/
50+
printWidth: 100,
51+
};

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"EditorConfig.EditorConfig",
5+
"esbenp.prettier-vscode",
6+
]
7+
}

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

LICENSE.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright 2022 n8n
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)
2+
3+
# n8n-nodes-starter
4+
5+
This repo contains example nodes to help you get started building your own custom integrations for [n8n](n8n.io). It includes the node linter and other dependencies.
6+
7+
To make your custom node available to the community, you must create it as an npm package, and [submit it to the npm registry](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
8+
9+
## Prerequisites
10+
11+
You need the following installed on your development machine:
12+
13+
* [git](https://git-scm.com/downloads)
14+
* Node.js and pnpm. Minimum version Node 18. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL [here](https://github.com/nvm-sh/nvm). For Windows users, refer to Microsoft's guide to [Install NodeJS on Windows](https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows).
15+
* Install n8n with:
16+
```
17+
pnpm install n8n -g
18+
```
19+
* Recommended: follow n8n's guide to [set up your development environment](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/).
20+
21+
## Using this starter
22+
23+
These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the [documentation](https://docs.n8n.io/integrations/creating-nodes/).
24+
25+
1. [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template repository.
26+
2. Clone your new repo:
27+
```
28+
git clone https://github.com/<your organization>/<your-repo-name>.git
29+
```
30+
3. Run `pnpm i` to install dependencies.
31+
4. Open the project in your editor.
32+
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
33+
6. Update the `package.json` to match your details.
34+
7. Run `pnpm lint` to check for errors or `pnpm lintfix` to automatically fix errors when possible.
35+
8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
36+
9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
37+
10. Update the LICENSE file to use your details.
38+
11. [Publish](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry) your package to npm.
39+
40+
## More information
41+
42+
Refer to our [documentation on creating nodes](https://docs.n8n.io/integrations/creating-nodes/) for detailed information on building your own nodes.
43+
44+
## License
45+
46+
[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)

README_TEMPLATE.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# n8n-nodes-_node-name_
2+
3+
This is an n8n community node. It lets you use _app/service name_ in your n8n workflows.
4+
5+
_App/service name_ is _one or two sentences describing the service this node integrates with_.
6+
7+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
8+
9+
[Installation](#installation)
10+
[Operations](#operations)
11+
[Credentials](#credentials) <!-- delete if no auth needed -->
12+
[Compatibility](#compatibility)
13+
[Usage](#usage) <!-- delete if not using this section -->
14+
[Resources](#resources)
15+
[Version history](#version-history) <!-- delete if not using this section -->
16+
17+
## Installation
18+
19+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
20+
21+
## Operations
22+
23+
_List the operations supported by your node._
24+
25+
## Credentials
26+
27+
_If users need to authenticate with the app/service, provide details here. You should include prerequisites (such as signing up with the service), available authentication methods, and how to set them up._
28+
29+
## Compatibility
30+
31+
_State the minimum n8n version, as well as which versions you test against. You can also include any known version incompatibility issues._
32+
33+
## Usage
34+
35+
_This is an optional section. Use it to help users with any difficult or confusing aspects of the node._
36+
37+
_By the time users are looking for community nodes, they probably already know n8n basics. But if you expect new users, you can link to the [Try it out](https://docs.n8n.io/try-it-out/) documentation to help them get started._
38+
39+
## Resources
40+
41+
* [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
42+
* _Link to app/service documentation._
43+
44+
## Version history
45+
46+
_This is another optional section. If your node has multiple versions, include a short description of available versions and what changed, as well as any compatibility impact._
47+
48+

0 commit comments

Comments
 (0)