@lambda-kata/cdk 0.1.3-rc.20 → 0.1.3-rc.21
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/out/dist/index.js +24 -24
- package/out/tsc/src/aws-layer-manager.d.ts +13 -2
- package/package.json +1 -1
|
@@ -435,12 +435,12 @@ export declare class AWSLayerManager implements LayerManager {
|
|
|
435
435
|
* 2. UPX compression if still >50MB (50-70% additional reduction)
|
|
436
436
|
* 3. System Node.js replacement if still >60MB
|
|
437
437
|
* 4. Verify binary functionality after each stage
|
|
438
|
-
* 5. Fallback to original if within
|
|
438
|
+
* 5. Fallback to original if within 250MB limit
|
|
439
439
|
*
|
|
440
440
|
* @param originalBinaryPath - Path to the original Node.js binary
|
|
441
441
|
* @param tempDir - Temporary directory for optimization work
|
|
442
442
|
* @returns Promise resolving to path of optimized binary
|
|
443
|
-
* @throws Error if optimization fails and original exceeds
|
|
443
|
+
* @throws Error if optimization fails and original exceeds 250MB limit
|
|
444
444
|
*/
|
|
445
445
|
private optimizeNodeBinary;
|
|
446
446
|
/**
|
|
@@ -476,6 +476,17 @@ export declare class AWSLayerManager implements LayerManager {
|
|
|
476
476
|
* @throws Error if verification fails
|
|
477
477
|
*/
|
|
478
478
|
private verifyNodeBinary;
|
|
479
|
+
/**
|
|
480
|
+
* Verifies Node.js binary with graceful fallback for spawn errors.
|
|
481
|
+
*
|
|
482
|
+
* This method attempts full verification but falls back to basic checks
|
|
483
|
+
* if spawn fails (e.g., error -8). This prevents blocking deployment for
|
|
484
|
+
* binaries that are valid but fail verification due to system issues.
|
|
485
|
+
*
|
|
486
|
+
* @param binaryPath - Path to the Node.js binary to verify
|
|
487
|
+
* @returns Promise resolving to verification result with success flag and optional error
|
|
488
|
+
*/
|
|
489
|
+
private verifyNodeBinaryWithFallback;
|
|
479
490
|
/**
|
|
480
491
|
* Creates the proper Lambda Layer directory structure.
|
|
481
492
|
*
|
package/package.json
CHANGED