mockserver-client
Advanced tools
Comparing version 5.10.0 to 5.11.0
@@ -357,5 +357,24 @@ /* | ||
var mockAnyResponse = function (expectation) { | ||
return makeRequest(host, port, "/expectation", addDefaultExpectationHeaders(expectation)); | ||
return makeRequest(host, port, "/mockserver/expectation", addDefaultExpectationHeaders(expectation)); | ||
}; | ||
/** | ||
* Setup an expectation by specifying an OpenAPI expectation | ||
* for example: | ||
* | ||
* client.openAPIExpectation( | ||
* { | ||
* "specUrlOrPayload": "https://raw.githubusercontent.com/mock-server/mockserver/master/mockserver-integration-testing/src/main/resources/org/mockserver/mock/openapi_petstore_example.json", | ||
* "operationsAndResponses": { | ||
* "showPetById": "200", | ||
* "createPets": "500" | ||
* } | ||
* } | ||
* ); | ||
* | ||
* @param expectation the OpenAPI expectation to setup on the MockServer | ||
*/ | ||
var openAPIExpectation = function (expectation) { | ||
return makeRequest(host, port, "/mockserver/openapi", expectation); | ||
}; | ||
/** | ||
* Setup an expectation by specifying a request matcher, and | ||
@@ -412,3 +431,3 @@ * a local request handler function. The request handler function receives each | ||
webSocketClient.clientIdCallback(function (clientId) { | ||
return makeRequest(host, port, "/expectation", createExpectationWithCallback(requestMatcher, clientId, times)).then(sucess, error); | ||
return makeRequest(host, port, "/mockserver/expectation", createExpectationWithCallback(requestMatcher, clientId, times)).then(sucess, error); | ||
}); | ||
@@ -458,3 +477,3 @@ }, error); | ||
request.headers = headersUniqueConcatenate(request.headers, defaultRequestHeaders); | ||
return makeRequest(host, port, "/verify", { | ||
return makeRequest(host, port, "/mockserver/verify", { | ||
"httpRequest": request, | ||
@@ -515,3 +534,3 @@ "times": { | ||
then: function (sucess, error) { | ||
return makeRequest(host, port, "/verifySequence", { | ||
return makeRequest(host, port, "/mockserver/verifySequence", { | ||
"httpRequests": requestSequence | ||
@@ -543,3 +562,3 @@ }).then( | ||
var reset = function () { | ||
return makeRequest(host, port, "/reset"); | ||
return makeRequest(host, port, "/mockserver/reset"); | ||
}; | ||
@@ -561,3 +580,3 @@ /** | ||
} | ||
return makeRequest(host, port, "/clear" + (type ? "?type=" + type : ""), addDefaultRequestMatcherHeaders(pathOrRequestMatcher)); | ||
return makeRequest(host, port, "/mockserver/clear" + (type ? "?type=" + type : ""), addDefaultRequestMatcherHeaders(pathOrRequestMatcher)); | ||
}; | ||
@@ -573,3 +592,3 @@ /** | ||
} | ||
return makeRequest(host, port, "/bind", {ports: ports}); | ||
return makeRequest(host, port, "/mockserver/bind", {ports: ports}); | ||
}; | ||
@@ -589,3 +608,3 @@ /** | ||
then: function (sucess, error) { | ||
makeRequest(host, port, "/retrieve?type=REQUESTS&format=JSON", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
makeRequest(host, port, "/mockserver/retrieve?type=REQUESTS&format=JSON", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
.then(function (result) { | ||
@@ -610,3 +629,3 @@ sucess(result.body && JSON.parse(result.body)); | ||
then: function (sucess, error) { | ||
makeRequest(host, port, "/retrieve?type=REQUEST_RESPONSES&format=JSON", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
makeRequest(host, port, "/mockserver/retrieve?type=REQUEST_RESPONSES&format=JSON", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
.then(function (result) { | ||
@@ -633,3 +652,3 @@ sucess(result.body && JSON.parse(result.body)); | ||
then: function (sucess, error) { | ||
return makeRequest(host, port, "/retrieve?type=ACTIVE_EXPECTATIONS&format=JSON", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
return makeRequest(host, port, "/mockserver/retrieve?type=ACTIVE_EXPECTATIONS&format=JSON", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
.then(function (result) { | ||
@@ -656,3 +675,3 @@ sucess(result.body && JSON.parse(result.body)); | ||
then: function (sucess, error) { | ||
return makeRequest(host, port, "/retrieve?type=RECORDED_EXPECTATIONS&format=JSON", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
return makeRequest(host, port, "/mockserver/retrieve?type=RECORDED_EXPECTATIONS&format=JSON", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
.then(function (result) { | ||
@@ -678,3 +697,3 @@ sucess(result.body && JSON.parse(result.body)); | ||
then: function (sucess, error) { | ||
return makeRequest(host, port, "/retrieve?type=LOGS", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
return makeRequest(host, port, "/mockserver/retrieve?type=LOGS", addDefaultRequestMatcherHeaders(pathOrRequestMatcher)) | ||
.then(function (result) { | ||
@@ -687,3 +706,5 @@ sucess(result.body && result.body.split("------------------------------------")); | ||
/* jshint -W003 */ | ||
var _this = { | ||
openAPIExpectation: openAPIExpectation, | ||
mockAnyResponse: mockAnyResponse, | ||
@@ -690,0 +711,0 @@ mockWithCallback: mockWithCallback, |
{ | ||
"name": "mockserver-client", | ||
"description": "A node client for the MockServer", | ||
"version": "5.10.0", | ||
"version": "5.11.0", | ||
"homepage": "http://mock-server.com", | ||
@@ -45,3 +45,3 @@ "author": { | ||
"karma-xvfb-chrome-launcher": "0.0.1", | ||
"mockserver-node": "5.10.0", | ||
"mockserver-node": "5.11.0", | ||
"nodeunit": "^0.11.3" | ||
@@ -55,2 +55,4 @@ }, | ||
"dependencies": { | ||
"grunt-ts": "^6.0.0-beta.22", | ||
"json-schema-to-typescript": "^9.1.0", | ||
"q": "~2.0", | ||
@@ -57,0 +59,0 @@ "websocket": "^1.0.30" |
@@ -197,2 +197,3 @@ # mockserver-client-node | ||
2020-03-24 | v5.10.0 | Upgrading MockServer to 5.10.0 | ||
2020-07-08 | v5.11.0 | Upgrading MockServer to 5.11.0 | ||
@@ -199,0 +200,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
67217
962
204
4
+ Addedgrunt-ts@^6.0.0-beta.22
+ Added@apidevtools/json-schema-ref-parser@9.0.9(transitive)
+ Added@jsdevtools/ono@7.1.3(transitive)
+ Added@types/json-schema@7.0.15(transitive)
+ Addedabbrev@1.1.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedany-promise@1.3.0(transitive)
+ Addedanymatch@2.0.0(transitive)
+ Addedargparse@1.0.102.0.1(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-each@1.0.1(transitive)
+ Addedarray-slice@1.1.0(transitive)
+ Addedarray-unique@0.3.2(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedasync@3.2.6(transitive)
+ Addedasync-each@1.0.6(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbase@0.11.2(transitive)
+ Addedbinary-extensions@1.13.1(transitive)
+ Addedbindings@1.5.0(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbraces@2.3.23.0.3(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedcall-me-maybe@1.0.2(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedchokidar@2.1.8(transitive)
+ Addedclass-utils@0.3.6(transitive)
+ Addedcli-color@2.0.4(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcolors@1.1.2(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcopy-descriptor@0.1.1(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcsproj2ts@1.1.0(transitive)
+ Addeddateformat@4.6.3(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddefine-property@0.2.51.0.02.0.2(transitive)
+ Addeddetect-file@1.0.0(transitive)
+ Addeddetect-indent@4.0.0(transitive)
+ Addeddetect-newline@2.1.0(transitive)
+ Addedes6-promise@0.1.24.2.8(transitive)
+ Addedes6-weak-map@2.0.3(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedeventemitter2@0.4.14(transitive)
+ Addedexit@0.1.2(transitive)
+ Addedexpand-brackets@2.1.4(transitive)
+ Addedexpand-tilde@2.0.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextend-shallow@2.0.13.0.2(transitive)
+ Addedextglob@2.0.4(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedfill-range@4.0.07.1.1(transitive)
+ Addedfindup-sync@4.0.05.0.0(transitive)
+ Addedfined@1.2.0(transitive)
+ Addedflagged-respawn@1.0.1(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfor-own@1.0.0(transitive)
+ Addedfragment-cache@0.2.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedfsevents@1.2.13(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-value@2.0.6(transitive)
+ Addedgetobject@1.0.2(transitive)
+ Addedglob@7.1.7(transitive)
+ Addedglob-parent@3.1.0(transitive)
+ Addedglobal-modules@1.0.0(transitive)
+ Addedglobal-prefix@1.0.2(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedgrunt@1.6.1(transitive)
+ Addedgrunt-cli@1.4.3(transitive)
+ Addedgrunt-known-options@2.0.0(transitive)
+ Addedgrunt-legacy-log@3.0.0(transitive)
+ Addedgrunt-legacy-log-utils@2.1.0(transitive)
+ Addedgrunt-legacy-util@2.0.1(transitive)
+ Addedgrunt-ts@6.0.0-beta.22(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedhas-value@0.3.11.0.0(transitive)
+ Addedhas-values@0.1.41.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhomedir-polyfill@1.0.3(transitive)
+ Addedhooker@0.2.3(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addedinterpret@1.1.0(transitive)
+ Addedis-absolute@1.0.0(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-binary-path@1.0.1(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-core-module@2.16.0(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.71.0.3(transitive)
+ Addedis-extendable@0.1.11.0.1(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-finite@1.1.0(transitive)
+ Addedis-glob@3.1.04.0.3(transitive)
+ Addedis-number@3.0.07.0.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedis-promise@2.2.2(transitive)
+ Addedis-relative@1.0.0(transitive)
+ Addedis-unc-path@1.0.0(transitive)
+ Addedis-utf8@0.2.1(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedisobject@2.1.03.0.1(transitive)
+ Addedjs-yaml@3.14.14.1.0(transitive)
+ Addedjsmin2@1.2.1(transitive)
+ Addedjson-schema-ref-parser@9.0.9(transitive)
+ Addedjson-schema-to-typescript@9.1.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedkind-of@3.2.24.0.06.0.3(transitive)
+ Addedliftup@3.0.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlru-queue@0.1.0(transitive)
+ Addedmake-iterator@1.0.1(transitive)
+ Addedmap-cache@0.2.2(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedmemoizee@0.4.17(transitive)
+ Addedmicromatch@3.1.104.0.8(transitive)
+ Addedminimatch@3.0.8(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmixin-deep@1.3.2(transitive)
+ Addedmkdirp@1.0.4(transitive)
+ Addedmz@2.7.0(transitive)
+ Addednan@2.22.0(transitive)
+ Addednanomatch@1.2.13(transitive)
+ Addedncp@0.5.1(transitive)
+ Addednopt@3.0.64.0.3(transitive)
+ Addednormalize-path@2.1.13.0.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedobject-copy@0.1.0(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedobject.defaults@1.1.0(transitive)
+ Addedobject.map@1.0.1(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedosenv@0.1.5(transitive)
+ Addedparse-filepath@1.0.2(transitive)
+ Addedparse-passwd@1.0.0(transitive)
+ Addedpascalcase@0.1.1(transitive)
+ Addedpath-dirname@1.0.2(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpath-root@0.1.1(transitive)
+ Addedpath-root-regex@0.1.2(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedposix-character-classes@0.1.1(transitive)
+ Addedprettier@2.8.8(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedreaddirp@2.2.1(transitive)
+ Addedrechoir@0.7.1(transitive)
+ Addedregex-not@1.0.2(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedrepeating@2.0.1(transitive)
+ Addedresolve@1.22.9(transitive)
+ Addedresolve-dir@1.0.1(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedret@0.1.15(transitive)
+ Addedrimraf@2.2.6(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsafe-regex@1.1.0(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsax@1.4.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedsnapdragon@0.8.2(transitive)
+ Addedsnapdragon-node@2.1.1(transitive)
+ Addedsnapdragon-util@3.0.1(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedsprintf-js@1.0.31.1.3(transitive)
+ Addedstatic-extend@0.1.2(transitive)
+ Addedstdin@0.0.1(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-bom@2.0.0(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedthenify@3.3.1(transitive)
+ Addedthenify-all@1.6.0(transitive)
+ Addedtimers-ext@0.1.8(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedto-regex@3.0.2(transitive)
+ Addedto-regex-range@2.1.15.0.1(transitive)
+ Addedtypescript@5.7.2(transitive)
+ Addedunc-path-regex@0.1.2(transitive)
+ Addedunderscore.string@3.3.6(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunset-value@1.0.0(transitive)
+ Addedupath@1.2.0(transitive)
+ Addedurix@0.1.0(transitive)
+ Addeduse@3.1.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedv8flags@3.2.0(transitive)
+ Addedwhich@1.3.12.0.2(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedxml2js@0.4.23(transitive)
+ Addedxmlbuilder@11.0.1(transitive)