diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..f27575a --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run precommit diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 0000000..e37998f --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1 @@ +npm run test diff --git a/dist/index.js b/dist/index.js index e2e6417..a8aee9e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -157,6 +157,7 @@ function deployStack(cfn, params, changeSetName, noEmptyChangeSet, noExecuteChan RoleARN: params.RoleARN, RollbackConfiguration: params.RollbackConfiguration, NotificationARNs: params.NotificationARNs, + IncludeNestedStacks: params.IncludeNestedStacksChangeSet, Tags: params.Tags }), noEmptyChangeSet, noExecuteChangeSet, noDeleteFailedChangeSet); }); @@ -281,6 +282,9 @@ function run() { const changeSetName = (0, utils_1.parseString)(core.getInput('change-set-name', { required: false })); + const includeNestedStacksChangeSet = !!+core.getInput('include-nested-stacks-change-set', { + required: false + }); // Configures proxy const agent = (0, utils_1.configureProxy)(httpProxy); if (agent) { @@ -317,7 +321,8 @@ function run() { TemplateBody: templateBody, TemplateURL: templateUrl, Tags: tags, - EnableTerminationProtection: terminationProtections + EnableTerminationProtection: terminationProtections, + IncludeNestedStacksChangeSet: includeNestedStacksChangeSet }; if (parameterOverrides) { params.Parameters = (0, utils_1.parseParameters)(parameterOverrides.trim()); @@ -48334,6 +48339,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(9830) const { File: UndiciFile } = __nccwpck_require__(8511) const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) +let random +try { + const crypto = __nccwpck_require__(6005) + random = (max) => crypto.randomInt(0, max) +} catch { + random = (max) => Math.floor(Math.random(max)) +} + let ReadableStream = globalThis.ReadableStream /** @type {globalThis['File']} */ @@ -48419,7 +48432,7 @@ function extractBody (object, keepalive = false) { // Set source to a copy of the bytes held by object. source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}` + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` const prefix = `--${boundary}\r\nContent-Disposition: form-data` /*! formdata-polyfill. MIT License. Jimmy Wärting */ @@ -63192,6 +63205,14 @@ module.exports = require("net"); /***/ }), +/***/ 6005: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:crypto"); + +/***/ }), + /***/ 5673: /***/ ((module) => { diff --git a/package-lock.json b/package-lock.json index 1936200..9874908 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "eslint-plugin-github": "^4.4.1", "eslint-plugin-jest": "^27.1.5", "eslint-plugin-prettier": "^4.2.1", - "husky": "^8.0.2", + "husky": "^9.1.7", "jest": "^29.3.1", "jest-circus": "^29.3.1", "js-yaml": "^4.1.0", @@ -5562,15 +5562,16 @@ } }, "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", "dev": true, + "license": "MIT", "bin": { - "husky": "lib/bin.js" + "husky": "bin.js" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" diff --git a/package.json b/package.json index 5a0a562..172f0d8 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "pack": "ncc build", "precommit": "lint-staged", "test": "DEBUG=jest eslint **/*.ts && jest --coverage --detectOpenHandles --verbose", - "all": "npm run build && npm run precommit && npm run pack && npm test" + "all": "npm run build && npm run precommit && npm run pack && npm test", + "prepare": "husky" }, "repository": { "type": "git", @@ -26,12 +27,6 @@ "url": "https://github.com/aws-actions/aws-cloudformation-github-deploy/issues" }, "homepage": "https://github.com/aws-actions/aws-cloudformation-github-deploy#readme", - "husky": { - "hooks": { - "pre-commit": "npm run precommit", - "pre-push": "npm run test" - } - }, "dependencies": { "@actions/core": "^1.10.0", "@aws-sdk/client-cloudformation": "^3.474.0", @@ -51,7 +46,7 @@ "eslint-plugin-github": "^4.4.1", "eslint-plugin-jest": "^27.1.5", "eslint-plugin-prettier": "^4.2.1", - "husky": "^8.0.2", + "husky": "^9.1.7", "jest": "^29.3.1", "jest-circus": "^29.3.1", "js-yaml": "^4.1.0",