Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

r2 bindings and subcommands #2146

Merged
merged 1 commit into from
Jan 21, 2022
Merged

Conversation

taylorlee
Copy link
Contributor

@taylorlee taylorlee commented Dec 3, 2021

this pr implements two pieces of r2 functionality for the wrangler client:

commands: add r2 sub-commands to create/delete/list buckets
I opted for sub-commands like wrangler r2 bucket create, rather than how kv does wrangler kv:namespace create.

bindings: add support for binding a bucket to a worker
this implementation is essentially copy-pasted from the kv binding code, and functions very similarly.
preview isn't implemented yet, even though preview_bucket_name can be set currently.

@taylorlee taylorlee requested review from kris-evans and a team December 3, 2021 01:01
@taylorlee taylorlee force-pushed the taylorlee/r2-bindings-and-subcommands branch from 9b4d7be to 31ccbc6 Compare December 4, 2021 00:21
@Rastarev
Copy link

Rastarev commented Jan 1, 2022

Excellent

note: the api-backends for these features are implemented,
but generally available in production yet.

commands: add r2 subcommands to create/delete/list buckets
I opted for sub-commands like wrangler r2 bucket create,
rather than how kv does wrangler kv:namespace create.

bindings: add support for binding a bucket to a worker
this implementation is essentially copy-pasted from the kv binding code,
and functions very similary.
@taylorlee taylorlee force-pushed the taylorlee/r2-bindings-and-subcommands branch from d99e3f7 to 803d552 Compare January 21, 2022 00:42
@github-actions
Copy link

# npm audit report

follow-redirects  <1.14.7
Severity: high
Exposure of sensitive information in follow-redirects - https://github.com/advisories/GHSA-74fj-2j2h-c42q
fix available via `npm audit fix`
node_modules/follow-redirects

1 high severity vulnerability

To address all issues, run:
  npm audit fix

@taylorlee taylorlee merged commit 6408b15 into master Jan 21, 2022
@delete-merged-branch delete-merged-branch bot deleted the taylorlee/r2-bindings-and-subcommands branch January 21, 2022 22:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants