flowlint 0.7.7 → 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 +89 -86
- package/dist/cli.js +334 -1847
- package/dist/cli.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,88 +1,91 @@
|
|
|
1
|
-
# FlowLint CLI
|
|
2
|
-
|
|
3
|
-
Command-line tool for static analysis of n8n workflows.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -g flowlint
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Or use npx:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npx flowlint scan .
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
### Scan workflows
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
# Scan current directory
|
|
23
|
-
flowlint scan
|
|
24
|
-
|
|
25
|
-
# Scan specific directory
|
|
26
|
-
flowlint scan ./workflows
|
|
27
|
-
|
|
28
|
-
#
|
|
29
|
-
flowlint scan
|
|
30
|
-
|
|
31
|
-
#
|
|
32
|
-
flowlint scan --
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
# FlowLint CLI
|
|
2
|
+
|
|
3
|
+
Command-line tool for static analysis of n8n workflows.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g flowlint
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or use npx:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx flowlint scan .
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
### Scan workflows
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Scan current directory
|
|
23
|
+
flowlint scan
|
|
24
|
+
|
|
25
|
+
# Scan specific directory
|
|
26
|
+
flowlint scan ./workflows
|
|
27
|
+
|
|
28
|
+
# Scan single file
|
|
29
|
+
flowlint scan ./workflows/payment-flow.n8n.json
|
|
30
|
+
|
|
31
|
+
# Output as JSON
|
|
32
|
+
flowlint scan --format json
|
|
33
|
+
|
|
34
|
+
# Fail on errors (for CI)
|
|
35
|
+
flowlint scan --fail-on-error
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Initialize configuration
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
flowlint init
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Creates a `.flowlint.yml` file in the current directory.
|
|
45
|
+
|
|
46
|
+
## Configuration
|
|
47
|
+
|
|
48
|
+
Create a `.flowlint.yml` file:
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
files:
|
|
52
|
+
include:
|
|
53
|
+
- "**/*.n8n.json"
|
|
54
|
+
ignore:
|
|
55
|
+
- "node_modules/**"
|
|
56
|
+
|
|
57
|
+
rules:
|
|
58
|
+
rate_limit_retry:
|
|
59
|
+
enabled: true
|
|
60
|
+
error_handling:
|
|
61
|
+
enabled: true
|
|
62
|
+
# ... more rules
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Rules
|
|
66
|
+
|
|
67
|
+
| Rule | Description | Severity |
|
|
68
|
+
|------|-------------|----------|
|
|
69
|
+
| R1 | Rate limit retry | must |
|
|
70
|
+
| R2 | Error handling | must |
|
|
71
|
+
| R3 | Idempotency | should |
|
|
72
|
+
| R4 | Secrets exposure | must |
|
|
73
|
+
| R5 | Dead ends | nit |
|
|
74
|
+
| R6 | Long running | should |
|
|
75
|
+
| R7 | Alert/log enforcement | should |
|
|
76
|
+
| R8 | Unused data | nit |
|
|
77
|
+
| R9 | Config literals | should |
|
|
78
|
+
| R10 | Naming convention | nit |
|
|
79
|
+
| R11 | Deprecated nodes | should |
|
|
80
|
+
| R12 | Unhandled error path | must |
|
|
81
|
+
| R13 | Webhook acknowledgment | must |
|
|
82
|
+
| R14 | Retry-After compliance | should |
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
83
86
|
MIT
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
## Dependencies
|
|
87
|
-
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## Dependencies
|
|
90
|
+
|
|
88
91
|
This tool depends on [@replikanti/flowlint-core](https://www.npmjs.com/package/@replikanti/flowlint-core) for linting logic.
|