• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 28103415459
65%

Build:
DEFAULT BRANCH: develop
Ran 24 Jun 2026 01:52PM UTC
Jobs 1
Files 228
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jun 2026 01:44PM UTC coverage: 64.886%. Remained the same
28103415459

push

github

web-flow
fix(cli): bundle the Go edge-runtime template for offline supabase start (#5682)

## What

Makes `supabase start` start its edge-runtime offline. Follow-up to
#5678, which fixed `supabase functions serve` but not `supabase start`.

## Why a second PR was needed

#5678 fixed the **TS** template (`functions serve`, which is a native TS
port). But `supabase start` is `wrapped` — the legacy shell proxies it
to the **Go binary**
([start.handler.ts](apps/cli/src/legacy/commands/start/start.handler.ts)
→ [start.go:1054](apps/cli-go/internal/start/start.go:1054)
`serve.ServeFunctions`). Go's edge-runtime embedded its **own** copy of
the bootstrap template
(`apps/cli-go/internal/functions/serve/templates/main.ts`), which still
imported `https://deno.land/std/...` and `jsr:@panva/jose@6`. So default
`supabase start` (edge-runtime enabled) still crashed offline with the
`status.ts` DNS error from supabase/supabase#45570.

The root cause of the gap was **two copies of the same template**, only
one of which was fixed.

## How

Unify on a single source of truth:

- The Go binary now `go:embed`s **`templates/main.bundled.js`** — the
bundle of the canonical `apps/cli/src/shared/functions/serve.main.ts`
(jose + std deps inlined, no remote specifiers), reusing the same
`bundleServeMainTemplate()` from #5678.
- Added `scripts/generate-go-serve-template.ts` (`pnpm
generate:go-serve-template`) to produce the committed artifact. It's
committed because `go build`/`go test`/CI have no JS toolchain.
- **Deleted** the duplicate Go `templates/main.ts`.
- A unit test
([serve-main-go-template.unit.test.ts](apps/cli/src/shared/functions/serve-main-go-template.unit.test.ts))
regenerates the bundle and fails if the committed file drifts from
`serve.main.ts` — so the two CLIs can't silently diverge again.
- Updated the Go serve test to assert the embedded template is
self-contained (no `deno.land`/`jsr:`) instead of asserting the old
remote imports.

The container launch path is unch... (continued)

10869 of 16751 relevant lines covered (64.89%)

10.29 hits per line

Coverage Regressions

Lines Coverage ∆ File
24
85.34
0.0% internal/functions/serve/serve.go
Jobs
ID Job ID Ran Files Coverage
1 28103415459.1 24 Jun 2026 01:52PM UTC 228
64.89
GitHub Action Run
Source Files on build 28103415459
  • Tree
  • List 228
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28103415459
  • 5a7d2e58 on github
  • Prev Build on gh-readonly-queue/develop/pr-5670-88062fceb7acbf1031f8f28be951f5de0653f4aa (#28099177235)
  • Next Build on develop (#28105651597)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc