-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: upgrade proof ls
#136
Conversation
- `w3 proof ls --json` now returns **all** the info about the proofs. I need this for debugging, and it's neat to be able to dig into them with `jq` - this is a breaking change as it changes the json output format to use the default ucan/ipld flavour property names rather than custom ones. - e.g. `att` instead of `capabilities`. `/` for the root cid, rather than `cid` - `w3 proof ls` now shows more info. - and in colour! - and with a relative date help for `exp` e.g `# expires in one year`. - and in valid yaml you can pate into a dingus (tho... what isn't valid yaml). - but audience is removed as it is always the did of the current agent, so is redundent. - `--no-color` works automagically with chalk, so no additional plumbing is needed to disable it License: MIT Signed-off-by: Oli Evans <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩 wow yeah this is badass.
audience is removed as it is always the did of the current agent, so is redundent.
I would...maybe just include it anyway? So if you copypasta it somewhere you don't lose context.
index.js
Outdated
console.log(` - ${JSON.stringify(capability.nb)}`) | ||
} | ||
} | ||
console.log('fct:') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omit if !proof.facts.length
?
Thanks! I tried a bunch of different options but this one was the most pleasing without adding a bunch of complexity. I'll try putting audience back in but I lean towards making the default list output be quick'n'easy to interpret. Also I was thinking we'd encourage folks to use the --json flag where they need the data. |
License: MIT Signed-off-by: Oli Evans <[email protected]>
love this ty |
w3 proof ls
now shows lots more info with ucan flavour properties so it matches what you'd see in the spec or at https://ucan.xyz/validator/exp
e.g# expires in one year
.--no-color
works automagically with chalk, so no additional plumbing is needed to disable itw3 proof ls --json
now returns all the info about the proofs. I need this for debugging, and it's neat to be able to dig into them withjq
att
instead ofcapabilities
./
for the root cid, rather thancid
w3 proof ls --json
w3 proof ls
License: MIT