mappersmith
Advanced tools
Comparing version 2.14.3 to 2.15.0
@@ -22,4 +22,6 @@ 'use strict'; | ||
* @param {Object} obj.gatewayConfigs - default: base values from mappersmith | ||
* @param {Object} obj.ignoreGlobalMiddleware - default: false | ||
* @param {Object} obj.resources - default: {} | ||
* @param {Array} obj.middleware or obj.middlewares - default: [] | ||
* @param {Object} globalConfigs | ||
*/ | ||
@@ -40,4 +42,10 @@ function Manifest(obj, _ref) { | ||
var clientMiddleware = obj.middleware || obj.middlewares || []; | ||
// TODO: deprecate obj.middlewares in favor of obj.middleware | ||
this.middleware = [].concat(_toConsumableArray(obj.middleware || obj.middlewares || []), _toConsumableArray(middleware)); | ||
if (obj.ignoreGlobalMiddleware) { | ||
this.middleware = clientMiddleware; | ||
} else { | ||
this.middleware = [].concat(_toConsumableArray(clientMiddleware), _toConsumableArray(middleware)); | ||
} | ||
} | ||
@@ -44,0 +52,0 @@ |
@@ -18,3 +18,3 @@ 'use strict'; | ||
/* global VERSION */ | ||
var version = exports.version = '2.14.3'; | ||
var version = exports.version = '2.15.0'; | ||
@@ -21,0 +21,0 @@ var configs = exports.configs = { |
{ | ||
"name": "mappersmith", | ||
"version": "2.14.3", | ||
"version": "2.15.0", | ||
"description": "It is a lightweight rest client for node.js and the browser", | ||
@@ -49,2 +49,3 @@ "author": "Tulio Ornelas <ornelas.tulio@gmail.com>", | ||
"./lib/gateway/http.js": false, | ||
"./src/gateway/http.js": false, | ||
"./gateway/http.js": false | ||
@@ -51,0 +52,0 @@ }, |
@@ -393,2 +393,11 @@ [![npm version](https://badge.fury.io/js/mappersmith.svg)](http://badge.fury.io/js/mappersmith) | ||
* Global middleware can be disabled for specific clients with the option `ignoreGlobalMiddleware`, e.g: | ||
```javascript | ||
forge({ | ||
ignoreGlobalMiddleware: true, | ||
// + the usual configurations | ||
}) | ||
``` | ||
### <a name="context"></a> Context | ||
@@ -395,0 +404,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97981
1935
973