From 306d65fd79ba571af94c75bef77a1e901ff8e8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Wennstr=C3=B8m?= Date: Sun, 29 Jan 2023 21:40:01 +0100 Subject: [PATCH 01/11] feat: add publishing of assets --- dist/index.js | 14 + package-lock.json | 1617 +++++++++++++++++++++++++++++++++++++++++++-- package.json | 1 + src/main.ts | 18 + 4 files changed, 1578 insertions(+), 72 deletions(-) diff --git a/dist/index.js b/dist/index.js index 16dbef9..8c3eeed 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1625,6 +1625,19 @@ function buildCdk() { } }); } +function publishAssets() { + const options = (0, inputs_1.getConfiguration)(); + try { + options.stackName.map((_, i) => { + const assetFilePath = `${options.stackName[i]}.assets.json`; + const result = (0, utils_1.runCommand)(`node node_modules/cdk-assets/bin/cdk-assets publish cdk.out/${assetFilePath}`); + console.log(result); + }); + } + catch (error) { + console.error(error); + } +} function run() { return __awaiter(this, void 0, void 0, function* () { try { @@ -1636,6 +1649,7 @@ function run() { const limit = (0, p_limit_1.default)(concurrency || 5); yield installCdk(); yield buildCdk(); + publishAssets(); const tasks = options.stackName.map((_, i) => limit(() => task(cfn, { // template: options.template[i], stackName: options.stackName[i], diff --git a/package-lock.json b/package-lock.json index 5e3542d..888ae17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@actions/core": "1.10.0", "aws-sdk": "2.1237.0", + "cdk-assets": "^2.62.2", "p-limit": "^3.1.0" }, "devDependencies": { @@ -1623,7 +1624,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -1632,7 +1632,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -1875,8 +1874,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base64-js": { "version": "1.5.1", @@ -1901,7 +1899,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2030,6 +2027,764 @@ } ] }, + "node_modules/cdk-assets": { + "version": "2.62.2", + "resolved": "https://registry.npmjs.org/cdk-assets/-/cdk-assets-2.62.2.tgz", + "integrity": "sha512-NbBLaHZ5NY+OSHBp+nQaEHIB+qsm3poySSpjnxsyWjX9OoaAMte5kknxpvu099NwFYWSk/DvWdNxec9UiA8JBw==", + "hasShrinkwrap": true, + "dependencies": { + "@aws-cdk/cloud-assembly-schema": "2.62.2", + "@aws-cdk/cx-api": "2.62.2", + "archiver": "^5.3.1", + "aws-sdk": "^2.1211.0", + "glob": "^7.2.3", + "mime": "^2.6.0", + "yargs": "^16.2.0" + }, + "bin": { + "cdk-assets": "bin/cdk-assets", + "docker-credential-cdk-assets": "bin/docker-credential-cdk-assets" + }, + "engines": { + "node": ">= 14.15.0" + } + }, + "node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema": { + "version": "2.62.2", + "dependencies": { + "jsonschema": "^1.4.1", + "semver": "^7.3.8" + } + }, + "node_modules/cdk-assets/node_modules/@aws-cdk/cx-api": { + "version": "2.62.2", + "dependencies": { + "@aws-cdk/cloud-assembly-schema": "2.62.2", + "semver": "^7.3.8" + } + }, + "node_modules/cdk-assets/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "node_modules/cdk-assets/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + } + }, + "node_modules/cdk-assets/node_modules/archiver": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.1.tgz#21e92811d6f09ecfce649fbefefe8c79e57cbbb6", + "integrity": "sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w==", + "dependencies": { + "archiver-utils": "^2.1.0", + "async": "^3.2.3", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.0.0", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + } + }, + "node_modules/cdk-assets/node_modules/archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "dependencies": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + } + }, + "node_modules/cdk-assets/node_modules/archiver-utils/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/cdk-assets/node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, + "node_modules/cdk-assets/node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" + }, + "node_modules/cdk-assets/node_modules/aws-sdk": { + "version": "2.1292.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1292.0.tgz#bff92d794b8bbb71628c2f7b9d799c34ef2f27b4", + "integrity": "sha512-GqN75aYmaZrirMCJI5CwvYW/bQRyBs59t/tDYBuwb9RMppL8vv9cEwGu3H74yxeoz89LyrbQtoOB8ZgHxNDNmA==", + "dependencies": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.16.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "util": "^0.12.4", + "uuid": "8.0.0", + "xml2js": "0.4.19" + } + }, + "node_modules/cdk-assets/node_modules/aws-sdk/node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/cdk-assets/node_modules/aws-sdk/node_modules/buffer/node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "node_modules/cdk-assets/node_modules/aws-sdk/node_modules/ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "node_modules/cdk-assets/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/cdk-assets/node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "node_modules/cdk-assets/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/cdk-assets/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/cdk-assets/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/cdk-assets/node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" + }, + "node_modules/cdk-assets/node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "node_modules/cdk-assets/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cdk-assets/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + } + }, + "node_modules/cdk-assets/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/cdk-assets/node_modules/compress-commons": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d", + "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", + "dependencies": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + } + }, + "node_modules/cdk-assets/node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/cdk-assets/node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cdk-assets/node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" + }, + "node_modules/cdk-assets/node_modules/crc32-stream": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.2.tgz#c922ad22b38395abe9d3870f02fa8134ed709007", + "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + } + }, + "node_modules/cdk-assets/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/cdk-assets/node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/cdk-assets/node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "node_modules/cdk-assets/node_modules/events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924", + "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==" + }, + "node_modules/cdk-assets/node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/cdk-assets/node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "node_modules/cdk-assets/node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/cdk-assets/node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/cdk-assets/node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "node_modules/cdk-assets/node_modules/get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "node_modules/cdk-assets/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "node_modules/cdk-assets/node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + } + }, + "node_modules/cdk-assets/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "node_modules/cdk-assets/node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + } + }, + "node_modules/cdk-assets/node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "node_modules/cdk-assets/node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dependencies": { + "has-symbols": "^1.0.2" + } + }, + "node_modules/cdk-assets/node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "node_modules/cdk-assets/node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/cdk-assets/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/cdk-assets/node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "node_modules/cdk-assets/node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" + }, + "node_modules/cdk-assets/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "node_modules/cdk-assets/node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dependencies": { + "has-tostringtag": "^1.0.0" + } + }, + "node_modules/cdk-assets/node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, + "node_modules/cdk-assets/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/cdk-assets/node_modules/jmespath": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076", + "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==" + }, + "node_modules/cdk-assets/node_modules/jsonschema": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab", + "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==" + }, + "node_modules/cdk-assets/node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dependencies": { + "readable-stream": "^2.0.5" + } + }, + "node_modules/cdk-assets/node_modules/lazystream/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/cdk-assets/node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "node_modules/cdk-assets/node_modules/lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c", + "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" + }, + "node_modules/cdk-assets/node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" + }, + "node_modules/cdk-assets/node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/cdk-assets/node_modules/lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88", + "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" + }, + "node_modules/cdk-assets/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + } + }, + "node_modules/cdk-assets/node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==" + }, + "node_modules/cdk-assets/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + } + }, + "node_modules/cdk-assets/node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "node_modules/cdk-assets/node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/cdk-assets/node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "node_modules/cdk-assets/node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/cdk-assets/node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + }, + "node_modules/cdk-assets/node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==" + }, + "node_modules/cdk-assets/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "node_modules/cdk-assets/node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "node_modules/cdk-assets/node_modules/readable-stream/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/cdk-assets/node_modules/readdir-glob": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.2.tgz#b185789b8e6a43491635b6953295c5c5e3fd224c", + "integrity": "sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA==", + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/cdk-assets/node_modules/readdir-glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cdk-assets/node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz#0939d7d6f0898acbd1508abe534d1929368a8fff", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", + "dependencies": { + "brace-expansion": "^2.0.1" + } + }, + "node_modules/cdk-assets/node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, + "node_modules/cdk-assets/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/cdk-assets/node_modules/sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a", + "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" + }, + "node_modules/cdk-assets/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + } + }, + "node_modules/cdk-assets/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/cdk-assets/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "node_modules/cdk-assets/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + } + }, + "node_modules/cdk-assets/node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "node_modules/cdk-assets/node_modules/url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64", + "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/cdk-assets/node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/cdk-assets/node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/cdk-assets/node_modules/uuid": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz#bc6ccf91b5ff0ac07bbcdbf1c7c4e150db4dbb6c", + "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==" + }, + "node_modules/cdk-assets/node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + }, + "node_modules/cdk-assets/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "node_modules/cdk-assets/node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/cdk-assets/node_modules/xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "node_modules/cdk-assets/node_modules/xml2js/node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "node_modules/cdk-assets/node_modules/xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d", + "integrity": "sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==" + }, + "node_modules/cdk-assets/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "node_modules/cdk-assets/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/cdk-assets/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "node_modules/cdk-assets/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" + }, + "node_modules/cdk-assets/node_modules/zip-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79", + "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "dependencies": { + "archiver-utils": "^2.1.0", + "compress-commons": "^4.1.0", + "readable-stream": "^3.6.0" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2071,7 +2826,6 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -2085,7 +2839,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -2118,7 +2871,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2129,14 +2881,12 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/convert-source-map": { "version": "1.9.0", @@ -2291,8 +3041,7 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/error-ex": { "version": "1.3.2", @@ -2369,7 +3118,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -3085,8 +3833,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "2.3.2", @@ -3145,7 +3892,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -3191,7 +3937,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3398,7 +4143,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -3519,7 +4263,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -4658,7 +5401,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4774,7 +5516,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "dependencies": { "wrappy": "1" } @@ -4892,7 +5633,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -5169,7 +5909,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -5429,7 +6168,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5469,7 +6207,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -5906,8 +6643,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/write-file-atomic": { "version": "4.0.2", @@ -5943,7 +6679,6 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, "engines": { "node": ">=10" } @@ -5958,7 +6693,6 @@ "version": "17.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", "integrity": "sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==", - "dev": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -5976,7 +6710,6 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, "engines": { "node": ">=12" } @@ -7202,14 +7935,12 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -7391,8 +8122,7 @@ "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "base64-js": { "version": "1.5.1", @@ -7403,7 +8133,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7491,6 +8220,772 @@ "integrity": "sha512-09iwWGOlifvE1XuHokFMP7eR38a0JnajoyL3/i87c8ZjRWRrdKo1fqjNfugfBD0UDBIOz0U+jtNhJ0EPm1VleQ==", "dev": true }, + "cdk-assets": { + "version": "2.62.2", + "resolved": "https://registry.npmjs.org/cdk-assets/-/cdk-assets-2.62.2.tgz", + "integrity": "sha512-NbBLaHZ5NY+OSHBp+nQaEHIB+qsm3poySSpjnxsyWjX9OoaAMte5kknxpvu099NwFYWSk/DvWdNxec9UiA8JBw==", + "requires": { + "@aws-cdk/cloud-assembly-schema": "2.62.2", + "@aws-cdk/cx-api": "2.62.2", + "archiver": "^5.3.1", + "aws-sdk": "^2.1211.0", + "glob": "^7.2.3", + "mime": "^2.6.0", + "yargs": "^16.2.0" + }, + "dependencies": { + "@aws-cdk/cloud-assembly-schema": { + "version": "2.62.2", + "requires": { + "jsonschema": "^1.4.1", + "semver": "^7.3.8" + } + }, + "@aws-cdk/cx-api": { + "version": "2.62.2", + "requires": { + "@aws-cdk/cloud-assembly-schema": "2.62.2", + "semver": "^7.3.8" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "archiver": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.1.tgz#21e92811d6f09ecfce649fbefefe8c79e57cbbb6", + "integrity": "sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w==", + "requires": { + "archiver-utils": "^2.1.0", + "async": "^3.2.3", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.0.0", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + } + }, + "archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "requires": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, + "async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" + }, + "aws-sdk": { + "version": "2.1292.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1292.0.tgz#bff92d794b8bbb71628c2f7b9d799c34ef2f27b4", + "integrity": "sha512-GqN75aYmaZrirMCJI5CwvYW/bQRyBs59t/tDYBuwb9RMppL8vv9cEwGu3H74yxeoz89LyrbQtoOB8ZgHxNDNmA==", + "requires": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.16.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "util": "^0.12.4", + "uuid": "8.0.0", + "xml2js": "0.4.19" + }, + "dependencies": { + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + }, + "dependencies": { + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + } + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + } + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "compress-commons": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d", + "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", + "requires": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" + }, + "crc32-stream": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.2.tgz#c922ad22b38395abe9d3870f02fa8134ed709007", + "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", + "requires": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924", + "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==" + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "requires": { + "get-intrinsic": "^1.1.3" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "jmespath": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz#b15b0a85dfd4d930d43e69ed605943c802785076", + "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==" + }, + "jsonschema": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab", + "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==" + }, + "lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c", + "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88", + "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==" + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + } + } + }, + "readdir-glob": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.2.tgz#b185789b8e6a43491635b6953295c5c5e3fd224c", + "integrity": "sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA==", + "requires": { + "minimatch": "^5.1.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz#0939d7d6f0898acbd1508abe534d1929368a8fff", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a", + "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" + }, + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64", + "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "requires": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "uuid": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz#bc6ccf91b5ff0ac07bbcdbf1c7c4e150db4dbb6c", + "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==" + }, + "which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + }, + "dependencies": { + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + } + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d", + "integrity": "sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==" + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" + }, + "zip-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79", + "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "requires": { + "archiver-utils": "^2.1.0", + "compress-commons": "^4.1.0", + "readable-stream": "^3.6.0" + } + } + } + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -7523,7 +9018,6 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -7534,7 +9028,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -7559,7 +9052,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "requires": { "color-name": "~1.1.4" } @@ -7567,14 +9059,12 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "convert-source-map": { "version": "1.9.0", @@ -7686,8 +9176,7 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "error-ex": { "version": "1.3.2", @@ -7751,8 +9240,7 @@ "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-string-regexp": { "version": "1.0.5", @@ -8293,8 +9781,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "fsevents": { "version": "2.3.2", @@ -8333,8 +9820,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "get-intrinsic": { "version": "1.1.3", @@ -8365,7 +9851,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -8506,7 +9991,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -8590,8 +10074,7 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-generator-fn": { "version": "2.1.0", @@ -9451,7 +10934,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -9537,7 +11019,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "requires": { "wrappy": "1" } @@ -9618,8 +11099,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" }, "path-key": { "version": "3.1.1", @@ -9803,8 +11283,7 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" }, "resolve": { "version": "1.22.1", @@ -9990,7 +11469,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -10021,7 +11499,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -10321,8 +11798,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "write-file-atomic": { "version": "4.0.2", @@ -10351,8 +11827,7 @@ "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, "yallist": { "version": "4.0.0", @@ -10364,7 +11839,6 @@ "version": "17.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.0.tgz", "integrity": "sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==", - "dev": true, "requires": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -10378,8 +11852,7 @@ "yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==" }, "yocto-queue": { "version": "0.1.0", diff --git a/package.json b/package.json index 3e20fd8..499d7e6 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "dependencies": { "@actions/core": "1.10.0", "aws-sdk": "2.1237.0", + "cdk-assets": "^2.62.2", "p-limit": "^3.1.0" }, "devDependencies": { diff --git a/src/main.ts b/src/main.ts index 6357e49..80701ce 100644 --- a/src/main.ts +++ b/src/main.ts @@ -136,6 +136,23 @@ async function buildCdk() { } } +function publishAssets() { + const options = getConfiguration() + + try { + options.stackName.map((_: any, i: number) => { + const assetFilePath = `${options.stackName[i]}.assets.json` + + const result = runCommand( + `node node_modules/cdk-assets/bin/cdk-assets publish cdk.out/${assetFilePath}` + ) + console.log(result) + }) + } catch (error) { + console.error(error) + } +} + export async function run(): Promise { try { const cfn = new aws.CloudFormation({ ...clientConfiguration }) @@ -150,6 +167,7 @@ export async function run(): Promise { await installCdk() await buildCdk() + publishAssets() const tasks = options.stackName.map((_: any, i: number) => limit(() => From e4303f9fd69933793407456bea188a096d91f9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Wennstr=C3=B8m?= Date: Sun, 29 Jan 2023 21:47:12 +0100 Subject: [PATCH 02/11] forgot a -p --- dist/index.js | 2 +- src/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 49a5e85..d6efbfd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1629,7 +1629,7 @@ function publishAssets() { try { options.stackName.map((_, i) => { const assetFilePath = `${options.stackName[i]}.assets.json`; - const result = (0, utils_1.runCommand)(`node node_modules/cdk-assets/bin/cdk-assets publish cdk.out/${assetFilePath}`); + const result = (0, utils_1.runCommand)(`node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}`); console.log(result); }); } diff --git a/src/main.ts b/src/main.ts index 93d23c1..74cdedc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -144,7 +144,7 @@ function publishAssets() { const assetFilePath = `${options.stackName[i]}.assets.json` const result = runCommand( - `node node_modules/cdk-assets/bin/cdk-assets publish cdk.out/${assetFilePath}` + `node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}` ) console.log(result) }) From c09ef4bcfabba388fda3b305b9fbe99c515b6115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Wennstr=C3=B8m?= Date: Mon, 30 Jan 2023 18:14:07 +0100 Subject: [PATCH 03/11] add cred --- dist/index.js | 8 ++++---- src/inputs.ts | 6 +++--- src/main.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index d6efbfd..d060800 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1629,7 +1629,7 @@ function publishAssets() { try { options.stackName.map((_, i) => { const assetFilePath = `${options.stackName[i]}.assets.json`; - const result = (0, utils_1.runCommand)(`node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}`); + const result = (0, utils_1.runCommand)(`AWS_ACCESS_KEY_ID='${process.env['AWS_ACCESS_KEY_ID']}' AWS_SECRET_ACCESS_KEY='${process.env['AWS_SECRET_ACCESS_KEY']}' AWS_REGION='${process.env['AWS_REGION']}' node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}`); console.log(result); }); } @@ -31370,9 +31370,9 @@ function getConfiguration() { options.terminationProtection.length != options.stackName.length) { throw new Error('number input termination-protection lines must match name lines or must be a single line'); } - const AWS_ACCESS_KEY_ID = core.getInput('aws_access_key_id'); - const AWS_SECRET_ACCESS_KEY = core.getInput('aws_secret_access_key'); - const AWS_REGION = core.getInput('aws_region'); + const AWS_ACCESS_KEY_ID = core.getInput('aws-access-key-id'); + const AWS_SECRET_ACCESS_KEY = core.getInput('aws-secret-access-key'); + const AWS_REGION = core.getInput('aws-region'); process.env['AWS_ACCESS_KEY_ID'] = AWS_ACCESS_KEY_ID; process.env['AWS_SECRET_ACCESS_KEY'] = AWS_SECRET_ACCESS_KEY; process.env['AWS_REGION'] = AWS_REGION; diff --git a/src/inputs.ts b/src/inputs.ts index 2df4771..ce69b29 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -190,9 +190,9 @@ export function getConfiguration(): any { ) } - const AWS_ACCESS_KEY_ID = core.getInput('aws_access_key_id') - const AWS_SECRET_ACCESS_KEY = core.getInput('aws_secret_access_key') - const AWS_REGION = core.getInput('aws_region') + const AWS_ACCESS_KEY_ID = core.getInput('aws-access-key-id') + const AWS_SECRET_ACCESS_KEY = core.getInput('aws-secret-access-key') + const AWS_REGION = core.getInput('aws-region') process.env['AWS_ACCESS_KEY_ID'] = AWS_ACCESS_KEY_ID process.env['AWS_SECRET_ACCESS_KEY'] = AWS_SECRET_ACCESS_KEY process.env['AWS_REGION'] = AWS_REGION diff --git a/src/main.ts b/src/main.ts index 74cdedc..a2dbb05 100644 --- a/src/main.ts +++ b/src/main.ts @@ -144,7 +144,7 @@ function publishAssets() { const assetFilePath = `${options.stackName[i]}.assets.json` const result = runCommand( - `node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}` + `AWS_ACCESS_KEY_ID='${process.env['AWS_ACCESS_KEY_ID']}' AWS_SECRET_ACCESS_KEY='${process.env['AWS_SECRET_ACCESS_KEY']}' AWS_REGION='${process.env['AWS_REGION']}' node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}` ) console.log(result) }) From 63d4992ac956d2e7808f2ad5408cc3adbbba5235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Wennstr=C3=B8m?= Date: Tue, 31 Jan 2023 19:44:21 +0100 Subject: [PATCH 04/11] add environment variable --- dist/index.js | 30 ++++++++++++++++++------------ src/inputs.ts | 4 ++++ src/main.ts | 16 ++++++++++------ 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/dist/index.js b/dist/index.js index d060800..8b65d06 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1615,8 +1615,9 @@ function installCdk() { } function buildCdk() { return __awaiter(this, void 0, void 0, function* () { + const options = (0, inputs_1.getConfiguration)(); try { - const result = yield (0, utils_1.runCommand)('npx cdk synth --outputs-file cdk.out'); + const result = yield (0, utils_1.runCommand)(`ENVIRONMENT=${options.environment} npx cdk synth --outputs-file cdk.out`); core.debug(result); } catch (error) { @@ -1625,17 +1626,19 @@ function buildCdk() { }); } function publishAssets() { - const options = (0, inputs_1.getConfiguration)(); - try { - options.stackName.map((_, i) => { - const assetFilePath = `${options.stackName[i]}.assets.json`; - const result = (0, utils_1.runCommand)(`AWS_ACCESS_KEY_ID='${process.env['AWS_ACCESS_KEY_ID']}' AWS_SECRET_ACCESS_KEY='${process.env['AWS_SECRET_ACCESS_KEY']}' AWS_REGION='${process.env['AWS_REGION']}' node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}`); - console.log(result); - }); - } - catch (error) { - console.error(error); - } + return __awaiter(this, void 0, void 0, function* () { + const options = (0, inputs_1.getConfiguration)(); + try { + options.stackName.map((_, i) => __awaiter(this, void 0, void 0, function* () { + const assetFilePath = `${options.stackName[i]}.assets.json`; + const result = yield (0, utils_1.runCommand)(`AWS_ACCESS_KEY_ID='${process.env['AWS_ACCESS_KEY_ID']}' AWS_SECRET_ACCESS_KEY='${process.env['AWS_SECRET_ACCESS_KEY']}' AWS_REGION='${process.env['AWS_REGION']}' node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}`); + core.debug(result); + })); + } + catch (error) { + core.error(error); + } + }); } function run() { return __awaiter(this, void 0, void 0, function* () { @@ -31370,6 +31373,9 @@ function getConfiguration() { options.terminationProtection.length != options.stackName.length) { throw new Error('number input termination-protection lines must match name lines or must be a single line'); } + options.environment = core.getInput('environment', { + required: true + }); const AWS_ACCESS_KEY_ID = core.getInput('aws-access-key-id'); const AWS_SECRET_ACCESS_KEY = core.getInput('aws-secret-access-key'); const AWS_REGION = core.getInput('aws-region'); diff --git a/src/inputs.ts b/src/inputs.ts index ce69b29..1d75a10 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -190,6 +190,10 @@ export function getConfiguration(): any { ) } + options.environment = core.getInput('environment', { + required: true + }) + const AWS_ACCESS_KEY_ID = core.getInput('aws-access-key-id') const AWS_SECRET_ACCESS_KEY = core.getInput('aws-secret-access-key') const AWS_REGION = core.getInput('aws-region') diff --git a/src/main.ts b/src/main.ts index a2dbb05..eff1155 100644 --- a/src/main.ts +++ b/src/main.ts @@ -128,28 +128,32 @@ async function installCdk() { } async function buildCdk() { + const options = getConfiguration() + try { - const result = await runCommand('npx cdk synth --outputs-file cdk.out') + const result = await runCommand( + `ENVIRONMENT=${options.environment} npx cdk synth --outputs-file cdk.out` + ) core.debug(result) } catch (error) { core.error(error as string) } } -function publishAssets() { +async function publishAssets() { const options = getConfiguration() try { - options.stackName.map((_: any, i: number) => { + options.stackName.map(async (_: any, i: number) => { const assetFilePath = `${options.stackName[i]}.assets.json` - const result = runCommand( + const result = await runCommand( `AWS_ACCESS_KEY_ID='${process.env['AWS_ACCESS_KEY_ID']}' AWS_SECRET_ACCESS_KEY='${process.env['AWS_SECRET_ACCESS_KEY']}' AWS_REGION='${process.env['AWS_REGION']}' node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}` ) - console.log(result) + core.debug(result) }) } catch (error) { - console.error(error) + core.error(error as string) } } From 5206ef6003ac20bf4d0016b073922d743c076a52 Mon Sep 17 00:00:00 2001 From: johnny-human Date: Wed, 1 Feb 2023 21:49:47 +0100 Subject: [PATCH 05/11] major update --- dist/index.js | 780 +++++++++++++++++++++++++-------------------- jest.config.js | 20 +- src/assets.ts | 28 ++ src/deploy.ts | 265 +++++++-------- src/deployStack.ts | 184 +++++++++++ src/inputs.ts | 218 +++---------- src/main.ts | 207 +----------- src/synth.ts | 49 +++ src/utils.ts | 22 ++ 9 files changed, 902 insertions(+), 871 deletions(-) create mode 100644 src/assets.ts create mode 100644 src/deployStack.ts create mode 100644 src/synth.ts diff --git a/dist/index.js b/dist/index.js index 8b65d06..cd38a68 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1532,76 +1532,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.run = exports.task = void 0; -const p_limit_1 = __importDefault(__webpack_require__(523)); -const path = __importStar(__webpack_require__(5622)); +exports.run = void 0; const core = __importStar(__webpack_require__(6470)); -const aws = __importStar(__webpack_require__(9350)); -const fs = __importStar(__webpack_require__(5747)); -const deploy_1 = __webpack_require__(4253); const utils_1 = __webpack_require__(6611); const inputs_1 = __webpack_require__(6842); -// The custom client configuration for the CloudFormation clients. -const clientConfiguration = { - customUserAgent: 'aws-cloudformation-github-deploy-for-github-actions' -}; -function task(cfn, options) { - return __awaiter(this, void 0, void 0, function* () { - const { GITHUB_WORKSPACE = __dirname } = process.env; - // Setup CloudFormation Stack - let templateBody; - let templateUrl; - // if (isUrl(options.template)) { - // core.debug( - // `${options.stackName}: Using CloudFormation Stack from Amazon S3 Bucket` - // ) - // templateUrl = options.template - // } else { - core.debug(`${options.stackName}: Loading CloudFormation Stack template`); - const template = `cdk.out/${options.stackName}.template.json`; - const templateFilePath = path.isAbsolute(template) - ? template - : path.join(GITHUB_WORKSPACE, template); - templateBody = fs.readFileSync(templateFilePath, 'utf8'); - // } - // CloudFormation Stack Parameter for the creation or update - const params = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ StackName: options.stackName }, (options.roleARN !== undefined && { RoleARN: options.roleARN })), (options.notificationARNs !== undefined && { - NotificationARNs: options.notificationARNs - })), { DisableRollback: true }), (options.timeoutInMinutes !== undefined && { - TimeoutInMinutes: options.timeoutInMinutes - })), { TemplateBody: templateBody, TemplateURL: templateUrl }), (options.tags !== undefined && { Tags: options.tags })), { EnableTerminationProtection: options.terminationProtection }); - if (options.capabilities) { - params.Capabilities = [ - ...options.capabilities.split(',').map(cap => cap.trim()) - ]; - } - if (options.parameterOverrides) { - params.Parameters = (0, utils_1.parseParameters)(options.parameterOverrides.trim()); - } - const stackId = yield (0, deploy_1.deployStack)(cfn, params, options.noEmptyChangeSet, options.noExecuteChangeSet, options.noDeleteFailedChangeSet); - core.setOutput(`${options.stackName}_stack-id`, stackId || 'UNKNOWN'); - if (stackId) { - const outputs = yield (0, deploy_1.getStackOutputs)(cfn, stackId); - for (const [logicalId, value] of outputs) { - core.setOutput(`${options.stackName}_output_${logicalId}`, value); - } - } - }); -} -exports.task = task; -function pickOption(arr, i) { - if (arr.length === 0) { - return undefined; - } - if (arr.length === 1) { - return arr[0]; - } - return arr[i]; -} +const synth_1 = __webpack_require__(8303); +const assets_1 = __webpack_require__(3921); +const deploy_1 = __webpack_require__(4253); function installCdk() { return __awaiter(this, void 0, void 0, function* () { try { @@ -1613,71 +1551,22 @@ function installCdk() { } }); } -function buildCdk() { - return __awaiter(this, void 0, void 0, function* () { - const options = (0, inputs_1.getConfiguration)(); - try { - const result = yield (0, utils_1.runCommand)(`ENVIRONMENT=${options.environment} npx cdk synth --outputs-file cdk.out`); - core.debug(result); - } - catch (error) { - core.error(error); - } - }); -} -function publishAssets() { +function run() { return __awaiter(this, void 0, void 0, function* () { - const options = (0, inputs_1.getConfiguration)(); - try { - options.stackName.map((_, i) => __awaiter(this, void 0, void 0, function* () { - const assetFilePath = `${options.stackName[i]}.assets.json`; - const result = yield (0, utils_1.runCommand)(`AWS_ACCESS_KEY_ID='${process.env['AWS_ACCESS_KEY_ID']}' AWS_SECRET_ACCESS_KEY='${process.env['AWS_SECRET_ACCESS_KEY']}' AWS_REGION='${process.env['AWS_REGION']}' node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}`); - core.debug(result); - })); + const config = (0, inputs_1.getConfiguration)(); + if (!config.synth && !config.assets && !config.deploy) { + core.setFailed('You must specify one type of job, either `synth: true`, `assets: true` or `deploy: true`'); } - catch (error) { - core.error(error); + if (config.synth) { + yield installCdk(); + yield (0, synth_1.synth)(config); } - }); -} -function run() { - return __awaiter(this, void 0, void 0, function* () { - try { - const cfn = new aws.CloudFormation(Object.assign({}, clientConfiguration)); - const options = (0, inputs_1.getConfiguration)(); - const concurrency = (0, utils_1.parseNumber)(core.getInput('concurrency', { - required: false - })); - const limit = (0, p_limit_1.default)(concurrency || 5); + else if (config.assets) { yield installCdk(); - yield buildCdk(); - publishAssets(); - const tasks = options.stackName.map((_, i) => limit(() => task(cfn, { - // template: options.template[i], - stackName: options.stackName[i], - capabilities: pickOption(options.capabilities, i), - roleARN: pickOption(options.roleARN, i), - notificationARNs: pickOption(options.notificationARNs, i), - disableRollback: pickOption(options.disableRollback, i), - timeoutInMinutes: pickOption(options.timeoutInMinutes, i), - tags: pickOption(options.tags, i), - terminationProtection: pickOption(options.terminationProtection, i), - parameterOverrides: pickOption(options.parameterOverrides, i), - noEmptyChangeSet: pickOption(options.noEmptyChangeSet, i), - noExecuteChangeSet: pickOption(options.noExecuteChangeSet, i), - noDeleteFailedChangeSet: pickOption(options.noDeleteFailedChangeSet, i) - }).catch(err => { - core.error(`${options.stackName[i]}: Error`); - throw err; - }))); - yield Promise.all(tasks); - } - catch (err) { - if (err instanceof Error || typeof err === 'string') { - core.setFailed(err); - // @ts-ignore - core.debug(err.stack); - } + yield (0, assets_1.assets)(config); + } + else if (config.deploy) { + yield (0, deploy_1.deploy)(config); } }); } @@ -19815,6 +19704,67 @@ module.exports = AWS.IoTTwinMaker; module.exports = {"pagination":{"DescribeDBClusterEndpoints":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"DBClusterEndpoints"},"DescribeDBClusterParameterGroups":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"DBClusterParameterGroups"},"DescribeDBClusterParameters":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"Parameters"},"DescribeDBClusterSnapshots":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"DBClusterSnapshots"},"DescribeDBClusters":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"DBClusters"},"DescribeDBEngineVersions":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"DBEngineVersions"},"DescribeDBInstances":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"DBInstances"},"DescribeDBParameterGroups":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"DBParameterGroups"},"DescribeDBParameters":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"Parameters"},"DescribeDBSubnetGroups":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"DBSubnetGroups"},"DescribeEngineDefaultParameters":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"EngineDefaults.Marker","result_key":"EngineDefaults.Parameters"},"DescribeEventSubscriptions":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"EventSubscriptionsList"},"DescribeEvents":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"Events"},"DescribeOrderableDBInstanceOptions":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"OrderableDBInstanceOptions"},"DescribePendingMaintenanceActions":{"input_token":"Marker","limit_key":"MaxRecords","output_token":"Marker","result_key":"PendingMaintenanceActions"},"ListTagsForResource":{"result_key":"TagList"}}}; +/***/ }), + +/***/ 3921: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assets = void 0; +const core = __importStar(__webpack_require__(6470)); +const utils_1 = __webpack_require__(6611); +const assets = (config) => __awaiter(void 0, void 0, void 0, function* () { + const AWS_ACCESS_KEY_ID = `AWS_ACCESS_KEY_ID='${process.env['AWS_ACCESS_KEY_ID']}'`; + const AWS_SECRET_ACCESS_KEY = `AWS_SECRET_ACCESS_KEY='${process.env['AWS_SECRET_ACCESS_KEY']}'`; + const AWS_REGION = `AWS_REGION='${process.env['AWS_REGION']}'`; + try { + config.stacks.map((_, i) => __awaiter(void 0, void 0, void 0, function* () { + const assetFilePath = `${config.stacks[i]}.assets.json`; + const result = yield (0, utils_1.runCommand)(`${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY} ${AWS_REGION} node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}`); + core.debug(result); + })); + } + catch (error) { + core.error(error); + } +}); +exports.assets = assets; + + /***/ }), /***/ 3964: @@ -21157,135 +21107,91 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getStackOutputs = exports.deployStack = exports.updateStack = exports.cleanupChangeSet = void 0; +exports.deploy = void 0; const core = __importStar(__webpack_require__(6470)); -function cleanupChangeSet(cfn, stack, params, noEmptyChangeSet, noDeleteFailedChangeSet) { - return __awaiter(this, void 0, void 0, function* () { - const knownErrorMessages = [ - `No updates are to be performed`, - `The submitted information didn't contain changes` +const aws = __importStar(__webpack_require__(9350)); +const p_limit_1 = __importDefault(__webpack_require__(523)); +const fs = __importStar(__webpack_require__(5747)); +const path = __importStar(__webpack_require__(5622)); +const utils_1 = __webpack_require__(6611); +const deployStack_1 = __webpack_require__(9185); +// The custom client configuration for the CloudFormation clients. +const clientConfiguration = { + customUserAgent: 'aws-cloudformation-github-deploy-for-github-actions' +}; +const deploy = (config) => __awaiter(void 0, void 0, void 0, function* () { + const { concurrency, stacks, capabilities, roleARN, disableRollback, timeoutInMinutes, tags, terminationProtection, parameterOverrides, noEmptyChangeSet, noExecuteChangeSet, noDeleteFailedChangeSet } = config; + try { + const cfn = new aws.CloudFormation(Object.assign({}, clientConfiguration)); + const limit = (0, p_limit_1.default)(concurrency || 5); + const tasks = config.stacks.map((_, i) => limit(() => task(cfn, { + stack: stacks[i], + capabilities, + roleARN, + disableRollback, + timeoutInMinutes, + tags, + terminationProtection, + parameterOverrides, + noEmptyChangeSet, + noExecuteChangeSet, + noDeleteFailedChangeSet + }).catch((err) => { + core.error(`${stacks[i]}: Error`); + throw err; + }))); + yield Promise.all(tasks); + } + catch (err) { + if (err instanceof Error || typeof err === 'string') { + core.setFailed(err); + // @ts-ignore + core.debug(err.stack); + } + } +}); +exports.deploy = deploy; +const getTemplateBody = (stack) => { + const { GITHUB_WORKSPACE = __dirname } = process.env; + core.debug(`${stack}: Loading Stack template`); + const file = `cdk.out/${stack}.template.json`; + const filePath = path.isAbsolute(file) + ? file + : path.join(GITHUB_WORKSPACE, file); + return fs.readFileSync(filePath, 'utf8'); +}; +const task = (cfn, config) => __awaiter(void 0, void 0, void 0, function* () { + // CloudFormation Stack Parameter for the creation or update + const params = { + StackName: config.stack, + TemplateBody: getTemplateBody(config.stack), + EnableTerminationProtection: config.terminationProtection, + RoleARN: config.roleARN, + DisableRollback: config.disableRollback, + TimeoutInMinutes: config.timeoutInMinutes, + Tags: config.tags + }; + if (config.capabilities) { + params.Capabilities = [ + ...config.capabilities.split(',').map(cap => cap.trim()) ]; - const changeSetStatus = yield cfn - .describeChangeSet({ - ChangeSetName: params.ChangeSetName, - StackName: params.StackName - }) - .promise(); - if (changeSetStatus.Status === 'FAILED') { - core.debug(`${stack.StackName}: Deleting failed Change Set`); - if (noDeleteFailedChangeSet === false) { - yield cfn - .deleteChangeSet({ - ChangeSetName: params.ChangeSetName, - StackName: params.StackName - }) - .promise(); - } - if (noEmptyChangeSet && - knownErrorMessages.some(err => { var _a; return (_a = changeSetStatus.StatusReason) === null || _a === void 0 ? void 0 : _a.includes(err); })) { - return stack.StackId; - } - throw new Error(`Failed to create Change Set: ${changeSetStatus.StatusReason}`); - } - }); -} -exports.cleanupChangeSet = cleanupChangeSet; -function updateStack(cfn, stack, params, noEmptyChangeSet, noExecuteChangeSet, noDeleteFailedChangeSet) { - return __awaiter(this, void 0, void 0, function* () { - core.debug(`${stack.StackName}: Creating CloudFormation Change Set`); - yield cfn.createChangeSet(params).promise(); - try { - core.debug(`${stack.StackName}: Waiting for CloudFormation Change Set creation`); - yield cfn - .waitFor('changeSetCreateComplete', { - ChangeSetName: params.ChangeSetName, - StackName: params.StackName - }) - .promise(); - } - catch (_) { - return cleanupChangeSet(cfn, stack, params, noEmptyChangeSet, noDeleteFailedChangeSet); - } - if (noExecuteChangeSet === true) { - core.debug(`${stack.StackName}: Not executing the change set`); - return stack.StackId; - } - core.debug(`${stack.StackName}: Executing CloudFormation change set`); - yield cfn - .executeChangeSet({ - ChangeSetName: params.ChangeSetName, - StackName: params.StackName - }) - .promise(); - core.debug(`${stack.StackName}: Updating CloudFormation stack`); - yield cfn - .waitFor('stackUpdateComplete', { StackName: stack.StackId }) - .promise(); - return stack.StackId; - }); -} -exports.updateStack = updateStack; -function getStack(cfn, stackNameOrId) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - try { - const stacks = yield cfn - .describeStacks({ - StackName: stackNameOrId - }) - .promise(); - return (_a = stacks.Stacks) === null || _a === void 0 ? void 0 : _a[0]; - } - catch (e) { - if (e instanceof Error && e.message.match(/does not exist/)) { - return undefined; - } - throw e; - } - }); -} -function deployStack(cfn, params, noEmptyChangeSet, noExecuteChangeSet, noDeleteFailedChangeSet) { - return __awaiter(this, void 0, void 0, function* () { - const stack = yield getStack(cfn, params.StackName); - if (!stack) { - core.debug(`${params.StackName}: Creating CloudFormation Stack`); - const stack = yield cfn.createStack(params).promise(); - yield cfn - .waitFor('stackCreateComplete', { StackName: params.StackName }) - .promise(); - return stack.StackId; - } - return yield updateStack(cfn, stack, Object.assign({ ChangeSetName: `${params.StackName}-CS` }, { - StackName: params.StackName, - TemplateBody: params.TemplateBody, - TemplateURL: params.TemplateURL, - Parameters: params.Parameters, - Capabilities: params.Capabilities, - ResourceTypes: params.ResourceTypes, - RoleARN: params.RoleARN, - RollbackConfiguration: params.RollbackConfiguration, - NotificationARNs: params.NotificationARNs, - Tags: params.Tags - }), noEmptyChangeSet, noExecuteChangeSet, noDeleteFailedChangeSet); - }); -} -exports.deployStack = deployStack; -function getStackOutputs(cfn, stackId) { - return __awaiter(this, void 0, void 0, function* () { - const outputs = new Map(); - const stack = yield getStack(cfn, stackId); - if (stack && stack.Outputs) { - for (const output of stack.Outputs) { - if (output.OutputKey && output.OutputValue) { - outputs.set(output.OutputKey, output.OutputValue); - } - } + } + if (config.parameterOverrides) { + params.Parameters = (0, utils_1.parseParameters)(config.parameterOverrides.trim()); + } + const stackId = yield (0, deployStack_1.deployStack)(cfn, params, config.noEmptyChangeSet, config.noExecuteChangeSet, config.noDeleteFailedChangeSet); + core.setOutput(`${config.stack}-stack-id`, stackId || 'UNKNOWN'); + if (stackId) { + const outputs = yield (0, deployStack_1.getStackOutputs)(cfn, stackId); + for (const [logicalId, value] of outputs) { + core.setOutput(`${config.stack}_output_${logicalId}`, value); } - return outputs; - }); -} -exports.getStackOutputs = getStackOutputs; + } +}); /***/ }), @@ -30559,7 +30465,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.runCommand = exports.parseParameters = exports.parseNumber = exports.parseString = exports.parseARNs = exports.parseTags = exports.isUrl = void 0; +exports.runCommand = exports.parseParameters = exports.parseNumber = exports.parseString = exports.parseARNs = exports.parseTags = exports.parseMultiline = exports.pickOption = exports.isUrl = void 0; const fs = __importStar(__webpack_require__(5747)); const child_process = __importStar(__webpack_require__(3129)); function isUrl(s) { @@ -30573,6 +30479,28 @@ function isUrl(s) { return url.protocol === 'https:'; } exports.isUrl = isUrl; +function pickOption(arr, i) { + if (arr.length === 0) { + return undefined; + } + if (arr.length === 1) { + return arr[0]; + } + return arr[i]; +} +exports.pickOption = pickOption; +/** + * Parse multiline + * We don't use core.getMultilineInput() because it filters out empty lines + */ +function parseMultiline(str) { + if (str === undefined) { + // some tests pass undefined instead of an empty string as core.getInput() would do + return ['']; + } + return str.split('\n'); +} +exports.parseMultiline = parseMultiline; function parseTags(s) { let json; try { @@ -31281,107 +31209,46 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.getConfiguration = void 0; const core = __importStar(__webpack_require__(6470)); const utils_1 = __webpack_require__(6611); -// we don't use core.getMultilineInput() because it filters out empty lines -function parseMultiline(str) { - if (str === undefined) { - // some tests pass undefined instead of an empty string as core.getInput() would do - return ['']; - } - return str.split('\n'); -} function getConfiguration() { const options = {}; - options.template = parseMultiline(core.getInput('template', { required: false })); - options.stackName = parseMultiline(core.getInput('name', { required: true })); - // if (options.template.length != options.stackName.length) { - // throw new Error('number of input lemplate lines must match name lines') - // } - options.capabilities = parseMultiline(core.getInput('capabilities', { - required: false - })); - if (options.capabilities.length !== 1 && - options.capabilities.length != options.stackName.length) { - throw new Error('number input capabilities lines must match name lines or must be a single line'); - } - options.parameterOverrides = parseMultiline(core.getInput('parameter-overrides', { + options.stacks = (0, utils_1.parseMultiline)(core.getInput('stacks', { required: true })); + options.capabilities = core.getInput('capabilities', { required: false }); + options.parameterOverrides = core.getInput('parameter-overrides', { required: false - })); - if (options.parameterOverrides.length !== 1 && - options.parameterOverrides.length != options.stackName.length) { - throw new Error('number input parameter-overrides lines must match name lines or must be a single line'); - } - options.noEmptyChangeSet = parseMultiline(core.getInput('no-fail-on-empty-changeset', { - required: false - })).map(x => !!+x); - if (options.noEmptyChangeSet.length !== 1 && - options.noEmptyChangeSet.length != options.stackName.length) { - throw new Error('number input no-fail-on-empty-changeset lines must match name lines or must be a single line'); - } - options.noExecuteChangeSet = parseMultiline(core.getInput('no-execute-changeset', { + }); + options.noEmptyChangeSet = !!+core.getInput('no-fail-on-empty-changeset', { required: false - })).map(x => !!+x); - if (options.noExecuteChangeSet.length !== 1 && - options.noExecuteChangeSet.length != options.stackName.length) { - throw new Error('number input no-execute-changeset lines must match name lines or must be a single line'); - } - options.noDeleteFailedChangeSet = parseMultiline(core.getInput('no-delete-failed-changeset', { + }); + options.noExecuteChangeSet = !!+core.getInput('no-execute-changeset', { required: false - })).map(x => !!+x); - if (options.noDeleteFailedChangeSet.length !== 1 && - options.noDeleteFailedChangeSet.length != options.stackName.length) { - throw new Error('number input no-delete-failed-changeset lines must match name lines or must be a single line'); - } - options.disableRollback = parseMultiline(core.getInput('disable-rollback', { + }); + options.noDeleteFailedChangeSet = !!+core.getInput('no-delete-failed-changeset', { required: false - })).map(x => !!+x); - if (options.disableRollback.length !== 1 && - options.disableRollback.length != options.stackName.length) { - throw new Error('number input disable-rollback lines must match name lines or must be a single line'); - } - options.timeoutInMinutes = parseMultiline(core.getInput('timeout-in-minutes', { + }); + options.disableRollback = !!+core.getInput('disable-rollback', { required: false - })).map(utils_1.parseNumber); - if (options.timeoutInMinutes.length !== 1 && - options.timeoutInMinutes.length != options.stackName.length) { - throw new Error('number input timeout-in-minutes lines must match name lines or must be a single line'); - } - options.notificationARNs = parseMultiline(core.getInput('notification-arns', { + }); + options.timeoutInMinutes = (0, utils_1.parseNumber)(core.getInput('timeout-in-minutes', { required: false - })).map(utils_1.parseARNs); - if (options.notificationARNs.length !== 1 && - options.notificationARNs.length != options.stackName.length) { - throw new Error('number input notification-arns lines must match name lines or must be a single line'); - } - options.roleARN = parseMultiline(core.getInput('role-arn', { + })); + options.roleARN = (0, utils_1.parseString)(core.getInput('role-arn', { required: false - })).map(utils_1.parseString); - if (options.roleARN.length !== 1 && - options.roleARN.length != options.stackName.length) { - throw new Error('number input role-arn lines must match name lines or must be a single line'); - } - options.tags = parseMultiline(core.getInput('tags', { + })); + options.tags = (0, utils_1.parseTags)(core.getInput('tags', { required: false - })).map(utils_1.parseTags); - if (options.tags.length !== 1 && - options.tags.length != options.stackName.length) { - throw new Error('number input tags lines must match name lines or must be a single line'); - } - options.terminationProtection = parseMultiline(core.getInput('termination-protection', { + })); + options.terminationProtection = !!+core.getInput('termination-protection', { required: false - })).map(x => !!+x); - if (options.terminationProtection.length !== 1 && - options.terminationProtection.length != options.stackName.length) { - throw new Error('number input termination-protection lines must match name lines or must be a single line'); - } + }); options.environment = core.getInput('environment', { required: true }); - const AWS_ACCESS_KEY_ID = core.getInput('aws-access-key-id'); - const AWS_SECRET_ACCESS_KEY = core.getInput('aws-secret-access-key'); - const AWS_REGION = core.getInput('aws-region'); - process.env['AWS_ACCESS_KEY_ID'] = AWS_ACCESS_KEY_ID; - process.env['AWS_SECRET_ACCESS_KEY'] = AWS_SECRET_ACCESS_KEY; - process.env['AWS_REGION'] = AWS_REGION; + options.concurrency = (0, utils_1.parseNumber)(core.getInput('concurrency', { + required: false + })); + process.env['AWS_REGION'] = core.getInput('aws-region'); + process.env['AWS_ACCESS_KEY_ID'] = core.getInput('aws-access-key-id'); + process.env['AWS_SECRET_ACCESS_KEY'] = core.getInput('aws-secret-access-key'); return options; } exports.getConfiguration = getConfiguration; @@ -36333,6 +36200,69 @@ module.exports = {"pagination":{"BatchGetItem":{"input_token":"RequestItems","ou module.exports = {"version":"2.0","metadata":{"apiVersion":"2018-09-07","endpointPrefix":"participant.connect","jsonVersion":"1.1","protocol":"rest-json","serviceAbbreviation":"Amazon Connect Participant","serviceFullName":"Amazon Connect Participant Service","serviceId":"ConnectParticipant","signatureVersion":"v4","signingName":"execute-api","uid":"connectparticipant-2018-09-07"},"operations":{"CompleteAttachmentUpload":{"http":{"requestUri":"/participant/complete-attachment-upload"},"input":{"type":"structure","required":["AttachmentIds","ClientToken","ConnectionToken"],"members":{"AttachmentIds":{"type":"list","member":{}},"ClientToken":{"idempotencyToken":true},"ConnectionToken":{"location":"header","locationName":"X-Amz-Bearer"}}},"output":{"type":"structure","members":{}}},"CreateParticipantConnection":{"http":{"requestUri":"/participant/connection"},"input":{"type":"structure","required":["Type","ParticipantToken"],"members":{"Type":{"type":"list","member":{}},"ParticipantToken":{"location":"header","locationName":"X-Amz-Bearer"},"ConnectParticipant":{"type":"boolean"}}},"output":{"type":"structure","members":{"Websocket":{"type":"structure","members":{"Url":{},"ConnectionExpiry":{}}},"ConnectionCredentials":{"type":"structure","members":{"ConnectionToken":{},"Expiry":{}}}}}},"DisconnectParticipant":{"http":{"requestUri":"/participant/disconnect"},"input":{"type":"structure","required":["ConnectionToken"],"members":{"ClientToken":{"idempotencyToken":true},"ConnectionToken":{"location":"header","locationName":"X-Amz-Bearer"}}},"output":{"type":"structure","members":{}}},"GetAttachment":{"http":{"requestUri":"/participant/attachment"},"input":{"type":"structure","required":["AttachmentId","ConnectionToken"],"members":{"AttachmentId":{},"ConnectionToken":{"location":"header","locationName":"X-Amz-Bearer"}}},"output":{"type":"structure","members":{"Url":{},"UrlExpiry":{}}}},"GetTranscript":{"http":{"requestUri":"/participant/transcript"},"input":{"type":"structure","required":["ConnectionToken"],"members":{"ContactId":{},"MaxResults":{"type":"integer"},"NextToken":{},"ScanDirection":{},"SortOrder":{},"StartPosition":{"type":"structure","members":{"Id":{},"AbsoluteTime":{},"MostRecent":{"type":"integer"}}},"ConnectionToken":{"location":"header","locationName":"X-Amz-Bearer"}}},"output":{"type":"structure","members":{"InitialContactId":{},"Transcript":{"type":"list","member":{"type":"structure","members":{"AbsoluteTime":{},"Content":{},"ContentType":{},"Id":{},"Type":{},"ParticipantId":{},"DisplayName":{},"ParticipantRole":{},"Attachments":{"type":"list","member":{"type":"structure","members":{"ContentType":{},"AttachmentId":{},"AttachmentName":{},"Status":{}}}}}}},"NextToken":{}}}},"SendEvent":{"http":{"requestUri":"/participant/event"},"input":{"type":"structure","required":["ContentType","ConnectionToken"],"members":{"ContentType":{},"Content":{},"ClientToken":{"idempotencyToken":true},"ConnectionToken":{"location":"header","locationName":"X-Amz-Bearer"}}},"output":{"type":"structure","members":{"Id":{},"AbsoluteTime":{}}}},"SendMessage":{"http":{"requestUri":"/participant/message"},"input":{"type":"structure","required":["ContentType","Content","ConnectionToken"],"members":{"ContentType":{},"Content":{},"ClientToken":{"idempotencyToken":true},"ConnectionToken":{"location":"header","locationName":"X-Amz-Bearer"}}},"output":{"type":"structure","members":{"Id":{},"AbsoluteTime":{}}}},"StartAttachmentUpload":{"http":{"requestUri":"/participant/start-attachment-upload"},"input":{"type":"structure","required":["ContentType","AttachmentSizeInBytes","AttachmentName","ClientToken","ConnectionToken"],"members":{"ContentType":{},"AttachmentSizeInBytes":{"type":"long"},"AttachmentName":{},"ClientToken":{"idempotencyToken":true},"ConnectionToken":{"location":"header","locationName":"X-Amz-Bearer"}}},"output":{"type":"structure","members":{"AttachmentId":{},"UploadMetadata":{"type":"structure","members":{"Url":{},"UrlExpiry":{},"HeadersToInclude":{"type":"map","key":{},"value":{}}}}}}}},"shapes":{}}; +/***/ }), + +/***/ 8303: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.synth = void 0; +const core = __importStar(__webpack_require__(6470)); +const utils_1 = __webpack_require__(6611); +const synth = (config) => __awaiter(void 0, void 0, void 0, function* () { + const environment = config.environment + ? `ENVIRONMENT=${config.environment}` + : ''; + const plugin = config.plugin && config.plugin.length > 0 + ? config.plugin.map((p) => `-p ${p}`).join(' ') + : ''; + const roleArn = config.roleArn ? `-r ${config.roleArn}` : ''; + const strict = config.strict ? '--strict' : ''; + try { + const result = yield (0, utils_1.runCommand)(`${environment} npx cdk synth -o cdk.out ${plugin} ${roleArn} ${strict}`); + core.debug(result); + } + catch (error) { + core.error(error); + } +}); +exports.synth = synth; + + /***/ }), /***/ 8307: @@ -39819,6 +39749,176 @@ AWS.util.update(AWS.CloudSearchDomain.prototype, { }); +/***/ }), + +/***/ 9185: +/***/ (function(__unusedmodule, exports, __webpack_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getStackOutputs = exports.deployStack = exports.updateStack = exports.cleanupChangeSet = void 0; +const core = __importStar(__webpack_require__(6470)); +function cleanupChangeSet(cfn, stack, params, noEmptyChangeSet, noDeleteFailedChangeSet) { + return __awaiter(this, void 0, void 0, function* () { + const knownErrorMessages = [ + `No updates are to be performed`, + `The submitted information didn't contain changes` + ]; + const changeSetStatus = yield cfn + .describeChangeSet({ + ChangeSetName: params.ChangeSetName, + StackName: params.StackName + }) + .promise(); + if (changeSetStatus.Status === 'FAILED') { + core.debug(`${stack.StackName}: Deleting failed Change Set`); + if (noDeleteFailedChangeSet === false) { + yield cfn + .deleteChangeSet({ + ChangeSetName: params.ChangeSetName, + StackName: params.StackName + }) + .promise(); + } + if (noEmptyChangeSet && + knownErrorMessages.some(err => { var _a; return (_a = changeSetStatus.StatusReason) === null || _a === void 0 ? void 0 : _a.includes(err); })) { + return stack.StackId; + } + throw new Error(`Failed to create Change Set: ${changeSetStatus.StatusReason}`); + } + }); +} +exports.cleanupChangeSet = cleanupChangeSet; +function updateStack(cfn, stack, params, noEmptyChangeSet, noExecuteChangeSet, noDeleteFailedChangeSet) { + return __awaiter(this, void 0, void 0, function* () { + core.debug(`${stack.StackName}: Creating CloudFormation Change Set`); + yield cfn.createChangeSet(params).promise(); + try { + core.debug(`${stack.StackName}: Waiting for CloudFormation Change Set creation`); + yield cfn + .waitFor('changeSetCreateComplete', { + ChangeSetName: params.ChangeSetName, + StackName: params.StackName + }) + .promise(); + } + catch (_) { + return cleanupChangeSet(cfn, stack, params, noEmptyChangeSet, noDeleteFailedChangeSet); + } + if (noExecuteChangeSet === true) { + core.debug(`${stack.StackName}: Not executing the change set`); + return stack.StackId; + } + core.debug(`${stack.StackName}: Executing CloudFormation change set`); + yield cfn + .executeChangeSet({ + ChangeSetName: params.ChangeSetName, + StackName: params.StackName + }) + .promise(); + core.debug(`${stack.StackName}: Updating CloudFormation stack`); + yield cfn + .waitFor('stackUpdateComplete', { StackName: stack.StackId }) + .promise(); + return stack.StackId; + }); +} +exports.updateStack = updateStack; +function getStack(cfn, stackNameOrId) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + try { + const stacks = yield cfn + .describeStacks({ + StackName: stackNameOrId + }) + .promise(); + return (_a = stacks.Stacks) === null || _a === void 0 ? void 0 : _a[0]; + } + catch (e) { + if (e instanceof Error && e.message.match(/does not exist/)) { + return undefined; + } + throw e; + } + }); +} +function deployStack(cfn, params, noEmptyChangeSet, noExecuteChangeSet, noDeleteFailedChangeSet) { + return __awaiter(this, void 0, void 0, function* () { + const stack = yield getStack(cfn, params.StackName); + if (!stack) { + core.debug(`${params.StackName}: Creating CloudFormation Stack`); + const stack = yield cfn.createStack(params).promise(); + yield cfn + .waitFor('stackCreateComplete', { StackName: params.StackName }) + .promise(); + return stack.StackId; + } + return yield updateStack(cfn, stack, Object.assign({ ChangeSetName: `${params.StackName}-CS` }, { + StackName: params.StackName, + TemplateBody: params.TemplateBody, + TemplateURL: params.TemplateURL, + Parameters: params.Parameters, + Capabilities: params.Capabilities, + ResourceTypes: params.ResourceTypes, + RoleARN: params.RoleARN, + RollbackConfiguration: params.RollbackConfiguration, + NotificationARNs: params.NotificationARNs, + Tags: params.Tags + }), noEmptyChangeSet, noExecuteChangeSet, noDeleteFailedChangeSet); + }); +} +exports.deployStack = deployStack; +function getStackOutputs(cfn, stackId) { + return __awaiter(this, void 0, void 0, function* () { + const outputs = new Map(); + const stack = yield getStack(cfn, stackId); + if (stack && stack.Outputs) { + for (const output of stack.Outputs) { + if (output.OutputKey && output.OutputValue) { + outputs.set(output.OutputKey, output.OutputValue); + } + } + } + return outputs; + }); +} +exports.getStackOutputs = getStackOutputs; + + /***/ }), /***/ 9187: diff --git a/jest.config.js b/jest.config.js index faabcb3..cac4c02 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,11 +1,11 @@ module.exports = { - clearMocks: true, - moduleFileExtensions: ["js", "ts"], - testEnvironment: "node", - testMatch: ["**/*.test.ts"], - testRunner: "jest-circus/runner", - transform: { - "^.+\\.ts$": "ts-jest" - }, - verbose: true -}; + clearMocks: true, + moduleFileExtensions: ['js', 'ts'], + testEnvironment: 'node', + testMatch: ['**/*.test.ts'], + testRunner: 'jest-circus/runner', + transform: { + '^.+\\.ts$': 'ts-jest' + }, + verbose: true +} diff --git a/src/assets.ts b/src/assets.ts new file mode 100644 index 0000000..ebc3a74 --- /dev/null +++ b/src/assets.ts @@ -0,0 +1,28 @@ +import * as core from '@actions/core' +import { runCommand } from './utils' + +export type AssetsConfiguration = { + /** + * Stacks where assets should be published from + */ + stacks: Array +} + +export const assets = async (config: AssetsConfiguration) => { + const AWS_ACCESS_KEY_ID = `AWS_ACCESS_KEY_ID='${process.env['AWS_ACCESS_KEY_ID']}'` + const AWS_SECRET_ACCESS_KEY = `AWS_SECRET_ACCESS_KEY='${process.env['AWS_SECRET_ACCESS_KEY']}'` + const AWS_REGION = `AWS_REGION='${process.env['AWS_REGION']}'` + + try { + config.stacks.map(async (_: any, i: number) => { + const assetFilePath = `${config.stacks[i]}.assets.json` + + const result = await runCommand( + `${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY} ${AWS_REGION} node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}` + ) + core.debug(result) + }) + } catch (error) { + core.error(error as string) + } +} diff --git a/src/deploy.ts b/src/deploy.ts index a5a9ca7..7626b5d 100644 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -1,184 +1,139 @@ import * as core from '@actions/core' import * as aws from 'aws-sdk' -import { CreateChangeSetInput, CreateStackInput } from './main' - -export type Stack = aws.CloudFormation.Stack - -export async function cleanupChangeSet( - cfn: aws.CloudFormation, - stack: Stack, - params: CreateChangeSetInput, - noEmptyChangeSet?: boolean, +import pLimit from 'p-limit' +import * as fs from 'fs' +import * as path from 'path' +import { parseParameters, pickOption, runCommand } from './utils' +import { deployStack, getStackOutputs } from './deployStack' + +export type Configuration = { + capabilities?: string + roleARN?: string + disableRollback?: boolean + timeoutInMinutes?: number + tags?: aws.CloudFormation.Tags + terminationProtection?: boolean + parameterOverrides?: string + noEmptyChangeSet?: boolean + noExecuteChangeSet?: boolean noDeleteFailedChangeSet?: boolean -): Promise { - const knownErrorMessages = [ - `No updates are to be performed`, - `The submitted information didn't contain changes` - ] - - const changeSetStatus = await cfn - .describeChangeSet({ - ChangeSetName: params.ChangeSetName, - StackName: params.StackName - }) - .promise() - - if (changeSetStatus.Status === 'FAILED') { - core.debug(`${stack.StackName}: Deleting failed Change Set`) - - if (noDeleteFailedChangeSet === false) { - await cfn - .deleteChangeSet({ - ChangeSetName: params.ChangeSetName, - StackName: params.StackName - }) - .promise() - } +} - if ( - noEmptyChangeSet && - knownErrorMessages.some(err => - changeSetStatus.StatusReason?.includes(err) - ) - ) { - return stack.StackId - } +export type DeployConfig = { + stacks: Array + concurrency?: number +} - throw new Error( - `Failed to create Change Set: ${changeSetStatus.StatusReason}` - ) - } +export type TaskConfig = { + stack: string } -export async function updateStack( - cfn: aws.CloudFormation, - stack: Stack, - params: CreateChangeSetInput, - noEmptyChangeSet?: boolean, - noExecuteChangeSet?: boolean, - noDeleteFailedChangeSet?: boolean -): Promise { - core.debug(`${stack.StackName}: Creating CloudFormation Change Set`) - await cfn.createChangeSet(params).promise() +// The custom client configuration for the CloudFormation clients. +const clientConfiguration = { + customUserAgent: 'aws-cloudformation-github-deploy-for-github-actions' +} +export const deploy = async (config: Configuration & DeployConfig) => { + const { + concurrency, + stacks, + capabilities, + roleARN, + disableRollback, + timeoutInMinutes, + tags, + terminationProtection, + parameterOverrides, + noEmptyChangeSet, + noExecuteChangeSet, + noDeleteFailedChangeSet + } = config try { - core.debug( - `${stack.StackName}: Waiting for CloudFormation Change Set creation` - ) - await cfn - .waitFor('changeSetCreateComplete', { - ChangeSetName: params.ChangeSetName, - StackName: params.StackName - }) - .promise() - } catch (_) { - return cleanupChangeSet( - cfn, - stack, - params, - noEmptyChangeSet, - noDeleteFailedChangeSet + const cfn = new aws.CloudFormation({ ...clientConfiguration }) + const limit = pLimit(concurrency || 5) + + const tasks = config.stacks.map((_: any, i: number) => + limit(() => + task(cfn, { + stack: stacks[i], + capabilities, + roleARN, + disableRollback, + timeoutInMinutes, + tags, + terminationProtection, + parameterOverrides, + noEmptyChangeSet, + noExecuteChangeSet, + noDeleteFailedChangeSet + }).catch((err: any) => { + core.error(`${stacks[i]}: Error`) + throw err + }) + ) ) - } - if (noExecuteChangeSet === true) { - core.debug(`${stack.StackName}: Not executing the change set`) - return stack.StackId + await Promise.all(tasks) + } catch (err) { + if (err instanceof Error || typeof err === 'string') { + core.setFailed(err) + // @ts-ignore + core.debug(err.stack) + } } +} - core.debug(`${stack.StackName}: Executing CloudFormation change set`) - await cfn - .executeChangeSet({ - ChangeSetName: params.ChangeSetName, - StackName: params.StackName - }) - .promise() +const getTemplateBody = (stack: string) => { + const { GITHUB_WORKSPACE = __dirname } = process.env - core.debug(`${stack.StackName}: Updating CloudFormation stack`) - await cfn - .waitFor('stackUpdateComplete', { StackName: stack.StackId }) - .promise() + core.debug(`${stack}: Loading Stack template`) - return stack.StackId -} + const file = `cdk.out/${stack}.template.json` + const filePath = path.isAbsolute(file) + ? file + : path.join(GITHUB_WORKSPACE, file) -async function getStack( - cfn: aws.CloudFormation, - stackNameOrId: string -): Promise { - try { - const stacks = await cfn - .describeStacks({ - StackName: stackNameOrId - }) - .promise() - return stacks.Stacks?.[0] - } catch (e) { - if (e instanceof Error && e.message.match(/does not exist/)) { - return undefined - } - throw e - } + return fs.readFileSync(filePath, 'utf8') } -export async function deployStack( +const task = async ( cfn: aws.CloudFormation, - params: CreateStackInput, - noEmptyChangeSet?: boolean, - noExecuteChangeSet?: boolean, - noDeleteFailedChangeSet?: boolean -): Promise { - const stack = await getStack(cfn, params.StackName) - - if (!stack) { - core.debug(`${params.StackName}: Creating CloudFormation Stack`) + config: Configuration & TaskConfig +): Promise => { + // CloudFormation Stack Parameter for the creation or update + const params: aws.CloudFormation.Types.CreateStackInput = { + StackName: config.stack, + TemplateBody: getTemplateBody(config.stack), + EnableTerminationProtection: config.terminationProtection, + RoleARN: config.roleARN, + DisableRollback: config.disableRollback, + TimeoutInMinutes: config.timeoutInMinutes, + Tags: config.tags + } - const stack = await cfn.createStack(params).promise() - await cfn - .waitFor('stackCreateComplete', { StackName: params.StackName }) - .promise() + if (config.capabilities) { + params.Capabilities = [ + ...config.capabilities.split(',').map(cap => cap.trim()) + ] + } - return stack.StackId + if (config.parameterOverrides) { + params.Parameters = parseParameters(config.parameterOverrides.trim()) } - return await updateStack( + const stackId = await deployStack( cfn, - stack, - { - ChangeSetName: `${params.StackName}-CS`, - ...{ - StackName: params.StackName, - TemplateBody: params.TemplateBody, - TemplateURL: params.TemplateURL, - Parameters: params.Parameters, - Capabilities: params.Capabilities, - ResourceTypes: params.ResourceTypes, - RoleARN: params.RoleARN, - RollbackConfiguration: params.RollbackConfiguration, - NotificationARNs: params.NotificationARNs, - Tags: params.Tags - } - }, - noEmptyChangeSet, - noExecuteChangeSet, - noDeleteFailedChangeSet + params, + config.noEmptyChangeSet, + config.noExecuteChangeSet, + config.noDeleteFailedChangeSet ) -} + core.setOutput(`${config.stack}-stack-id`, stackId || 'UNKNOWN') -export async function getStackOutputs( - cfn: aws.CloudFormation, - stackId: string -): Promise> { - const outputs = new Map() - const stack = await getStack(cfn, stackId) - - if (stack && stack.Outputs) { - for (const output of stack.Outputs) { - if (output.OutputKey && output.OutputValue) { - outputs.set(output.OutputKey, output.OutputValue) - } + if (stackId) { + const outputs = await getStackOutputs(cfn, stackId) + for (const [logicalId, value] of outputs) { + core.setOutput(`${config.stack}_output_${logicalId}`, value) } } - - return outputs } diff --git a/src/deployStack.ts b/src/deployStack.ts new file mode 100644 index 0000000..a5a9ca7 --- /dev/null +++ b/src/deployStack.ts @@ -0,0 +1,184 @@ +import * as core from '@actions/core' +import * as aws from 'aws-sdk' +import { CreateChangeSetInput, CreateStackInput } from './main' + +export type Stack = aws.CloudFormation.Stack + +export async function cleanupChangeSet( + cfn: aws.CloudFormation, + stack: Stack, + params: CreateChangeSetInput, + noEmptyChangeSet?: boolean, + noDeleteFailedChangeSet?: boolean +): Promise { + const knownErrorMessages = [ + `No updates are to be performed`, + `The submitted information didn't contain changes` + ] + + const changeSetStatus = await cfn + .describeChangeSet({ + ChangeSetName: params.ChangeSetName, + StackName: params.StackName + }) + .promise() + + if (changeSetStatus.Status === 'FAILED') { + core.debug(`${stack.StackName}: Deleting failed Change Set`) + + if (noDeleteFailedChangeSet === false) { + await cfn + .deleteChangeSet({ + ChangeSetName: params.ChangeSetName, + StackName: params.StackName + }) + .promise() + } + + if ( + noEmptyChangeSet && + knownErrorMessages.some(err => + changeSetStatus.StatusReason?.includes(err) + ) + ) { + return stack.StackId + } + + throw new Error( + `Failed to create Change Set: ${changeSetStatus.StatusReason}` + ) + } +} + +export async function updateStack( + cfn: aws.CloudFormation, + stack: Stack, + params: CreateChangeSetInput, + noEmptyChangeSet?: boolean, + noExecuteChangeSet?: boolean, + noDeleteFailedChangeSet?: boolean +): Promise { + core.debug(`${stack.StackName}: Creating CloudFormation Change Set`) + await cfn.createChangeSet(params).promise() + + try { + core.debug( + `${stack.StackName}: Waiting for CloudFormation Change Set creation` + ) + await cfn + .waitFor('changeSetCreateComplete', { + ChangeSetName: params.ChangeSetName, + StackName: params.StackName + }) + .promise() + } catch (_) { + return cleanupChangeSet( + cfn, + stack, + params, + noEmptyChangeSet, + noDeleteFailedChangeSet + ) + } + + if (noExecuteChangeSet === true) { + core.debug(`${stack.StackName}: Not executing the change set`) + return stack.StackId + } + + core.debug(`${stack.StackName}: Executing CloudFormation change set`) + await cfn + .executeChangeSet({ + ChangeSetName: params.ChangeSetName, + StackName: params.StackName + }) + .promise() + + core.debug(`${stack.StackName}: Updating CloudFormation stack`) + await cfn + .waitFor('stackUpdateComplete', { StackName: stack.StackId }) + .promise() + + return stack.StackId +} + +async function getStack( + cfn: aws.CloudFormation, + stackNameOrId: string +): Promise { + try { + const stacks = await cfn + .describeStacks({ + StackName: stackNameOrId + }) + .promise() + return stacks.Stacks?.[0] + } catch (e) { + if (e instanceof Error && e.message.match(/does not exist/)) { + return undefined + } + throw e + } +} + +export async function deployStack( + cfn: aws.CloudFormation, + params: CreateStackInput, + noEmptyChangeSet?: boolean, + noExecuteChangeSet?: boolean, + noDeleteFailedChangeSet?: boolean +): Promise { + const stack = await getStack(cfn, params.StackName) + + if (!stack) { + core.debug(`${params.StackName}: Creating CloudFormation Stack`) + + const stack = await cfn.createStack(params).promise() + await cfn + .waitFor('stackCreateComplete', { StackName: params.StackName }) + .promise() + + return stack.StackId + } + + return await updateStack( + cfn, + stack, + { + ChangeSetName: `${params.StackName}-CS`, + ...{ + StackName: params.StackName, + TemplateBody: params.TemplateBody, + TemplateURL: params.TemplateURL, + Parameters: params.Parameters, + Capabilities: params.Capabilities, + ResourceTypes: params.ResourceTypes, + RoleARN: params.RoleARN, + RollbackConfiguration: params.RollbackConfiguration, + NotificationARNs: params.NotificationARNs, + Tags: params.Tags + } + }, + noEmptyChangeSet, + noExecuteChangeSet, + noDeleteFailedChangeSet + ) +} + +export async function getStackOutputs( + cfn: aws.CloudFormation, + stackId: string +): Promise> { + const outputs = new Map() + const stack = await getStack(cfn, stackId) + + if (stack && stack.Outputs) { + for (const output of stack.Outputs) { + if (output.OutputKey && output.OutputValue) { + outputs.set(output.OutputKey, output.OutputValue) + } + } + } + + return outputs +} diff --git a/src/inputs.ts b/src/inputs.ts index 1d75a10..871996d 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -1,205 +1,73 @@ import * as core from '@actions/core' -import { parseTags, parseString, parseNumber, parseARNs } from './utils' - -// we don't use core.getMultilineInput() because it filters out empty lines -function parseMultiline(str: string): string[] { - if (str === undefined) { - // some tests pass undefined instead of an empty string as core.getInput() would do - return [''] - } - return str.split('\n') -} +import { parseTags, parseString, parseNumber, parseMultiline } from './utils' export function getConfiguration(): any { const options: any = {} - options.template = parseMultiline( - core.getInput('template', { required: false }) - ) + options.stacks = parseMultiline(core.getInput('stacks', { required: true })) - options.stackName = parseMultiline( - core.getInput('name', { required: true }) - ) + options.capabilities = core.getInput('capabilities', { required: false }) - // if (options.template.length != options.stackName.length) { - // throw new Error('number of input lemplate lines must match name lines') - // } + options.parameterOverrides = core.getInput('parameter-overrides', { + required: false + }) - options.capabilities = parseMultiline( - core.getInput('capabilities', { - required: false - }) - ) + options.noEmptyChangeSet = !!+core.getInput('no-fail-on-empty-changeset', { + required: false + }) + + options.noExecuteChangeSet = !!+core.getInput('no-execute-changeset', { + required: false + }) - if ( - options.capabilities.length !== 1 && - options.capabilities.length != options.stackName.length - ) { - throw new Error( - 'number input capabilities lines must match name lines or must be a single line' - ) - } - - options.parameterOverrides = parseMultiline( - core.getInput('parameter-overrides', { + options.noDeleteFailedChangeSet = !!+core.getInput( + 'no-delete-failed-changeset', + { required: false - }) + } ) - if ( - options.parameterOverrides.length !== 1 && - options.parameterOverrides.length != options.stackName.length - ) { - throw new Error( - 'number input parameter-overrides lines must match name lines or must be a single line' - ) - } - - options.noEmptyChangeSet = parseMultiline( - core.getInput('no-fail-on-empty-changeset', { - required: false - }) - ).map(x => !!+x) - - if ( - options.noEmptyChangeSet.length !== 1 && - options.noEmptyChangeSet.length != options.stackName.length - ) { - throw new Error( - 'number input no-fail-on-empty-changeset lines must match name lines or must be a single line' - ) - } - - options.noExecuteChangeSet = parseMultiline( - core.getInput('no-execute-changeset', { - required: false - }) - ).map(x => !!+x) - - if ( - options.noExecuteChangeSet.length !== 1 && - options.noExecuteChangeSet.length != options.stackName.length - ) { - throw new Error( - 'number input no-execute-changeset lines must match name lines or must be a single line' - ) - } - - options.noDeleteFailedChangeSet = parseMultiline( - core.getInput('no-delete-failed-changeset', { - required: false - }) - ).map(x => !!+x) - - if ( - options.noDeleteFailedChangeSet.length !== 1 && - options.noDeleteFailedChangeSet.length != options.stackName.length - ) { - throw new Error( - 'number input no-delete-failed-changeset lines must match name lines or must be a single line' - ) - } - - options.disableRollback = parseMultiline( - core.getInput('disable-rollback', { - required: false - }) - ).map(x => !!+x) - - if ( - options.disableRollback.length !== 1 && - options.disableRollback.length != options.stackName.length - ) { - throw new Error( - 'number input disable-rollback lines must match name lines or must be a single line' - ) - } - - options.timeoutInMinutes = parseMultiline( + options.disableRollback = !!+core.getInput('disable-rollback', { + required: false + }) + + options.timeoutInMinutes = parseNumber( core.getInput('timeout-in-minutes', { required: false }) - ).map(parseNumber) - - if ( - options.timeoutInMinutes.length !== 1 && - options.timeoutInMinutes.length != options.stackName.length - ) { - throw new Error( - 'number input timeout-in-minutes lines must match name lines or must be a single line' - ) - } - - options.notificationARNs = parseMultiline( - core.getInput('notification-arns', { - required: false - }) - ).map(parseARNs) - - if ( - options.notificationARNs.length !== 1 && - options.notificationARNs.length != options.stackName.length - ) { - throw new Error( - 'number input notification-arns lines must match name lines or must be a single line' - ) - } - - options.roleARN = parseMultiline( + ) + + options.roleARN = parseString( core.getInput('role-arn', { required: false }) - ).map(parseString) - - if ( - options.roleARN.length !== 1 && - options.roleARN.length != options.stackName.length - ) { - throw new Error( - 'number input role-arn lines must match name lines or must be a single line' - ) - } - - options.tags = parseMultiline( + ) + + options.tags = parseTags( core.getInput('tags', { required: false }) - ).map(parseTags) - - if ( - options.tags.length !== 1 && - options.tags.length != options.stackName.length - ) { - throw new Error( - 'number input tags lines must match name lines or must be a single line' - ) - } - - options.terminationProtection = parseMultiline( - core.getInput('termination-protection', { - required: false - }) - ).map(x => !!+x) + ) - if ( - options.terminationProtection.length !== 1 && - options.terminationProtection.length != options.stackName.length - ) { - throw new Error( - 'number input termination-protection lines must match name lines or must be a single line' - ) - } + options.terminationProtection = !!+core.getInput('termination-protection', { + required: false + }) options.environment = core.getInput('environment', { required: true }) - const AWS_ACCESS_KEY_ID = core.getInput('aws-access-key-id') - const AWS_SECRET_ACCESS_KEY = core.getInput('aws-secret-access-key') - const AWS_REGION = core.getInput('aws-region') - process.env['AWS_ACCESS_KEY_ID'] = AWS_ACCESS_KEY_ID - process.env['AWS_SECRET_ACCESS_KEY'] = AWS_SECRET_ACCESS_KEY - process.env['AWS_REGION'] = AWS_REGION + options.concurrency = parseNumber( + core.getInput('concurrency', { + required: false + }) + ) + + process.env['AWS_REGION'] = core.getInput('aws-region') + process.env['AWS_ACCESS_KEY_ID'] = core.getInput('aws-access-key-id') + process.env['AWS_SECRET_ACCESS_KEY'] = core.getInput( + 'aws-secret-access-key' + ) return options } diff --git a/src/main.ts b/src/main.ts index eff1155..90285d9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,12 +1,10 @@ -import pLimit from 'p-limit' -import * as path from 'path' import * as core from '@actions/core' import * as aws from 'aws-sdk' -import * as fs from 'fs' -import { deployStack, getStackOutputs } from './deploy' -import { isUrl, parseNumber, parseParameters, runCommand } from './utils' +import { runCommand } from './utils' import { getConfiguration } from './inputs' -import { stringify } from 'querystring' +import { synth } from './synth' +import { assets } from './assets' +import { deploy } from './deploy' export type CreateStackInput = aws.CloudFormation.Types.CreateStackInput export type CreateChangeSetInput = aws.CloudFormation.Types.CreateChangeSetInput @@ -16,108 +14,6 @@ export type InputCapabilities = | 'CAPABILITY_NAMED_IAM' | 'CAPABILITY_AUTO_EXPAND' -export type Inputs = { - [key: string]: string -} - -export type Options = { - // template: string - stackName: string - capabilities?: string - roleARN?: string - notificationARNs?: string[] - disableRollback?: boolean - timeoutInMinutes?: number - tags?: aws.CloudFormation.Tags - terminationProtection?: boolean - parameterOverrides?: string - noEmptyChangeSet?: boolean - noExecuteChangeSet?: boolean - noDeleteFailedChangeSet?: boolean -} - -// The custom client configuration for the CloudFormation clients. -const clientConfiguration = { - customUserAgent: 'aws-cloudformation-github-deploy-for-github-actions' -} - -export async function task( - cfn: aws.CloudFormation, - options: Options -): Promise { - const { GITHUB_WORKSPACE = __dirname } = process.env - // Setup CloudFormation Stack - let templateBody - let templateUrl - - // if (isUrl(options.template)) { - // core.debug( - // `${options.stackName}: Using CloudFormation Stack from Amazon S3 Bucket` - // ) - // templateUrl = options.template - // } else { - core.debug(`${options.stackName}: Loading CloudFormation Stack template`) - const template = `cdk.out/${options.stackName}.template.json` - const templateFilePath = path.isAbsolute(template) - ? template - : path.join(GITHUB_WORKSPACE, template) - templateBody = fs.readFileSync(templateFilePath, 'utf8') - // } - - // CloudFormation Stack Parameter for the creation or update - const params: CreateStackInput = { - StackName: options.stackName, - ...(options.roleARN !== undefined && { RoleARN: options.roleARN }), - ...(options.notificationARNs !== undefined && { - NotificationARNs: options.notificationARNs - }), - DisableRollback: true, - ...(options.timeoutInMinutes !== undefined && { - TimeoutInMinutes: options.timeoutInMinutes - }), - TemplateBody: templateBody, - TemplateURL: templateUrl, - ...(options.tags !== undefined && { Tags: options.tags }), - EnableTerminationProtection: options.terminationProtection - } - - if (options.capabilities) { - params.Capabilities = [ - ...options.capabilities.split(',').map(cap => cap.trim()) - ] - } - - if (options.parameterOverrides) { - params.Parameters = parseParameters(options.parameterOverrides.trim()) - } - - const stackId = await deployStack( - cfn, - params, - options.noEmptyChangeSet, - options.noExecuteChangeSet, - options.noDeleteFailedChangeSet - ) - core.setOutput(`${options.stackName}_stack-id`, stackId || 'UNKNOWN') - - if (stackId) { - const outputs = await getStackOutputs(cfn, stackId) - for (const [logicalId, value] of outputs) { - core.setOutput(`${options.stackName}_output_${logicalId}`, value) - } - } -} - -function pickOption(arr: Type[], i: number): Type | undefined { - if (arr.length === 0) { - return undefined - } - if (arr.length === 1) { - return arr[0] - } - return arr[i] -} - async function installCdk() { try { const result = await runCommand('npm install -g aws-cdk') @@ -127,94 +23,23 @@ async function installCdk() { } } -async function buildCdk() { - const options = getConfiguration() - - try { - const result = await runCommand( - `ENVIRONMENT=${options.environment} npx cdk synth --outputs-file cdk.out` - ) - core.debug(result) - } catch (error) { - core.error(error as string) - } -} - -async function publishAssets() { - const options = getConfiguration() - - try { - options.stackName.map(async (_: any, i: number) => { - const assetFilePath = `${options.stackName[i]}.assets.json` - - const result = await runCommand( - `AWS_ACCESS_KEY_ID='${process.env['AWS_ACCESS_KEY_ID']}' AWS_SECRET_ACCESS_KEY='${process.env['AWS_SECRET_ACCESS_KEY']}' AWS_REGION='${process.env['AWS_REGION']}' node node_modules/cdk-assets/bin/cdk-assets publish -p cdk.out/${assetFilePath}` - ) - core.debug(result) - }) - } catch (error) { - core.error(error as string) - } -} - export async function run(): Promise { - try { - const cfn = new aws.CloudFormation({ ...clientConfiguration }) - const options = getConfiguration() + const config = getConfiguration() - const concurrency = parseNumber( - core.getInput('concurrency', { - required: false - }) + if (!config.synth && !config.assets && !config.deploy) { + core.setFailed( + 'You must specify one type of job, either `synth: true`, `assets: true` or `deploy: true`' ) - const limit = pLimit(concurrency || 5) + } + if (config.synth) { await installCdk() - await buildCdk() - publishAssets() - - const tasks = options.stackName.map((_: any, i: number) => - limit(() => - task(cfn, { - // template: options.template[i], - stackName: options.stackName[i], - capabilities: pickOption(options.capabilities, i), - roleARN: pickOption(options.roleARN, i), - notificationARNs: pickOption(options.notificationARNs, i), - disableRollback: pickOption(options.disableRollback, i), - timeoutInMinutes: pickOption(options.timeoutInMinutes, i), - tags: pickOption(options.tags, i), - terminationProtection: pickOption( - options.terminationProtection, - i - ), - parameterOverrides: pickOption( - options.parameterOverrides, - i - ), - noEmptyChangeSet: pickOption(options.noEmptyChangeSet, i), - noExecuteChangeSet: pickOption( - options.noExecuteChangeSet, - i - ), - noDeleteFailedChangeSet: pickOption( - options.noDeleteFailedChangeSet, - i - ) - }).catch(err => { - core.error(`${options.stackName[i]}: Error`) - throw err - }) - ) - ) - - await Promise.all(tasks) - } catch (err) { - if (err instanceof Error || typeof err === 'string') { - core.setFailed(err) - // @ts-ignore - core.debug(err.stack) - } + await synth(config) + } else if (config.assets) { + await installCdk() + await assets(config) + } else if (config.deploy) { + await deploy(config) } } diff --git a/src/synth.ts b/src/synth.ts new file mode 100644 index 0000000..a308cb4 --- /dev/null +++ b/src/synth.ts @@ -0,0 +1,49 @@ +import * as core from '@actions/core' +import { runCommand } from './utils' + +export type SynthConfiguration = { + /** + * Name or path of a node package that extend the CDK features + * -p, --plugin + */ + plugin?: Array + /** + * Do not construct stacks with warnings + * --strict + */ + strict?: boolean + /** + * ARN of Role to use when invoking CloudFormation + * -r, --role-arn + */ + roleArn?: string + /** + * Define an environment that the CDK Stacks will use + * Will set the `ENVIRONMENT` so it will be available in typescript cdk by `process.env.ENVIRONMENT` + */ + environment?: string +} + +export const synth = async (config: SynthConfiguration) => { + const environment = config.environment + ? `ENVIRONMENT=${config.environment}` + : '' + + const plugin = + config.plugin && config.plugin.length > 0 + ? config.plugin.map((p: string) => `-p ${p}`).join(' ') + : '' + + const roleArn = config.roleArn ? `-r ${config.roleArn}` : '' + + const strict = config.strict ? '--strict' : '' + + try { + const result = await runCommand( + `${environment} npx cdk synth -o cdk.out ${plugin} ${roleArn} ${strict}` + ) + core.debug(result) + } catch (error) { + core.error(error as string) + } +} diff --git a/src/utils.ts b/src/utils.ts index fb73dbe..290f4aa 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -15,6 +15,28 @@ export function isUrl(s: string): boolean { return url.protocol === 'https:' } +export function pickOption(arr: T[], i: number): T | undefined { + if (arr.length === 0) { + return undefined + } + if (arr.length === 1) { + return arr[0] + } + return arr[i] +} + +/** + * Parse multiline + * We don't use core.getMultilineInput() because it filters out empty lines + */ +export function parseMultiline(str: string): string[] { + if (str === undefined) { + // some tests pass undefined instead of an empty string as core.getInput() would do + return [''] + } + return str.split('\n') +} + export function parseTags(s: string): aws.CloudFormation.Tags | undefined { let json From 300504908b5e917eca2ca4bbe84206a93ab1d22f Mon Sep 17 00:00:00 2001 From: johnny-human Date: Wed, 1 Feb 2023 22:03:27 +0100 Subject: [PATCH 06/11] remove assets --- src/main.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 90285d9..401ea39 100644 --- a/src/main.ts +++ b/src/main.ts @@ -28,17 +28,16 @@ export async function run(): Promise { if (!config.synth && !config.assets && !config.deploy) { core.setFailed( - 'You must specify one type of job, either `synth: true`, `assets: true` or `deploy: true`' + 'You must specify one type of job, either `synth: true` or `deploy: true`' ) } if (config.synth) { await installCdk() await synth(config) - } else if (config.assets) { + } else if (config.deploy) { await installCdk() await assets(config) - } else if (config.deploy) { await deploy(config) } } From 544c71c335ff06eb5ce7241dd694798e7730d0f8 Mon Sep 17 00:00:00 2001 From: johnny-human Date: Wed, 1 Feb 2023 22:04:00 +0100 Subject: [PATCH 07/11] dist --- dist/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index cd38a68..a70bd3d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1555,17 +1555,15 @@ function run() { return __awaiter(this, void 0, void 0, function* () { const config = (0, inputs_1.getConfiguration)(); if (!config.synth && !config.assets && !config.deploy) { - core.setFailed('You must specify one type of job, either `synth: true`, `assets: true` or `deploy: true`'); + core.setFailed('You must specify one type of job, either `synth: true` or `deploy: true`'); } if (config.synth) { yield installCdk(); yield (0, synth_1.synth)(config); } - else if (config.assets) { + else if (config.deploy) { yield installCdk(); yield (0, assets_1.assets)(config); - } - else if (config.deploy) { yield (0, deploy_1.deploy)(config); } }); From 9d526789db8637f6a3c8ea816ecea8b69b37b2f5 Mon Sep 17 00:00:00 2001 From: johnny-human Date: Wed, 1 Feb 2023 22:22:01 +0100 Subject: [PATCH 08/11] set all input optional --- dist/index.js | 4 +++- src/inputs.ts | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index a70bd3d..3c0a545 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31209,7 +31209,9 @@ const core = __importStar(__webpack_require__(6470)); const utils_1 = __webpack_require__(6611); function getConfiguration() { const options = {}; - options.stacks = (0, utils_1.parseMultiline)(core.getInput('stacks', { required: true })); + options.stacks = (0, utils_1.parseMultiline)(core.getInput('stacks', { required: false })); + options.synth = !!+core.getInput('synth', { required: false }); + options.deploy = !!+core.getInput('deploy', { required: false }); options.capabilities = core.getInput('capabilities', { required: false }); options.parameterOverrides = core.getInput('parameter-overrides', { required: false diff --git a/src/inputs.ts b/src/inputs.ts index 871996d..0f4abe5 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -4,7 +4,11 @@ import { parseTags, parseString, parseNumber, parseMultiline } from './utils' export function getConfiguration(): any { const options: any = {} - options.stacks = parseMultiline(core.getInput('stacks', { required: true })) + options.stacks = parseMultiline(core.getInput('stacks', { required: false })) + + options.synth = !!+core.getInput('synth', { required: false }) + + options.deploy = !!+core.getInput('deploy', { required: false }) options.capabilities = core.getInput('capabilities', { required: false }) From fed8334ce8537c544b16beb0d6b204e67a39a33e Mon Sep 17 00:00:00 2001 From: johnny-human Date: Wed, 1 Feb 2023 22:29:29 +0100 Subject: [PATCH 09/11] add debug --- dist/index.js | 1 + src/inputs.ts | 4 +++- src/main.ts | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 3c0a545..d637ddf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1554,6 +1554,7 @@ function installCdk() { function run() { return __awaiter(this, void 0, void 0, function* () { const config = (0, inputs_1.getConfiguration)(); + core.debug(config.synth); if (!config.synth && !config.assets && !config.deploy) { core.setFailed('You must specify one type of job, either `synth: true` or `deploy: true`'); } diff --git a/src/inputs.ts b/src/inputs.ts index 0f4abe5..a774321 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -4,7 +4,9 @@ import { parseTags, parseString, parseNumber, parseMultiline } from './utils' export function getConfiguration(): any { const options: any = {} - options.stacks = parseMultiline(core.getInput('stacks', { required: false })) + options.stacks = parseMultiline( + core.getInput('stacks', { required: false }) + ) options.synth = !!+core.getInput('synth', { required: false }) diff --git a/src/main.ts b/src/main.ts index 401ea39..2ea14b1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,6 +26,8 @@ async function installCdk() { export async function run(): Promise { const config = getConfiguration() + core.debug(config.synth) + if (!config.synth && !config.assets && !config.deploy) { core.setFailed( 'You must specify one type of job, either `synth: true` or `deploy: true`' From ad8b2e220bc6b02f665483cb889c49977e73fb1b Mon Sep 17 00:00:00 2001 From: johnny-human Date: Wed, 1 Feb 2023 22:39:11 +0100 Subject: [PATCH 10/11] deb --- dist/index.js | 2 ++ src/inputs.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/dist/index.js b/dist/index.js index d637ddf..f504d82 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31250,6 +31250,8 @@ function getConfiguration() { process.env['AWS_REGION'] = core.getInput('aws-region'); process.env['AWS_ACCESS_KEY_ID'] = core.getInput('aws-access-key-id'); process.env['AWS_SECRET_ACCESS_KEY'] = core.getInput('aws-secret-access-key'); + core.debug(options); + console.log(options); return options; } exports.getConfiguration = getConfiguration; diff --git a/src/inputs.ts b/src/inputs.ts index a774321..bc130b6 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -75,5 +75,8 @@ export function getConfiguration(): any { 'aws-secret-access-key' ) + core.debug(options) + console.log(options) + return options } From b8fa0ae33fae8672d40629f3ff691721ff16ecb0 Mon Sep 17 00:00:00 2001 From: johnny-human Date: Wed, 1 Feb 2023 22:43:47 +0100 Subject: [PATCH 11/11] fix --- dist/index.js | 14 +++++++------- src/inputs.ts | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dist/index.js b/dist/index.js index f504d82..4970d73 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31211,22 +31211,22 @@ const utils_1 = __webpack_require__(6611); function getConfiguration() { const options = {}; options.stacks = (0, utils_1.parseMultiline)(core.getInput('stacks', { required: false })); - options.synth = !!+core.getInput('synth', { required: false }); - options.deploy = !!+core.getInput('deploy', { required: false }); + options.synth = !!core.getInput('synth', { required: false }); + options.deploy = !!core.getInput('deploy', { required: false }); options.capabilities = core.getInput('capabilities', { required: false }); options.parameterOverrides = core.getInput('parameter-overrides', { required: false }); - options.noEmptyChangeSet = !!+core.getInput('no-fail-on-empty-changeset', { + options.noEmptyChangeSet = !!core.getInput('no-fail-on-empty-changeset', { required: false }); - options.noExecuteChangeSet = !!+core.getInput('no-execute-changeset', { + options.noExecuteChangeSet = !!core.getInput('no-execute-changeset', { required: false }); - options.noDeleteFailedChangeSet = !!+core.getInput('no-delete-failed-changeset', { + options.noDeleteFailedChangeSet = !!core.getInput('no-delete-failed-changeset', { required: false }); - options.disableRollback = !!+core.getInput('disable-rollback', { + options.disableRollback = !!core.getInput('disable-rollback', { required: false }); options.timeoutInMinutes = (0, utils_1.parseNumber)(core.getInput('timeout-in-minutes', { @@ -31238,7 +31238,7 @@ function getConfiguration() { options.tags = (0, utils_1.parseTags)(core.getInput('tags', { required: false })); - options.terminationProtection = !!+core.getInput('termination-protection', { + options.terminationProtection = !!core.getInput('termination-protection', { required: false }); options.environment = core.getInput('environment', { diff --git a/src/inputs.ts b/src/inputs.ts index bc130b6..7217133 100644 --- a/src/inputs.ts +++ b/src/inputs.ts @@ -8,9 +8,9 @@ export function getConfiguration(): any { core.getInput('stacks', { required: false }) ) - options.synth = !!+core.getInput('synth', { required: false }) + options.synth = !!core.getInput('synth', { required: false }) - options.deploy = !!+core.getInput('deploy', { required: false }) + options.deploy = !!core.getInput('deploy', { required: false }) options.capabilities = core.getInput('capabilities', { required: false }) @@ -18,22 +18,22 @@ export function getConfiguration(): any { required: false }) - options.noEmptyChangeSet = !!+core.getInput('no-fail-on-empty-changeset', { + options.noEmptyChangeSet = !!core.getInput('no-fail-on-empty-changeset', { required: false }) - options.noExecuteChangeSet = !!+core.getInput('no-execute-changeset', { + options.noExecuteChangeSet = !!core.getInput('no-execute-changeset', { required: false }) - options.noDeleteFailedChangeSet = !!+core.getInput( + options.noDeleteFailedChangeSet = !!core.getInput( 'no-delete-failed-changeset', { required: false } ) - options.disableRollback = !!+core.getInput('disable-rollback', { + options.disableRollback = !!core.getInput('disable-rollback', { required: false }) @@ -55,7 +55,7 @@ export function getConfiguration(): any { }) ) - options.terminationProtection = !!+core.getInput('termination-protection', { + options.terminationProtection = !!core.getInput('termination-protection', { required: false })