Blog

CommandBox 5.4.0 Released!

Brad Wood August 18, 2021

Spread the word

Brad Wood

August 18, 2021

Spread the word


Share your thoughts

We are pleased to announce the release of CommandBox 5.4.0.  A minor update containing 30 bug fixes and enhancements that has been 3 months in the making.  Our focus for this release was cleaning up some rough edges left from the 5.3.x enhancements, improvements to the CLI to support the latest modules, and enhancements to automation around environment variables.  

Details

The docs are updated and available here:

https://commandbox.ortusbooks.com/

The downloads are here:

https://www.ortussolutions.com/products/commandbox#download

New Stuff

Here's an overview of some of the more notable changes in this release.

web.xml Overrides

When you start an Adobe or Lucee CF Engine, the WAR CommandBox uses has a stock web.xml baked into it.  Sometimes you may want to add custom servlets, servlet mappings, etc into your server.  You can override the stock web.xml in part or in total with a file of your own which you specify in the server.json like so:

{
  "app" : {
    "webXMLOverride" : "path/to/web-override.xml"
  }
}

More info here: 

https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/web.xml-overrides

Funky Parameters


In addition to quoting parameter values, parameter names can also be quoted.  This is useful when setting keys into settings or JSON files that have spaces, hyphens or special characters.  Each of these examples are now supported:

# quoted string
package set foo."bar.baz"=bum

# bracketed string
package set foo[bar.baz]=bum

# quoted, bracketed string
package set foo["bar.baz"]=bum

More info here:

https://commandbox.ortusbooks.com/usage/parameters

Library updates

Lucee Server has been updated to 5.3.8.201 and JBoss Undertow has been updated to 2.2.10.Final.  The Lucee update, as usual, applies to the CLI as well as the default server you get when you run server start.

Smarter Jar Endpoint

When you install a Jar via HTTP URL and the version number is baked into the URL, the jar endpoint now makes more assumptions about what the version of the package is that allows it to optimize the update checks and eliminate unnecessary downloads. 

More info here:

https://commandbox.ortusbooks.com/package-management/code-endpoints/jar-via-http#semantic-versioning

ask and confirm commands

Here are some fun commands for user interactivity in the shell.  You can use these as part of a recipe or a nice "one-liner".

ask

The ask command is similar to the ask() method in Task Runners.  It requires an interactive terminal and will ask the user a question and return their answer.  It is meant to be changed with other commands.

set color=`ask "favorite Color? "`
echo "you said ${Setting: color not found}"

or with default values

ask question="Who is cool? " defaultResponse="Balbino!"

or with masked input

ask question="What is your password? " mask=*

Or fun stuff like this

ask "Secret phrase: " | assertEqual "mockingbird" || echo "access denied!" && exit 1

confirm

The confirm command will ask the user a yes/no question and return a passing or failing exit code from the command based on the answer.

confirm "do you want to update your packages? " && update

Remember the && operator will only execute the second command if the first command returns an exit code of 0.

More info here:

https://commandbox.ortusbooks.com/helpful-commands/ask-and-confirm

server prune command

You can easily forget all servers which have not been started for a certain period of time with the server prune command.  It accepts the number of days that need to have passed since a server was last started in order to prune it.

server prune days=30

# Skip the confirmation check
server prune --force

More info here: 

https://commandbox.ortusbooks.com/embedded-server/manage-servers#prune-old-servers

Release Notes

Here are the full release notes for CommandBox 5.4.0

Bug

COMMANDBOX-1364 Cancelling a prompt with active job doesn't clear job logs

COMMANDBOX-1361 Param tab completion is off-by-one when piping

COMMANDBOX-1360 Can't list files in directory with brackets ( [ or ] ) in the name

COMMANDBOX-1356 forgebox timeout is too small when publishing packages

COMMANDBOX-1354 dir command returns no results in drive root

COMMANDBOX-1353 Summary over 200 chars in box.json causes error when publishing

COMMANDBOX-1352 Addition of Apache logging classes breaks 3rd party libs using it

COMMANDBOX-1350 Installing a system module as one-off command doesn't clear wirebox metadata cache

COMMANDBOX-1348 Commenting server rules doesn't work correctly in text files

COMMANDBOX-1346 CommandDSL doesn't handle struct args

COMMANDBOX-1344 create a server prune command

COMMANDBOX-1339 Server start can hang when CF engine blows up

COMMANDBOX-1338 Tab complete doesn't work after a pipe

COMMANDBOX-1337 Working dir of server custom menu items doesn't default properly

COMMANDBOX-1336 Error when setting failing exist code in Task Runner

COMMANDBOX-1334 updating commandbox to 5.3.1 via Homebrew breaks with a java error

COMMANDBOX-1333 Rewrite rule with query string doubles up question mark

COMMANDBOX-1332 printTable column validation breaks with spaces in list

COMMANDBOX-1330 Directory listing not showing folders properly when names are numeric

COMMANDBOX-1230 Certain Java installs fail version check

Improvement

COMMANDBOX-1366 ask and confirm command to capture user input from shell

COMMANDBOX-1365 Improve version handling in JAR endpoint

COMMANDBOX-1351 Update to Lucee 5.3.8

COMMANDBOX-1347 Support dots in struct keys with set/show/clear commands

COMMANDBOX-1342 printTable custom header names for non-array input

COMMANDBOX-1331 Add printTable check for data with no columns

COMMANDBOX-1329 Sort column names in printTable --debug

New Feature

COMMANDBOX-1362 Set env vars directly in server.json for local one-off overrides

COMMANDBOX-1011 Support web.xml Overrides

Task

COMMANDBOX-1363 Update to Undertow 2.2.10.Final

Add Your Comment

Recent Entries

ColdBox Mail Services 2.0 - Fluent Mail For All

ColdBox Mail Services 2.0 - Fluent Mail For All

We are so excited to bring you a major release of our cbmailservices module. This module has been around since our initial versions of ColdBox and it has now matured into a modern and fluent library for sending mail.

Luis Majano
Luis Majano
November 08, 2021
FORGEBOX 6 has landed!

FORGEBOX 6 has landed!

After several months of work, we are proud to announce the release of FORGEBOX 6. This has been a major undertaking spawning several months worth of work, a complete UI revamp for registered users, many bug fixes, multi-key API, and much more. We have also introduced our new Business Accounts with the ability for organizations to have a simple and human way of managing their final package releases and their teams.

Javier Quintero
Javier Quintero
October 26, 2021
CommandBox 5.4.2 Released!

CommandBox 5.4.2 Released!

There is a new update for CommandBox CLI available.  Version 5.4.2 is a patch update that contains a few bug fixes including two important ones. 

  • There is a fix for a regression introduced in 5.4.0 where updating the version of a CF engine doesn't work without forgetting the server first. 
  • There is also an important security impro...

Brad Wood
Brad Wood
October 07, 2021