From 80e2bfc963269412c54c20a6a66c2a779a6a63f9 Mon Sep 17 00:00:00 2001 From: aloftus23 Date: Fri, 3 Jan 2025 11:58:43 -0500 Subject: [PATCH] Make sure to prune old lambda versions in the frontend too --- frontend/package-lock.json | 11 +++++++++-- frontend/package.json | 1 + frontend/serverless.yml | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 8c55bf49..e73e72ad 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -93,6 +93,7 @@ "serverless-domain-manager": "^7.0", "serverless-http": "^3.2.0", "serverless-plugin-ifelse": "^1.0.7", + "serverless-prune-versions": "^1.0.4", "serverless-webpack": "^5.11.0", "ts-jest": "^29.1.1", "typescript": "^4.8.4", @@ -103,7 +104,7 @@ "node": ">=18.0.0" }, "name": "crossfeed-front", - "version": "0.1.0" + "version": "0.3.11" }, "node_modules/2-thenable": { "dependencies": { @@ -40199,6 +40200,12 @@ "resolved": "https://registry.npmjs.org/serverless-plugin-ifelse/-/serverless-plugin-ifelse-1.0.7.tgz", "version": "1.0.7" }, + "node_modules/serverless-prune-versions": { + "dev": true, + "integrity": "sha512-LfnVToDJ+QB1udO16aaoaiGSNYy5Wlj8jfG/7IdT6nMnszQnic9PoeWv9RGWRPIfCq4zMmVLykWUnDGesWqUHg==", + "resolved": "https://registry.npmjs.org/serverless-prune-versions/-/serverless-prune-versions-1.0.4.tgz", + "version": "1.0.4" + }, "node_modules/serverless-webpack": { "dependencies": { "archiver": "^5.3.1", @@ -44394,5 +44401,5 @@ } }, "requires": true, - "version": "0.1.0" + "version": "0.3.11" } diff --git a/frontend/package.json b/frontend/package.json index 1609c3db..5bc8f4fa 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -101,6 +101,7 @@ "serverless-domain-manager": "^7.0", "serverless-http": "^3.2.0", "serverless-plugin-ifelse": "^1.0.7", + "serverless-prune-versions": "^1.0.4", "serverless-webpack": "^5.11.0", "ts-jest": "^29.1.1", "typescript": "^4.8.4", diff --git a/frontend/serverless.yml b/frontend/serverless.yml index 5affda6f..7e71f2b0 100644 --- a/frontend/serverless.yml +++ b/frontend/serverless.yml @@ -14,7 +14,10 @@ custom: certificateName: ${file(env.yml):${self:provider.stage}.DOMAIN, ''} stage: ${self:provider.stage} createRoute53Record: false - + prune: + automatic: true + includeLayers: true + number: 3 # Resource policies for GovCloud (Private) vs Non-GovCloud (Regional) privateResourcePolicy: - Effect: Deny @@ -105,3 +108,4 @@ plugins: - serverless-better-credentials - serverless-webpack - serverless-plugin-ifelse + - serverless-prune-versions