@aws-cdk/aws-autoscaling-common
Advanced tools
Comparing version 0.26.0 to 0.27.0
import { ScalingInterval } from "./types"; | ||
export interface CompleteScalingInterval { | ||
lower: number; | ||
upper: number; | ||
change?: number; | ||
readonly lower: number; | ||
readonly upper: number; | ||
readonly change?: number; | ||
} | ||
@@ -12,4 +12,4 @@ /** | ||
export interface Alarms { | ||
lowerAlarmIntervalIndex?: number; | ||
upperAlarmIntervalIndex?: number; | ||
readonly lowerAlarmIntervalIndex?: number; | ||
readonly upperAlarmIntervalIndex?: number; | ||
} | ||
@@ -16,0 +16,0 @@ /** |
@@ -39,8 +39,9 @@ "use strict"; | ||
while (propagateBounds(intervals)) { /* Repeat */ } | ||
const lastIndex = intervals.length - 1; | ||
// Validate that no intervals have undefined bounds now, which must mean they're complete. | ||
if (intervals[0].lower === undefined) { | ||
intervals[0].lower = 0; | ||
intervals[0] = Object.assign({}, intervals[0], { lower: 0 }); | ||
} | ||
if (last(intervals).upper === undefined) { | ||
last(intervals).upper = Infinity; | ||
if (intervals[lastIndex].upper === undefined) { | ||
intervals[lastIndex] = Object.assign({}, intervals[lastIndex], { upper: Infinity }); | ||
} | ||
@@ -110,5 +111,6 @@ for (const interval of intervals) { | ||
function makeZerosUndefined(intervals) { | ||
for (const interval of intervals) { | ||
for (let i = 0; i < intervals.length; ++i) { | ||
const interval = intervals[i]; | ||
if (interval.change === 0) { | ||
interval.change = undefined; | ||
intervals[i] = Object.assign({}, interval, { change: undefined }); | ||
} | ||
@@ -124,3 +126,3 @@ } | ||
if (intervals[i].change === undefined && intervals[i + 1].change === undefined) { | ||
intervals[i].upper = intervals[i + 1].upper; | ||
intervals[i] = Object.assign({}, intervals[i], { upper: intervals[i + 1].upper }); | ||
intervals.splice(i + 1, 1); | ||
@@ -157,3 +159,3 @@ } | ||
if (intervals[i].upper !== undefined && intervals[i + 1].lower === undefined) { | ||
intervals[i + 1].lower = intervals[i].upper; | ||
intervals[i + 1] = Object.assign({}, intervals[i + 1], { lower: intervals[i].upper }); | ||
ret = true; | ||
@@ -165,3 +167,3 @@ } | ||
if (intervals[i].lower !== undefined && intervals[i - 1].upper === undefined) { | ||
intervals[i - 1].upper = intervals[i].lower; | ||
intervals[i - 1] = Object.assign({}, intervals[i - 1], { upper: intervals[i].lower }); | ||
ret = true; | ||
@@ -205,2 +207,2 @@ } | ||
exports.findAlarmThresholds = findAlarmThresholds; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJ2YWwtdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbnRlcnZhbC11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQVFBOztHQUVHO0FBQ0gsU0FBZ0Isa0JBQWtCLENBQUMsU0FBNEIsRUFBRSxrQkFBMkI7SUFDMUYsdUNBQXVDO0lBQ3ZDLE1BQU0sSUFBSSxHQUFHLHlCQUF5QixDQUFDLFNBQVMsQ0FBQyxDQUFDO0lBQ2xELHlEQUF5RDtJQUN6RCxpQkFBaUIsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUV4Qix1RkFBdUY7SUFDdkYsSUFBSSxDQUFDLGtCQUFrQixFQUFFO1FBQUUsa0JBQWtCLENBQUMsSUFBSSxDQUFDLENBQUM7S0FBRTtJQUV0RCx1RUFBdUU7SUFDdkUsaUJBQWlCLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDeEIsMEJBQTBCLENBQUMsSUFBSSxDQUFDLENBQUM7SUFFakMsT0FBTyxJQUFJLENBQUM7QUFDZCxDQUFDO0FBZEQsZ0RBY0M7QUFFRDs7R0FFRztBQUNILFNBQVMseUJBQXlCLENBQUMsU0FBNEI7SUFDN0QsSUFBSSxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRTtRQUN4QixNQUFNLElBQUksS0FBSyxDQUFDLDhCQUE4QixDQUFDLENBQUM7S0FDakQ7SUFFRCxLQUFLLE1BQU0sUUFBUSxJQ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ZWQsXG4gICAgfTtcbiAgfVxuXG4gIGlmIChpbnRlcnZhbHMubGVuZ3RoID09PSAxKSB7XG4gICAgcmV0dXJuIHsgdXBwZXJBbGFybUludGVydmFsSW5kZXg6IDAgfTtcbiAgfVxuXG4gIGNvbnN0IG1pZGRsZUluZGV4ID0gTWF0aC5mbG9vcihpbnRlcnZhbHMubGVuZ3RoIC8gMik7XG5cbiAgcmV0dXJuIHtcbiAgICBsb3dlckFsYXJtSW50ZXJ2YWxJbmRleDogbWlkZGxlSW5kZXggLSAxLFxuICAgIHVwcGVyQWxhcm1JbnRlcnZhbEluZGV4OiBtaWRkbGVJbmRleFxuICB9O1xufSJdfQ== |
@@ -19,4 +19,4 @@ import appscaling = require('../lib'); | ||
export interface ArbitraryIntervals { | ||
absolute: boolean; | ||
intervals: appscaling.ScalingInterval[]; | ||
readonly absolute: boolean; | ||
readonly intervals: appscaling.ScalingInterval[]; | ||
} |
@@ -36,3 +36,3 @@ "use strict"; | ||
else { | ||
noChanges[0].change = -1 * factor + bias; | ||
noChanges[0] = Object.assign({}, noChanges[0], { change: -1 * factor + bias }); | ||
} | ||
@@ -45,3 +45,3 @@ } | ||
else { | ||
noChanges[1].change = 1 * factor + bias; | ||
noChanges[1] = Object.assign({}, noChanges[1], { change: 1 * factor + bias }); | ||
} | ||
@@ -58,4 +58,4 @@ } | ||
else { | ||
noChanges[0].change = -1 * factor + bias; | ||
noChanges[1].change = 1 * factor + bias; | ||
noChanges[0] = Object.assign({}, noChanges[0], { change: -1 * factor + bias }); | ||
noChanges[1] = Object.assign({}, noChanges[1], { change: 1 * factor + bias }); | ||
} | ||
@@ -80,3 +80,3 @@ } | ||
if (ret[i].upper !== undefined && (i === 0 || ret[i - 1].upper !== undefined)) { | ||
ret[i].lower = undefined; | ||
ret[i] = Object.assign({}, ret[i], { lower: undefined }); | ||
} | ||
@@ -88,3 +88,3 @@ } | ||
if (ret[i].lower !== undefined && (i === ret.length - 1 || ret[i + 1].lower !== undefined)) { | ||
ret[i].upper = undefined; | ||
ret[i] = Object.assign({}, ret[i], { upper: undefined }); | ||
} | ||
@@ -96,2 +96,2 @@ } | ||
exports.generateArbitraryIntervals = generateArbitraryIntervals; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC11dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QtdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFQTs7Ozs7Ozs7OztHQVVHO0FBQ0gsU0FBZ0IsMEJBQTBCLENBQUMsSUFBc0I7SUFDN0QsTUFBTSxHQUFHLEdBQUcsSUFBSSxLQUFLLEVBQThCLENBQUM7SUFFcEQsTUFBTSxRQUFRLEdBQUcsSUFBSSxDQUFDLFdBQVcsRUFBRSxDQUFDO0lBRXBDLGtDQUFrQztJQUNsQyxNQUFNLE1BQU0sR0FBRyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ25FLE1BQU0sSUFBSSxHQUFHLFFBQVEsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFFL0IsNkJBQTZCO0lBQzdCLEdBQUcsQ0FBQyxJQUFJLENBQUMsRUFBRSxLQUFLLEVBQUUsQ0FBQyxFQUFFLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxFQUFFLENBQUMsQ0FBQyxHQUFHLE1BQU0sR0FBRyxJQUFJLEVBQUUsQ0FBQyxDQUFDO0lBQzlELEdBQUcsQ0FBQyxJQUFJLENBQUMsRUFBRSxLQUFLLEVBQUUsRUFBRSxFQUFFLEtBQUssR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yICE9PSB1bmRlZmluZWQgJiYgKGkgPT09IHJldC5sZW5ndGggLSAxIHx8IHJldFtpICsgMV0ubG93ZXIgIT09IHVuZGVmaW5lZCkpIHtcbiAgICAgICAgICByZXRbaV0gPSB7IC4uLnJldFtpXSwgdXBwZXI6IHVuZGVmaW5lZCB9O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIHsgYWJzb2x1dGUsIGludGVydmFsczogcmV0IH07XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSVJhbmRvbUdlbmVyYXRvciB7XG4gIG5leHRCb29sZWFuKCk6IGJvb2xlYW47XG4gIG5leHRJbnQobWluOiBudW1iZXIsIG1heDogbnVtYmVyKTogbnVtYmVyO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIEFyYml0cmFyeUludGVydmFscyB7XG4gIHJlYWRvbmx5IGFic29sdXRlOiBib29sZWFuO1xuICByZWFkb25seSBpbnRlcnZhbHM6IGFwcHNjYWxpbmcuU2NhbGluZ0ludGVydmFsW107XG59Il19 |
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
lower?: number; | ||
readonly lower?: number; | ||
/** | ||
@@ -21,3 +21,3 @@ * The upper bound of the interval. | ||
*/ | ||
upper?: number; | ||
readonly upper?: number; | ||
/** | ||
@@ -35,3 +35,3 @@ * The capacity adjustment to apply in this interval | ||
*/ | ||
change: number; | ||
readonly change: number; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBBIHJhbmdlIG9mIG1ldHJpYyB2YWx1ZXMgaW4gd2hpY2ggdG8gYXBwbHkgYSBjZXJ0YWluIHNjYWxp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ling-common", | ||
"version": "0.26.0", | ||
"version": "0.27.0", | ||
"description": "Common implementation package for @aws-cdk/aws-autoscaling and @aws-cdk/aws-applicationautoscaling", | ||
@@ -23,3 +23,7 @@ "main": "lib/index.js", | ||
}, | ||
"sphinx": {} | ||
"sphinx": {}, | ||
"python": { | ||
"distName": "aws-cdk.aws-autoscaling-common", | ||
"module": "aws_cdk.aws_autoscaling_common" | ||
} | ||
} | ||
@@ -54,16 +58,16 @@ }, | ||
"devDependencies": { | ||
"@aws-cdk/assert": "^0.26.0", | ||
"cdk-build-tools": "^0.26.0", | ||
"cdk-integ-tools": "^0.26.0", | ||
"@aws-cdk/assert": "^0.27.0", | ||
"cdk-build-tools": "^0.27.0", | ||
"cdk-integ-tools": "^0.27.0", | ||
"fast-check": "^1.7.0", | ||
"pkglint": "^0.26.0" | ||
"pkglint": "^0.27.0" | ||
}, | ||
"dependencies": { | ||
"@aws-cdk/aws-iam": "^0.26.0", | ||
"@aws-cdk/cdk": "^0.26.0" | ||
"@aws-cdk/aws-iam": "^0.27.0", | ||
"@aws-cdk/cdk": "^0.27.0" | ||
}, | ||
"homepage": "https://github.com/awslabs/aws-cdk", | ||
"peerDependencies": { | ||
"@aws-cdk/aws-iam": "^0.26.0", | ||
"@aws-cdk/cdk": "^0.26.0" | ||
"@aws-cdk/aws-iam": "^0.27.0", | ||
"@aws-cdk/cdk": "^0.27.0" | ||
}, | ||
@@ -70,0 +74,0 @@ "engines": { |
@@ -25,2 +25,3 @@ { | ||
"strictNullChecks": true, | ||
"stripInternal": true, | ||
"target": "ES2018", | ||
@@ -27,0 +28,0 @@ "composite": true |
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
87571
536
+ Added@aws-cdk/aws-iam@0.27.0(transitive)
+ Added@aws-cdk/cdk@0.27.0(transitive)
+ Added@aws-cdk/cx-api@0.27.0(transitive)
+ Added@aws-cdk/region-info@0.27.0(transitive)
- Removed@aws-cdk/aws-iam@0.26.0(transitive)
- Removed@aws-cdk/cdk@0.26.0(transitive)
- Removed@aws-cdk/cx-api@0.26.0(transitive)
- Removed@aws-cdk/region-info@0.26.0(transitive)
Updated@aws-cdk/aws-iam@^0.27.0
Updated@aws-cdk/cdk@^0.27.0