@jaypie/constructs 1.1.62 → 1.1.64

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.
@@ -36,5 +36,6 @@ export declare class JaypieEnvSecret extends Construct implements ISecret {
36
36
  addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult;
37
37
  denyAccountRootDelete(): void;
38
38
  attach(target: ISecretAttachmentTarget): ISecret;
39
+ cfnDynamicReferenceKey(options?: Parameters<ISecret["cfnDynamicReferenceKey"]>[0]): string;
39
40
  get envKey(): string | undefined;
40
41
  }
@@ -50,6 +50,10 @@ export declare class JaypieQueuedLambda extends Construct implements lambda.IFun
50
50
  };
51
51
  get stack(): Stack;
52
52
  applyRemovalPolicy(policy: RemovalPolicy): void;
53
+ get queueRef(): {
54
+ queueUrl: string;
55
+ queueArn: string;
56
+ };
53
57
  get fifo(): boolean;
54
58
  get queueArn(): string;
55
59
  get queueName(): string;
@@ -0,0 +1,22 @@
1
+ import { Construct } from "constructs";
2
+ import { JaypieWebDeploymentBucket, JaypieWebDeploymentBucketProps } from "./JaypieWebDeploymentBucket";
3
+ export interface JaypieStaticWebBucketProps extends Omit<JaypieWebDeploymentBucketProps, "host" | "name" | "roleTag"> {
4
+ /**
5
+ * The domain name for the website
6
+ * @default envHostname({ subdomain: "static" })
7
+ */
8
+ host?: string;
9
+ /**
10
+ * Optional bucket name
11
+ * @default constructEnvName("static")
12
+ */
13
+ name?: string;
14
+ /**
15
+ * Role tag for tagging resources
16
+ * @default CDK.ROLE.HOSTING
17
+ */
18
+ roleTag?: string;
19
+ }
20
+ export declare class JaypieStaticWebBucket extends JaypieWebDeploymentBucket {
21
+ constructor(scope: Construct, id?: string | JaypieStaticWebBucketProps, props?: JaypieStaticWebBucketProps);
22
+ }
@@ -6,6 +6,7 @@ import * as route53 from "aws-cdk-lib/aws-route53";
6
6
  import * as s3 from "aws-cdk-lib/aws-s3";
7
7
  import * as kms from "aws-cdk-lib/aws-kms";
8
8
  import { Construct } from "constructs";
9
+ import { JaypieHostedZone } from "./JaypieHostedZone";
9
10
  export interface JaypieWebDeploymentBucketProps extends s3.BucketProps {
10
11
  /**
11
12
  * SSL certificate for the CloudFront distribution
@@ -30,7 +31,7 @@ export interface JaypieWebDeploymentBucketProps extends s3.BucketProps {
30
31
  * The hosted zone for DNS records
31
32
  * @default CDK_ENV_WEB_HOSTED_ZONE || CDK_ENV_HOSTED_ZONE
32
33
  */
33
- zone?: string | route53.IHostedZone;
34
+ zone?: string | route53.IHostedZone | JaypieHostedZone;
34
35
  }
