From 87ecfdb1b460acef4bbfff5c081ac35e3f3eb1ca Mon Sep 17 00:00:00 2001 From: "supabase-cli-releaser[bot]" <246109035+supabase-cli-releaser[bot]@users.noreply.github.com> Date: Thu, 4 Dec 2025 08:09:13 +0000 Subject: [PATCH 01/25] chore: sync API types from infrastructure (#4581) Co-authored-by: supabase-cli-releaser[bot] <246109035+supabase-cli-releaser[bot]@users.noreply.github.com> --- pkg/api/types.gen.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/api/types.gen.go b/pkg/api/types.gen.go index 34029acbc..288c79393 100644 --- a/pkg/api/types.gen.go +++ b/pkg/api/types.gen.go @@ -696,6 +696,7 @@ const ( const ( OrganizationProjectClaimResponsePreviewSourceSubscriptionPlanEnterprise OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan = "enterprise" OrganizationProjectClaimResponsePreviewSourceSubscriptionPlanFree OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan = "free" + OrganizationProjectClaimResponsePreviewSourceSubscriptionPlanPlatform OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan = "platform" OrganizationProjectClaimResponsePreviewSourceSubscriptionPlanPro OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan = "pro" OrganizationProjectClaimResponsePreviewSourceSubscriptionPlanTeam OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan = "team" ) @@ -704,6 +705,7 @@ const ( const ( OrganizationProjectClaimResponsePreviewTargetSubscriptionPlanEnterprise OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan = "enterprise" OrganizationProjectClaimResponsePreviewTargetSubscriptionPlanFree OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan = "free" + OrganizationProjectClaimResponsePreviewTargetSubscriptionPlanPlatform OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan = "platform" OrganizationProjectClaimResponsePreviewTargetSubscriptionPlanPro OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan = "pro" OrganizationProjectClaimResponsePreviewTargetSubscriptionPlanTeam OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan = "team" ) @@ -1289,6 +1291,7 @@ const ( const ( V1OrganizationSlugResponsePlanEnterprise V1OrganizationSlugResponsePlan = "enterprise" V1OrganizationSlugResponsePlanFree V1OrganizationSlugResponsePlan = "free" + V1OrganizationSlugResponsePlanPlatform V1OrganizationSlugResponsePlan = "platform" V1OrganizationSlugResponsePlanPro V1OrganizationSlugResponsePlan = "pro" V1OrganizationSlugResponsePlanTeam V1OrganizationSlugResponsePlan = "team" ) From 55379615555c3ae74e020bcd13b67c4a3741e707 Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Thu, 4 Dec 2025 21:52:26 +0800 Subject: [PATCH 02/25] fix: use double width emoji as icons (#4582) --- internal/status/status.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/status/status.go b/internal/status/status.go index 62532d7ea..fcb628917 100644 --- a/internal/status/status.go +++ b/internal/status/status.go @@ -228,7 +228,7 @@ func PrettyPrint(w io.Writer, exclude ...string) { groups := []OutputGroup{ { - Name: "🛠️ Development Tools", + Name: "🔧 Development Tools", Items: []OutputItem{ {Label: "Studio", Value: values[names.StudioURL], Type: Link}, {Label: "Mailpit", Value: values[names.MailpitURL], Type: Link}, @@ -245,7 +245,7 @@ func PrettyPrint(w io.Writer, exclude ...string) { }, }, { - Name: "🗄️ Database", + Name: "⛁ Database", Items: []OutputItem{ {Label: "URL", Value: values[names.DbURL], Type: Link}, }, From c517625666c5befd78a479ae5c6dbdd8c2dedad1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 00:31:04 +0000 Subject: [PATCH 03/25] fix(docker): bump the docker-minor group in /pkg/config/templates with 2 updates (#4584) fix(docker): bump the docker-minor group Bumps the docker-minor group in /pkg/config/templates with 2 updates: supabase/postgres-meta and supabase/logflare. Updates `supabase/postgres-meta` from v0.93.1 to v0.95.0 Updates `supabase/logflare` from 1.26.20 to 1.26.22 --- updated-dependencies: - dependency-name: supabase/postgres-meta dependency-version: v0.95.0 dependency-type: direct:production dependency-group: docker-minor - dependency-name: supabase/logflare dependency-version: 1.26.22 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 04044a246..044266d16 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -4,7 +4,7 @@ FROM supabase/postgres:17.6.1.059 AS pg FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit FROM postgrest/postgrest:v14.1 AS postgrest -FROM supabase/postgres-meta:v0.93.1 AS pgmeta +FROM supabase/postgres-meta:v0.95.0 AS pgmeta FROM supabase/studio:2025.12.01-sha-4ad48b7 AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.69.28 AS edgeruntime @@ -13,7 +13,7 @@ FROM supabase/supavisor:2.7.4 AS supavisor FROM supabase/gotrue:v2.183.0 AS gotrue FROM supabase/realtime:v2.67.2 AS realtime FROM supabase/storage-api:v1.32.1 AS storage -FROM supabase/logflare:1.26.20 AS logflare +FROM supabase/logflare:1.26.22 AS logflare # Append to JobImages when adding new dependencies below FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ FROM supabase/migra:3.0.1663481299 AS migra From 48f5c707e7058905380986ee576e770399902512 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 00:59:07 +0000 Subject: [PATCH 04/25] fix(docker): bump supabase/postgres from 17.6.1.059 to 17.6.1.061 in /pkg/config/templates (#4585) fix(docker): bump supabase/postgres in /pkg/config/templates Bumps supabase/postgres from 17.6.1.059 to 17.6.1.061. --- updated-dependencies: - dependency-name: supabase/postgres dependency-version: 17.6.1.061 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 044266d16..25456b24a 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -1,5 +1,5 @@ # Exposed for updates by .github/dependabot.yml -FROM supabase/postgres:17.6.1.059 AS pg +FROM supabase/postgres:17.6.1.061 AS pg # Append to ServiceImages when adding new dependencies below FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit From fab11c290f22deb633a2364b0134f35734c5142b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Dec 2025 00:30:58 +0000 Subject: [PATCH 05/25] fix(docker): bump supabase/logflare from 1.26.22 to 1.26.24 in /pkg/config/templates in the docker-minor group (#4587) fix(docker): bump supabase/logflare Bumps the docker-minor group in /pkg/config/templates with 1 update: supabase/logflare. Updates `supabase/logflare` from 1.26.22 to 1.26.24 --- updated-dependencies: - dependency-name: supabase/logflare dependency-version: 1.26.24 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 25456b24a..ed9e07e35 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -13,7 +13,7 @@ FROM supabase/supavisor:2.7.4 AS supavisor FROM supabase/gotrue:v2.183.0 AS gotrue FROM supabase/realtime:v2.67.2 AS realtime FROM supabase/storage-api:v1.32.1 AS storage -FROM supabase/logflare:1.26.22 AS logflare +FROM supabase/logflare:1.26.24 AS logflare # Append to JobImages when adding new dependencies below FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ FROM supabase/migra:3.0.1663481299 AS migra From 69d1666fb75060ff32661ce1fb3f31fcbf67aaf7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Dec 2025 00:36:08 +0000 Subject: [PATCH 06/25] fix(docker): bump supabase/postgres from 17.6.1.061 to 17.6.1.062 in /pkg/config/templates (#4588) fix(docker): bump supabase/postgres in /pkg/config/templates Bumps supabase/postgres from 17.6.1.061 to 17.6.1.062. --- updated-dependencies: - dependency-name: supabase/postgres dependency-version: 17.6.1.062 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index ed9e07e35..67b60c7bd 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -1,5 +1,5 @@ # Exposed for updates by .github/dependabot.yml -FROM supabase/postgres:17.6.1.061 AS pg +FROM supabase/postgres:17.6.1.062 AS pg # Append to ServiceImages when adding new dependencies below FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit From 08a7867230d3b92920ec5ddc7811b90223a17b13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 00:30:59 +0000 Subject: [PATCH 07/25] fix(docker): bump the docker-minor group in /pkg/config/templates with 3 updates (#4592) fix(docker): bump the docker-minor group Bumps the docker-minor group in /pkg/config/templates with 3 updates: supabase/studio, supabase/realtime and supabase/logflare. Updates `supabase/studio` from 2025.12.01-sha-4ad48b7 to 2025.12.08-sha-0399beb Updates `supabase/realtime` from v2.67.2 to v2.67.4 Updates `supabase/logflare` from 1.26.24 to 1.26.25 --- updated-dependencies: - dependency-name: supabase/studio dependency-version: 2025.12.08-sha-0399beb dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-minor - dependency-name: supabase/realtime dependency-version: v2.67.4 dependency-type: direct:production dependency-group: docker-minor - dependency-name: supabase/logflare dependency-version: 1.26.25 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 67b60c7bd..defa84a09 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -5,15 +5,15 @@ FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit FROM postgrest/postgrest:v14.1 AS postgrest FROM supabase/postgres-meta:v0.95.0 AS pgmeta -FROM supabase/studio:2025.12.01-sha-4ad48b7 AS studio +FROM supabase/studio:2025.12.08-sha-0399beb AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.69.28 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.7.4 AS supavisor FROM supabase/gotrue:v2.183.0 AS gotrue -FROM supabase/realtime:v2.67.2 AS realtime +FROM supabase/realtime:v2.67.4 AS realtime FROM supabase/storage-api:v1.32.1 AS storage -FROM supabase/logflare:1.26.24 AS logflare +FROM supabase/logflare:1.26.25 AS logflare # Append to JobImages when adding new dependencies below FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ FROM supabase/migra:3.0.1663481299 AS migra From 912594cb7f7903168909fdccc21f5dcb61444518 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 00:36:09 +0000 Subject: [PATCH 08/25] fix(docker): bump supabase/postgres from 17.6.1.062 to 17.6.1.063 in /pkg/config/templates (#4593) fix(docker): bump supabase/postgres in /pkg/config/templates Bumps supabase/postgres from 17.6.1.062 to 17.6.1.063. --- updated-dependencies: - dependency-name: supabase/postgres dependency-version: 17.6.1.063 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index defa84a09..1c4bd5a1c 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -1,5 +1,5 @@ # Exposed for updates by .github/dependabot.yml -FROM supabase/postgres:17.6.1.062 AS pg +FROM supabase/postgres:17.6.1.063 AS pg # Append to ServiceImages when adding new dependencies below FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit From e43638018dd90abcc851c04a7bbc3b2f4d60be1e Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Tue, 9 Dec 2025 14:25:32 +0800 Subject: [PATCH 09/25] fix: scope project region by current profile (#4596) --- cmd/projects.go | 8 ++--- internal/projects/create/create.go | 11 ++++--- internal/utils/api.go | 17 ---------- internal/utils/profile.go | 51 +++++++++++++++++++++++++----- internal/utils/render.go | 23 +++++++++++++- 5 files changed, 74 insertions(+), 36 deletions(-) diff --git a/cmd/projects.go b/cmd/projects.go index 297ed5853..2ab5d7d2d 100644 --- a/cmd/projects.go +++ b/cmd/projects.go @@ -155,11 +155,9 @@ func init() { } func awsRegions() []string { - result := make([]string, len(utils.RegionMap)) - i := 0 - for k := range utils.RegionMap { - result[i] = k - i++ + result := make([]string, len(utils.CurrentProfile.ProjectRegions)) + for i, region := range utils.CurrentProfile.ProjectRegions { + result[i] = string(region) } sort.Strings(result) return result diff --git a/internal/projects/create/create.go b/internal/projects/create/create.go index 10bd5a460..98b042335 100644 --- a/internal/projects/create/create.go +++ b/internal/projects/create/create.go @@ -116,11 +116,12 @@ func promptOrgId(ctx context.Context) (string, error) { func promptProjectRegion(ctx context.Context) (api.V1CreateProjectBodyRegion, error) { title := "Which region do you want to host the project in?" - items := make([]utils.PromptItem, len(utils.RegionMap)) - i := 0 - for k, v := range utils.RegionMap { - items[i] = utils.PromptItem{Summary: k, Details: v} - i++ + items := make([]utils.PromptItem, len(utils.CurrentProfile.ProjectRegions)) + for i, region := range utils.CurrentProfile.ProjectRegions { + items[i] = utils.PromptItem{ + Summary: string(region), + Details: utils.FormatRegion(string(region)), + } } choice, err := utils.PromptChoice(ctx, title, items) if err != nil { diff --git a/internal/utils/api.go b/internal/utils/api.go index 3cc1dd380..5b9a96fde 100644 --- a/internal/utils/api.go +++ b/internal/utils/api.go @@ -141,23 +141,6 @@ func GetSupabase() *supabase.ClientWithResponses { // Used by unit tests var DefaultApiHost = CurrentProfile.APIURL -var RegionMap = map[string]string{ - "ap-northeast-1": "Northeast Asia (Tokyo)", - "ap-northeast-2": "Northeast Asia (Seoul)", - "ap-south-1": "South Asia (Mumbai)", - "ap-southeast-1": "Southeast Asia (Singapore)", - "ap-southeast-2": "Oceania (Sydney)", - "ca-central-1": "Canada (Central)", - "eu-central-1": "Central EU (Frankfurt)", - "eu-west-1": "West EU (Ireland)", - "eu-west-2": "West EU (London)", - "eu-west-3": "West EU (Paris)", - "sa-east-1": "South America (São Paulo)", - "us-east-1": "East US (North Virginia)", - "us-west-1": "West US (North California)", - "us-west-2": "West US (Oregon)", -} - func GetSupabaseAPIHost() string { return CurrentProfile.APIURL } diff --git a/internal/utils/profile.go b/internal/utils/profile.go index fcb089e3f..1910f30b7 100644 --- a/internal/utils/profile.go +++ b/internal/utils/profile.go @@ -9,17 +9,19 @@ import ( "github.com/go-playground/validator/v10" "github.com/spf13/afero" "github.com/spf13/viper" + "github.com/supabase/cli/pkg/api" ) type Profile struct { - Name string `mapstructure:"name" validate:"required"` - APIURL string `mapstructure:"api_url" validate:"required,http_url"` - DashboardURL string `mapstructure:"dashboard_url" validate:"required,http_url"` - DocsURL string `mapstructure:"docs_url" validate:"omitempty,http_url"` - ProjectHost string `mapstructure:"project_host" validate:"required,hostname_rfc1123"` - PoolerHost string `mapstructure:"pooler_host" validate:"omitempty,hostname_rfc1123"` - AuthClientID string `mapstructure:"client_id" validate:"omitempty,uuid4"` - StudioImage string `mapstructure:"studio_image"` + Name string `mapstructure:"name" validate:"required"` + APIURL string `mapstructure:"api_url" validate:"required,http_url"` + DashboardURL string `mapstructure:"dashboard_url" validate:"required,http_url"` + DocsURL string `mapstructure:"docs_url" validate:"omitempty,http_url"` + ProjectHost string `mapstructure:"project_host" validate:"required,hostname_rfc1123"` + PoolerHost string `mapstructure:"pooler_host" validate:"omitempty,hostname_rfc1123"` + AuthClientID string `mapstructure:"client_id" validate:"omitempty,uuid4"` + StudioImage string `mapstructure:"studio_image"` + ProjectRegions []api.V1CreateProjectBodyRegion `mapstructure:"regions"` } var allProfiles = []Profile{{ @@ -29,6 +31,26 @@ var allProfiles = []Profile{{ DocsURL: "https://supabase.com/docs", ProjectHost: "supabase.co", PoolerHost: "supabase.com", + ProjectRegions: []api.V1CreateProjectBodyRegion{ + api.V1CreateProjectBodyRegionApEast1, + api.V1CreateProjectBodyRegionApNortheast1, + api.V1CreateProjectBodyRegionApNortheast2, + api.V1CreateProjectBodyRegionApSouth1, + api.V1CreateProjectBodyRegionApSoutheast1, + api.V1CreateProjectBodyRegionApSoutheast2, + api.V1CreateProjectBodyRegionCaCentral1, + api.V1CreateProjectBodyRegionEuCentral1, + api.V1CreateProjectBodyRegionEuCentral2, + api.V1CreateProjectBodyRegionEuNorth1, + api.V1CreateProjectBodyRegionEuWest1, + api.V1CreateProjectBodyRegionEuWest2, + api.V1CreateProjectBodyRegionEuWest3, + api.V1CreateProjectBodyRegionSaEast1, + api.V1CreateProjectBodyRegionUsEast1, + api.V1CreateProjectBodyRegionUsEast2, + api.V1CreateProjectBodyRegionUsWest1, + api.V1CreateProjectBodyRegionUsWest2, + }, }, { Name: "supabase-staging", APIURL: "https://api.supabase.green", @@ -36,12 +58,22 @@ var allProfiles = []Profile{{ DocsURL: "https://supabase.com/docs", ProjectHost: "supabase.red", PoolerHost: "supabase.green", + ProjectRegions: []api.V1CreateProjectBodyRegion{ + api.V1CreateProjectBodyRegionApSoutheast1, + api.V1CreateProjectBodyRegionUsEast1, + api.V1CreateProjectBodyRegionEuCentral1, + }, }, { Name: "supabase-local", APIURL: "http://localhost:8080", DashboardURL: "http://localhost:8082", DocsURL: "https://supabase.com/docs", ProjectHost: "supabase.red", + ProjectRegions: []api.V1CreateProjectBodyRegion{ + api.V1CreateProjectBodyRegionApSoutheast1, + api.V1CreateProjectBodyRegionUsEast1, + api.V1CreateProjectBodyRegionEuCentral1, + }, }, { Name: "snap", APIURL: "https://cloudapi.snap.com", @@ -50,6 +82,9 @@ var allProfiles = []Profile{{ ProjectHost: "snapcloud.dev", PoolerHost: "snapcloud.co", AuthClientID: "f7573b20-df47-48f1-b606-e8db4ec16252", + ProjectRegions: []api.V1CreateProjectBodyRegion{ + api.V1CreateProjectBodyRegionUsEast1, + }, }} var CurrentProfile Profile diff --git a/internal/utils/render.go b/internal/utils/render.go index 07d674d29..ee4a4dc6c 100644 --- a/internal/utils/render.go +++ b/internal/utils/render.go @@ -31,8 +31,29 @@ func parse(layout, value string) string { return FormatTime(t) } +var regionMap = map[string]string{ + "ap-east-1": "East Asia (Hong Kong)", + "ap-northeast-1": "Northeast Asia (Tokyo)", + "ap-northeast-2": "Northeast Asia (Seoul)", + "ap-south-1": "South Asia (Mumbai)", + "ap-southeast-1": "Southeast Asia (Singapore)", + "ap-southeast-2": "Oceania (Sydney)", + "ca-central-1": "Canada (Central)", + "eu-central-1": "Central EU (Frankfurt)", + "eu-central-2": "Central Europe (Zurich)", + "eu-north-1": "North EU (Stockholm)", + "eu-west-1": "West EU (Ireland)", + "eu-west-2": "West Europe (London)", + "eu-west-3": "West EU (Paris)", + "sa-east-1": "South America (São Paulo)", + "us-east-1": "East US (North Virginia)", + "us-east-2": "East US (Ohio)", + "us-west-1": "West US (North California)", + "us-west-2": "West US (Oregon)", +} + func FormatRegion(region string) string { - if readable, ok := RegionMap[region]; ok { + if readable, ok := regionMap[region]; ok { return readable } return region From 50da8ee8b092676cf362ef18ae455f3d5d811a5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 00:34:48 +0000 Subject: [PATCH 10/25] fix(docker): bump the docker-minor group in /pkg/config/templates with 4 updates (#4600) fix(docker): bump the docker-minor group Bumps the docker-minor group in /pkg/config/templates with 4 updates: supabase/studio, supabase/gotrue, supabase/realtime and supabase/storage-api. Updates `supabase/studio` from 2025.12.08-sha-0399beb to 2025.12.09-sha-434634f Updates `supabase/gotrue` from v2.183.0 to v2.184.0 Updates `supabase/realtime` from v2.67.4 to v2.67.6 Updates `supabase/storage-api` from v1.32.1 to v1.33.0 --- updated-dependencies: - dependency-name: supabase/studio dependency-version: 2025.12.09-sha-434634f dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-minor - dependency-name: supabase/gotrue dependency-version: v2.184.0 dependency-type: direct:production dependency-group: docker-minor - dependency-name: supabase/realtime dependency-version: v2.67.6 dependency-type: direct:production dependency-group: docker-minor - dependency-name: supabase/storage-api dependency-version: v1.33.0 dependency-type: direct:production dependency-group: docker-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 1c4bd5a1c..a878358bd 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -5,14 +5,14 @@ FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit FROM postgrest/postgrest:v14.1 AS postgrest FROM supabase/postgres-meta:v0.95.0 AS pgmeta -FROM supabase/studio:2025.12.08-sha-0399beb AS studio +FROM supabase/studio:2025.12.09-sha-434634f AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.69.28 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.7.4 AS supavisor -FROM supabase/gotrue:v2.183.0 AS gotrue -FROM supabase/realtime:v2.67.4 AS realtime -FROM supabase/storage-api:v1.32.1 AS storage +FROM supabase/gotrue:v2.184.0 AS gotrue +FROM supabase/realtime:v2.67.6 AS realtime +FROM supabase/storage-api:v1.33.0 AS storage FROM supabase/logflare:1.26.25 AS logflare # Append to JobImages when adding new dependencies below FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ From 34b866710fae1a579206a3b075d2eff3f298b2b4 Mon Sep 17 00:00:00 2001 From: "supabase-cli-releaser[bot]" <246109035+supabase-cli-releaser[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 00:41:40 +0000 Subject: [PATCH 11/25] chore: sync API types from infrastructure (#4602) Co-authored-by: supabase-cli-releaser[bot] <246109035+supabase-cli-releaser[bot]@users.noreply.github.com> --- pkg/api/types.gen.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/api/types.gen.go b/pkg/api/types.gen.go index 288c79393..bf3254693 100644 --- a/pkg/api/types.gen.go +++ b/pkg/api/types.gen.go @@ -14,8 +14,9 @@ import ( ) const ( - BearerScopes = "bearer.Scopes" - Oauth2Scopes = "oauth2.Scopes" + BearerScopes = "bearer.Scopes" + Fga_permissionsScopes = "fga_permissions.Scopes" + Oauth2Scopes = "oauth2.Scopes" ) // Defines values for ActionRunResponseRunStepsName. From f1c3b1c686752fa417acdf53e938b45e7f804011 Mon Sep 17 00:00:00 2001 From: Andrew Valleteau Date: Wed, 10 Dec 2025 13:24:57 +0100 Subject: [PATCH 12/25] refactor(cli): move Deno/IntelliJ prompts from init to functions new (#4598) * refactor(cli): move Deno/IntelliJ prompts from init to functions new Move IDE configuration prompts from `supabase init` to `supabase functions new` when creating the first function, making the init command simpler and more focused. This addresses user feedback that Deno/IntelliJ prompts were irrelevant during project initialization. Changes: - Remove interactive Deno/IntelliJ prompts from `supabase init` - Add prompts to `supabase functions new` when creating the first function - Export WriteVscodeConfig and WriteIntelliJConfig for reuse - Improve extension installation messages with explicit marketplace links - Update tests to reflect the new behavior The init command now only handles: - Creating config.toml - Updating .gitignore IDE settings are now prompted contextually when users first create a function, with VS Code as the default option. Fixes DEVWF-30, DEVWF-108, DEVWF-869 * chore: remove unecessary comments --- cmd/init.go | 5 +-- internal/bootstrap/bootstrap.go | 2 +- internal/functions/new/new.go | 41 +++++++++++++++++++++++++ internal/functions/new/new_test.go | 49 ++++++++++++++++++++++++++++++ internal/init/init.go | 40 ++++++++---------------- internal/init/init_test.go | 23 +++++++------- 6 files changed, 116 insertions(+), 44 deletions(-) diff --git a/cmd/init.go b/cmd/init.go index a9d2d90a8..160b0dd44 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -2,8 +2,6 @@ package cmd import ( "fmt" - "os" - "os/signal" "github.com/spf13/afero" "github.com/spf13/cobra" @@ -42,8 +40,7 @@ var ( if !cmd.Flags().Changed("with-intellij-settings") { createIntellijSettings = nil } - ctx, _ := signal.NotifyContext(cmd.Context(), os.Interrupt) - return _init.Run(ctx, fsys, createVscodeSettings, createIntellijSettings, initParams) + return _init.Run(fsys, createVscodeSettings, createIntellijSettings, initParams) }, PostRun: func(cmd *cobra.Command, args []string) { fmt.Println("Finished " + utils.Aqua("supabase init") + ".") diff --git a/internal/bootstrap/bootstrap.go b/internal/bootstrap/bootstrap.go index 6e93c0acb..e82839106 100644 --- a/internal/bootstrap/bootstrap.go +++ b/internal/bootstrap/bootstrap.go @@ -60,7 +60,7 @@ func Run(ctx context.Context, starter StarterTemplate, fsys afero.Fs, options .. if err := downloadSample(ctx, client, starter.Url, fsys); err != nil { return err } - } else if err := initBlank.Run(ctx, fsys, nil, nil, utils.InitParams{Overwrite: true}); err != nil { + } else if err := initBlank.Run(fsys, nil, nil, utils.InitParams{Overwrite: true}); err != nil { return err } // 1. Login diff --git a/internal/functions/new/new.go b/internal/functions/new/new.go index 5785e0783..047b1bdca 100644 --- a/internal/functions/new/new.go +++ b/internal/functions/new/new.go @@ -10,6 +10,7 @@ import ( "github.com/go-errors/errors" "github.com/spf13/afero" + _init "github.com/supabase/cli/internal/init" "github.com/supabase/cli/internal/utils" "github.com/supabase/cli/internal/utils/flags" ) @@ -38,6 +39,8 @@ func Run(ctx context.Context, slug string, fsys afero.Fs) error { if err := utils.ValidateFunctionSlug(slug); err != nil { return err } + isFirstFunction := isFirstFunctionCreation(fsys) + // 2. Create new function. funcDir := filepath.Join(utils.FunctionsDir, slug) if err := utils.MkdirIfNotExistFS(fsys, funcDir); err != nil { @@ -61,6 +64,44 @@ func Run(ctx context.Context, slug string, fsys afero.Fs) error { return errors.Errorf("failed to create .npmrc config: %w", err) } fmt.Println("Created new Function at " + utils.Bold(funcDir)) + + if isFirstFunction { + if err := promptForIDESettings(ctx, fsys); err != nil { + return err + } + } + return nil +} + +// Checks if this is the first function being created. +// Returns true if the functions directory doesn't exist or is empty. +func isFirstFunctionCreation(fsys afero.Fs) bool { + entries, err := afero.ReadDir(fsys, utils.FunctionsDir) + if err != nil { + // Directory doesn't exist, this is the first function + return true + } + // Check if there are any subdirectories (existing functions) + for _, entry := range entries { + if entry.IsDir() { + return false + } + } + return true +} + +func promptForIDESettings(ctx context.Context, fsys afero.Fs) error { + console := utils.NewConsole() + if isVscode, err := console.PromptYesNo(ctx, "Generate VS Code settings for Deno?", true); err != nil { + return err + } else if isVscode { + return _init.WriteVscodeConfig(fsys) + } + if isIntelliJ, err := console.PromptYesNo(ctx, "Generate IntelliJ IDEA settings for Deno?", false); err != nil { + return err + } else if isIntelliJ { + return _init.WriteIntelliJConfig(fsys) + } return nil } diff --git a/internal/functions/new/new_test.go b/internal/functions/new/new_test.go index df082d0d0..f1b4415fd 100644 --- a/internal/functions/new/new_test.go +++ b/internal/functions/new/new_test.go @@ -60,3 +60,52 @@ func TestNewCommand(t *testing.T) { assert.Error(t, Run(context.Background(), "test-func", fsys)) }) } + +func TestIsFirstFunctionCreation(t *testing.T) { + t.Run("returns true when functions directory does not exist", func(t *testing.T) { + // Setup in-memory fs without functions directory + fsys := afero.NewMemMapFs() + // Run test + assert.True(t, isFirstFunctionCreation(fsys)) + }) + + t.Run("returns true when functions directory is empty", func(t *testing.T) { + // Setup in-memory fs with empty functions directory + fsys := afero.NewMemMapFs() + require.NoError(t, fsys.MkdirAll(utils.FunctionsDir, 0755)) + // Run test + assert.True(t, isFirstFunctionCreation(fsys)) + }) + + t.Run("returns true when functions directory has only files", func(t *testing.T) { + // Setup in-memory fs with functions directory containing only files + fsys := afero.NewMemMapFs() + require.NoError(t, fsys.MkdirAll(utils.FunctionsDir, 0755)) + // Create files (not directories) in functions directory + require.NoError(t, afero.WriteFile(fsys, filepath.Join(utils.FunctionsDir, "import_map.json"), []byte("{}"), 0644)) + require.NoError(t, afero.WriteFile(fsys, filepath.Join(utils.FunctionsDir, ".env"), []byte(""), 0644)) + // Run test + assert.True(t, isFirstFunctionCreation(fsys)) + }) + + t.Run("returns false when functions directory has subdirectories", func(t *testing.T) { + // Setup in-memory fs with existing function + fsys := afero.NewMemMapFs() + existingFuncDir := filepath.Join(utils.FunctionsDir, "existing-func") + require.NoError(t, fsys.MkdirAll(existingFuncDir, 0755)) + require.NoError(t, afero.WriteFile(fsys, filepath.Join(existingFuncDir, "index.ts"), []byte(""), 0644)) + // Run test + assert.False(t, isFirstFunctionCreation(fsys)) + }) + + t.Run("returns false when multiple functions exist", func(t *testing.T) { + // Setup in-memory fs with multiple existing functions + fsys := afero.NewMemMapFs() + func1Dir := filepath.Join(utils.FunctionsDir, "func1") + func2Dir := filepath.Join(utils.FunctionsDir, "func2") + require.NoError(t, fsys.MkdirAll(func1Dir, 0755)) + require.NoError(t, fsys.MkdirAll(func2Dir, 0755)) + // Run test + assert.False(t, isFirstFunctionCreation(fsys)) + }) +} diff --git a/internal/init/init.go b/internal/init/init.go index 4bb18581b..8bf70455b 100644 --- a/internal/init/init.go +++ b/internal/init/init.go @@ -2,7 +2,6 @@ package init import ( "bytes" - "context" _ "embed" "encoding/json" "fmt" @@ -33,7 +32,7 @@ var ( intelliJDeno string ) -func Run(ctx context.Context, fsys afero.Fs, createVscodeSettings, createIntellijSettings *bool, params utils.InitParams) error { +func Run(fsys afero.Fs, createVscodeSettings, createIntellijSettings *bool, params utils.InitParams) error { // 1. Write `config.toml`. if err := utils.InitConfig(params, fsys); err != nil { if errors.Is(err, os.ErrExist) { @@ -49,27 +48,12 @@ func Run(ctx context.Context, fsys afero.Fs, createVscodeSettings, createIntelli } } - // 3. Generate VS Code settings. - if createVscodeSettings != nil { - if *createVscodeSettings { - return writeVscodeConfig(fsys) - } - } else if createIntellijSettings != nil { - if *createIntellijSettings { - return writeIntelliJConfig(fsys) - } - } else { - console := utils.NewConsole() - if isVscode, err := console.PromptYesNo(ctx, "Generate VS Code settings for Deno?", false); err != nil { - return err - } else if isVscode { - return writeVscodeConfig(fsys) - } - if isIntelliJ, err := console.PromptYesNo(ctx, "Generate IntelliJ Settings for Deno?", false); err != nil { - return err - } else if isIntelliJ { - return writeIntelliJConfig(fsys) - } + // 3. Generate VS Code or IntelliJ settings if explicitly requested via flags. + if createVscodeSettings != nil && *createVscodeSettings { + return WriteVscodeConfig(fsys) + } + if createIntellijSettings != nil && *createIntellijSettings { + return WriteIntelliJConfig(fsys) } return nil } @@ -146,7 +130,7 @@ func updateJsonFile(path string, template string, fsys afero.Fs) error { return saveUserSettings(path, userSettings, fsys) } -func writeVscodeConfig(fsys afero.Fs) error { +func WriteVscodeConfig(fsys afero.Fs) error { // Create VS Code settings for Deno. if err := utils.MkdirIfNotExistFS(fsys, vscodeDir); err != nil { return err @@ -157,14 +141,16 @@ func writeVscodeConfig(fsys afero.Fs) error { if err := updateJsonFile(settingsPath, vscodeSettings, fsys); err != nil { return err } - fmt.Println("Generated VS Code settings in " + utils.Bold(settingsPath) + ". Please install the recommended extension!") + fmt.Println("Generated VS Code settings in " + utils.Bold(settingsPath) + ".") + fmt.Println("Please install the Deno extension for VS Code: " + utils.Aqua("https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno")) return nil } -func writeIntelliJConfig(fsys afero.Fs) error { +func WriteIntelliJConfig(fsys afero.Fs) error { if err := utils.WriteFile(denoPath, []byte(intelliJDeno), fsys); err != nil { return err } - fmt.Println("Generated IntelliJ settings in " + utils.Bold(denoPath) + ". Please install the Deno plugin!") + fmt.Println("Generated IntelliJ settings in " + utils.Bold(denoPath) + ".") + fmt.Println("Please install the Deno plugin for IntelliJ: " + utils.Aqua("https://plugins.jetbrains.com/plugin/14382-deno")) return nil } diff --git a/internal/init/init_test.go b/internal/init/init_test.go index 99a96dce5..044eab757 100644 --- a/internal/init/init_test.go +++ b/internal/init/init_test.go @@ -1,7 +1,6 @@ package init import ( - "context" "encoding/json" "os" "testing" @@ -20,7 +19,7 @@ func TestInitCommand(t *testing.T) { fsys := &afero.MemMapFs{} require.NoError(t, fsys.Mkdir(".git", 0755)) // Run test - assert.NoError(t, Run(context.Background(), fsys, nil, nil, utils.InitParams{})) + assert.NoError(t, Run(fsys, nil, nil, utils.InitParams{})) // Validate generated config.toml exists, err := afero.Exists(fsys, utils.ConfigPath) assert.NoError(t, err) @@ -48,14 +47,14 @@ func TestInitCommand(t *testing.T) { _, err := fsys.Create(utils.ConfigPath) require.NoError(t, err) // Run test - assert.Error(t, Run(context.Background(), fsys, nil, nil, utils.InitParams{})) + assert.Error(t, Run(fsys, nil, nil, utils.InitParams{})) }) t.Run("throws error on permission denied", func(t *testing.T) { // Setup in-memory fs fsys := &fstest.OpenErrorFs{DenyPath: utils.ConfigPath} // Run test - err := Run(context.Background(), fsys, nil, nil, utils.InitParams{}) + err := Run(fsys, nil, nil, utils.InitParams{}) // Check error assert.ErrorIs(t, err, os.ErrPermission) }) @@ -64,14 +63,14 @@ func TestInitCommand(t *testing.T) { // Setup read-only fs fsys := afero.NewReadOnlyFs(afero.NewMemMapFs()) // Run test - assert.Error(t, Run(context.Background(), fsys, nil, nil, utils.InitParams{})) + assert.Error(t, Run(fsys, nil, nil, utils.InitParams{})) }) t.Run("creates vscode settings file", func(t *testing.T) { // Setup in-memory fs fsys := &afero.MemMapFs{} // Run test - assert.NoError(t, Run(context.Background(), fsys, cast.Ptr(true), nil, utils.InitParams{})) + assert.NoError(t, Run(fsys, cast.Ptr(true), nil, utils.InitParams{})) // Validate generated vscode settings exists, err := afero.Exists(fsys, settingsPath) assert.NoError(t, err) @@ -85,7 +84,7 @@ func TestInitCommand(t *testing.T) { // Setup in-memory fs fsys := &afero.MemMapFs{} // Run test - assert.NoError(t, Run(context.Background(), fsys, cast.Ptr(false), nil, utils.InitParams{})) + assert.NoError(t, Run(fsys, cast.Ptr(false), nil, utils.InitParams{})) // Validate vscode settings file isn't generated exists, err := afero.Exists(fsys, settingsPath) assert.NoError(t, err) @@ -99,7 +98,7 @@ func TestInitCommand(t *testing.T) { // Setup in-memory fs fsys := &afero.MemMapFs{} // Run test - assert.NoError(t, Run(context.Background(), fsys, nil, cast.Ptr(true), utils.InitParams{})) + assert.NoError(t, Run(fsys, nil, cast.Ptr(true), utils.InitParams{})) // Validate generated intellij deno config exists, err := afero.Exists(fsys, denoPath) assert.NoError(t, err) @@ -110,7 +109,7 @@ func TestInitCommand(t *testing.T) { // Setup in-memory fs fsys := &afero.MemMapFs{} // Run test - assert.NoError(t, Run(context.Background(), fsys, nil, cast.Ptr(false), utils.InitParams{})) + assert.NoError(t, Run(fsys, nil, cast.Ptr(false), utils.InitParams{})) // Validate intellij deno config file isn't generated exists, err := afero.Exists(fsys, denoPath) assert.NoError(t, err) @@ -170,7 +169,7 @@ func TestWriteVSCodeConfig(t *testing.T) { // Setup in-memory fs fsys := afero.NewMemMapFs() // Run test - err := writeVscodeConfig(afero.NewReadOnlyFs(fsys)) + err := WriteVscodeConfig(afero.NewReadOnlyFs(fsys)) // Check error assert.ErrorIs(t, err, os.ErrPermission) }) @@ -179,7 +178,7 @@ func TestWriteVSCodeConfig(t *testing.T) { // Setup in-memory fs fsys := &fstest.OpenErrorFs{DenyPath: extensionsPath} // Run test - err := writeVscodeConfig(fsys) + err := WriteVscodeConfig(fsys) // Check error assert.ErrorIs(t, err, os.ErrPermission) }) @@ -188,7 +187,7 @@ func TestWriteVSCodeConfig(t *testing.T) { // Setup in-memory fs fsys := &fstest.OpenErrorFs{DenyPath: settingsPath} // Run test - err := writeVscodeConfig(fsys) + err := WriteVscodeConfig(fsys) // Check error assert.ErrorIs(t, err, os.ErrPermission) }) From e06f905641ef4e7b1054dd9758506b00520f473e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Dec 2025 00:31:00 +0000 Subject: [PATCH 13/25] fix(docker): bump supabase/postgres from 17.6.1.063 to 17.6.1.064 in /pkg/config/templates (#4608) fix(docker): bump supabase/postgres in /pkg/config/templates Bumps supabase/postgres from 17.6.1.063 to 17.6.1.064. --- updated-dependencies: - dependency-name: supabase/postgres dependency-version: 17.6.1.064 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index a878358bd..4d9d54a6a 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -1,5 +1,5 @@ # Exposed for updates by .github/dependabot.yml -FROM supabase/postgres:17.6.1.063 AS pg +FROM supabase/postgres:17.6.1.064 AS pg # Append to ServiceImages when adding new dependencies below FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit From 28de7d23c8aa9b92f91d736ccb2dd5cd5cbac6bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Dec 2025 00:36:17 +0000 Subject: [PATCH 14/25] fix(docker): bump supabase/realtime from v2.67.6 to v2.68.2 in /pkg/config/templates in the docker-minor group (#4607) fix(docker): bump supabase/realtime Bumps the docker-minor group in /pkg/config/templates with 1 update: supabase/realtime. Updates `supabase/realtime` from v2.67.6 to v2.68.2 --- updated-dependencies: - dependency-name: supabase/realtime dependency-version: v2.68.2 dependency-type: direct:production dependency-group: docker-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 4d9d54a6a..5631a20ec 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -11,7 +11,7 @@ FROM supabase/edge-runtime:v1.69.28 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.7.4 AS supavisor FROM supabase/gotrue:v2.184.0 AS gotrue -FROM supabase/realtime:v2.67.6 AS realtime +FROM supabase/realtime:v2.68.2 AS realtime FROM supabase/storage-api:v1.33.0 AS storage FROM supabase/logflare:1.26.25 AS logflare # Append to JobImages when adding new dependencies below From 5abbdf14172c2636e1cd10846c555c3d266c3f96 Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Thu, 11 Dec 2025 12:21:42 +0800 Subject: [PATCH 15/25] fix: enable s3 locally by default (#4609) --- pkg/config/templates/config.toml | 6 +++--- pkg/config/testdata/config.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/config/templates/config.toml b/pkg/config/templates/config.toml index 3fb0d0b54..eede7d83d 100644 --- a/pkg/config/templates/config.toml +++ b/pkg/config/templates/config.toml @@ -112,9 +112,9 @@ file_size_limit = "50MiB" # allowed_mime_types = ["image/png", "image/jpeg"] # objects_path = "./images" -# Uncomment to allow connections via S3 compatible clients -# [storage.s3_protocol] -# enabled = true +# Allow connections via S3 compatible clients +[storage.s3_protocol] +enabled = true # Image transformation API is available to Supabase Pro plan. # [storage.image_transformation] diff --git a/pkg/config/testdata/config.toml b/pkg/config/testdata/config.toml index 0b4974321..6b92371b7 100644 --- a/pkg/config/testdata/config.toml +++ b/pkg/config/testdata/config.toml @@ -112,7 +112,7 @@ file_size_limit = "50MiB" allowed_mime_types = ["image/png", "image/jpeg"] objects_path = "./images" -# Uncomment to allow connections via S3 compatible clients +# Allow connections via S3 compatible clients [storage.s3_protocol] enabled = true From b3161484c0c1792614c7b7dc09574bfb16053773 Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Thu, 11 Dec 2025 14:46:47 +0800 Subject: [PATCH 16/25] fix: change restart policy to unless stopped (#4603) --- internal/db/start/start.go | 2 +- internal/start/start.go | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/internal/db/start/start.go b/internal/db/start/start.go index f9ba14eb3..92c8fe5eb 100644 --- a/internal/db/start/start.go +++ b/internal/db/start/start.go @@ -119,7 +119,7 @@ func NewHostConfig() container.HostConfig { hostPort := strconv.FormatUint(uint64(utils.Config.Db.Port), 10) hostConfig := container.HostConfig{ PortBindings: nat.PortMap{"5432/tcp": []nat.PortBinding{{HostPort: hostPort}}}, - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, Binds: []string{ utils.DbId + ":/var/lib/postgresql/data", }, diff --git a/internal/start/start.go b/internal/start/start.go index 758ac30d1..cf4bc68fd 100644 --- a/internal/start/start.go +++ b/internal/start/start.go @@ -318,7 +318,7 @@ EOF container.HostConfig{ Binds: bind, PortBindings: nat.PortMap{"4000/tcp": []nat.PortBinding{{HostPort: strconv.FormatUint(uint64(utils.Config.Analytics.Port), 10)}}}, - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ @@ -401,7 +401,7 @@ EOF }, container.HostConfig{ Binds: binds, - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, SecurityOpt: securityOpts, }, network.NetworkingConfig{ @@ -526,7 +526,7 @@ EOF PortBindings: nat.PortMap{nat.Port(fmt.Sprintf("%d/tcp", dockerPort)): []nat.PortBinding{{ HostPort: strconv.FormatUint(uint64(utils.Config.Api.Port), 10)}, }}, - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ @@ -824,7 +824,7 @@ EOF }, }, container.HostConfig{ - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ @@ -868,7 +868,7 @@ EOF }, container.HostConfig{ PortBindings: inbucketPortBindings, - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ @@ -924,7 +924,7 @@ EOF }, }, container.HostConfig{ - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ @@ -958,7 +958,7 @@ EOF // PostgREST does not expose a shell for health check }, container.HostConfig{ - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ @@ -1017,7 +1017,7 @@ EOF }, }, container.HostConfig{ - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, Binds: []string{utils.StorageId + ":" + dockerStoragePath}, }, network.NetworkingConfig{ @@ -1060,7 +1060,7 @@ EOF }, container.HostConfig{ VolumesFrom: []string{utils.StorageId}, - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ @@ -1107,7 +1107,7 @@ EOF }, }, container.HostConfig{ - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ @@ -1155,7 +1155,7 @@ EOF }, container.HostConfig{ PortBindings: nat.PortMap{"3000/tcp": []nat.PortBinding{{HostPort: strconv.FormatUint(uint64(utils.Config.Studio.Port), 10)}}}, - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ @@ -1232,7 +1232,7 @@ EOF PortBindings: nat.PortMap{nat.Port(fmt.Sprintf("%d/tcp", dockerPort)): []nat.PortBinding{{ HostPort: strconv.FormatUint(uint64(utils.Config.Db.Pooler.Port), 10)}, }}, - RestartPolicy: container.RestartPolicy{Name: "always"}, + RestartPolicy: container.RestartPolicy{Name: container.RestartPolicyUnlessStopped}, }, network.NetworkingConfig{ EndpointsConfig: map[string]*network.EndpointSettings{ From f513dbecb87519739826b4bff8295c32d30e4e70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:49:27 +0800 Subject: [PATCH 17/25] chore(deps): bump peter-evans/create-pull-request from 7 to 8 in the actions-major group (#4601) chore(deps): bump peter-evans/create-pull-request Bumps the actions-major group with 1 update: [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request). Updates `peter-evans/create-pull-request` from 7 to 8 - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/api-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-sync.yml b/.github/workflows/api-sync.yml index 2cde09f1e..0248ef54c 100644 --- a/.github/workflows/api-sync.yml +++ b/.github/workflows/api-sync.yml @@ -47,7 +47,7 @@ jobs: - name: Create Pull Request if: steps.check.outputs.has_changes == 'true' id: cpr - uses: peter-evans/create-pull-request@v7 + uses: peter-evans/create-pull-request@v8 with: token: ${{ steps.app-token.outputs.token }} commit-message: "chore: sync API types from infrastructure" From 09b2513dd5ebb6daf68130ebf693e3bc99000151 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Thu, 11 Dec 2025 11:50:53 +0000 Subject: [PATCH 18/25] feat(typegen): add python type generator (#4611) --- cmd/gen.go | 1 + internal/gen/types/types.go | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/gen.go b/cmd/gen.go index 1c6566af4..f063f11a4 100644 --- a/cmd/gen.go +++ b/cmd/gen.go @@ -60,6 +60,7 @@ var ( types.LangTypescript, types.LangGo, types.LangSwift, + types.LangPython, }, Value: types.LangTypescript, } diff --git a/internal/gen/types/types.go b/internal/gen/types/types.go index 8d616c733..fef6a9772 100644 --- a/internal/gen/types/types.go +++ b/internal/gen/types/types.go @@ -23,6 +23,7 @@ const ( LangTypescript = "typescript" LangGo = "go" LangSwift = "swift" + LangPython = "python" ) const ( From 4637e252d3e6c91e6a93701f67738c0bc2a5a012 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Dec 2025 00:30:58 +0000 Subject: [PATCH 19/25] fix(docker): bump the docker-minor group in /pkg/config/templates with 2 updates (#4612) fix(docker): bump the docker-minor group Bumps the docker-minor group in /pkg/config/templates with 2 updates: supabase/postgres-meta and supabase/realtime. Updates `supabase/postgres-meta` from v0.95.0 to v0.95.1 Updates `supabase/realtime` from v2.68.2 to v2.68.4 --- updated-dependencies: - dependency-name: supabase/postgres-meta dependency-version: v0.95.1 dependency-type: direct:production dependency-group: docker-minor - dependency-name: supabase/realtime dependency-version: v2.68.4 dependency-type: direct:production dependency-group: docker-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 5631a20ec..7d360759a 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -4,14 +4,14 @@ FROM supabase/postgres:17.6.1.064 AS pg FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit FROM postgrest/postgrest:v14.1 AS postgrest -FROM supabase/postgres-meta:v0.95.0 AS pgmeta +FROM supabase/postgres-meta:v0.95.1 AS pgmeta FROM supabase/studio:2025.12.09-sha-434634f AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.69.28 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.7.4 AS supavisor FROM supabase/gotrue:v2.184.0 AS gotrue -FROM supabase/realtime:v2.68.2 AS realtime +FROM supabase/realtime:v2.68.4 AS realtime FROM supabase/storage-api:v1.33.0 AS storage FROM supabase/logflare:1.26.25 AS logflare # Append to JobImages when adding new dependencies below From 79fc9bd8616275550847972e8b3021458d8ed952 Mon Sep 17 00:00:00 2001 From: Andrew Valleteau Date: Fri, 12 Dec 2025 12:13:39 +0100 Subject: [PATCH 20/25] fix: remove deprecated Deno 2 flags to eliminate warnings (#4599) * fix: remove deprecated Deno 2 flags to eliminate warnings Deno 2 emits deprecation warnings when using --import-map and --decorator flags, as it now auto-discovers deno.json/deno.jsonc files and uses TC39 decorators by default. Changes: - Remove --decorator tc39 flag (TC39 is now the default in Deno 2) - Skip --import-map flag for deno.json/deno.jsonc files (Deno 2 auto-discovers) - Keep --import-map flag for legacy import_map.json files (backwards compatible) Fixes: #4266 * Remove decoratorType variable Removed the decoratorType variable and its associated comments. * fix: review comments * chore: use --config flag if needed * chore: only check deno version * fix: default native bundler syntax to deno 2 --------- Co-authored-by: Qiao Han --- internal/functions/deploy/bundle.go | 10 ++++++- internal/functions/serve/templates/main.ts | 1 + pkg/function/bundle.go | 31 +++++++++++++++------- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/internal/functions/deploy/bundle.go b/internal/functions/deploy/bundle.go index 0b91b5377..62e4ba428 100644 --- a/internal/functions/deploy/bundle.go +++ b/internal/functions/deploy/bundle.go @@ -50,8 +50,16 @@ func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap hostOutputPath := filepath.Join(hostOutputDir, "output.eszip") // Create exec command cmd := []string{"bundle", "--entrypoint", utils.ToDockerPath(entrypoint), "--output", utils.ToDockerPath(hostOutputPath)} + // Handle import map/config flags based on Deno version + // Deno 2: use --config for deno.json files and legacy import_map.json + // Deno 1: use --import-map for all import map files if len(importMap) > 0 { - cmd = append(cmd, "--import-map", utils.ToDockerPath(importMap)) + dockerImportMapPath := utils.ToDockerPath(importMap) + if utils.Config.EdgeRuntime.DenoVersion > 1 { + cmd = append(cmd, "--config", dockerImportMapPath) + } else { + cmd = append(cmd, "--import-map", dockerImportMapPath) + } } for _, sf := range staticFiles { cmd = append(cmd, "--static", utils.ToDockerPath(sf)) diff --git a/internal/functions/serve/templates/main.ts b/internal/functions/serve/templates/main.ts index 4d5430efe..f6676c163 100644 --- a/internal/functions/serve/templates/main.ts +++ b/internal/functions/serve/templates/main.ts @@ -190,6 +190,7 @@ Deno.serve({ // NOTE(Nyannyacha): Decorator type has been set to tc39 by Lakshan's request, // but in my opinion, we should probably expose this to customers at some // point, as their migration process will not be easy. + // This need to be kept for Deno 1 compatibility. const decoratorType = "tc39"; const absEntrypoint = posix.join(Deno.cwd(), functionsConfig[functionName].entrypointPath); diff --git a/pkg/function/bundle.go b/pkg/function/bundle.go index 04ec2c240..2ea6aed3f 100644 --- a/pkg/function/bundle.go +++ b/pkg/function/bundle.go @@ -18,15 +18,17 @@ import ( ) type nativeBundler struct { - tempDir string - fsys fs.FS - timeout time.Duration + tempDir string + fsys fs.FS + timeout time.Duration + denoVersion uint } func NewNativeBundler(tempDir string, fsys fs.FS, opts ...func(*nativeBundler)) EszipBundler { b := &nativeBundler{ - tempDir: tempDir, - fsys: fsys, + tempDir: tempDir, + fsys: fsys, + denoVersion: 2, } for _, apply := range opts { apply(b) @@ -40,12 +42,16 @@ func WithTimeout(timeout time.Duration) func(*nativeBundler) { } } +func WithDenoVersion(version uint) func(*nativeBundler) { + return func(b *nativeBundler) { + b.denoVersion = version + } +} + var ( // Use a package private variable to allow testing without gosec complaining about G204 edgeRuntimeBin = "edge-runtime" - BundleFlags = []string{ - "--decorator", "tc39", - } + BundleFlags = []string{} ) func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (FunctionDeployMetadata, error) { @@ -53,8 +59,15 @@ func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap outputPath := filepath.Join(b.tempDir, slug+".eszip") // TODO: make edge runtime write to stdout args := []string{"bundle", "--entrypoint", entrypoint, "--output", outputPath} + // Handle import map/config flags based on Deno version + // Deno 2: use --config for deno.json files and legacy import_map.json + // Deno 1: use --import-map for all import map files if len(importMap) > 0 { - args = append(args, "--import-map", importMap) + if b.denoVersion > 1 { + args = append(args, "--config", importMap) + } else { + args = append(args, "--import-map", importMap) + } } for _, staticFile := range staticFiles { args = append(args, "--static", staticFile) From 585a758889c0c354c89e3160b0229c6b682bb793 Mon Sep 17 00:00:00 2001 From: Andrew Valleteau Date: Fri, 12 Dec 2025 12:24:02 +0100 Subject: [PATCH 21/25] feat(cli): replace IDE flags with interactive mode in init (#4606) * refactor(cli): replace IDE flags with interactive mode in init - Replace --with-vscode-settings and --with-intellij-settings with single --interactive flag (defaults to false) - Simplify init.Run signature: remove pointer bools, add context - Use deploy.GetFunctionSlugs() instead of custom isFirstFunctionCreation() - Make PromptForIDESettings public for reuse in functions/new - Change IDE links from Aqua to Bold for consistency - Update tests to match new signatures * fix: restore flags for backward compatibility --- cmd/init.go | 40 +++++++++++++------ internal/bootstrap/bootstrap.go | 2 +- internal/functions/new/new.go | 42 ++++---------------- internal/functions/new/new_test.go | 49 ----------------------- internal/init/init.go | 28 +++++++++++--- internal/init/init_test.go | 62 +++--------------------------- 6 files changed, 65 insertions(+), 158 deletions(-) diff --git a/cmd/init.go b/cmd/init.go index 160b0dd44..170d4dc86 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -2,17 +2,20 @@ package cmd import ( "fmt" + "os" "github.com/spf13/afero" "github.com/spf13/cobra" "github.com/spf13/viper" _init "github.com/supabase/cli/internal/init" "github.com/supabase/cli/internal/utils" + "golang.org/x/term" ) var ( - createVscodeSettings = new(bool) - createIntellijSettings = new(bool) + initInteractive bool + createVscodeSettings bool + createIntellijSettings bool initParams = utils.InitParams{} initCmd = &cobra.Command{ @@ -32,15 +35,24 @@ var ( } }, RunE: func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() fsys := afero.NewOsFs() - if !cmd.Flags().Changed("with-vscode-settings") && !cmd.Flags().Changed("with-vscode-workspace") { - createVscodeSettings = nil + interactive := initInteractive && term.IsTerminal(int(os.Stdin.Fd())) + if err := _init.Run(ctx, fsys, interactive, initParams); err != nil { + return err } - - if !cmd.Flags().Changed("with-intellij-settings") { - createIntellijSettings = nil + // Handle backwards compatibility flags + if createVscodeSettings { + if err := _init.WriteVscodeConfig(fsys); err != nil { + return err + } + } + if createIntellijSettings { + if err := _init.WriteIntelliJConfig(fsys); err != nil { + return err + } } - return _init.Run(fsys, createVscodeSettings, createIntellijSettings, initParams) + return nil }, PostRun: func(cmd *cobra.Command, args []string) { fmt.Println("Finished " + utils.Aqua("supabase init") + ".") @@ -50,11 +62,15 @@ var ( func init() { flags := initCmd.Flags() - flags.BoolVar(createVscodeSettings, "with-vscode-workspace", false, "Generate VS Code workspace.") - 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.BoolVarP(&initInteractive, "interactive", "i", false, "Enables interactive mode to configure IDE settings.") flags.BoolVar(&initParams.UseOrioleDB, "use-orioledb", false, "Use OrioleDB storage engine for Postgres.") flags.BoolVar(&initParams.Overwrite, "force", false, "Overwrite existing "+utils.ConfigPath+".") + // Backwards compatibility flags (hidden) + flags.BoolVar(&createVscodeSettings, "with-vscode-workspace", false, "Generate VS Code workspace.") + cobra.CheckErr(flags.MarkHidden("with-vscode-workspace")) + flags.BoolVar(&createVscodeSettings, "with-vscode-settings", false, "Generate VS Code settings for Deno.") + cobra.CheckErr(flags.MarkHidden("with-vscode-settings")) + flags.BoolVar(&createIntellijSettings, "with-intellij-settings", false, "Generate IntelliJ IDEA settings for Deno.") + cobra.CheckErr(flags.MarkHidden("with-intellij-settings")) rootCmd.AddCommand(initCmd) } diff --git a/internal/bootstrap/bootstrap.go b/internal/bootstrap/bootstrap.go index e82839106..d8279d135 100644 --- a/internal/bootstrap/bootstrap.go +++ b/internal/bootstrap/bootstrap.go @@ -60,7 +60,7 @@ func Run(ctx context.Context, starter StarterTemplate, fsys afero.Fs, options .. if err := downloadSample(ctx, client, starter.Url, fsys); err != nil { return err } - } else if err := initBlank.Run(fsys, nil, nil, utils.InitParams{Overwrite: true}); err != nil { + } else if err := initBlank.Run(ctx, fsys, false, utils.InitParams{Overwrite: true}); err != nil { return err } // 1. Login diff --git a/internal/functions/new/new.go b/internal/functions/new/new.go index 047b1bdca..1b0f30791 100644 --- a/internal/functions/new/new.go +++ b/internal/functions/new/new.go @@ -10,6 +10,7 @@ import ( "github.com/go-errors/errors" "github.com/spf13/afero" + "github.com/supabase/cli/internal/functions/deploy" _init "github.com/supabase/cli/internal/init" "github.com/supabase/cli/internal/utils" "github.com/supabase/cli/internal/utils/flags" @@ -39,7 +40,12 @@ func Run(ctx context.Context, slug string, fsys afero.Fs) error { if err := utils.ValidateFunctionSlug(slug); err != nil { return err } - isFirstFunction := isFirstFunctionCreation(fsys) + // Check if this is the first function being created + existingSlugs, err := deploy.GetFunctionSlugs(fsys) + if err != nil { + fmt.Fprintln(utils.GetDebugLogger(), err) + } + isFirstFunction := len(existingSlugs) == 0 // 2. Create new function. funcDir := filepath.Join(utils.FunctionsDir, slug) @@ -66,45 +72,13 @@ func Run(ctx context.Context, slug string, fsys afero.Fs) error { fmt.Println("Created new Function at " + utils.Bold(funcDir)) if isFirstFunction { - if err := promptForIDESettings(ctx, fsys); err != nil { + if err := _init.PromptForIDESettings(ctx, fsys); err != nil { return err } } return nil } -// Checks if this is the first function being created. -// Returns true if the functions directory doesn't exist or is empty. -func isFirstFunctionCreation(fsys afero.Fs) bool { - entries, err := afero.ReadDir(fsys, utils.FunctionsDir) - if err != nil { - // Directory doesn't exist, this is the first function - return true - } - // Check if there are any subdirectories (existing functions) - for _, entry := range entries { - if entry.IsDir() { - return false - } - } - return true -} - -func promptForIDESettings(ctx context.Context, fsys afero.Fs) error { - console := utils.NewConsole() - if isVscode, err := console.PromptYesNo(ctx, "Generate VS Code settings for Deno?", true); err != nil { - return err - } else if isVscode { - return _init.WriteVscodeConfig(fsys) - } - if isIntelliJ, err := console.PromptYesNo(ctx, "Generate IntelliJ IDEA settings for Deno?", false); err != nil { - return err - } else if isIntelliJ { - return _init.WriteIntelliJConfig(fsys) - } - return nil -} - func createEntrypointFile(slug string, fsys afero.Fs) error { entrypointPath := filepath.Join(utils.FunctionsDir, slug, "index.ts") f, err := fsys.OpenFile(entrypointPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0644) diff --git a/internal/functions/new/new_test.go b/internal/functions/new/new_test.go index f1b4415fd..df082d0d0 100644 --- a/internal/functions/new/new_test.go +++ b/internal/functions/new/new_test.go @@ -60,52 +60,3 @@ func TestNewCommand(t *testing.T) { assert.Error(t, Run(context.Background(), "test-func", fsys)) }) } - -func TestIsFirstFunctionCreation(t *testing.T) { - t.Run("returns true when functions directory does not exist", func(t *testing.T) { - // Setup in-memory fs without functions directory - fsys := afero.NewMemMapFs() - // Run test - assert.True(t, isFirstFunctionCreation(fsys)) - }) - - t.Run("returns true when functions directory is empty", func(t *testing.T) { - // Setup in-memory fs with empty functions directory - fsys := afero.NewMemMapFs() - require.NoError(t, fsys.MkdirAll(utils.FunctionsDir, 0755)) - // Run test - assert.True(t, isFirstFunctionCreation(fsys)) - }) - - t.Run("returns true when functions directory has only files", func(t *testing.T) { - // Setup in-memory fs with functions directory containing only files - fsys := afero.NewMemMapFs() - require.NoError(t, fsys.MkdirAll(utils.FunctionsDir, 0755)) - // Create files (not directories) in functions directory - require.NoError(t, afero.WriteFile(fsys, filepath.Join(utils.FunctionsDir, "import_map.json"), []byte("{}"), 0644)) - require.NoError(t, afero.WriteFile(fsys, filepath.Join(utils.FunctionsDir, ".env"), []byte(""), 0644)) - // Run test - assert.True(t, isFirstFunctionCreation(fsys)) - }) - - t.Run("returns false when functions directory has subdirectories", func(t *testing.T) { - // Setup in-memory fs with existing function - fsys := afero.NewMemMapFs() - existingFuncDir := filepath.Join(utils.FunctionsDir, "existing-func") - require.NoError(t, fsys.MkdirAll(existingFuncDir, 0755)) - require.NoError(t, afero.WriteFile(fsys, filepath.Join(existingFuncDir, "index.ts"), []byte(""), 0644)) - // Run test - assert.False(t, isFirstFunctionCreation(fsys)) - }) - - t.Run("returns false when multiple functions exist", func(t *testing.T) { - // Setup in-memory fs with multiple existing functions - fsys := afero.NewMemMapFs() - func1Dir := filepath.Join(utils.FunctionsDir, "func1") - func2Dir := filepath.Join(utils.FunctionsDir, "func2") - require.NoError(t, fsys.MkdirAll(func1Dir, 0755)) - require.NoError(t, fsys.MkdirAll(func2Dir, 0755)) - // Run test - assert.False(t, isFirstFunctionCreation(fsys)) - }) -} diff --git a/internal/init/init.go b/internal/init/init.go index 8bf70455b..01c70bcaf 100644 --- a/internal/init/init.go +++ b/internal/init/init.go @@ -2,6 +2,7 @@ package init import ( "bytes" + "context" _ "embed" "encoding/json" "fmt" @@ -32,7 +33,7 @@ var ( intelliJDeno string ) -func Run(fsys afero.Fs, createVscodeSettings, createIntellijSettings *bool, params utils.InitParams) error { +func Run(ctx context.Context, fsys afero.Fs, interactive bool, params utils.InitParams) error { // 1. Write `config.toml`. if err := utils.InitConfig(params, fsys); err != nil { if errors.Is(err, os.ErrExist) { @@ -48,11 +49,26 @@ func Run(fsys afero.Fs, createVscodeSettings, createIntellijSettings *bool, para } } - // 3. Generate VS Code or IntelliJ settings if explicitly requested via flags. - if createVscodeSettings != nil && *createVscodeSettings { + // 3. Prompt for IDE settings in interactive mode. + if interactive { + if err := PromptForIDESettings(ctx, fsys); err != nil { + return err + } + } + return nil +} + +// PromptForIDESettings prompts the user to generate IDE settings for Deno. +func PromptForIDESettings(ctx context.Context, fsys afero.Fs) error { + console := utils.NewConsole() + if isVscode, err := console.PromptYesNo(ctx, "Generate VS Code settings for Deno?", true); err != nil { + return err + } else if isVscode { return WriteVscodeConfig(fsys) } - if createIntellijSettings != nil && *createIntellijSettings { + if isIntelliJ, err := console.PromptYesNo(ctx, "Generate IntelliJ IDEA settings for Deno?", false); err != nil { + return err + } else if isIntelliJ { return WriteIntelliJConfig(fsys) } return nil @@ -142,7 +158,7 @@ func WriteVscodeConfig(fsys afero.Fs) error { return err } fmt.Println("Generated VS Code settings in " + utils.Bold(settingsPath) + ".") - fmt.Println("Please install the Deno extension for VS Code: " + utils.Aqua("https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno")) + fmt.Println("Please install the Deno extension for VS Code: " + utils.Bold("https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno")) return nil } @@ -151,6 +167,6 @@ func WriteIntelliJConfig(fsys afero.Fs) error { return err } fmt.Println("Generated IntelliJ settings in " + utils.Bold(denoPath) + ".") - fmt.Println("Please install the Deno plugin for IntelliJ: " + utils.Aqua("https://plugins.jetbrains.com/plugin/14382-deno")) + fmt.Println("Please install the Deno plugin for IntelliJ: " + utils.Bold("https://plugins.jetbrains.com/plugin/14382-deno")) return nil } diff --git a/internal/init/init_test.go b/internal/init/init_test.go index 044eab757..3d54feb58 100644 --- a/internal/init/init_test.go +++ b/internal/init/init_test.go @@ -1,6 +1,7 @@ package init import ( + "context" "encoding/json" "os" "testing" @@ -10,7 +11,6 @@ import ( "github.com/stretchr/testify/require" "github.com/supabase/cli/internal/testing/fstest" "github.com/supabase/cli/internal/utils" - "github.com/supabase/cli/pkg/cast" ) func TestInitCommand(t *testing.T) { @@ -18,8 +18,8 @@ func TestInitCommand(t *testing.T) { // Setup in-memory fs fsys := &afero.MemMapFs{} require.NoError(t, fsys.Mkdir(".git", 0755)) - // Run test - assert.NoError(t, Run(fsys, nil, nil, utils.InitParams{})) + // Run test (non-interactive mode) + assert.NoError(t, Run(context.Background(), fsys, false, utils.InitParams{})) // Validate generated config.toml exists, err := afero.Exists(fsys, utils.ConfigPath) assert.NoError(t, err) @@ -47,14 +47,14 @@ func TestInitCommand(t *testing.T) { _, err := fsys.Create(utils.ConfigPath) require.NoError(t, err) // Run test - assert.Error(t, Run(fsys, nil, nil, utils.InitParams{})) + assert.Error(t, Run(context.Background(), fsys, false, utils.InitParams{})) }) t.Run("throws error on permission denied", func(t *testing.T) { // Setup in-memory fs fsys := &fstest.OpenErrorFs{DenyPath: utils.ConfigPath} // Run test - err := Run(fsys, nil, nil, utils.InitParams{}) + err := Run(context.Background(), fsys, false, utils.InitParams{}) // Check error assert.ErrorIs(t, err, os.ErrPermission) }) @@ -63,57 +63,7 @@ func TestInitCommand(t *testing.T) { // Setup read-only fs fsys := afero.NewReadOnlyFs(afero.NewMemMapFs()) // Run test - assert.Error(t, Run(fsys, nil, nil, utils.InitParams{})) - }) - - t.Run("creates vscode settings file", func(t *testing.T) { - // Setup in-memory fs - fsys := &afero.MemMapFs{} - // Run test - assert.NoError(t, Run(fsys, cast.Ptr(true), nil, utils.InitParams{})) - // Validate generated vscode settings - exists, err := afero.Exists(fsys, settingsPath) - assert.NoError(t, err) - assert.True(t, exists) - exists, err = afero.Exists(fsys, extensionsPath) - assert.NoError(t, err) - assert.True(t, exists) - }) - - t.Run("does not create vscode settings file", func(t *testing.T) { - // Setup in-memory fs - fsys := &afero.MemMapFs{} - // Run test - assert.NoError(t, Run(fsys, cast.Ptr(false), nil, utils.InitParams{})) - // Validate vscode settings file isn't generated - exists, err := afero.Exists(fsys, settingsPath) - assert.NoError(t, err) - assert.False(t, exists) - exists, err = afero.Exists(fsys, extensionsPath) - assert.NoError(t, err) - assert.False(t, exists) - }) - - t.Run("creates intellij deno file", func(t *testing.T) { - // Setup in-memory fs - fsys := &afero.MemMapFs{} - // Run test - assert.NoError(t, Run(fsys, nil, cast.Ptr(true), utils.InitParams{})) - // Validate generated intellij deno config - exists, err := afero.Exists(fsys, denoPath) - assert.NoError(t, err) - assert.True(t, exists) - }) - - t.Run("does not create intellij deno file", func(t *testing.T) { - // Setup in-memory fs - fsys := &afero.MemMapFs{} - // Run test - assert.NoError(t, Run(fsys, nil, cast.Ptr(false), utils.InitParams{})) - // Validate intellij deno config file isn't generated - exists, err := afero.Exists(fsys, denoPath) - assert.NoError(t, err) - assert.False(t, exists) + assert.Error(t, Run(context.Background(), fsys, false, utils.InitParams{})) }) } From 34b3b3cd3b71221cdded43cf91ea0d12ccdf5c7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 00:31:00 +0000 Subject: [PATCH 22/25] fix(docker): bump supabase/logflare from 1.26.25 to 1.27.0 in /pkg/config/templates in the docker-minor group (#4616) fix(docker): bump supabase/logflare Bumps the docker-minor group in /pkg/config/templates with 1 update: supabase/logflare. Updates `supabase/logflare` from 1.26.25 to 1.27.0 --- updated-dependencies: - dependency-name: supabase/logflare dependency-version: 1.27.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: docker-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 7d360759a..d465e6da2 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -13,7 +13,7 @@ FROM supabase/supavisor:2.7.4 AS supavisor FROM supabase/gotrue:v2.184.0 AS gotrue FROM supabase/realtime:v2.68.4 AS realtime FROM supabase/storage-api:v1.33.0 AS storage -FROM supabase/logflare:1.26.25 AS logflare +FROM supabase/logflare:1.27.0 AS logflare # Append to JobImages when adding new dependencies below FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ FROM supabase/migra:3.0.1663481299 AS migra From a88601ba873052ea8642645d3f1cd52ac139e558 Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Sat, 13 Dec 2025 11:41:06 +0800 Subject: [PATCH 23/25] fix: use deno json auto discovery (#4619) --- internal/functions/deploy/bundle.go | 12 ++---------- pkg/function/bundle.go | 15 ++++++--------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/internal/functions/deploy/bundle.go b/internal/functions/deploy/bundle.go index 62e4ba428..ae807aa01 100644 --- a/internal/functions/deploy/bundle.go +++ b/internal/functions/deploy/bundle.go @@ -50,16 +50,8 @@ func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap hostOutputPath := filepath.Join(hostOutputDir, "output.eszip") // Create exec command cmd := []string{"bundle", "--entrypoint", utils.ToDockerPath(entrypoint), "--output", utils.ToDockerPath(hostOutputPath)} - // Handle import map/config flags based on Deno version - // Deno 2: use --config for deno.json files and legacy import_map.json - // Deno 1: use --import-map for all import map files - if len(importMap) > 0 { - dockerImportMapPath := utils.ToDockerPath(importMap) - if utils.Config.EdgeRuntime.DenoVersion > 1 { - cmd = append(cmd, "--config", dockerImportMapPath) - } else { - cmd = append(cmd, "--import-map", dockerImportMapPath) - } + if len(importMap) > 0 && !function.ShouldUseDenoJsonDiscovery(entrypoint, importMap) { + cmd = append(cmd, "--import-map", utils.ToDockerPath(importMap)) } for _, sf := range staticFiles { cmd = append(cmd, "--static", utils.ToDockerPath(sf)) diff --git a/pkg/function/bundle.go b/pkg/function/bundle.go index 2ea6aed3f..599006aef 100644 --- a/pkg/function/bundle.go +++ b/pkg/function/bundle.go @@ -59,15 +59,8 @@ func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap outputPath := filepath.Join(b.tempDir, slug+".eszip") // TODO: make edge runtime write to stdout args := []string{"bundle", "--entrypoint", entrypoint, "--output", outputPath} - // Handle import map/config flags based on Deno version - // Deno 2: use --config for deno.json files and legacy import_map.json - // Deno 1: use --import-map for all import map files - if len(importMap) > 0 { - if b.denoVersion > 1 { - args = append(args, "--config", importMap) - } else { - args = append(args, "--import-map", importMap) - } + if len(importMap) > 0 && !ShouldUseDenoJsonDiscovery(entrypoint, importMap) { + args = append(args, "--import-map", importMap) } for _, staticFile := range staticFiles { args = append(args, "--static", staticFile) @@ -97,6 +90,10 @@ func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap return meta, Compress(eszipBytes, output) } +func ShouldUseDenoJsonDiscovery(entrypoint, importMap string) bool { + return isDeno(filepath.Base(importMap)) && filepath.Dir(importMap) == filepath.Dir(entrypoint) +} + func ShouldUsePackageJsonDiscovery(entrypoint, importMap string, fsys fs.StatFS) bool { if len(importMap) > 0 { return false From 9c6c9e96cfb2654d30652389e742f67fd23dca89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 00:30:52 +0000 Subject: [PATCH 24/25] fix(docker): bump the docker-minor group in /pkg/config/templates with 3 updates (#4627) fix(docker): bump the docker-minor group Bumps the docker-minor group in /pkg/config/templates with 3 updates: supabase/studio, supabase/realtime and supabase/logflare. Updates `supabase/studio` from 2025.12.09-sha-434634f to 2025.12.15-sha-e98ba37 Updates `supabase/realtime` from v2.68.4 to v2.68.5 Updates `supabase/logflare` from 1.27.0 to 1.27.2 --- updated-dependencies: - dependency-name: supabase/studio dependency-version: 2025.12.15-sha-e98ba37 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-minor - dependency-name: supabase/realtime dependency-version: v2.68.5 dependency-type: direct:production dependency-group: docker-minor - dependency-name: supabase/logflare dependency-version: 1.27.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: docker-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index d465e6da2..66e1d93a3 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -5,15 +5,15 @@ FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit FROM postgrest/postgrest:v14.1 AS postgrest FROM supabase/postgres-meta:v0.95.1 AS pgmeta -FROM supabase/studio:2025.12.09-sha-434634f AS studio +FROM supabase/studio:2025.12.15-sha-e98ba37 AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.69.28 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.7.4 AS supavisor FROM supabase/gotrue:v2.184.0 AS gotrue -FROM supabase/realtime:v2.68.4 AS realtime +FROM supabase/realtime:v2.68.5 AS realtime FROM supabase/storage-api:v1.33.0 AS storage -FROM supabase/logflare:1.27.0 AS logflare +FROM supabase/logflare:1.27.2 AS logflare # Append to JobImages when adding new dependencies below FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ FROM supabase/migra:3.0.1663481299 AS migra From dc3271028e925e730920a735e545e13275f0abc6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 00:35:59 +0000 Subject: [PATCH 25/25] fix(docker): bump supabase/postgres from 17.6.1.064 to 17.6.1.065 in /pkg/config/templates (#4628) fix(docker): bump supabase/postgres in /pkg/config/templates Bumps supabase/postgres from 17.6.1.064 to 17.6.1.065. --- updated-dependencies: - dependency-name: supabase/postgres dependency-version: 17.6.1.065 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkg/config/templates/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 66e1d93a3..27da579af 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -1,5 +1,5 @@ # Exposed for updates by .github/dependabot.yml -FROM supabase/postgres:17.6.1.064 AS pg +FROM supabase/postgres:17.6.1.065 AS pg # Append to ServiceImages when adding new dependencies below FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit