Files
api/packages/unraid-api-plugin-connect/src
Pujit Mehrotra c264a1843c fix(connect): disable api plugin if unraid plugin is absent (#1773)
Mitigates an edge case where the connect api plugin does not uninstall
itself when Unraid version < 7.2.0, resulting in retention of undesired
connect functionality on stock unraid after upgrading to 7.2.0+.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* App now detects Connect plugin availability at startup and falls back
gracefully with a no-op mode and a logged warning if the plugin is
absent.
* Added an environment option to skip the plugin availability check when
needed.
* Export behavior adjusted so the application uses the appropriate
module based on plugin presence.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-13 12:26:35 -05:00
..

@unraid-api-plugin-connect/src

This directory contains the core source code for the Unraid Connect API plugin, built as a modular NestJS application. It provides remote access, cloud integration, and configuration management for Unraid servers.

Structure

  • index.ts: Main entry, conforming to the nestjs API plugin schema.
  • authn/: Authentication services.
  • config/: Configuration management, persistence, and settings.
  • connection-status/: Connection state monitoring and status tracking.
  • graphql/: GraphQL request definitions and generated client code.
  • helper/: Utility functions and constants.
  • internal-rpc/: Internal RPC communication services.
  • mothership-proxy/: Mothership server proxy and communication.
  • network/: Network services including UPnP, DNS, URL resolution, and WAN access.
  • remote-access/: Remote access services (static, dynamic, UPnP).
  • unraid-connect/: Core Unraid Connect functionality and settings.
  • __test__/: Vitest-based unit and integration tests.

Each feature directory follows a consistent pattern:

  • *.module.ts: NestJS module definition
  • *.service.ts: Business logic implementation
  • *.resolver.ts: GraphQL resolvers
  • *.model.ts: TypeScript and GraphQL models, DTOs, and types
  • *.events.ts: Event handlers for event-driven operations
  • *.config.ts: Configuration definitions

Usage

This package is intended to be used as a NestJS plugin/module. Import ApiModule from index.ts and add it to your NestJS app's module imports.

import { ApiModule } from '@unraid-api-plugin-connect/src';

@Module({
  imports: [ApiModule],
})
export class AppModule {}

Development

  • Install dependencies from the monorepo root: pnpm install
  • Build: pnpm run build (from the package root)
  • Codegen (GraphQL): pnpm run codegen
  • Tests: vitest (see __test__/ for examples)
  • Format: pnpm run format to format all files in project

Notes

  • Designed for Unraid server environments.
  • Relies on other Unraid workspace packages (e.g., @unraid/shared).
  • For plugin installation and system integration, see the main project documentation.