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.94 to 0.1.95

24

lib/adapters/aws/aws-price-calculator.js

@@ -64,7 +64,9 @@ "use strict";

response.items.map(function (item) {
var key = AwsPriceCalculator.getItemUniqueKey(aws_sub_command_1.AwsSubCommand.RDS_SUBCOMMAND, item);
var data = pricingList[key];
if (data !== undefined) {
var price = currency_converter_1.CurrencyConverter.convertToUSD(data.currency, data.price);
item.pricePerMonth = price * 720;
if (item.priceIsRequired) {
var key = AwsPriceCalculator.getItemUniqueKey(aws_sub_command_1.AwsSubCommand.RDS_SUBCOMMAND, item);
var data = pricingList[key];
if (data !== undefined) {
var price = currency_converter_1.CurrencyConverter.convertToUSD(data.currency, data.price);
item.pricePerMonth = price * 720;
}
}

@@ -113,7 +115,9 @@ return item;

response.items.map(function (item) {
var key = AwsPriceCalculator.getItemUniqueKey(aws_sub_command_1.AwsSubCommand.EC2_SUBCOMMAND, item);
var data = pricingList[key];
if (data !== undefined) {
var price = currency_converter_1.CurrencyConverter.convertToUSD(data.currency, data.price);
item.pricePerMonth = price * 720;
if (item.priceIsRequired) {
var key = AwsPriceCalculator.getItemUniqueKey(aws_sub_command_1.AwsSubCommand.EC2_SUBCOMMAND, item);
var data = pricingList[key];
if (data !== undefined) {
var price = currency_converter_1.CurrencyConverter.convertToUSD(data.currency, data.price);
item.pricePerMonth = price * 720;
}
}

@@ -120,0 +124,0 @@ return item;

@@ -251,3 +251,3 @@ "use strict";

ec2Items = responseJson.map(function (ec2ResponseItemJson) {
return new ec2_1.Ec2(ec2ResponseItemJson.InstanceId, ec2ResponseItemJson.ImageId, ec2ResponseItemJson.InstanceType, metrics_helper_1.MetricsHelper.getCpuUtilization(ec2ResponseItemJson), metrics_helper_1.MetricsHelper.getNetworkIn(ec2ResponseItemJson), metrics_helper_1.MetricsHelper.getNetworkOut(ec2ResponseItemJson), ec2ResponseItemJson.LaunchTime, ec2ResponseItemJson.Placement.Tenancy, ec2ResponseItemJson.Placement.AvailabilityZone, ec2ResponseItemJson.SpotInstanceRequestId !== undefined, ec2ResponseItemJson.PlatformDetails, ec2ResponseItemJson.UsageOperation, undefined, tags_helper_1.TagsHelper.getNameTagValue(ec2ResponseItemJson.Tags), [], ec2ResponseItemJson.C8rAccount);
return new ec2_1.Ec2(ec2ResponseItemJson.InstanceId, ec2ResponseItemJson.ImageId, ec2ResponseItemJson.InstanceType, metrics_helper_1.MetricsHelper.getCpuUtilization(ec2ResponseItemJson), metrics_helper_1.MetricsHelper.getNetworkIn(ec2ResponseItemJson), metrics_helper_1.MetricsHelper.getNetworkOut(ec2ResponseItemJson), ec2ResponseItemJson.LaunchTime, ec2ResponseItemJson.Placement.Tenancy, ec2ResponseItemJson.Placement.AvailabilityZone, ec2ResponseItemJson.SpotInstanceRequestId !== undefined, ec2ResponseItemJson.PlatformDetails, ec2ResponseItemJson.UsageOperation, '', true, undefined, tags_helper_1.TagsHelper.getNameTagValue(ec2ResponseItemJson.Tags), [], ec2ResponseItemJson.C8rAccount);
});

@@ -392,3 +392,3 @@ response = new response_1.Response(ec2Items);

.map(function (rdsResponseItemJson) {
return new rds_1.Rds(rdsResponseItemJson.DBInstanceIdentifier, rdsResponseItemJson.DBInstanceClass, rdsResponseItemJson.StorageType, metrics_helper_1.MetricsHelper.getDatabaseConnections(rdsResponseItemJson), metrics_helper_1.MetricsHelper.getDatabaseIOPS(rdsResponseItemJson), rdsResponseItemJson.Engine, rdsResponseItemJson.MultiAZ, rdsResponseItemJson.InstanceCreateTime, rdsResponseItemJson.AvailabilityZone, rdsResponseItemJson.DBInstanceStatus, undefined, tags_helper_1.TagsHelper.getNameTagValue(rdsResponseItemJson.Tags), [], rdsResponseItemJson.C8rAccount);
return new rds_1.Rds(rdsResponseItemJson.DBInstanceIdentifier, rdsResponseItemJson.DBInstanceClass, rdsResponseItemJson.StorageType, metrics_helper_1.MetricsHelper.getDatabaseConnections(rdsResponseItemJson), metrics_helper_1.MetricsHelper.getDatabaseIOPS(rdsResponseItemJson), rdsResponseItemJson.Engine, rdsResponseItemJson.MultiAZ, rdsResponseItemJson.InstanceCreateTime, rdsResponseItemJson.AvailabilityZone, rdsResponseItemJson.DBInstanceStatus, true, undefined, tags_helper_1.TagsHelper.getNameTagValue(rdsResponseItemJson.Tags), [], rdsResponseItemJson.C8rAccount);
});

@@ -395,0 +395,0 @@ response = new response_1.Response(rdsItems);

@@ -7,2 +7,3 @@ import { Ec2 } from '../../../domain/types/aws/ec2';

export default class AwsEc2Client extends AwsBaseClient implements AwsClientInterface {
private readonly SKIP_STATUS_FOR_PRICING;
collectAll(regions: string[]): Promise<Response<Ec2>>;

@@ -9,0 +10,0 @@ patch(resource: PatchRequestResourceInterface): Promise<any>;

@@ -74,3 +74,7 @@ "use strict";

function AwsEc2Client() {
return _super !== null && _super.apply(this, arguments) || this;
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.SKIP_STATUS_FOR_PRICING = [
'stopped'
];
return _this;
}

@@ -123,2 +127,3 @@ AwsEc2Client.prototype.collectAll = function (regions) {

AwsEc2Client.prototype.formatCollectResponse = function (response) {
var _this = this;
var data = [];

@@ -134,4 +139,4 @@ response.forEach(function (res) {

reservation.Instances.forEach(function (instance) {
var _a, _b, _c;
data.push(new ec2_1.Ec2(instance.InstanceId || '', instance.ImageId || '', instance.InstanceType || '', new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), ((_a = instance.LaunchTime) === null || _a === void 0 ? void 0 : _a.toISOString()) || '', ((_b = instance.Placement) === null || _b === void 0 ? void 0 : _b.Tenancy) || '', ((_c = instance.Placement) === null || _c === void 0 ? void 0 : _c.AvailabilityZone) || '', instance.SpotInstanceRequestId !== undefined, instance.PlatformDetails || '', instance.UsageOperation || '', undefined, tags_helper_1.TagsHelper.getNameTagValue(instance.Tags || []), tags_helper_1.TagsHelper.formatTags(instance.Tags)));
var _a, _b, _c, _d, _e;
data.push(new ec2_1.Ec2(instance.InstanceId || '', instance.ImageId || '', instance.InstanceType || '', new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), ((_a = instance.LaunchTime) === null || _a === void 0 ? void 0 : _a.toISOString()) || '', ((_b = instance.Placement) === null || _b === void 0 ? void 0 : _b.Tenancy) || '', ((_c = instance.Placement) === null || _c === void 0 ? void 0 : _c.AvailabilityZone) || '', instance.SpotInstanceRequestId !== undefined, instance.PlatformDetails || '', instance.UsageOperation || '', ((_d = instance.State) === null || _d === void 0 ? void 0 : _d.Name) || '', !_this.SKIP_STATUS_FOR_PRICING.includes(((_e = instance.State) === null || _e === void 0 ? void 0 : _e.Name) || ''), undefined, tags_helper_1.TagsHelper.getNameTagValue(instance.Tags || []), tags_helper_1.TagsHelper.formatTags(instance.Tags)));
});

@@ -195,3 +200,3 @@ });

// fetch only pending, running, stopping
return new client_ec2_1.DescribeInstancesCommand({ Filters: [{ Name: 'instance-state-code', Values: ['0', '16', '64'] }] });
return new client_ec2_1.DescribeInstancesCommand({ Filters: [{ Name: 'instance-state-code', Values: ['0', '16', '64', '80'] }] });
};

@@ -198,0 +203,0 @@ AwsEc2Client.getPatchCommand = function (instanceId, action) {

@@ -8,2 +8,3 @@ import { Rds } from '../../../domain/types/aws/rds';

private readonly ENGINE_WHITELIST;
private readonly SKIP_STATUS_FOR_PRICING;
private readonly STATUS_BLACKLIST;

@@ -10,0 +11,0 @@ collectAll(regions: string[]): Promise<Response<Rds>>;

@@ -91,2 +91,5 @@ "use strict";

];
_this.SKIP_STATUS_FOR_PRICING = [
'stopped'
];
_this.STATUS_BLACKLIST = [

@@ -100,3 +103,2 @@ 'creating',

'insufficient-capacity',
'stopped',
'stopping'

@@ -164,3 +166,3 @@ ];

}
data.push(new rds_1.Rds(db.DBInstanceIdentifier || '', db.DBInstanceClass || '', db.StorageType || '', new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), db.Engine || '', db.MultiAZ || false, ((_a = db.InstanceCreateTime) === null || _a === void 0 ? void 0 : _a.toISOString()) || '', db.AvailabilityZone || '', db.DBInstanceStatus || '', undefined, tags_helper_1.TagsHelper.getNameTagValue(db.TagList || []), tags_helper_1.TagsHelper.formatTags(db.TagList)));
data.push(new rds_1.Rds(db.DBInstanceIdentifier || '', db.DBInstanceClass || '', db.StorageType || '', new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), new metric_1.Metric(0, statistics_1.Statistics.Average, 'test'), db.Engine || '', db.MultiAZ || false, ((_a = db.InstanceCreateTime) === null || _a === void 0 ? void 0 : _a.toISOString()) || '', db.AvailabilityZone || '', db.DBInstanceStatus || '', !_this.SKIP_STATUS_FOR_PRICING.includes(db.DBInstanceStatus || ''), undefined, tags_helper_1.TagsHelper.getNameTagValue(db.TagList || []), tags_helper_1.TagsHelper.formatTags(db.TagList)));
});

@@ -167,0 +169,0 @@ });

