Skip to content

refactor: Api plugin system#644

Merged
aXenDeveloper merged 11 commits intocanaryfrom
api_plugin_system
Apr 28, 2025
Merged

refactor: Api plugin system#644
aXenDeveloper merged 11 commits intocanaryfrom
api_plugin_system

Conversation

@aXenDeveloper
Copy link
Copy Markdown
Owner

Improving Documentation

Description

What?

Why?

How?

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vitnode-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2025 6:26pm
vitnode-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2025 6:26pm

- 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.
@aXenDeveloper aXenDeveloper requested a review from Copilot April 28, 2025 18:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@aXenDeveloper aXenDeveloper marked this pull request as ready for review April 28, 2025 18:26
@aXenDeveloper aXenDeveloper merged commit 81d19b3 into canary Apr 28, 2025
5 checks passed
@aXenDeveloper aXenDeveloper deleted the api_plugin_system branch April 28, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧱 Refactor A code change that neither fixes a bug nor adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants