diff --git a/.changeset/fix-bun-cli-auto-serve.md b/.changeset/fix-bun-cli-auto-serve.md new file mode 100644 index 0000000..584f7fd --- /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 d33a2fd..0c4f7f5 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;