arrow-left

All pages
gitbookPowered by GitBook
1 of 11

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

5.x Versions

In this section you will find the release notes for the 5.x version of CommandBox.

  • Version 5.4.2 - October 2021

  • Version 5.4.1 - September 2021

  • - August 2021

  • - May 2021

  • - Dec 2020

  • - Nov 2020

  • - June 2020

  • - May 2020

  • - Mar 2020

What's New in 5.1.1

This release was primarily to address a regression in 5.1.0 affecting Mac OS users who tried to start Lucee servers. If you see an error similar to this on a Lucee server and you're running a Mac and CommandBox 5.1.0, then this release will fix it for you.

If you are upgrading from CommandBox 5.1.0, there are only a handful of tickets which are listed below. If you are updating from an earlier version of CommandBox, please check out our and release blogs.

hashtag
Release notes

Version 5.4.0
Version 5.3.0
Version 5.2.1
Version 5.2.0
Version 5.1.1
Version 5.1.0
Version 5.0.0
hashtag
Bug
  • [COMMANDBOX-1107arrow-up-right] - Overzealous gitignore matching of parent directories when zipping up for ForgeBox storage

  • [COMMANDBOX-1173arrow-up-right] - Enabling SSL results in some CFHTTP requests to fail.

  • [COMMANDBOX-1178arrow-up-right] - writedump failing in Lucee

  • [] - File globbing matching partial file names

hashtag
Improvement

  • [COMMANDBOX-1181arrow-up-right] - Allow for verbose startup without debug logging of requests

5.0.0arrow-up-right
5.1.0arrow-up-right
lucee.runtime.exp.NativeException: mac os x is not a supported OS platform.
COMMANDBOX-1179arrow-up-right

What's New in 5.4.1

hashtag
Release Notes

Bug

COMMANDBOX-1374arrow-up-right Some installs unnecessarily write to the box.json

COMMANDBOX-1370arrow-up-right ConfigService::settingExists() fails in race conditions due to non-varscoped variables in JSONService

hashtag
Improvement

Support excludePaths in watcher DSL and watch command

Ensure Adobe wars have a seeds.properties file

Add tab complete for "env clear" command

Ignore empty startScript on server start

What's New in 5.3.1

hashtag
Updated bundled Java libraries

  • JLine - 3.19.0

