wrangler-legacy
wrangler-legacy copied to clipboard
get kv metadata
💡 Feature request
We can put KV metadata with
wrangler kv:key put --namespace-id $id some-key some-value -m '"metadata"'
It makes sense to add functionality to get metadata, too. I'm thinking
wrangler kv:key get --metadata --namespace-id $id some-key
which would print metadata to STDOUT, instead of the value.
what about list with metadata?
@koeninger separate issue?
would it be nice to get both the key and the metadata at the same time? could we output a JSON object with both?
@xortive value isn't necessarily valid JSON, it would need to be base-64'd.
The API in a Worker forces you to get both the value and the metadata at the same time, right? I think I'd prefer keeping the API as similar as possible, which would mean adding metadata list and getWithMetadata, but not a get for metadata alone.
In a Worker today, does getWithMetadata do base 64 encoding?
getWithMetadata in a worker has the same available return types for the value as get does, ie text. arraybuffer, etc.
It's a little different when we're dealing with standard out on a command line api.
On Fri, Feb 12, 2021 at 11:23 AM Greg McKeon [email protected] wrote:
The API in a Worker forces you to get both the value and the metadata at the same time, right? I think I'd prefer keeping the API as similar as possible, which would mean adding metadata list and getWithMetadata, but not a get for metadata alone.
In a Worker today, does getWithMetadata do base 64 encoding?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cloudflare/wrangler/issues/1751#issuecomment-778329006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYAB4NOHEIS2XNB52FBWDS6VPYJANCNFSM4XBPYXBA .
We'll go with
wrangler kv:key get-metadata --namespace-id $id some-key
And in another issue, list should include metadata.
Hi, what's the status?
This issue has been automatically marked as stale because it has not had recent activity in the last 180 days. It will be closed if no further activity occurs in the next week. Please feel free to comment if you'd like it to remain open, and thank you for your contributions.
did this ever get fixed?
probably better to re-open on https://github.com/cloudflare/wrangler2
Thanks for suggesting this feature! Wrangler v1 is now deprecated and support is only being provided for critical updates or security concerns. As such, we are closing this issue.
New versions of Wrangler are maintained in the workers-sdk repo. If this is a feature you’d like to see in wrangler v2+, please feel free to report it in the workers-sdk repo. For more info about wrangler v1 deprecation, please check out our blog post.