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

@r35007/mock-server

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@r35007/mock-server - npm Package Versions

13
11

16.0.0

Diff

Changelog

Source

v16.0.0

  • Added - Support for .cjs file extension. When package.json has a type module then provide a .cjs file extension path to require a javascript file.
  • Added - dbMode: "config". If dbMode is config then it expects always a config object to a route and setting _config: true is an optional attribute when dbMode is in config.
    • For Example: If dbMode is config then in db.json
    const db = {
      '/user': { mock: { id: 1, user: 'foo' } }, // -> "/user": { _config: true, "mock": { "id": 1, "user": "foo" } }
      '/users': [
        { id: 1, user: 'foo' },
        { id: 2, user: 'bar' },
      ], // -> "/user": { _config: true, "mock": { } }.
      '/auth': (req, res, next) => {
        next();
      }, // -> This route directly uses the middleware without any helper middleware wrappers.
    };
    
  • Removed - Edit, Refresh, Reset etc.. Action buttons for a direct use route in a Home Page.
  • Fixed - Calling next middleware sends Page not found issue resolved.
  • Code optimized.
r35007
published 15.1.0 •

Changelog

Source

v15.1.0

  • Fixed - Transfer Encoding header issue fixed.
r35007
published 15.0.0 •

Changelog

Source

v15.0.0

  • Updated - axios node package to version 1.3.2.
  • Added - noCache in Mock Server CLI options.
  • Added - locals.statusCode - Directly set any statuscode to locals using middleware.
  • Added - locals.headers - Directly set any response headers to locals using middleware.
  • Added - Editing Headers, Fetch Headers, Fetch StatusCode in Mock Server Homepage.
  • Fixed - Checkbox in Home page Modal not setting to false value issue fixed.
r35007
published 14.2.0 •

Changelog

Source

v14.2.0

  • Fixed - Cache Control header issue fixed.
r35007
published 14.1.1 •

Changelog

Source

v14.1.1

  • Fixed - Types issue fixes
r35007
published 14.1.0 •

Changelog

Source

v14.1.0

  • Fixed - response is delayed issue fixed by adding Transfer-Encoding: chunked in response headers.
  • Fixed - _IterateResponse middleware not working issue fixed.
  • Added - On Ctrl+Click or Cmd+Click the link in home page will open the link in new tab.
  • Added - noCache option to config. Default to true. Set to false to enable cache.
  • Added - /:id params will to added to route if the the route has a _AdvancedSearch or _CrudOperation middleware and don't have ends with a param.
r35007
published 14.0.1 •

Changelog

Source

v14.0.1

  • Fixed - setConfig not merging new config with existing config object if merge option is set to true issue fixed
  • Fixed - mockServer.defaults not merging new config with existing config object issue fixed
  • Added - Error logs are added if an invalid path is specified
r35007
published 14.0.0 •

Changelog

Source

v14.0.0

  • Added - homePage in config. Set to false to disable Mock Server Homepage.
  • Fixed - Fetching image response getting as a image tag string instead of blob.
  • Fixed - Giving Enter in search textbox in Mock Server Homepage keeps on loading the page.
  • Added - Shows number of routes hosted in a server after starting the server.
  • Removed - Hi text in terminal if quiet flag is set to true.
r35007
published 13.1.0 •

Changelog

Source

v13.1.0

  • Added - Type for CLI options.
r35007
published 13.0.3 •

Changelog

Source

v13.0.3

  • set process.env.NODE_ENV to test to remove all console logs.
  • Fixed - If already a server is running at a same port cli throws error twice issue fixed.
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