@jaypie/constructs 1.1.62-rc.3 → 1.1.63

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/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Finlayson Studio, LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -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 {};
@@ -2963,18 +2963,6 @@ class JaypieSsoSyncApplication extends constructs.Construct {
2963
2963
  }
2964
2964
  }
2965
2965
 
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
2966
  class JaypieWebDeploymentBucket extends constructs.Construct {
2979
2967
  constructor(scope, id, props = {}) {
2980
2968
  super(scope, id);
@@ -3087,11 +3075,18 @@ class JaypieWebDeploymentBucket extends constructs.Construct {
3087
3075
  }
3088
3076
  // Create CloudFront distribution and certificate if host and zone are provided
3089
3077
  if (host && zone) {
3090
- const hostedZone = typeof zone === "string"
3091
- ? route53__namespace.HostedZone.fromLookup(this, "HostedZone", {
3078
+ let hostedZone;
3079
+ if (typeof zone === "string") {
3080
+ hostedZone = route53__namespace.HostedZone.fromLookup(this, "HostedZone", {
3092
3081
  domainName: zone,
3093
- })
3094
- : zone;
3082
+ });
3083
+ }
3084
+ else if (zone instanceof JaypieHostedZone) {
3085
+ hostedZone = zone.hostedZone;
3086
+ }
3087
+ else {
3088
+ hostedZone = zone;
3089
+ }
3095
3090
  // Create certificate if not provided
3096
3091
  if (props.certificate !== false) {
3097
3092
  this.certificate =
@@ -3232,6 +3227,52 @@ class JaypieWebDeploymentBucket extends constructs.Construct {
3232
3227
  }
3233
3228
  }
3234
3229
 
3230
+ class JaypieStaticWebBucket extends JaypieWebDeploymentBucket {
3231
+ constructor(scope, id, props = {}) {
3232
+ // Handle overloaded signatures: (scope), (scope, props), (scope, id, props)
3233
+ let resolvedId;
3234
+ let resolvedProps;
3235
+ if (typeof id === "string") {
3236
+ resolvedId = id;
3237
+ resolvedProps = props;
3238
+ }
3239
+ else if (typeof id === "object") {
3240
+ resolvedId = "JaypieStaticWebBucket";
3241
+ resolvedProps = id;
3242
+ }
3243
+ else {
3244
+ resolvedId = "JaypieStaticWebBucket";
3245
+ resolvedProps = props;
3246
+ }
3247
+ const host = resolvedProps.host ?? envHostname({ subdomain: "static" });
3248
+ const name = resolvedProps.name ?? constructEnvName("static");
3249
+ const roleTag = resolvedProps.roleTag ?? CDK$2.ROLE.HOSTING;
3250
+ // Only use default zone if zone is not explicitly provided (including undefined)
3251
+ const zone = "zone" in resolvedProps
3252
+ ? resolvedProps.zone
3253
+ : process.env.CDK_ENV_DOMAIN || process.env.CDK_ENV_HOSTED_ZONE;
3254
+ super(scope, resolvedId, {
3255
+ ...resolvedProps,
3256
+ host,
3257
+ name,
3258
+ roleTag,
3259
+ zone,
3260
+ });
3261
+ }
3262
+ }
3263
+
3264
+ class JaypieTraceSigningKeySecret extends JaypieEnvSecret {
3265
+ constructor(scope, id = "TraceSigningKey", props) {
3266
+ const defaultProps = {
3267
+ envKey: "TRACE_SIGNING_KEY",
3268
+ roleTag: CDK$2.ROLE.API,
3269
+ vendorTag: CDK$2.VENDOR.KNOWTRACE,
3270
+ ...props,
3271
+ };
3272
+ super(scope, id, defaultProps);
3273
+ }
3274
+ }
3275
+
3235
3276
  exports.CDK = CDK$2;
3236
3277
  exports.JaypieAccountLoggingBucket = JaypieAccountLoggingBucket;
3237
3278
  exports.JaypieApiGateway = JaypieApiGateway;
@@ -3257,6 +3298,7 @@ exports.JaypieQueuedLambda = JaypieQueuedLambda;
3257
3298
  exports.JaypieSsoPermissions = JaypieSsoPermissions;
3258
3299
  exports.JaypieSsoSyncApplication = JaypieSsoSyncApplication;
3259
3300
  exports.JaypieStack = JaypieStack;
3301
+ exports.JaypieStaticWebBucket = JaypieStaticWebBucket;
3260
3302
  exports.JaypieTraceSigningKeySecret = JaypieTraceSigningKeySecret;
3261
3303
  exports.JaypieWebDeploymentBucket = JaypieWebDeploymentBucket;
3262
3304
  exports.addDatadogLayers = addDatadogLayers;