@hardfin/cli 0.1.1-dev.63 → 0.1.1-dev.64

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
@@ -51,20 +51,22 @@ and the shape of the last segment decide the verb.
51
51
 
52
52
  Everything an endpoint takes becomes a flag or an argument. No command asks for JSON.
53
53
 
54
- | The document says | You type |
55
- | ------------------------------ | ---------------------------------------------------------------------- |
56
- | A path parameter | a positional argument |
57
- | A query or body field | `--field-name`, in kebab case |
58
- | A field inside a nested object | `--address-city`, the path joined |
59
- | An array of values | the flag, repeated |
60
- | An array of objects | the flag, repeated, each carrying that element's fields as `key=value` |
61
- | An object inside such an array | a dotted key in that element, `unitPrice.amount=1500.00` |
62
- | A list of text inside one | that key, once per value, `serials=SN-1,serials=SN-2` |
63
- | A file upload | `--file <path>`, sent as multipart |
54
+ | The document says | You type |
55
+ | ------------------------------ | ----------------------------------------------------------------------- |
56
+ | A path parameter | a positional argument |
57
+ | A query or body field | `--field-name`, in kebab case |
58
+ | A field inside a nested object | `--address-city`, the path joined |
59
+ | An amount of money | `--sale-price-value` and `--sale-price-iso-code`, always given together |
60
+ | An array of values | the flag, repeated |
61
+ | An array of objects | the flag, repeated, each carrying that element's fields as `key=value` |
62
+ | An object inside such an array | a dotted key in that element, `unitPrice.amount=1500.00` |
63
+ | A list of text inside one | that key, once per value, `serials=SN-1,serials=SN-2` |
64
+ | A file upload | `--file <path>`, sent as multipart |
64
65
 
65
66
  ```sh
66
67
  hardfin asset ownership create ast_4f9xk2mq7plr8stz \
67
- --customer-id 0192f7d4-3b6a-7c1e-9f2d-5a8b4c6e7d73 --date 2026-09-23 --sale-price 1500.00
68
+ --customer-id 0192f7d4-3b6a-7c1e-9f2d-5a8b4c6e7d73 --date 2026-09-23 \
69
+ --sale-price-value 1500.00 --sale-price-iso-code USD
68
70
 
69
71
  hardfin asset move execute create \
70
72
  --move assetId=0192f7d4-3b6a-7c1e-9f2d-5a8b4c6e7d70,originId=0192f7d4-3b6a-7c1e-9f2d-5a8b4c6e7d71,destinationId=0192f7d4-3b6a-7c1e-9f2d-5a8b4c6e7d72,shipAt=2026-09-24T10:00:00Z
@@ -82,9 +84,14 @@ key once per value. An element field that holds anything larger, such as a line
82
84
  `milestonePhases`, has no flag spelling. Send that request body with `--input`.
83
85
 
84
86
  A value is sent as the type the document names. `--useful-life 36` sends the number 36. A
85
- decimal such as `--salvage-value 1500.00` stays a string, which is how the API takes money
87
+ decimal such as `--salvage-value-value 1500.00` stays a string, which is how the API takes money
86
88
  without losing precision.
87
89
 
90
+ An amount of money always names its currency. `--salvage-value-value` is refused without
91
+ `--salvage-value-iso-code`, and the reverse, unless the `--input` body already holds the other.
92
+ Inside an element, `unitPrice.amount=` and `unitPrice.isoCode=` are given together the same way.
93
+ To clear an amount, send the object as null, such as `--salvage-value null`.
94
+
88
95
  Inside a `key=value` flag, `=` gives a value as you typed it and `:=` gives it as JSON.
89
96
 
90
97
  | You type | Is sent as |
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6876f6c5-b87a-5581-8653-5d74ead1b0f9")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aacd0112-e361-5290-9a4f-2ad41bcf2520")}catch(e){}}();
4
4
  import module from "node:module";
5
5
  //#region src/cli.ts
6
6
  module.enableCompileCache?.();
@@ -14,7 +14,7 @@ process.on("unhandledRejection", (error) => void toCrash(error));
14
14
  try {
15
15
  const answer = await toQuickAnswer(process.argv.slice(2));
16
16
  if (answer === void 0) {
17
- const { toCli, toParseExitCode, wasReportAttempted } = await import("./program-DW6GS9xO.js");
17
+ const { toCli, toParseExitCode, wasReportAttempted } = await import("./program-Bok0tZ8p.js");
18
18
  try {
19
19
  await toCli().parseAsync(process.argv);
20
20
  } catch (error) {
@@ -33,7 +33,7 @@ async function toCrash(error) {
33
33
  isCrashing = true;
34
34
  const isJSON = process.argv.includes("--json") || !process.stdout.isTTY;
35
35
  try {
36
- const { toReported, writeCrash } = await import("./program-DW6GS9xO.js");
36
+ const { toReported, writeCrash } = await import("./program-Bok0tZ8p.js");
37
37
  writeCrash(error, isJSON);
38
38
  await toReported(error, isJSON, void 0, "fatal");
39
39
  } catch {
@@ -54,4 +54,4 @@ async function toQuickAnswer(args) {
54
54
  export {};
55
55
 
56
56
  //# sourceMappingURL=cli.js.map
57
- //# debugId=6876f6c5-b87a-5581-8653-5d74ead1b0f9
57
+ //# debugId=aacd0112-e361-5290-9a4f-2ad41bcf2520