@n8n/node-cli 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 +18 -18
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/dev/index.js +44 -16
- package/dist/commands/dev/index.js.map +1 -1
- package/dist/commands/dev/utils.d.ts +3 -1
- package/dist/commands/dev/utils.js +81 -40
- package/dist/commands/dev/utils.js.map +1 -1
- package/dist/commands/new/prompts.js +3 -3
- package/dist/commands/new/prompts.js.map +1 -1
- package/dist/utils/validation.js +1 -1
- package/dist/utils/validation.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,45 +7,45 @@ Official CLI for developing community nodes for n8n.
|
|
|
7
7
|
**To create a new node**, run:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
npm create @n8n/node@latest # or pnpm/yarn/...
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
This will generate a project with `
|
|
13
|
+
This will generate a project with `npm` scripts that use this CLI under the hood.
|
|
14
14
|
|
|
15
15
|
## 📦 Generated Project Commands
|
|
16
16
|
|
|
17
|
-
After creating your node with `
|
|
17
|
+
After creating your node with `npm create @n8n/node`, you'll use these commands in your project:
|
|
18
18
|
|
|
19
19
|
### Development
|
|
20
20
|
```bash
|
|
21
|
-
|
|
21
|
+
npm run dev
|
|
22
22
|
# Runs: n8n-node dev
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### Building
|
|
26
26
|
```bash
|
|
27
|
-
|
|
27
|
+
npm run build
|
|
28
28
|
# Runs: n8n-node build
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
### Linting
|
|
32
32
|
```bash
|
|
33
|
-
|
|
33
|
+
npm run lint
|
|
34
34
|
# Runs: n8n-node lint
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
npm run lint:fix
|
|
37
37
|
# Runs: n8n-node lint --fix
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
### Publishing
|
|
41
41
|
```bash
|
|
42
|
-
|
|
42
|
+
npm run release
|
|
43
43
|
# Runs: n8n-node release
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
## 🛠️ CLI Reference
|
|
47
47
|
|
|
48
|
-
> **Note:** These commands are typically wrapped by `
|
|
48
|
+
> **Note:** These commands are typically wrapped by `npm` scripts in generated projects.
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
n8n-node [COMMAND] [OPTIONS]
|
|
@@ -76,7 +76,7 @@ n8n-node new n8n-nodes-my-app --force
|
|
|
76
76
|
n8n-node new n8n-nodes-my-app --template declarative/custom
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
> **Note:** This command is used internally by `
|
|
79
|
+
> **Note:** This command is used internally by `npm create @n8n/node` to provide the interactive scaffolding experience.
|
|
80
80
|
|
|
81
81
|
#### `n8n-node dev`
|
|
82
82
|
|
|
@@ -172,13 +172,13 @@ The recommended workflow using the scaffolding tool:
|
|
|
172
172
|
|
|
173
173
|
1. **Create your node**:
|
|
174
174
|
```bash
|
|
175
|
-
|
|
175
|
+
npm create @n8n/node my-awesome-node
|
|
176
176
|
cd my-awesome-node
|
|
177
177
|
```
|
|
178
178
|
|
|
179
179
|
2. **Start development**:
|
|
180
180
|
```bash
|
|
181
|
-
|
|
181
|
+
npm run dev
|
|
182
182
|
```
|
|
183
183
|
- Starts n8n on `http://localhost:5678`
|
|
184
184
|
- Links your node automatically
|
|
@@ -188,17 +188,17 @@ The recommended workflow using the scaffolding tool:
|
|
|
188
188
|
|
|
189
189
|
4. **Lint your code**:
|
|
190
190
|
```bash
|
|
191
|
-
|
|
191
|
+
npm run lint
|
|
192
192
|
```
|
|
193
193
|
|
|
194
194
|
5. **Build for production**:
|
|
195
195
|
```bash
|
|
196
|
-
|
|
196
|
+
npm run build
|
|
197
197
|
```
|
|
198
198
|
|
|
199
199
|
6. **Publish**:
|
|
200
200
|
```bash
|
|
201
|
-
|
|
201
|
+
npm run release
|
|
202
202
|
```
|
|
203
203
|
|
|
204
204
|
## 📁 Project Structure
|
|
@@ -244,16 +244,16 @@ The CLI reads configuration from your `package.json`:
|
|
|
244
244
|
rm -rf ~/.n8n-node-cli/.n8n/custom
|
|
245
245
|
|
|
246
246
|
# Restart development server
|
|
247
|
-
|
|
247
|
+
npm run dev
|
|
248
248
|
```
|
|
249
249
|
|
|
250
250
|
### Build failures
|
|
251
251
|
```bash
|
|
252
252
|
# Run linting first
|
|
253
|
-
|
|
253
|
+
npm run lint
|
|
254
254
|
|
|
255
255
|
# Clean build
|
|
256
|
-
|
|
256
|
+
npm run build
|
|
257
257
|
```
|
|
258
258
|
|
|
259
259
|
## 📚 Resources
|