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

scenario-mock-server

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scenario-mock-server - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

2

dist/index.d.ts

@@ -40,2 +40,3 @@ import * as server_with_kill from 'server-with-kill';

params: Record<string, string>;
headers: Record<string, string>;
}, HttpResponse>;

@@ -51,2 +52,3 @@ type GraphQlResponse = {

variables: Record<string, unknown>;
headers: Record<string, string>;
}, GraphQlResponse>;

@@ -53,0 +55,0 @@ type GraphQlMock = {

2

dist/index.js

@@ -547,3 +547,3 @@ "use strict";

});
return handler({ variables });
return handler({ variables, headers: req.headers });
}

@@ -550,0 +550,0 @@

{
"name": "scenario-mock-server",
"version": "1.0.2",
"version": "1.1.0",
"description": "Mock server powered by scenarios",

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

@@ -202,3 +202,3 @@ # Scenario Mock Server

> `function({ query, body, params, context, updateContext }): response | Promise<response>`
> `function({ query, body, params, headers, context, updateContext }): response | Promise<response>`

@@ -212,2 +212,3 @@ <!-- https://www.tablesgenerator.com/markdown_tables -->

| params | `object` | `{}` | params object as defined by `express`. |
| `headers` | `object` | `{}` | Request headers, lowercase keys, string values only. |
| context | `object` | `{}` | Data stored across API calls. |

@@ -254,3 +255,3 @@ | updateContext | `Function` | `partialContext => updatedContext` | Used to update context. `partialContext` can either be an `object` or a function (`context` => `partialContext`). |

> `function({ variables, context, updateContext }): response | Promise<response>`
> `function({ variables, headers, context, updateContext }): response | Promise<response>`

@@ -262,4 +263,5 @@ <!-- https://www.tablesgenerator.com/markdown_tables -->

| variables | `object` | `{}` | variables sent by client. |
| `headers` | `object` | `{}` | Request headers, lowercase keys, string values only. |
| context | `object` | `{}` | Data stored across API calls. |
| updateContext | `Function` | `partialContext => updatedContext` | Used to update context. `partialContext` can either be an `object` or a function (`context` => `partialContext`). |
| response | `undefined` / `GraphQlResponse` | _required_ | [GraphQlResponse](#graphqlresponse). |

Sorry, the diff of this file is not supported yet

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