From a70bf78c7bb77a3495dd3c262a5c6174abb072fd Mon Sep 17 00:00:00 2001 From: Merlin Beutlberger Date: Fri, 30 Jun 2023 16:30:18 +0200 Subject: [PATCH 1/2] [INTERNAL] build: Add details to include-dependency options As per feedback provided in https://github.com/SAP/ui5-tooling/issues/841#issuecomment-1613164131, explain that the provided dependency names must match the ui5.yaml names and not the npm module names. --- lib/cli/commands/build.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/cli/commands/build.js b/lib/cli/commands/build.js index 6fe1a6a4..af87ce1a 100644 --- a/lib/cli/commands/build.js +++ b/lib/cli/commands/build.js @@ -27,7 +27,8 @@ build.builder = function(cli) { middlewares: [baseMiddleware] }) .option("include-all-dependencies", { - describe: "Include all dependencies in the build result", + describe: "Include all dependencies in the build result. " + + "This is equivalent to '--include-dependency \"*\"'", alias: ["all", "a"], default: false, type: "boolean" @@ -35,7 +36,8 @@ build.builder = function(cli) { .option("include-dependency", { describe: "A list of dependencies to be included in the build result. You can use the asterisk '*' as" + " an alias for including all dependencies in the build result. The listed dependencies cannot be" + - " overruled by dependencies defined in 'exclude-dependency'.", + " overruled by dependencies defined in 'exclude-dependency'. " + + "The provided name must match with the dependency name shown in 'ui5 ls --flat'", type: "string", array: true }) @@ -54,7 +56,8 @@ build.builder = function(cli) { }) .option("exclude-dependency", { describe: "A list of dependencies to be excluded from the build result. The listed dependencies can" + - " be overruled by dependencies defined in 'include-dependency'.", + " be overruled by dependencies defined in 'include-dependency'. " + + "The provided name must match with the dependency name shown in 'ui5 ls --flat'", type: "string", array: true }) From 22927ee9dbd62e3254e5b2cdece2750f10a6578c Mon Sep 17 00:00:00 2001 From: Merlin Beutlberger Date: Fri, 30 Jun 2023 16:33:52 +0200 Subject: [PATCH 2/2] [INTERNAL] log-level & cache-mode: Do not list choices in description Yargs already renders them in a sufficient way. Therefore remove them from the description. --- lib/cli/base.js | 2 +- lib/cli/commands/build.js | 2 +- lib/cli/commands/serve.js | 2 +- lib/cli/commands/tree.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/cli/base.js b/lib/cli/base.js index 733e6a0a..7bc4893e 100644 --- a/lib/cli/base.js +++ b/lib/cli/base.js @@ -27,7 +27,7 @@ export default function(cli) { }) .option("loglevel", { alias: "log-level", - describe: "Set the logging level (silent|error|warn|info|perf|verbose|silly).", + describe: "Set the logging level", default: "info", type: "string", choices: ["silent", "error", "warn", "info", "perf", "verbose", "silly"] diff --git a/lib/cli/commands/build.js b/lib/cli/commands/build.js index af87ce1a..6a3ac495 100644 --- a/lib/cli/commands/build.js +++ b/lib/cli/commands/build.js @@ -106,7 +106,7 @@ build.builder = function(cli) { }) .option("cache-mode", { describe: - "Cache mode to use when consuming SNAPSHOT versions of a framework: 'Default', 'Force', or 'Off'. " + + "Cache mode to use when consuming SNAPSHOT versions of framework dependencies. " + "The 'Default' behavior is to invalidate the cache after 9 hours. 'Force' uses the cache only and " + "does not create any requests. 'Off' invalidates any existing cache and updates from the repository", type: "string", diff --git a/lib/cli/commands/serve.js b/lib/cli/commands/serve.js index c9a82028..ec2b0437 100644 --- a/lib/cli/commands/serve.js +++ b/lib/cli/commands/serve.js @@ -67,7 +67,7 @@ serve.builder = function(cli) { }) .option("cache-mode", { describe: - "Cache mode to use when consuming SNAPSHOT versions of a framework: 'Default', 'Force', or 'Off'. " + + "Cache mode to use when consuming SNAPSHOT versions of framework dependencies. " + "The 'Default' behavior is to invalidate the cache after 9 hours. 'Force' uses the cache only and " + "does not create any requests. 'Off' invalidates any existing cache and updates from the repository", type: "string", diff --git a/lib/cli/commands/tree.js b/lib/cli/commands/tree.js index b9d80f37..dbfa55c4 100644 --- a/lib/cli/commands/tree.js +++ b/lib/cli/commands/tree.js @@ -29,7 +29,7 @@ tree.builder = function(cli) { }) .option("cache-mode", { describe: - "Cache mode to use when consuming SNAPSHOT versions of a framework: 'Default', 'Force', or 'Off'. " + + "Cache mode to use when consuming SNAPSHOT versions of framework dependencies. " + "The 'Default' behavior is to invalidate the cache after 9 hours. 'Force' uses the cache only and " + "does not create any requests. 'Off' invalidates any existing cache and updates from the repository", type: "string",