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:
Eli Bosley
2025-02-06 13:39:30 -05:00
committed by GitHub
parent e7b7caae43
commit 19f9261025
5 changed files with 5 additions and 4 deletions

View File

@@ -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();

View File

@@ -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,

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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' {