coderifts 1.5.0 → 1.7.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 +20 -6
- package/dist/cli.js +91858 -0
- package/package.json +21 -8
- package/bin/coderifts.js +0 -45
- package/src/cloud.js +0 -51
- package/src/commands/diff.js +0 -237
- package/src/commands/init.js +0 -223
- package/src/commands/login.js +0 -38
- package/src/config.js +0 -65
- package/src/output/json.js +0 -10
- package/src/output/terminal.js +0 -156
package/README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CodeRifts CLI
|
|
2
2
|
|
|
3
3
|
Detect breaking API changes between OpenAPI specs from the command line. Works locally or with the CodeRifts cloud API.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install -g
|
|
8
|
+
npm install -g coderifts
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or run without installing:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx coderifts diff old-api.yaml new-api.yaml
|
|
9
15
|
```
|
|
10
16
|
|
|
11
17
|
## Quick Start
|
|
@@ -64,8 +70,7 @@ Save your CodeRifts API key for cloud features. Get a free key at [app.coderifts
|
|
|
64
70
|
|
|
65
71
|
```yaml
|
|
66
72
|
- name: Check API breaking changes
|
|
67
|
-
run:
|
|
68
|
-
npx @coderifts/cli diff old-api.yaml new-api.yaml --ci --format json
|
|
73
|
+
run: npx coderifts diff old-api.yaml new-api.yaml --ci --format json
|
|
69
74
|
```
|
|
70
75
|
|
|
71
76
|
### GitLab CI
|
|
@@ -73,13 +78,13 @@ Save your CodeRifts API key for cloud features. Get a free key at [app.coderifts
|
|
|
73
78
|
```yaml
|
|
74
79
|
api-check:
|
|
75
80
|
script:
|
|
76
|
-
- npx
|
|
81
|
+
- npx coderifts diff old-api.yaml new-api.yaml --ci --threshold 40
|
|
77
82
|
```
|
|
78
83
|
|
|
79
84
|
### Jenkins
|
|
80
85
|
|
|
81
86
|
```groovy
|
|
82
|
-
sh 'npx
|
|
87
|
+
sh 'npx coderifts diff old-api.yaml new-api.yaml --ci'
|
|
83
88
|
```
|
|
84
89
|
|
|
85
90
|
## Environment Variables
|
|
@@ -89,9 +94,18 @@ sh 'npx @coderifts/cli diff old-api.yaml new-api.yaml --ci'
|
|
|
89
94
|
| `CODERIFTS_API_KEY` | API key (alternative to `coderifts login`) |
|
|
90
95
|
| `NO_COLOR` | Disable colored output |
|
|
91
96
|
|
|
97
|
+
## Exit Codes
|
|
98
|
+
|
|
99
|
+
| Code | Meaning |
|
|
100
|
+
|------|---------|
|
|
101
|
+
| `0` | No breaking changes (or below threshold) |
|
|
102
|
+
| `1` | Breaking changes found (in CI mode) or analysis failed |
|
|
103
|
+
|
|
92
104
|
## Links
|
|
93
105
|
|
|
94
106
|
- [Website](https://coderifts.com)
|
|
107
|
+
- [CLI Integration Page](https://coderifts.com/integrations/cli/)
|
|
95
108
|
- [API Docs](https://app.coderifts.com/api/docs)
|
|
96
109
|
- [Get API Key](https://app.coderifts.com/api/signup)
|
|
97
110
|
- [GitHub](https://github.com/coderifts/app)
|
|
111
|
+
- [npm](https://www.npmjs.com/package/coderifts)
|