Skip to content

Commit 612fddc

Browse files
authored
Use webpack also to bundle the custom resource code (#263)
1 parent a59e811 commit 612fddc

32 files changed

+3597
-8028
lines changed

package-lock.json

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

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
{
22
"name": "cloudfront-authorization-at-edge",
3-
"version": "2.0.18",
3+
"version": "2.2.1",
44
"description": "Protect downloads of your content hosted on CloudFront with Cognito authentication using Lambda@Edge",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Sorry, there aren't any tests\"; exit 1",
8-
"tsc": "npx tsc -b",
98
"webpack": "webpack --progress",
109
"analyze": "webpack --profile --json > stats.json && webpack-bundle-analyzer ./stats.json",
11-
"build": "npm run tsc && npm run webpack",
12-
"update-dependencies": "for DIR in . $(ls -d src/cfn-custom-resources/*) $(ls -d src/lambda-edge/*) src/cfn-custom-resources/react-app/react-app/; do [ ! -f ${DIR}/package.json ] || (cd ${DIR} && echo \"Updating ${DIR} ...\" && rm -rf node_modules package-lock.json && npm install --prune); done;",
13-
"postinstall": "for DIR in $(ls -d src/cfn-custom-resources/*) $(ls -d src/lambda-edge/*); do [ ! -f ${DIR}/package.json ] || (cd ${DIR} && echo \"Updating ${DIR} ...\" && npm install --prune --ignore-scripts); done",
14-
"audit-fix": "for DIR in . $(ls -d src/cfn-custom-resources/*) $(ls -d src/lambda-edge/*) src/cfn-custom-resources/react-app/react-app/; do [ ! -f ${DIR}/package.json ] || (cd ${DIR} && echo \"Updating ${DIR} ...\" && npm audit fix); done"
10+
"build": "npm run remove-webpack-output && npm run webpack",
11+
"remove-webpack-output": "find src -type f \\( -name 'bundle.js' -o -name '*.bundle.js' \\) -exec rm {} +"
1512
},
1613
"keywords": [],
1714
"author": "",
1815
"devDependencies": {
19-
"@tsconfig/node16": "^1.0.4",
2016
"@types/adm-zip": "^0.4.34",
2117
"@types/aws-lambda": "^8.10.92",
2218
"@types/cookie": "^0.4.1",
2319
"@types/fs-extra": "^9.0.13",
20+
"@types/ncp": "^2.0.8",
2421
"@types/node": "^20.2.5",
25-
"aws-sdk": "^2.1354.0",
2622
"html-loader": "^3.1.0",
2723
"prettier": "^2.5.1",
2824
"terser-webpack-plugin": "^5.3.1",
@@ -33,9 +29,13 @@
3329
"webpack-cli": "^4.9.2"
3430
},
3531
"dependencies": {
36-
"adm-zip": "^0.5.9",
32+
"@tsconfig/node20": "^20.1.2",
33+
"adm-zip": "^0.5.10",
3734
"aws-jwt-verify": "^2.1.3",
38-
"cookie": "^0.4.1"
35+
"aws-sdk": "^2.1571.0",
36+
"cookie": "^0.4.1",
37+
"ncp": "^2.0.0",
38+
"s3-spa-upload": "^2.1.5"
3939
},
4040
"prettier": {
4141
"trailingComma": "es5",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!bundle.*

0 commit comments

Comments
 (0)