We're updating the issue view to help you get more done. 

Support multiple ForgeBox endpoints

Description

Support more than one ForgeBox-based endpoint in preparation of ForgeBox Enterprise. Each endpoint has

  • A name

  • An API URL

  • Any number of API Tokens which have been authenticated

Any interactions CommandBox makes with a specific endpoint will use the default APIToken for that specific endpoint. All settings for endpoints and their stored tokens will be stored in CommandBox's Config Settings.

Add a new ForgeBox endpoint:

1 2 forgebox endpoint register myEndpoint "http://private.forgebox.io/api/v1" install myEndpoint:myPackage@1.2.3

Manage your endpoints

1 2 forgebox endpoint list forgebox endpoint remove myEndpoint

The forgebox endpoint list command will show the following for each endpoint:

  • Name

  • API URL

  • Logged in User (if applicable)

  • Whether that endpoint is the default forgebox endpoint

Set a specific ForgeBox endpoint to be default

1 2 3 forgebox endpoint set-default myEndpoint # Installs from myEndpoint install coldbox

All ForgeBox commands such as "forgebox search" and "forgebox publish" will obey the default forgebox endpoint. All ForgeBox commands also have a new endpointName parameter that can be specified to direct the command which forgebox endpoint to use:

1 2 forgebox show slug=coldbox endpointName=myEndpoint forgebox publish endpointName=myEndpoint

All endpointName parameters will have tab completion that includes all existing ForgeBox endpoints.

Packages installed from a custom ForgeBox endpoint, even if implicitly via the default endpoint setting will be stored as such in the box.json:

1 2 3 "dependencies":{ "coldbox":"myEndpoint:coldbox@^4.3.0+188" }

Status

Assignee

Brad Wood

Reporter

Brad Wood

Labels

None

Fix versions

Priority

Major