Skip to content

feat: playground#104

Open
olliethedev wants to merge 9 commits intomainfrom
feat/playground
Open

feat: playground#104
olliethedev wants to merge 9 commits intomainfrom
feat/playground

Conversation

@olliethedev
Copy link
Copy Markdown
Collaborator

@olliethedev olliethedev commented Mar 27, 2026

Summary

  • BTST playground. Allows quick scaffolding of a BTST project with interactive preview and code editing
  • using templates from@btst/codegen init

Type of change

  • Bug fix
  • New plugin
  • Feature / enhancement to an existing plugin
  • Documentation
  • Chore / refactor / tooling

Checklist

  • pnpm build passes
  • pnpm typecheck passes
  • pnpm lint passes
  • Tests added or updated (unit and/or E2E)
  • Docs updated (docs/content/docs/) if consumer-facing types or behavior changed
  • All three example apps updated if a plugin was added or changed
  • New plugin: submission checklist in CONTRIBUTING.md completed

Screenshots

Screenshot 2026-03-26 at 8 06 48 PM

Note

Medium Risk
Adds a new Next.js playground app plus new public exports from @btst/codegen, and updates route-docs to introspect registered routes; most changes are additive but touch build/bundling and runtime route discovery.

Overview
Adds a new playground/ Next.js app that lets users select BTST plugins, server-generate a scaffold plan via a new programmatic @btst/codegen/lib entrypoint, and launch an in-browser StackBlitz WebContainer preview with route selection.

Extends @btst/codegen to ship lib exports (scaffold planner + plugin metadata and new PLUGIN_ROUTES map), updates init CLI output to print the scaffolded routes, and makes template rendering more robust to new bundled dist paths.

Enhances route-docs with route introspection utilities (getRegisteredRoutes + useRegisteredRoutes) and documents the server/client import boundary for client plugins to avoid Next.js SSR/SSG build failures.

Written by Cursor Bugbot for commit 11d2f6a. This will update automatically on new commits. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
better-stack-docs Ready Ready Preview, Comment Mar 27, 2026 4:34pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

Shadcn registry validated — no registry changes detected.

…ctive, updating route generation logic accordingly
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

"import": "./dist/lib.mjs",
"require": "./dist/lib.cjs"
}
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing types condition in package exports map

Medium Severity

The newly added exports map lacks types conditions for both "." and "./lib" entries. Before this PR, TypeScript resolved types via the top-level "types" field. Now that exports is present, TypeScript with moduleResolution: "bundler" or "node16" uses exports instead and ignores the top-level "types" fallback. The "./lib" export is especially at risk since it has no types fallback at all — TypeScript must infer the declaration file from ./dist/lib.mjs, which only works if unbuild produces a .d.ts (not .d.mts) that TypeScript's heuristic can discover.

Fix in Cursor Fix in Web

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