cdk-booster 1.1.3 → 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.
@@ -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
- // Prepare bundling temp folders for each Lambda function
60
- await recreateBundlingTempFolders(lambdasEsBuildCommands);
61
- // Execute pre-bundling commands
62
- await executeCommands(lambdasEsBuildCommands, 'commandBeforeBundling');
63
- const outputs = await bundle(lambdasEsBuildCommands);
64
- // move files to the output folder
65
- await copyFilesToOutput(lambdasEsBuildCommands, outputs);
66
- // Execute post-bundling commands
67
- await executeCommands(lambdasEsBuildCommands, 'commandAfterBundling');
68
- if (missing) {
69
- copyAgainFunction = async () => {
70
- await recreateBundlingTempFolders(lambdasEsBuildCommands);
71
- await executeCommands(lambdasEsBuildCommands, 'commandBeforeBundling');
72
- await copyFilesToOutput(lambdasEsBuildCommands, outputs);
73
- await executeCommands(lambdasEsBuildCommands, 'commandAfterBundling');
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
- Logger.verbose(
33
- `[Worker] Sending found Lambdas`,
34
- JSON.stringify(lambdas, null, 2),
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",
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",
@@ -65,18 +65,18 @@
65
65
  "@types/eslint-config-prettier": "^6.11.3",
66
66
  "@types/node": "^24.10.1",
67
67
  "aws-cdk": "2.1033.0",
68
- "aws-cdk-lib": "2.227.0",
68
+ "aws-cdk-lib": "2.231.0",
69
69
  "constructs": "^10.4.3",
70
70
  "eslint": "^9.39.1",
71
71
  "eslint-config-prettier": "^10.1.8",
72
72
  "globals": "^16.5.0",
73
73
  "husky": "^9.1.7",
74
- "prettier": "^3.6.2",
74
+ "prettier": "^3.7.4",
75
75
  "semantic-release": "^25.0.2",
76
- "tsx": "^4.20.6",
77
- "typescript-eslint": "^8.47.0",
76
+ "tsx": "^4.21.0",
77
+ "typescript-eslint": "^8.48.1",
78
78
  "vitepress": "^1.6.4",
79
- "@aws-sdk/client-lambda": "^3.938.0",
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
  },