Socket
Book a DemoInstallSign in
Socket

@aws-lambda-powertools/parser

Package Overview
Dependencies
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-lambda-powertools/parser - npm Package Compare versions

Comparing version

to
2.25.2

7

lib/cjs/parserDecorator.js

@@ -70,8 +70,7 @@ "use strict";

return (_target, _propertyKey, descriptor) => {
// biome-ignore lint/style/noNonNullAssertion: The descriptor.value is the method this decorator decorates, it cannot be undefined.
const original = descriptor.value;
const { schema, envelope, safeParse } = options;
descriptor.value = async function (event, context, callback) {
const parsedEvent = (0, parser_js_1.parse)(event, envelope, schema, safeParse);
return original.call(this, parsedEvent, context, callback);
descriptor.value = async function (...args) {
const parsedEvent = (0, parser_js_1.parse)(args[0], envelope, schema, safeParse);
return original.apply(this, [parsedEvent, ...args.slice(1)]);
};

@@ -78,0 +77,0 @@ return descriptor;

@@ -67,8 +67,7 @@ import { parse } from './parser.js';

return (_target, _propertyKey, descriptor) => {
// biome-ignore lint/style/noNonNullAssertion: The descriptor.value is the method this decorator decorates, it cannot be undefined.
const original = descriptor.value;
const { schema, envelope, safeParse } = options;
descriptor.value = async function (event, context, callback) {
const parsedEvent = parse(event, envelope, schema, safeParse);
return original.call(this, parsedEvent, context, callback);
descriptor.value = async function (...args) {
const parsedEvent = parse(args[0], envelope, schema, safeParse);
return original.apply(this, [parsedEvent, ...args.slice(1)]);
};

@@ -75,0 +74,0 @@ return descriptor;

{
"name": "@aws-lambda-powertools/parser",
"version": "2.25.1",
"version": "2.25.2",
"description": "The parser package for the Powertools for AWS Lambda (TypeScript) library.",

@@ -35,3 +35,3 @@ "author": {

"dependencies": {
"@aws-lambda-powertools/commons": "2.25.1",
"@aws-lambda-powertools/commons": "2.25.2",
"@standard-schema/spec": "^1.0.0"

@@ -38,0 +38,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet