nats-io / natscli

The NATS Command Line Interface
Apache License 2.0
510 stars 99 forks source link

(maint) Update kv and object commands to use new jetstream api #1164

Closed ploubser closed 2 months ago

ploubser commented 2 months ago

Here we update both the kv and object commands to no longer use the deprecated nats.JetstreamContext and instead use jetstream.Jetstream.

We also fix some minor usability issues, like make the revision flag required for the update action, improve the error message when attempting to revert a key value in a bucket with history=1, and perform the revert with an update action instead of a put.