Commit Graph

201 Commits

Author SHA1 Message Date
Miroslav Bajtoš 24ef5cd59e v2.11.0 2015-01-27 09:47:41 +01:00
Raymond Feng 41d9bbb7df v2.10.2 2015-01-16 10:33:39 -08:00
Raymond Feng e4dc893383 v2.10.1 2015-01-15 13:57:13 -08:00
Raymond Feng 0fed971e30 v2.10.0 2015-01-07 21:54:11 -08:00
Raymond Feng 47c9147f03 Revert the peer dep change to avoid npm complaints 2015-01-07 21:53:34 -08:00
Raymond Feng 7f381a07d7 Update strong-remoting dep 2015-01-07 14:41:37 -08:00
Raymond Feng 6bde5c8d30 v2.9.0 2015-01-07 14:04:31 -08:00
Raymond Feng 543e640b5a Update juggler dep 2015-01-07 14:04:05 -08:00
Miroslav Bajtoš fc60222569 v2.8.8 2015-01-07 12:08:07 +01:00
Miroslav Bajtoš 3e3a10153d v2.8.7 2015-01-06 08:39:55 +01:00
Ryan Graham da5774c0d6 package: add versioned sl-blip dependency
Resolves strongloop-internal/scrum-nodeops#239
2015-01-05 09:27:35 -08:00
Miroslav Bajtoš 579529ed1d v2.8.6 2014-12-15 19:29:16 +01:00
Miroslav Bajtoš 4744aa6920 server-app: make _sortLayersByPhase stable
Fix the phase-sorting algorithm to use a stable sorting algorithm,
since the built-in `Array.prototype.sort` is not stable.
2014-12-15 08:14:26 +01:00
Miroslav Bajtoš 84af4194fb Rework phased middleware, fix several bugs
Bugs fixed:

 - express helpers like `req.get` are now available in middleware
   handlers registered via `app.middleware`

 - `req.url` does not include the mountpath prefix now, this is
   consistent with the behaviour of `app.use`

The implementation of phased middleware was completely rewritten.
 - We no longer use Phase and PhaseList objects from loopback-phase.
 - Handler functions are registered via the `Layer` mechanism used by
   express router.
 - The app keeps the layers sorted according to phases.
2014-12-12 13:25:35 +01:00
Miroslav Bajtoš cbaf06e63b v2.8.5 2014-12-12 08:57:02 +01:00
Raymond Feng cb2f40bb86 Fix bcrypt issues for browserify 2014-12-08 14:59:21 -08:00
Raymond Feng ca9cd5641f v2.8.4 2014-12-08 11:21:20 -08:00
Miroslav Bajtoš 577e496b29 v2.8.3 2014-12-08 08:07:51 +01:00
Ryan Graham 7c0b2e83eb Remove unused underscore dependency 2014-12-02 21:53:30 -08:00
Miroslav Bajtoš 4ee05df20f v2.8.2 2014-11-27 10:01:11 +01:00
Miroslav Bajtoš d864972bc6 v2.8.1 2014-11-25 11:21:46 +01:00
Raymond Feng 503d0144cf v2.8.0 2014-11-19 11:38:56 -08:00
Raymond Feng a9b4df1f2d Expose more loopback middleware for require 2014-11-19 11:32:22 -08:00
Miroslav Bajtoš 2baa4b03a3 Scope app middleware to a list of paths
Add a new argument to `app.middleware` allowing developers
to restrict the middleware to a list of paths or regular expresions.

Modify `app.middlewareFromConfig` to pass `config.paths` as the second
arg of `app.middleware`.

Examples:

    // A string path (interpreted via path-to-regexp)
    app.middleware('auth', '/admin', ldapAuth);

    // A regular expression
    app.middleware('initial', /^\/~(admin|root)/, rejectWith404);

    // A list of scopes
    app.middleware('routes', ['/api', /^\/assets/.*\.json$/], foo);

    // From config
    app.middlewareFromConfig(
      handlerFactory,
      {
        phase: 'initial',
        paths: ['/scope', /^\/(a|b)/]
      });
2014-11-19 15:42:54 +01:00
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