@getpeppr/cli 0.11.0 → 0.12.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/CHANGELOG.md +45 -0
- package/README.md +18 -9
- package/dist/index.js +226 -91
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,51 @@ All notable changes to `@getpeppr/cli` are documented here.
|
|
|
4
4
|
|
|
5
5
|
The CLI bundles `@getpeppr/sdk` into its published artifact (tsup `noExternal`), so `validate`, `convert` and `init` run the SDK's validators, country rules and UBL builder locally — an SDK release only reaches CLI users once the CLI is rebundled. Rebundle-only releases are listed with the SDK version they ship.
|
|
6
6
|
|
|
7
|
+
## [0.12.0] — 2026-09-06
|
|
8
|
+
|
|
9
|
+
Rebundles `@getpeppr/sdk` 5.3.0 (GPR-1280).
|
|
10
|
+
|
|
11
|
+
- `getpeppr validate` and `getpeppr convert --validate` now enforce the three
|
|
12
|
+
Peppol billing-profile rules on `invoiceTypeCode` (`P0100`, `P0101`,
|
|
13
|
+
`P0112`) because they validate or build UBL locally (GPR-884, GPR-1273).
|
|
14
|
+
Documents outside the profile now fail these commands where they previously
|
|
15
|
+
passed — pipelines gating on the exit code change verdict, hence the minor.
|
|
16
|
+
- The `structure` section rule IDs now designate the rules they actually
|
|
17
|
+
verify (GPR-1267): buyer name `BR-06` → `BR-07`, buyer street/city/postal
|
|
18
|
+
code → `GETPEPPR-BUYER-ADDRESS`, line VAT rate `BR-CO-17` →
|
|
19
|
+
`GETPEPPR-LINE-VAT-RATE`, `taxCurrencyRate` `BR-53` →
|
|
20
|
+
`GETPEPPR-TAX-CURRENCY-RATE`, the buyer-reference warning `BR-10` →
|
|
21
|
+
`PEPPOL-EN16931-R003`, and the due-date warning carries no id.
|
|
22
|
+
- The `structure` section no longer repeats the country advisory warnings
|
|
23
|
+
that the `countryRules` section already reports: every warning is
|
|
24
|
+
displayed and counted once, and `totalWarnings` drops accordingly
|
|
25
|
+
(GPR-1267). Scripts that relied on the duplicated entries in
|
|
26
|
+
`structure.warnings` must read them from `countryRules.warnings`.
|
|
27
|
+
- `getpeppr send` now uses an explicit JSON-send preflight aligned with
|
|
28
|
+
`POST /v1/invoices` (GPR-1285). Because that route currently ignores
|
|
29
|
+
`invoiceTypeCode`, profile rules `P0100`, `P0101`, and `P0112` no longer
|
|
30
|
+
block that inert field before sending. Structured `BR-CL-01` validation
|
|
31
|
+
and all other applicable offline and country checks remain active.
|
|
32
|
+
|
|
33
|
+
## [0.11.1] — 2026-09-04
|
|
34
|
+
|
|
35
|
+
Rebundles `@getpeppr/sdk` 5.2.0 (GPR-1084).
|
|
36
|
+
|
|
37
|
+
- The `schematron` section of `getpeppr validate` now reports `BR-16` for a
|
|
38
|
+
missing invoice line and uses explicit `GETPEPPR-*` IDs for ten SDK-local
|
|
39
|
+
diagnostics that previously cited different official rules. The separate
|
|
40
|
+
`structure` and `countryRules` sections are unchanged (GPR-1267 tracks their
|
|
41
|
+
reverse audit).
|
|
42
|
+
- Validation predicates, warning/error severities and process exit codes are
|
|
43
|
+
unchanged. The unit warning also stops calling every code outside the SDK's
|
|
44
|
+
small convenience list invalid under Rec20, and the payable warning no longer
|
|
45
|
+
invents `prepaidAmount` as the only possible cause. Scripts that filter the
|
|
46
|
+
`schematron` result by an old rule ID or warning text must update that filter.
|
|
47
|
+
- Human-readable output now labels the section `Offline Checks (partial)` and
|
|
48
|
+
reports `Pre-flight checks passed` or `Pre-flight checks found errors`; it no
|
|
49
|
+
longer claims that the partial pass proves validity or non-compliance. The
|
|
50
|
+
`--json` shape and process exit codes are unchanged.
|
|
51
|
+
|
|
7
52
|
## [0.11.0] — 2026-09-04
|
|
8
53
|
|
|
9
54
|
Rebundles `@getpeppr/sdk` 5.1.0.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @getpeppr/cli
|
|
2
2
|
|
|
3
|
-
Developer toolkit for Peppol e-invoicing. Scaffold invoices,
|
|
3
|
+
Developer toolkit for Peppol e-invoicing. Scaffold invoices, run offline pre-flight checks, convert to UBL XML, look up participants in the Peppol Directory, and send invoices to the Peppol network — all from the command line.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -30,7 +30,7 @@ The generated template includes a Belgian seller, the sandbox test receiver as b
|
|
|
30
30
|
|
|
31
31
|
### `getpeppr validate` — Validate an invoice
|
|
32
32
|
|
|
33
|
-
Run offline
|
|
33
|
+
Run partial offline pre-flight checks before the network applies the complete Peppol BIS 3.0 rulebooks:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
getpeppr validate invoice.json
|
|
@@ -44,14 +44,14 @@ Validating: invoice.json
|
|
|
44
44
|
── Structure ──────────────────────────────
|
|
45
45
|
✓ No errors
|
|
46
46
|
|
|
47
|
-
──
|
|
48
|
-
✓
|
|
47
|
+
── Offline Checks (partial) ───────────────────
|
|
48
|
+
✓ No findings
|
|
49
49
|
|
|
50
50
|
── Country Rules ────────────────────────────
|
|
51
51
|
⚠ No structured communication reference (BE-02)
|
|
52
52
|
|
|
53
53
|
── Summary ──────────────────────────────────
|
|
54
|
-
✓
|
|
54
|
+
✓ Pre-flight checks passed (1 warning)
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
| Flag | Description |
|
|
@@ -126,6 +126,14 @@ API key resolution order: `--key` flag → `GETPEPPR_API_KEY` env var → stored
|
|
|
126
126
|
|
|
127
127
|
Send an invoice through the getpeppr API to the Peppol network. Targets sandbox by default; pass `--prod` for production.
|
|
128
128
|
|
|
129
|
+
`getpeppr send` runs a JSON preflight aligned with `POST /v1/invoices`. That
|
|
130
|
+
endpoint currently ignores `invoiceTypeCode` and lets the provider generate the
|
|
131
|
+
UBL, so the send preflight does not apply `P0100`, `P0101`, or `P0112` to that
|
|
132
|
+
inert field. Structure checks including `BR-CL-01`, plus every other applicable
|
|
133
|
+
offline and country check, remain active. Use `getpeppr validate` or
|
|
134
|
+
`getpeppr convert --validate` for full local-UBL semantics; both retain those
|
|
135
|
+
profile checks because they validate or build the UBL locally.
|
|
136
|
+
|
|
129
137
|
```bash
|
|
130
138
|
# Send a JSON file
|
|
131
139
|
getpeppr send invoice.json
|
|
@@ -154,7 +162,7 @@ getpeppr send invoice.json --prod
|
|
|
154
162
|
| `--attachment` | Attach the bundled test PDF |
|
|
155
163
|
| `--watch` | Poll status until terminal (60s timeout) |
|
|
156
164
|
| `-y, --yes` | Skip the `--prod` confirmation prompt |
|
|
157
|
-
| `--no-validate` | Skip
|
|
165
|
+
| `--no-validate` | Skip the JSON send preflight |
|
|
158
166
|
| `--json` | Machine-readable JSON output |
|
|
159
167
|
| `--quiet` | Exit code only, no output |
|
|
160
168
|
|
|
@@ -232,10 +240,11 @@ GETPEPPR_API_KEY=$SANDBOX_KEY getpeppr send invoice.json --json
|
|
|
232
240
|
|
|
233
241
|
## What it validates
|
|
234
242
|
|
|
235
|
-
|
|
243
|
+
`getpeppr validate` and `getpeppr convert --validate` run three validation
|
|
244
|
+
engines from the [@getpeppr/sdk](https://www.npmjs.com/package/@getpeppr/sdk):
|
|
236
245
|
|
|
237
246
|
1. **Structure** — Required fields, type checks, format validation
|
|
238
|
-
2. **
|
|
247
|
+
2. **Offline Checks** — 40 registered partial pre-flight checks: exact network-rule equivalents plus explicit `GETPEPPR-*` diagnostics. The legacy provider-capability diagnostic `unsupported_vat_category` can also appear, but is outside that count. This is not a Peppol conformance verdict.
|
|
239
248
|
3. **Country Rules** — Belgium (BE), France (FR), Italy (IT), Netherlands (NL), Germany (DE)
|
|
240
249
|
|
|
241
250
|
Scaffolding (`init`), validation, and conversion run fully offline — no API key or network connection required. Only `lookup`, `send`, and `whoami` need a network connection. Before a sandbox `send`, the CLI reads `GET /v1/identity`: its own generated fixture is adapted to the returned O/0 or AE/0 profile, while a user-edited file is never rewritten silently and is refused locally if its tax mode conflicts with the sender.
|
|
@@ -294,7 +303,7 @@ This is the exact template generated by `getpeppr init`. See the [full type refe
|
|
|
294
303
|
|
|
295
304
|
## Ready to send?
|
|
296
305
|
|
|
297
|
-
|
|
306
|
+
When your invoice JSON is ready, send it to the Peppol network — straight from the CLI:
|
|
298
307
|
|
|
299
308
|
```bash
|
|
300
309
|
getpeppr login # store your sandbox key once
|