@br-validators/cli 1.8.3 → 1.10.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 +43 -7
- package/dist/index.js +1409 -110
- package/dist/run-captured.js +1436 -114
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @br-validators/cli
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@br-validators/cli)
|
|
4
|
-
[](https://github.com/
|
|
5
|
-
[](https://github.com/open-data-brazil/br-validators/blob/main/LICENSE)
|
|
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.10.0**.
|
|
8
8
|
|
|
9
|
-
**Repo:** [github.com/
|
|
9
|
+
**Repo:** [github.com/open-data-brazil/br-validators](https://github.com/open-data-brazil/br-validators)
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -76,15 +76,25 @@ 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`, or CSV with `--col`); `--delimiter`, `--skip-header`; `--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 batch cpf --file payroll.csv --col cpf --json
|
|
95
|
+
br-validators sanitize pix ' PIX@BCB.GOV.BR ' --json
|
|
96
|
+
br-validators csosn lookup 102 --json
|
|
97
|
+
br-validators diff cpf 12345678909 12345678901 --json
|
|
88
98
|
br-validators generate cpf --seed 42 --masked --json
|
|
89
99
|
br-validators generate cnpj --format alphanumeric --seed 7 --json
|
|
90
100
|
br-validators generate placa --format mercosul --seed 3
|
|
@@ -120,6 +130,17 @@ br-validators cbo lookup 212405 --json
|
|
|
120
130
|
br-validators cbo search analista --limit 5
|
|
121
131
|
```
|
|
122
132
|
|
|
133
|
+
### Fiscal reference (33o–34)
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
br-validators iss-municipal lookup 3550308 --json
|
|
137
|
+
br-validators iss-municipal list --uf SP --limit 10 --json
|
|
138
|
+
br-validators iss-municipal search campinas --uf SP --limit 5 --json
|
|
139
|
+
br-validators iss-municipal resolve SP "São Paulo" --verbose
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Partial embed (~500 municipalities). **Estimation / quoting only — not NFSe emission.**
|
|
143
|
+
|
|
123
144
|
### Geography & calendar (27d)
|
|
124
145
|
|
|
125
146
|
```bash
|
|
@@ -138,8 +159,22 @@ br-validators ddd lookup 11 --verbose
|
|
|
138
159
|
br-validators moedas lookup BRL --json
|
|
139
160
|
br-validators paises-bacen lookup 1058 --verbose
|
|
140
161
|
br-validators incoterms lookup FOB --json
|
|
162
|
+
br-validators ptax lookup USD --verbose
|
|
163
|
+
br-validators ptax lookup USD 2026-06-20 --json --verbose
|
|
164
|
+
br-validators ptax historico USD 2026-06-01 2026-06-26 --json --verbose
|
|
141
165
|
```
|
|
142
166
|
|
|
167
|
+
**PTAX:** offline embed — last **90 business days** (`janelaDiasUteis: 90`; not live Bacen). `--verbose` prints `dataReferencia`, `isStale`, and `warning` when stale. `ptax historico` lists all embedded rows in a date range.
|
|
168
|
+
|
|
169
|
+
### Finance (SELIC)
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
br-validators selic --verbose
|
|
173
|
+
br-validators selic --date 2026-06-18 --json --verbose
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
`--verbose` includes `dataReferencia`, `isStale`, and dataset `capturadoEm` (same pattern as PTAX).
|
|
177
|
+
|
|
143
178
|
### Logistics (26e)
|
|
144
179
|
|
|
145
180
|
```bash
|
|
@@ -162,9 +197,10 @@ br-validators aeroportos lookup SBGR --json
|
|
|
162
197
|
|------|-------------|
|
|
163
198
|
| `--json` | JSON output |
|
|
164
199
|
| `--quiet` / `-q` | Exit code only (CI) |
|
|
200
|
+
| `--verbose` | PTAX / SELIC: `dataReferencia`, `isStale`, `warning`; other lookups: dataset metadata |
|
|
165
201
|
| `--file` / `-f` | Read value from file |
|
|
166
202
|
| `--source` | Print official source URL (per-type) |
|
|
167
|
-
| `--uf` | Required for IE / detect / sanitize IE;
|
|
203
|
+
| `--uf` | Required for IE / detect / sanitize IE; filter for `ibge list municipios`, `iss-municipal list`, and `iss-municipal search` |
|
|
168
204
|
|
|
169
205
|
### CI
|
|
170
206
|
|