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

common-types

Package Overview
Dependencies
Maintainers
1
Versions
308
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-types - npm Package Compare versions

Comparing version 1.20.3 to 1.20.4

21

dist/cjs/index.js

@@ -361,2 +361,21 @@ 'use strict';

/**
* A type guard to ensure the passed in serverless configuration defines a "handler"
* rather than an "image".
*
* @param config a serverless configuration
*/
function isServerlessFunctionHandler(config) {
return config.handler ? true : false;
}
/**
* A type guard to ensure the passed in serverless configuration points to an
* "image" rather than a "handler"
*
* @param config a serverless configuration
*/
function isServerlessFunctionImage(config) {
return config.image ? true : false;
}
/**
* Ways in which missing data can be treated.

@@ -437,4 +456,6 @@ *

exports.isLambdaProxyRequest = isLambdaProxyRequest;
exports.isServerlessFunctionHandler = isServerlessFunctionHandler;
exports.isServerlessFunctionImage = isServerlessFunctionImage;
exports.parseStack = parseStack;
exports.wait = wait;
//# sourceMappingURL=index.js.map

25

dist/cjs/serverless/serverless-function.d.ts

@@ -13,3 +13,4 @@ import { seconds } from "../aliases";

*/
export declare type IServerlessFunction = ({
export declare type IServerlessFunction = IServerlessFunctionHandler | IServerlessFunctionImage;
export interface IServerlessFunctionHandler extends IServerlessFunctionConfig {
/**

@@ -22,3 +23,4 @@ * the handler function in the form of "/path/to/file.HANDLER_FN" where

handler: string;
} | {
}
export interface IServerlessFunctionImage extends IServerlessFunctionConfig {
/**

@@ -30,3 +32,18 @@ * Image to be used by function, cannot be used when `handler` is defined.

image: string;
}) & {
}
/**
* A type guard to ensure the passed in serverless configuration defines a "handler"
* rather than an "image".
*
* @param config a serverless configuration
*/
export declare function isServerlessFunctionHandler(config: IServerlessFunction): config is IServerlessFunctionHandler;
/**
* A type guard to ensure the passed in serverless configuration points to an
* "image" rather than a "handler"
*
* @param config a serverless configuration
*/
export declare function isServerlessFunctionImage(config: IServerlessFunction): config is IServerlessFunctionImage;
export interface IServerlessFunctionConfig {
/** optional, deployed Lambda name */

@@ -153,3 +170,3 @@ name?: string;

events?: IServerlessEvent[];
};
}
export interface ICloudformationReference {

@@ -156,0 +173,0 @@ Ref: string;

@@ -357,2 +357,21 @@ /**

/**
* A type guard to ensure the passed in serverless configuration defines a "handler"
* rather than an "image".
*
* @param config a serverless configuration
*/
function isServerlessFunctionHandler(config) {
return config.handler ? true : false;
}
/**
* A type guard to ensure the passed in serverless configuration points to an
* "image" rather than a "handler"
*
* @param config a serverless configuration
*/
function isServerlessFunctionImage(config) {
return config.image ? true : false;
}
/**
* Ways in which missing data can be treated.

@@ -428,3 +447,3 @@ *

export { AWS_REGIONS, HttpStatusCodes, LambdaEventParser, StepFunctionMissingDataTreatment, createBindDeploymentConfig, getBodyFromPossibleLambdaProxyRequest, isLambdaProxyRequest, parseStack, wait };
export { AWS_REGIONS, HttpStatusCodes, LambdaEventParser, StepFunctionMissingDataTreatment, createBindDeploymentConfig, getBodyFromPossibleLambdaProxyRequest, isLambdaProxyRequest, isServerlessFunctionHandler, isServerlessFunctionImage, parseStack, wait };
//# sourceMappingURL=index.js.map

@@ -13,3 +13,4 @@ import { seconds } from "../aliases";

*/
export declare type IServerlessFunction = ({
export declare type IServerlessFunction = IServerlessFunctionHandler | IServerlessFunctionImage;
export interface IServerlessFunctionHandler extends IServerlessFunctionConfig {
/**

@@ -22,3 +23,4 @@ * the handler function in the form of "/path/to/file.HANDLER_FN" where

handler: string;
} | {
}
export interface IServerlessFunctionImage extends IServerlessFunctionConfig {
/**

@@ -30,3 +32,18 @@ * Image to be used by function, cannot be used when `handler` is defined.

image: string;
}) & {
}
/**
* A type guard to ensure the passed in serverless configuration defines a "handler"
* rather than an "image".
*
* @param config a serverless configuration
*/
export declare function isServerlessFunctionHandler(config: IServerlessFunction): config is IServerlessFunctionHandler;
/**
* A type guard to ensure the passed in serverless configuration points to an
* "image" rather than a "handler"
*
* @param config a serverless configuration
*/
export declare function isServerlessFunctionImage(config: IServerlessFunction): config is IServerlessFunctionImage;
export interface IServerlessFunctionConfig {
/** optional, deployed Lambda name */

@@ -153,3 +170,3 @@ name?: string;

events?: IServerlessEvent[];
};
}
export interface ICloudformationReference {

@@ -156,0 +173,0 @@ Ref: string;

4

package.json
{
"name": "common-types",
"version": "1.20.3",
"version": "1.20.4",
"description": "Common types not included in Typescript",

@@ -28,3 +28,3 @@ "repository": "https://github.com/lifegadget/common-types",

"devDependencies": {
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@types/chai": "^4.2.11",

@@ -31,0 +31,0 @@ "@types/mocha": "^8.0.3",

Sorry, the diff of this file is not supported yet

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