@n8n/create-node 0.5.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/bin/create-node.cjs +11 -0
- package/package.json +7 -4
- package/bin/create.js +0 -9
package/README.md
CHANGED
|
@@ -7,19 +7,19 @@ A powerful scaffolding tool to quickly create custom n8n community nodes with be
|
|
|
7
7
|
Create a new n8n node in seconds:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
npm create @n8n/node@latest # or pnpm/yarn/...
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Follow the interactive prompts to configure your node, or specify options directly:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
16
|
+
npm create @n8n/node my-awesome-node --template declarative/custom
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## 📋 Command Line Options
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
|
|
22
|
+
npm create @n8n/node [NAME] [OPTIONS]
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### Options
|
|
@@ -41,7 +41,7 @@ pnpm create @n8n/node [NAME] [OPTIONS]
|
|
|
41
41
|
The CLI will guide you through setting up your node:
|
|
42
42
|
|
|
43
43
|
```
|
|
44
|
-
$
|
|
44
|
+
$ npm create @n8n/node
|
|
45
45
|
┌ @n8n/create-node
|
|
46
46
|
│
|
|
47
47
|
◇ What is your node called?
|
|
@@ -65,7 +65,7 @@ $ pnpm create @n8n/node
|
|
|
65
65
|
│
|
|
66
66
|
◇ Next Steps ─────────────────────────────────────────────────────────────────────╮
|
|
67
67
|
│ │
|
|
68
|
-
│ cd ./my-awesome-api-node &&
|
|
68
|
+
│ cd ./my-awesome-api-node && npm run dev │
|
|
69
69
|
│ │
|
|
70
70
|
│ 📚 Documentation: https://docs.n8n.io/integrations/creating-nodes/ │
|
|
71
71
|
│ 💬 Community: https://community.n8n.io │
|
|
@@ -86,7 +86,7 @@ cd ./my-awesome-api-node
|
|
|
86
86
|
### 2. Start development server
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
|
|
89
|
+
npm run dev
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
This command:
|
|
@@ -109,28 +109,28 @@ Your generated project comes with these convenient npm scripts:
|
|
|
109
109
|
|
|
110
110
|
### Development
|
|
111
111
|
```bash
|
|
112
|
-
|
|
112
|
+
npm run dev
|
|
113
113
|
# Runs: n8n-node dev
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
### Building
|
|
117
117
|
```bash
|
|
118
|
-
|
|
118
|
+
npm run build
|
|
119
119
|
# Runs: n8n-node build
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
### Linting
|
|
123
123
|
```bash
|
|
124
|
-
|
|
124
|
+
npm run lint
|
|
125
125
|
# Runs: n8n-node lint
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
npm run lint:fix
|
|
128
128
|
# Runs: n8n-node lint --fix
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
### Publishing
|
|
132
132
|
```bash
|
|
133
|
-
|
|
133
|
+
npm run release
|
|
134
134
|
# Runs: n8n-node release
|
|
135
135
|
```
|
|
136
136
|
|
|
@@ -139,7 +139,7 @@ pnpm run release
|
|
|
139
139
|
### Build for production
|
|
140
140
|
|
|
141
141
|
```bash
|
|
142
|
-
|
|
142
|
+
npm run build
|
|
143
143
|
```
|
|
144
144
|
|
|
145
145
|
Generates:
|
|
@@ -151,7 +151,7 @@ Generates:
|
|
|
151
151
|
### Quality checks
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
|
-
|
|
154
|
+
npm run lint
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
Validates:
|
|
@@ -163,13 +163,13 @@ Validates:
|
|
|
163
163
|
Fix issues automatically:
|
|
164
164
|
|
|
165
165
|
```bash
|
|
166
|
-
|
|
166
|
+
npm run lint:fix
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
### Publish your node
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
|
-
|
|
172
|
+
npm run release
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
Runs [release-it](https://github.com/release-it/release-it) to handle the complete release process:
|
|
@@ -238,28 +238,28 @@ Choose the right template for your use case:
|
|
|
238
238
|
```bash
|
|
239
239
|
# Clear n8n node cli cache and restart
|
|
240
240
|
rm -rf ~/.n8n-node-cli/.n8n/custom
|
|
241
|
-
|
|
241
|
+
npm run dev
|
|
242
242
|
```
|
|
243
243
|
|
|
244
244
|
**TypeScript errors:**
|
|
245
245
|
```bash
|
|
246
246
|
# Reinstall dependencies
|
|
247
|
-
rm -rf node_modules
|
|
248
|
-
|
|
247
|
+
rm -rf node_modules npm-lock.yaml
|
|
248
|
+
npm install
|
|
249
249
|
```
|
|
250
250
|
|
|
251
251
|
**Build failures:**
|
|
252
252
|
```bash
|
|
253
253
|
# Check for linting issues first
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
npm run lint --fix
|
|
255
|
+
npm run build
|
|
256
256
|
```
|
|
257
257
|
|
|
258
258
|
**Development server issues:**
|
|
259
259
|
```bash
|
|
260
260
|
# Clear cache and restart development server
|
|
261
261
|
rm -rf ~/.n8n-node-cli/.n8n/custom
|
|
262
|
-
|
|
262
|
+
npm run dev
|
|
263
263
|
```
|
|
264
264
|
|
|
265
265
|
## 🔧 Advanced Usage
|
|
@@ -269,7 +269,7 @@ pnpm dev
|
|
|
269
269
|
If you prefer to use your own n8n installation:
|
|
270
270
|
|
|
271
271
|
```bash
|
|
272
|
-
|
|
272
|
+
npm run dev --external-n8n
|
|
273
273
|
```
|
|
274
274
|
|
|
275
275
|
### Custom User Folder
|
|
@@ -277,7 +277,7 @@ pnpm dev --external-n8n
|
|
|
277
277
|
Specify a custom location for n8n user data:
|
|
278
278
|
|
|
279
279
|
```bash
|
|
280
|
-
|
|
280
|
+
npm run dev --custom-user-folder /path/to/custom/folder
|
|
281
281
|
```
|
|
282
282
|
|
|
283
283
|
## 📚 Resources
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
const n8nNodeBin = require.resolve('.bin/n8n-node');
|
|
6
|
+
|
|
7
|
+
const result = spawnSync(n8nNodeBin, ['new', ...process.argv.slice(2)], {
|
|
8
|
+
stdio: 'inherit',
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/create-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Official CLI to create new community nodes for n8n",
|
|
5
5
|
"bin": {
|
|
6
|
-
"create-
|
|
6
|
+
"create-node": "bin/create-node.cjs"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"bin",
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
"url": "git+https://github.com/n8n-io/n8n.git"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@n8n/node-cli": "0.
|
|
19
|
+
"@n8n/node-cli": "0.8.0"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@n8n/typescript-config": "1.3.0"
|
|
20
23
|
},
|
|
21
24
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
22
25
|
"homepage": "https://n8n.io",
|
|
@@ -25,6 +28,6 @@
|
|
|
25
28
|
"email": "jan@n8n.io"
|
|
26
29
|
},
|
|
27
30
|
"scripts": {
|
|
28
|
-
"start": "node bin/create.
|
|
31
|
+
"start": "node bin/create-node.cjs"
|
|
29
32
|
}
|
|
30
33
|
}
|