@getpeppr/cli 0.7.0 → 0.8.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 +37 -0
- package/README.md +42 -1
- package/package.json +2 -2
- package/dist/index.js +0 -4397
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,43 @@ 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.8.0] — 2026-08-19
|
|
8
|
+
|
|
9
|
+
**`getpeppr whoami`** — show the Peppol identity of the account behind your
|
|
10
|
+
API key (GPR-1094). Environment, company, country, and every registered
|
|
11
|
+
identifier with its status. Works with any key; `--prod`, `--local`, `--key`
|
|
12
|
+
and `--json` behave as on `send` and `lookup`. No identity yet is an answer,
|
|
13
|
+
not an error — the command points you at the console page where you set one up.
|
|
14
|
+
|
|
15
|
+
Bundles SDK 4.3.0 (`peppol.identity.get()` — the API this command consumes).
|
|
16
|
+
|
|
17
|
+
## [0.7.1] — 2026-08-18
|
|
18
|
+
|
|
19
|
+
Rebundle SDK 4.1.1. This release matters for `getpeppr validate`, which runs the
|
|
20
|
+
schematron validator locally from the bundled SDK.
|
|
21
|
+
|
|
22
|
+
**Four rule identifiers were wrong, and 0.7.0 still reports them.** They named
|
|
23
|
+
real rules from the Peppol rulebook — just not the ones being checked — which is
|
|
24
|
+
worse than a typo: you could look one up, read a genuine rule, and find it had
|
|
25
|
+
nothing to do with your document.
|
|
26
|
+
|
|
27
|
+
| `validate` reported | It now reports | What the check actually verifies |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| `BR-S-01` | `BR-S-05` | standard-rated line must carry a VAT rate above zero |
|
|
30
|
+
| `BR-S-05` | `BR-Z-05` | zero-rated line must carry a rate of exactly zero |
|
|
31
|
+
| `BR-S-06` | `BR-E-05` | VAT-exempt line must carry a rate of exactly zero |
|
|
32
|
+
| `BR-S-08` | `BR-AE-05` | reverse-charge line must carry a rate of exactly zero |
|
|
33
|
+
|
|
34
|
+
The checks themselves were always right — a zero-rated line carrying a non-zero
|
|
35
|
+
rate was always caught. Only the label was wrong. **If you branch on any of these
|
|
36
|
+
identifiers in a pipeline, they change with this version.**
|
|
37
|
+
|
|
38
|
+
Fixed in SDK 4.1.0 on 2026-08-18; CLI users only receive it now, because the CLI
|
|
39
|
+
bundles the SDK rather than depending on it at runtime.
|
|
40
|
+
|
|
41
|
+
Also carries SDK 4.1.1, which corrects the JSDoc on `importFile()` — raw import
|
|
42
|
+
does not preserve your document byte for byte, and the SDK said it did.
|
|
43
|
+
|
|
7
44
|
## [0.7.0] — 2026-08-16
|
|
8
45
|
|
|
9
46
|
Rebundle SDK 4.0.0 (GPR-1061). `getpeppr send --watch` could not confirm a
|
package/README.md
CHANGED
|
@@ -159,6 +159,30 @@ getpeppr send invoice.json --prod
|
|
|
159
159
|
|
|
160
160
|
When sending through the API, getpeppr determines the seller from the API key. A `from` party can still be present for local validation and UBL conversion, but the gateway ignores it for delivery.
|
|
161
161
|
|
|
162
|
+
### `getpeppr whoami` — Show your Peppol identity
|
|
163
|
+
|
|
164
|
+
Read the Peppol identity of the account behind your API key: the environment the key operates in, your legal entity as the gateway holds it, and every Peppol identifier registered for it with its status. Works with **any** key — standard keys included. This is the fastest way to check "is my identifier registered and verified?" without opening the console.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Sandbox identity (default)
|
|
168
|
+
getpeppr whoami
|
|
169
|
+
|
|
170
|
+
# Production identity (uses your live key)
|
|
171
|
+
getpeppr whoami --prod
|
|
172
|
+
|
|
173
|
+
# Machine-readable
|
|
174
|
+
getpeppr whoami --json
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
| Flag | Description |
|
|
178
|
+
|------|-------------|
|
|
179
|
+
| `--prod` | Use the live API key (default: sandbox) |
|
|
180
|
+
| `--local` | Target `http://localhost:3001` (dev server) |
|
|
181
|
+
| `--key <key>` | Override API key. CI use only — visible in `ps`/shell history. Prefer `GETPEPPR_API_KEY`. |
|
|
182
|
+
| `--json` | Output the identity as JSON |
|
|
183
|
+
|
|
184
|
+
If no legal entity exists in the environment yet, `whoami` says so and points to the console page where you create one.
|
|
185
|
+
|
|
162
186
|
### `getpeppr logout` — Remove stored credentials
|
|
163
187
|
|
|
164
188
|
```bash
|
|
@@ -175,6 +199,23 @@ Removes `~/.config/getpeppr/credentials.json`. No-op if the file doesn't exist.
|
|
|
175
199
|
| `1` | Failure (invalid invoice, participant not found) |
|
|
176
200
|
| `2` | Input error (file not found, invalid JSON, bad arguments) |
|
|
177
201
|
|
|
202
|
+
### `send --watch` is two outcomes, not one
|
|
203
|
+
|
|
204
|
+
Since 0.7.0, a watch that fails because the API answered something the CLI
|
|
205
|
+
cannot honestly read exits **1**. Before 0.7.0 it printed a warning and exited
|
|
206
|
+
`0`, which meant an automation could read a broken API as a confirmed delivery.
|
|
207
|
+
|
|
208
|
+
A watch that runs out of time still exits **0**, and that is a different fact:
|
|
209
|
+
the document was accepted, and the watch stopped without having *seen* a
|
|
210
|
+
terminal status. It does not follow that the document is still in flight. The
|
|
211
|
+
deadline is checked between polls, so a status can turn terminal during the
|
|
212
|
+
final wait and never be read — the status printed on a timeout may already be
|
|
213
|
+
stale. Poll again or use a webhook rather than treating a timeout as a failure.
|
|
214
|
+
|
|
215
|
+
⚠️ The 60 seconds bound when the **last poll starts**, not when the command
|
|
216
|
+
ends. The deadline is checked before each request, so a slow or retried call
|
|
217
|
+
carries the run past it. If a pipeline needs a hard ceiling, impose your own.
|
|
218
|
+
|
|
178
219
|
## CI/CD integration
|
|
179
220
|
|
|
180
221
|
```bash
|
|
@@ -196,7 +237,7 @@ The CLI runs three validation engines from the [@getpeppr/sdk](https://www.npmjs
|
|
|
196
237
|
2. **Business Rules** — Peppol BIS 3.0 / EN 16931 compliance (BR-xx, BR-CO-xx, PEPPOL-xx rules)
|
|
197
238
|
3. **Country Rules** — Belgium (BE), France (FR), Italy (IT), Netherlands (NL), Germany (DE)
|
|
198
239
|
|
|
199
|
-
Scaffolding (`init`), validation, and conversion run fully offline — no API key or network connection required. Only `lookup` and `
|
|
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.
|
|
200
241
|
|
|
201
242
|
## Invoice format
|
|
202
243
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpeppr/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "CLI tool for Peppol e-invoice validation and development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@getpeppr/sdk": "^4.
|
|
47
|
+
"@getpeppr/sdk": "^4.3.0",
|
|
48
48
|
"commander": "^13.1.0",
|
|
49
49
|
"picocolors": "^1.1.1"
|
|
50
50
|
},
|