From 2fd8795ade0680807eae6ba2b13786f98119bd90 Mon Sep 17 00:00:00 2001 From: Joel Clemence <15887464+JoelClemence@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:30:40 +0100 Subject: [PATCH] Add descriptions to logs and reload commands (#69) --- README.md | 20 ++++++++++++++++++++ src/commands/logs.ts | 2 ++ src/commands/reload.ts | 3 +++ 3 files changed, 25 insertions(+) diff --git a/README.md b/README.md index 03f7245..6942717 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,8 @@ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomp ## `chs-dev compose-logs [SERVICENAME]` +Outputs the logs for services and compose logs (i.e. logs from 'up' and 'down' commands) + ``` USAGE $ chs-dev compose-logs [SERVICENAME...] [-C] [-f] [-n ] @@ -219,6 +221,9 @@ FLAGS -f, --follow Follow the logs -n, --tail= [default: all] Number of lines from the end of the logs +DESCRIPTION + Outputs the logs for services and compose logs (i.e. logs from 'up' and 'down' commands) + ALIASES $ chs-dev service-logs $ chs-dev compose-logs @@ -393,6 +398,8 @@ ALIASES ## `chs-dev logs [SERVICENAME]` +Outputs the logs for services and compose logs (i.e. logs from 'up' and 'down' commands) + ``` USAGE $ chs-dev logs [SERVICENAME...] [-C] [-f] [-n ] @@ -405,6 +412,9 @@ FLAGS -f, --follow Follow the logs -n, --tail= [default: all] Number of lines from the end of the logs +DESCRIPTION + Outputs the logs for services and compose logs (i.e. logs from 'up' and 'down' commands) + ALIASES $ chs-dev service-logs $ chs-dev compose-logs @@ -457,16 +467,23 @@ DESCRIPTION ## `chs-dev reload SERVICE` +Rebuilds and restarts the supplied service running in development mode to load in any changes to source code + ``` USAGE $ chs-dev reload SERVICE ARGUMENTS SERVICE Name of the service + +DESCRIPTION + Rebuilds and restarts the supplied service running in development mode to load in any changes to source code ``` ## `chs-dev service-logs [SERVICENAME]` +Outputs the logs for services and compose logs (i.e. logs from 'up' and 'down' commands) + ``` USAGE $ chs-dev service-logs [SERVICENAME...] [-C] [-f] [-n ] @@ -479,6 +496,9 @@ FLAGS -f, --follow Follow the logs -n, --tail= [default: all] Number of lines from the end of the logs +DESCRIPTION + Outputs the logs for services and compose logs (i.e. logs from 'up' and 'down' commands) + ALIASES $ chs-dev service-logs $ chs-dev compose-logs diff --git a/src/commands/logs.ts b/src/commands/logs.ts index d079c6e..e750b76 100644 --- a/src/commands/logs.ts +++ b/src/commands/logs.ts @@ -4,6 +4,8 @@ import configLoader from "../helpers/config-loader.js"; import { ComposeLogViewer } from "../run/compose-log-viewer.js"; export default class Logs extends Command { + static description = "Outputs the logs for services and compose logs (i.e. logs from 'up' and 'down' commands)"; + static aliases: string[] = ["service-logs", "compose-logs"]; /** diff --git a/src/commands/reload.ts b/src/commands/reload.ts index 968b758..d3e54ad 100644 --- a/src/commands/reload.ts +++ b/src/commands/reload.ts @@ -6,6 +6,9 @@ import { DependencyCache } from "../run/dependency-cache.js"; export default class Reload extends Command { + static description = "Rebuilds and restarts the supplied service running " + + "in development mode to load in any changes to source code"; + static args = { service: Args.string({ required: true,