Socket
Socket
Sign inDemoInstall

@cloudchipr/cloudchipr-engine

Package Overview
Dependencies
Maintainers
4
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudchipr/cloudchipr-engine - npm Package Compare versions

Comparing version 0.1.86 to 0.1.87

16

lib/adapters/aws/clients/aws-rds-client.js

@@ -140,4 +140,5 @@ "use strict";

var _this = this;
var metadata = resource.metadata;
return new Promise(function (resolve, reject) {
_this.getClient(resource.region).send(AwsRdsClient.getCleanCommand(resource.id, resource.action))
_this.getClient(resource.region).send(AwsRdsClient.getCleanCommand(resource.id, resource.action, !!metadata.snapshot))
.then(function () { return resolve(resource.id); })

@@ -219,7 +220,14 @@ .catch(function (e) {

};
AwsRdsClient.getCleanCommand = function (instanceIdentifier, action) {
AwsRdsClient.getCleanCommand = function (instanceIdentifier, action, snapshot) {
var props = { DBInstanceIdentifier: instanceIdentifier };
if (action === constant_1.CleanAction.STOP) {
return new client_rds_1.StopDBInstanceCommand({ DBInstanceIdentifier: instanceIdentifier });
return new client_rds_1.StopDBInstanceCommand(props);
}
return new client_rds_1.DeleteDBInstanceCommand({ DBInstanceIdentifier: instanceIdentifier, SkipFinalSnapshot: true });
if (!snapshot) {
props.SkipFinalSnapshot = true;
}
else {
props.FinalDBSnapshotIdentifier = "snapshot-".concat(instanceIdentifier, "-").concat((0, moment_1.default)().unix());
}
return new client_rds_1.DeleteDBInstanceCommand(props);
};

@@ -226,0 +234,0 @@ AwsRdsClient.getMetricStatisticsCommand = function (instanceIdentifier, metricName, unit) {

@@ -13,2 +13,5 @@ export interface CleanAwsEbsMetadataInterface {

}
export interface CleanAwsRdsMetadataInterface {
snapshot?: boolean;
}
export interface CleanGcpVmMetadataInterface {

@@ -25,2 +28,2 @@ zone: string;

}
export declare type CleanRequestResourceMetadataInterface = CleanAwsEbsMetadataInterface | CleanAwsEipMetadataInterface | CleanAwsElbMetadataInterface | CleanGcpVmMetadataInterface | CleanGcpDisksMetadataInterface | CleanGcpLbEipMetadataInterface;
export declare type CleanRequestResourceMetadataInterface = CleanAwsEbsMetadataInterface | CleanAwsEipMetadataInterface | CleanAwsElbMetadataInterface | CleanAwsRdsMetadataInterface | CleanGcpVmMetadataInterface | CleanGcpDisksMetadataInterface | CleanGcpLbEipMetadataInterface;
{
"name": "@cloudchipr/cloudchipr-engine",
"version": "0.1.86",
"version": "0.1.87",
"description": "Cloudchipr engine",

@@ -33,3 +33,3 @@ "main": "lib/index.js",

"@aws-sdk/client-pricing": "^3.121.0",
"@aws-sdk/client-rds": "^3.47.1",
"@aws-sdk/client-rds": "^3.180.0",
"@aws-sdk/credential-providers": "^3.41.0",

@@ -36,0 +36,0 @@ "fs": "0.0.1-security",

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