Repository navigation
Commit a5f59ce
committed
feat(cli): format created_at as human-readable datetime in provider list JSON/YAML
Update provider_to_json() to format created_at_ms as a human-readable
datetime string using format_epoch_ms(), matching the pattern used by
sandbox_to_json().
Changes:
- Field name: created_at_ms → created_at
- Value format: Raw milliseconds → "YYYY-MM-DD HH:MM:SS"
- Implementation: Use format_epoch_ms(meta.created_at_ms)
This change:
- Aligns provider list output with sandbox list output for consistency
- Makes JSON/YAML output more human-readable for interactive use
- Follows the established pattern across all *_to_json() functions
Breaking change: Field renamed and type changed (number → string).
However, this feature was just added in PR #1830 and hasn't been
released yet, so no users are affected.
Example output:
Before: {"created_at_ms": 1234567890000}
After: {"created_at": "2009-02-13 23:31:30"}
Tests updated:
- provider_to_json_includes_metadata_fields_when_present: Assert formatted string
- provider_to_json_omits_zero_metadata_fields: Update field name
- provider_to_json_formats_created_at_as_human_readable: New test validating format1 parent 703169c commit a5f59ce
1 file changed
Lines changed: 33 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4815 | 4815 | | |
4816 | 4816 | | |
4817 | 4817 | | |
4818 | | - | |
4819 | | - | |
| 4818 | + | |
| 4819 | + | |
4820 | 4820 | | |
4821 | 4821 | | |
4822 | 4822 | | |
| |||
9414 | 9414 | | |
9415 | 9415 | | |
9416 | 9416 | | |
9417 | | - | |
| 9417 | + | |
9418 | 9418 | | |
9419 | 9419 | | |
9420 | 9420 | | |
| |||
9429 | 9429 | | |
9430 | 9430 | | |
9431 | 9431 | | |
9432 | | - | |
| 9432 | + | |
9433 | 9433 | | |
9434 | 9434 | | |
9435 | 9435 | | |
| |||
9458 | 9458 | | |
9459 | 9459 | | |
9460 | 9460 | | |
9461 | | - | |
9462 | | - | |
| 9461 | + | |
| 9462 | + | |
9463 | 9463 | | |
9464 | 9464 | | |
9465 | 9465 | | |
| |||
9487 | 9487 | | |
9488 | 9488 | | |
9489 | 9489 | | |
| 9490 | + | |
| 9491 | + | |
| 9492 | + | |
| 9493 | + | |
| 9494 | + | |
| 9495 | + | |
| 9496 | + | |
| 9497 | + | |
| 9498 | + | |
| 9499 | + | |
| 9500 | + | |
| 9501 | + | |
| 9502 | + | |
| 9503 | + | |
| 9504 | + | |
| 9505 | + | |
| 9506 | + | |
| 9507 | + | |
| 9508 | + | |
| 9509 | + | |
| 9510 | + | |
| 9511 | + | |
| 9512 | + | |
| 9513 | + | |
| 9514 | + | |
| 9515 | + | |
| 9516 | + | |
9490 | 9517 | | |
0 commit comments