1
0
Fork 0
Commit Graph

16 Commits

Author SHA1 Message Date
Alan Plum cfa0e0db55 Better foxx errors (#6264)
* 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
2018-08-28 14:36:33 +02:00
Alan Plum dc2bca23cf Fix #5736 (#5844)
* Fix issue 5736

* Add #5736 to CHANGELOG
2018-08-15 14:11:20 +02:00
Alan Plum 5d017d733c Improve Foxx cluster resilience (#2479)
* Improve Foxx cluster resilience

Fixes #2083
Fixes #2384
Fixes #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
2017-05-16 17:41:29 +02:00
Alan Plum 50e0eb16d2
Use COLOR_OUTPUT to determine whether to use color 2017-03-15 20:44:03 +01:00
Alan Plum 4920ef8b41
Implement tap/xunit reporters in Foxx 2017-03-15 20:09:31 +01:00
Alan Plum c18aa323dc
Extract util.indentation 2017-03-15 20:09:30 +01:00
Alan Plum c9b926916a
Even cleaner SyntaxError stacktraces
Don't clutter stacktraces for Node compatibility at all. Just add lineNumber/columnNumber/fileName to the object.
These are non-standard but there is precedent for these names in Mozilla.
2017-01-27 05:53:39 +01:00
Alan Plum 88ac5777d6
Clean up SyntaxError generation
Clobber stacktrace instead of wrapping in another exception with wonky message string.
This makes SyntaxError details node-compatible and parseable for generating code frames.
2017-01-27 05:34:22 +01:00
Alan Plum 3370ecbadd
Nicer error page and code frames 2017-01-27 01:57:30 +01:00
Andreas Streichardt 6ee1f6d14a Reformat code 2016-06-30 16:57:17 +02:00
Alan Plum c1828234d6
Move shallowCopy and propertyKeys into @arangodb/util 2016-05-03 14:55:32 +02:00
Alan Plum 2b0c1f6f9a
_.extend -> Object.assign 2016-04-20 15:23:03 +02:00
Alan Plum 22a8b5ec65
Add util.inline 2016-04-18 18:00:34 +02:00
Alan Plum ad717505fe
Add pluck to util 2016-04-18 18:00:29 +02:00
Alan Plum 314d19d20d
Extract router tree 2016-04-18 18:00:24 +02:00
Alan Plum 4b0fd593ce
Implement rudimentary route handling 2016-04-18 18:00:22 +02:00