From 30b7ff5a37fed1fee4141654a1149e28b61cd89f Mon Sep 17 00:00:00 2001 From: Merlin Beutlberger Date: Thu, 7 Nov 2019 13:54:33 +0100 Subject: [PATCH] [INTERNAL] Remove showHidden- and rename showDetails parameters Rename parameter "showDetails" to "simpleIndex" with negated meaning Depends on https://github.com/SAP/ui5-server/pull/256 --- lib/cli/commands/serve.js | 16 ++++------------ test/lib/cli/commands/serve.js | 17 +++++------------ 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/lib/cli/commands/serve.js b/lib/cli/commands/serve.js index 14019b69..29a2bdc0 100644 --- a/lib/cli/commands/serve.js +++ b/lib/cli/commands/serve.js @@ -25,16 +25,9 @@ serve.builder = function(cli) { default: false, type: "boolean" }) - .option("show-hidden", { - describe: "Show hidden files in the server directory listing.", - default: true, - alias: "hidden", - type: "boolean" - }) - .option("show-details", { - describe: "Show a detailed table view in the server directory listing.", - default: true, - alias: "details", + .option("simple-index", { + describe: "Use a simplified view for the server directory listing", + default: false, type: "boolean" }) .option("accept-remote-connections", { @@ -99,8 +92,7 @@ serve.handler = async function(argv) { port, changePortIfInUse, h2: argv.h2, - showHidden: argv.showHidden, - showDetails: argv.showDetails, + simpleIndex: !!argv.simpleIndex, acceptRemoteConnections: !!argv.acceptRemoteConnections, cert: argv.h2 ? argv.cert : undefined, key: argv.h2 ? argv.key : undefined, diff --git a/test/lib/cli/commands/serve.js b/test/lib/cli/commands/serve.js index 1a003692..577110e2 100644 --- a/test/lib/cli/commands/serve.js +++ b/test/lib/cli/commands/serve.js @@ -15,10 +15,7 @@ const defaultInitialHandlerArgs = Object.freeze({ loglevel: "info", t8r: "npm", translator: "npm", - showHidden: true, - showDetails: true, - hidden: true, - details: true + simpleIndex: false }); const projectTree = { @@ -60,8 +57,7 @@ test.serial("ui5 serve: default", async (t) => { changePortIfInUse: true, acceptRemoteConnections: false, h2: false, - showHidden: true, - showDetails: true, + simpleIndex: false, port: 8080, cert: undefined, key: undefined, @@ -98,8 +94,7 @@ test.serial("ui5 serve --h2", async (t) => { changePortIfInUse: true, acceptRemoteConnections: false, h2: true, - showHidden: true, - showDetails: true, + simpleIndex: false, port: 8443, key: "randombyte-likes-ponies-key", cert: "randombyte-likes-ponies-cert", @@ -171,8 +166,7 @@ test.serial("ui5 serve --key --cert", async (t) => { changePortIfInUse: true, acceptRemoteConnections: false, h2: true, - showHidden: true, - showDetails: true, + simpleIndex: false, port: 8443, key: "ponies-loaded-from-custompath-key", cert: "ponies-loaded-from-custompath-crt", @@ -217,8 +211,7 @@ test.serial("ui5 serve --sap-csp-policies", async (t) => { changePortIfInUse: true, acceptRemoteConnections: false, h2: false, - showHidden: true, - showDetails: true, + simpleIndex: false, port: 8080, cert: undefined, key: undefined,