Skip to content

Commit

Permalink
Merge branch 'develop' into dec-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge authored Apr 2, 2024
2 parents 6c78d78 + 57f4d51 commit f85f681
Show file tree
Hide file tree
Showing 11 changed files with 132 additions and 85 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,17 @@ For Bun versions below v1.0.17, you must add `supabase` as a [trusted dependency
### Run the CLI

```bash
supabase help
supabase bootstrap
```

Or using npx:

```bash
npx supabase help
npx supabase bootstrap
```

The bootstrap command will guide you through the process of setting up a Supabase project using one of the [starter](https://github.com/supabase-community/supabase-samples/blob/main/samples.json) templates.

## Docs

Command & config reference can be found [here](https://supabase.com/docs/reference/cli/about).
Expand All @@ -173,4 +175,3 @@ To run from source:
# Go >= 1.20
go run . help
```

9 changes: 8 additions & 1 deletion cmd/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,18 @@ func promptStarterTemplate(ctx context.Context, templates []bootstrap.StarterTem
Details: t.Description,
}
}
items = append(items, utils.PromptItem{
Index: len(items),
Summary: "scratch",
Details: "An empty project from scratch.",
})
title := "Which starter template do you want to use?"
choice, err := utils.PromptChoice(ctx, title, items)
if err != nil {
return err
}
templateUrl = templates[choice.Index].Url
if choice.Index < len(templates) {
templateUrl = templates[choice.Index].Url
}
return nil
}
12 changes: 7 additions & 5 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import (

var (
createVscodeSettings = new(bool)
useOrioleDB bool
createIntellijSettings = new(bool)
initCmd = &cobra.Command{
initParams = utils.InitParams{}

initCmd = &cobra.Command{
GroupID: groupLocalDev,
Use: "init",
Short: "Initialize a local project",
Expand All @@ -26,7 +27,7 @@ var (
return cmd.Root().PersistentPreRunE(cmd, args)
},
PreRun: func(cmd *cobra.Command, args []string) {
if useOrioleDB {
if initParams.UseOrioleDB {
cobra.CheckErr(cmd.MarkFlagRequired("experimental"))
}
},
Expand All @@ -40,7 +41,7 @@ var (
createIntellijSettings = nil
}

return _init.Run(fsys, createVscodeSettings, createIntellijSettings, useOrioleDB)
return _init.Run(fsys, createVscodeSettings, createIntellijSettings, initParams)
},
PostRun: func(cmd *cobra.Command, args []string) {
fmt.Println("Finished " + utils.Aqua("supabase init") + ".")
Expand All @@ -54,6 +55,7 @@ func init() {
cobra.CheckErr(flags.MarkHidden("with-vscode-workspace"))
flags.BoolVar(createVscodeSettings, "with-vscode-settings", false, "Generate VS Code settings for Deno.")
flags.BoolVar(createIntellijSettings, "with-intellij-settings", false, "Generate IntelliJ IDEA settings for Deno.")
flags.BoolVar(&useOrioleDB, "use-orioledb", false, "Use OrioleDB storage engine for Postgres")
flags.BoolVar(&initParams.UseOrioleDB, "use-orioledb", false, "Use OrioleDB storage engine for Postgres.")
flags.BoolVar(&initParams.Overwrite, "force", false, "Overwrite existing "+utils.ConfigPath+".")
rootCmd.AddCommand(initCmd)
}
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/charmbracelet/bubbletea v0.25.0
github.com/charmbracelet/glamour v0.7.0
github.com/charmbracelet/lipgloss v0.10.0
github.com/containers/common v0.58.0
github.com/containers/common v0.58.1
github.com/deepmap/oapi-codegen v1.16.2
github.com/docker/cli v26.0.0+incompatible
github.com/docker/docker v26.0.0+incompatible
Expand All @@ -20,10 +20,10 @@ require (
github.com/getsentry/sentry-go v0.27.0
github.com/gin-gonic/gin v1.9.1
github.com/go-errors/errors v1.5.1
github.com/go-git/go-git/v5 v5.11.0
github.com/go-git/go-git/v5 v5.12.0
github.com/go-xmlfmt/xmlfmt v1.1.2
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/golangci/golangci-lint v1.57.1
github.com/golangci/golangci-lint v1.57.2
github.com/google/go-github/v53 v53.2.0
github.com/google/uuid v1.6.0
github.com/jackc/pgconn v1.14.3
Expand Down Expand Up @@ -70,7 +70,7 @@ require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/alecthomas/chroma/v2 v2.8.0 // indirect
github.com/alecthomas/go-check-sumtype v0.1.4 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
Expand Down Expand Up @@ -101,7 +101,7 @@ require (
github.com/chavacava/garif v0.1.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/ckaznocha/intrange v0.1.0 // indirect
github.com/ckaznocha/intrange v0.1.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect
github.com/containerd/log v0.1.0 // indirect
Expand Down Expand Up @@ -185,24 +185,24 @@ require (
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jgautheron/goconst v1.7.0 // indirect
github.com/jgautheron/goconst v1.7.1 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
github.com/jjti/go-spancheck v0.5.3 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/julz/importas v0.1.0 // indirect
github.com/karamaru-alpha/copyloopvar v1.0.8 // indirect
github.com/karamaru-alpha/copyloopvar v1.0.10 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/kisielk/errcheck v1.7.0 // indirect
github.com/kkHAIKE/contextcheck v1.1.4 // indirect
github.com/kkHAIKE/contextcheck v1.1.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kulti/thelper v0.6.3 // indirect
github.com/kunwardeep/paralleltest v1.0.10 // indirect
github.com/kyoh86/exportloopref v0.1.11 // indirect
github.com/ldez/gomoddirectives v0.2.3 // indirect
github.com/ldez/gomoddirectives v0.2.4 // indirect
github.com/ldez/tagliatelle v0.5.0 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/leonklingele/grouper v1.1.1 // indirect
Expand Down Expand Up @@ -239,7 +239,7 @@ require (
github.com/nakabonne/nestif v0.3.1 // indirect
github.com/nishanths/exhaustive v0.12.0 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.16.1 // indirect
github.com/nunnatsa/ginkgolinter v0.16.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
Expand Down Expand Up @@ -269,12 +269,12 @@ require (
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.25.0 // indirect
github.com/securego/gosec/v2 v2.19.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sivchari/containedctx v1.0.3 // indirect
github.com/sivchari/tenv v1.7.1 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/sonatard/noctx v0.0.2 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/sourcegraph/go-diff v0.7.0 // indirect
Expand Down
Loading

0 comments on commit f85f681

Please sign in to comment.