cdk-booster 1.1.2 → 1.1.4
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/cdk-booster.mjs +22 -17
- package/dist/cdkFrameworkWorker.mjs +8 -8
- package/package.json +14 -14
package/dist/cdk-booster.mjs
CHANGED
|
@@ -56,24 +56,29 @@ async function run() {
|
|
|
56
56
|
let lambdasEsBuildCommands = lambdas;
|
|
57
57
|
// skip all lambdas that have SKIP_CDK_BOOSTER env var set to true in their bundling environment
|
|
58
58
|
lambdasEsBuildCommands = lambdasEsBuildCommands.filter((lambda) => lambda.environment?.SKIP_CDK_BOOSTER !== 'true');
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
if (lambdasEsBuildCommands.length === 0) {
|
|
60
|
+
Logger.log(`No Lambda functions found by the CDK Booster. Skipping bundling.`);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
// Prepare bundling temp folders for each Lambda function
|
|
64
|
+
await recreateBundlingTempFolders(lambdasEsBuildCommands);
|
|
65
|
+
// Execute pre-bundling commands
|
|
66
|
+
await executeCommands(lambdasEsBuildCommands, 'commandBeforeBundling');
|
|
67
|
+
const outputs = await bundle(lambdasEsBuildCommands);
|
|
68
|
+
// move files to the output folder
|
|
69
|
+
await copyFilesToOutput(lambdasEsBuildCommands, outputs);
|
|
70
|
+
// Execute post-bundling commands
|
|
71
|
+
await executeCommands(lambdasEsBuildCommands, 'commandAfterBundling');
|
|
72
|
+
if (missing) {
|
|
73
|
+
copyAgainFunction = async () => {
|
|
74
|
+
await recreateBundlingTempFolders(lambdasEsBuildCommands);
|
|
75
|
+
await executeCommands(lambdasEsBuildCommands, 'commandBeforeBundling');
|
|
76
|
+
await copyFilesToOutput(lambdasEsBuildCommands, outputs);
|
|
77
|
+
await executeCommands(lambdasEsBuildCommands, 'commandAfterBundling');
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
Logger.log(`All Lambda functions have been built and copied to the output folder.`);
|
|
75
81
|
}
|
|
76
|
-
Logger.log(`All Lambda functions have been built and copied to the output folder.`);
|
|
77
82
|
}
|
|
78
83
|
Logger.log(`Starting to run regular CDK code.`);
|
|
79
84
|
// Regular import and execution of the compiled CDK code
|
|
@@ -23,16 +23,16 @@ parentPort.on('message', async (data) => {
|
|
|
23
23
|
global.cdkApp.synth = () => undefined; // prevent call
|
|
24
24
|
const missing = !!cloudAssembly.manifest.missing;
|
|
25
25
|
|
|
26
|
-
if (!global.lambdas || global.lambdas?.length === 0) {
|
|
27
|
-
throw new Error('No Lambda functions found in the CDK code');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
26
|
const lambdas = global.lambdas;
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
`[Worker]
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
if (!global.lambdas || global.lambdas?.length === 0) {
|
|
29
|
+
Logger.verbose(`[Worker] No Lambda functions found.`);
|
|
30
|
+
} else {
|
|
31
|
+
Logger.verbose(
|
|
32
|
+
`[Worker] Sending found Lambdas`,
|
|
33
|
+
JSON.stringify(lambdas, null, 2),
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
36
|
Logger.verbose(
|
|
37
37
|
`[Worker] ${missing ? 'Some resources are missing and need to be looked up. Synth will have to be run twice.' : 'All resources are resolved.'}`,
|
|
38
38
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cdk-booster",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Speed up AWS CDK's bundling of TypeScript/JavaScript Lambda handlers",
|
|
6
6
|
"homepage": "https://www.cdkbooster.com",
|
|
@@ -60,23 +60,23 @@
|
|
|
60
60
|
"docs:preview": "vitepress preview"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@eslint/js": "^9.
|
|
64
|
-
"@tsconfig/node22": "^22.0.
|
|
63
|
+
"@eslint/js": "^9.39.1",
|
|
64
|
+
"@tsconfig/node22": "^22.0.5",
|
|
65
65
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
66
|
-
"@types/node": "^24.
|
|
67
|
-
"aws-cdk": "2.
|
|
68
|
-
"aws-cdk-lib": "2.
|
|
69
|
-
"constructs": "^10.4.
|
|
70
|
-
"eslint": "^9.
|
|
66
|
+
"@types/node": "^24.10.1",
|
|
67
|
+
"aws-cdk": "2.1033.0",
|
|
68
|
+
"aws-cdk-lib": "2.231.0",
|
|
69
|
+
"constructs": "^10.4.3",
|
|
70
|
+
"eslint": "^9.39.1",
|
|
71
71
|
"eslint-config-prettier": "^10.1.8",
|
|
72
|
-
"globals": "^16.
|
|
72
|
+
"globals": "^16.5.0",
|
|
73
73
|
"husky": "^9.1.7",
|
|
74
|
-
"prettier": "^3.
|
|
75
|
-
"semantic-release": "^25.0.
|
|
76
|
-
"tsx": "^4.
|
|
77
|
-
"typescript-eslint": "^8.
|
|
74
|
+
"prettier": "^3.7.4",
|
|
75
|
+
"semantic-release": "^25.0.2",
|
|
76
|
+
"tsx": "^4.21.0",
|
|
77
|
+
"typescript-eslint": "^8.48.1",
|
|
78
78
|
"vitepress": "^1.6.4",
|
|
79
|
-
"@aws-sdk/client-lambda": "^3.
|
|
79
|
+
"@aws-sdk/client-lambda": "^3.943.0",
|
|
80
80
|
"adm-zip": "^0.5.16",
|
|
81
81
|
"@types/adm-zip": "^0.5.7"
|
|
82
82
|
},
|