Socket
Socket
Sign inDemoInstall

@requestly/mock-server

Package Overview
Dependencies
65
Maintainers
7
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

20

build/main.js

@@ -23,9 +23,2 @@ "use strict";

const app = (0, express_1.default)();
app.use((0, cors_1.default)({
origin: true,
exposedHeaders: "*",
credentials: true,
preflightContinue: true,
optionsSuccessStatus: 200,
}));
app.use((_, res, next) => {

@@ -38,7 +31,10 @@ res.set({

});
// ends the options requests without sending anything
const optionsRegex = new RegExp(`${pathPrefix}\/(.+)`);
app.options(optionsRegex, (_, res) => {
res.end();
});
app.use((0, cors_1.default)({
origin: true,
exposedHeaders: "*",
methods: "*",
credentials: true,
preflightContinue: false,
optionsSuccessStatus: 200,
}));
// pathPrefix to handle /mockv2 prefix in cloud functions

@@ -45,0 +41,0 @@ const regex = new RegExp(`${pathPrefix}\/(.+)`);

2

package.json
{
"name": "@requestly/mock-server",
"version": "0.0.2",
"version": "0.0.3",
"description": "- Methods: GET, POST, PUT, OPTIONS - Description - Endpoint (can be full path) (/api/v1/users) - Multiple Responses - Shuffle Response - Sequential Response - Rules in Response - Status (Any status code 2xx, 4xx) - Latency - Body - Templating - Faker js - Headers",

@@ -5,0 +5,0 @@ "main": "build/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc