Skip to content

Commit

Permalink
[INTERNAL] Remove showHidden- and rename showDetails parameters
Browse files Browse the repository at this point in the history
Rename parameter "showDetails" to "simpleIndex" with negated meaning

Depends on SAP/ui5-server#256
  • Loading branch information
RandomByte committed Nov 7, 2019
1 parent 2a785d5 commit 30b7ff5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
16 changes: 4 additions & 12 deletions lib/cli/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down Expand Up @@ -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,
Expand Down
17 changes: 5 additions & 12 deletions test/lib/cli/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 30b7ff5

Please sign in to comment.