feat: add cli arg and interactive prompt for bucket name - #244
Open
arsdehnel wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #107
In contrast to #201 I added the bucket naming to the
create-pdsCLI's variables here. I think the auto-naming convention ofwrangleris useful but for the reasons mentioned in that PR's discussion I think this use case might not be a good one for it.Docs
I updated a few places in the docs that reference buckets. Most notably was a change only indirectly related to my code change. There were two places that mentioned that bucket names must be globally unique. I don't believe that's the case with Cloudflare's buckets (although it definitely is the case with other cloud provider bucket implementations).
create-pdsI added an optional CLI arg for
--blobs-bucket-namewhich effectively defaults topds-blobsalthough to allow for the "should we prompt" logic I didn't usecitty's default option and instead followed the pattern ofprojectName. I think write that to thewrangler.jsoncafter copying it over from the template directory following thepackage.jsonpattern.Tests
I added a few tests but not sure how you will feel about the basic string-matching of the assertions. Open to other ideas.
Changeset
I've never managed or contributed to a monorepo that uses that so hopefully I got that right!