refactor: Api plugin system#644
Merged
aXenDeveloper merged 11 commits intocanaryfrom Apr 28, 2025
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
- Updated module creation to use buildModule function for consistency. - Refactored route creation to utilize buildRoute function for improved clarity. - Adjusted imports across various modules to align with new structure. - Enhanced type definitions for plugins and modules to ensure better type safety. - Removed deprecated createApiRoute and createPluginApi functions. - Consolidated route definitions and handlers for better maintainability. - Added new plugin configuration to vitnode.config.ts for enhanced plugin management. - Updated categories module to reflect new route handling structure.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the API plugin system by enabling Row-Level Security (RLS) on multiple database tables, and makes accompanying documentation formatting updates.
- Adds .enableRLS() chaining to various pgTable definitions for improved security
- Updates formatting in the copilot instructions documentation
Reviewed Changes
Copilot reviewed 62 out of 74 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| apps/web/src/database/schema/users.ts | Enables RLS for users and related SSO/confirm_email/forgot_password tables |
| apps/web/src/database/schema/sessions.ts | Enables RLS for sessions and known devices |
| apps/web/src/database/schema/roles.ts | Enables RLS for roles |
| apps/web/src/database/schema/moderators.ts | Enables RLS for moderators |
| apps/web/src/database/schema/languages.ts | Enables RLS for languages and language words |
| apps/web/src/database/schema/config.ts | Enables RLS for the config table |
| apps/web/src/database/schema/admins.ts | Enables RLS for admin permissions and sessions |
| .github/copilot-instructions.md | Updates documentation formatting and guidelines |
Files not reviewed (12)
- apps/docs/content/docs/dev/fetcher.mdx: Language not supported
- apps/docs/content/docs/dev/meta.json: Language not supported
- apps/docs/content/docs/dev/modules.mdx: Language not supported
- apps/docs/package.json: Language not supported
- apps/web/package.json: Language not supported
- apps/web/src/database/migrations/0001_smooth_grandmaster.sql: Language not supported
- apps/web/src/database/migrations/meta/_journal.json: Language not supported
- apps/web/src/plugins/core/langs/en.json: Language not supported
- package.json: Language not supported
- packages/create-vitnode-app/package.json: Language not supported
- packages/eslint/package.json: Language not supported
- packages/vitnode/package.json: Language not supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improving Documentation
pnpm lint:fixto fix formatting issues before opening the PR.Description
What?
Why?
How?