From e6c8257867aa9634065c2e2707b3fa72b6b7a01c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 04:46:10 +0000 Subject: [PATCH 01/26] chore(deps): bump supabase/supavisor from 2.4.12 to 2.4.13 in /pkg/config/templates (#3302) chore(deps): bump supabase/supavisor in /pkg/config/templates Bumps supabase/supavisor from 2.4.12 to 2.4.13. --- updated-dependencies: - dependency-name: supabase/supavisor 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 286caae4b..64af4e572 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -9,7 +9,7 @@ FROM supabase/studio:20250224-d10db0f AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.67.2 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector -FROM supabase/supavisor:2.4.12 AS supavisor +FROM supabase/supavisor:2.4.13 AS supavisor FROM supabase/gotrue:v2.170.0 AS gotrue FROM supabase/realtime:v2.34.40 AS realtime FROM supabase/storage-api:v1.19.3 AS storage From b747cee60e3f7955058237366c0dc0709349eff1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 04:50:56 +0000 Subject: [PATCH 02/26] chore(deps): bump supabase/realtime from v2.34.40 to v2.34.41 in /pkg/config/templates (#3301) chore(deps): bump supabase/realtime in /pkg/config/templates Bumps supabase/realtime from v2.34.40 to v2.34.41. --- updated-dependencies: - dependency-name: supabase/realtime dependency-type: direct:production ... 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 64af4e572..bddea42d0 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -11,7 +11,7 @@ FROM supabase/edge-runtime:v1.67.2 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.4.13 AS supavisor FROM supabase/gotrue:v2.170.0 AS gotrue -FROM supabase/realtime:v2.34.40 AS realtime +FROM supabase/realtime:v2.34.41 AS realtime FROM supabase/storage-api:v1.19.3 AS storage FROM supabase/logflare:1.12.5 AS logflare # Append to JobImages when adding new dependencies below From a9156afed5aa7955ca83862fd0a63cedd3f37ad4 Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Fri, 14 Mar 2025 22:42:39 +0100 Subject: [PATCH 03/26] fix: revert logflare to 1.12.0 (#3305) --- 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 bddea42d0..6cd0154a3 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -13,7 +13,7 @@ FROM supabase/supavisor:2.4.13 AS supavisor FROM supabase/gotrue:v2.170.0 AS gotrue FROM supabase/realtime:v2.34.41 AS realtime FROM supabase/storage-api:v1.19.3 AS storage -FROM supabase/logflare:1.12.5 AS logflare +FROM supabase/logflare:1.12.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 67ac74e3813fb8f11a35b9d76f05ce09feb779a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 21:47:14 +0000 Subject: [PATCH 04/26] chore(deps): bump supabase/postgres from 15.8.1.049 to 15.8.1.053 in /pkg/config/templates (#3303) chore(deps): bump supabase/postgres in /pkg/config/templates Bumps supabase/postgres from 15.8.1.049 to 15.8.1.053. --- updated-dependencies: - dependency-name: supabase/postgres 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 6cd0154a3..639e70f54 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:15.8.1.049 AS pg15 +FROM supabase/postgres:15.8.1.054 AS pg15 # 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 64facde9af8673ecddbf9e4b0a13b41353cda599 Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Sat, 15 Mar 2025 00:01:26 +0100 Subject: [PATCH 05/26] feat: allow deno version in config (#3304) --- pkg/config/config.go | 11 +++++++++++ pkg/config/constants.go | 5 +++-- pkg/config/templates/config.toml | 3 ++- pkg/config/testdata/config.toml | 1 + 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 899deb63f..83eb724cc 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -225,6 +225,7 @@ type ( Policy RequestPolicy `toml:"policy"` InspectorPort uint16 `toml:"inspector_port"` Secrets SecretsConfig `toml:"secrets"` + DenoVersion uint `toml:"deno_version"` } SecretsConfig map[string]Secret @@ -827,6 +828,16 @@ func (c *config) Validate(fsys fs.FS) error { return err } } + switch c.EdgeRuntime.DenoVersion { + case 0: + return errors.New("Missing required field in config: edge_runtime.deno_version") + case 1: + break + case 2: + c.EdgeRuntime.Image = deno2 + default: + return errors.Errorf("Failed reading config: Invalid %s: %v.", "edge_runtime.deno_version", c.EdgeRuntime.DenoVersion) + } // Validate logflare config if c.Analytics.Enabled { if c.Analytics.Backend == LogflareBigQuery { diff --git a/pkg/config/constants.go b/pkg/config/constants.go index 8cee0c392..6e14890d2 100644 --- a/pkg/config/constants.go +++ b/pkg/config/constants.go @@ -9,8 +9,9 @@ import ( ) const ( - pg13 = "supabase/postgres:13.3.0" - pg14 = "supabase/postgres:14.1.0.89" + pg13 = "supabase/postgres:13.3.0" + pg14 = "supabase/postgres:14.1.0.89" + deno2 = "supabase/edge-runtime:v1.68.0-develop.8" ) type images struct { diff --git a/pkg/config/templates/config.toml b/pkg/config/templates/config.toml index ec363cd42..9f48426aa 100644 --- a/pkg/config/templates/config.toml +++ b/pkg/config/templates/config.toml @@ -141,7 +141,6 @@ sign_in_sign_ups = 30 # Number of OTP / Magic link verifications that can be made in a 5 minute interval per IP address. token_verifications = 30 - # Configure one of the supported captcha providers: `hcaptcha`, `turnstile`. # [auth.captcha] # enabled = true @@ -283,6 +282,8 @@ enabled = true policy = "oneshot" # Port to attach the Chrome inspector for debugging edge functions. inspector_port = 8083 +# The Deno major version to use. +deno_version = 1 # [edge_runtime.secrets] # secret_key = "env(SECRET_VALUE)" diff --git a/pkg/config/testdata/config.toml b/pkg/config/testdata/config.toml index bae13a5bd..aa0131ab1 100644 --- a/pkg/config/testdata/config.toml +++ b/pkg/config/testdata/config.toml @@ -259,6 +259,7 @@ enabled = true # Use `oneshot` for hot reload, or `per_worker` for load testing. policy = "per_worker" inspector_port = 8083 +deno_version = 2 [edge_runtime.secrets] test_key = "test_value" From 853bc969cbaa1eb92af183a6e0923720fa422c04 Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Sat, 15 Mar 2025 00:03:02 +0100 Subject: [PATCH 06/26] fix: link password flag override (#3295) --- cmd/link.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/link.go b/cmd/link.go index 65b8b5f08..9ed09fd86 100644 --- a/cmd/link.go +++ b/cmd/link.go @@ -33,6 +33,8 @@ var ( if err := flags.LoadConfig(fsys); err != nil { return err } + // TODO: move this to root cmd + cobra.CheckErr(viper.BindPFlag("DB_PASSWORD", cmd.Flags().Lookup("password"))) return link.Run(ctx, flags.ProjectRef, fsys) }, } @@ -43,6 +45,5 @@ func init() { linkFlags.StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.") linkFlags.StringVarP(&dbPassword, "password", "p", "", "Password to your remote Postgres database.") // For some reason, BindPFlag only works for StringVarP instead of StringP - cobra.CheckErr(viper.BindPFlag("DB_PASSWORD", linkFlags.Lookup("password"))) rootCmd.AddCommand(linkCmd) } From fdfe36cbaa3e5f7603e9af5837053d024fed7bca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 04:12:17 +0000 Subject: [PATCH 07/26] chore(deps): bump github.com/spf13/afero from 1.12.0 to 1.14.0 (#3309) Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.12.0 to 1.14.0. - [Release notes](https://github.com/spf13/afero/releases) - [Commits](https://github.com/spf13/afero/compare/v1.12.0...v1.14.0) --- updated-dependencies: - dependency-name: github.com/spf13/afero dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 3 ++- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 86cf4bff5..3552f5a17 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,7 @@ module github.com/supabase/cli go 1.23.2 +toolchain go1.24.1 require ( github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c @@ -39,7 +40,7 @@ require ( github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 github.com/oapi-codegen/runtime v1.1.1 github.com/slack-go/slack v0.16.0 - github.com/spf13/afero v1.12.0 + github.com/spf13/afero v1.14.0 github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 github.com/spf13/viper v1.19.0 diff --git a/go.sum b/go.sum index 698706465..f0fa9dd01 100644 --- a/go.sum +++ b/go.sum @@ -905,8 +905,8 @@ github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCp github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/speakeasy-api/openapi-overlay v0.9.0 h1:Wrz6NO02cNlLzx1fB093lBlYxSI54VRhy1aSutx0PQg= github.com/speakeasy-api/openapi-overlay v0.9.0/go.mod h1:f5FloQrHA7MsxYg9djzMD5h6dxrHjVVByWKh7an8TRc= -github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs= -github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4= +github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA= +github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo= github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= From bc0db16f3e343a7ec635a95a5bb228d9f322c259 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 05:03:11 +0000 Subject: [PATCH 08/26] chore(deps): bump supabase/realtime from v2.34.41 to v2.34.43 in /pkg/config/templates (#3311) chore(deps): bump supabase/realtime in /pkg/config/templates Bumps supabase/realtime from v2.34.41 to v2.34.43. --- updated-dependencies: - dependency-name: supabase/realtime dependency-type: direct:production ... 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 639e70f54..245e02bc4 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -11,7 +11,7 @@ FROM supabase/edge-runtime:v1.67.2 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.4.13 AS supavisor FROM supabase/gotrue:v2.170.0 AS gotrue -FROM supabase/realtime:v2.34.41 AS realtime +FROM supabase/realtime:v2.34.43 AS realtime FROM supabase/storage-api:v1.19.3 AS storage FROM supabase/logflare:1.12.0 AS logflare # Append to JobImages when adding new dependencies below From acdf6f1767c40075a93a156587fc1bb36a3dc93d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 04:44:53 +0000 Subject: [PATCH 09/26] chore(deps): bump github.com/BurntSushi/toml from 1.4.1-0.20240526193622-a339e1f7089c to 1.5.0 (#3317) chore(deps): bump github.com/BurntSushi/toml Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 1.4.1-0.20240526193622-a339e1f7089c to 1.5.0. - [Release notes](https://github.com/BurntSushi/toml/releases) - [Commits](https://github.com/BurntSushi/toml/commits/v1.5.0) --- updated-dependencies: - dependency-name: github.com/BurntSushi/toml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 3 ++- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3552f5a17..8cac26b0b 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,11 @@ module github.com/supabase/cli go 1.23.2 + toolchain go1.24.1 require ( - github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c + github.com/BurntSushi/toml v1.5.0 github.com/Netflix/go-env v0.1.2 github.com/andybalholm/brotli v1.1.1 github.com/cenkalti/backoff/v4 v4.3.0 diff --git a/go.sum b/go.sum index f0fa9dd01..5c7a74c9e 100644 --- a/go.sum +++ b/go.sum @@ -52,8 +52,8 @@ github.com/Antonboom/testifylint v1.5.2/go.mod h1:vxy8VJ0bc6NavlYqjZfmp6EfqXMtBg github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= +github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Crocmagnon/fatcontext v0.7.1 h1:SC/VIbRRZQeQWj/TcQBS6JmrXcfA+BU4OGSVUt54PjM= github.com/Crocmagnon/fatcontext v0.7.1/go.mod h1:1wMvv3NXEBJucFGfwOJBxSVWcoIO6emV215SMkW9MFU= From d216ca915d76db95e4f51b3fb8e86b710e94cfaa Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Mon, 17 Mar 2025 20:50:55 +0100 Subject: [PATCH 10/26] fix: add slug to bundler interface --- internal/functions/deploy/bundle.go | 3 +-- internal/functions/deploy/bundle_test.go | 2 +- pkg/function/api.go | 2 +- pkg/function/batch.go | 2 +- pkg/function/batch_test.go | 2 +- pkg/function/bundle.go | 3 +-- pkg/function/bundle_test.go | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/internal/functions/deploy/bundle.go b/internal/functions/deploy/bundle.go index c82826bec..c78f3d1c4 100644 --- a/internal/functions/deploy/bundle.go +++ b/internal/functions/deploy/bundle.go @@ -25,9 +25,8 @@ func NewDockerBundler(fsys afero.Fs) function.EszipBundler { return &dockerBundler{fsys: fsys} } -func (b *dockerBundler) Bundle(ctx context.Context, entrypoint string, importMap string, staticFiles []string, output io.Writer) error { +func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) error { // Create temp directory to store generated eszip - slug := filepath.Base(filepath.Dir(entrypoint)) fmt.Fprintln(os.Stderr, "Bundling Function:", utils.Bold(slug)) cwd, err := os.Getwd() if err != nil { diff --git a/internal/functions/deploy/bundle_test.go b/internal/functions/deploy/bundle_test.go index 45b5aedd3..8a14193f2 100644 --- a/internal/functions/deploy/bundle_test.go +++ b/internal/functions/deploy/bundle_test.go @@ -43,7 +43,7 @@ func TestDockerBundle(t *testing.T) { apitest.MockDockerStart(utils.Docker, imageUrl, containerId) require.NoError(t, apitest.MockDockerLogsExitCode(utils.Docker, containerId, 1)) // Run test - err = NewDockerBundler(fsys).Bundle(context.Background(), "", "", []string{}, &body) + err = NewDockerBundler(fsys).Bundle(context.Background(), "", "", "", []string{}, &body) // Check error assert.ErrorContains(t, err, "error running container: exit 1") assert.Empty(t, apitest.ListUnmatchedRequests()) diff --git a/pkg/function/api.go b/pkg/function/api.go index cdf530b55..eb0186b33 100644 --- a/pkg/function/api.go +++ b/pkg/function/api.go @@ -15,7 +15,7 @@ type EdgeRuntimeAPI struct { } type EszipBundler interface { - Bundle(ctx context.Context, entrypoint string, importMap string, staticFiles []string, output io.Writer) error + Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) error } func NewEdgeRuntimeAPI(project string, client api.ClientWithResponses, opts ...withOption) EdgeRuntimeAPI { diff --git a/pkg/function/batch.go b/pkg/function/batch.go index 9c0f82059..a189d88d4 100644 --- a/pkg/function/batch.go +++ b/pkg/function/batch.go @@ -47,7 +47,7 @@ OUTER: } } var body bytes.Buffer - if err := s.eszip.Bundle(ctx, function.Entrypoint, function.ImportMap, function.StaticFiles, &body); err != nil { + if err := s.eszip.Bundle(ctx, slug, function.Entrypoint, function.ImportMap, function.StaticFiles, &body); err != nil { return err } // Update if function already exists diff --git a/pkg/function/batch_test.go b/pkg/function/batch_test.go index f356e74d1..807b2c494 100644 --- a/pkg/function/batch_test.go +++ b/pkg/function/batch_test.go @@ -17,7 +17,7 @@ import ( type MockBundler struct { } -func (b *MockBundler) Bundle(ctx context.Context, entrypoint string, importMap string, staticFiles []string, output io.Writer) error { +func (b *MockBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) error { return nil } diff --git a/pkg/function/bundle.go b/pkg/function/bundle.go index d015624ba..396f07f26 100644 --- a/pkg/function/bundle.go +++ b/pkg/function/bundle.go @@ -28,8 +28,7 @@ func NewNativeBundler(tempDir string, fsys fs.FS) EszipBundler { // Use a package private variable to allow testing without gosec complaining about G204 var edgeRuntimeBin = "edge-runtime" -func (b *nativeBundler) Bundle(ctx context.Context, entrypoint string, importMap string, staticFiles []string, output io.Writer) error { - slug := filepath.Base(filepath.Dir(entrypoint)) +func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) error { outputPath := filepath.Join(b.tempDir, slug+".eszip") // TODO: make edge runtime write to stdout args := []string{"bundle", "--entrypoint", entrypoint, "--output", outputPath} diff --git a/pkg/function/bundle_test.go b/pkg/function/bundle_test.go index b29d3bc87..b85150b19 100644 --- a/pkg/function/bundle_test.go +++ b/pkg/function/bundle_test.go @@ -36,7 +36,7 @@ func TestBundleFunction(t *testing.T) { // Setup mock bundler bundler := nativeBundler{fsys: fsys} // Run test - err := bundler.Bundle(context.Background(), "hello/index.ts", "", nil, &body) + err := bundler.Bundle(context.Background(), "hello", "hello/index.ts", "", nil, &body) // Check error assert.NoError(t, err) assert.Equal(t, compressedEszipMagicID+";", body.String()) From c994c1618cbfb8c33ce9376c19f800e4d10124ce Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Mon, 17 Mar 2025 20:51:06 +0100 Subject: [PATCH 11/26] chore: remove unnecessary filter --- pkg/migration/list.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/migration/list.go b/pkg/migration/list.go index af76430df..afa024a1b 100644 --- a/pkg/migration/list.go +++ b/pkg/migration/list.go @@ -35,9 +35,6 @@ func ListLocalMigrations(migrationsDir string, fsys fs.FS, filter ...func(string if err != nil && !errors.Is(err, os.ErrNotExist) { return nil, errors.Errorf("failed to read directory: %w", err) } - if len(filter) == 0 { - filter = append(filter, func(string) bool { return true }) - } var clean []string OUTER: for i, migration := range localMigrations { From 274173a91f599dfd2f510b1016950a1b37161d61 Mon Sep 17 00:00:00 2001 From: Qiao Han Date: Mon, 17 Mar 2025 22:22:48 +0100 Subject: [PATCH 12/26] fix: return deploy metadata from bundle --- internal/functions/deploy/bundle.go | 21 ++-- internal/functions/deploy/bundle_test.go | 51 ++++++++- pkg/function/api.go | 2 +- pkg/function/batch.go | 131 ++++++++++------------- pkg/function/batch_test.go | 14 ++- pkg/function/bundle.go | 46 +++++++- pkg/function/bundle_test.go | 53 ++++++++- 7 files changed, 225 insertions(+), 93 deletions(-) diff --git a/internal/functions/deploy/bundle.go b/internal/functions/deploy/bundle.go index c78f3d1c4..dc20da5d3 100644 --- a/internal/functions/deploy/bundle.go +++ b/internal/functions/deploy/bundle.go @@ -14,6 +14,7 @@ import ( "github.com/spf13/afero" "github.com/spf13/viper" "github.com/supabase/cli/internal/utils" + "github.com/supabase/cli/pkg/api" "github.com/supabase/cli/pkg/function" ) @@ -25,17 +26,17 @@ func NewDockerBundler(fsys afero.Fs) function.EszipBundler { return &dockerBundler{fsys: fsys} } -func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) error { - // Create temp directory to store generated eszip +func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (api.FunctionDeployMetadata, error) { + meta := function.NewMetadata(slug, entrypoint, importMap, staticFiles) fmt.Fprintln(os.Stderr, "Bundling Function:", utils.Bold(slug)) cwd, err := os.Getwd() if err != nil { - return errors.Errorf("failed to get working directory: %w", err) + return meta, errors.Errorf("failed to get working directory: %w", err) } // BitBucket pipelines require docker bind mounts to be world writable hostOutputDir := filepath.Join(utils.TempDir, fmt.Sprintf(".output_%s", slug)) if err := b.fsys.MkdirAll(hostOutputDir, 0777); err != nil { - return errors.Errorf("failed to mkdir: %w", err) + return meta, errors.Errorf("failed to mkdir: %w", err) } defer func() { if err := b.fsys.RemoveAll(hostOutputDir); err != nil { @@ -45,7 +46,7 @@ func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap // Create bind mounts binds, err := GetBindMounts(cwd, utils.FunctionsDir, hostOutputDir, entrypoint, importMap, b.fsys) if err != nil { - return err + return meta, err } hostOutputPath := filepath.Join(hostOutputDir, "output.eszip") // Create exec command @@ -53,8 +54,8 @@ func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap if len(importMap) > 0 { cmd = append(cmd, "--import-map", utils.ToDockerPath(importMap)) } - for _, staticFile := range staticFiles { - cmd = append(cmd, "--static", utils.ToDockerPath(staticFile)) + for _, sf := range staticFiles { + cmd = append(cmd, "--static", utils.ToDockerPath(sf)) } if viper.GetBool("DEBUG") { cmd = append(cmd, "--verbose") @@ -81,15 +82,15 @@ func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap os.Stdout, os.Stderr, ); err != nil { - return err + return meta, err } // Read and compress eszipBytes, err := b.fsys.Open(hostOutputPath) if err != nil { - return errors.Errorf("failed to open eszip: %w", err) + return meta, errors.Errorf("failed to open eszip: %w", err) } defer eszipBytes.Close() - return function.Compress(eszipBytes, output) + return meta, function.Compress(eszipBytes, output) } func GetBindMounts(cwd, hostFuncDir, hostOutputDir, hostEntrypointPath, hostImportMapPath string, fsys afero.Fs) ([]string, error) { diff --git a/internal/functions/deploy/bundle_test.go b/internal/functions/deploy/bundle_test.go index 8a14193f2..7e436a2ed 100644 --- a/internal/functions/deploy/bundle_test.go +++ b/internal/functions/deploy/bundle_test.go @@ -4,7 +4,10 @@ import ( "archive/zip" "bytes" "context" + "fmt" "net/http" + "os" + "path/filepath" "testing" "github.com/h2non/gock" @@ -13,16 +16,21 @@ import ( "github.com/stretchr/testify/require" "github.com/supabase/cli/internal/testing/apitest" "github.com/supabase/cli/internal/utils" + "github.com/supabase/cli/pkg/cast" ) func TestDockerBundle(t *testing.T) { imageUrl := utils.GetRegistryImageUrl(utils.Config.EdgeRuntime.Image) utils.EdgeRuntimeId = "test-edge-runtime" const containerId = "test-container" + cwd, err := os.Getwd() + require.NoError(t, err) t.Run("throws error on bundle failure", func(t *testing.T) { // Setup in-memory fs fsys := afero.NewMemMapFs() + absImportMap := filepath.Join(cwd, "hello", "deno.json") + require.NoError(t, utils.WriteFile(absImportMap, []byte("{}"), fsys)) // Setup deno error t.Setenv("TEST_DENO_ERROR", "bundle failed") var body bytes.Buffer @@ -42,10 +50,51 @@ func TestDockerBundle(t *testing.T) { require.NoError(t, apitest.MockDocker(utils.Docker)) apitest.MockDockerStart(utils.Docker, imageUrl, containerId) require.NoError(t, apitest.MockDockerLogsExitCode(utils.Docker, containerId, 1)) + // Setup mock bundler + bundler := NewDockerBundler(fsys) // Run test - err = NewDockerBundler(fsys).Bundle(context.Background(), "", "", "", []string{}, &body) + meta, err := bundler.Bundle( + context.Background(), + "hello", + filepath.Join("hello", "index.ts"), + filepath.Join("hello", "deno.json"), + []string{filepath.Join("hello", "data.pdf")}, + &body, + ) // Check error assert.ErrorContains(t, err, "error running container: exit 1") assert.Empty(t, apitest.ListUnmatchedRequests()) + assert.Equal(t, cast.Ptr("hello"), meta.Name) + entrypoint := fmt.Sprintf("file://%s/hello/index.ts", filepath.ToSlash(cwd)) + assert.Equal(t, entrypoint, meta.EntrypointPath) + importMap := fmt.Sprintf("file://%s/hello/deno.json", filepath.ToSlash(cwd)) + assert.Equal(t, &importMap, meta.ImportMapPath) + staticFile := fmt.Sprintf("file://%s/hello/data.pdf", filepath.ToSlash(cwd)) + assert.Equal(t, cast.Ptr([]string{staticFile}), meta.StaticPatterns) + assert.Nil(t, meta.VerifyJwt) + }) + + t.Run("throws error on permission denied", func(t *testing.T) { + // Setup in-memory fs + fsys := afero.NewReadOnlyFs(afero.NewMemMapFs()) + // Setup mock bundler + bundler := NewDockerBundler(fsys) + // Run test + meta, err := bundler.Bundle( + context.Background(), + "hello", + "hello/index.ts", + "", + nil, + nil, + ) + // Check error + assert.ErrorIs(t, err, os.ErrPermission) + assert.Equal(t, cast.Ptr("hello"), meta.Name) + entrypoint := fmt.Sprintf("file://%s/hello/index.ts", filepath.ToSlash(cwd)) + assert.Equal(t, entrypoint, meta.EntrypointPath) + assert.Nil(t, meta.ImportMapPath) + assert.NotNil(t, meta.StaticPatterns) + assert.Nil(t, meta.VerifyJwt) }) } diff --git a/pkg/function/api.go b/pkg/function/api.go index eb0186b33..1070744e4 100644 --- a/pkg/function/api.go +++ b/pkg/function/api.go @@ -15,7 +15,7 @@ type EdgeRuntimeAPI struct { } type EszipBundler interface { - Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) error + Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (api.FunctionDeployMetadata, error) } func NewEdgeRuntimeAPI(project string, client api.ClientWithResponses, opts ...withOption) EdgeRuntimeAPI { diff --git a/pkg/function/batch.go b/pkg/function/batch.go index a189d88d4..ada209519 100644 --- a/pkg/function/batch.go +++ b/pkg/function/batch.go @@ -4,10 +4,8 @@ import ( "bytes" "context" "fmt" - "net/url" + "io" "os" - "path/filepath" - "strings" "github.com/cenkalti/backoff/v4" "github.com/docker/go-units" @@ -26,7 +24,7 @@ func (s *EdgeRuntimeAPI) UpsertFunctions(ctx context.Context, functionConfig con if resp, err := s.client.V1ListAllFunctionsWithResponse(ctx, s.project); err != nil { return errors.Errorf("failed to list functions: %w", err) } else if resp.JSON200 == nil { - return errors.Errorf("unexpected status %d: %s", resp.StatusCode(), string(resp.Body)) + return errors.Errorf("unexpected list functions status %d: %s", resp.StatusCode(), string(resp.Body)) } else { result = *resp.JSON200 } @@ -34,7 +32,7 @@ func (s *EdgeRuntimeAPI) UpsertFunctions(ctx context.Context, functionConfig con for _, f := range result { exists[f.Slug] = struct{}{} } - toUpdate := map[string]api.BulkUpdateFunctionBody{} + var toUpdate []api.BulkUpdateFunctionBody OUTER: for slug, function := range functionConfig { if !function.Enabled { @@ -47,75 +45,29 @@ OUTER: } } var body bytes.Buffer - if err := s.eszip.Bundle(ctx, slug, function.Entrypoint, function.ImportMap, function.StaticFiles, &body); err != nil { + meta, err := s.eszip.Bundle(ctx, slug, function.Entrypoint, function.ImportMap, function.StaticFiles, &body) + if err != nil { return err } + meta.VerifyJwt = &function.VerifyJWT // Update if function already exists - upsert := func() error { + upsert := func() (api.BulkUpdateFunctionBody, error) { if _, ok := exists[slug]; ok { - resp, err := s.client.V1UpdateAFunctionWithBodyWithResponse(ctx, s.project, slug, &api.V1UpdateAFunctionParams{ - VerifyJwt: &function.VerifyJWT, - ImportMapPath: toFileURL(function.ImportMap), - EntrypointPath: toFileURL(function.Entrypoint), - }, eszipContentType, bytes.NewReader(body.Bytes())) - if err != nil { - return errors.Errorf("failed to update function: %w", err) - } else if resp.JSON200 == nil { - return errors.Errorf("unexpected status %d: %s", resp.StatusCode(), string(resp.Body)) - } - toUpdate[slug] = api.BulkUpdateFunctionBody{ - Id: resp.JSON200.Id, - Name: resp.JSON200.Name, - Slug: resp.JSON200.Slug, - Version: resp.JSON200.Version, - EntrypointPath: resp.JSON200.EntrypointPath, - ImportMap: resp.JSON200.ImportMap, - ImportMapPath: resp.JSON200.ImportMapPath, - VerifyJwt: resp.JSON200.VerifyJwt, - Status: api.BulkUpdateFunctionBodyStatus(resp.JSON200.Status), - CreatedAt: &resp.JSON200.CreatedAt, - } - } else { - resp, err := s.client.V1CreateAFunctionWithBodyWithResponse(ctx, s.project, &api.V1CreateAFunctionParams{ - Slug: &slug, - Name: &slug, - VerifyJwt: &function.VerifyJWT, - ImportMapPath: toFileURL(function.ImportMap), - EntrypointPath: toFileURL(function.Entrypoint), - }, eszipContentType, bytes.NewReader(body.Bytes())) - if err != nil { - return errors.Errorf("failed to create function: %w", err) - } else if resp.JSON201 == nil { - return errors.Errorf("unexpected status %d: %s", resp.StatusCode(), string(resp.Body)) - } - toUpdate[slug] = api.BulkUpdateFunctionBody{ - Id: resp.JSON201.Id, - Name: resp.JSON201.Name, - Slug: resp.JSON201.Slug, - Version: resp.JSON201.Version, - EntrypointPath: resp.JSON201.EntrypointPath, - ImportMap: resp.JSON201.ImportMap, - ImportMapPath: resp.JSON201.ImportMapPath, - VerifyJwt: resp.JSON201.VerifyJwt, - Status: api.BulkUpdateFunctionBodyStatus(resp.JSON201.Status), - CreatedAt: &resp.JSON201.CreatedAt, - } + return s.updateFunction(ctx, slug, meta, bytes.NewReader(body.Bytes())) } - return nil + return s.createFunction(ctx, slug, meta, bytes.NewReader(body.Bytes())) } functionSize := units.HumanSize(float64(body.Len())) fmt.Fprintf(os.Stderr, "Deploying Function: %s (script size: %s)\n", slug, functionSize) policy := backoff.WithContext(backoff.WithMaxRetries(backoff.NewExponentialBackOff(), maxRetries), ctx) - if err := backoff.Retry(upsert, policy); err != nil { + result, err := backoff.RetryWithData(upsert, policy) + if err != nil { return err } + toUpdate = append(toUpdate, result) } if len(toUpdate) > 1 { - var body []api.BulkUpdateFunctionBody - for _, b := range toUpdate { - body = append(body, b) - } - if resp, err := s.client.V1BulkUpdateFunctionsWithResponse(ctx, s.project, body); err != nil { + if resp, err := s.client.V1BulkUpdateFunctionsWithResponse(ctx, s.project, toUpdate); err != nil { return errors.Errorf("failed to bulk update: %w", err) } else if resp.JSON200 == nil { return errors.Errorf("unexpected bulk update status %d: %s", resp.StatusCode(), string(resp.Body)) @@ -124,19 +76,54 @@ OUTER: return nil } -func toFileURL(hostPath string) *string { - absHostPath, err := filepath.Abs(hostPath) +func (s *EdgeRuntimeAPI) updateFunction(ctx context.Context, slug string, meta api.FunctionDeployMetadata, body io.Reader) (api.BulkUpdateFunctionBody, error) { + resp, err := s.client.V1UpdateAFunctionWithBodyWithResponse(ctx, s.project, slug, &api.V1UpdateAFunctionParams{ + VerifyJwt: meta.VerifyJwt, + ImportMapPath: meta.ImportMapPath, + EntrypointPath: &meta.EntrypointPath, + }, eszipContentType, body) if err != nil { - return nil + return api.BulkUpdateFunctionBody{}, errors.Errorf("failed to update function: %w", err) + } else if resp.JSON200 == nil { + return api.BulkUpdateFunctionBody{}, errors.Errorf("unexpected update function status %d: %s", resp.StatusCode(), string(resp.Body)) } - // Convert to unix path because edge runtime only supports linux - parsed := url.URL{Scheme: "file", Path: toUnixPath(absHostPath)} - result := parsed.String() - return &result + return api.BulkUpdateFunctionBody{ + Id: resp.JSON200.Id, + Name: resp.JSON200.Name, + Slug: resp.JSON200.Slug, + Version: resp.JSON200.Version, + EntrypointPath: resp.JSON200.EntrypointPath, + ImportMap: resp.JSON200.ImportMap, + ImportMapPath: resp.JSON200.ImportMapPath, + VerifyJwt: resp.JSON200.VerifyJwt, + Status: api.BulkUpdateFunctionBodyStatus(resp.JSON200.Status), + CreatedAt: &resp.JSON200.CreatedAt, + }, nil } -func toUnixPath(absHostPath string) string { - prefix := filepath.VolumeName(absHostPath) - unixPath := filepath.ToSlash(absHostPath) - return strings.TrimPrefix(unixPath, prefix) +func (s *EdgeRuntimeAPI) createFunction(ctx context.Context, slug string, meta api.FunctionDeployMetadata, body io.Reader) (api.BulkUpdateFunctionBody, error) { + resp, err := s.client.V1CreateAFunctionWithBodyWithResponse(ctx, s.project, &api.V1CreateAFunctionParams{ + Slug: &slug, + Name: &slug, + VerifyJwt: meta.VerifyJwt, + ImportMapPath: meta.ImportMapPath, + EntrypointPath: &meta.EntrypointPath, + }, eszipContentType, body) + if err != nil { + return api.BulkUpdateFunctionBody{}, errors.Errorf("failed to create function: %w", err) + } else if resp.JSON201 == nil { + return api.BulkUpdateFunctionBody{}, errors.Errorf("unexpected create function status %d: %s", resp.StatusCode(), string(resp.Body)) + } + return api.BulkUpdateFunctionBody{ + Id: resp.JSON201.Id, + Name: resp.JSON201.Name, + Slug: resp.JSON201.Slug, + Version: resp.JSON201.Version, + EntrypointPath: resp.JSON201.EntrypointPath, + ImportMap: resp.JSON201.ImportMap, + ImportMapPath: resp.JSON201.ImportMapPath, + VerifyJwt: resp.JSON201.VerifyJwt, + Status: api.BulkUpdateFunctionBodyStatus(resp.JSON201.Status), + CreatedAt: &resp.JSON201.CreatedAt, + }, nil } diff --git a/pkg/function/batch_test.go b/pkg/function/batch_test.go index 807b2c494..f92bbf335 100644 --- a/pkg/function/batch_test.go +++ b/pkg/function/batch_test.go @@ -17,8 +17,16 @@ import ( type MockBundler struct { } -func (b *MockBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) error { - return nil +func (b *MockBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (api.FunctionDeployMetadata, error) { + if staticFiles == nil { + staticFiles = []string{} + } + return api.FunctionDeployMetadata{ + Name: &slug, + EntrypointPath: entrypoint, + ImportMapPath: &importMap, + StaticPatterns: &staticFiles, + }, nil } const ( @@ -54,7 +62,7 @@ func TestUpsertFunctions(t *testing.T) { // Run test err := client.UpsertFunctions(context.Background(), nil) // Check error - assert.ErrorContains(t, err, "unexpected status 503:") + assert.ErrorContains(t, err, "unexpected list functions status 503:") }) t.Run("retries on create failure", func(t *testing.T) { diff --git a/pkg/function/bundle.go b/pkg/function/bundle.go index 396f07f26..486bd4be6 100644 --- a/pkg/function/bundle.go +++ b/pkg/function/bundle.go @@ -5,12 +5,16 @@ import ( "fmt" "io" "io/fs" + "net/url" "os" "os/exec" "path/filepath" + "strings" "github.com/andybalholm/brotli" "github.com/go-errors/errors" + "github.com/supabase/cli/pkg/api" + "github.com/supabase/cli/pkg/cast" ) type nativeBundler struct { @@ -28,7 +32,8 @@ func NewNativeBundler(tempDir string, fsys fs.FS) EszipBundler { // Use a package private variable to allow testing without gosec complaining about G204 var edgeRuntimeBin = "edge-runtime" -func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) error { +func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (api.FunctionDeployMetadata, error) { + meta := NewMetadata(slug, entrypoint, importMap, staticFiles) outputPath := filepath.Join(b.tempDir, slug+".eszip") // TODO: make edge runtime write to stdout args := []string{"bundle", "--entrypoint", entrypoint, "--output", outputPath} @@ -42,16 +47,16 @@ func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap cmd.Stderr = os.Stderr cmd.Stdout = os.Stdout if err := cmd.Run(); err != nil { - return errors.Errorf("failed to bundle function: %w", err) + return meta, errors.Errorf("failed to bundle function: %w", err) } defer os.Remove(outputPath) // Compress the output eszipBytes, err := b.fsys.Open(outputPath) if err != nil { - return errors.Errorf("failed to open eszip: %w", err) + return meta, errors.Errorf("failed to open eszip: %w", err) } defer eszipBytes.Close() - return Compress(eszipBytes, output) + return meta, Compress(eszipBytes, output) } const compressedEszipMagicID = "EZBR" @@ -67,3 +72,36 @@ func Compress(r io.Reader, w io.Writer) error { } return nil } + +func NewMetadata(slug, entrypoint, importMap string, staticFiles []string) api.FunctionDeployMetadata { + meta := api.FunctionDeployMetadata{ + Name: &slug, + EntrypointPath: toFileURL(entrypoint), + } + if len(importMap) > 0 { + meta.ImportMapPath = cast.Ptr(toFileURL(importMap)) + } + files := make([]string, len(staticFiles)) + for i, sf := range staticFiles { + files[i] = toFileURL(sf) + } + meta.StaticPatterns = &files + return meta +} + +func toFileURL(hostPath string) string { + absHostPath, err := filepath.Abs(hostPath) + if err != nil { + return hostPath + } + // Convert to unix path because edge runtime only supports linux + unixPath := toUnixPath(absHostPath) + parsed := url.URL{Scheme: "file", Path: unixPath} + return parsed.String() +} + +func toUnixPath(absHostPath string) string { + prefix := filepath.VolumeName(absHostPath) + unixPath := filepath.ToSlash(absHostPath) + return strings.TrimPrefix(unixPath, prefix) +} diff --git a/pkg/function/bundle_test.go b/pkg/function/bundle_test.go index b85150b19..1f16b87f4 100644 --- a/pkg/function/bundle_test.go +++ b/pkg/function/bundle_test.go @@ -5,10 +5,13 @@ import ( "context" "fmt" "os" + "path/filepath" "testing" fs "testing/fstest" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/supabase/cli/pkg/cast" ) func TestMain(m *testing.M) { @@ -25,7 +28,10 @@ func TestMain(m *testing.M) { } func TestBundleFunction(t *testing.T) { - edgeRuntimeBin, _ = os.Executable() + cwd, err := os.Getwd() + require.NoError(t, err) + edgeRuntimeBin, err = os.Executable() + require.NoError(t, err) t.Run("creates eszip bundle", func(t *testing.T) { var body bytes.Buffer @@ -36,9 +42,52 @@ func TestBundleFunction(t *testing.T) { // Setup mock bundler bundler := nativeBundler{fsys: fsys} // Run test - err := bundler.Bundle(context.Background(), "hello", "hello/index.ts", "", nil, &body) + meta, err := bundler.Bundle( + context.Background(), + "hello", + "hello/index.ts", + "hello/deno.json", + []string{"hello/data.pdf"}, + &body, + ) // Check error assert.NoError(t, err) assert.Equal(t, compressedEszipMagicID+";", body.String()) + assert.Equal(t, cast.Ptr("hello"), meta.Name) + entrypoint := fmt.Sprintf("file://%s/hello/index.ts", filepath.ToSlash(cwd)) + assert.Equal(t, entrypoint, meta.EntrypointPath) + importMap := fmt.Sprintf("file://%s/hello/deno.json", filepath.ToSlash(cwd)) + assert.Equal(t, &importMap, meta.ImportMapPath) + staticFile := fmt.Sprintf("file://%s/hello/data.pdf", filepath.ToSlash(cwd)) + assert.Equal(t, cast.Ptr([]string{staticFile}), meta.StaticPatterns) + assert.Nil(t, meta.VerifyJwt) + }) + + t.Run("ignores empty value", func(t *testing.T) { + var body bytes.Buffer + // Setup in-memory fs + fsys := fs.MapFS{ + "hello.eszip": &fs.MapFile{}, + } + // Setup mock bundler + bundler := nativeBundler{fsys: fsys} + // Run test + meta, err := bundler.Bundle( + context.Background(), + "hello", + "hello/index.ts", + "", + nil, + &body, + ) + // Check error + assert.NoError(t, err) + assert.Equal(t, compressedEszipMagicID+";", body.String()) + assert.Equal(t, cast.Ptr("hello"), meta.Name) + entrypoint := fmt.Sprintf("file://%s/hello/index.ts", filepath.ToSlash(cwd)) + assert.Equal(t, entrypoint, meta.EntrypointPath) + assert.Nil(t, meta.ImportMapPath) + assert.NotNil(t, meta.StaticPatterns) + assert.Nil(t, meta.VerifyJwt) }) } From 10a2cbb889553ed7b5f14f8e0d4d147beab43e92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 05:04:06 +0000 Subject: [PATCH 13/26] chore(deps): bump supabase/studio in /pkg/config/templates Bumps supabase/studio from 20250224-d10db0f to 20250317-6955350. --- updated-dependencies: - dependency-name: supabase/studio dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- 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 245e02bc4..013c6bd24 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -5,7 +5,7 @@ FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit FROM postgrest/postgrest:v12.2.8 AS postgrest FROM supabase/postgres-meta:v0.86.1 AS pgmeta -FROM supabase/studio:20250224-d10db0f AS studio +FROM supabase/studio:20250317-6955350 AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.67.2 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector From c5d40f7b84d4282eca133d784c1e466f3a5cd5db Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Wed, 19 Mar 2025 00:52:40 +0100 Subject: [PATCH 14/26] fix: update docker id before db pull (#3320) --- internal/utils/flags/db_url.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/utils/flags/db_url.go b/internal/utils/flags/db_url.go index 04565939d..2a9134c6b 100644 --- a/internal/utils/flags/db_url.go +++ b/internal/utils/flags/db_url.go @@ -50,7 +50,7 @@ func ParseDatabaseConfig(flagSet *pflag.FlagSet, fsys afero.Fs) error { // Update connection config switch connType { case direct: - if err := utils.Config.Load("", utils.NewRootFS(fsys)); err != nil && !errors.Is(err, os.ErrNotExist) { + if err := LoadConfig(fsys); err != nil { return err } if flag := flagSet.Lookup("db-url"); flag != nil { From cf503a466b9b86f2645abacfbf3537ed7554b47c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 04:46:08 +0000 Subject: [PATCH 15/26] chore(deps): bump github.com/golangci/golangci-lint from 1.64.7 to 1.64.8 (#3321) chore(deps): bump github.com/golangci/golangci-lint Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.64.7 to 1.64.8. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/main/CHANGELOG.md) - [Commits](https://github.com/golangci/golangci-lint/compare/v1.64.7...v1.64.8) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint 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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8cac26b0b..061f71799 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/go-git/go-git/v5 v5.14.0 github.com/go-xmlfmt/xmlfmt v1.1.3 github.com/golang-jwt/jwt/v5 v5.2.1 - github.com/golangci/golangci-lint v1.64.7 + github.com/golangci/golangci-lint v1.64.8 github.com/google/go-github/v62 v62.0.0 github.com/google/go-querystring v1.1.0 github.com/google/uuid v1.6.0 diff --git a/go.sum b/go.sum index 5c7a74c9e..9daae873c 100644 --- a/go.sum +++ b/go.sum @@ -410,8 +410,8 @@ github.com/golangci/go-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUP github.com/golangci/go-printf-func-name v0.1.0/go.mod h1:wqhWFH5mUdJQhweRnldEywnR5021wTdZSNgwYceV14s= github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE= github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY= -github.com/golangci/golangci-lint v1.64.7 h1:Xk1EyxoXqZabn5b4vnjNKSjCx1whBK53NP+mzLfX7HA= -github.com/golangci/golangci-lint v1.64.7/go.mod h1:5cEsUQBSr6zi8XI8OjmcY2Xmliqc4iYL7YoPrL+zLJ4= +github.com/golangci/golangci-lint v1.64.8 h1:y5TdeVidMtBGG32zgSC7ZXTFNHrsJkDnpO4ItB3Am+I= +github.com/golangci/golangci-lint v1.64.8/go.mod h1:5cEsUQBSr6zi8XI8OjmcY2Xmliqc4iYL7YoPrL+zLJ4= github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs= github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c= From dfa3dd3896dee547e85614c848ada0f30ebe8baf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 04:59:10 +0000 Subject: [PATCH 16/26] chore(deps): bump supabase/postgres from 15.8.1.054 to 15.8.1.056 in /pkg/config/templates (#3323) chore(deps): bump supabase/postgres in /pkg/config/templates Bumps supabase/postgres from 15.8.1.054 to 15.8.1.056. --- updated-dependencies: - dependency-name: supabase/postgres 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 013c6bd24..5db805781 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:15.8.1.054 AS pg15 +FROM supabase/postgres:15.8.1.056 AS pg15 # 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 742eba18eb48bccf5110fa851cbb169e3d5f245f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 05:04:02 +0000 Subject: [PATCH 17/26] chore(deps): bump supabase/supavisor from 2.4.13 to 2.4.14 in /pkg/config/templates (#3316) chore(deps): bump supabase/supavisor in /pkg/config/templates Bumps supabase/supavisor from 2.4.13 to 2.4.14. --- updated-dependencies: - dependency-name: supabase/supavisor 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 5db805781..40b1313ac 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -9,7 +9,7 @@ FROM supabase/studio:20250317-6955350 AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.67.2 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector -FROM supabase/supavisor:2.4.13 AS supavisor +FROM supabase/supavisor:2.4.14 AS supavisor FROM supabase/gotrue:v2.170.0 AS gotrue FROM supabase/realtime:v2.34.43 AS realtime FROM supabase/storage-api:v1.19.3 AS storage From f7a7ec79eec3438bad84c5ff9095fb9d6f6bfa07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 04:34:07 +0000 Subject: [PATCH 18/26] chore(deps): bump supabase/postgres-meta from v0.86.1 to v0.87.1 in /pkg/config/templates (#3328) chore(deps): bump supabase/postgres-meta in /pkg/config/templates Bumps supabase/postgres-meta from v0.86.1 to v0.87.1. --- updated-dependencies: - dependency-name: supabase/postgres-meta dependency-type: direct:production ... 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 40b1313ac..296d6ad0a 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -4,7 +4,7 @@ FROM supabase/postgres:15.8.1.056 AS pg15 FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit FROM postgrest/postgrest:v12.2.8 AS postgrest -FROM supabase/postgres-meta:v0.86.1 AS pgmeta +FROM supabase/postgres-meta:v0.87.1 AS pgmeta FROM supabase/studio:20250317-6955350 AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.67.2 AS edgeruntime From 9366a17594597e92891d86aff8a9ee3cbafeb163 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 04:48:09 +0000 Subject: [PATCH 19/26] chore(deps): bump github.com/docker/cli from 28.0.1+incompatible to 28.0.2+incompatible (#3330) chore(deps): bump github.com/docker/cli Bumps [github.com/docker/cli](https://github.com/docker/cli) from 28.0.1+incompatible to 28.0.2+incompatible. - [Commits](https://github.com/docker/cli/compare/v28.0.1...v28.0.2) --- updated-dependencies: - dependency-name: github.com/docker/cli 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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 061f71799..9d31159e6 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/charmbracelet/glamour v0.7.0 github.com/charmbracelet/lipgloss v0.12.1 github.com/containers/common v0.62.2 - github.com/docker/cli v28.0.1+incompatible + github.com/docker/cli v28.0.2+incompatible github.com/docker/docker v28.0.1+incompatible github.com/docker/go-connections v0.5.0 github.com/docker/go-units v0.5.0 diff --git a/go.sum b/go.sum index 9daae873c..e61f75e7c 100644 --- a/go.sum +++ b/go.sum @@ -226,8 +226,8 @@ github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxK github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= -github.com/docker/cli v28.0.1+incompatible h1:g0h5NQNda3/CxIsaZfH4Tyf6vpxFth7PYl3hgCPOKzs= -github.com/docker/cli v28.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v28.0.2+incompatible h1:cRPZ77FK3/IXTAIQQj1vmhlxiLS5m+MIUDwS6f57lrE= +github.com/docker/cli v28.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= From cc3f2f1b937a376e127a367e18b2793f631f26eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 04:43:03 +0000 Subject: [PATCH 20/26] chore(deps): bump github.com/docker/docker from 28.0.1+incompatible to 28.0.2+incompatible (#3331) chore(deps): bump github.com/docker/docker Bumps [github.com/docker/docker](https://github.com/docker/docker) from 28.0.1+incompatible to 28.0.2+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v28.0.1...v28.0.2) --- updated-dependencies: - dependency-name: github.com/docker/docker 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> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9d31159e6..3e038a4ab 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/charmbracelet/lipgloss v0.12.1 github.com/containers/common v0.62.2 github.com/docker/cli v28.0.2+incompatible - github.com/docker/docker v28.0.1+incompatible + github.com/docker/docker v28.0.2+incompatible github.com/docker/go-connections v0.5.0 github.com/docker/go-units v0.5.0 github.com/ecies/go/v2 v2.0.10 diff --git a/go.sum b/go.sum index e61f75e7c..c83c76a4a 100644 --- a/go.sum +++ b/go.sum @@ -231,8 +231,8 @@ github.com/docker/cli v28.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvM github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0= -github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.0.2+incompatible h1:9BILleFwug5FSSqWBgVevgL3ewDJfWWWyZVqlDMttE8= +github.com/docker/docker v28.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= From 5a1c3cb888771e1eebe562a1c64451e533fe1930 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 04:54:41 +0000 Subject: [PATCH 21/26] chore(deps): bump supabase/postgres from 15.8.1.056 to 15.8.1.058 in /pkg/config/templates (#3332) chore(deps): bump supabase/postgres in /pkg/config/templates Bumps supabase/postgres from 15.8.1.056 to 15.8.1.058. --- updated-dependencies: - dependency-name: supabase/postgres 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 296d6ad0a..83549aecd 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:15.8.1.056 AS pg15 +FROM supabase/postgres:15.8.1.058 AS pg15 # 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 e8d1ae970550125d3efe7c53e8287de07fe2cc69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 22:15:49 +0000 Subject: [PATCH 22/26] chore(deps): bump github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2 (#3335) Bumps [github.com/golang-jwt/jwt/v5](https://github.com/golang-jwt/jwt) from 5.2.1 to 5.2.2. - [Release notes](https://github.com/golang-jwt/jwt/releases) - [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md) - [Commits](https://github.com/golang-jwt/jwt/compare/v5.2.1...v5.2.2) --- updated-dependencies: - dependency-name: github.com/golang-jwt/jwt/v5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3e038a4ab..4531caa13 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/go-errors/errors v1.5.1 github.com/go-git/go-git/v5 v5.14.0 github.com/go-xmlfmt/xmlfmt v1.1.3 - github.com/golang-jwt/jwt/v5 v5.2.1 + github.com/golang-jwt/jwt/v5 v5.2.2 github.com/golangci/golangci-lint v1.64.8 github.com/google/go-github/v62 v62.0.0 github.com/google/go-querystring v1.1.0 diff --git a/go.sum b/go.sum index c83c76a4a..715c72d57 100644 --- a/go.sum +++ b/go.sum @@ -370,8 +370,8 @@ github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= -github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= +github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= From 8b1b1986efd65f94c11d6ca923c3f36b7b4de9c3 Mon Sep 17 00:00:00 2001 From: Andy Fleming <721038+andyfleming@users.noreply.github.com> Date: Sat, 22 Mar 2025 01:33:36 -0700 Subject: [PATCH 23/26] chore(docs): Remove v1 from title (#3336) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7da7ff569..8fb5d7a31 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Supabase CLI (v1) +# Supabase CLI [![Coverage Status](https://coveralls.io/repos/github/supabase/cli/badge.svg?branch=main)](https://coveralls.io/github/supabase/cli?branch=main) [![Bitbucket Pipelines](https://img.shields.io/bitbucket/pipelines/supabase-cli/setup-cli/master?style=flat-square&label=Bitbucket%20Canary)](https://bitbucket.org/supabase-cli/setup-cli/pipelines) [![Gitlab Pipeline Status](https://img.shields.io/gitlab/pipeline-status/sweatybridge%2Fsetup-cli?label=Gitlab%20Canary) ](https://gitlab.com/sweatybridge/setup-cli/-/pipelines) From 418caee001449f782a775b0f13af09b25dd581da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 05:01:04 +0000 Subject: [PATCH 24/26] chore(deps): bump supabase/edge-runtime from v1.67.2 to v1.67.3 in /pkg/config/templates (#3345) chore(deps): bump supabase/edge-runtime in /pkg/config/templates Bumps supabase/edge-runtime from v1.67.2 to v1.67.3. --- updated-dependencies: - dependency-name: supabase/edge-runtime dependency-type: direct:production ... 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 83549aecd..2d55e7746 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -7,7 +7,7 @@ FROM postgrest/postgrest:v12.2.8 AS postgrest FROM supabase/postgres-meta:v0.87.1 AS pgmeta FROM supabase/studio:20250317-6955350 AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy -FROM supabase/edge-runtime:v1.67.2 AS edgeruntime +FROM supabase/edge-runtime:v1.67.3 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.4.14 AS supavisor FROM supabase/gotrue:v2.170.0 AS gotrue From e96998fcbb7c201935635e4f3a2fdb40e79fc018 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 05:01:19 +0000 Subject: [PATCH 25/26] chore(deps): bump supabase/edge-runtime from v1.67.3 to v1.67.4 in /pkg/config/templates (#3349) chore(deps): bump supabase/edge-runtime in /pkg/config/templates Bumps supabase/edge-runtime from v1.67.3 to v1.67.4. --- updated-dependencies: - dependency-name: supabase/edge-runtime dependency-type: direct:production ... 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 2d55e7746..771cd8c10 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -7,7 +7,7 @@ FROM postgrest/postgrest:v12.2.8 AS postgrest FROM supabase/postgres-meta:v0.87.1 AS pgmeta FROM supabase/studio:20250317-6955350 AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy -FROM supabase/edge-runtime:v1.67.3 AS edgeruntime +FROM supabase/edge-runtime:v1.67.4 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.4.14 AS supavisor FROM supabase/gotrue:v2.170.0 AS gotrue From c8778df168f1ef2bf4a4653c9eeeb788d09f40d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 05:06:00 +0000 Subject: [PATCH 26/26] chore(deps): bump supabase/postgres from 15.8.1.058 to 15.8.1.060 in /pkg/config/templates (#3348) chore(deps): bump supabase/postgres in /pkg/config/templates Bumps supabase/postgres from 15.8.1.058 to 15.8.1.060. --- updated-dependencies: - dependency-name: supabase/postgres 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 771cd8c10..8cbbea5c7 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:15.8.1.058 AS pg15 +FROM supabase/postgres:15.8.1.060 AS pg15 # Append to ServiceImages when adding new dependencies below FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit