Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mockserver-client

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mockserver-client - npm Package Compare versions

Comparing version 5.6.0 to 5.6.1

2

examples/add_array_of_expectations/package.json

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0",
"mockserver-node": "5.6.0"
"mockserver-client": "5.6.1",
"mockserver-node": "5.6.1"
},

@@ -13,0 +13,0 @@ "devDependencies": {

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,4 +9,4 @@ {

"dependencies": {
"mockserver-client": "5.6.0"
"mockserver-client": "5.6.1"
}
}

@@ -9,5 +9,5 @@ {

"dependencies": {
"mockserver-client": "5.6.0",
"mockserver-node": "5.6.0"
"mockserver-client": "5.6.1",
"mockserver-node": "5.6.1"
}
}

@@ -9,5 +9,5 @@ {

"dependencies": {
"mockserver-client": "5.6.0",
"mockserver-node": "5.6.0"
"mockserver-client": "5.6.1",
"mockserver-node": "5.6.1"
}
}

@@ -82,19 +82,35 @@ /*

var arrayUniqueConcatenate = function (arrayTarget, arraySource) {
if (arraySource && arraySource.length) {
if (arrayTarget && arrayTarget.length) {
for (var i = 0; i < arraySource.length; i++) {
var arrayTargetAlreadyHasValue = false;
for (var j = 0; j < arrayTarget.length; j++) {
if (JSON.stringify(arraySource[i]) === JSON.stringify(arrayTarget[j])) {
arrayTargetAlreadyHasValue = true;
var headersUniqueConcatenate = function (arrayTarget, arraySource) {
if (!arrayTarget) {
arrayTarget = arraySource;
} else if (Array.isArray(arrayTarget) && Array.isArray(arraySource)) {
if (arraySource && arraySource.length) {
if (arrayTarget && arrayTarget.length) {
for (var i = 0; i < arraySource.length; i++) {
var arrayTargetAlreadyHasValue = false;
for (var j = 0; j < arrayTarget.length; j++) {
if (JSON.stringify(arraySource[i]) === JSON.stringify(arrayTarget[j])) {
arrayTargetAlreadyHasValue = true;
}
}
if (!arrayTargetAlreadyHasValue) {
arrayTarget.push(arraySource[i]);
}
}
if (!arrayTargetAlreadyHasValue) {
arrayTarget.push(arraySource[i]);
}
} else {
arrayTarget = arraySource;
}
} else {
arrayTarget = arraySource;
}
} else if (!Array.isArray(arrayTarget) && Array.isArray(arraySource)) {
arraySource.forEach(function(entry) {
arrayTarget[entry["name"]] = entry["values"];
});
} else if (Array.isArray(arrayTarget) && !Array.isArray(arraySource)) {
for (var property in arraySource) {
if (arraySource.hasOwnProperty(property)) {
arrayTarget.push({"name": property, "values": arraySource[property]});
}
}
} else if (!Array.isArray(arrayTarget) && !Array.isArray(arraySource)) {
arrayTarget = Object.assign(arrayTarget, arraySource);
}

@@ -143,3 +159,3 @@ return arrayTarget;

}
requestMatcher.headers = arrayUniqueConcatenate(requestMatcher.headers, defaultRequestHeaders);
requestMatcher.headers = headersUniqueConcatenate(requestMatcher.headers, defaultRequestHeaders);
return {

@@ -293,3 +309,3 @@ httpRequest: requestMatcher,

var response = requestHandler(request);
response.headers = arrayUniqueConcatenate(response.headers, [
response.headers = headersUniqueConcatenate(response.headers, [
{"name": "WebSocketCorrelationId", "values": request.headers["WebSocketCorrelationId"] || request.headers["websocketcorrelationid"]}

@@ -365,7 +381,7 @@ ]);

}
if (defaultRequestHeaders.length) {
if (defaultRequestHeaders) {
if (requestMatcher.httpRequest) {
requestMatcher.httpRequest.headers = arrayUniqueConcatenate(requestMatcher.httpRequest.headers, defaultRequestHeaders);
requestMatcher.httpRequest.headers = headersUniqueConcatenate(requestMatcher.httpRequest.headers, defaultRequestHeaders);
} else {
requestMatcher.headers = arrayUniqueConcatenate(requestMatcher.headers, defaultRequestHeaders);
requestMatcher.headers = headersUniqueConcatenate(requestMatcher.headers, defaultRequestHeaders);
}

@@ -382,7 +398,7 @@ }

}
if (defaultResponseHeaders.length) {
if (defaultResponseHeaders) {
if (responseMatcher.httpResponse) {
responseMatcher.httpResponse.headers = arrayUniqueConcatenate(responseMatcher.httpResponse.headers, defaultResponseHeaders);
responseMatcher.httpResponse.headers = headersUniqueConcatenate(responseMatcher.httpResponse.headers, defaultResponseHeaders);
} else {
responseMatcher.headers = arrayUniqueConcatenate(responseMatcher.headers, defaultResponseHeaders);
responseMatcher.headers = headersUniqueConcatenate(responseMatcher.headers, defaultResponseHeaders);
}

@@ -428,3 +444,3 @@ }

then: function (sucess, error) {
request.headers = arrayUniqueConcatenate(request.headers, defaultRequestHeaders);
request.headers = headersUniqueConcatenate(request.headers, defaultRequestHeaders);
return makeRequest(host, port, "/verify", {

@@ -475,3 +491,3 @@ "httpRequest": request,

var requestMatcher = arguments[i];
requestMatcher.headers = arrayUniqueConcatenate(requestMatcher.headers, defaultRequestHeaders);
requestMatcher.headers = headersUniqueConcatenate(requestMatcher.headers, defaultRequestHeaders);
requestSequence.push(requestMatcher);

@@ -478,0 +494,0 @@ }

{
"name": "mockserver-client",
"description": "A node client for the MockServer",
"version": "5.6.0",
"version": "5.6.1",
"homepage": "https://github.com/jamesdbloom/mockserver",

@@ -38,3 +38,3 @@ "author": {

"karma-xvfb-chrome-launcher": "0.0.1",
"mockserver-node": "5.6.0",
"mockserver-node": "5.6.1",
"nodeunit": "^0.11.3"

@@ -41,0 +41,0 @@ },

@@ -182,4 +182,5 @@ # mockserver-client-node

2018-12-29 | v5.5.1  | Upgrading MockServer to 5.5.1
2018-06-02 | v5.5.4  | Upgrading MockServer to 5.5.4
2018-06-02 | v5.6.0  | Upgrading MockServer to 5.6.0
2019-06-02 | v5.5.4  | Upgrading MockServer to 5.5.4
2019-06-02 | v5.6.0  | Upgrading MockServer to 5.6.0
2019-07-26 | v5.6.1  | Upgrading MockServer to 5.6.1

@@ -186,0 +187,0 @@ ---

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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