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

The Hidden Costs of In-House Database Management

The Hidden Costs of In-House Database Management

The Hidden Costs of In-House Database Management


Opting for in-house database management involves more than just a salary. Here are some often-overlooked costs associated with maintaining your own DBA team.



1. High Salaries and Benefits


Hiring skilled DBAs is expensive. According to industry reports, the average salary of a DBA in the U.S. can range from $85,000 to over $130,000 per year, depending on experience and expertise. When you add ...

Cristobal Escobar
Cristobal Escobar
November 20, 2024
5 Signs It’s Time to Modernize Your ColdFusion / CFML Application

5 Signs It’s Time to Modernize Your ColdFusion / CFML Application

ColdFusion has long been a reliable platform for building web applications, but like any technology, it requires maintenance and modernization over time. Whether you're using Lucee or Adobe ColdFusion, it’s critical to recognize the signs that your application is no longer meeting today’s standards in performance, security, and scalability. Let’s explore five clear indicators that it’s time to modernize your ColdFusion application and how ColdFusion consulting can help breathe new life into y...

Cristobal Escobar
Cristobal Escobar
November 19, 2024
ColdBox Free Tip 5 - Building Named Routes with a Struct

ColdBox Free Tip 5 - Building Named Routes with a Struct

**Did you know ColdBox provides flexible ways to build routes using structs?** In this tip, we’ll cover how to use the `event.buildLink()` and `event.route()` methods for named routes, a feature that’s especially handy when working with dynamic URLs.

Maria Jose Herrera
Maria Jose Herrera
November 19, 2024