lambda-live-debugger
Version:
Debug Lambda functions locally like it is running in the cloud
56 lines (55 loc) • 1.62 kB
TypeScript
/**
* Type for Lambda update data
*/
export type InfraLambdaUpdate = {
functionName: string;
layers: string[];
environmentVariables: Record<string, string>;
timeout: number;
};
/**
* Type for infrastructure changes when adding Lambda Live Debugger
*/
export type InfraAddingChanges = {
deployLayer: boolean;
existingLayerVersionArn: string | undefined;
lambdasToAdd: InfraLambdaUpdate[];
rolesToAdd: string[];
lambdasToRemove: InfraLambdaUpdate[];
rolesToRemove: string[];
};
/**
* Type for infrastructure changes when removing Lambda Live Debugger
*/
export type InfraRemovalChanges = {
lambdasToRemove: InfraLambdaUpdate[];
rolesToRemove: string[];
};
/**
* Delete the Lambda layer
*/
declare function deleteLayer(): Promise<void>;
/**
* Deploy the infrastructure
*/
declare function applyAddingInfra(changes: InfraAddingChanges): Promise<void>;
/**
* Get the planned infrastructure changes including removal from filtered functions
*/
declare function getInfraChangesForAdding(): Promise<InfraAddingChanges>;
/**
* Get the planned removal changes
*/
declare function getInfraChangesForRemoving(): Promise<InfraRemovalChanges>;
/**
* Remove the infrastructure
*/
declare function applyRemoveInfra(changes: InfraRemovalChanges): Promise<void>;
export declare const InfraDeploy: {
getInfraChangesForAdding: typeof getInfraChangesForAdding;
getInfraChangesForRemoving: typeof getInfraChangesForRemoving;
applyAddingInfra: typeof applyAddingInfra;
applyRemoveInfra: typeof applyRemoveInfra;
deleteLayer: typeof deleteLayer;
};
export {};