Files
api/plugin
Eli Bosley 345e83bfb0 feat: upgrade nuxt-custom-elements (#1461)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added new modal dialogs and UI components, including activation steps,
OS update feedback, and expanded notification management.
* Introduced a plugin to configure internationalization, state
management, and Apollo client support in web components.
* Added a new Log Viewer page with a streamlined interface for viewing
logs.

* **Improvements**
* Centralized Pinia state management by consolidating all stores to use
a shared global Pinia instance.
* Simplified component templates by removing redundant
internationalization host wrappers.
* Enhanced ESLint configuration with stricter rules and global variable
declarations.
* Refined custom element build process to prevent jQuery conflicts and
optimize minification.
* Updated component imports and templates for consistent structure and
maintainability.
* Streamlined log viewer dropdowns using simplified select components
with improved formatting.
* Improved notification sidebar with filtering by importance and modular
components.
* Replaced legacy notification popups with new UI components and added
automatic root session creation for localhost requests.
* Updated OS version display and user profile UI with refined styling
and component usage.

* **Bug Fixes**
* Fixed component tag capitalization and improved type annotations
across components.

* **Chores**
* Updated development dependencies including ESLint plugins and build
tools.
* Removed deprecated log viewer patch class and cleaned up related test
fixtures.
  * Removed unused imports and simplified Apollo client setup.
* Cleaned up test mocks and removed obsolete i18n host component tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1210730229632804

---------

Co-authored-by: Pujit Mehrotra <pujit@lime-technology.com>
Co-authored-by: Zack Spear <zackspear@users.noreply.github.com>
2025-07-08 10:05:39 -04:00
..
2025-03-04 15:18:04 -05:00
2025-03-04 15:18:04 -05:00
2025-03-04 15:18:04 -05:00

Unraid Plugin Builder

Tool for building and testing Unraid plugins locally as well as packaging them for deployment.

Development Workflow

1. Watch for Changes

The watch command will automatically sync changes from the API, UI components, and web app into the plugin source:

# Start watching all components
pnpm run watch:all

# Or run individual watchers:
pnpm run api:watch    # Watch API changes
pnpm run ui:watch     # Watch Unraid UI component changes
pnpm run wc:watch     # Watch web component changes

This will copy:

  • API files to ./source/dynamix.unraid.net/usr/local/unraid-api
  • UI components to ./source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components
  • Web components to the same UI directory

2. Build the Plugin

Once your changes are ready, build the plugin package:

# Build using Docker - on non-Linux systems
pnpm run docker:build-and-run

# Or build with the build script
pnpm run build:validate

This will create the plugin files in ./deploy/release/

3. Serve and Install

Start a local HTTP server to serve the plugin files:

# Serve the plugin files
pnpm run http-server

Then install the plugin on your Unraid development machine by visiting:

http://SERVER_NAME.local/Plugins

Then paste the following URL into the Unraid Plugins page:

http://YOUR_LOCAL_DEV_MACHINE_IP:5858/plugins/local/dynamix.unraid.net.plg

Replace SERVER_NAME with your development machine's hostname.

Development Tips

  • Run watchers in a separate terminal while developing
  • The http-server includes CORS headers for local development
  • Check the Unraid system log for plugin installation issues

Environment Setup

  1. Initialize environment:

    pnpm run env:init
    
  2. Validate environment:

    pnpm run env:validate
    

Available Commands

Build Commands

  • build - Build the plugin package
  • build:validate - Build with environment validation
  • docker:build - Build the Docker container
  • docker:run - Run the builder in Docker
  • docker:build-and-run - Build and run in Docker

Watch Commands

  • watch:all - Watch all component changes
  • api:watch - Watch API changes
  • ui:watch - Watch UI component changes
  • wc:watch - Watch web component changes

Server Commands

  • http-server - Serve the plugin files locally

Environment Commands

  • env:init - Create initial .env file
  • env:validate - Validate environment setup
  • env:clean - Remove .env file

Troubleshooting

  1. Watch not updating files

    • Check that source directories exist
    • Verify file permissions
  2. Build failures

    • Ensure .env file exists
    • Check Docker setup if using containerized build
    • Verify source files are present
  3. Installation issues

    • Confirm http-server is running
    • Check your local IP is correct
    • Verify plugin file permissions