@br-validators/cli 1.8.3-data.1 → 1.9.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 +10 -3
- package/dist/index.js +1192 -78
- package/dist/run-captured.js +1259 -119
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://github.com/open-data-brazil/br-validators/blob/main/LICENSE)
|
|
5
5
|
[](https://github.com/open-data-brazil/br-validators/releases)
|
|
6
6
|
|
|
7
|
-
Terminal CLI for all Brazilian document validators in [@br-validators/core](https://www.npmjs.com/package/@br-validators/core) **v1.
|
|
7
|
+
Terminal CLI for all Brazilian document validators in [@br-validators/core](https://www.npmjs.com/package/@br-validators/core) **v1.9.0**.
|
|
8
8
|
|
|
9
9
|
**Repo:** [github.com/open-data-brazil/br-validators](https://github.com/open-data-brazil/br-validators)
|
|
10
10
|
|
|
@@ -76,15 +76,22 @@ br-validators ie validate P-01100424.3/002 --uf SP # SP produtor rural (auto-d
|
|
|
76
76
|
|---------|-------------|
|
|
77
77
|
| `detect [value]` | Classify raw input; `--uf` for IE |
|
|
78
78
|
| `sanitize <type> [value]` | ETL fixes + validate; `--uf` for `inscricao-estadual` |
|
|
79
|
+
| `mask <type> [value]` | Unified display mask; `--uf` for IE / RG |
|
|
80
|
+
| `compare <type> <valueA> <valueB>` | Normalized equality; `--uf` for IE / RG / título |
|
|
81
|
+
| `batch <type>` | Bulk validate (stdin or `--file`); `--uf`, `--limit` |
|
|
82
|
+
| `diff <type> <valueA> <valueB>` | Field-level diff; `--uf` for IE / RG / título |
|
|
79
83
|
| `generate <type>` | Synthetic test document; `--seed`, `--masked`, `--format` |
|
|
80
84
|
|
|
81
|
-
> **Library-only platform APIs:** `mask`, `compare`, `batch`, and `diff` are available via `@br-validators/core` subpaths — no dedicated CLI commands yet.
|
|
82
|
-
|
|
83
85
|
```bash
|
|
84
86
|
br-validators detect '123.456.789-09' --json
|
|
85
87
|
br-validators detect '110042490114' --uf SP --json
|
|
86
88
|
br-validators sanitize cpf ' 123.456.789-09 ' --json
|
|
87
89
|
br-validators sanitize inscricao-estadual '110.042.490.114' --uf SP --json
|
|
90
|
+
br-validators mask cpf 12345678909 --json
|
|
91
|
+
br-validators mask inscricao-estadual 110042490114 --uf SP --json
|
|
92
|
+
br-validators compare cpf '123.456.789-09' 12345678909 --json
|
|
93
|
+
br-validators batch cpf --file values.txt --json
|
|
94
|
+
br-validators diff cpf 12345678909 12345678901 --json
|
|
88
95
|
br-validators generate cpf --seed 42 --masked --json
|
|
89
96
|
br-validators generate cnpj --format alphanumeric --seed 7 --json
|
|
90
97
|
br-validators generate placa --format mercosul --seed 3
|