Skip to content

Commit 2fc3bed

Browse files
authored
Merge pull request #160 from kddejong/lifecycle/husky/update
Update husky configuration
2 parents d1e7b9e + b3a89c3 commit 2fc3bed

File tree

5 files changed

+35
-16
lines changed

5 files changed

+35
-16
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run precommit

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run test

dist/index.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ function deployStack(cfn, params, changeSetName, noEmptyChangeSet, noExecuteChan
157157
RoleARN: params.RoleARN,
158158
RollbackConfiguration: params.RollbackConfiguration,
159159
NotificationARNs: params.NotificationARNs,
160+
IncludeNestedStacks: params.IncludeNestedStacksChangeSet,
160161
Tags: params.Tags
161162
}), noEmptyChangeSet, noExecuteChangeSet, noDeleteFailedChangeSet);
162163
});
@@ -281,6 +282,9 @@ function run() {
281282
const changeSetName = (0, utils_1.parseString)(core.getInput('change-set-name', {
282283
required: false
283284
}));
285+
const includeNestedStacksChangeSet = !!+core.getInput('include-nested-stacks-change-set', {
286+
required: false
287+
});
284288
// Configures proxy
285289
const agent = (0, utils_1.configureProxy)(httpProxy);
286290
if (agent) {
@@ -317,7 +321,8 @@ function run() {
317321
TemplateBody: templateBody,
318322
TemplateURL: templateUrl,
319323
Tags: tags,
320-
EnableTerminationProtection: terminationProtections
324+
EnableTerminationProtection: terminationProtections,
325+
IncludeNestedStacksChangeSet: includeNestedStacksChangeSet
321326
};
322327
if (parameterOverrides) {
323328
params.Parameters = (0, utils_1.parseParameters)(parameterOverrides.trim());
@@ -48334,6 +48339,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(9830)
4833448339
const { File: UndiciFile } = __nccwpck_require__(8511)
4833548340
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685)
4833648341

48342+
let random
48343+
try {
48344+
const crypto = __nccwpck_require__(6005)
48345+
random = (max) => crypto.randomInt(0, max)
48346+
} catch {
48347+
random = (max) => Math.floor(Math.random(max))
48348+
}
48349+
4833748350
let ReadableStream = globalThis.ReadableStream
4833848351

4833948352
/** @type {globalThis['File']} */
@@ -48419,7 +48432,7 @@ function extractBody (object, keepalive = false) {
4841948432
// Set source to a copy of the bytes held by object.
4842048433
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
4842148434
} else if (util.isFormDataLike(object)) {
48422-
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`
48435+
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
4842348436
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
4842448437

4842548438
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
@@ -63192,6 +63205,14 @@ module.exports = require("net");
6319263205

6319363206
/***/ }),
6319463207

63208+
/***/ 6005:
63209+
/***/ ((module) => {
63210+
63211+
"use strict";
63212+
module.exports = require("node:crypto");
63213+
63214+
/***/ }),
63215+
6319563216
/***/ 5673:
6319663217
/***/ ((module) => {
6319763218

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"pack": "ncc build",
99
"precommit": "lint-staged",
1010
"test": "DEBUG=jest eslint **/*.ts && jest --coverage --detectOpenHandles --verbose",
11-
"all": "npm run build && npm run precommit && npm run pack && npm test"
11+
"all": "npm run build && npm run precommit && npm run pack && npm test",
12+
"prepare": "husky"
1213
},
1314
"repository": {
1415
"type": "git",
@@ -26,12 +27,6 @@
2627
"url": "https://github.com/aws-actions/aws-cloudformation-github-deploy/issues"
2728
},
2829
"homepage": "https://github.com/aws-actions/aws-cloudformation-github-deploy#readme",
29-
"husky": {
30-
"hooks": {
31-
"pre-commit": "npm run precommit",
32-
"pre-push": "npm run test"
33-
}
34-
},
3530
"dependencies": {
3631
"@actions/core": "^1.10.0",
3732
"@aws-sdk/client-cloudformation": "^3.474.0",
@@ -51,7 +46,7 @@
5146
"eslint-plugin-github": "^4.4.1",
5247
"eslint-plugin-jest": "^27.1.5",
5348
"eslint-plugin-prettier": "^4.2.1",
54-
"husky": "^8.0.2",
49+
"husky": "^9.1.7",
5550
"jest": "^29.3.1",
5651
"jest-circus": "^29.3.1",
5752
"js-yaml": "^4.1.0",

0 commit comments

Comments
 (0)