@capxul/cli 4.20.0-beta.18 → 4.20.0-beta.19

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 CHANGED
@@ -226,7 +226,7 @@ output; use the printed document render command.
226
226
  "invoiceNumber": "INV-002",
227
227
  "payerRef": "Bob",
228
228
  "payeeRef": "Alice",
229
- "dueAt": 1900000000,
229
+ "dueAt": 1900000000000,
230
230
  "note": "Thank you",
231
231
  "discountMinor": "1000000",
232
232
  "lineItems": [{ "description": "Consulting", "quantity": 1, "unitMinor": "10000000" }]
@@ -235,13 +235,19 @@ output; use the printed document render command.
235
235
  ```
236
236
 
237
237
  Supply your Invoice number. The request reference defaults to that number;
238
- optional `reference` changes the request reference only. `dueAt` uses Unix
239
- seconds. Optional `expiresAt` uses epoch milliseconds. `discountMinor` and
238
+ optional `reference` changes the request reference only. `dueAt` uses epoch
239
+ milliseconds, as the shared Invoice document and frontend do. Set it to zero
240
+ for no due date. Optional `expiresAt` also uses epoch milliseconds. `discountMinor` and
240
241
  `unitMinor` use the asset's exact minor units. The example is 10 USDC less
241
242
  1 USDC for a six-decimal USDC asset. The backend checks the Invoice total,
242
243
  registered payer, and issuer authority before creation. Optional `memo` is a
243
244
  request memo; `invoice.note` is the document note. Unknown fields refuse.
244
245
 
246
+ Earlier CLI guidance incorrectly named Unix seconds for `dueAt`. Convert those
247
+ values to milliseconds for new drafts. Rendering does not change the dates in
248
+ an issued document. Inspect an incorrect Invoice before cancelling it and
249
+ issuing a corrected request.
250
+
245
251
  A lost issuance reply provides issued-list readback in the same scope and
246
252
  session. Issuance has no automatic resend.
247
253
 
package/dist/main.mjs CHANGED
@@ -16622,7 +16622,7 @@ function signerFailure(source, operation, cause) {
16622
16622
  }
16623
16623
  //#endregion
16624
16624
  //#region ../../packages/sdk/package.json
16625
- var version$3 = "4.20.0-beta.18";
16625
+ var version$3 = "4.20.0-beta.19";
16626
16626
  //#endregion
16627
16627
  //#region ../../packages/sdk/src/telemetry/exception-projection.ts
16628
16628
  /** Fixed fallback for failures that have no safe message. */
@@ -69810,8 +69810,8 @@ function captureException(telemetry, error, context) {
69810
69810
  }
69811
69811
  //#endregion
69812
69812
  //#region src/runtime/version.ts
69813
- const cliVersion = "4.20.0-beta.18";
69814
- const sdkVersion = "4.20.0-beta.18";
69813
+ const cliVersion = "4.20.0-beta.19";
69814
+ const sdkVersion = "4.20.0-beta.19";
69815
69815
  const ReleaseVersion = Schema.String.check(Schema.isMaxLength(256), Schema.isPattern(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/u)).pipe(Schema.brand("CliReleaseVersion"));
69816
69816
  const parts = (version) => {
69817
69817
  const [core = "", ...prerelease] = version.split("+")[0].split("-");
@@ -75649,7 +75649,7 @@ const parseIssueInput = (value) => Effect.gen(function* () {
75649
75649
  document: value.invoice
75650
75650
  });
75651
75651
  if (payment.document?.kind !== "invoice") return yield* invalid$4();
75652
- if (!Number.isFinite((/* @__PURE__ */ new Date(payment.document.dueAt * 1e3)).getTime())) return yield* inputRequired("Provide an Invoice dueAt that is a valid UTC date in Unix seconds.");
75652
+ if (!Number.isFinite(new Date(payment.document.dueAt).getTime())) return yield* inputRequired("Provide an Invoice dueAt that is a valid UTC date in epoch milliseconds.");
75653
75653
  const reference = "reference" in value ? value.reference : payment.document.invoiceNumber;
75654
75654
  if (typeof reference !== "string" || reference.trim().length === 0 || reference.trim().length > 120) return yield* invalid$4();
75655
75655
  const memo = "memo" in value ? value.memo : void 0;
@@ -75690,7 +75690,7 @@ const issuePreview = (draft) => {
75690
75690
  `Payer: ${terminalText(referenceLabel(draft.payer))}`,
75691
75691
  `Reference: ${terminalText(draft.reference)}`,
75692
75692
  `Total: ${terminalText(formatAssetAmount(draft.amount))}`,
75693
- `Due: ${terminalText((/* @__PURE__ */ new Date(Number(draft.invoice.dueAt) * 1e3)).toUTCString())}`,
75693
+ `Due: ${draft.invoice.dueAt === 0 ? "No due date" : terminalText(new Date(draft.invoice.dueAt).toUTCString())}`,
75694
75694
  ...draft.invoice.lineItems.map((item) => ` ${terminalText(item.description)}: ${item.quantity} x ${terminalText(minor(item.unitMinor))}`),
75695
75695
  `Discount: ${terminalText(minor(draft.invoice.discountMinor ?? "0"))}`,
75696
75696
  ...draft.invoice.note === void 0 ? [] : [`Notes: ${terminalText(draft.invoice.note)}`]