Commit Graph

177 Commits

Author SHA1 Message Date
Miroslav Bajtoš c29ace3404 Update chai to ^1.10.0 2014-11-11 11:04:40 +01:00
Miroslav Bajtoš a22474d454 package: fix deps
Move loopback-phase from "devDependencies" to "dependencies".
2014-11-11 08:41:51 +01:00
Miroslav Bajtoš 4e1433b519 Middleware phases - initial implementation
Modify the app and router implementation, so that the middleware is
executed in order defined by phases.

Predefined phases:

    'initial', 'session', 'auth', 'parse', 'routes', 'files', 'final'

Methods defined via `app.use`, `app.route` and friends are executed
as the first thing in 'routes' phase.

API usage:

    app.middleware('initial', compression());
    app.middleware('initial:before', serveFavicon());
    app.middleware('files:after', loopback.urlNotFound());
    app.middleware('final:after', errorHandler());

Middleware flavours:

    // regular handler
    function handler(req, res, next) {
      // do stuff
      next();
    }

    // error handler
    function errorHandler(err, req, res, next) {
      // handle error and/or call next
      next(err);
    }
2014-11-10 19:50:58 +01:00
Raymond Feng 246f38c05d Add context propagation middleware
- Implement the middleware `loopback.context`
 - Inject context into juggler and strong-remoting
 - Make http context optional and default to false
 - Optionally mount context middleware from `loopback.rest`
2014-11-05 09:13:44 +01:00
Rob Halff 33096dafa7 Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
Raymond Feng 04729fdffa Bump version 2014-10-27 09:46:34 -07:00
Miroslav Bajtoš d08e296f48 2.6.0 2014-10-23 13:43:29 +02:00
Ritchie Martori 360063a5d2 2.5.0 2014-10-15 11:57:46 -07:00
Miroslav Bajtoš 59457eef6f 2.4.1 2014-10-10 19:51:52 +02:00
Ritchie Martori b00bce330f 2.4.0 2014-10-01 15:01:13 -07:00
Krishna Raman b5516757ae Move looback remote connector to npm module 2014-10-01 14:48:34 -07:00
Ritchie Martori 17ac0e8dd4 2.3.1 2014-10-01 13:39:07 -07:00
Ritchie Martori 056a392649 2.3.0 2014-10-01 10:55:53 -07:00
Ritchie Martori 724b721144 Update strong-remoting version 2014-10-01 10:55:28 -07:00
Raymond Feng 4a536ee6fe Bump versions 2014-09-12 23:29:43 -07:00
Miroslav Bajtoš 642229f513 package: add "web" keyword
Close #538
2014-09-06 19:28:58 +01:00
Ritchie Martori 964a357286 2.1.4 2014-08-26 10:02:42 -07:00
Raymond Feng c28b870784 Bump version 2014-08-18 21:49:08 -07:00
Ritchie Martori d82d789ffa 2.1.2 2014-08-11 10:55:34 -07:00
Raymond Feng 22bca61f32 Bump version 2014-08-08 15:57:11 -07:00
Raymond Feng a053204eca Bump version 2014-08-07 10:40:22 -07:00
Raymond Feng 06c5267d92 Bump version 2014-07-27 00:45:20 -07:00
Raymond Feng 0297ba3a79 Bump version 2014-07-26 14:30:13 -07:00
Al Tsang d877f0edf9 Update package.json 2014-07-25 21:14:27 -07:00
Miroslav Bajtoš 8687267f66 2.0.0 2014-07-22 20:37:38 +02:00
Raymond Feng e5b64c6143 Upgrade to nodemailer 1.0.1 2014-07-16 12:40:15 -07:00
Raymond Feng ff9bc10c06 Bump version 2014-07-16 09:09:50 -07:00
Raymond Feng 79f504a3c7 Merge branch 'master' into 2.0 2014-07-16 09:09:07 -07:00
Raymond Feng 9125218eab Remove unused dep 2014-07-15 16:47:13 -07:00
Raymond Feng 7fe347763b Bump version and update deps 2014-07-15 16:44:09 -07:00
Raymond Feng 7b36196561 Merge pull request #362 from strongloop/feature/remoting-add-remove
Add a test case for hasMany through add/remove remoting
2014-07-15 16:15:27 -07:00
Raymond Feng 54b13f4feb Upgrade to loopback-datasource-juggler@1.7.0 2014-07-15 16:15:02 -07:00
Miroslav Bajtoš e18ee116c1 2.0.0-beta6 2014-07-15 20:53:03 +02:00
Raymond Feng a98db0bf86 Remove unused deps 2014-07-08 08:55:06 -07:00
Miroslav Bajtoš be48a504e0 2.0.0-beta5 2014-07-03 10:14:41 +02:00
Miroslav Bajtoš 10d29c7d86 Merge branch 'master' into 2.0
Conflicts:
	package.json
2014-06-27 10:36:06 +02:00
Miroslav Bajtoš 57060ec4c1 v1.9.1 2014-06-27 10:25:47 +02:00
Miroslav Bajtoš f92d18939a 2.0.0-beta4 2014-06-26 14:58:58 +02:00
Miroslav Bajtoš fb66bf5c44 package: upgrade juggler to 2.0.0-beta2 2014-06-26 13:31:41 +02:00
Miroslav Bajtoš 50816ebbe3 Fix loopback in PhantomJS, fix karma tests
- Move configuration of Karma unit-tests from `Gruntfile.js` to a
  standalone file (`test/karma.conf.js`).

- Add a new Grunt task `karma:unit-ci` to run Karma unit-tests in
  PhantomJS and produce karma-xunit.xml file that can be consumed
  by the CI server.

- Add grunt-mocha-test, configure it to run unit-tests.

- Add `grunt test` task that runs both karma and mocha tests,
  detects Jenkins to produce XML output on CI server.

- Modify the `test` script in `package.json` to run
  `grunt mocha-and-karma` (an alias for `grunt test`).
  The alias is required to trick `sl-ci-run` to run `npm test`
  instead of calling directly `mocha`.

- Add `es5-shim` module to karma unit-tests in order to provide
  ES5-methods required by LoopBack.

- Fix `mixin(source)` in lib/loopback.js to work in PhantomJS.
  `Object.getOwnPropertyDescriptor()` provided by `es5-shim` does not
  work in the same way as in Node.
2014-06-26 13:30:09 +02:00
Miroslav Bajtoš 1daa93e448 Merge pull request #349 from lchenay/patch-2
Allow peer to use beta2 of datasource-juggler (and future)
2014-06-26 12:38:50 +02:00
Raymond Feng c20ecaf265 Bump version and update deps 2014-06-25 09:09:14 -07:00
Laurent 41b826d3c5 Allow peer to use beta2 of datasource-juggler (and future)
Signed-off-by: Laurent Chenay <lchenay@gmail.com>
2014-06-25 16:02:05 +02:00
Miroslav Bajtoš c896c78db0 Remove `app.boot`
Modify `app.boot` to throw an exception, pointing users to the new
module `loopback-boot`.
2014-06-25 14:09:06 +02:00
Raymond Feng 0d0a8658e5 Update juggler dep 2014-06-20 21:25:27 -07:00
Miroslav Bajtoš f20236c715 package: the next version will be a minor version 2014-06-16 21:01:31 +02:00
Miroslav Bajtoš f80259a245 Remove loopback-explorer from dev deps
1. loopback-explorer has a peer dependency on loopback, which
  forces `npm install` to install loopback within loopback. Somehow
  npm ends up installing loopback 1.x, which is not compatible with
  datasource-juggler 2.x.

 2. The only place using loopback-explorer is the app used by e2e tests.
  However, the e2e test app does not load the explorer at the moment
  and the e2e test are not being run anyway.
2014-06-13 10:19:15 +02:00
Miroslav Bajtoš d21669b844 Merge branch 'master' into 2.0
Conflicts:
	docs.json
	lib/application.js
	lib/loopback.js
	lib/models/data-model.js
	lib/models/model.js
	lib/models/user.js
	lib/registry.js
	package.json
	test/app.test.js
2014-06-13 10:09:25 +02:00
Miroslav Bajtoš e7884dce50 package: upgrade Mocha to 1.20 2014-06-12 10:33:56 +02:00
Miroslav Bajtoš 3deadcd180 test: fix ACL integration tests
Change the tests creating new users so that they send valid user data,
in order to prevent 422 "validation failed" responses.

Upgrade loopback-testing to 0.2.0.
2014-06-12 10:33:40 +02:00