Socket
Socket
Sign inDemoInstall

mappersmith

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mappersmith - npm Package Compare versions

Comparing version 2.20.0 to 2.21.0

22

client-builder.js

@@ -7,2 +7,4 @@ 'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _manifest = require('./manifest');

@@ -70,2 +72,3 @@

var gatewayConfigs = this.manifest.gatewayConfigs;
var requestPhaseExecutionFailed = false;

@@ -75,3 +78,22 @@ var chainRequestPhase = function chainRequestPhase(requestPromise, middleware) {

return middleware.request(request);
}).catch(function (e) {
if (requestPhaseExecutionFailed) {
throw e;
}
requestPhaseExecutionFailed = true;
var error = new Error('[Mappersmith] middleware "' + middleware.__name + '" failed in the request phase: ' + e.message);
error.stack = e.stack;
throw error;
}).then(function (request) {
if (request instanceof _request2.default) {
return request;
}
requestPhaseExecutionFailed = true;
var typeValue = typeof request === 'undefined' ? 'undefined' : _typeof(request);
var prettyType = typeValue === 'object' || typeValue === 'function' ? request.name || typeValue : typeValue;
throw new Error('[Mappersmith] middleware "' + middleware.__name + '" should return "Request" but returned "' + prettyType + '"');
}).then(function (request) {
return _this3.Promise.resolve(request);

@@ -78,0 +100,0 @@ });

1

manifest.js

@@ -97,2 +97,3 @@ 'use strict';

return (0, _utils.assign)({
__name: middlewareFactory.name || middlewareFactory.toString(),
request: function request(_request) {

@@ -99,0 +100,0 @@ return _request;

2

mappersmith.js

@@ -18,3 +18,3 @@ 'use strict';

/* global VERSION */
var version = exports.version = '2.20.0';
var version = exports.version = '2.21.0';

@@ -21,0 +21,0 @@ var configs = exports.configs = {

{
"name": "mappersmith",
"version": "2.20.0",
"version": "2.21.0",
"description": "It is a lightweight rest client for node.js and the browser",

@@ -5,0 +5,0 @@ "author": "Tulio Ornelas <ornelas.tulio@gmail.com>",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc