mirror of
https://github.com/unraid/api.git
synced 2026-02-21 15:38:44 -06:00
chore: add missing descriptions on commands (#1124)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Enhanced CLI help text by adding and refining command descriptions: • Logs command now clearly displays “View logs.” • Restart command now focuses solely on restarting the API. • Start command now shows “Start the Unraid API.” • Stop command now explicitly states its stopping action. • Environment switch command now indicates its role in switching the API environment. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -6,7 +6,7 @@ interface LogsOptions {
|
||||
lines: number;
|
||||
}
|
||||
|
||||
@Command({ name: 'logs' })
|
||||
@Command({ name: 'logs', description: 'View logs' })
|
||||
export class LogsCommand extends CommandRunner {
|
||||
constructor(private readonly pm2: PM2Service) {
|
||||
super();
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ECOSYSTEM_PATH } from '@app/consts';
|
||||
import { LogService } from '@app/unraid-api/cli/log.service';
|
||||
import { PM2Service } from '@app/unraid-api/cli/pm2.service';
|
||||
|
||||
@Command({ name: 'restart', description: 'Restart / Start the Unraid API' })
|
||||
@Command({ name: 'restart', description: 'Restart the Unraid API' })
|
||||
export class RestartCommand extends CommandRunner {
|
||||
constructor(
|
||||
private readonly logger: LogService,
|
||||
|
||||
@@ -10,7 +10,7 @@ interface StartCommandOptions {
|
||||
'log-level'?: string;
|
||||
}
|
||||
|
||||
@Command({ name: 'start' })
|
||||
@Command({ name: 'start', description: 'Start the Unraid API' })
|
||||
export class StartCommand extends CommandRunner {
|
||||
constructor(
|
||||
private readonly logger: LogService,
|
||||
|
||||
@@ -3,12 +3,12 @@ import { Command, CommandRunner, Option } from 'nest-commander';
|
||||
import { ECOSYSTEM_PATH } from '@app/consts';
|
||||
import { PM2Service } from '@app/unraid-api/cli/pm2.service';
|
||||
|
||||
const GRACEFUL_SHUTDOWN_TIME = 2000;
|
||||
interface StopCommandOptions {
|
||||
delete: boolean;
|
||||
}
|
||||
@Command({
|
||||
name: 'stop',
|
||||
description: 'Stop the Unraid API',
|
||||
})
|
||||
export class StopCommand extends CommandRunner {
|
||||
constructor(private readonly pm2: PM2Service) {
|
||||
|
||||
@@ -15,6 +15,7 @@ interface SwitchEnvOptions {
|
||||
|
||||
@Command({
|
||||
name: 'switch-env',
|
||||
description: 'Switch the active Unraid API environment',
|
||||
})
|
||||
export class SwitchEnvCommand extends CommandRunner {
|
||||
private parseStringToEnv(environment: string): 'production' | 'staging' {
|
||||
|
||||
Reference in New Issue
Block a user