@trayio/threadneedle
Advanced tools
Comparing version 1.15.1 to 1.15.2
var when = require('when'); | ||
var needle = require('@trayio/needle'); | ||
var _ = require('lodash'); | ||
var setParam = require('mout/queryString/setParam'); | ||
var guid = require('mout/random/guid'); | ||
var { setParam, guid } = require('../utils/mout'); | ||
var logger = require('../logger'); | ||
@@ -7,0 +7,0 @@ var globalize = require('./globalize'); |
var when = require('when'); | ||
var _ = require('lodash'); | ||
var setParam = require('mout/queryString/setParam'); | ||
var guid = require('mout/random/guid'); | ||
var { setParam, guid } = require('../utils/mout'); | ||
var logger = require('../logger'); | ||
@@ -14,4 +14,2 @@ var globalize = require('./globalize'); | ||
var formatResponse = require('./formatResponse'); | ||
//The format of the response should always be an object with headers and body | ||
@@ -35,4 +33,4 @@ var formatResponse = require('./formatResponse'); | ||
if (_.isFunction(config)) { | ||
logger.info(methodName+': Running method function.'); | ||
return addMethodFunction(threadneedle, config, afterHeadersFunction, params); | ||
logger.info(methodName+': Running method function.'); | ||
return addMethodFunction(threadneedle, config, afterHeadersFunction, params); | ||
} | ||
@@ -125,7 +123,7 @@ | ||
.then(function (soapRequest) { | ||
return when.promise(function(resolve, reject) { | ||
return when.promise(function (resolve, reject) { | ||
var handleResponse = function(err, result, raw, soapHeaders) { | ||
var handleResponse = function (err, result, raw, soapHeaders) { | ||
function handleReject(payload) { | ||
function handleReject (payload) { | ||
return reject({ | ||
@@ -150,5 +148,3 @@ payload: payload, | ||
}); | ||
} | ||
else { | ||
} else { | ||
return handleReject(err); | ||
@@ -175,3 +171,3 @@ } | ||
validationError = validateExpects(res, expects); | ||
if (validationError){ | ||
if (validationError) { | ||
return handleReject(validationError); | ||
@@ -183,3 +179,3 @@ } | ||
validationError = validateNotExpects(res, notExpects); | ||
if (validationError){ | ||
if (validationError) { | ||
return handleReject(validationError); | ||
@@ -244,3 +240,3 @@ } | ||
function rejectAfterHeaders(error) { | ||
function rejectAfterHeaders (error) { | ||
afterHeadersReject(error, payload, response); | ||
@@ -247,0 +243,0 @@ } |
@@ -5,3 +5,3 @@ /* | ||
*/ | ||
const startsWith = require('mout/string/startsWith'); | ||
const { startsWith } = require('../../utils/mout'); | ||
const _ = require('lodash'); | ||
@@ -8,0 +8,0 @@ |
{ | ||
"name": "@trayio/threadneedle", | ||
"version": "1.15.1", | ||
"version": "1.15.2", | ||
"description": "A framework for simplifying working with HTTP-based APIs.", | ||
@@ -31,3 +31,2 @@ "main": "lib/index.js", | ||
"lodash": "~4.17.21", | ||
"mout": "~1.2.3", | ||
"mustache": "~3.2.1", | ||
@@ -34,0 +33,0 @@ "soap": "~0.43.0", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
76135
6
38
1483
1
- Removedmout@~1.2.3
- Removedmout@1.2.4(transitive)