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

insomnia-plugin-response

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

insomnia-plugin-response - npm Package Compare versions

Comparing version 1.0.19 to 1.0.20

41

index.js

@@ -51,5 +51,27 @@ const jq = require('jsonpath');

},
{
displayName: 'Trigger Behavior',
help: 'Configure when to resend the dependent request',
type: 'enum',
options: [
{
displayName: 'Never',
description: 'never resend request',
value: 'never',
},
{
displayName: 'No History',
description: 'resend when no responses present',
value: 'no-history',
},
{
displayName: 'Always',
description: 'resend request when needed',
value: 'always',
},
],
},
],
async run(context, field, id, filter) {
async run(context, field, id, filter, resendBehavior) {
filter = filter || '';

@@ -70,4 +92,19 @@

const response = await context.util.models.response.getLatestForRequestId(id);
let response = await context.util.models.response.getLatestForRequestId(id);
let shouldResend = false;
if (resendBehavior === 'ALWAYS') {
shouldResend = true;
} else if (resendBehavior === 'NO_HISTORY' && !response) {
shouldResend = true;
} else if (resendBehavior === 'NEVER') {
shouldResend = false;
}
// Resend dependent request if needed but only if we're rendering for a send
if (shouldResend && (!response || context.renderPurpose === 'send')) {
console.log('[response tag] Resending dependency');
response = await context.network.sendRequest(request);
}
if (!response) {

@@ -74,0 +111,0 @@ throw new Error('No responses for request');

6

package.json
{
"name": "insomnia-plugin-response",
"version": "1.0.19",
"version": "1.0.20",
"author": "Gregory Schier <gschier1990@gmail.com>",

@@ -20,6 +20,6 @@ "description": "Insomnia response template tag",

"iconv-lite": "^0.4.19",
"insomnia-xpath": "^1.0.12",
"insomnia-xpath": "^1.0.13",
"jsonpath": "^1.0.0"
},
"gitHead": "74d5de69a1365dccd86a668aa815d1e7c4187dd2"
"gitHead": "0d333b008bba19422618c8e85808def1678b5d9b"
}
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