@getpeppr/cli 0.4.7 → 0.5.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/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2166,7 +2166,7 @@ ${validation.errors.map((e) => ` - ${e.field}: ${e.message}${e.suggestion ? ` (
|
|
|
2166
2166
|
const timeout = options?.timeout ?? 12e4;
|
|
2167
2167
|
const interval = options?.interval ?? 5e3;
|
|
2168
2168
|
const targets = Array.isArray(targetStatus) ? targetStatus : [targetStatus];
|
|
2169
|
-
const terminalFailures = ["failed", "rejected"];
|
|
2169
|
+
const terminalFailures = ["failed", "rejected", "no_action"];
|
|
2170
2170
|
const startTime = Date.now();
|
|
2171
2171
|
while (true) {
|
|
2172
2172
|
const result = await this.getStatus(documentId);
|
|
@@ -3090,7 +3090,7 @@ function registerInitCommand(program2) {
|
|
|
3090
3090
|
4. Send: getpeppr send ${filename}
|
|
3091
3091
|
|
|
3092
3092
|
${pc2.dim("Sandbox note:")} this template includes VAT. To send it on a sandbox
|
|
3093
|
-
account, first register your VAT
|
|
3093
|
+
account, first register your VAT on the Peppol identity page, or set each
|
|
3094
3094
|
line's "vatCategory" to "O" (outside the scope of VAT) for a no-VAT test send.
|
|
3095
3095
|
`);
|
|
3096
3096
|
process.exit(0);
|
|
@@ -3748,7 +3748,8 @@ var TERMINAL_STATES = /* @__PURE__ */ new Set([
|
|
|
3748
3748
|
"delivered",
|
|
3749
3749
|
"accepted",
|
|
3750
3750
|
"rejected",
|
|
3751
|
-
"failed"
|
|
3751
|
+
"failed",
|
|
3752
|
+
"no_action"
|
|
3752
3753
|
]);
|
|
3753
3754
|
var sleep2 = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
3754
3755
|
async function pollUntilTerminal(client, documentId, options = {}) {
|
|
@@ -3797,7 +3798,7 @@ var API_BASE = "https://api.getpeppr.dev/v1";
|
|
|
3797
3798
|
var LOCAL_BASE = "http://localhost:3001/api/v1";
|
|
3798
3799
|
var DASHBOARD_BASE = "https://console.getpeppr.dev/invoices";
|
|
3799
3800
|
function registerSendCommand(program2) {
|
|
3800
|
-
program2.command("send").description("Send an invoice to the Peppol network via getpeppr API").argument("[file]", "optional path to invoice JSON (mutex with --to/--amount/...)").option("--prod", "target production (live keys + confirmation)").option("--local", "target localhost:3001 dev server").option("--key <key>", "override API key \u2014 for CI/scripted use only; visible in `ps` and shell history. Prefer GETPEPPR_API_KEY env var.").option("--to <peppol-id>", "recipient peppol id (e.g., 9925:BE0314595348)").option("--country <iso>", "recipient ISO 3166-1 alpha-2 country override (e.g., BE)").option("--amount <number>", "line amount in major currency units (decimal allowed)").option("--currency <iso>", "ISO 4217 currency (default EUR)").option("--desc <text>", "line description").option("--attachment", "attach the test PDF").option("--watch", "poll status until
|
|
3801
|
+
program2.command("send").description("Send an invoice to the Peppol network via getpeppr API").argument("[file]", "optional path to invoice JSON (mutex with --to/--amount/...)").option("--prod", "target production (live keys + confirmation)").option("--local", "target localhost:3001 dev server").option("--key <key>", "override API key \u2014 for CI/scripted use only; visible in `ps` and shell history. Prefer GETPEPPR_API_KEY env var.").option("--to <peppol-id>", "recipient peppol id (e.g., 9925:BE0314595348)").option("--country <iso>", "recipient ISO 3166-1 alpha-2 country override (e.g., BE)").option("--amount <number>", "line amount in major currency units (decimal allowed)").option("--currency <iso>", "ISO 4217 currency (default EUR)").option("--desc <text>", "line description").option("--attachment", "attach the test PDF").option("--watch", "poll status until a terminal state (60s timeout)").option("-y, --yes", "skip --prod confirmation prompt").option("--no-validate", "skip pre-validation locally").option("--json", "output JSON").option("--quiet", "exit code only, no output").action(async (file, flags) => {
|
|
3801
3802
|
let auth;
|
|
3802
3803
|
try {
|
|
3803
3804
|
auth = resolveApiKey({
|
|
@@ -3907,7 +3908,7 @@ function registerSendCommand(program2) {
|
|
|
3907
3908
|
mode
|
|
3908
3909
|
);
|
|
3909
3910
|
if (output) process.stdout.write(output + "\n");
|
|
3910
|
-
if (finalStatus === "rejected" || finalStatus === "failed") {
|
|
3911
|
+
if (finalStatus === "rejected" || finalStatus === "failed" || finalStatus === "no_action") {
|
|
3911
3912
|
process.exit(1);
|
|
3912
3913
|
}
|
|
3913
3914
|
process.exit(0);
|