From 986883ae704d45e34933db1794d06d1a2c3de6e2 Mon Sep 17 00:00:00 2001 From: Nick Cipollina Date: Wed, 15 Oct 2025 10:01:40 -0400 Subject: [PATCH] feat: update version prefix to 2.1.0-preview and upgrade package dependencies --- Directory.Build.props | 2 +- .../LayeredCraft.Cdk.Constructs.csproj | 4 +++- src/LayeredCraft.Cdk.Constructs/StaticSiteConstruct.cs | 6 +++++- .../LayeredCraft.Cdk.Constructs.Tests.csproj | 6 +++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 7b38a93..375e91b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 2.0.1 + 2.1.0-preview MIT diff --git a/src/LayeredCraft.Cdk.Constructs/LayeredCraft.Cdk.Constructs.csproj b/src/LayeredCraft.Cdk.Constructs/LayeredCraft.Cdk.Constructs.csproj index e85b4b1..4145d41 100644 --- a/src/LayeredCraft.Cdk.Constructs/LayeredCraft.Cdk.Constructs.csproj +++ b/src/LayeredCraft.Cdk.Constructs/LayeredCraft.Cdk.Constructs.csproj @@ -15,7 +15,9 @@ - + + + diff --git a/src/LayeredCraft.Cdk.Constructs/StaticSiteConstruct.cs b/src/LayeredCraft.Cdk.Constructs/StaticSiteConstruct.cs index 16c3d46..33781d0 100644 --- a/src/LayeredCraft.Cdk.Constructs/StaticSiteConstruct.cs +++ b/src/LayeredCraft.Cdk.Constructs/StaticSiteConstruct.cs @@ -133,12 +133,16 @@ public StaticSiteConstruct(Construct scope, string id, IStaticSiteConstructProps }); } + var distRef = Distribution.FromDistributionAttributes(this, "DistRef", new DistributionAttributes { + DistributionId = distribution.DistributionId, + DomainName = distribution.DomainName + }); // Deploy static assets to S3 bucket and invalidate CloudFront cache _ = new BucketDeployment(this, $"{id}-deployment", new BucketDeploymentProps { Sources = [Source.Asset(props.AssetPath)], DestinationBucket = siteBucket, - Distribution = distribution, + Distribution = distRef, DistributionPaths = ["/*"], MemoryLimit = 1024 }); diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/LayeredCraft.Cdk.Constructs.Tests.csproj b/test/LayeredCraft.Cdk.Constructs.Tests/LayeredCraft.Cdk.Constructs.Tests.csproj index 4292168..3f6b71d 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/LayeredCraft.Cdk.Constructs.Tests.csproj +++ b/test/LayeredCraft.Cdk.Constructs.Tests/LayeredCraft.Cdk.Constructs.Tests.csproj @@ -33,11 +33,11 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive