Just in time for Into The Box, I have committed initial support for multiple package installation endpoints!
Now supported:
- ForgeBox (default)
- Local zip file containing package
- local folder containing package
- HTTP pointing to zip
- HTTPS pointing to zip
Coming soon:
-
Git clone a repo containing a package
-
FTP (not sure how to handle auth yet)
-
ForgeBox Enterprise (To be announced at ITB
-
ForgeBox Private (To be announced at ITB
-
What else do you want??
This is the way “install” works now. The first parameter is called “ID” and an contains two parts, the “endpoint” and the “package”. Endpoint and package are separated by a colon (:). -
forgebox:coldbox
-
file:C:/myZippedPackages/file.zip
-
folder:C:/myUnzippedPackages/
-
git+https://site.com/repo.git
-
git+ssh://site.com/repo.git
-
ftp://site.com/file.zip
If the ID has an “endpoint:”, it will be used to resolve the package. If there is no endpoint specified, we will check to see if the ID is a zip file, then a folder, then default to forgebox. This means that forgebox:, file:, and folder: are technically optional: -
install coldbox
-
install C:/myZippedPackages/file.zip
-
isntall C:/myUnzippedPackages/
Also, the “package” part of the “ID” can contain more than one part depending on how that endpoint works. For instance, ForgeBox has rudimentary support right now for a version appended to the end of the slug with an @ sign.
- coldbox
- coldbox@4.0.0
- cbfeeds@1.0.1
As an added bonus, when you specify an exact version AND that version exists already in the artifacts cache, there is no network connection to ForgeBox. This means you can build your projects completely offline as long as the packages are cached!
Also, we will do our best to support commit-ish for Git repos. This allows you to target a branch or tag like NPM.
- git+https://site.com/repo.git#master
- git+https://site.com/repo.git#2.5.4
These new special endpoints still save as dependencies in box.json and can be reinstalled via the naked “install” command. Here you can see I installed coldbox via a local folder, cbfeeds from a local zip file, weather lookup from the Git zip download URL, and cbi18n from ForgeBox. (Paths are encoded for JSON)
“dependencies”:{
“coldbox”:“folder:C:\packages\coldbox\4.1.0”,
“cbfeeds”:“file:C:\packages\zipped\cbfeeds\1.0.1\cbfeeds.zip”,
“cbi18n”:“1.0.2”,
“weather-lookup-by-ip”:“https://github.com/bdw429s/Weather-Lookup-By-IP/archive/master.zip”
}
You can play with these new features (all running on Lucee now BTW) on the bleeding edge build from our integration server.
http://integration.stg.ortussolutions.com/artifacts/ortussolutions/commandbox/2.0.0/
Running “upgrade --latest” will also give you this URL.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com