35
36
  export declare class JaypieWebDeploymentBucket extends Construct implements s3.IBucket {
36
37
  readonly bucket: s3.Bucket;
@@ -0,0 +1 @@
1
+ export {};
@@ -901,7 +901,9 @@ class JaypieAppStack extends JaypieStack {
901
901
  class JaypieLambda extends constructs.Construct {
902
902
  constructor(scope, id, props) {
903
903
  super(scope, id);
904
- const { allowAllOutbound, allowPublicSubnet, architecture = lambda__namespace.Architecture.X86_64, code, datadogApiKeyArn, deadLetterQueue, deadLetterQueueEnabled, deadLetterTopic, description, environment: initialEnvironment = {}, envSecrets = {}, ephemeralStorageSize, filesystem, handler = "index.handler", initialPolicy, layers = [], logGroup, logRetention = CDK$2.LAMBDA.LOG_RETENTION, maxEventAge, memorySize = CDK$2.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag = CDK$2.ROLE.PROCESSING, runtime = lambda__namespace.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = cdk.Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, vpc, vpcSubnets, } = props;
904
+ const { allowAllOutbound, allowPublicSubnet, architecture = lambda__namespace.Architecture.X86_64, code, datadogApiKeyArn, deadLetterQueue, deadLetterQueueEnabled, deadLetterTopic, description, environment: initialEnvironment = {}, envSecrets = {}, ephemeralStorageSize, filesystem, handler = "index.handler", initialPolicy, layers = [], logGroup, logRetention = CDK$2.LAMBDA.LOG_RETENTION, maxEventAge, memorySize = CDK$2.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag = CDK$2.ROLE.PROCESSING, runtime = new lambda__namespace.Runtime("nodejs24.x", lambda__namespace.RuntimeFamily.NODEJS, {
905
+ supportsInlineCode: true,
906
+ }), runtimeManagementMode, secrets = [], securityGroups, timeout = cdk.Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, vpc, vpcSubnets, } = props;
905
907
  // Get base environment with defaults
906
908
  const environment = jaypieLambdaEnv({ initialEnvironment });
907
909
  const codeAsset = typeof code === "string" ? lambda__namespace.Code.fromAsset(code) : code;
@@ -1124,7 +1126,9 @@ class JaypieLambda extends constructs.Construct {
1124
1126
  class JaypieQueuedLambda extends constructs.Construct {
1125
1127
  constructor(scope, id, props) {
1126
1128
  super(scope, id);
1127
- const { allowAllOutbound, allowPublicSubnet, architecture, batchSize = 1, code, datadogApiKeyArn, deadLetterQueue, deadLetterQueueEnabled, deadLetterTopic, description, environment = {}, envSecrets = {}, ephemeralStorageSize, fifo = true, filesystem, handler = "index.handler", initialPolicy, layers = [], logGroup, logRetention = CDK$2.LAMBDA.LOG_RETENTION, maxEventAge, memorySize = CDK$2.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag, runtime = lambda__namespace.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = cdk.Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, visibilityTimeout = cdk.Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), vpc, vpcSubnets, } = props;
1129
+ const { allowAllOutbound, allowPublicSubnet, architecture, batchSize = 1, code, datadogApiKeyArn, deadLetterQueue, deadLetterQueueEnabled, deadLetterTopic, description, environment = {}, envSecrets = {}, ephemeralStorageSize, fifo = true, filesystem, handler = "index.handler", initialPolicy, layers = [], logGroup, logRetention = CDK$2.LAMBDA.LOG_RETENTION, maxEventAge, memorySize = CDK$2.LAMBDA.MEMORY_SIZE, paramsAndSecrets, paramsAndSecretsOptions, profiling, profilingGroup, provisionedConcurrentExecutions, reservedConcurrentExecutions, retryAttempts, roleTag, runtime = new lambda__namespace.Runtime("nodejs24.x", lambda__namespace.RuntimeFamily.NODEJS, {
1130
+ supportsInlineCode: true,
1131
+ }), runtimeManagementMode, secrets = [], securityGroups, timeout = cdk.Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, visibilityTimeout = cdk.Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), vpc, vpcSubnets, } = props;
1128
1132
  // Create SQS Queue
1129
1133
  this._queue = new sqs__namespace.Queue(this, "Queue", {
1130
1134
  fifo,
@@ -1292,6 +1296,12 @@ class JaypieQueuedLambda extends constructs.Construct {
1292
1296
  this._queue.applyRemovalPolicy(policy);
1293
1297
  }
1294
1298
  // IQueue implementation
1299
+ get queueRef() {
1300
+ return {
1301
+ queueUrl: this._queue.queueUrl,
1302
+ queueArn: this._queue.queueArn,
1303
+ };
1304
+ }
1295
1305
  get fifo() {
1296
1306
  return this._queue.fifo;
1297
1307
  }
@@ -2012,6 +2022,9 @@ class JaypieEnvSecret extends constructs.Construct {
2012
2022
  attach(target) {
2013
2023
  return this._secret.attach(target);
2014
2024
  }
2025
+ cfnDynamicReferenceKey(options) {
2026
+ return this._secret.cfnDynamicReferenceKey(options);
2027
+ }
2015
2028
  get envKey() {
2016
2029
  return this._envKey;
2017
2030
  }
@@ -2963,18 +2976,6 @@ class JaypieSsoSyncApplication extends constructs.Construct {
2963
2976
  }
2964
2977
  }
2965
2978
 
2966
- class JaypieTraceSigningKeySecret extends JaypieEnvSecret {
2967
- constructor(scope, id = "TraceSigningKey", props) {
2968
- const defaultProps = {
2969
- envKey: "TRACE_SIGNING_KEY",
2970
- roleTag: CDK$2.ROLE.API,
2971
- vendorTag: CDK$2.VENDOR.KNOWTRACE,
2972
- ...props,
2973
- };
2974
- super(scope, id, defaultProps);
2975
- }
2976
- }
2977
-
2978
2979
  class JaypieWebDeploymentBucket extends constructs.Construct {
2979
2980
  constructor(scope, id, props = {}) {
2980
2981
  super(scope, id);
@@ -3087,11 +3088,18 @@ class JaypieWebDeploymentBucket extends constructs.Construct {
3087
3088
  }
3088
3089
  // Create CloudFront distribution and certificate if host and zone are provided
3089
3090
  if (host && zone) {
3090
- const hostedZone = typeof zone === "string"
3091
- ? route53__namespace.HostedZone.fromLookup(this, "HostedZone", {
3091
+ let hostedZone;
3092
+ if (typeof zone === "string") {
3093
+ hostedZone = route53__namespace.HostedZone.fromLookup(this, "HostedZone", {
3092
3094
  domainName: zone,
3093
- })
3094
- : zone;
3095
+ });
3096
+ }
3097
+ else if (zone instanceof JaypieHostedZone) {
3098
+ hostedZone = zone.hostedZone;
3099
+ }
3100
+ else {
3101
+ hostedZone = zone;
3102
+ }
3095
3103
  // Create certificate if not provided
3096
3104
  if (props.certificate !== false) {
3097
3105
  this.certificate =
@@ -3232,6 +3240,52 @@ class JaypieWebDeploymentBucket extends constructs.Construct {
3232
3240
  }
3233
3241
  }
3234
3242
 
3243
+ class JaypieStaticWebBucket extends JaypieWebDeploymentBucket {
3244
+ constructor(scope, id, props = {}) {
3245
+ // Handle overloaded signatures: (scope), (scope, props), (scope, id, props)
3246
+ let resolvedId;
3247
+ let resolvedProps;
3248
+ if (typeof id === "string") {
3249
+ resolvedId = id;
3250
+ resolvedProps = props;
3251
+ }
3252
+ else if (typeof id === "object") {
3253
+ resolvedId = "JaypieStaticWebBucket";
3254
+ resolvedProps = id;
3255
+ }
3256
+ else {
3257
+ resolvedId = "JaypieStaticWebBucket";
3258
+ resolvedProps = props;
3259
+ }
3260
+ const host = resolvedProps.host ?? envHostname({ subdomain: "static" });
3261
+ const name = resolvedProps.name ?? constructEnvName("static");
3262
+ const roleTag = resolvedProps.roleTag ?? CDK$2.ROLE.HOSTING;
3263
+ // Only use default zone if zone is not explicitly provided (including undefined)
3264
+ const zone = "zone" in resolvedProps
3265
+ ? resolvedProps.zone
3266
+ : process.env.CDK_ENV_DOMAIN || process.env.CDK_ENV_HOSTED_ZONE;
3267
+ super(scope, resolvedId, {
3268
+ ...resolvedProps,
3269
+ host,
3270
+ name,
3271
+ roleTag,
3272
+ zone,
3273
+ });
3274
+ }
3275
+ }
3276
+
3277
+ class JaypieTraceSigningKeySecret extends JaypieEnvSecret {
3278
+ constructor(scope, id = "TraceSigningKey", props) {
3279
+ const defaultProps = {
3280
+ envKey: "TRACE_SIGNING_KEY",
3281
+ roleTag: CDK$2.ROLE.API,
3282
+ vendorTag: CDK$2.VENDOR.KNOWTRACE,
3283
+ ...props,
3284
+ };
3285
+ super(scope, id, defaultProps);
3286
+ }
3287
+ }
3288
+
3235
3289
  exports.CDK = CDK$2;
3236
3290
  exports.JaypieAccountLoggingBucket = JaypieAccountLoggingBucket;
3237
3291
  exports.JaypieApiGateway = JaypieApiGateway;
@@ -3257,6 +3311,7 @@ exports.JaypieQueuedLambda = JaypieQueuedLambda;
3257
3311
  exports.JaypieSsoPermissions = JaypieSsoPermissions;
3258
3312
  exports.JaypieSsoSyncApplication = JaypieSsoSyncApplication;
3259
3313
  exports.JaypieStack = JaypieStack;
3314
+ exports.JaypieStaticWebBucket = JaypieStaticWebBucket;
3260
3315
  exports.JaypieTraceSigningKeySecret = JaypieTraceSigningKeySecret;
3261
3316
  exports.JaypieWebDeploymentBucket = JaypieWebDeploymentBucket;
3262
3317
  exports.addDatadogLayers = addDatadogLayers;