Skip to content

Comments

feat: add server-side data access#55

Merged
olliethedev merged 26 commits intomainfrom
feat/plugin-api-functions
Feb 23, 2026
Merged

feat: add server-side data access#55
olliethedev merged 26 commits intomainfrom
feat/plugin-api-functions

Conversation

@olliethedev
Copy link
Collaborator

@olliethedev olliethedev commented Feb 19, 2026

Changes in this PR:

  • open up plugin level data access without going through api router. useful for ssr/ssg

Closes #32 #52


Note

Medium Risk
Touches core stack() return shape/types and changes list endpoint response envelopes, so downstream consumers and tests can break if any call sites were missed; new stack().api access also bypasses auth hooks and must be used carefully.

Overview
Adds a server-side data access surface to stack() by returning the shared adapter plus a typed api namespace built from each backend plugin’s optional api factory (plugins without api are omitted from the type).

Introduces and documents per-plugin pure DB getter modules (e.g. Blog/CMS/Form Builder/Kanban/AI Chat), re-exports them for direct import, and refactors existing HTTP routes to delegate to these getters (including new Blog/Kanban response envelopes like { items, total, limit, offset }). CMS additionally ensures its one-time syncContentTypes runs for both HTTP and api calls.

Updates examples, client query code, and E2E tests to match the new paginated list response shapes; adds comprehensive getter/stack.api tests; bumps @btst/stack to 2.2.0.

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

@vercel
Copy link

vercel bot commented Feb 19, 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 Feb 23, 2026 7:59pm

Request Review

…th total count to make consistent with other plugins
Copy link

@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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@olliethedev olliethedev merged commit 239f7ad into main Feb 23, 2026
5 checks passed
@olliethedev olliethedev deleted the feat/plugin-api-functions branch February 23, 2026 21:10
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.

Export plugin data getters

1 participant