yaml-validate-cli 1.0.0 → 1.0.1
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 +38 -0
- package/package.json +14 -4
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# yaml-validate-cli
|
|
2
|
+
|
|
3
|
+
Validate YAML files from the command line with detailed error reporting. Zero dependencies.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g yaml-validate-cli
|
|
9
|
+
# or use directly
|
|
10
|
+
npx yaml-validate-cli config.yaml
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Validate a single YAML file
|
|
17
|
+
yaml-validate-cli config.yaml
|
|
18
|
+
|
|
19
|
+
# Validate multiple files
|
|
20
|
+
yaml-validate-cli *.yaml
|
|
21
|
+
|
|
22
|
+
# Validate all YAML files recursively
|
|
23
|
+
yaml-validate-cli --glob '**/*.yml'
|
|
24
|
+
|
|
25
|
+
# Validate and output parsed JSON
|
|
26
|
+
yaml-validate-cli config.yaml --json
|
|
27
|
+
|
|
28
|
+
# Strict mode: fail on duplicate keys or extra whitespace
|
|
29
|
+
yaml-validate-cli config.yaml --strict
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
- Clear syntax error messages with line and column numbers
|
|
34
|
+
- Supports `.yaml` and `.yml` extensions
|
|
35
|
+
- Glob pattern support for batch validation
|
|
36
|
+
- Outputs parsed JSON for pipeline integration
|
|
37
|
+
- CI-friendly exit codes (non-zero on any error)
|
|
38
|
+
- Zero external dependencies
|
package/package.json
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yaml-validate-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Validate YAML files from the command line with detailed error reporting",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"bin": {
|
|
7
|
+
"yaml-validate": "cli.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "node cli.js --help"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"yaml",
|
|
14
|
+
"validate",
|
|
15
|
+
"cli",
|
|
16
|
+
"lint",
|
|
17
|
+
"devops"
|
|
18
|
+
],
|
|
9
19
|
"author": "Wilson Xu",
|
|
10
20
|
"license": "MIT",
|
|
11
21
|
"dependencies": {}
|