@jaypie/constructs 1.2.25 → 1.2.27

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.
@@ -0,0 +1 @@
1
+ export {};
package/dist/esm/index.js CHANGED
@@ -1134,6 +1134,10 @@ class JaypieApiGateway extends Construct {
1134
1134
  process.env.CDK_ENV_API_HOSTED_ZONE) {
1135
1135
  host = mergeDomain(process.env.CDK_ENV_API_SUBDOMAIN, process.env.CDK_ENV_API_HOSTED_ZONE);
1136
1136
  }
1137
+ // Set PROJECT_BASE_URL on the Lambda if host is resolved and handler supports it
1138
+ if (host && "addEnvironment" in handler) {
1139
+ handler.addEnvironment("PROJECT_BASE_URL", `https://${host}`);
1140
+ }
1137
1141
  const apiGatewayName = name || constructEnvName("ApiGateway");
1138
1142
  const apiDomainName = constructEnvName("ApiDomainName");
1139
1143
  let hostedZone;
@@ -2403,6 +2407,10 @@ class JaypieDistribution extends Construct {
2403
2407
  else if (this.isIOrigin(handler)) {
2404
2408
  origin = handler;
2405
2409
  }
2410
+ // Set PROJECT_BASE_URL on the Lambda if host is resolved and handler supports it
2411
+ if (host && this.isIFunction(handler) && "addEnvironment" in handler) {
2412
+ handler.addEnvironment("PROJECT_BASE_URL", `https://${host}`);
2413
+ }
2406
2414
  }
2407
2415
  // Build default behavior
2408
2416
  let defaultBehavior;
@@ -3008,10 +3016,18 @@ class JaypieGitHubDeployRole extends Construct {
3008
3016
  "cloudformation:SetStackPolicy",
3009
3017
  "cloudformation:UpdateStack",
3010
3018
  "cloudformation:ValidateTemplate",
3019
+ "ec2:DescribeAvailabilityZones",
3020
+ "ec2:DescribeNetworkInterfaces",
3021
+ "ec2:DescribeRouteTables",
3022
+ "ec2:DescribeSecurityGroups",
3023
+ "ec2:DescribeSubnets",
3024
+ "ec2:DescribeVpcs",
3011
3025
  "iam:PassRole",
3012
3026
  "route53:ListHostedZones*",
3013
3027
  "s3:GetObject",
3014
3028
  "s3:ListBucket",
3029
+ "ssm:GetParameter",
3030
+ "ssm:GetParameters",
3015
3031
  ],
3016
3032
  effect: Effect.ALLOW,
3017
3033
  resources: ["*"],