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

supabase / cli / 28097881459
65%
develop: 65%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/develop/pr-5718-64df2ba83785d849fd230ef7aea7cf5a60de63c4
DEFAULT BRANCH: develop
Ran 24 Jun 2026 12:19PM 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 12:17PM UTC coverage: 64.886%. Remained the same
28097881459

push

github

web-flow
fix(cli): serve edge functions offline by bundling the runtime template (#5678)

## What

Makes `supabase functions serve` start fully offline. The edge-runtime
bootstrap template (`apps/cli/src/shared/functions/serve.main.ts`)
imported three modules that Deno resolved **over the network on every
container start**:

- `https://deno.land/std/http/status.ts`
- `https://deno.land/std/path/posix/mod.ts`
- `jsr:@panva/jose@6`

With no network these fail to resolve and the worker never boots — the
offline failure reported in
[supabase/supabase#45570](https://github.com/supabase/supabase/issues/45570).

## How

The two `deno.land/std` imports are trivially eliminable; `jose` is the
only real dependency. So:

- **Inline the std deps** — `STATUS_CODE`/`STATUS_TEXT` and posix
`join`/`dirname`/`toFileUrl` move into a new, normally-typed,
unit-tested `serve-main-deps.ts` (the template imports it relatively).
- **Bundle `jose` locally** — a new `serve-main-bundler.ts` uses esbuild
(`platform: browser` → jose's Web Crypto build) to bundle
`serve.main.ts` into a single self-contained ES module with `jose` and
the helpers inlined. `Deno`/`EdgeRuntime` stay as free globals.
- **Delivery is unchanged in shape** — compiled binaries embed the
pre-bundled template via the existing
`SUPABASE_FUNCTIONS_SERVE_MAIN_TEMPLATE` define (now produced by the
bundler in `build.ts` and the new `build-binary.ts` used by
`build:next`/`build:legacy`). Running from source bundles on demand via
a lazy import, so esbuild is never loaded by shipped binaries. The
container launch path (`heredoc → /root/index.ts`, `edge-runtime start
--main-service=/root`) is untouched — only the template contents differ.

## Why this approach (and not a pre-bundled eszip)

The edge-functions team suggested shipping the template as a pre-bundled
**eszip** (as hosted `ef-ingress` does). That works, but for the CLI it
couples the eszip to a single edge-runtime version while users can
override `edge_runtime.imag... (continued)

10869 of 16751 relevant lines covered (64.89%)

10.29 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
82.41
0.0% internal/storage/rm/rm.go
Jobs
ID Job ID Ran Files Coverage
1 28097881459.1 24 Jun 2026 12:19PM UTC 228
64.89
GitHub Action Run
Source Files on build 28097881459
  • 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 #28097881459
  • 89e3ccd3 on github
  • Prev Build on gh-readonly-queue/develop/pr-5677-fefe60767ec60fa25f682c7ca176358cf8e22141 (#28097812821)
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