feat(cli): port supabase seed buckets to native TypeScript#5651
Open
Coly010 wants to merge 27 commits into
Open
feat(cli): port supabase seed buckets to native TypeScript#5651Coly010 wants to merge 27 commits into
supabase seed buckets to native TypeScript#5651Coly010 wants to merge 27 commits into
Conversation
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.
Ports
supabase seed buckets(CLI-1322) from the Go binary proxy to a native TypeScript implementation in the legacy shell.What
seed bucketsseeds the local Storage stack fromsupabase/config.toml: it upserts[storage.buckets](create/update with an overwrite prompt) and[storage.vector]buckets (create/prune with graceful "feature unavailable" skips), then uploads each bucket'sobjects_pathfile tree.Why local-only
Go's
seedcommand is in thelocal-devgroup, so the root pre-run never resolves a project ref (cmd/root.go:108-116) andbuckets.Runalways receives an emptyprojectRef.--linked/--localare therefore accepted for surface parity (and their mutual exclusivity is enforced), but seeding always targets the local Storage service gateway. The remote/analytics code paths Go gates on a project ref are unreachable here and are omitted.Structure
seed/buckets/—handler,gateway(Storage service-gateway client: bucket/vector/object endpoints,apikey+Bearerauth),classify(vector graceful-skip detectors),upload(path/content-type helpers),flags(--local/--linkedmutual-exclusivity),errors.seed/seed.layers.ts— lean runtime (no Management API stack; local-only).@supabase/configdecodes the file but doesn't reproduce it): API URL fromapi.external_urlelse<scheme>://<SUPABASE_SERVICES_HOSTNAME|127.0.0.1>:<port>(config.go+misc.go:302); service-role key fromauth.service_role_keyelse a JWT signed withauth.jwt_secret(apikeys.go).legacy-size-units.tshoisted tolegacy/shared/(used byconfig pushandseed buckets).Parity notes for reviewers
[Y/n]/[y/N], overwrite default yes / prune default no),--yesecho, and the two yellow vectorWARNING:fall-throughs match Go.isUploadableEntry(batch.go:65): symlinks detected no-follow; dangling symlinks / symlinks-to-dirs / other non-regular entries are skipped withSkipping non-regular file:(not fatal); symlinked dirs are not descended.omitempty(public*bool,file_size_limit,allowed_mime_types).http.DetectContentType+mime.TypeByExtensionis OS-mime-table dependent, so byte-parity isn't achievable). SeeSIDE_EFFECTS.md.--output-format json/stream-jsonemit a structured run summary; text mode emits nothing extra (Go has no machine output).