-
Couldn't load subscription status.
- Fork 11
feat: api plugin system & offline versioned dependency vendoring #1252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis pull request implements enhancements across CI/CD, API, CLI, and plugin ecosystems. The GitHub Actions workflow now includes steps for managing the PNPM store and generating API versions. The API is augmented with new functions for reading package metadata and configuring GraphQL with plugins, while the CLI now supports dynamic module registration with plugin integrations. Additionally, the plugin builder, symlink management, and workspace configurations have been updated to streamline asset handling and dependency management. Changes
Sequence Diagram(s)sequenceDiagram
participant Repo as GitHub Repository
participant Workflow as GitHub Actions
participant BuildAPI as Build-API Job
participant BuildPlugin as Build-Plugin Job
Repo->>Workflow: Push/Commit triggers workflow
Workflow->>BuildAPI: Execute Build-API job
BuildAPI->>BuildAPI: Run "Upload PNPM Store" step and list directory
Workflow->>BuildPlugin: Execute Build-Plugin job
BuildPlugin->>BuildPlugin: Run "Get API Version" step
BuildPlugin->>BuildPlugin: Run "Download PNPM Store" step
sequenceDiagram
participant CLI as CLI Entry Point
participant CM as CliModule
participant CF as CommandFactory
CLI->>CM: Call registerWithPlugins()
CM-->>CLI: Return dynamic module configuration
CLI->>CF: Invoke run(DynamicCliModule, config)
CF-->>CLI: Execute command with plugin support
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
295912f to
f40d648
Compare
febbd9e to
b62b450
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really close, a couple more q's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
plugin/builder/build-plugin.ts (1)
111-111: Added pnpm store bundling stepThe addition of the
bundlePnpmStore()call ensures that the versioned pnpm store is bundled as part of the plugin build process, which supports the offline dependency vendoring feature.Consider adding specific error handling for this step, as failures here might require different recovery actions than other build failures.
- await bundlePnpmStore(); + try { + await bundlePnpmStore(); + console.log("Successfully bundled pnpm store"); + } catch (error) { + console.error("Failed to bundle pnpm store:", error); + throw error; + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)
📒 Files selected for processing (2)
plugin/builder/build-plugin.ts(4 hunks)plugin/plugins/dynamix.unraid.net.plg(6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- plugin/plugins/dynamix.unraid.net.plg
🧰 Additional context used
🧬 Code Definitions (1)
plugin/builder/build-plugin.ts (3)
plugin/builder/utils/bucket-urls.ts (1)
getAssetUrl(33-37)plugin/builder/build-pnpm-store.ts (2)
getPnpmBundleName(24-27)bundlePnpmStore(38-42)plugin/builder/utils/cleanup.ts (1)
cleanupPluginFiles(13-17)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Build Web App
- GitHub Check: Build API
- GitHub Check: Test API
- GitHub Check: Cloudflare Pages
🔇 Additional comments (5)
plugin/builder/build-plugin.ts (5)
6-6: New import for asset URL handlingThe addition of
getAssetUrlimport is appropriate for the new functionality that references external assets in the plugin.
15-15: New pnpm store bundling functions importedThe import of
bundlePnpmStoreandgetPnpmBundleNamecorrectly brings in the necessary functions for the pnpm store bundling feature.
64-65: New entity references for vendor storeThe addition of
VENDOR_STORE_URLandVENDOR_STORE_FILENAMEentities enables the plugin to reference the pnpm store bundle. This is essential for the offline dependency vendoring feature mentioned in the PR objectives.
73-75: Improved error handling for missing entitiesThe enhanced error message now includes the full entities object, which will make debugging missing entity values much easier.
102-106: Skip git check for local plugin buildsThe conditional logic to skip Git checks for local builds is a good enhancement that will improve the developer experience when working locally.
2169aaf to
d5d9d9c
Compare
|
This plugin has been deployed to Cloudflare R2 and is available for testing. |
🤖 I have created a release *beep* *boop* --- ## [4.5.0](v4.4.1...v4.5.0) (2025-04-02) ### Features * add webgui theme switcher component ([#1304](#1304)) ([e2d00dc](e2d00dc)) * api plugin system & offline versioned dependency vendoring ([#1252](#1252)) ([9f492bf](9f492bf)) * **api:** add `unraid-api --delete` command ([#1289](#1289)) ([2f09445](2f09445)) * basic array controls ([#1291](#1291)) ([61fe696](61fe696)) * basic docker controls ([#1292](#1292)) ([12eddf8](12eddf8)) * copy to webgui repo script docs + wc build options ([#1285](#1285)) ([e54f189](e54f189)) ### Bug Fixes * additional url fixes ([4b2763c](4b2763c)) * **api:** redirect benign pnpm postinstall warning to log file ([#1290](#1290)) ([7fb7849](7fb7849)) * **deps:** update dependency chalk to v5 ([#1296](#1296)) ([6bed638](6bed638)) * **deps:** update dependency diff to v7 ([#1297](#1297)) ([3c6683c](3c6683c)) * disable all config watchers ([#1306](#1306)) ([5c1b435](5c1b435)) * extract callbacks to library ([#1280](#1280)) ([2266139](2266139)) * OEM plugin issues ([#1288](#1288)) ([d5a3d0d](d5a3d0d)) * replace files lost during pruning ([d0d2ff6](d0d2ff6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
New Features
packages/unraid-api-plugin-healththat adds a new graphql query for API health checks.rc.unraid-apicommands for backing up, restoring, and installing production dependencies, streamlining maintenance and deployment.node_modules). Versioning will allow users to add plugins to a specific api release without requiring an internet connection on subsequent reboots.Chores
Summary by CodeRabbit
New Features
Chores