COMMANDBOX-1372arrow-up-right
COMMANDBOX-1369arrow-up-right
COMMANDBOX-1368arrow-up-right
COMMANDBOX-1367arrow-up-right
jGit - 5.11.0.202103091610-r
  • Launch4j - 3.14

  • JANSI - 2.3.2

  • hashtag
    Recursive jar scanning libDirs

    When you configure libDirs for a server, CommandBox used to only load jar files found in the root. Now it will include sub directories which gives you more flexibility around how to install your jars.

    hashtag
    New printTable Command

    In the previous release, we introduced a new helper for printing ASCII Art tables in your custom commands and task runners. We've taken this a step further and wrapped the table printer utiilty in a new command so you can use it from the CLI directly. We've also expanded its functionality to accept ANY data in as JSON and it will marshall it into a query for you. This means it can be a query, an array of structs, an array or arrays, and more. You can now get quick and easy visualization of any data right from the CLI or in builds.

    hashtag
    New sql command for on-the-fly manipulation of data

    As if the previous command isn't cool enough, we've also added a new "sql" command which will also accept any sort of data as JSON, marshall it into a query object and allow you to alias, filter, order, and limit the rows on the fly using CFML's query of queries!

    The sql command works very nicely with the new tablePrinter command, and truly makes JSON a first class citizen of the CommandBox CLI.

    hashtag
    Small change to print.table() helper

    We've made a small adjustment to the print.table() helper that was introduced in CommandBox 5.3.1 as follows. The old method signature is

    And the new method signature is:

    The parameters to the new printTable command matches the NEW method signature of the print.table() helper as well.

    hashtag
    Format XML in REPL

    When working with XML in the REPL, formatting is now applied when the XML is printed out to the console, making it easier to read (same as JSON)

    hashtag
    Release Notes

    hashtag
    Bug

    COMMANDBOX-1320arrow-up-right Server stop doesn't message user when it fails

    COMMANDBOX-1319arrow-up-right Stop loading cfusion/lib in system class loader

    COMMANDBOX-1318arrow-up-right 5.3.0 errors with commandbox-dotenv 1.x versions due to WireBox change

    COMMANDBOX-1314arrow-up-right When building Lucee war from local jars, seeded web.xml file is ignored

    COMMANDBOX-1311arrow-up-right Table printer error with no rows

    COMMANDBOX-1310arrow-up-right update '{slug}' fails as it is trying to print the package version and its dependencies.

    COMMANDBOX-1308arrow-up-right Relative Web Alias Behavior (regression)

    COMMANDBOX-1307arrow-up-right jq doesn't resolve file paths to current working directory

    COMMANDBOX-1303arrow-up-right CFEngine adobe - Could not initialize class coldfusion.vfs.VFile when using s3 protocol

    hashtag
    Improvement

    COMMANDBOX-1328arrow-up-right Improve performance of piping large strings to "cfml" command

    COMMANDBOX-1317arrow-up-right Format XML in REPL

    COMMANDBOX-1316arrow-up-right Change default CLI JSON representation of query to array of structs

    COMMANDBOX-1306arrow-up-right Allow upgrade command to pull stable versions when CLI is a prerelease version

    COMMANDBOX-1305arrow-up-right Update bundled java libraries

    COMMANDBOX-1302arrow-up-right app.libDirs does not load jars/classes recursively from sub folders

    COMMANDBOX-1210arrow-up-right Allow for relative URLs when defining trayoption elements

    COMMANDBOX-1194arrow-up-right Add Libraries To Runwar Necessary For URLRewrite Proxy

    hashtag
    New Feature

    COMMANDBOX-1324arrow-up-right New "printTable" command to add CLI usage of table printer

    COMMANDBOX-1323arrow-up-right New "sql" command to filter tabular data with SQL

    COMMANDBOX-1321arrow-up-right Add --verbose to 'server stop' to see raw output

    COMMANDBOX-1309arrow-up-right Add printTable command that proxies to print.table() helper

    # Jar installs to lib/jline-3.0.0.M1/jline-3.0.0.M1.jar
    install "jar:https://search.maven.org/remotecontent?filepath=jline/jline/3.0.0.M1/jline-3.0.0.M1.jar"
    
    # Load up the jar when the server starts
    server set app.libDirs=lib
    # array of structs
    printTable [{a:1,b:2},{a:3,b:4},{a:5,b:6}]
    
    ╔═══╤═══╗
    ║ a │ b ║
    ╠═══╪═══╣
    ║ 1 │ 2 ║
    ╟───┼───╢
    ║ 3 │ 4 ║
    ╟───┼───╢
    ║ 5 │ 6 ║
    ╚═══╧═══╝
    
    # array of arrays
    printTable data=[[1,2],[3,4],[5,6]] headerNames=foo,bar
    
    ╔═════╤═════╗
    ║ foo │ bar ║
    ╠═════╪═════╣
    ║ 1   │ 2   ║
    ╟─────┼─────╢
    ║ 3   │ 4   ║
    ╟─────┼─────╢
    ║ 5   │ 6   ║
    ╚═════╧═════╝
    
    # Query object
    #extensionlist | printTable name,version
    
    ╔═════════════════════════════════════════╤═══════════════════╗
    ║ name                                    │ version           ║
    ╠═════════════════════════════════════════╪═══════════════════╣
    ║ MySQL                                   │ 8.0.19            ║
    ╟─────────────────────────────────────────┼───────────────────╢
    ║ Microsoft SQL Server (Vendor Microsoft) │ 6.5.4             ║
    ╟─────────────────────────────────────────┼───────────────────╢
    ║ PostgreSQL                              │ 9.4.1212          ║
    ╟─────────────────────────────────────────┼───────────────────╢
    ║ Ajax Extension                          │ 1.0.0.3           ║
    ╚═════════════════════════════════════════╧═══════════════════╝
    
    # JSON list of all servers
    server list --json | printTable name,host,port,status
    
    ╔══════════════════════════════╤═════════════════════════════╤═══════╤═════════╗
    ║ name                         │ host                        │ port  │ status  ║
    ╠══════════════════════════════╪═════════════════════════════╪═══════╪═════════╣
    ║ servicetest                  │ 127.0.0.1                   │ 54427 │ stopped ║
    ╟──────────────────────────────┼─────────────────────────────┼───────┼─────────╢
    ║ servicetest2                 │ 127.0.0.1                   │ 52919 │ stopped ║
    ╟──────────────────────────────┼─────────────────────────────┼───────┼─────────╢
    ║ FRDemos                      │ 127.0.0.1                   │ 50458 │ stopped ║
    ╚══════════════════════════════╧═════════════════════════════╧═══════╧═════════╝
    # filter, sort, limit, and select extensions installed into the CLI (output as table)
    #extensionlist  | sql select=id,name where="name like '%sql%'" orderby=name limit=3 | printTable
    
    # order and select JSON data from a file (output as JSON)
    cat myfile.json | sql select=col1,col2 orderby=col2
    
    # limit JSON (output as table)
    sql data=[{a:1,b:2},{a:3,b:4},{a:5,b:6}] where="a > 1" | printTable
    
    public string function print(
    	required any headers,
    	array data=[],
    	string includeHeaders        
    ) {
    public string function print(
    	required any data=[],
    	any includedHeaders="",
    	any headerNames="",
    	boolean debug=false
    ) {
    ❯ repl "XMLParse( '<root><brad>wood</brad></root>' )"
    
    <?xml version="1.0" encoding="utf-8"?><root>
      <brad>wood</brad>
    </root>

    What's New in 5.2.1

    There is now a new "forgebox logout" command you can use for testing or just to remove your API token from the local CLI.

    You can change CommandBox's default tab completion to be an inline list that follows your cursor. This setting requires you to close and re-open the shell to take affect.

    Read more here:

    https://commandbox.ortusbooks.com/config-settings/misc-settings#tabcompleteinlinearrow-up-right

    We've added better debugging information for Server Profiles. If you add the --verbose flag to your server start, you'll be able to see what profile was detected for your server, and what baked-in rules have been turned on as a result.

    We've added a new Single Server Mode you can enable in the CLI to make using CommandBox in Docker images easier.

    Read more here:

    hashtag
    Release Notes

    Here are the release notes for the 5.2.1 release.

    hashtag
    Bug

    • [] - Installing via lex endpoint uses incorrect file extension

    • [] - Location of predicate file is in a folder that the Docker finalization script deletes

    • [] - Command alas for run command doesn't expand properly

    hashtag
    New Feature

    • [] - Add config setting to activate JLine's AUTO_MENU_LIST

    • [] - forgebox logout command

    hashtag
    Improvement

    • [] - verbose server start output for profile and security settings

    • [] - Extend ${} scopes to apply to any getSetting() call or "env show" command

    • [] - Modules aren't unloaded on reload or shutdown

    # Logout one user
    forgebox logout username
    
    # logout all users
    forgebox logout
    config set tabCompleteInline=true
    |------------------------------
       | √ | Setting Server Profile to [development]
       |   |------------------------------------------------------
       |   | Profile set from "environment" env var
       |   | Block CF Admin disabled
       |   | Block Sensitive Paths enabled
       |   | Block Flash Remoting enabled
       |   | Directory Browsing enabled
       |   |------------------------------------------------------

    [] - Add debug output that shows location of commandbox.properties file on start

  • [] - Add single server mode for CommandBox in a Docker container

  • [] - Add Testbox runner to sensitive paths in production profile

  • [] - Use UTF-8 when reading files with "cat" command

  • https://commandbox.ortusbooks.com/embedded-server/single-server-modearrow-up-right
    COMMANDBOX-1231arrow-up-right
    COMMANDBOX-1232arrow-up-right
    COMMANDBOX-1238arrow-up-right
    COMMANDBOX-1237arrow-up-right
    COMMANDBOX-1240arrow-up-right
    COMMANDBOX-1227arrow-up-right
    COMMANDBOX-1228arrow-up-right
    COMMANDBOX-1229arrow-up-right
    COMMANDBOX-1233arrow-up-right
    COMMANDBOX-1234arrow-up-right
    COMMANDBOX-1236arrow-up-right
    COMMANDBOX-1241arrow-up-right

    What's New in 5.1.0

    hashtag
    Java 14 support

    Java 14 is now supported in CommandBox 5.1.0. In order to support Java 14, we had to stop using Pack200 which means the binary sizes have grown a little. The good news is CommandBox will start up a little faster on its first run since there's less to unpack now.

    hashtag
    Start pure HTML Server

    You can start up a lightweight server that only serves static files now with CommandBox.

    hashtag
    New CommandBox Light and CommandBox Thin Binaries

    In pursuit of the smallest possible Docker images, we have CommandBox light which is built on Lucee Light. We also have a box "thin" binary you can swap out with the full self-extracting binary when using CommandBox in custom docker images. Check out Pete Freitag's to see both of these in use in a super tiny 78 Meg docker image. More docs here:

    hashtag
    Force working directory when starting

    If you're using box in an integration where you want it to start up in a specific working directory, there is a new bootstrap CLI arg for that.

    hashtag
    Server tray menu item custom commands

    You've always been able to specify custom menu items in your server.json or global config settings, but we've kicked it up a notch. Not only can you contribute to existing sub menus now, you can execute arbitrary native commands synchronously or async.

    hashtag
    Release Notes

    Here's the full list of tickets closed down in the 5.1.0 release.

    hashtag
    Bug

    • [] - Runwar deadlocks when using Lucee server warmup flag

    • [] - Server start console output isn't always formatted correctly

    • [] - Boolean env var causes error on server start

    hashtag
    New Feature

    • [] - Allow arbitrary actions for menu items

    • [] - Allow to start a pure HTML server

    • [] - Update ColdBox Templates to new standards

    hashtag
    Task

    • [] - Add Java version as info log

    hashtag
    Improvement

    • [] - Provide way to disable server instance icon in MacOS dock

    • [] - Add --full flag to dir command to output full path

    • [] - Rework the server list command so it is more performant

    What's New in 5.4.0

    hashtag
    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:

    More info here:

    hashtag
    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:

    More info here:

    hashtag
    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.

    hashtag
    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:

    hashtag
    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".

    hashtag
    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.

    or with default values

    or with masked input

    Or fun stuff like this

    hashtag
    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.

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

    More info here:

    hashtag
    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.

    More info here:

    hashtag
    Release Notes

    Here are the full release notes for CommandBox 5.4.0

    hashtag
    Bug

    Cancelling a prompt with active job doesn't clear job logs

    Param tab completion is off-by-one when piping

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

    forgebox timeout is too small when publishing packages

    dir command returns no results in drive root

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

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

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

    Commenting server rules doesn't work correctly in text files

    CommandDSL doesn't handle struct args

    create a server prune command

    Server start can hang when CF engine blows up

    Tab complete doesn't work after a pipe

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

    Error when setting failing exist code in Task Runner

    updating commandbox to 5.3.1 via Homebrew breaks with a java error

    Rewrite rule with query string doubles up question mark

    printTable column validation breaks with spaces in list

    Directory listing not showing folders properly when names are numeric

    Certain Java installs fail version check

    hashtag
    Improvement

    ask and confirm command to capture user input from shell

    Improve version handling in JAR endpoint

    Update to Lucee 5.3.8

    Support dots in struct keys with set/show/clear commands

    printTable custom header names for non-array input

    Add printTable check for data with no columns

    Sort column names in printTable --debug

    hashtag
    New Feature

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

    Support web.xml Overrides

    hashtag
    Task

    Update to Undertow 2.2.10.Final

    {
      "app" : {
        "webXMLOverride" : "path/to/web-override.xml"
      }
    }
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/web.xml-overridesarrow-up-right
    https://commandbox.ortusbooks.com/usage/parametersarrow-up-right
    https://commandbox.ortusbooks.com/package-management/code-endpoints/jar-via-http#semantic-versioningarrow-up-right
    https://commandbox.ortusbooks.com/helpful-commands/ask-and-confirmarrow-up-right
    https://commandbox.ortusbooks.com/embedded-server/manage-servers#prune-old-serversarrow-up-right
    COMMANDBOX-1364arrow-up-right
    COMMANDBOX-1361arrow-up-right
    COMMANDBOX-1360arrow-up-right
    COMMANDBOX-1356arrow-up-right
    COMMANDBOX-1354arrow-up-right
    COMMANDBOX-1353arrow-up-right
    COMMANDBOX-1352arrow-up-right
    COMMANDBOX-1350arrow-up-right
    COMMANDBOX-1348arrow-up-right
    COMMANDBOX-1346arrow-up-right
    COMMANDBOX-1344arrow-up-right
    COMMANDBOX-1339arrow-up-right
    COMMANDBOX-1338arrow-up-right
    COMMANDBOX-1337arrow-up-right
    COMMANDBOX-1336arrow-up-right
    COMMANDBOX-1334arrow-up-right
    COMMANDBOX-1333arrow-up-right
    COMMANDBOX-1332arrow-up-right
    COMMANDBOX-1330arrow-up-right
    COMMANDBOX-1230arrow-up-right
    COMMANDBOX-1366arrow-up-right
    COMMANDBOX-1365arrow-up-right
    COMMANDBOX-1351arrow-up-right
    COMMANDBOX-1347arrow-up-right
    COMMANDBOX-1342arrow-up-right
    COMMANDBOX-1331arrow-up-right
    COMMANDBOX-1329arrow-up-right
    COMMANDBOX-1362arrow-up-right
    COMMANDBOX-1011arrow-up-right
    COMMANDBOX-1363arrow-up-right
    # 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
    set color=`ask "favorite Color? "`
    echo "you said ${Setting: color not found}"
    ask question="Who is cool? " defaultResponse="Balbino!"
    ask question="What is your password? " mask=*
    ask "Secret phrase: " | assertEqual "mockingbird" || echo "access denied!" && exit 1
    confirm "do you want to update your packages? " && update
    server prune days=30
    
    # Skip the confirmation check
    server prune --force

    [] - Output of foreach can't be piped

  • [] - Lucee Extension install doesn't recognize Lucee Light

  • [] - Package unlink command misspelled parameter moduleDirectory as moduleDrectory

  • [] - Package link command misspelled parameter moduleDirectory as moduleDrectory

  • [] - Tab complete doesn't work on Windows paths with backslashes

  • [] - CommandBox Watcher shows error on Ctrl-C

  • [] - Extension management doesn't "recognize" a Lucee server started with --dryRun

  • [] - Downgrading a package with install doesn't work without --force

  • [] - The run command doesn't always seem to kill interactive binaries

  • [] - Relative paths incorrect in drive root on *nix

  • [] - Using a warPath of ./ gets normalized to "" and then ignored in subsequent starts

  • [] - native commands with * can fail due to missing regex escape

  • [] - Incorrect serverInfo for a server that hasn't started

  • [] - Allow default working dir of box to be overridden

  • [] - Create box-thin binaries that don't bundle any libs

  • [] - Create CommandBox Light built that uses Lucee Light jar

  • [] - Add two new methods to commands for working with async futures: getCurrentThread() getThreadName()

  • [] - TestBox run commands now support the outputFormats argument to allow you to output post-test reports in many formats

  • [] - TestBox revamped UI for the CLI reporter

  • [] - Add Java info debug to box binary

  • [] - Bump to Lucee 5.3.6.61

  • [] - Tab complete for sort options in dir command

  • [] - Have the ProgressableDownloader send an Accept header

  • [] - Don't overwrite lucee-server.xml file when updating libs

  • [] - Auto-detect *unix distros with non-bash shells

  • [] - Copy lco files so Lucee server can start on CommandBox Light

  • [] - Reset console window title after `run` executes a process

  • https://commandbox.ortusbooks.com/v/5.1.0/embedded-server/start-html-serverarrow-up-right
    Minibox imagearrow-up-right
    https://commandbox.ortusbooks.com/v/5.1.0/setup/light-and-thin-binariesarrow-up-right
    https://commandbox.ortusbooks.com/v/5.1.0/usage/execution#custom-working-directoryarrow-up-right
    COMMANDBOX-1121arrow-up-right
    COMMANDBOX-1122arrow-up-right
    COMMANDBOX-1125arrow-up-right
    COMMANDBOX-1015arrow-up-right
    COMMANDBOX-1019arrow-up-right
    COMMANDBOX-1130arrow-up-right
    COMMANDBOX-1102arrow-up-right
    COMMANDBOX-1080arrow-up-right
    COMMANDBOX-1126arrow-up-right
    COMMANDBOX-1129arrow-up-right
    server start cfengine=none
    box -cliworkingDir=C:/my/path/here/
    {
        "trayOptions" : [
            {
                "label" : "Does the Internet work?",
                "action" : "run",
                "command" : "ping google.com"
            },
            {
                "label" : "Math is math!",
                "action" : "runAsync",
                "command" : "calc.exe"
            },
            {
                "label" : "Update dependencies",
                "action" : "runTerminal",
                "command" : "box update"
            }
        ]
    }
    COMMANDBOX-1127arrow-up-right
    COMMANDBOX-1133arrow-up-right
    COMMANDBOX-1135arrow-up-right
    COMMANDBOX-1137arrow-up-right
    COMMANDBOX-1140arrow-up-right
    COMMANDBOX-1144arrow-up-right
    COMMANDBOX-1148arrow-up-right
    COMMANDBOX-1151arrow-up-right
    COMMANDBOX-1152arrow-up-right
    COMMANDBOX-1154arrow-up-right
    COMMANDBOX-1166arrow-up-right
    COMMANDBOX-1176arrow-up-right
    COMMANDBOX-1177arrow-up-right
    COMMANDBOX-1145arrow-up-right
    COMMANDBOX-1146arrow-up-right
    COMMANDBOX-1147arrow-up-right
    COMMANDBOX-1153arrow-up-right
    COMMANDBOX-1170arrow-up-right
    COMMANDBOX-1171arrow-up-right
    COMMANDBOX-1172arrow-up-right
    COMMANDBOX-1132arrow-up-right
    COMMANDBOX-1134arrow-up-right
    COMMANDBOX-1143arrow-up-right
    COMMANDBOX-1150arrow-up-right
    COMMANDBOX-1155arrow-up-right
    COMMANDBOX-1156arrow-up-right
    COMMANDBOX-1168arrow-up-right

    What's New in 5.4.2

    • 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 improvement to CommandBox servers. Thanks to Abram Adams for reporting this to Ortus so we could address it.

    hashtag
    Release notes

    Note, the details of the security improvement have been tracked privately.

    hashtag
    Bug

    Java path shows up twice in "server info --verbose"

    Updating server in-place keeps old web.xml path

    recipe with multiple "install" instructions fails

    hashtag
    Improvement

    Add additional interceptData to server interceptors

    Update to WireBox 6.5.2

    Immediately activate modules after installation

    Improve multiselect DSL

    hashtag
    Story

    Add JSON and Properties output for info command

    COMMANDBOX-1382arrow-up-right
    COMMANDBOX-1381arrow-up-right
    COMMANDBOX-1375arrow-up-right
    COMMANDBOX-1380arrow-up-right
    COMMANDBOX-1379arrow-up-right
    COMMANDBOX-1376arrow-up-right
    COMMANDBOX-1349arrow-up-right
    COMMANDBOX-1120arrow-up-right

    What's New in 5.3.0

    hashtag
    Override Config Settings via Env Vars

    Every Config Setting can be overridden by convention by creating environment variables in the shell where you run box. This is ideal for CI builds where you want to easily set ForgeBox API keys, or tweak settings for your build.

    More Info: https://commandbox.ortusbooks.com/config-settings/env-var-overridesarrow-up-right

    hashtag
    Override Server Settings via Env Vars

    Every server setting can be overridden by convention by creating environment variables in the shell where you run box. This is ideal for CI builds where you want to easily set ports, or tweak settings for your build.

    More Info:

    hashtag
    HTTP/2 Support

    CommandBox now has out-of-the-box support for the HTTP/2 protocol. It is always enabled by default and browsers will use it when you're serving over HTTPS.

    More Info:

    hashtag
    JMES JSON filtering / jq Command

    Thanks to a massive effort from Scott Steinbeck, the CFML world has a new of the , which is what powers the popular . We've plugged this new library into CommandBox and exposed it in the following ways.

    We've added a new jq command which behaves roughly like the bash counterpart. You can pipe in JSON, or read the JSON from a file and apply a JSON query against it which can be used to filter, massage, rewrite, map, or filter the JSON into a new JSON object.

    We've also added the ability to specify powerful jq filters to the "package show", "server show", and "config show" commands directly. Just prefix your filter with the text "jq:" like so:

    The jq command and JMES spec are very powerful and probably do ! Make sure you check out the docs for more ideas.

    More Info:

    hashtag
    AJP Secret Support

    CommandBox's AJP listener (provided by Undertow) is already protected against the . However, if you would like to set up an AJP secret as well to ensure all requests coming into the AJP listener are from a trusted source, you can do this by setting the web.ajp.secret property.

    For this to work, you must also configure your AJP proxy in your web server to send the same secret!

    More info:

    hashtag
    AsyncManager Available to Task Runners and Commands

    We've updated the version of WireBox inside the CLI and now have access to the AsyncManager for sweet threading and scheduled task support.

    CommandBox is using an AsyncManager scheduled task thread now to redraw interactive jobs and progress bars. Look out for some new eye candy hiding in your server starts and package installs!

    More Info:

    hashtag
    New Table Printer

    The print helper in commands and Task Runners has a new toy that will print ASCII representations of tabular data thanks to a pull request from Eric Peterson. You can see it in the output of the outdated command.

    And you can use it in your Task Runners like so:

    hashtag
    ColdBox Scaffolding for REST Handlers

    When scaffolding ColdBox handlers, we have support for ColdBox 6.x REST Handlers now.

    hashtag
    Experimental Server Features

    You can enable extra Resource Manager Logging when troubleshooting file system issues:

    You can force case sensitivity on a Windows server:

    You can force case Insensitivity on a Linux server:

    You can enable a cache of file system lookups of servlet paths. This is only for production and will eliminate repeated file system hits by your CF engine, such as checking for an Application.cfc file on every request, or testing where the servlet context root is. Standard Adobe ColdFusion installations have a similar cache of "real" paths from the servlet context that is tied to a setting in the administrator called "Cache Webserver paths" but that setting is not available and does not work on CommandBox servers for some reason. This setting would apply to any CF engine.

    More Info:

    hashtag
    HTTPS Redirect/HSTS

    When using a CommandBox web server in production, you may wish to force your users to visit your site over HTTPS for security (and for HTTP/2 to work). However, it is desirable to still have your web server listening on HTTP so a user just typing your address in his browser can still connect to HTTP and then redirect. CommandBox can be configured to redirect all HTTP traffic over to HTTPS with the following setting.

    If you want to go one step further, you can add a Strict-Transport-Security header to your site. This instructs the browser to automatically use HTTPS every time the user visits your site again.

    More Info:

    hashtag
    Force Colored Output in your Builds

    CommandBox won't use ANSI color formatting when running inside of a non-interactive terminal. However, build servers such as Gitlab or Jenkins (via a plugin) support ANSI color sequences. You can force CommandBox to use colored text output with this new setting:

    hashtag
    Loose Semantic Version Parsing

    One of the common hangups for people dealing with Lucee Server and Adobe ColdFusion CF Engines versions, is that CommandBox follows the npm-flavor of the semantic version spec and expects

    instead of

    So we've loosened our sem ver library to treat the 4th number as a build ID if there is no plus sign in the version (instead of just discarding the 4th digit as the spec requires)

    hashtag
    Support for "localhost subdomains"

    Most modern browsers allow you to make up any subdomain you want before localhost such as mySite.localhost and will simply resolve them to localhost (127.0.0.1) even without a hosts file entry. CommandBox now supports using these domains and will bind your server's ports to localhost even without using the commandbox-hostupdater module.

    More Info:

    hashtag
    Relative CommandBox home

    You can customize where CommandBox lives by placing a commandbox.properties file next to the box binary. We have better support for relative paths now so you can have portable CommandBox installations such as a thumb drive.

    More Info:

    hashtag
    Halt Server If Port In Use (Breaking Change)

    The only known breaking change in this release is if you try to start two servers on the same HTTP port. Previously, CommandBox would just ignore the port on the second server and choose a random port. Due to the confusion that can cause, CommandBox will now throw an error. If you want to override an explicit port locally, set the port to an empty string or a 0 and CommandBox will choose a random port for you. For example, if you are using the commandbox-dotenv module, you can put this line in your project's .env file to override the port in your server.json

    hashtag
    Relative Web Alias Behavior (regression)

    If you have a server with the server.json outside of the web root and at least one relative web alias, the alias will not work on the first start of the server. The workaround is to change the web aliases to be relative to the folder that the server.json lives in.

    hashtag
    Incompatibility with old DotEnv module

    Some users receive the following error when starting CommandBox after updating:

    If you see this, it means you have an older version of the commandbox-dotenv module installed that is not compatible with the new version of WireBox inside CommandBox. To fix, delete this folder out of your CommandBox home:

    Now the CLI will start and you can install the latest version of dotenv.

    hashtag
    Release notes

    Here is the list of all tickets included in the 5.3.0 release.

    hashtag
    Bug

    web server aliases in server.json should be relative to the folder of the server.json

    ${Setting: serverinfo.foo not found} expansions don't work in a folder that's not the web root

    Re-using same server.json with two names doesn't work

    Corrupted WireBox metadata cache file will prevent CommandBox from starting

    HTTP2 Additional Port Handling and Flexibility

    REPL & Command highlighters don't handle square brackets [] well

    JVM arg ending in backslash doesn't work

    Coldbox Watch-Reinit Watches Unwanted Folders

    Package installation doesn't always optimize duplicate packages

    Globber.count() bombs if run after .asQuery()

    Starting [email protected] will use light-light when using CommandBox Light

    Loading class files in task runner doesn't work

    variables scope doesn't persist between task dependencies

    tokenreplace removes BOM from files

    trayOptions.json not respecting serverHomeDirectory

    Server status not always correct.

    hashtag
    Improvement

    Add singleServerHome option to not auto-deploy different versions of servers

    Improve error message if version isn't found in ForgeBox

    Loosen parsing of build ID in semver

    Treat empty HTTP port the same as 0 (chooses random port)

    Remove runwar hack that sets java vesrion

    Runwar timesout when Lucee's new warmup flag is used

    Add option for PID file

    Allow generic override of server start settings via env vars or java sys props

    Have parser ignore quotes inside a token

    Cache "/" path lookup in Runwar's mapped resource manager

    Add setters for run() arguments in CommandDSL

    Default embedded server only needs to copy lucee.jar

    Have outdated also show latest version of a package

    Integrate AsyncManager into CommandBox

    Upgrade to latest WireBox 6.x

    Bundle testbox in testbox module to prevent auto download

    Halt server start if asked for port is in use

    the git bullet train car disappears while current working directory is not the root project folder

    Support AJP secret in Undertow

    Rethink the way the screen is redrawn upon extensive installs so it can be fluent on all screen sizes

    Can't link package if no modules are installed

    New first-class setting to enable HTTP2

    Comment out the default environment vars in .env when createing a new coldbox app

    hashtag
    New Feature

    Allow server rules to be commented out with #

    Allow servers to use random.localhost domains

    Integrate JMES JSON filtering

    Debug when lucee-extensions don't find Lucee server

    Allow JSON service to create implicit arrays

    Add config setting to enable ANSI colors in dumb terminals

    Allow generic override of config settings via env vars or java sys props

    Add --json flag to server list

    Add HTTP redirect options

    Add optional servlet path cache in Runwar

    Allow caching of task runners

    Support for generating ColdBox RESTHandlers

    Support default module export as @moduleName,

    Allow commandbox_home to be relative

    box_config_endpoints_forgebox_APIToken=my-token-here
    
    # JSON which will be parsed
    box_config_proxy={ "server" : "localhost", "port": 80 }
    
    # dot-delimited keys (windows only)
    box_config_endpoints.forgebox.APIToken=my-token-here
    
    # array indexes too (windows only)
    box_config_foo.bar[baz].bum[1]=test
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/env-var-overridesarrow-up-right
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/server-port-and-host#http-2arrow-up-right
    CF implementationarrow-up-right
    JMES specarrow-up-right
    "jq" (or JSON Query) bash commandarrow-up-right
    much more than you realizearrow-up-right
    https://commandbox.ortusbooks.com/usage/jq-commandarrow-up-right
    Ghostcat vulnerabilityarrow-up-right
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/server-port-and-host#ajp-secretarrow-up-right
    https://commandbox.ortusbooks.com/task-runners/threading-async#asyncmanagerarrow-up-right
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/experimental-featuresarrow-up-right
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/https-redirect-hstsarrow-up-right
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/server-port-and-host#a-gracious-hostarrow-up-right
    https://commandbox.ortusbooks.com/setup/installationarrow-up-right
    COMMANDBOX-1301arrow-up-right
    COMMANDBOX-1300arrow-up-right
    COMMANDBOX-1291arrow-up-right
    COMMANDBOX-1276arrow-up-right
    COMMANDBOX-1275arrow-up-right
    COMMANDBOX-1271arrow-up-right
    COMMANDBOX-1270arrow-up-right
    COMMANDBOX-1268arrow-up-right
    COMMANDBOX-1263arrow-up-right
    COMMANDBOX-1261arrow-up-right
    COMMANDBOX-1259arrow-up-right
    COMMANDBOX-1255arrow-up-right
    COMMANDBOX-1253arrow-up-right
    COMMANDBOX-1250arrow-up-right
    COMMANDBOX-1212arrow-up-right
    COMMANDBOX-664arrow-up-right
    COMMANDBOX-1297arrow-up-right
    COMMANDBOX-1296arrow-up-right
    COMMANDBOX-1295arrow-up-right
    COMMANDBOX-1292arrow-up-right
    COMMANDBOX-1290arrow-up-right
    COMMANDBOX-1288arrow-up-right
    COMMANDBOX-1287arrow-up-right
    COMMANDBOX-1285arrow-up-right
    COMMANDBOX-1284arrow-up-right
    COMMANDBOX-1269arrow-up-right
    COMMANDBOX-1267arrow-up-right
    COMMANDBOX-1258arrow-up-right
    COMMANDBOX-1256arrow-up-right
    COMMANDBOX-1252arrow-up-right
    COMMANDBOX-1251arrow-up-right
    COMMANDBOX-1249arrow-up-right
    COMMANDBOX-1248arrow-up-right
    COMMANDBOX-1246arrow-up-right
    COMMANDBOX-1216arrow-up-right
    COMMANDBOX-1169arrow-up-right
    COMMANDBOX-1136arrow-up-right
    COMMANDBOX-1117arrow-up-right
    COMMANDBOX-1108arrow-up-right
    COMMANDBOX-1294arrow-up-right
    COMMANDBOX-1293arrow-up-right
    COMMANDBOX-1289arrow-up-right
    COMMANDBOX-1282arrow-up-right
    COMMANDBOX-1281arrow-up-right
    COMMANDBOX-1280arrow-up-right
    COMMANDBOX-1279arrow-up-right
    COMMANDBOX-1278arrow-up-right
    COMMANDBOX-1277arrow-up-right
    COMMANDBOX-1273arrow-up-right
    COMMANDBOX-1262arrow-up-right
    COMMANDBOX-1260arrow-up-right
    COMMANDBOX-1245arrow-up-right
    COMMANDBOX-676arrow-up-right

    What's New in 5.0.0

    hashtag
    Upgrade Compatibility

    Even though this is a new major version, it should be very backwards compatible. CommandBox proper has no known backwards compatibility issues we're aware of, but note we've bumped libraries like Lucee Server, Undertow, and Java support, so you may notice differences due to these 3rd party lib updates. For example, one breaking changearrow-up-right in Lucee 5.3 (which now powers your default server) is how page output buffer is handled.

    You should be able to simply replace your box.exe binary and run it to get the same in-place upgrade you're used to. If you run into issue, you can try removing the "engine" folder in your ~/.CommandBox folder and try again. If you need to downgrade for any reason, replace the box binary with the old version, remove the "engine", "cfml", and "lib" folders in your CommandBox home and they will get re-created on the next run.

    You may also notice the box binary is larger now. From 44 Megs up to 77 Megs. This is a regrettable byproduct of us turning off the Pack200 process we used to run against the Lucee jar. Lucee seems to have some bugs that causes it to re-download a bunch of OSGI bundles when we compress them and we can't figure it out, or get support on the matter, so for now we're just not compressing as much stuff. This was a huge blocker for anyone needing to run CommandBox on a PC with no external internet access as Lucee provides no mechanism to turn off it's auto-download behavior.

    And finally, if you have installed any custom OSGI bundles into your CLI, they will be wiped by the upgrade process now. We didn't want to have to to do this, but Lucee has bugs that cause errors when doing in-place upgrades with the old OSGI bundles left in place and we couldn't get it fixed, so this was the only way to ensure in-place upgrades would "just work" without errors. We are leaving the Lucee engine folder, so any settings you may have put into your CLI should remain in place.

    hashtag
    What's New?

    There's a lot of new stuff in CommandBox 5.0.0. Here's an overview. One of the biggest new "features" is you can finally use CommandBox on Java 11+. This was not possible in CommandBox 4.x due to the version of Lucee not fully supporting newer versions of Java. Now that Lucee has been bumped to 5.3 (see below) you are free to leave java 8 behind for the CLI. Note if you're using CommandBox to start up older versions of Adobe CF or Lucee/Railo, you may still need to use java 8 specifically for your servers.

    hashtag
    New Libraries

    Let's start with the library updates. For the most part, all the jars we bundle are a "black box" but in reality, every update is usually for new features, fixes, or security patches. Here's an overview of the new libs:

    • WireBox 5.6.2

    • JLine 3.13.0

    • Runwar 4.0.3 (major bump from 3.x)

    hashtag
    New Features/Enhancements

    You can now use user/pass or personal access token authentication when cloning Git repos over HTTPS. This has been tested with Github and Gitlab and is an alternative to SSH keys. Please check the docs, as Github and Gitlab both expect slightly different inputs.

    There is a new Lex installation endpoint to help you acquire Lucee Extensions your app needs via the "install" command or a dependency in your box.json file. If the current directory has a Lucee server in it, CommandBox will install the extension file directly into your server's "deploy" folder (server context)

    The auto-install feature into your server will work on any Lex package, even one coming from ForgeBox:

    Tuning your server is easier now. You can configure your Undertow worker-threads setting with first-class server.json property

    Which gives you this in your server.json

    We've also unlocked a method for you to set ANY valid Undertow option or XNIO option. So if Undertow supports it, you can configure it!

    We've added a new experimental feature that lets you create a batch file, powershell script, or bash shell script that directly starts a server with the exact settings that you get from "server start". This is for you to create super-optimzed startups in Docker or Service that bypass the CLI steps and "lock in" the settings. No server.json or CFConfig, or dotenv code will be processed, but you will have a fast streamlined start that is the same every time. Couple this with our new "dryRun" flag on server start that will unpack the CF engine, but not actually start the server, and you can create your customs start script like so:

    The Globber helper can now take more than one globbing pattern. This also means every built-in command in CommandBox that takes a globbing pattern, can now take a comma delimited list of patterns. We've also added an exclude list of globbing patterns to the dir command as well.

    We've got a couple new handy commands to help you from the command line, "unique" (modeled after the Bash "uniq" command)

    And "sort" (modeled after the Bash "sort" command)

    The "grep" command has received a "count" parameter if you just want the count of lines that match the regex (or no regex will count all lines)

    The tray icon for your servers now has a new option under the "Open" menu that will open up the file system folder where the server home lives. This is nice for finding your CF Engine's log files.

    hashtag
    Release Notes

    There are a lot of bug fixes and even more enhancements I didn't cover above. You can read the full release notes here:

    hashtag
    Sub-task

    • [] - Remove extra stashes on url paths when servlet init params starts with WEB-INF

    hashtag
    Bug

    • [] - Tray Icon not displaying on Debian8

    • [] - X Window Errors

    • [] - "Coldbox create resource" uses wrong paths on Windows

    hashtag
    New Feature

    • [] - Ability to install/uninstall box server services

    • [] - Server command to explode server war but not start it

    • [] - Set any valid XNIO option

    hashtag
    Task

    • [] - Make sure the build works

    • [] - Document Setup in the Repo

    • [] - Vet all changes on Runwar since April 25, 2018.

    hashtag
    Improvement

    • [] - Enhance Globber to take more than one pattern

    • [] - Enhance Globber to have exclude patterns

    • [] - Update CLI to Lucee 5.3 and test Java 11

    box_server_profile=production
    
    box_server_web_http_port=8080
    
    # JSON which will be parsed
    box_server_web_ssl={ "enabled" : true, "port": 443 }
    
    # dot-delimited keys (Windows only)
    box_server_web.http.port=8080
    
    # array indexes too (Windows only)
    box_server_web_rules[1]=path-suffix(/box.json) -> set-error(404)
    box_server_web_rules[2]=disallowed-methods(trace)
    server set web.http2.enable=true/false
    # Return array of dependency names
    package show | jq keys(dependencies)
    
    # Find dependencies with "cb" in their name
    package show | jq key_contains(dependencies,'cb')
    config show jq:endpoints.forgebox.apiToken
    # .. is the same as ...
    config show endpoints.forgebox.apiToken
    
    # or you can get fancy...
    config show 'jq:keys(modules)'
    
    # Impress your friends
    package show "jq:[name,version]"
    
    # Be the life of the party
    package show "jq:contributors|split(@,' ')" 
    server set web.AJP.secret=mySecret
    // Parallel Executions
    async().all(
        () => hyper.post( "/somewhere" ),
        () => hyper.post( "/somewhereElse" ),
        () => hyper.post( "/another" )
    ).then( (results)=> logResults( results ) );
    print.table(
    	[ 'First Name', 'Last Name' ],
    	[
    		[ 'Brad', 'Wood' ],
    		[ 'Luis', 'Majano' ],
    		[ 'Gavin', 'Pickin' ]
    	]
    );
    coldbox create handler --rest
    server set runwar.args="--resource-manager-logging=true"
    server set runwar.args="--case-sensitive-web-server=true"
    server set runwar.args="--case-sensitive-web-server=false"
    server set runwar.args="--cache-servlet-paths=true"
    server set web.SSL.forceSSLRedirect=true
    server set web.SSL.HSTS.enable=true
    server set web.SSL.HSTS.maxAge=31536000
    server set web.SSL.HSTS.includeSubDomains=true
    config set colorInDumbTerminal=true
    server start [email protected]+48
    server start [email protected]
    server set web.host=mySite.localhost
    commandbox_home=../customHome
    box_server_web_http_port=0
    The parameter [name] to function [get] is required but was not passed in.
    ~/.CommandBox/cfml/modules/commandbox-dotenv
    install commandbox-dotenv

    JBoss Undertow 2.0.27.Final (major bump from 1.x)

  • JGit 5.5.1.201910021850-r

  • Lucee 5.3.4.77("major" bump from 5.2)

  • AdoptOpenJDK jdk-11.0.6+10 (In the JRE-included download) (major bump from 8.x)

  • [] - urlrewrite.xml has file size of 0 on docker restart but not regular start

  • [] - CommandBox instances crashing because of TrayIcon rendering

  • [] - CommandBox always reads STDIN even when in non-interactive mode

  • [] - Using zsh exits out of CommandBox when running a binary command

  • [] - Shebang scripts no longer work without .cfm extension

  • [] - If custom rewrite file is already in correct destination, runwar overwrites it as 0 bytes

  • [] - worker-threads setting no longer has any affect

  • [] - Tray icon not showing in Ubuntu 18.04

  • [] - Undertow error output when starting server

  • [] - [RUNWAR] Tray menu placeholders such as ${Setting: runwar.port not found} are not replaced in sub menus

  • [] - regex string index out of bounds exception

  • [] - URL Rewrites fire incorrect on URL containing a space

  • [] - Browser doesn't open when server start

  • [] - Host updater does not work

  • [] - Server doesn't stop on Windows

  • [] - ConcurrentModificationException with undertow?

  • [] - Restrict /dumprunwarrequest to be used only on Unit Testing

  • [] - Remove trailing slash from Adobe updates path

  • [] - Default command parameters don't work on commands in namespaces

  • [] - Command DSL has unexpected behavior with equals sign in positional tokens

  • [] - Tab complete for negated flags isn't complete

  • [] - box fails to open in vSphere Web Client console due to outdated JLine jar

  • [] - Server start doesn't correctly expand relative Java Home directory

  • [] - slashes into the servlet init param paths

  • [] - Tray icon doesn't disappear on Windows when server stops from CLI

  • [] - Install dependency from box.json with env var placeholder gets overwritten with actual value

  • [] - coldbox create resource command ignores specsDirectory argument

  • [] - foreach cannot be interrupted with Ctrl-C

  • [] - validate non-numeric exit codes from the "exit" command

  • [] - Task Runner's loadModule() fails on path with period

  • [] - Tasks don't treat return 1 and setExitCode( 1 ) the same

  • [] - When a task sets a failing exit code, no output is sent to console

  • [] - Commands that set a failing exit code don't raise proper exception

  • [] - foreach, grep, and sed only break on chr(10)

  • [] - Add generic feature to set any valid Undertow option

  • [] - Allow no rest mappings to be supplied

  • [] - Tab completion for task targets

  • [] - New TestBox commands: generate visualizer and generate browser

  • [] - Update ColdBox module templates for 5.0 standards

  • [] - Expose Undertow worker-threads setting with first-class server.json property

  • [] - Support HTTPS username/password auth

  • [] - Option for server start to write file with full start args for direct Runwar call

  • [] - Add lex endpoint for installing Lucee extensions

  • [] - Add unique command to filter out duplicates rows of input

  • [] - Add sort command to sort rows of input

  • [] - Change CommandBox build to pull Ortus build of Runwar

  • [] - Output Runwar version and jar path in "info" command output

  • [] - Need Config for Max Thread Request at runwar

  • [] - Enhance dir command with new Globber features

  • [] - Optimize installation of packages with createPackageDirectory set to false

  • [] - Improve performance of print buffer by using String Builder internally

  • [] - Add --count flag to grep command

  • [] - Update CommandBox to Runwar 4.0.0

  • [] - Upgrade to JGit 5.5

  • [] - Tie into FusionReactor to report transactions for tasks, commands, etc.

  • [] - Default location to forgeboxStorage for package init command

  • [] - Improve default package naming of jar endpoint

  • [] - Add option to tray menu to open server home directory

  • [] - Update to latest WireBox

  • [] - Stop outputting extra line break for commands with no output

  • COMMANDBOX-1069arrow-up-right
    COMMANDBOX-643arrow-up-right
    COMMANDBOX-711arrow-up-right
    COMMANDBOX-812arrow-up-right
    COMMANDBOX-148arrow-up-right
    COMMANDBOX-715arrow-up-right
    COMMANDBOX-1007arrow-up-right
    COMMANDBOX-964arrow-up-right
    COMMANDBOX-965arrow-up-right
    COMMANDBOX-995arrow-up-right
    COMMANDBOX-885arrow-up-right
    COMMANDBOX-886arrow-up-right
    COMMANDBOX-963arrow-up-right
    install git+https://username:[email protected]/user/repo.git
    or
    install git+https://[email protected]/user/repo.git
    install lex:https://downloads.ortussolutions.com/ortussolutions/lucee-extensions/ortus-redis-cache/1.4.0/ortus-redis-cache-1.4.0.lex
    // ForgeBox slug for Ortus Redis Extension
    install 5C558CC6-1E67-4776-96A60F9726D580F1
    server set web.maxRequests=200
    {
      "web" : {
        "maxRequests" : 200
      }
    }
    server set runwar.undertowOptions.ALLOW_UNESCAPED_CHARACTERS_IN_URL=true
    
    server set runwar.XNIOOptions.WORKER_NAME=myWorker
    server start --console --dryRun startScript=bash startScriptFile=startmebaby.sh
    
    // Later directly from bash...
    
    ./startmebaby.sh
    dir **.cfc,*.cfm
    dir paths=modules excludePath=**.md --recurse
    dir paths=samples sort="directory asc, name desc"
    cat names.txt | unique
    cat names.txt | unique --count
    cat names.txt | sort
    cat names.txt | sort type=text
    cat names.txt | sort type=numeric
    cat names.txt | sort direction=desc
    dir **.cfc | grep --count
    
    dir | grep .*\.md --count
    COMMANDBOX-941arrow-up-right
    COMMANDBOX-946arrow-up-right
    COMMANDBOX-975arrow-up-right
    COMMANDBOX-980arrow-up-right
    COMMANDBOX-992arrow-up-right
    COMMANDBOX-1005arrow-up-right
    COMMANDBOX-1008arrow-up-right
    COMMANDBOX-1009arrow-up-right
    COMMANDBOX-1013arrow-up-right
    COMMANDBOX-1014arrow-up-right
    COMMANDBOX-1022arrow-up-right
    COMMANDBOX-1035arrow-up-right
    COMMANDBOX-1036arrow-up-right
    COMMANDBOX-1037arrow-up-right
    COMMANDBOX-1038arrow-up-right
    COMMANDBOX-1043arrow-up-right
    COMMANDBOX-1048arrow-up-right
    COMMANDBOX-1050arrow-up-right
    COMMANDBOX-1054arrow-up-right
    COMMANDBOX-1061arrow-up-right
    COMMANDBOX-1062arrow-up-right
    COMMANDBOX-1063arrow-up-right
    COMMANDBOX-1068arrow-up-right
    COMMANDBOX-1070arrow-up-right
    COMMANDBOX-1071arrow-up-right
    COMMANDBOX-1076arrow-up-right
    COMMANDBOX-1077arrow-up-right
    COMMANDBOX-1079arrow-up-right
    COMMANDBOX-1081arrow-up-right
    COMMANDBOX-1089arrow-up-right
    COMMANDBOX-1090arrow-up-right
    COMMANDBOX-1091arrow-up-right
    COMMANDBOX-1092arrow-up-right
    COMMANDBOX-1098arrow-up-right
    COMMANDBOX-1018arrow-up-right
    COMMANDBOX-1028arrow-up-right
    COMMANDBOX-1032arrow-up-right
    COMMANDBOX-1052arrow-up-right
    COMMANDBOX-1053arrow-up-right
    COMMANDBOX-1067arrow-up-right
    COMMANDBOX-1075arrow-up-right
    COMMANDBOX-1083arrow-up-right
    COMMANDBOX-1088arrow-up-right
    COMMANDBOX-1096arrow-up-right
    COMMANDBOX-1097arrow-up-right
    COMMANDBOX-1029arrow-up-right
    COMMANDBOX-1049arrow-up-right
    COMMANDBOX-1055arrow-up-right
    COMMANDBOX-1057arrow-up-right
    COMMANDBOX-1058arrow-up-right
    COMMANDBOX-1059arrow-up-right
    COMMANDBOX-1060arrow-up-right
    COMMANDBOX-1065arrow-up-right
    COMMANDBOX-1066arrow-up-right
    COMMANDBOX-1074arrow-up-right
    COMMANDBOX-1086arrow-up-right
    COMMANDBOX-1087arrow-up-right
    COMMANDBOX-1093arrow-up-right
    COMMANDBOX-1095arrow-up-right
    COMMANDBOX-1099arrow-up-right

    What's New in 5.2.0

    There are a number of pretty exciting new features and a pile of bug fixes. And as usual, input from the community via Pull Requests. Huge thanks to Pete Freitag, Kai Koenig, Matthew Clemente, Bobby Hartsfield, Scott Steinbeck, Daniel Mejia, and Miguel Mathus! Here's an overview of the new stuff in 5.2.0

    hashtag
    Library Updates

    We know library updates are boring, but they are important and we want you to know we take them seriously. Keeping up-to-date ensure you have the latest fixes and security updates from all the third-party libs we bundle in CommandBox.

    Here's an overview of what we updated in CommandBox 5.2.0.

    • Upgraded Runwar from 4.1.2 to 4.3.8

    • Upgraded JBoss Undertow from 2.0.27.Final to 2.2.0

    • Upgraded UrlRewritesFilter to Ortus fork 5.0.1 with custom fixes

    The Undertow bump is a minor update, but a pretty big deal. Ortus sent three pull requests to the core Undertow project fixing bugs and adding predicate logging. All of our pulls were accepted and merged into the core Undertow project and released in the 2.2 release.

    Read more about library updates here:

    hashtag
    Server Security Profiles

    This is a feature that we expect to grow in the future. We've started it out simple, yet powerful but left a lot of room to build on it. The two main goals here are

    • Make CommandBox secure-by-default so a server shoved in production comes nice and locked down

    • Makes it very easy for you to toggle off all the security stuff for development

    CommandBox now has profiles you can assign to a server when you start it to configure the default settings. This is to provide easy secure-by-default setups for your production servers, and to make it easier to switch between a development mode and production mode.

    There are 3 currently supported profiles. Custom profiles will be added as a future feature.

    • Production - Locked down for production hosting

    • Development - Lax security for local development

    • None - For backwards compat and custom setups. Doesn't apply any web server rules

    In production mode, CommandBox will block access to your CF admin to all external traffic, will block all common config files such as box.json or .env and will block, the "TRACK" and "TRACE" HTTP verbs

    You can set the profile for your server in your server.json

    Or you can specify it when starting the server like so:

    If a profile is not set, CommandBox looks for an environment variable called "environment" or it checks to see if the site is bound on localhost to try and guess the correct profile for you.

    We've also added some new flags in your server.json to fully customize how your profile behaves.

    ‌Read more about Server Profiles here:

    hashtag
    Server Rules

    This is huge-- probably the biggest chunk of work, and it's actually what makes the server profiles above even possible! It's always been possible to perform basic lock downs with a custom rewrite file, but we've exposed an amazing built-in functionality of Undertow called the Predicate language. It allows you to create ad-hoc rules that apply to your server to provide any of the following:

    • Security - Block paths, IPs, or users

    • URL rewrites - Rewrite incoming URLs to something different

    • Modifying HTTP requests on the fly - Set headers, cookies, or response codes

    An example of a server rule using Undertow's predicate language to block access to any box.json files looks like this:

    One of the best things about these rules, is they don't have to be in a single monolithic XML file. Instead they can come from

    • An array of ad-hoc definitions in your server.json file or config server defaults

    • one or more external JSON or text file specified in your server.json or config server defaults

    • Built in CommandBox server profiles (see above)

    Here's some examples of what can be in your server.json

    There are TON of built in predicates and handlers your rules can use. We've documented some of them :

    CommandBox also registers some custom rules in Undertow you can use for your CF apps:

    There are lots of new docs on this. Read more about Server Rules here:

    hashtag
    Task Runner Lifecyle events

    The more we use Task Runners for builds, scheduled tasks, and utilities, we've seen the need to have lifecyle events in the same manner as the preHandler and postHandler sort of stuff in ColdBox MVC. Now if a task runner has methods of this name, they will be executed automatically.

    • preTask - Before any target in the task

    • postTask - After any target in the task

    • aroundTask - Wraps execution of any target in the task

    The lifecycle methods are very powerful and can be controlled via whitelist and blacklists to control what targets they execute for. "Around" events are very easy to use thanks to the use of closure. There's a lot more details in the docs.

    Read more about Task Runner Lifecyle events here:

    hashtag
    System Setting ${} Namespaces

    The default namespace when using the $ {foo} system setting expansion syntax is box environment variable, Java system properties, and OS environment variables.

    It is also possible to leverage built-in namespaces to allow expansions that reference:

    • server.json properties

    • box.json properties

    • arbitrary JSON file properties

    This gives you a lot more power now to be able to create dynamic configuration in your JSON files and even from the command line. Here are some examples:

    And one of the coolest things is this implementation is driven by a new onSystemSettingExpansion interception point and completely extendable! That means you can write a module that powers something hypothetical like this:

    Read more about System Setting namespaces here:

    hashtag
    GZip Compression Control

    CommandBox has had the ability to enable/disable GZip compression in Undertow for a while. Now you can fully control when it activates based on the type or size of file, etc. This feature utilizes the same Undertow predicate language that we introduced above.

    Read more about GZip Compression Control here:

    hashtag
    Generic Watch Command

    This is a fun one. There are some specific commands that make use of the Watcher library in CommandBox such as testbox watch and coldbox watch-reinit. However, there is also now a generic watch command that will run any arbitrary command of your choosing when a path matching your file globbing pattern is added/updated/deleted. Use this to build custom watchers on-the-fly without needing to touch any CFML code to write a Task Runner.

    That command will echo out "config files updated!" every time a JSON file gets changed in the current directory. Here's a more complex one:

    That one will list every new file that's added in this directory and all sub directories.

    Read more about the generic watch command here:

    hashtag
    Control Default Browser

    There are a handful of features in CommandBox that will open URLs for you in your default browser. We've had requests to allow the browser in use to be customized, so we've reworked all of that logic, consolidating it in some places and now you can control what browser CommandBox uses. To change the default browser for all URL opening functions use this:

    Supported browsers are:

    • firefox

    • chrome

    • opera

    And you can even dial in a browser on demand for the browse and server open commands.

    Read more about setting the default browser here:

    hashtag
    Miscellaneous

    Here are some honorable mentions.

    hashtag
    .htaccess rewrite flags

    The CommandBox Tuckey rewrites allow an .htaccess file that uses the mod_rewrite style syntax of rewrites. Previously, use of flags such as these didn't work:L

    hashtag
    Server restart from tray icon

    We've added a "restart" option to the tray icon that does exactly what you think it does.

    hashtag
    Trick for "cd"ing up directories

    There's a new trick supported in CommandBox's shell that we've borrowed that allows you to change directories and go "up" more than one directory with less typing:

    hashtag
    Pipe into standard input of native binaries

    You can now pipe the output of a previous command in CommandBox directly to a native binary like so:

    In this case, clip is a Windows binary that will read the standard input and place that text on the clipboard.

    hashtag
    Breaking Changes

    We work hard to make every CommandBox upgrade backwards compatible. There's a couple things that you may notice different in this release. They're both done to put security first and can be modified to get your original behavior back.

    Since the CF Administrator is now blocked for traffic not coming from localhost when in production mode, you may need to explicitly open up the CF admin to make it accessible again if you needed it open to the public on a production server. Even with the profile set to production, you can activate just the CF admin like so:

    The web server built into CommandBox will now only serve static files if their extension is found in a whitelist of acceptable files. This is to prevent prying eyes from hitting files they shouldn't be able to access on your server. The current list of valid extensions is:

    If you have a common static file you need to serve, you can add your own custom extensions to the list like so:

    And if you think we've missed an obvious one that deserves to be added to the default list, please let us know.

    hashtag
    Release Notes

    Here's the full list of tickets in the 5.2.0-RC.1 release.

    hashtag
    Bug

    • [] - Tuckey UrlRewrite DTD version issues

    • [] - when installing a package which doesn't exist, commandbox claims forgebox is unreachable

    • [] - Remove mail-4.1.1.jar from runwar's lib dir

    hashtag
    New Feature

    • [] - Restart server via tray icon

    • [] - Stop expanding /WEB-INF paths in servlet init params

    • [] - Allow configuring default browser to use when opening a URL

    hashtag
    Task

    • [] - review all the runwar dependencies and check for outdated ones

    hashtag
    Improvement

    • [] - Block TRACE HTTP Verb by default

    • [] - Implement web server rules in Undertow

    • [] - Add an option to console log output without ANSI codes

    hashtag
    Sub-task

    • [] - Load predicates in Runwar

    • [] - Pass Predicates as part of Server Start in CommandBox

    • [] - Add default server rules/predicates in CommandBox for default lockdown

    Upgraded jboss-logging from 3.2.1.Final to 3.4.1.Final

  • Upgraded jboss-logging-annotations from 2.1.0 to 2.2.1.Final

  • Upgraded JCabi Log from 0.18 to 0.18.1

  • Upgraded Apache HttpClient from 4.2.6 to 4.5.12

  • Upgraded Apache httpmime from 4.2.6 to 4.5.12

  • Removed unused JOpt Simple 5.0-beta-1

  • Removed unused Gson 1.2.3

  • Custom 3rd party CommandBox modules that contribute rules on-the-fly (time to get creative!)

    pre- Before a specific target

  • post- After a specific target

  • around - Wraps execution of a specific target

  • onComplete - Fires regardless of exit status

  • onSuccess - Fires when task runs without failing exit code or exception

  • onFail - Fires if exit code is failing after the action is done (always fires along with onError, but does not receive an exception object). Use this to respond generally to failures of the job.

  • onError - fires only if an unhandled exception is thrown and receives exception object. Use this to respond to errors in the task. Does not fire for interrupted exceptions

  • onCancel - Fires when the task is interrupted with Ctrl-C

  • Config settings (like the config show command)

  • Server info properties (like the server info property=name command)

  • Other properties in the same JSON file

  • edge (Windows and Mac only)
  • ie (Windows only)

  • safari (Mac only)

  • konqueror (Linux only)

  • epiphany (Linux only)

  • [] - "testbox run" output garbled on Windows (wrong encoding)

  • [] - UndertowOptions and XNIOOptions don't work for Long type

  • [] - HTTP endpoint leaves a zip file in the CommandBox temp folder

  • [] - url rewrite no longer works

  • [] - Piping a command into run does not execute interactivley

  • [] - Support flags on .htaccess file for Tuckey rewrites

  • [] - Add a preInstallAll and postInstallAll interception points when running an `install` command

  • [] - Add Task Runner lifecycle events

  • [] - Generic watch command

  • [] - When starting an already-started server, offer to open the existing one instead

  • [] - Add directory expansion command for going back multiple directories

  • [] - Add built-in predicates and handlers for undertow for easier lockdown

  • [] - Add "profile" setting to help default security settings

  • [] - Allow standard input to be piped to native binaries

  • [] - Migrate to AdoptOpenJDK API v3

  • [] - Move ANSI logging format from Runwar to CommandBox

  • [] - Automated flag negation hint is the same as the hint for the flag itself

  • [] - Default server menu actions working directory to web root

  • [] - Expand working directory when specified for a menu item

  • [] - Validate incoming version for bump command

  • [] - Programmatic skipping of package install via interceptor

  • [] - Adding support for installing lex files from file or unc paths

  • [] - Add File Filtering For GZIP Compression

  • [] - Allow default server java version to be cleared

  • [] - Add setSystemSetting() to BaseCommand

  • [] - "testbox run" command - show tag context for global bundle exceptions

  • [] - Add --trayEnable flag to server start

  • [] - Allow ${} system setting expansions to have extendable namespaces

  • [] - Improve verbose output of JVM args if args contain " - " in them

  • [] - forgeboxstorage default ignores are over-aggresive

  • [] - If native command is piped into RUN, allow the output to be piped again

  • [] - Improve logging in Undertow for execution of predicate handlers

  • [] - Track/address Undertow tickets

  • https://ortussolutions.atlassian.net/browse/COMMANDBOX-1064arrow-up-right
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/server-profilesarrow-up-right
    herearrow-up-right
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/server-rulesarrow-up-right
    https://commandbox.ortusbooks.com/task-runners/lifecycle-eventsarrow-up-right
    https://commandbox.ortusbooks.com/usage/system-setting-expansion-namespacesarrow-up-right
    https://commandbox.ortusbooks.com/embedded-server/configuring-your-server/gzip-compressionarrow-up-right
    https://commandbox.ortusbooks.com/usage/watch-commandarrow-up-right
    https://commandbox.ortusbooks.com/config-settings/misc-settings#preferredbrowserarrow-up-right
    https://ortussolutions.atlassian.net/browse/COMMANDBOX-1221arrow-up-right
    https://ortussolutions.atlassian.net/browse/COMMANDBOX-1209arrow-up-right
    https://commandbox.ortusbooks.com/usage/execution/os-binaries#piping-to-the-native-binarys-standard-inputarrow-up-right
    COMMANDBOX-1138arrow-up-right
    COMMANDBOX-1141arrow-up-right
    COMMANDBOX-1199arrow-up-right
    COMMANDBOX-126arrow-up-right
    COMMANDBOX-1012arrow-up-right
    COMMANDBOX-1021arrow-up-right
    COMMANDBOX-1064arrow-up-right
    COMMANDBOX-1044arrow-up-right
    COMMANDBOX-1094arrow-up-right
    COMMANDBOX-1103arrow-up-right
    COMMANDBOX-1185arrow-up-right
    COMMANDBOX-1186arrow-up-right
    COMMANDBOX-1187arrow-up-right
    server set profile=production
    server start profile=production
    server set web.blockCFAdmin=true
    server set web.blockCFAdmin=false
    server set web.blockCFAdmin=external
    
    server set web.blockSensitivePaths=true
    server set web.blockSensitivePaths=false
    
    server set web.blockFlashRemoting=true
    server set web.blockFlashRemoting=false
    path-suffix(/box.json) -> set-error(404)
    {
        "web" : {
            "rules" : [
                "path-suffix(/box.json) -> set-error(404)",
                "path-suffix(hidden.js) -> set-error(404)",
                "path-prefix(/admin/) -> ip-access-control(192.168.0.* allow)",
                "path(/sitemap.xml) -> rewrite(/sitemap.cfm)",
    	    "disallowed-methods(trace)"
            ],
    	"rulesFile" : "../secure-rules.json"
            // Or...
    	"rulesFile" : ["../security.json","../rewrites.txt","../app-headers.json"]
            // Or...
    	"rulesFile" : "../rules/*.json"
        }
    }
    // Block all CF admin access
    cf-admin() -> set-error( 404 ); 
    
    // Shortcut for the previous rule
    block-cf-admin() 
    
    // Block external CF admin access
    cf-admin() -> block-external() 
    // Reference box.json file in this directory
    $ {boxjson.slug}
    
    // Reference server.json file in this directory
    $ serverjson.web.http.port:80}
    
    // Reference local server details 
    $ {serverinfo.serverHomeDirectory}
    
    // Reference arbitrary JSON file
    $ {[email protected]}
    
    // Reference CLI's config settings
    $ {configsetting.endpoints.forgebox.apitoken}
    
    // Local reference to a JSON property in the same file
    {
        "appFileGlobs" : "models/**/*.cfc,tests/specs/**/*.cfc",
        "scripts":{
            "format":"cfformat run $ {@appFileGlobs} --overwrite",
            "format:check":"cfformat check $ {@appFileGlobs} --verbose"
        }
    }
    $ {AWSSecretStore.mySecretKey}
    server set web.gzipEnable=true
    server set web.gzipPredicate="not path-prefix( admin ) and regex( '(.*).css' ) and request-larger-than(500)"
    watch *.json "echo 'config file updated!'"
    set command = "echo 'You added \$ {item}!'"
    watch command="foreach '\$ {watcher_added}' \$ {command}" --verbose
    // use Chrome
    config set preferredBrowser=chrome
    
    // use FireFox
    config set preferredBrowser=frefox
    
    // Just kidding, no one is going to use this!!
    config set preferredBrowser=ie
    server open browser=opera
    RewriteRule ^/login.cfm$ /condworks.html [R=301]
    // current directory
    cd .   -> ./
    // back 1 directory
    cd ..  -> ../
    // back 2 directories
    cd ... -> cd ../../
    // back 3 directories
    cd .... -> cd ../../../ 
    #createguid | !clip
    or
    #createguid | run clip
    server set web.blockCFAdmin=false
    3gp,3gpp,7z,ai,aif,aiff,asf,asx,atom,au,avi,bin,bmp,btm,cco,crt,css,csv,deb,der,dmg,doc,docx,eot,eps,flv,font,gif,hqx,htc,htm,html,ico,img,ini,iso,jad,jng,jnlp,jpeg,jpg,js,json,kar,kml,kmz,m3u8,m4a,m4v,map,mid,midi,mml,mng,mov,mp3,mp4,mpeg,mpeg4,mpg,msi,msm,msp,ogg,otf,pdb,pdf,pem,pl,pm,png,ppt,pptx,prc,ps,psd,ra,rar,rpm,rss,rtf,run,sea,shtml,sit,svg,svgz,swf,tar,tcl,tif,tiff,tk,ts,ttf,txt,wav,wbmp,webm,webp,wmf,wml,wmlc,wmv,woff,woff2,xhtml,xls,xlsx,xml,xpi,xspf,zip,aifc,aac,apk,bak,bk,bz2,cdr,cmx,dat,dtd,eml,fla,gz,gzip,ipa,ia,indd,hey,lz,maf,markdown,md,mkv,mp1,mp2,mpe,odt,ott,odg,odf,ots,pps,pot,pmd,pub,raw,sdd,tsv,xcf,yml,yaml
    server set web.allowedExt=jar,exe,dll
    COMMANDBOX-1201arrow-up-right
    COMMANDBOX-1205arrow-up-right
    COMMANDBOX-1206arrow-up-right
    COMMANDBOX-1213arrow-up-right
    COMMANDBOX-1218arrow-up-right
    COMMANDBOX-1221arrow-up-right
    COMMANDBOX-1084arrow-up-right
    COMMANDBOX-1167arrow-up-right
    COMMANDBOX-1197arrow-up-right
    COMMANDBOX-1200arrow-up-right
    COMMANDBOX-1209arrow-up-right
    COMMANDBOX-1214arrow-up-right
    COMMANDBOX-1215arrow-up-right
    COMMANDBOX-1220arrow-up-right
    COMMANDBOX-1109arrow-up-right
    COMMANDBOX-1131arrow-up-right
    COMMANDBOX-1157arrow-up-right
    COMMANDBOX-1182arrow-up-right
    COMMANDBOX-1183arrow-up-right
    COMMANDBOX-1191arrow-up-right
    COMMANDBOX-1192arrow-up-right
    COMMANDBOX-1193arrow-up-right
    COMMANDBOX-1195arrow-up-right
    COMMANDBOX-1196arrow-up-right
    COMMANDBOX-1198arrow-up-right
    COMMANDBOX-1202arrow-up-right
    COMMANDBOX-1203arrow-up-right
    COMMANDBOX-1204arrow-up-right
    COMMANDBOX-1208arrow-up-right
    COMMANDBOX-1217arrow-up-right
    COMMANDBOX-1219arrow-up-right
    COMMANDBOX-1188arrow-up-right
    COMMANDBOX-1189arrow-up-right