@certenza/aws-cdk-infrastructure-commons 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/apigateway.js +10 -1
- package/package.json +10 -6
package/dist/src/apigateway.js
CHANGED
|
@@ -93,10 +93,19 @@ const createApiGateway = (scope, apiName, domainName, hostedZoneId, zoneName) =>
|
|
|
93
93
|
retention: logs.RetentionDays.ONE_MONTH, // Budget-friendly: 1 month retention
|
|
94
94
|
removalPolicy: cdk.RemovalPolicy.DESTROY, // Destroy log group when API is deleted
|
|
95
95
|
});
|
|
96
|
-
// Create deployment
|
|
96
|
+
// Create deployment that automatically updates when API changes
|
|
97
|
+
// The Deployment construct should automatically detect when the API definition changes
|
|
98
|
+
// and create a new deployment. The dependency on api.root helps ensure this works.
|
|
99
|
+
// Note: If you add methods/resources and the stage doesn't update, the deployment
|
|
100
|
+
// might not be detecting changes. In that case, you may need to manually trigger
|
|
101
|
+
// a redeployment or use a hash-based approach.
|
|
97
102
|
const deployment = new apigateway.Deployment(scope, `${apiName}-Deployment`, {
|
|
98
103
|
api: api,
|
|
104
|
+
retainDeployments: false,
|
|
99
105
|
});
|
|
106
|
+
// Add dependency on API root to help ensure deployment updates when API changes
|
|
107
|
+
// This dependency ensures the deployment is recreated when methods/resources are added
|
|
108
|
+
deployment.node.addDependency(api.root);
|
|
100
109
|
// Create stage with logging configuration
|
|
101
110
|
// The execution log group must exist before the stage is created so API Gateway uses it
|
|
102
111
|
const stage = new apigateway.Stage(scope, `${apiName}-Stage`, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certenza/aws-cdk-infrastructure-commons",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Common infrastructure reusable utilities and resources for Certenza projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,12 +9,16 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsc",
|
|
12
|
-
"
|
|
13
|
-
"prebuild": "npm run
|
|
12
|
+
"clean_up": "rimraf dist",
|
|
13
|
+
"prebuild": "npm run clean_up",
|
|
14
14
|
"prepublishOnly": "npm run build",
|
|
15
15
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
16
16
|
"format": "prettier --write .",
|
|
17
|
-
"format:check": "prettier --check ."
|
|
17
|
+
"format:check": "prettier --check .",
|
|
18
|
+
"git_clean": "sh -c 'git checkout main && git pull origin main && git branch -D \"$1\" && git remote update origin --prune' sh",
|
|
19
|
+
"git_release": "sh -c 'git add . && git commit -m \"$1\" && git push origin \"$1\"' sh",
|
|
20
|
+
"clean": "npm run git_clean -- ",
|
|
21
|
+
"release": "npm run git_release -- "
|
|
18
22
|
},
|
|
19
23
|
"keywords": [
|
|
20
24
|
"aws",
|
|
@@ -36,11 +40,11 @@
|
|
|
36
40
|
},
|
|
37
41
|
"homepage": "https://github.com/certenza/aws-cdk-infrastructure-commons#readme",
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"aws-cdk-lib": "^2.
|
|
43
|
+
"aws-cdk-lib": "^2.232.1"
|
|
40
44
|
},
|
|
41
45
|
"devDependencies": {
|
|
42
46
|
"@types/node": "^24.0.0",
|
|
43
|
-
"prettier": "^3.7.
|
|
47
|
+
"prettier": "^3.7.4",
|
|
44
48
|
"rimraf": "^6.1.2",
|
|
45
49
|
"typescript": "^5.9.3"
|
|
46
50
|
},
|