@@ -70,2 +70,3 @@ "use strict";

var constant_1 = require("../../../constant");
var fs_1 = __importDefault(require("fs"));
var GcpSqlClient = /** @class */ (function (_super) {

@@ -86,5 +87,5 @@ __extends(GcpSqlClient, _super);

case 1:
_a.trys.push([1, 3, , 4]);
_a.trys.push([1, 4, , 5]);
return [4 /*yield*/, Promise.all([
googleapis_1.google.sqladmin('v1beta4').instances.list({ auth: this.authClient, project: this.projectId, filter: 'state = RUNNABLE AND settings.activationPolicy = ALWAYS' }),
googleapis_1.google.sqladmin('v1beta4').instances.list({ auth: this.authClient, project: this.projectId, filter: 'state = RUNNABLE' }),
this.getMetric(GcpSqlClient.METRIC_NETWORK_CONNECTIONS_NAME, GcpSqlClient.SERIES_ALIGNERS.MAX),

@@ -101,10 +102,13 @@ this.getMetric(GcpSqlClient.METRIC_NETWORK_CONNECTIONS_NAME, GcpSqlClient.SERIES_ALIGNERS.MIN),

response = _a.sent();
return [4 /*yield*/, fs_1.default.promises.writeFile('./s.json', JSON.stringify(response[0]), 'utf8')];
case 3:
_a.sent();
data = this.formatCollectResponse(response[0]);
this.formatMetric(data, response.slice(1, -1));
return [3 /*break*/, 4];
case 3:
return [3 /*break*/, 5];
case 4:
e_1 = _a.sent();
errors.push(new gcp_api_error_1.GcpApiError(gcp_sub_command_1.GcpSubCommand.SQL_SUBCOMMAND, e_1));
return [3 /*break*/, 4];
case 4: return [2 /*return*/, new response_1.Response(data, errors)];
return [3 /*break*/, 5];
case 5: return [2 /*return*/, new response_1.Response(data, errors)];
}

@@ -159,3 +163,3 @@ });

var _a;
data.push(new sql_1.Sql(v.name, v.region, v.databaseVersion, 'secondaryGceZone' in v, parseFloat(string_hepler_1.StringHelper.splitAndGetAtIndex(v.settings.tier, '-', -2) || '0'), parseFloat(string_hepler_1.StringHelper.splitAndGetAtIndex(v.settings.tier, '-', -1) || '0'), v.settings.dataDiskSizeGb, v.createTime, undefined, new sql_1.SqlMetric(), label_1.Label.createInstances((_a = v.settings) === null || _a === void 0 ? void 0 : _a.userLabels)));
data.push(new sql_1.Sql(v.name, v.region, v.settings.activationPolicy, v.settings.activationPolicy === 'ALWAYS', v.databaseVersion, 'secondaryGceZone' in v, parseFloat(string_hepler_1.StringHelper.splitAndGetAtIndex(v.settings.tier, '-', -2) || '0'), parseFloat(string_hepler_1.StringHelper.splitAndGetAtIndex(v.settings.tier, '-', -1) || '0'), v.settings.dataDiskSizeGb, v.createTime, undefined, new sql_1.SqlMetric(), label_1.Label.createInstances((_a = v.settings) === null || _a === void 0 ? void 0 : _a.userLabels)));
});

