From dfa7d9b569adaff739bad4d96d8ba4ba3276f890 Mon Sep 17 00:00:00 2001 From: Samarth Saxena Date: Fri, 11 Sep 2026 19:30:23 +0530 Subject: [PATCH] fix: prevent Bun from auto-serving the CLI entrypoint --- .changeset/fix-bun-cli-auto-serve.md | 5 +++++ packages/cli/src/cli.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/fix-bun-cli-auto-serve.md diff --git a/.changeset/fix-bun-cli-auto-serve.md b/.changeset/fix-bun-cli-auto-serve.md new file mode 100644 index 00000000..584f7fd1 --- /dev/null +++ b/.changeset/fix-bun-cli-auto-serve.md @@ -0,0 +1,5 @@ +--- +'@stripe/link-cli': patch +--- + +Prevent Bun from automatically starting an HTTP server after CLI commands finish by removing the CLI entrypoint's default fetch-bearing export. Explicit HTTP serving remains available through `serve`. diff --git a/packages/cli/src/cli.tsx b/packages/cli/src/cli.tsx index d33a2fd0..0c4f7f58 100644 --- a/packages/cli/src/cli.tsx +++ b/packages/cli/src/cli.tsx @@ -172,6 +172,6 @@ cli.command( ); cli.command(createServeCli(cli)); +// Bun auto-starts an HTTP server for default exports with a fetch method. +// This is a CLI entrypoint; HTTP serving must go through the explicit serve command. cli.serve(); - -export default cli;