@serverless-stack/aws-lambda-ric
Advanced tools
Comparing version 2.0.5 to 2.0.6
/* eslint-disable no-console */ | ||
/** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -29,3 +10,2 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
const BeforeExitListener_1 = __importDefault(require("./BeforeExitListener")); | ||
const Errors = __importStar(require("../Errors")); | ||
/** | ||
@@ -52,10 +32,2 @@ * Construct the base-context object which includes the required flags and | ||
exports.build = build; | ||
function _homogeneousError(err) { | ||
if (err instanceof Error) { | ||
return err; | ||
} | ||
else { | ||
return new Error(err); | ||
} | ||
} | ||
/** | ||
@@ -74,4 +46,2 @@ * Build the callback function and the part of the context which exposes | ||
const postError = (err, callback) => { | ||
const homogeneousError = _homogeneousError(err); | ||
console.error("Invoke Error", Errors.toFormatted(homogeneousError)); | ||
client.postInvocationError(err, id, callback); | ||
@@ -161,2 +131,2 @@ }; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2FsbGJhY2tDb250Z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FBQ0osSUFBSTtLQUNMLENBQUM7SUFFRixPQUFPLENBQUMsUUFBUSxFQUFFLGVBQWUsQ0FBQyxDQUFDO0FBQ3JDLENBQUM7QUFFRDs7Ozs7Ozs7Ozs7R0FXRztBQUNILFNBQVMsdUJBQXVCLENBQzlCLFFBQTBCLEVBQzFCLGVBQWlDO0lBRWpDLElBQUksUUFBUSxHQUFHLEtBQUssQ0FBQztJQUNyQix3REFBd0Q7SUFDeEQsTUFBTSxrQkFBa0IsR0FBRyxVQUFVLE1BQWdCO1FBQ25ELE9BQU8sVUFBVSxHQUFHLElBQWU7WUFDakMsSUFBSSxDQUFDLFFBQVEsRUFBRTtnQkFDYix5Q0FBeUM7Z0JBQ3pDLE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFDO2dCQUN6QixRQUFRLEdBQUcsSUFBSSxDQUFDO2FBQ2pCO1FBQ0gsQ0FBQyxDQUFDO0lBQ0osQ0FBQyxDQUFDO0lBRUYsZUFBZSxDQUFDLE9BQU8sR0FBRyxrQkFBa0IsQ0FBQyxlQUFlLENBQUMsT0FBTyxDQUFDLENBQUM7SUFDdEUsZUFBZSxDQUFDLElBQUksR0FBRyxrQkFBa0IsQ0FBQyxlQUFlLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDaEUsZUFBZSxDQUFDLElBQUksR0FBRyxrQkFBa0IsQ0FBQyxlQUFlLENBQUMsSUFBSSxDQUFDLENBQUM7SUFFaEUsT0FBTyxDQUFDLGtCQUFrQixDQUFDLFFBQVEsQ0FBQyxFQUFFLGVBQWUsQ0FBQyxDQUFDO0FBQ3pELENBQUMifQ== |
{ | ||
"name": "@serverless-stack/aws-lambda-ric", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "AWS Lambda Runtime Interface Client for NodeJs", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/aws/aws-lambda-nodejs-runtime-interface-client", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4568609
1609