New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kaluza/mock-server

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaluza/mock-server - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

7

dist/mockserver.js

@@ -59,2 +59,3 @@ "use strict";

Method["POST"] = "POST";
Method["PATCH"] = "PATCH";
})(Method || (Method = {}));

@@ -74,2 +75,5 @@ var MockServer = /** @class */ (function () {

};
MockServer.prototype.patch = function (path, response) {
return this.createEndpoint(Method.PATCH, path, response);
};
MockServer.prototype.start = function () {

@@ -142,2 +146,5 @@ return __awaiter(this, void 0, void 0, function () {

break;
case Method.PATCH:
_this.router.patch(path, middleware_1.recordCalls(endpoint.record.calls), endpoint.handler);
break;
}

@@ -144,0 +151,0 @@ });

2

package.json
{
"name": "@kaluza/mock-server",
"version": "0.5.0",
"version": "0.6.0",
"main": "dist/mockserver.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -59,2 +59,10 @@ # Node Mock Server

#### server.patch(path, response)
Registers a PATCH endpoint for the given path, returning an `EndpointRecord`.
* `path` is an [Express-compatible path](https://expressjs.com/en/4x/api.html#path-examples)
* `response` can be either an object, which will be returned as JSON, or an Express-compatible request handler. This lets you vary the response based on what's in the request.
If two endpoints are created on the same path, the most recently created one will take precedence.
#### server.reset()

@@ -61,0 +69,0 @@

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