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

borders-rest-client

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

borders-rest-client - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

11

lib/test-backends/stub.js

@@ -65,2 +65,5 @@ 'use strict';

function validateResponseProperties(response) {
if (!response || !response.status) {
throw new Error('The response property "status" is required');
}
var _iteratorNormalCompletion2 = true;

@@ -128,5 +131,5 @@ var _didIteratorError2 = false;

const stubRequest = (method, request, response) => {
const stubRequest = (method, request, response = { status: 200 }) => {
validateResponseProperties(response);
validateHeaders(response);
validateResponseProperties(response);
validateRequestProperties(request);

@@ -146,3 +149,5 @@

}, request));
if (!response) {
throw new _error.RestError(`No response defined for rest call "${method}: ${request.path}"`);
}
if (response.status >= 400) {

@@ -149,0 +154,0 @@ throw new _error.RestStatusError(undefined, response.status, response);

{
"name": "borders-rest-client",
"version": "4.1.0",
"version": "4.2.0",
"description": "Specification for system border rest-client",

@@ -5,0 +5,0 @@ "author": "Actano GmbH (https://rplan.com/)",

@@ -8,3 +8,3 @@ // eslint-disable-next-line import/no-extraneous-dependencies

import { STUB_CALL } from '../test-commands/stub-call'
import { RestStatusError } from '../error'
import { RestError, RestStatusError } from '../error'

@@ -30,2 +30,5 @@ const supportedResponseProperties = [

function validateResponseProperties(response) {
if (!response || !response.status) {
throw new Error('The response property "status" is required')
}
for (const responseProperty of Object.keys(response)) {

@@ -51,5 +54,5 @@ if (!supportedResponseProperties.includes(responseProperty)) {

const stubRequest = (method, request, response) => {
const stubRequest = (method, request, response = { status: 200 }) => {
validateResponseProperties(response)
validateHeaders(response)
validateResponseProperties(response)
validateRequestProperties(request)

@@ -71,3 +74,5 @@

})
if (!response) {
throw new RestError(`No response defined for rest call "${method}: ${request.path}"`)
}
if (response.status >= 400) {

@@ -74,0 +79,0 @@ throw new RestStatusError(undefined, response.status, response)

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