This actually doesn't fix the error but should make it more flexible.
Also adds some testing.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
* **Refactor**
* Enhanced error detection for invalid API key messages to improve
accuracy.
* **Tests**
* Added comprehensive tests verifying error handling and client
lifecycle behavior without network dependencies.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Updated theme settings now allow header background and primary text
colors to be optionally unset or left blank.
* **Bug Fixes**
* Removed unused authentication token fields from sign-in and
configuration forms for a streamlined user experience.
* **Style**
* Improved formatting and readability in several areas of the
application and tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Isolate plugin concerns into `.plg` plugin & api file modifiers instead of the api's
slackware package.
## Summary by CodeRabbit
* **New Features**
* Installation process modularized into package installation,
post-install setup with verification, and service startup with cleanup.
* Added logging and error detection during installation, including
symlink verification.
* Created required log directory to support service dependencies.
* Integrated nginx service with reload capability triggered by
configuration changes.
* Added automatic patching of nginx configuration and hosts file to
improve security and iframe compatibility.
* Enhanced file modification system to handle side effects and trigger
nginx reloads as needed.
* **Refactor**
* Restructured installation scripts for clarity; setup scripts now
separate steps.
* Removed legacy installation logic and deprecated related scripts.
* Enabled hard link addition during package creation.
* Simplified installation scripts by removing conditional branching and
detailed logging.
* Streamlined API environment setup by removing redundant post-install
steps.
* Updated dependency injection to explicitly provide nginx service
token.
* Improved patch application error reporting with file path details.
* **Chores**
* Disabled legacy scripts to streamline installation.
* Removed `.gitignore` to track previously ignored files.
* Updated tests to include new dependencies and relaxed logger
assertions.
<!-- 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/1210661184127051
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Refactor**
- Simplified and streamlined the management of the local Connect API
key, renaming it to "ConnectInternal" and removing legacy keys.
- Updated internal logic to directly retrieve or create the Connect API
key without storing or emitting it in configuration or events.
- Replaced custom WebSocket handling with default implementation and
improved asynchronous API key retrieval for client connections.
- Enhanced asynchronous handling for subscription and query execution to
ensure proper client initialization.
- **Chores**
- Removed obsolete methods and test suites related to previous Connect
API key management logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved error handling to prevent runtime exceptions when certain
configuration fields are undefined.
* Updated test expectations to reflect new error handling behaviors.
* **Refactor**
* Streamlined and modularized the legacy configuration migration process
for better maintainability.
* Removed obsolete configuration fields and related validation from the
configuration model.
* **Tests**
* Added and enhanced test suites to verify configuration migration,
parsing, and URL resolution logic.
* Improved test coverage and robustness with expanded mock data and
flexible assertions.
* **Chores**
* Updated test scripts and dependencies for improved reliability and
compatibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved handling and migration of legacy configuration values for
smoother upgrades and more accurate settings conversion.
- **Refactor**
- Streamlined the legacy configuration migration process for better
reliability and maintainability.
- Removed the unused `ssoSubIds` property from configuration models.
- **Tests**
- Added comprehensive tests to ensure correct migration and conversion
of legacy configuration data.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
- **New Features**
- Introduced a comprehensive Nginx control script for Unraid OS,
enabling advanced server management, SSL certificate handling, and
dynamic configuration based on system state.
https://github.com/unraid/webgui/pull/2269
- Added a utility function to safely execute code with error handling
support.
- **Improvements**
- Enhanced logging across remote access, WAN access, and settings
services for improved traceability.
- Added initialization and cleanup hooks to remote access and UPnP
services for better lifecycle management.
- Optimized configuration persistence by batching rapid changes for more
efficient updates.
- Refined URL resolution logic for improved configuration retrieval and
error handling.
- Broadened pattern matching for domain keys in Nginx state parsing.
- Updated remote access settings to reload the network stack after
changes.
- Simplified remote access and WAN port configuration logic for clarity
and accuracy.
- Improved port mapping logic with explicit error handling in UPnP
service.
- Updated UI and form controls for remote access settings to reflect SSL
requirements and access type restrictions.
- **Configuration**
- Updated the default path for module configuration files.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Chores**
- Updated internal dependencies for improved compatibility and
performance.
- Adjusted package configuration to include an additional built
dependency.
- **Bug Fixes**
- Improved the accuracy of task status reporting in the UPNP job
manager.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Refactor**
- Reduced the delay before configuration changes are processed,
resulting in faster response times to configuration updates throughout
the application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Refactor**
- Removed description text display from a form field for a cleaner
interface.
- Enhanced form field matching to better target specific string array
inputs.
- Updated remote access settings UI for clearer layout and separation of
title and details.
- Adjusted label container styling to allow more flexible width.
- Improved grouping of precondition information for better visual
structure.
- Added a colon to the SSO users settings label for consistency.
<!-- 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/1210572375587668
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added ability to update existing API keys, including name,
description, roles, and permissions, through the UI and GraphQL API.
- Introduced a modal-based interface for creating and editing API keys
with improved role and permission selection.
- Added a new API Key Manager page and custom element for centralized
API key management.
- Enhanced API key listing with detailed views, role badges, permission
counters, and copy-to-clipboard functionality.
- Introduced reusable dialog components for consistent modal
experiences.
- Added plugin management capabilities with mutations to add or remove
plugins.
- Added comprehensive support for managing remote access, network URLs,
and API key updates within the GraphQL schema.
- **Bug Fixes**
- Improved error handling and display for API key creation and update
operations.
- **Refactor**
- Centralized API key modal and editing state management using a
dedicated store.
- Updated GraphQL queries and mutations to use reusable fragments for
API key data.
- Removed deprecated or redundant remote access and allowed origins
configuration components and queries.
- Simplified and updated input types for connect settings and remote
access.
- **Tests**
- Added comprehensive tests for API key update logic and improved
coverage for API key loading.
- **Chores**
- Updated configuration files and cleaned up unused schema and component
files.
- Added new dialog components and centralized exports for dialogs.
- Improved ESLint configuration and import statements for better type
handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
implements unraid-api `plugins list`, `plugins install`, `plugins remove` commands via a new `DependencyService` that invokes npm.
## Summary by CodeRabbit
- **New Features**
- Enhanced plugin management with install, remove, and list commands
supporting bundled plugins and restart control.
- Added plugin persistence and configuration synchronization across API
settings and interfaces.
- Introduced dependency management service for streamlined npm
operations and vendor archive rebuilding.
- **Bug Fixes**
- Improved plugin listing accuracy with warnings for configured but
missing plugins.
- **Chores**
- Refactored CLI modules and services for unified plugin management and
dependency handling.
- Updated API configuration loading and persistence for better
separation of concerns.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
separates Unraid Connect from the API
## Summary by CodeRabbit
- **New Features**
- Introduced a unified, JSON-schema-based settings system for API
configuration and plugin settings, accessible via new GraphQL queries
and mutations.
- Added modular NestJS plugin architecture for Unraid Connect, including
new modules for cloud, remote access, and system/network management.
- Added granular connection and remote access state tracking, with new
GraphQL types and resolvers for cloud and connection status.
- Implemented event-driven and service-based management for SSO users,
API keys, and dynamic remote access.
- Enhanced UI components and queries to support unified settings and
restart detection.
- **Improvements**
- Refactored configuration and state management to use service-based
patterns, replacing direct store access and Redux logic.
- Migrated legacy config files to new JSON formats with validation and
persistence helpers.
- Centralized global dependencies and shared services for plugins and
CLI modules.
- Improved logging, error handling, and lifecycle management for
connections and background jobs.
- Updated and expanded documentation for plugin development and settings
management.
- **Bug Fixes**
- Improved handling of missing config files and ensured safe
persistence.
- Enhanced error reporting and validation in remote access and
connection services.
- **Removals**
- Removed deprecated Redux slices, listeners, and legacy cloud/remote
access logic.
- Deleted obsolete test files, scripts, and unused code related to the
old state/store approach.
- **Tests**
- Added new unit tests for settings merging, URL resolution, and cloud
connectivity checks.
- **Style**
- Applied consistent formatting, import reorganization, and code style
improvements across modules.
- **Chores**
- Updated build scripts, Dockerfiles, and development environment setup
to support new dependencies and workflows.
- Expanded .gitignore and configuration files for improved build
artifact management.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced a CLI tool to scaffold new Unraid API plugins, including
templates for configuration, persistence, and GraphQL resolvers.
- Added plugin management commands to the CLI for installing, removing,
and listing plugins as peer dependencies.
- Implemented robust configuration state management with validation,
persistence, and error handling.
- Added scheduled and debounced persistence for configuration changes.
- Provided utilities for file existence checks and CSV string parsing.
- Enhanced GraphQL schema with new queries and mutations for health
checks and demo configuration.
- **Improvements**
- Updated configuration and environment handling to support modular,
persistent plugin configs.
- Improved logging and error handling throughout CLI and service layers.
- Refined dependency management for plugins, including support for
bundled dependencies.
- **Bug Fixes**
- Improved error handling during Docker service initialization to
prevent unhandled exceptions.
- **Chores**
- Added and updated development dependencies and TypeScript
configurations for better compatibility and type safety.
- **Refactor**
- Restructured internal modules to support dynamic plugin loading and
configuration injection.
- Removed deprecated plugin schema extension logic and related code.
- **Documentation**
- Updated and added configuration files and templates for easier plugin
development and management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Changes plugin interface to expect Nest modules instead of a custom
plain JS object.
## Summary by CodeRabbit
- **New Features**
- Introduced updated health check plugins, including a new connect
plugin exposing a GraphQL health query and configuration logging.
- **Refactor**
- Streamlined the overall plugin registration and management across API,
CLI, and GraphQL modules for improved clarity and logging.
- Simplified the `CliModule` and `PluginService` to reduce complexity
and enhance maintainability.
- **Chores**
- Updated dependency configurations and build scripts while introducing
new TypeScript setups to enhance maintainability and consistency.
- Added new `package.json` and `tsconfig.json` files for the
`unraid-api-plugin-connect` and `unraid-api-plugin-health` projects.
- Modified GitHub Actions workflow to update tag format for pull
requests.
Sets license for all node.js packages to `GPL-2.0-or-later`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Chores**
- Simplified license compliance verification by removing legacy script
logic.
- Updated licensing terms across components to GPL-2.0-or-later for
broader compatibility.
- **Documentation**
- Revised setup instructions to indicate that the use of the Just build
tool is now optional.
- **New Features**
- Added fallback support in the build automation tool to ensure smoother
operations when targets are missing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- **New Features**
- Created a dynamic plugin system for the API to enable community
augmentation of GraphQL, CLI, and Cron functionalities capabilities.
- Included an example plugin under `packages/unraid-api-plugin-health`
that adds a new graphql query for API health checks.
- Added `rc.unraid-api` commands for backing up, restoring, and
installing production dependencies, streamlining maintenance and
deployment.
- Improved dependency vendoring by bundling a versioned pnpm store
(instead of `node_modules`). Versioning will allow users to add plugins
to a specific api release without requiring an internet connection on
subsequent reboots.
- **Chores**
- Upgraded build workflows and versioning processes to ensure more
reliable artifact handling and production packaging.