diff --git a/internal/gen/types/typescript/typescript.go b/internal/gen/types/typescript/typescript.go index f6ee86756..4bfc179d0 100644 --- a/internal/gen/types/typescript/typescript.go +++ b/internal/gen/types/typescript/typescript.go @@ -53,7 +53,7 @@ func Run(ctx context.Context, useLocal bool, useLinked bool, projectId string, d return errors.Errorf("URL is not a valid Supabase connection string: %w", err) } escaped := fmt.Sprintf( - "postgresql://%s@%s:%d/%s", + "postgresql://%s@%s:%d/%s?sslmode=prefer", url.UserPassword(config.User, config.Password), config.Host, config.Port, @@ -67,7 +67,6 @@ func Run(ctx context.Context, useLocal bool, useLinked bool, projectId string, d Image: utils.PgmetaImage, Env: []string{ "PG_META_DB_URL=" + escaped, - "PG_META_DB_SSL_MODE=prefer", "PG_META_GENERATE_TYPES=typescript", "PG_META_GENERATE_TYPES_INCLUDED_SCHEMAS=" + included, fmt.Sprintf("PG_META_GENERATE_TYPES_DETECT_ONE_TO_ONE_RELATIONSHIPS=%v", !postgrestV9Compat), diff --git a/internal/start/start.go b/internal/start/start.go index f8e5b9330..9263a0b22 100644 --- a/internal/start/start.go +++ b/internal/start/start.go @@ -805,7 +805,7 @@ EOF "PG_META_DB_PASSWORD=" + dbConfig.Password, }, Healthcheck: &container.HealthConfig{ - Test: []string{"CMD", "node", "-e", "require('http').get('http://127.0.0.1:8080/health', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"}, + Test: []string{"CMD", "node", "-e", "fetch('http://127.0.0.1:8080/health').then((r) => {if (r.status !== 200) throw new Error(r.status)})"}, Interval: 10 * time.Second, Timeout: 2 * time.Second, Retries: 3, diff --git a/internal/utils/misc.go b/internal/utils/misc.go index 2d7762671..0cd51eeb9 100644 --- a/internal/utils/misc.go +++ b/internal/utils/misc.go @@ -31,7 +31,7 @@ const ( PostgrestImage = "postgrest/postgrest:v12.0.1" DifferImage = "supabase/pgadmin-schema-diff:cli-0.0.5" MigraImage = "supabase/migra:3.0.1663481299" - PgmetaImage = "supabase/postgres-meta:v0.75.0" + PgmetaImage = "supabase/postgres-meta:v0.77.2" StudioImage = "supabase/studio:20240205-b145c86" ImageProxyImage = "darthsim/imgproxy:v3.8.0" EdgeRuntimeImage = "supabase/edge-runtime:v1.36.1"