1
0
Fork 0
Commit Graph

218 Commits

Author SHA1 Message Date
Jan 4631cfb5e8
do not create _modules collection for new databases/installations (#7291) 2018-11-13 11:40:15 +01:00
Jan 9bb460c3d5
do not rely on _modules collection being present at startup (#7118) 2018-10-29 13:54:34 +01:00
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 1f69cb6d9d Fix Foxx CRUD errors (#5876)
* Fix off-by-2 error for SyntaxError line nums

* Actually log Foxx HTTP API errors

* Fix line wrap when logging error stacks
2018-08-17 10:09:12 +02:00
Alan Plum 41e9d6e585 Add @arangodb/locals module (#5145)
* Add @arangodb/locals module

Extending Node's module object in TS is tricky so let's provide a fake module for compatibility.

* Add testcase
2018-04-20 12:51:33 +02:00
Michael Hackstein 7ab117f5f8 Bug fix/dump restore auth (#2917)
* Added a backup test suite. This suite is supposed to entirely drop an ArangoDB _system and restore it into a fresh one. This also includes system collections.

* Added more test cases for backup suite. Now tests several authorization/rights cenarios

* Fixed RestReplication Handlers to restore _user collections Properly.

* Updated Changelog

* Added special handling of _users in Restore for MMFiles as well.

* Added JWT secret for cluster execution of this test, also added JWT secret to shutdown call
2017-08-09 12:59:51 +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 c268b2db91
Keep stacktraces out of error messages
They are already reported much more consistently via 'cause' so methods logging them should exploit that instead.
2017-01-27 01:57:29 +01:00
Andreas Streichardt 6ee1f6d14a Reformat code 2016-06-30 16:57:17 +02:00
Alan Plum ffcbd0a69e
Fix require tests 2016-04-19 09:29:24 +02:00
Alan Plum c39eca49e4
Add require.aliases 2016-04-18 18:01:06 +02:00
Alan Plum 5161c63670
Remove magical Foxx comments 2016-04-18 18:00:18 +02:00
Alan Plum 4140c26d30
Use symbols for internal module props 2016-04-18 18:00:17 +02:00
Alan Plum c7688a72f8
module.requireCache -> module.require.cache 2016-04-18 18:00:17 +02:00
Alan Plum eacf570a39
applicationContext -> module.context 2016-04-18 18:00:17 +02:00
Frank Celler 13603e876e safety check 2016-03-17 12:00:27 +01:00
Alan Plum 041ebf1542 Fix #1577 once and for all
This guarantees the module resolution doesn't break out of the ArangoDB module root (or the service's root).
2016-02-26 12:24:26 +01:00
Alan Plum 6593f3d358 Clean up stacktraces
Fixes #1564, #1565, #1744.
2016-02-15 22:56:29 +01:00
Frank Celler 9840280637 added vm 2016-01-15 12:36:57 +01:00
Frank Celler cc91d528e2 do not check DB if connection is down 2016-01-15 12:35:00 +01:00
Alan Plum dd51a91d59 Always org/arangodb -> @arangodb 2015-12-17 13:02:39 +01:00
Alan Plum 34843b76fb Remove CoffeeScript support 2015-12-16 02:03:44 +01:00
Alan Plum 7039647936 Make require behave again
Calls to require should stay within the ArangoDB paths or Foxx service root.

The require cache for Foxx services should be service specific.

Reloading a service's controllers should clear the service's require cache.

See #1577.
2015-12-16 01:16:38 +01:00
Alan Plum 6910f9eaa8 Don't deprecate CoffeeScript in 2.x 2015-12-16 01:16:34 +01:00
Alan Plum 8853ede355 org/arangodb -> @arangodb 2015-12-15 15:51:44 +01:00
Alan Plum 3c804390cd More consistency 2015-12-11 15:26:41 +01:00
Alan Plum 70ad91c122 Consistency 2015-12-11 15:25:51 +01:00
jsteemann 18e47457a6 fixes 2015-12-11 13:29:18 +01:00
Alan Plum d3e2f75c33 Make require behave again
Calls to require should stay within the ArangoDB paths or Foxx service root.

The require cache for Foxx services should be service specific.

Reloading a service's controllers should clear the service's require cache.

See #1577.
2015-12-09 13:33:41 +01:00
Alan Plum 820e694d0c Re-implement cleanupCancelation 2015-10-06 15:10:43 +02:00
Alan Plum 5b7f3d19d0 Deprecate CS in 2.9, not 2.8 2015-10-06 12:47:58 +02:00
Jan Steemann beaf3acbd3 simplifications 2015-10-06 11:58:23 +02:00
Jan Steemann 3f622d71fb fixed some require issues 2015-10-05 10:28:44 +02:00
Jan Steemann 7933fe5d4b restore 2.6 behavior for db-based modules 2015-10-01 10:51:23 +02:00
Jan Steemann 74358962b5 fixed require on Windows 2015-09-30 13:06:36 +02:00
Alan Plum e26fc9b442 S'more. 2015-09-25 17:04:08 +02:00
Alan Plum 40837eacf1 Refactored db module loading 2015-09-25 17:02:51 +02:00
Alan Plum a58fc5fdfa Also add node/node_modules on Windows 2015-09-25 16:43:50 +02:00
Wilfried Goesgens 06b0057bb1 Fix module loading 2015-09-25 16:24:17 +02:00
Alan Plum 963d9b082e Removed hack for extension-free package main 2015-09-24 14:23:15 +02:00
Alan Plum 30588d556f Add support for 'main: "index"' and expose globalPaths 2015-09-24 13:46:14 +02:00
Alan Plum f8ef55f437 Fixed Foxx preprocessing 2015-09-24 13:46:14 +02:00
Alan Plum 252cba5e9f Implemented FoxxService 2015-09-24 13:46:14 +02:00
Alan Plum f021cdc471 Implemented require from db collection 2015-09-24 13:46:13 +02:00
Alan Plum 038267cb06 Re-implemented require/module based on Node 4.1.0
The require function should now behave as expected and treat ArangoDB's module paths as sources for "external" modules.
The "assert", "buffer" and "path" modules have been moved out of ./js/node into the bootstrap modules.
The module "org/arangodb/foxx/arangoApp" (as well as any modules depending on it) is incompatible with the new module loading behaviour and will be have to be rewritten from scratch.
The "Package" class has been removed entirely and is no longer needed.
Support for the database-stored modules is currently missing and needs to be re-implemented within the module loader.
2015-09-24 13:46:13 +02:00
CoDEmanX 3a9648d78a More Americanization 2015-09-03 22:25:43 +02:00
Alan Plum 7bd08e29aa Deprecated CS. 2015-08-05 12:48:27 +02:00
Jan Steemann f5a7e2120f pass filename to internal.parse() call 2015-07-14 18:23:08 +02:00
Alan Plum fc15d421d6 Implemeneted JSON configs. Cleaned up optional configs. 2015-06-16 17:58:38 +02:00
Alan Plum 273d16c0ed Linting. 2015-06-16 14:54:14 +02:00