Skip to content

feat(cli): port functions deploy#5561

Open
7ttp wants to merge 5 commits into
supabase:developfrom
7ttp:feat/functions-deploy
Open

feat(cli): port functions deploy#5561
7ttp wants to merge 5 commits into
supabase:developfrom
7ttp:feat/functions-deploy

Conversation

@7ttp

@7ttp 7ttp commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

TL;DR

ports functions deploy to native ts

What’s introduced

adds the native ts implementation for supabase functions deploy,
keeping the existing command surface for default API deploys, docker fallback, import maps, static files, pruning,
disabled functions, and structured output.
also preserves the user facing behavior while making the default path api-based/dockerless (same as the other pr)

& includes coverage for both

ref:

  • Closes CLI-1319

@7ttp 7ttp requested a review from a team as a code owner June 12, 2026 08:03
@7ttp 7ttp self-assigned this Jun 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

useDocker: Flag.boolean("use-docker").pipe(
Flag.withDescription("Use Docker to bundle functions locally."),
Flag.withHidden,
),

P1 Badge Restore Docker as the legacy deploy default

When legacy users run supabase functions deploy without --use-api, this flag now parses as false, so deployFunctions takes the server-side API path instead of the local Docker bundler. The Go CLI that this legacy shell is porting sets --use-docker to default true in apps/cli-go/cmd/functions.go:155-157, and apps/cli-go/internal/functions/deploy/deploy.go:56-58 uses Docker whenever it is running; only an explicit --use-api opts out. This changes the default deployment artifact/path for existing stable CLI users and can break projects that rely on Docker/local bundling behavior.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli/src/legacy/commands/functions/deploy/deploy.handler.ts
Comment thread apps/cli/src/shared/functions/deploy.ts Outdated
Comment thread apps/cli/src/shared/functions/deploy.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94aa2f0097

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli/src/next/commands/functions/deploy/deploy.handler.ts Outdated
Comment thread apps/cli/src/shared/functions/deploy.ts Outdated
Comment thread apps/cli/src/shared/functions/deploy.ts Outdated
Comment thread apps/cli/src/shared/functions/deploy.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59977ff17d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

);
}

const useLocalBundler = flags.useDocker || flags.legacyBundle;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve Docker as the default deploy mode

When legacy users run supabase functions deploy without mode flags while Docker is running, the Go command takes the Docker path because useDocker is registered with a default of true in apps/cli-go/cmd/functions.go; here the deploy mode is selected only from explicit boolean flags, which both default to false, so the normal invocation now always uses the server-side API bundler. That changes the ported command's default behavior and can break deployments that rely on the local Docker bundling path unless users discover and pass the hidden --use-docker flag.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional, the native port should default to api

Comment thread apps/cli/src/shared/functions/deploy.ts
Comment thread apps/cli/src/shared/functions/deploy.ts Outdated
Comment thread apps/cli/src/shared/functions/deploy.ts Outdated
Comment thread apps/cli/src/shared/functions/deploy.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a14a8e908d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli/src/shared/functions/deploy.ts
Comment thread apps/cli/src/shared/functions/deploy.ts Outdated
Comment thread apps/cli/src/shared/functions/deploy.ts
@7ttp 7ttp force-pushed the feat/functions-deploy branch from 713059d to 67a5fc2 Compare June 12, 2026 13:34
@7ttp 7ttp force-pushed the feat/functions-deploy branch from 67a5fc2 to e456290 Compare June 12, 2026 13:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e456290738

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli/src/shared/functions/deploy.ts
Comment thread apps/cli/src/shared/functions/deploy.ts
Comment thread apps/cli/src/shared/functions/deploy.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 237af1e14d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli/src/shared/functions/deploy.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec9a343578

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli/src/shared/functions/deploy.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant