@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.
@@ -23,6 +23,7 @@ export { AccountAssignments, JaypieSsoPermissions, JaypieSsoPermissionsProps, }
23
23
  export { JaypieSsoSyncApplication, JaypieSsoSyncApplicationProps, } from "./JaypieSsoSyncApplication";
24
24
  export { JaypieQueuedLambda } from "./JaypieQueuedLambda";
25
25
  export { JaypieStack, JaypieStackProps } from "./JaypieStack";
26
+ export { JaypieStaticWebBucket, JaypieStaticWebBucketProps, } from "./JaypieStaticWebBucket";
26
27
  export { JaypieTraceSigningKeySecret } from "./JaypieTraceSigningKeySecret";
27
28
  export { JaypieWebDeploymentBucket } from "./JaypieWebDeploymentBucket";
28
29
  export * from "./helpers";
@@ -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 {};
@@ -23,6 +23,7 @@ export { AccountAssignments, JaypieSsoPermissions, JaypieSsoPermissionsProps, }
23
23
  export { JaypieSsoSyncApplication, JaypieSsoSyncApplicationProps, } from "./JaypieSsoSyncApplication";
24
24
  export { JaypieQueuedLambda } from "./JaypieQueuedLambda";
25
25
  export { JaypieStack, JaypieStackProps } from "./JaypieStack";
26
+ export { JaypieStaticWebBucket, JaypieStaticWebBucketProps, } from "./JaypieStaticWebBucket";
26
27
  export { JaypieTraceSigningKeySecret } from "./JaypieTraceSigningKeySecret";
27
28
  export { JaypieWebDeploymentBucket } from "./JaypieWebDeploymentBucket";
28
29
  export * from "./helpers";
package/dist/esm/index.js CHANGED
@@ -870,7 +870,9 @@ class JaypieAppStack extends JaypieStack {
870
870
  class JaypieLambda extends Construct {
871
871
  constructor(scope, id, props) {
872
872
  super(scope, id);
873
- const { allowAllOutbound, allowPublicSubnet, architecture = lambda.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.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, vpc, vpcSubnets, } = props;
873
+ const { allowAllOutbound, allowPublicSubnet, architecture = lambda.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.Runtime("nodejs24.x", lambda.RuntimeFamily.NODEJS, {
874
+ supportsInlineCode: true,
875
+ }), runtimeManagementMode, secrets = [], securityGroups, timeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, vpc, vpcSubnets, } = props;
874
876
  // Get base environment with defaults
875
877
  const environment = jaypieLambdaEnv({ initialEnvironment });
876
878
  const codeAsset = typeof code === "string" ? lambda.Code.fromAsset(code) : code;
@@ -1093,7 +1095,9 @@ class JaypieLambda extends Construct {
1093
1095
  class JaypieQueuedLambda extends Construct {
1094
1096
  constructor(scope, id, props) {
1095
1097
  super(scope, id);
1096
- 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.Runtime.NODEJS_22_X, runtimeManagementMode, secrets = [], securityGroups, timeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, visibilityTimeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), vpc, vpcSubnets, } = props;
1098
+ 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.Runtime("nodejs24.x", lambda.RuntimeFamily.NODEJS, {
1099
+ supportsInlineCode: true,
1100
+ }), runtimeManagementMode, secrets = [], securityGroups, timeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), tracing, vendorTag, visibilityTimeout = Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER), vpc, vpcSubnets, } = props;
1097
1101
  // Create SQS Queue
1098
1102
  this._queue = new sqs.Queue(this, "Queue", {
1099
1103
  fifo,
@@ -1261,6 +1265,12 @@ class JaypieQueuedLambda extends Construct {
1261
1265
  this._queue.applyRemovalPolicy(policy);
1262
1266
  }
1263
1267
  // IQueue implementation
1268
+ get queueRef() {
1269
+ return {
1270
+ queueUrl: this._queue.queueUrl,
1271
+ queueArn: this._queue.queueArn,
1272
+ };
1273
+ }
1264
1274
  get fifo() {
1265
1275
  return this._queue.fifo;
1266
1276
  }
@@ -1981,6 +1991,9 @@ class JaypieEnvSecret extends Construct {
1981
1991
  attach(target) {
1982
1992
  return this._secret.attach(target);
1983
1993
  }
1994
+ cfnDynamicReferenceKey(options) {
1995
+ return this._secret.cfnDynamicReferenceKey(options);
1996
+ }
1984
1997
  get envKey() {
1985
1998
  return this._envKey;
1986
1999
  }
@@ -2932,18 +2945,6 @@ class JaypieSsoSyncApplication extends Construct {
2932
2945
  }
2933
2946
  }
2934
2947
 
2935
- class JaypieTraceSigningKeySecret extends JaypieEnvSecret {
2936
- constructor(scope, id = "TraceSigningKey", props) {
2937
- const defaultProps = {
2938
- envKey: "TRACE_SIGNING_KEY",
2939
- roleTag: CDK$2.ROLE.API,
2940
- vendorTag: CDK$2.VENDOR.KNOWTRACE,
2941
- ...props,
2942
- };
2943
- super(scope, id, defaultProps);
2944
- }
2945
- }
2946
-
2947
2948
  class JaypieWebDeploymentBucket extends Construct {
2948
2949
  constructor(scope, id, props = {}) {
2949
2950
  super(scope, id);
@@ -3056,11 +3057,18 @@ class JaypieWebDeploymentBucket extends Construct {
3056
3057
  }
3057
3058
  // Create CloudFront distribution and certificate if host and zone are provided
3058
3059
  if (host && zone) {
3059
- const hostedZone = typeof zone === "string"
3060
- ? route53.HostedZone.fromLookup(this, "HostedZone", {
3060
+ let hostedZone;
3061
+ if (typeof zone === "string") {
3062
+ hostedZone = route53.HostedZone.fromLookup(this, "HostedZone", {
3061
3063
  domainName: zone,
3062
- })
3063
- : zone;
3064
+ });
3065
+ }
3066
+ else if (zone instanceof JaypieHostedZone) {
3067
+ hostedZone = zone.hostedZone;
3068
+ }
3069
+ else {
3070
+ hostedZone = zone;
3071
+ }
3064
3072
  // Create certificate if not provided
3065
3073
  if (props.certificate !== false) {
3066
3074
  this.certificate =
@@ -3201,5 +3209,51 @@ class JaypieWebDeploymentBucket extends Construct {
3201
3209
  }
3202
3210
  }
3203
3211
 
3204
- export { CDK$2 as CDK, JaypieAccountLoggingBucket, JaypieApiGateway, JaypieAppStack, JaypieBucketQueuedLambda, JaypieDatadogBucket, JaypieDatadogForwarder, JaypieDatadogSecret, JaypieDistribution, JaypieDnsRecord, JaypieEnvSecret, JaypieEventsRule, JaypieExpressLambda, JaypieGitHubDeployRole, JaypieHostedZone, JaypieInfrastructureStack, JaypieLambda, JaypieMongoDbSecret, JaypieNextJs, JaypieOpenAiSecret, JaypieOrganizationTrail, JaypieQueuedLambda, JaypieSsoPermissions, JaypieSsoSyncApplication, JaypieStack, JaypieTraceSigningKeySecret, JaypieWebDeploymentBucket, addDatadogLayers, constructEnvName, constructStackName, constructTagger, envHostname, extendDatadogRole, isEnv, isProductionEnv, isSandboxEnv, isValidHostname$1 as isValidHostname, isValidSubdomain, jaypieLambdaEnv, mergeDomain, resolveDatadogForwarderFunction, resolveDatadogLayers, resolveDatadogLoggingDestination, resolveHostedZone, resolveParamsAndSecrets };
3212
+ class JaypieStaticWebBucket extends JaypieWebDeploymentBucket {
3213
+ constructor(scope, id, props = {}) {
3214
+ // Handle overloaded signatures: (scope), (scope, props), (scope, id, props)
3215
+ let resolvedId;
3216
+ let resolvedProps;
3217
+ if (typeof id === "string") {
3218
+ resolvedId = id;
3219
+ resolvedProps = props;
3220
+ }
3221
+ else if (typeof id === "object") {
3222
+ resolvedId = "JaypieStaticWebBucket";
3223
+ resolvedProps = id;
3224
+ }
3225
+ else {
3226
+ resolvedId = "JaypieStaticWebBucket";
3227
+ resolvedProps = props;
3228
+ }
3229
+ const host = resolvedProps.host ?? envHostname({ subdomain: "static" });
3230
+ const name = resolvedProps.name ?? constructEnvName("static");
3231
+ const roleTag = resolvedProps.roleTag ?? CDK$2.ROLE.HOSTING;
3232
+ // Only use default zone if zone is not explicitly provided (including undefined)
3233
+ const zone = "zone" in resolvedProps
3234
+ ? resolvedProps.zone
3235
+ : process.env.CDK_ENV_DOMAIN || process.env.CDK_ENV_HOSTED_ZONE;
3236
+ super(scope, resolvedId, {
3237
+ ...resolvedProps,
3238
+ host,
3239
+ name,
3240
+ roleTag,
3241
+ zone,
3242
+ });
3243
+ }
3244
+ }
3245
+
3246
+ class JaypieTraceSigningKeySecret extends JaypieEnvSecret {
3247
+ constructor(scope, id = "TraceSigningKey", props) {
3248
+ const defaultProps = {
3249
+ envKey: "TRACE_SIGNING_KEY",
3250
+ roleTag: CDK$2.ROLE.API,
3251
+ vendorTag: CDK$2.VENDOR.KNOWTRACE,
3252
+ ...props,
3253
+ };
3254
+ super(scope, id, defaultProps);
3255
+ }
3256
+ }
3257
+
3258
+ export { CDK$2 as CDK, JaypieAccountLoggingBucket, JaypieApiGateway, JaypieAppStack, JaypieBucketQueuedLambda, JaypieDatadogBucket, JaypieDatadogForwarder, JaypieDatadogSecret, JaypieDistribution, JaypieDnsRecord, JaypieEnvSecret, JaypieEventsRule, JaypieExpressLambda, JaypieGitHubDeployRole, JaypieHostedZone, JaypieInfrastructureStack, JaypieLambda, JaypieMongoDbSecret, JaypieNextJs, JaypieOpenAiSecret, JaypieOrganizationTrail, JaypieQueuedLambda, JaypieSsoPermissions, JaypieSsoSyncApplication, JaypieStack, JaypieStaticWebBucket, JaypieTraceSigningKeySecret, JaypieWebDeploymentBucket, addDatadogLayers, constructEnvName, constructStackName, constructTagger, envHostname, extendDatadogRole, isEnv, isProductionEnv, isSandboxEnv, isValidHostname$1 as isValidHostname, isValidSubdomain, jaypieLambdaEnv, mergeDomain, resolveDatadogForwarderFunction, resolveDatadogLayers, resolveDatadogLoggingDestination, resolveHostedZone, resolveParamsAndSecrets };
3205
3259
  //# sourceMappingURL=index.js.map