Socket
Socket
Sign inDemoInstall

@mocks-server/core

Package Overview
Dependencies
283
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.3.0 to 3.4.0

2

package.json
{
"name": "@mocks-server/core",
"version": "3.3.0",
"version": "3.4.0",
"description": "Pluggable mock server supporting multiple route variants and mocks",

@@ -5,0 +5,0 @@ "keywords": [

@@ -31,2 +31,6 @@ /*

function formatDeprecatedMessage(format) {
return `Defining Plugins as ${format} is deprecated and it won't be supported in next major version. Consider migrating it to a Class Plugin: https://www.mocks-server.org/docs/plugins-developing-plugins`;
}
class Plugins {

@@ -61,2 +65,3 @@ static get id() {

this._alertsStop = this._alerts.collection("stop");
this._alertsFormat = this._alerts.collection("format");

@@ -130,2 +135,4 @@ this._addAlert = addAlert;

let pluginInstance,
formatIsObject,
formatIsFunction,
pluginConfig,

@@ -141,2 +148,3 @@ pluginAlerts,

this._pluginsRegistered++;
formatIsObject = true;
} else {

@@ -168,2 +176,3 @@ try {

this._pluginsRegistered++;
formatIsFunction = true;
} catch (err) {

@@ -219,2 +228,8 @@ return this._catchRegisterError(err, pluginIndex);

}
if (formatIsObject) {
this._alertsFormat.set(this._pluginId(pluginIndex), formatDeprecatedMessage("objects"));
}
if (formatIsFunction) {
this._alertsFormat.set(this._pluginId(pluginIndex), formatDeprecatedMessage("functions"));
}
return pluginInstance;

@@ -221,0 +236,0 @@ }

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