@trajectonomics/cli 0.8.0-alpha.138 → 0.8.0-alpha.139

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.
Files changed (2) hide show
  1. package/README.md +25 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -407,6 +407,31 @@ each side.
407
407
  ]
408
408
  ```
409
409
 
410
+ ## Naming a Flow, a Milestone or a person
411
+
412
+ > **Ships in 0.8.0.**
413
+
414
+ Every Flow, every Milestone and every person of a household may carry a `displayLabel`: the words a
415
+ page reads in place of the id, such as Thai text. It is free text of 1 to 80 code points, with no
416
+ control, invisible or bidirectional characters and no leading or trailing whitespace. It is no key
417
+ and changes no figure: the id still addresses the item, the label may repeat or change, and the
418
+ engine never reads it. `traj schema scenario apply` and `traj schema scenario household` publish it
419
+ with that rule.
420
+
421
+ A label travels in the document, so `--file` and `--add` carry it, and `--set` writes it:
422
+
423
+ ```bash
424
+ traj scenario apply base --set 'flows.school-fees.displayLabel="School fees"'
425
+ traj scenario apply base --set 'milestones.condo.displayLabel="Condo down payment"'
426
+ traj scenario household base --file household.json # a person's label, in the household
427
+ ```
428
+
429
+ A plan written before the field may lack it, and the first `--set` that names it begins it, as
430
+ `--set accounts.<id>.volatility=…` does. Because a label is stored content, a change to one moves the
431
+ plan's `contentHash`; a plan without labels keeps its bytes and its hash. To clear a label, write the
432
+ document without it (`--file`), or empty the Name field in the Dashboard: `--set` writes a value and
433
+ cannot remove a key, so `null` and `""` are refused.
434
+
410
435
  ## Where each year's money went
411
436
 
412
437
  > **Ships in 0.8.0.**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trajectonomics/cli",
3
- "version": "0.8.0-alpha.138",
3
+ "version": "0.8.0-alpha.139",
4
4
  "description": "trajectonomics command line",
5
5
  "license": "MIT",
6
6
  "type": "module",