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

sls-helper-plugin-janis

Package Overview
Dependencies
Maintainers
2
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sls-helper-plugin-janis - npm Package Compare versions

Comparing version 2.9.1 to 2.9.2

4

CHANGELOG.md

@@ -9,2 +9,6 @@ # Changelog

## [2.9.2] - 2020-03-26
### Fixed
- Escaped error response message to avoid breaking JSON structure
## [2.9.1] - 2020-03-26

@@ -11,0 +15,0 @@ ### Fixed

2

lib/templates/response.js

@@ -11,3 +11,3 @@ 'use strict';

},
template: '#set($headers = $input.path("$.headers"))\n#foreach($key in $headers.keySet())\n#set($k = $util.escapeJavaScript($key))\n#set($v = $headers.get($key))\n$context.responseOverride.header.put("$k", "$v")\n#end\n#set($origin = $input.params("Origin"))\n#if(!$origin || $origin == "")#set($origin = $input.params("origin"))#end\n#if($origin && $origin != "")\n#set($context.responseOverride.header.Access-Control-Allow-Origin = $origin)\n#end\n#set($errorMessage = $input.path("$.errorMessage"))\n#if($errorMessage && $errorMessage != "")\n#set($errorMessageObj = $util.parseJson($errorMessage))\n{"message":"$errorMessageObj.body.message"}\n#else\n#set($body = $input.json("$.body"))\n#if($body && $body != "")\n$util.parseJson($body).replaceAll("\\`", "")\n#end\n#end'
template: '#set($headers = $input.path("$.headers"))\n#foreach($key in $headers.keySet())\n#set($k = $util.escapeJavaScript($key))\n#set($v = $headers.get($key))\n$context.responseOverride.header.put("$k", "$v")\n#end\n#set($origin = $input.params("Origin"))\n#if(!$origin || $origin == "")#set($origin = $input.params("origin"))#end\n#if($origin && $origin != "")\n#set($context.responseOverride.header.Access-Control-Allow-Origin = $origin)\n#end\n#set($errorMessage = $input.path("$.errorMessage"))\n#if($errorMessage && $errorMessage != "")\n#set($errorMessageObj = $util.parseJson($errorMessage))\n{"message":"$util.escapeJavaScript($errorMessageObj.body.message)"}\n#else\n#set($body = $input.json("$.body"))\n#if($body && $body != "")\n$util.parseJson($body)\n#end\n#end'
};
{
"name": "sls-helper-plugin-janis",
"version": "2.9.1",
"version": "2.9.2",
"description": "A Serverless Helper plugin to add custom helpers for JANIS Commerce",

@@ -5,0 +5,0 @@ "main": "lib/plugin.js",

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