@getpeppr/cli 0.8.4 → 0.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/CHANGELOG.md CHANGED
@@ -4,12 +4,61 @@ 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.10.0] — 2026-08-28
8
+
9
+ Bundles SDK **5.0.0**. Minor rather than patch because inputs that used to pass
10
+ now change the exit code — if you gate a pipeline on `getpeppr validate`, read
11
+ this before upgrading.
12
+
13
+ **What `validate` now refuses:**
14
+
15
+ | Input | 0.9.0 | 0.10.0 |
16
+ | --- | --- | --- |
17
+ | `"currency": "BGN"` or `"HRK"` | accepted, exit 0 | `Invalid currency code`, exit 1 |
18
+ | a negative allowance or charge `amount` | accepted, exit 0 | refused, exit 1 |
19
+
20
+ Bulgaria and Croatia joined the euro, and Peppol BIS Billing 3.0.21 — mandatory
21
+ on the network since 2026-08-17 — dropped both codes from `BR-CL-04`/`BR-CL-05`.
22
+ Use `EUR`. Separately, `XCG` (Caribbean guilder) is now accepted; it is the
23
+ successor to `ANG`, not a replacement for either of the two dropped codes.
24
+
25
+ ⚠️ **`vatCategory: "L"` and `"M"` are NOT part of this change.** Measured on the
26
+ published 0.9.0: `validate` already exits 1 on both, because it bundles an SDK
27
+ newer than 3.2.0. And `convert` without `--validate` still renders them, as it
28
+ should — an IGIC document is valid EN 16931, it simply cannot travel our JSON
29
+ send path.
30
+
31
+ **And a fix this CLI never carried.** 0.9.0 bundled SDK 4.8.0, one release
32
+ behind, so it missed the `baseQuantity` correction from 4.8.1. Measured on the
33
+ published 0.9.0 against this build, same input — a 24-unit order priced "€30 per
34
+ box of 12":
35
+
36
+ ```
37
+ 0.9.0 <cbc:LineExtensionAmount currencyID="EUR">720.00</cbc:LineExtensionAmount>
38
+ 0.10.0 <cbc:LineExtensionAmount currencyID="EUR">60.00</cbc:LineExtensionAmount>
39
+ ```
40
+
41
+ 720 instead of 60 is a fatal `PEPPOL-EN16931-R120` violation. `getpeppr convert`
42
+ gets it right now (GPR-1212).
43
+
44
+ ## [0.9.0] — 2026-08-23
45
+
46
+ Before every sandbox send, the CLI now reads the exact sender profile from
47
+ `GET /v1/identity`. Its own generated fixture is adapted to O/0 for a
48
+ routing-only sender or AE/0 for a sender carrying a Tax Identifier. A
49
+ user-authored file is never rewritten silently: an incompatible tax mode is
50
+ refused locally before the invoice API is called.
51
+
52
+ This replaces the incomplete static O/0 assumption in 0.8.4. It also bundles
53
+ SDK 4.8.0 and fails closed when the provider inventory or scheme role cannot be
54
+ verified (GPR-1149).
55
+
7
56
  ## [0.8.4] — 2026-08-22
8
57
 
9
- `getpeppr init` now scaffolds an invoice that a fresh sandbox account can send:
10
- the SPF Economie test receiver plus out-of-scope `O/0` lines. The previous
11
- template targeted the correct receiver but still carried VAT-bearing and
12
- reverse-charge lines, so a new sender with no VAT identifier received 422.
58
+ `getpeppr init` scaffolded the SPF Economie test receiver plus out-of-scope
59
+ `O/0` lines. That fixed routing-only senders but incorrectly assumed every
60
+ sandbox sender lacked a Tax Identifier; 0.9.0 supersedes the static choice with
61
+ the exact sender profile.
13
62
 
14
63
  Every generated `O` line includes the builder-only exemption reason required by
15
64
  the SDK's local validator. The quick `getpeppr send --to …` payload remains on
package/README.md CHANGED
@@ -237,11 +237,11 @@ The CLI runs three validation engines from the [@getpeppr/sdk](https://www.npmjs
237
237
  2. **Business Rules** — Peppol BIS 3.0 / EN 16931 compliance (BR-xx, BR-CO-xx, PEPPOL-xx rules)
238
238
  3. **Country Rules** — Belgium (BE), France (FR), Italy (IT), Netherlands (NL), Germany (DE)
239
239
 
240
- Scaffolding (`init`), validation, and conversion run fully offline — no API key or network connection required. Only `lookup`, `send`, and `whoami` need a network connection.
240
+ 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.
241
241
 
242
242
  ## Invoice format
243
243
 
244
- The input file must be a JSON object matching the getpeppr `InvoiceInput` type. `number`, `to`, and `lines` are required for API sends. The `from` party is included in the scaffold because offline validation and UBL conversion need seller metadata; API sends use the legal entity linked to your key. The generated file is an integration fixture: a fresh sandbox sender has no VAT identifier, so every line uses category `O` at rate `0`.
244
+ The input file must be a JSON object matching the getpeppr `InvoiceInput` type. `number`, `to`, and `lines` are required for API sends. The `from` party is included in the scaffold because offline validation and UBL conversion need seller metadata; API sends use the legal entity linked to your key. The generated file starts as an O/0 integration fixture. At send time the CLI verifies it against the actual sender profile and never forwards an incompatible tax mode.
245
245
 
246
246
  ```json
247
247
  {