loopback/lib
Miroslav Bajtoš ae7d99682b Simplify `app.defineMiddlewarePhases`
Refactor the implementation to use the new method `phaseList.zipMerge`.

This is commit is changing the behaviour in the case when
the first new phase does not exist in the current list.

Before the change, all new phases were added just before the "routes"
phase.

After this change, new phases are added to the head of the list,
until an existing phase is encountered, at which point the regular
merge algorithm kicks in.

Example:

    app.defineMiddlewarePhases(['first', 'routes', 'subapps']);

Before the change: code throws an error - 'routes' already exists.

After the change: phases are merged with the following result:

    'first', 'initial', ..., 'routes', 'subapps', ...
2014-11-12 08:59:56 +01:00
..
connectors Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
middleware middleware/token: store the token in current ctx 2014-11-11 11:04:41 +01:00
access-context.js Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
application.js Coding style cleanup (Gruntfile, lib) 2014-11-04 08:25:35 +01:00
browser-express.js Emit a 'modelRemoted' event by app.model() 2014-07-24 17:00:27 -07:00
builtin-models.js models: move Change LDL def into a json file 2014-10-14 09:04:43 +02:00
express-middleware.js Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
loopback.js Make sure loopback has all properties from express 2014-11-11 11:27:39 -08:00
model.js Coding style cleanup (Gruntfile, lib) 2014-11-04 08:25:35 +01:00
persisted-model.js Update persisted-model.js 2014-11-06 10:56:37 -08:00
registry.js Allows ACLs/settings in model config 2014-11-07 11:14:40 -08:00
runtime.js Enable jscs for `lib`, fix style violations 2014-11-04 08:25:33 +01:00
server-app.js Simplify `app.defineMiddlewarePhases` 2014-11-12 08:59:56 +01:00