* Unbreak aardvark when --foxx.api false
The easiest way to disable the aardvark foxx routes is to just skip the
import and mount altogether. The previous approach caused the service to
throw an error because the module doesn't actually export anything.
There's no need to prevent the export if we just don't import the module
to begin with.
* Add an error code for service api disabled
* Throw an actual error when accessing Foxx API routes
* Throw an error when using legacy Foxx API
There's no easy way to use a catch-all here so disable them one by one. No new routes will be added to this API and it'll go away in 4.0 so there's no risk of forgetting to add the throw-check in new routes.
* Render subnav without delay
The subnav doesn't need the perm check results but we need the subnav to exist so we can populate it in other parts of the app. This fixes the subnav not showing up when reloading certain views (e.g. install service via upload).
* Hide ONLY the Foxx store when it is disabled
We still want to allow installing and upgrading/replacing services. We just don't want to show the store.
* Hide Foxx services in frontend if Foxx API is disabled
* Build aardvark
* fixed typo in disable check, fixed tests
* Unbreak aardvark when --foxx.api false
The easiest way to disable the aardvark foxx routes is to just skip the
import and mount altogether. The previous approach caused the service to
throw an error because the module doesn't actually export anything.
There's no need to prevent the export if we just don't import the module
to begin with.
* Add an error code for service api disabled
* Throw an actual error when accessing Foxx API routes
* Throw an error when using legacy Foxx API
There's no easy way to use a catch-all here so disable them one by one. No new routes will be added to this API and it'll go away in 4.0 so there's no risk of forgetting to add the throw-check in new routes.
* Hide Foxx services in frontend if Foxx API is disabled
* Render subnav without delay
The subnav doesn't need the perm check results but we need the subnav to exist so we can populate it in other parts of the app. This fixes the subnav not showing up when reloading certain views (e.g. install service via upload).
* Hide ONLY the Foxx store when it is disabled
We still want to allow installing and upgrading/replacing services. We just don't want to show the store.
* Build aardvark
* Add tests for service failing on mount
* Don't install broken services
* Restore error page for broken services
* Prefer JSON error pages
* Expose service upsert in API
* Add Foxx fixes to CHANGELOG
* Update CHANGELOG
Typo
* Fix codeFrame formatting
Pushing the codeFrame first results in ugly line breaks or extra spaces.
* Include cause in MODULE_FAILURE message
The error is always a wrapper for an underlying cause so it should be easier to determine what caused it.
* Add a codeFrame for failed _install
We normally only want this in dev mode but service CRUD should always provide detailed info.
* Expose codeFrame in Foxx CRUD
The codeFrame can only come from a failed _install, so let's make it visible to Foxx CLI and friends.
* Add codeFrame to runScript
Scripts can also only be executed with access to the Foxx API so we can provide the same info as during CRUD.
* Trim codeFrame fileName to basePath
If we have a basePath, we don't need to expose the full path to the user for the codeFrame to be meaningful.
* Fix getReadableName
Previously 'catch-fire' would become 'Catch Ire'.
* Add to changelog
* Correctly expose parsed/raw config
This makes accessing the configuration more consistent by distinguishing between the raw (assigned) and parsed (validated/default) values.
Previously there was no way to recognise default values for unset config options and the "current" value did not actually reflect what the service sees.
* Add minimal option to config/deps routes
The default values are backwards compatible with the existing behaviour but can be overridden to consistently get more/less output.
* Actually merge warnings into non-mininal response
* Pass config/deps on _install so setup can see them
* Only register service when install succeeded
* Don't throw after point of no return: breaky install is breaky
* Delete service files during install if service validation fail
* Delete service files during install if service execution fails
* Fix commitLocalState with invalide services
* Remove deprecated test
* Fix Foxx API error
* Manager should distinguish between errors and services
* Foxx API should not require service to exist for uninstall
if force option is used
* Respect options.force in FM _install
* Implement new self-heal
* Add error codes for 503, service missing/outdated
* Detect changes to service via rev
* Pretty print incoming response object in log
* Improve Foxx cluster resilience
Fixes#2083Fixes#2384Fixes#2408
Addresses #1892
* Port old Foxx API
* Implement single-file services
* Add console.errorStack/warnStack/infoStack helpers
* Simplify serviceInfo validation
* Extract github/upload logic into Aardvark and old FM API
* Move generator logic into Aardvark
* Move zip/js buffer logic into FM core
* Add Foxxmanager tests
* Send empty response when no README
* Disambiguate script arg format
Historically we allow passing an array of positional arguments or an arbitrary first argument.
This is surprising behaviour, so we should just always treat the value as a first argument.
* Rebuild bundle in development mode
* Nicer HTTP docs formatting
* Create Foxx HTTP docs
* Simplify service upload handling
* Remove inline swagger docs
* Implement public download route
* Consistency
* Rebuild aardvark
* Move bundle route into /_api/foxx/_local
* Rebuild Swagger API docs
* Add changes to CHANGELOG
* More docs