@usearazzo/cli 1.0.1-alpha.10 → 1.0.1-alpha.11
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 -53
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -16,79 +16,49 @@
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Get started
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Installation
|
|
24
|
-
|
|
25
|
-
```sh
|
|
26
|
-
npm install --global @usearazzo/cli
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Or run it without installing:
|
|
21
|
+
Validate an Arazzo document. Nothing to install:
|
|
30
22
|
|
|
31
23
|
```sh
|
|
32
24
|
npx @usearazzo/cli validate adopt-a-pet.arazzo.yaml
|
|
33
25
|
```
|
|
34
26
|
|
|
35
|
-
|
|
27
|
+
<a href="https://usearazzo.com/cli/"><img alt="usearazzo validate reporting two duplicate stepId errors in one Arazzo document and a missing step description warning in another, each with its line range and rule code" src="https://raw.githubusercontent.com/usearazzo/arazzo-toolkit/main/packages/cli/assets/validate-demo.svg"></a>
|
|
36
28
|
|
|
37
|
-
|
|
29
|
+
The argument is a path, a `file:` URI, or an HTTP(S) URL. Every problem comes with the line range that caused it and the code of the rule it broke.
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
$ usearazzo validate adopt-a-pet.arazzo.yaml
|
|
41
|
-
adopt-a-pet.arazzo.yaml
|
|
42
|
-
2:1-2:5 error 9010300 should always have a 'version'
|
|
43
|
-
2:1-2:5 warning 9010101 Info 'description' should be present and non-empty string.
|
|
44
|
-
2:1-2:5 hint 9010401 Info 'summary' is recommended to be present and a non-empty string.
|
|
45
|
-
9:5-18:1 hint 9040203 Workflow 'summary' is recommended to be present and a non-empty string.
|
|
46
|
-
12:9-18:1 warning 9050201 Step 'description' should be present and non-empty string.
|
|
47
|
-
17:21-17:29 error 9070401 Success action "stepId" must reference an existing step in the same workflow.
|
|
31
|
+
Prefer a global install?
|
|
48
32
|
|
|
49
|
-
|
|
33
|
+
```sh
|
|
34
|
+
npm install --global @usearazzo/cli
|
|
35
|
+
usearazzo --help
|
|
50
36
|
```
|
|
51
37
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
| Option | Description |
|
|
55
|
-
|---|---|
|
|
56
|
-
| `-f, --format <format>` | Output format: `stylish` (default) or `json` |
|
|
57
|
-
| `--json` | Shorthand for `--format json` |
|
|
58
|
-
| `-o, --output <file>` | Write the report to a file instead of stdout. Never the input document |
|
|
59
|
-
| `-c, --config <file>` | Configuration file. Defaults to the first [configuration file](#configuration-file) found in the current working directory |
|
|
60
|
-
| `--json-schema-validation` | Also run JSON Schema validation (off by default) |
|
|
61
|
-
| `--max-problems <n>` | Report at most `n` problems. The exit code still counts all of them |
|
|
62
|
-
| `--fail-severity <severity>` | Lowest severity that fails the run: `error` (default), `warning`, `info`, `hint` |
|
|
38
|
+
Requires Node.js 20.10 or newer.
|
|
63
39
|
|
|
64
|
-
|
|
40
|
+
## Commands
|
|
65
41
|
|
|
66
|
-
|
|
67
|
-
|
|
42
|
+
| Command | What it does |
|
|
43
|
+
| :------ | :----------- |
|
|
44
|
+
| [`validate`](https://usearazzo.com/docs/cli/#validate) | Validate and lint an Arazzo 1.0.x or 1.1.0 document, from a file or a URL. Wraps [@usearazzo/validator](https://github.com/usearazzo/arazzo-toolkit/tree/main/packages/validator#readme). |
|
|
68
45
|
|
|
69
|
-
|
|
46
|
+
Built for CI: the exit code gates on a severity you choose (`--fail-severity`), and problems are available as JSON (`--format json`). Settings can live in a `.usearazzo.yaml` or `.usearazzo.json` file in the working directory.
|
|
70
47
|
|
|
71
|
-
|
|
48
|
+
A command to run workflows, wrapping [@usearazzo/runner](https://github.com/usearazzo/arazzo-toolkit/tree/main/packages/runner#readme), comes next.
|
|
72
49
|
|
|
73
|
-
|
|
50
|
+
## Documentation
|
|
74
51
|
|
|
75
|
-
|
|
76
|
-
languageService:
|
|
77
|
-
validationContext:
|
|
78
|
-
jsonSchemaValidation: true # default: false
|
|
79
|
-
semanticValidation: true # default: true
|
|
80
|
-
referenceValidation: true # default: true
|
|
81
|
-
semanticLinting: true # default: true
|
|
82
|
-
parseContext:
|
|
83
|
-
arazzo:
|
|
84
|
-
sourceDescriptionsResolution: true # fetch and parse source descriptions (default: true)
|
|
85
|
-
```
|
|
52
|
+
Every option is documented on [usearazzo.com](https://usearazzo.com/) and in `usearazzo <command> --help`:
|
|
86
53
|
|
|
87
|
-
|
|
54
|
+
- **[UseArazzo CLI](https://usearazzo.com/cli/)** introduces the CLI: what it does in a terminal and in CI, and the commands that come next. Start here when you are deciding whether it fits.
|
|
55
|
+
- **[CLI Reference](https://usearazzo.com/docs/cli/)** covers every command and option, both output formats, the exit codes, the configuration file, and running in CI. Start here when you know what you want to run.
|
|
88
56
|
|
|
89
|
-
##
|
|
57
|
+
## Supported versions
|
|
90
58
|
|
|
91
|
-
|
|
59
|
+
- [Arazzo 1.0.0](https://spec.openapis.org/arazzo/v1.0.0)
|
|
60
|
+
- [Arazzo 1.0.1](https://spec.openapis.org/arazzo/v1.0.1)
|
|
61
|
+
- [Arazzo 1.1.0](https://spec.openapis.org/arazzo/v1.1.0)
|
|
92
62
|
|
|
93
63
|
## Part of the Arazzo Toolkit
|
|
94
64
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usearazzo/cli",
|
|
3
|
-
"version": "1.0.1-alpha.
|
|
3
|
+
"version": "1.0.1-alpha.11",
|
|
4
4
|
"description": "Command-line interface for Arazzo documents: validate and lint from your terminal or CI/CD pipeline.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arazzo",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"license": "Apache-2.0",
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@babel/runtime-corejs3": "^8.0.6",
|
|
51
|
-
"@usearazzo/validator": "1.0.1-alpha.
|
|
51
|
+
"@usearazzo/validator": "1.0.1-alpha.11",
|
|
52
52
|
"chalk": "^5.6.2",
|
|
53
53
|
"commander": "^14.0.3",
|
|
54
54
|
"ramda-adjunct": "^6.1.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"NOTICE",
|
|
63
63
|
"README.md"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "3cfffaf0045eff162d73df30f840c35cc593af77"
|
|
66
66
|
}
|