Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4960d23
chore(deps): bump gotest.tools/gotestsum from 1.12.1 to 1.12.2 (#3525)
dependabot[bot] May 6, 2025
6025185
chore(deps): bump golang.org/x/term from 0.31.0 to 0.32.0 (#3524)
dependabot[bot] May 6, 2025
02304da
chore(deps): bump supabase/gotrue from v2.171.0 to v2.172.1 in /pkg/c…
dependabot[bot] May 6, 2025
fc1926e
chore(deps): bump supabase/postgres from 17.4.1.027 to 17.4.1.028 in …
dependabot[bot] May 6, 2025
668c9bc
fix(config): sanitize dotenv errors avoiding data leaking (#3529)
avallete May 6, 2025
49fb4f4
docs: moved command descriptions from docs repo (#3533)
charislam May 6, 2025
5dc283d
chore(deps): bump aws-actions/configure-aws-credentials from 4.1.0 to…
dependabot[bot] May 7, 2025
6e3f8f8
chore(deps): bump supabase/storage-api from v1.22.11 to v1.22.13 in /…
dependabot[bot] May 8, 2025
bf03954
chore(deps): bump supabase/postgres-meta from v0.88.9 to v0.89.0 in /…
dependabot[bot] May 9, 2025
2c8a36a
fix: bump edge-runtime to 1.68.0-develop.14 (#3540)
nyannyacha May 10, 2025
61910dd
chore(deps): bump golang.org/x/oauth2 from 0.29.0 to 0.30.0 (#3538)
dependabot[bot] May 10, 2025
98f6278
fix: do not restart auth sequence on reset (#3552)
sweatybridge May 10, 2025
b346bf0
chore(deps): bump supabase/studio from 2025.05.05-sha-3c3fe9b to 2025…
dependabot[bot] May 12, 2025
3005bf8
chore(deps): bump supabase/storage-api from v1.22.13 to v1.22.15 in /…
dependabot[bot] May 13, 2025
e052003
fix: session timeout uses hour unit (#3561)
sweatybridge May 13, 2025
be6681d
chore(deps): bump supabase/storage-api from v1.22.15 to v1.22.16 in /…
dependabot[bot] May 14, 2025
a6d881d
chore(deps): bump google.golang.org/grpc from 1.72.0 to 1.72.1 (#3567)
dependabot[bot] May 15, 2025
1a70f26
chore(deps): bump supabase/storage-api from v1.22.16 to v1.22.17 in /…
dependabot[bot] May 15, 2025
cf9c74b
chore(deps): bump supabase/postgres from 17.4.1.028 to 17.4.1.029 in …
dependabot[bot] May 15, 2025
0808336
chore(deps): bump supabase/realtime from v2.34.47 to v2.35.3 in /pkg/…
dependabot[bot] May 15, 2025
af9584b
feat: unban ipv6 address (#3573)
sweatybridge May 15, 2025
74374b1
chore(deps): bump aws-actions/configure-aws-credentials from 4.2.0 to…
dependabot[bot] May 15, 2025
dabc8d6
chore(deps): bump supabase/postgres from 17.4.1.029 to 17.4.1.030 in …
dependabot[bot] May 16, 2025
c055838
chore(deps): bump supabase/studio from 2025.05.12-sha-07a8d23 to 2025…
dependabot[bot] May 16, 2025
f08b86a
chore(deps): bump github.com/getsentry/sentry-go from 0.32.0 to 0.33.…
dependabot[bot] May 16, 2025
7cc76f1
chore(deps): bump github.com/getkin/kin-openapi from 0.127.0 to 0.131…
dependabot[bot] May 16, 2025
100ae60
fix: do not override collation on pg 15.8 (#3579)
sweatybridge May 16, 2025
29b9dac
fix: version compare missing cases (#3581)
sweatybridge May 19, 2025
971f6fd
fix: convert timeout fields to string (#3582)
sweatybridge May 19, 2025
4031bc4
chore(deps): bump supabase/postgres from 17.4.1.030 to 17.4.1.031 in …
dependabot[bot] May 19, 2025
8cb9780
chore(deps): bump supabase/studio from 2025.05.15-sha-cbafd4d to 2025…
dependabot[bot] May 19, 2025
712e942
fix: exclude pgsodium and vault from data dump (#3585)
sweatybridge May 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mirror-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
TAG=${{ inputs.image }}
echo "image=${TAG##*/}" >> $GITHUB_OUTPUT
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4.1.0
uses: aws-actions/configure-aws-credentials@v4.2.1
with:
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
aws-region: us-east-1
Expand Down
5 changes: 5 additions & 0 deletions docs/supabase/config/push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# supabase-config-push

Updates the configurations of a linked Supabase project with the local `supabase/config.toml` file.

This command allows you to manage project configuration as code by defining settings locally and then pushing them to your remote project.
9 changes: 9 additions & 0 deletions docs/supabase/functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## supabase-functions

Manage Supabase Edge Functions.

Supabase Edge Functions are server-less functions that run close to your users.

Edge Functions allow you to execute custom server-side code without deploying or scaling a traditional server. They're ideal for handling webhooks, custom API endpoints, data validation, and serving personalized content.

Edge Functions are written in TypeScript and run on Deno compatible edge runtime, which is a secure runtime with no package management needed, fast cold starts, and built-in security.
7 changes: 7 additions & 0 deletions docs/supabase/functions/new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## supabase-functions-new

Creates a new Edge Function with boilerplate code in the `supabase/functions` directory.

This command generates a starter TypeScript file with the necessary Deno imports and a basic function structure. The function is created as a new directory with the name you specify, containing an `index.ts` file with the function code.

After creating the function, you can edit it locally and then use `supabase functions serve` to test it before deploying with `supabase functions deploy`.
9 changes: 9 additions & 0 deletions docs/supabase/gen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## supabase-gen

Automatically generates type definitions based on your Postgres database schema.

This command connects to your database (local or remote) and generates typed definitions that match your database tables, views, and stored procedures. By default, it generates TypeScript definitions, but also supports Go and Swift.

Generated types give you type safety and autocompletion when working with your database in code, helping prevent runtime errors and improving developer experience.

The types respect relationships, constraints, and custom types defined in your database schema.
7 changes: 7 additions & 0 deletions docs/supabase/projects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## supabase-projects

Provides tools for creating and managing your Supabase projects.

This command group allows you to list all projects in your organizations, create new projects, delete existing projects, and retrieve API keys. These operations help you manage your Supabase infrastructure programmatically without using the dashboard.

Project management via CLI is especially useful for automation scripts and when you need to provision environments in a repeatable way.
11 changes: 11 additions & 0 deletions docs/supabase/secrets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## supabase-secrets

Provides tools for managing environment variables and secrets for your Supabase project.

This command group allows you to set, unset, and list secrets that are securely stored and made available to Edge Functions as environment variables.

Secrets management through the CLI is useful for:
- Setting environment-specific configuration
- Managing sensitive credentials securely

Secrets can be set individually or loaded from .env files for convenience.
17 changes: 9 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/docker/go-connections v0.5.0
github.com/docker/go-units v0.5.0
github.com/ecies/go/v2 v2.0.11
github.com/getsentry/sentry-go v0.32.0
github.com/getsentry/sentry-go v0.33.0
github.com/go-errors/errors v1.5.1
github.com/go-git/go-git/v5 v5.16.0
github.com/go-viper/mapstructure/v2 v2.2.1
Expand Down Expand Up @@ -50,11 +50,11 @@ require (
github.com/zalando/go-keyring v0.2.6
go.opentelemetry.io/otel v1.35.0
golang.org/x/mod v0.24.0
golang.org/x/oauth2 v0.29.0
golang.org/x/term v0.31.0
google.golang.org/grpc v1.72.0
golang.org/x/oauth2 v0.30.0
golang.org/x/term v0.32.0
google.golang.org/grpc v1.72.1
gopkg.in/yaml.v3 v3.0.1
gotest.tools/gotestsum v1.12.1
gotest.tools/gotestsum v1.12.2
)

require (
Expand Down Expand Up @@ -133,7 +133,7 @@ require (
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fvbommel/sortorder v1.1.0 // indirect
github.com/fzipp/gocyclo v0.6.0 // indirect
github.com/getkin/kin-openapi v0.127.0 // indirect
github.com/getkin/kin-openapi v0.131.0 // indirect
github.com/ghostiam/protogetter v0.3.15 // indirect
github.com/go-critic/go-critic v0.13.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
Expand Down Expand Up @@ -179,7 +179,6 @@ require (
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/invopop/yaml v0.3.1 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
Expand Down Expand Up @@ -236,6 +235,8 @@ require (
github.com/nishanths/exhaustive v0.12.0 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.19.1 // indirect
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // 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.1 // indirect
Expand Down Expand Up @@ -325,7 +326,7 @@ require (
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.24.0 // indirect
golang.org/x/tools v0.32.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
Expand Down
34 changes: 18 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQ
github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo=
github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA=
github.com/getkin/kin-openapi v0.127.0 h1:Mghqi3Dhryf3F8vR370nN67pAERW+3a95vomb3MAREY=
github.com/getkin/kin-openapi v0.127.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM=
github.com/getsentry/sentry-go v0.32.0 h1:YKs+//QmwE3DcYtfKRH8/KyOOF/I6Qnx7qYGNHCGmCY=
github.com/getsentry/sentry-go v0.32.0/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY=
github.com/getkin/kin-openapi v0.131.0 h1:NO2UeHnFKRYhZ8wg6Nyh5Cq7dHk4suQQr72a4pMrDxE=
github.com/getkin/kin-openapi v0.131.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58=
github.com/getsentry/sentry-go v0.33.0 h1:YWyDii0KGVov3xOaamOnF0mjOrqSjBqwv48UEzn7QFg=
github.com/getsentry/sentry-go v0.33.0/go.mod h1:C55omcY9ChRQIUcVcGcs+Zdy4ZpQGvNJ7JYHIoSWOtE=
github.com/ghostiam/protogetter v0.3.15 h1:1KF5sXel0HE48zh1/vn0Loiw25A9ApyseLzQuif1mLY=
github.com/ghostiam/protogetter v0.3.15/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA=
github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c=
Expand Down Expand Up @@ -517,8 +517,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso=
github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA=
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
Expand Down Expand Up @@ -744,6 +742,10 @@ github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 h1:ykgG34472DWey7TSjd8vIfNykXgjOg
github.com/oapi-codegen/oapi-codegen/v2 v2.4.1/go.mod h1:N5+lY1tiTDV3V1BeHtOxeWXHoPVeApvsvjJqegfoaz8=
github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro=
github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY=
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw=
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c=
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down Expand Up @@ -1196,8 +1198,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98=
golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -1281,8 +1283,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand All @@ -1293,8 +1295,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o=
golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw=
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down Expand Up @@ -1456,8 +1458,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM=
google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA=
google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand Down Expand Up @@ -1502,8 +1504,8 @@ gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/gotestsum v1.12.1 h1:dvcxFBTFR1QsQmrCQa4k/vDXow9altdYz4CjdW+XeBE=
gotest.tools/gotestsum v1.12.1/go.mod h1:mwDmLbx9DIvr09dnAoGgQPLaSXszNpXpWo2bsQge5BE=
gotest.tools/gotestsum v1.12.2 h1:eli4tu9Q2D/ogDsEGSr8XfQfl7mT0JsGOG6DFtUiZ/Q=
gotest.tools/gotestsum v1.12.2/go.mod h1:kjRtCglPZVsSU0hFHX3M5VWBM6Y63emHuB14ER1/sow=
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
12 changes: 4 additions & 8 deletions internal/bans/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,17 @@ import (

func validateIps(ips []string) error {
for _, ip := range ips {
ip := net.ParseIP(ip)
if ip.To4() == nil {
return errors.Errorf("only IPv4 supported at the moment: %s", ip)
if net.ParseIP(ip) == nil {
return errors.Errorf("invalid IP address: %s", ip)
}
}
return nil
}

func Run(ctx context.Context, projectRef string, dbIpsToUnban []string, fsys afero.Fs) error {
// 1. sanity checks
{
err := validateIps(dbIpsToUnban)
if err != nil {
return err
}
if err := validateIps(dbIpsToUnban); err != nil {
return err
}

// 2. remove bans
Expand Down
13 changes: 9 additions & 4 deletions internal/bans/update/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ import (

func TestPrivateSubnet(t *testing.T) {
err := validateIps([]string{"12.3.4.5", "10.0.0.0", "1.2.3.1"})
assert.Nil(t, err)
assert.NoError(t, err)
}

func TestIpv4(t *testing.T) {
err := validateIps([]string{"12.3.4.5", "2001:db8:abcd:0012::0", "1.2.3.1"})
assert.ErrorContains(t, err, "only IPv4 supported at the moment: 2001:db8:abcd:12::")
func TestIPv6(t *testing.T) {
err := validateIps([]string{"2001:db8:abcd:0012::0", "::0"})
assert.NoError(t, err)
}

func TestInvalidAddress(t *testing.T) {
err := validateIps([]string{"12.3.4"})
assert.ErrorContains(t, err, "invalid IP address: 12.3.4")
}
6 changes: 3 additions & 3 deletions internal/db/dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ func dumpData(ctx context.Context, config pgconn.Config, schema, excludeTable []
"graphql_public",
// "net",
// "pgmq",
// "pgsodium",
// "pgsodium_masks",
"pgsodium",
"pgsodium_masks",
"pgtle",
"repack",
"tiger",
"tiger_data",
"timescaledb_*",
"_timescaledb_*",
"topology",
// "vault",
"vault",
// Managed by Supabase
// "auth",
"extensions",
Expand Down
3 changes: 2 additions & 1 deletion internal/db/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/supabase/cli/internal/status"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/flags"
"github.com/supabase/cli/pkg/config"
"github.com/supabase/cli/pkg/migration"
"github.com/supabase/cli/pkg/vault"
)
Expand Down Expand Up @@ -75,7 +76,7 @@ func NewContainerConfig() container.Config {
"S3_ACCESS_KEY="+utils.Config.Experimental.S3AccessKey,
"S3_SECRET_KEY="+utils.Config.Experimental.S3SecretKey,
)
} else {
} else if i := strings.IndexByte(utils.Config.Db.Image, ':'); config.VersionCompare(utils.Config.Db.Image[i+1:], "15.8.1.005") < 0 {
env = append(env, "POSTGRES_INITDB_ARGS=--lc-collate=C.UTF-8")
}
config := container.Config{
Expand Down
7 changes: 7 additions & 0 deletions internal/postgresConfig/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
"fmt"
"strconv"
"strings"

Expand Down Expand Up @@ -53,6 +54,12 @@ func Run(ctx context.Context, projectRef string, values []string, replaceOverrid
if noRestart {
finalOverrides["restart_database"] = false
}
// statement_timeout and wal_sender_timeout must be typed as string
for k, v := range finalOverrides {
if _, ok := v.(string); strings.HasSuffix(k, "_timeout") && !ok {
finalOverrides[k] = fmt.Sprintf("%v", v)
}
}
bts, err := json.Marshal(finalOverrides)
if err != nil {
return errors.Errorf("failed to serialize config overrides: %w", err)
Expand Down
8 changes: 4 additions & 4 deletions pkg/config/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,13 @@ func (m *mfa) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
}

func (s sessions) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
body.SessionsTimebox = cast.Ptr(int(s.Timebox.Seconds()))
body.SessionsInactivityTimeout = cast.Ptr(int(s.InactivityTimeout.Seconds()))
body.SessionsTimebox = cast.Ptr(int(s.Timebox.Hours()))
body.SessionsInactivityTimeout = cast.Ptr(int(s.InactivityTimeout.Hours()))
}

func (s *sessions) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
s.Timebox = time.Duration(cast.Val(remoteConfig.SessionsTimebox, 0)) * time.Second
s.InactivityTimeout = time.Duration(cast.Val(remoteConfig.SessionsInactivityTimeout, 0)) * time.Second
s.Timebox = time.Duration(cast.Val(remoteConfig.SessionsTimebox, 0)) * time.Hour
s.InactivityTimeout = time.Duration(cast.Val(remoteConfig.SessionsInactivityTimeout, 0)) * time.Hour
}

func (e email) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
Expand Down
Loading