@@ -162,0 +166,0 @@ return data;

@@ -19,2 +19,3 @@ import { Response } from '../../../responses/response';

};
private readonly SKIP_STATUS_FOR_PRICING;
collectAll(): Promise<Response<Vm>>;

@@ -21,0 +22,0 @@ patch(resource: PatchRequestResourceInterface): Promise<any>;

@@ -73,3 +73,7 @@ "use strict";

function GcpVmClient() {
return _super !== null && _super.apply(this, arguments) || this;
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.SKIP_STATUS_FOR_PRICING = [
'TERMINATED'
];
return _this;
}

@@ -88,3 +92,3 @@ GcpVmClient.prototype.collectAll = function () {

return [4 /*yield*/, Promise.all([
google.compute('v1').instances.aggregatedList({ auth: this.authClient, project: this.projectId, filter: 'status != TERMINATED' }),
google.compute('v1').instances.aggregatedList({ auth: this.authClient, project: this.projectId }),
this.getMetric(GcpVmClient.METRIC_CPU_NAME, GcpVmClient.SERIES_ALIGNERS.MAX),

@@ -163,2 +167,3 @@ this.getMetric(GcpVmClient.METRIC_CPU_NAME, GcpVmClient.SERIES_ALIGNERS.MIN),

GcpVmClient.prototype.formatCollectResponse = function (response) {
var _this = this;
var data = [];

@@ -169,3 +174,3 @@ Object.keys(response.data.items).forEach(function (key) {

(_a = response.data.items[key].instances) === null || _a === void 0 ? void 0 : _a.forEach(function (v) {
data.push(new vm_1.Vm(v.id, v.name, string_hepler_1.StringHelper.splitAndGetAtIndex(v.zone, '/', -1) || '', string_hepler_1.StringHelper.splitAndGetAtIndex(v.machineType, '/', -1) || '', v.disks.map(function (d) { return d.deviceName; }), 0, // this will be populated during price calculation
data.push(new vm_1.Vm(v.id, v.name, string_hepler_1.StringHelper.splitAndGetAtIndex(v.zone, '/', -1) || '', string_hepler_1.StringHelper.splitAndGetAtIndex(v.machineType, '/', -1) || '', v.disks.map(function (d) { return d.deviceName; }), v.status, !_this.SKIP_STATUS_FOR_PRICING.includes(v.status), 0, // this will be populated during price calculation
0, // this will be populated during price calculation

@@ -172,0 +177,0 @@ v.creationTimestamp, undefined, undefined, undefined, new vm_1.VmMetric(), label_1.Label.createInstances(v.labels)));

@@ -11,2 +11,5 @@ "use strict";

var _a, _b;
if (!item.priceIsRequired) {
return;
}
var series = item.machineType.split('-')[0].toLowerCase();

@@ -54,2 +57,5 @@ var type = item.machineType.split('-')[1].toLowerCase();

var _a, _b, _c, _d;
if (!item.priceIsRequired) {
return;
}
var type = (_a = item.type) === null || _a === void 0 ? void 0 : _a.split('_')[0].toLowerCase();

@@ -56,0 +62,0 @@ var tempKey = type + '_' + (item.multiAz ? 'regional' : 'zonal') + '_';

@@ -238,3 +238,3 @@ "use strict";

disks = _a.sent();
items = responseJson[0].map(function (item) { return new vm_1.Vm(item.id, item.name, string_hepler_1.StringHelper.splitAndGetAtIndex(item.zone, '/', -1) || '', string_hepler_1.StringHelper.splitAndGetAtIndex(item.machineType, '/', -1) || '', item.disks.map(function (d) { return d.deviceName; }), 0, // this will be populated during price calculation
items = responseJson[0].map(function (item) { return new vm_1.Vm(item.id, item.name, string_hepler_1.StringHelper.splitAndGetAtIndex(item.zone, '/', -1) || '', string_hepler_1.StringHelper.splitAndGetAtIndex(item.machineType, '/', -1) || '', item.disks.map(function (d) { return d.deviceName; }), item.status, true, 0, // this will be populated during price calculation
0, // this will be populated during price calculation

@@ -277,3 +277,3 @@ item.creationTimestamp, metrics_helper_1.MetricsHelper.getGcpCpuUtilization(item), metrics_helper_1.MetricsHelper.getGcpNetworkIn(item), metrics_helper_1.MetricsHelper.getGcpNetworkOut(item), undefined, label_1.Label.createInstances(item.labels), _this.authClient.projectId); });

var _a;
return new sql_1.Sql(item.name, item.region, item.databaseVersion, 'secondaryGceZone' in item, parseFloat(string_hepler_1.StringHelper.splitAndGetAtIndex(item.settings.tier, '-', -2) || '0'), parseFloat(string_hepler_1.StringHelper.splitAndGetAtIndex(item.settings.tier, '-', -1) || '0'), item.settings.dataDiskSizeGb, item.createTime, metrics_helper_1.MetricsHelper.getGcpDatabaseConnections(item), undefined, label_1.Label.createInstances((_a = item.settings) === null || _a === void 0 ? void 0 : _a.userLabels), _this.authClient.projectId);
return new sql_1.Sql(item.name, item.region, item.settings.activationPolicy, true, item.databaseVersion, 'secondaryGceZone' in item, parseFloat(string_hepler_1.StringHelper.splitAndGetAtIndex(item.settings.tier, '-', -2) || '0'), parseFloat(string_hepler_1.StringHelper.splitAndGetAtIndex(item.settings.tier, '-', -1) || '0'), item.settings.dataDiskSizeGb, item.createTime, metrics_helper_1.MetricsHelper.getGcpDatabaseConnections(item), undefined, label_1.Label.createInstances((_a = item.settings) === null || _a === void 0 ? void 0 : _a.userLabels), _this.authClient.projectId);
});

@@ -280,0 +280,0 @@ gcp_price_calculator_1.GcpPriceCalculator.putSqlPrices(items, skus);

@@ -18,2 +18,4 @@ import { ProviderResource } from '../provider-resource';

readonly usageOperation: string;
readonly status: string;
readonly priceIsRequired: boolean;
metrics?: AwsEc2Metric | undefined;

@@ -23,3 +25,3 @@ readonly nameTag?: string | undefined;

readonly _account?: string | undefined;
constructor(id: string, imageId: string, type: string, cpu: Metric, networkIn: Metric, networkOut: Metric, age: string, tenancy: string, availabilityZone: string, isSpotInstance: boolean, platformDetails: string, usageOperation: string, metrics?: AwsEc2Metric | undefined, nameTag?: string | undefined, tags?: Tag[] | undefined, _account?: string | undefined);
constructor(id: string, imageId: string, type: string, cpu: Metric, networkIn: Metric, networkOut: Metric, age: string, tenancy: string, availabilityZone: string, isSpotInstance: boolean, platformDetails: string, usageOperation: string, status: string, priceIsRequired: boolean, metrics?: AwsEc2Metric | undefined, nameTag?: string | undefined, tags?: Tag[] | undefined, _account?: string | undefined);
getRegion(): string;

@@ -26,0 +28,0 @@ getOwner(): string | undefined;

@@ -23,3 +23,3 @@ "use strict";

__extends(Ec2, _super);
function Ec2(id, imageId, type, cpu, networkIn, networkOut, age, tenancy, availabilityZone, isSpotInstance, platformDetails, usageOperation, metrics, nameTag, tags, _account) {
function Ec2(id, imageId, type, cpu, networkIn, networkOut, age, tenancy, availabilityZone, isSpotInstance, platformDetails, usageOperation, status, priceIsRequired, metrics, nameTag, tags, _account) {
var _this = _super.call(this) || this;

@@ -38,2 +38,4 @@ _this.id = id;

_this.usageOperation = usageOperation;
_this.status = status;
_this.priceIsRequired = priceIsRequired;
_this.metrics = metrics;

@@ -40,0 +42,0 @@ _this.nameTag = nameTag;

@@ -16,2 +16,3 @@ import { ProviderResource } from '../provider-resource';

readonly status: string;
readonly priceIsRequired: boolean;
metrics?: AwsRdsMetric | undefined;

@@ -21,3 +22,3 @@ readonly nameTag?: string | undefined;

readonly _account?: string | undefined;
constructor(id: string, instanceType: string, storageType: string, averageConnections: Metric, averageIOPS: Metric, dbType: string, multiAZ: boolean, age: string, availabilityZone: string, status: string, metrics?: AwsRdsMetric | undefined, nameTag?: string | undefined, tags?: Tag[] | undefined, _account?: string | undefined);
constructor(id: string, instanceType: string, storageType: string, averageConnections: Metric, averageIOPS: Metric, dbType: string, multiAZ: boolean, age: string, availabilityZone: string, status: string, priceIsRequired: boolean, metrics?: AwsRdsMetric | undefined, nameTag?: string | undefined, tags?: Tag[] | undefined, _account?: string | undefined);
getRegion(): string;

@@ -24,0 +25,0 @@ getOwner(): string | undefined;

@@ -22,3 +22,3 @@ "use strict";

__extends(Rds, _super);
function Rds(id, instanceType, storageType, averageConnections, averageIOPS, dbType, multiAZ, age, availabilityZone, status, metrics, nameTag, tags, _account) {
function Rds(id, instanceType, storageType, averageConnections, averageIOPS, dbType, multiAZ, age, availabilityZone, status, priceIsRequired, metrics, nameTag, tags, _account) {
var _this = _super.call(this) || this;

@@ -35,2 +35,3 @@ _this.id = id;

_this.status = status;
_this.priceIsRequired = priceIsRequired;
_this.metrics = metrics;

@@ -37,0 +38,0 @@ _this.nameTag = nameTag;

@@ -8,2 +8,4 @@ import { Label } from './shared/label';

readonly region: string;
readonly activationPolicy: string;
readonly priceIsRequired: boolean;
readonly type?: string | undefined;

@@ -19,3 +21,3 @@ readonly multiAz?: boolean | undefined;

readonly _project?: string | undefined;
constructor(id: string, region: string, type?: string | undefined, multiAz?: boolean | undefined, cpu?: number | undefined, ram?: number | undefined, storage?: number | undefined, age?: string | undefined, connections?: Metric | undefined, metrics?: SqlMetric | undefined, labels?: Label[] | undefined, _project?: string | undefined);
constructor(id: string, region: string, activationPolicy: string, priceIsRequired: boolean, type?: string | undefined, multiAz?: boolean | undefined, cpu?: number | undefined, ram?: number | undefined, storage?: number | undefined, age?: string | undefined, connections?: Metric | undefined, metrics?: SqlMetric | undefined, labels?: Label[] | undefined, _project?: string | undefined);
getRegion(): string;

@@ -22,0 +24,0 @@ getOwner(): string | undefined;

@@ -22,6 +22,8 @@ "use strict";

__extends(Sql, _super);
function Sql(id, region, type, multiAz, cpu, ram, storage, age, connections, metrics, labels, _project) {
function Sql(id, region, activationPolicy, priceIsRequired, type, multiAz, cpu, ram, storage, age, connections, metrics, labels, _project) {
var _this = _super.call(this) || this;
_this.id = id;
_this.region = region;
_this.activationPolicy = activationPolicy;
_this.priceIsRequired = priceIsRequired;
_this.type = type;

@@ -28,0 +30,0 @@ _this.multiAz = multiAz;

@@ -11,2 +11,4 @@ import { Label } from './shared/label';

readonly disks: string[];
readonly status: string;
readonly priceIsRequired: boolean;
ram?: number | undefined;

@@ -21,3 +23,3 @@ vcpu?: number | undefined;

readonly _project?: string | undefined;
constructor(id: string, name: string, zone: string, machineType: string, disks: string[], ram?: number | undefined, vcpu?: number | undefined, age?: string | undefined, cpu?: Metric | undefined, networkIn?: Metric | undefined, networkOut?: Metric | undefined, metrics?: VmMetric | undefined, labels?: Label[] | undefined, _project?: string | undefined);
constructor(id: string, name: string, zone: string, machineType: string, disks: string[], status: string, priceIsRequired: boolean, ram?: number | undefined, vcpu?: number | undefined, age?: string | undefined, cpu?: Metric | undefined, networkIn?: Metric | undefined, networkOut?: Metric | undefined, metrics?: VmMetric | undefined, labels?: Label[] | undefined, _project?: string | undefined);
getRegion(): string;

@@ -24,0 +26,0 @@ getOwner(): string | undefined;

@@ -22,3 +22,3 @@ "use strict";

__extends(Vm, _super);
function Vm(id, name, zone, machineType, disks, ram, vcpu, age, cpu, networkIn, networkOut, metrics, labels, _project) {
function Vm(id, name, zone, machineType, disks, status, priceIsRequired, ram, vcpu, age, cpu, networkIn, networkOut, metrics, labels, _project) {
var _this = _super.call(this) || this;

@@ -30,2 +30,4 @@ _this.id = id;

_this.disks = disks;
_this.status = status;
_this.priceIsRequired = priceIsRequired;
_this.ram = ram;

@@ -32,0 +34,0 @@ _this.vcpu = vcpu;

export declare abstract class ProviderResource {
protected _pricePerMonth?: number;
priceIsRequired: boolean;
set pricePerMonth(value: number | undefined);

@@ -4,0 +5,0 @@ get pricePerMonth(): number | undefined;

@@ -6,2 +6,3 @@ "use strict";

function ProviderResource() {
this.priceIsRequired = true;
}

@@ -8,0 +9,0 @@ Object.defineProperty(ProviderResource.prototype, "pricePerMonth", {

{
"name": "@cloudchipr/cloudchipr-engine",
"version": "0.1.94",
"version": "0.1.95",
"description": "Cloudchipr engine",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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