awscdk-v1-stack-finder
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -136,3 +136,3 @@ "use strict"; | ||
async function findV1Stacks(response, cloudformation, region, stacks) { | ||
var _a; | ||
var _a, _b, _c; | ||
for (const stack of (_a = response.StackSummaries) !== null && _a !== void 0 ? _a : []) { | ||
@@ -150,6 +150,13 @@ const getTemplateResponse = await cloudformation.getTemplate({ | ||
if (body.Resources.CDKMetadata) { | ||
const buf = Buffer.from(body.Resources.CDKMetadata.Properties.Analytics.split(':').splice(2)[0], 'base64'); | ||
const analyticsString = zlib.gunzipSync(buf).toString(); | ||
const majorVersion = analyticsString.slice(0, 1); | ||
if (majorVersion === '1') { | ||
let stackUsedV1 = false; | ||
if ((_b = body.Resources.CDKMetadata.Properties) === null || _b === void 0 ? void 0 : _b.Analytics) { | ||
const buf = Buffer.from(body.Resources.CDKMetadata.Properties.Analytics.split(':').splice(2)[0], 'base64'); | ||
const analyticsString = zlib.gunzipSync(buf).toString(); | ||
stackUsedV1 = analyticsString.slice(0, 1) === '1'; | ||
} | ||
// Before versions 1.93.0 and 2.0.0-alpha.10, the CDKMetadata resource had a different format. | ||
if ((_c = body.Resources.CDKMetadata.Properties) === null || _c === void 0 ? void 0 : _c.Modules) { | ||
stackUsedV1 = body.Resources.CDKMetadata.Properties.Modules.includes('@aws-cdk/core'); | ||
} | ||
if (stackUsedV1) { | ||
stacks.push(`name: ${stack.StackName} | id: ${stack.StackId}`); | ||
@@ -160,2 +167,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSwyQ0FBNkI7QUFDN0IsNkNBQStCO0FBRy9CLDJDQUE2QjtBQUU3QixNQUFN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2tzLnB1c2goYG5hbWU6ICR7c3RhY2suU3RhY2tOYW1lfSB8IGlkOiAke3N0YWNrLlN0YWNrSWR9YCk7XG4gICAgICB9XG4gICAgfVxuICB9XG59XG4iXX0= |
@@ -51,3 +51,3 @@ { | ||
"license": "Apache-2.0", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"jest": { | ||
@@ -54,0 +54,0 @@ "testMatch": [ |
43814
173