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

@mocks-server/plugin-admin-api

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mocks-server/plugin-admin-api - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

4

CHANGELOG.md

@@ -17,2 +17,6 @@ # Change Log

## [1.4.2] - 2020-03-22
### Changed
- Update dependencies
## [1.4.1] - 2020-01-12

@@ -19,0 +23,0 @@ ### Changed

38

package.json
{
"name": "@mocks-server/plugin-admin-api",
"version": "1.4.1",
"version": "1.4.2",
"description": "Plugin for Mocks Server. Provides a REST API for administrating settings, fixtures and behaviors",

@@ -31,2 +31,3 @@ "keywords": [

"test:acceptance": "jest --config=jest.acceptance.config.js --runInBand",
"test:coverage": "npm run test",
"test:ci": "npm run test && npm run test:acceptance",

@@ -39,23 +40,23 @@ "coveralls": "cat ./coverage/lcov.info | coveralls"

"dependencies": {
"@mocks-server/admin-api-paths": "1.0.3",
"@hapi/boom": "9.0.0",
"@mocks-server/admin-api-paths": "1.0.5",
"@hapi/boom": "9.1.0",
"express": "4.17.1"
},
"devDependencies": {
"@mocks-server/core": "^1.4.2",
"coveralls": "^3.0.9",
"@mocks-server/core": "1.4.5",
"coveralls": "3.0.9",
"eslint": "6.8.0",
"eslint-config-prettier": "6.9.0",
"eslint-plugin-prettier": "^3.1.2",
"fs-extra": "^8.1.0",
"husky": "4.0.6",
"is-promise": "^2.1.0",
"jest": "24.9.0",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1",
"request": "^2.88.0",
"request-promise": "^4.2.5",
"sinon": "^8.0.1",
"eslint-config-prettier": "6.10.1",
"eslint-plugin-prettier": "3.1.2",
"fs-extra": "9.0.0",
"husky": "4.2.3",
"is-promise": "2.1.0",
"jest": "25.1.0",
"lint-staged": "10.0.8",
"prettier": "2.0.1",
"request": "2.88.2",
"request-promise": "4.2.5",
"sinon": "9.0.1",
"strip-ansi": "6.0.0",
"tree-kill-sync": "^1.0.0"
"tree-kill-sync": "1.0.0"
},

@@ -75,5 +76,4 @@ "lint-staged": {

"engines": {
"node": ">8.0.0",
"npm": ">6.0.0"
"node": "10.x || 12.x || 13.x"
}
}
[![Build status][travisci-image]][travisci-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Quality Gate][quality-gate-image]][quality-gate-url]
[![NPM dependencies][npm-dependencies-image]][npm-dependencies-url] [![Greenkeeper badge](https://badges.greenkeeper.io/mocks-server/plugin-admin-api.svg)](https://greenkeeper.io/) [![Last commit][last-commit-image]][last-commit-url] [![Last release][release-image]][release-url]
[![NPM dependencies][npm-dependencies-image]][npm-dependencies-url] [![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com) [![Last commit][last-commit-image]][last-commit-url] [![Last release][release-image]][release-url]

@@ -5,0 +5,0 @@ [![NPM downloads][npm-downloads-image]][npm-downloads-url] [![License][license-image]][license-url]

@@ -32,3 +32,3 @@ /*

res.send({
version
version,
});

@@ -35,0 +35,0 @@ }

@@ -33,4 +33,4 @@ /*

name: behavior.name, // TODO, deprecate name property
fixtures: behavior.fixtures.map(fixture => fixture.id),
extendedFrom: behavior.extendedFrom
fixtures: behavior.fixtures.map((fixture) => fixture.id),
extendedFrom: behavior.extendedFrom,
};

@@ -52,3 +52,3 @@ }

this._tracer.verbose(`${PLUGIN_NAME}: Sending behavior ${id} | ${req.id}`);
const foundBehavior = this._behaviors.collection.find(behavior => behavior.id === id);
const foundBehavior = this._behaviors.collection.find((behavior) => behavior.id === id);
if (foundBehavior) {

@@ -55,0 +55,0 @@ res.status(200);

@@ -15,3 +15,3 @@ /*

PLUGIN_NAME: "plugin-admin-api",
DEPRECATED_API_PATH: "/mocks"
DEPRECATED_API_PATH: "/mocks",
};

@@ -38,3 +38,3 @@ /*

res.send({
delay: this._settings.get("delay")
delay: this._settings.get("delay"),
});

@@ -41,0 +41,0 @@ }

@@ -35,3 +35,3 @@ /*

request: fixture.request,
response: fixture.response
response: fixture.response,
};

@@ -53,3 +53,3 @@ }

this._tracer.verbose(`${PLUGIN_NAME}: Sending fixture ${id} | ${req.id}`);
const foundFixture = this._fixtures.collection.find(fixture => fixture.id === id);
const foundFixture = this._fixtures.collection.find((fixture) => fixture.id === id);
if (foundFixture) {

@@ -56,0 +56,0 @@ res.status(200);

@@ -18,3 +18,3 @@ /*

ABOUT,
FIXTURES
FIXTURES,
} = require("@mocks-server/admin-api-paths");

@@ -34,3 +34,3 @@

PLUGIN_NAME,
DEPRECATED_API_PATH
DEPRECATED_API_PATH,
} = require("./constants");

@@ -52,3 +52,3 @@

description: `Api path for ${PLUGIN_NAME}`,
default: DEFAULT_BASE_PATH
default: DEFAULT_BASE_PATH,
});

@@ -60,3 +60,3 @@

description: `Disable deprecated paths of ${PLUGIN_NAME}`,
default: true
default: true,
});

@@ -63,0 +63,0 @@

@@ -31,3 +31,3 @@ /*

const errors = [];
Object.keys(newSettings).forEach(newSettingKey => {
Object.keys(newSettings).forEach((newSettingKey) => {
if (!this._settings.getValidOptionName(newSettingKey)) {

@@ -46,3 +46,3 @@ errors.push(`Invalid option name "${newSettingKey}"`);

} else {
Object.keys(newSettings).forEach(newSettingKey => {
Object.keys(newSettings).forEach((newSettingKey) => {
this._tracer.verbose(

@@ -49,0 +49,0 @@ `${PLUGIN_NAME}: Changing setting "${newSettingKey}" to "${newSettings[newSettingKey]}" | ${req.id}`

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