sst 2.35.0 → 2.35.1

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.
@@ -1,4 +1,5 @@
1
1
  import { SsrSite, SsrSiteNormalizedProps, SsrSiteProps } from "./SsrSite.js";
2
+ import { Construct } from "constructs";
2
3
  export interface RemixSiteProps extends SsrSiteProps {
3
4
  /**
4
5
  * The server function is deployed to Lambda in a single region. Alternatively, you can enable this option to deploy to Lambda@Edge.
@@ -22,6 +23,7 @@ type RemixSiteNormalizedProps = RemixSiteProps & SsrSiteNormalizedProps;
22
23
  */
23
24
  export declare class RemixSite extends SsrSite {
24
25
  props: RemixSiteNormalizedProps;
26
+ constructor(scope: Construct, id: string, props?: RemixSiteProps);
25
27
  protected plan(): {
26
28
  cloudFrontFunctions?: {
27
29
  serverCfFunction: {
@@ -21,6 +21,9 @@ const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
21
21
  * ```
22
22
  */
23
23
  export class RemixSite extends SsrSite {
24
+ constructor(scope, id, props) {
25
+ super(scope, id, props);
26
+ }
24
27
  plan() {
25
28
  const { path: sitePath, edge } = this.props;
26
29
  const { handler, inject } = this.createServerLambdaBundle(edge ? "edge-server.js" : "regional-server.js");
@@ -1,4 +1,5 @@
1
1
  import { SsrSite, SsrSiteNormalizedProps, SsrSiteProps } from "./SsrSite.js";
2
+ import { Construct } from "constructs";
2
3
  export interface SolidStartSiteProps extends SsrSiteProps {
3
4
  /**
4
5
  * The server function is deployed to Lambda in a single region. Alternatively, you can enable this option to deploy to Lambda@Edge.
@@ -20,6 +21,7 @@ type SolidStartSiteNormalizedProps = SolidStartSiteProps & SsrSiteNormalizedProp
20
21
  */
21
22
  export declare class SolidStartSite extends SsrSite {
22
23
  props: SolidStartSiteNormalizedProps;
24
+ constructor(scope: Construct, id: string, props?: SolidStartSiteProps);
23
25
  protected plan(): {
24
26
  cloudFrontFunctions?: {
25
27
  serverCfFunction: {
@@ -13,6 +13,9 @@ import { SsrSite } from "./SsrSite.js";
13
13
  * ```
14
14
  */
15
15
  export class SolidStartSite extends SsrSite {
16
+ constructor(scope, id, props) {
17
+ super(scope, id, props);
18
+ }
16
19
  plan() {
17
20
  const { path: sitePath, edge } = this.props;
18
21
  const serverConfig = {
@@ -2,6 +2,7 @@ import { Construct } from "constructs";
2
2
  import { Bucket, BucketProps, IBucket } from "aws-cdk-lib/aws-s3";
3
3
  import { Function as CdkFunction, FunctionProps as CdkFunctionProps } from "aws-cdk-lib/aws-lambda";
4
4
  import { ICachePolicy, IResponseHeadersPolicy, ViewerProtocolPolicy, AllowedMethods, CachePolicyProps, ErrorResponse } from "aws-cdk-lib/aws-cloudfront";
5
+ import { S3OriginProps } from "aws-cdk-lib/aws-cloudfront-origins";
5
6
  import { Schedule } from "aws-cdk-lib/aws-events";
6
7
  import { DistributionDomainProps } from "./Distribution.js";
7
8
  import { SSTConstruct } from "./Construct.js";
@@ -329,6 +330,20 @@ export interface SsrSiteProps {
329
330
  * create the CDK `Distribution` internally.
330
331
  */
331
332
  distribution?: SsrCdkDistributionProps;
333
+ /**
334
+ * Override the CloudFront S3 origin properties.
335
+ * @example
336
+ * ```js
337
+ * import { OriginAccessIdenty } from "aws-cdk-lib/aws-cloudfront";
338
+ *
339
+ * cdk: {
340
+ * s3Origin: {
341
+ * originAccessIdentity: OriginAccessIdentity.fromOriginAccessIdentityId(stack, "OriginAccessIdentity", "XXXXXXXX" ),
342
+ * },
343
+ * }
344
+ * ```
345
+ */
346
+ s3Origin?: S3OriginProps;
332
347
  /**
333
348
  * Override the CloudFront cache policy properties for responses from the
334
349
  * server rendering Lambda.
@@ -341,12 +356,12 @@ export interface SsrSiteProps {
341
356
  *
342
357
  * ```js
343
358
  * serverCachePolicy: new CachePolicy(this, "ServerCache", {
344
- * queryStringBehavior: CacheQueryStringBehavior.all()
345
- * headerBehavior: CacheHeaderBehavior.none()
346
- * cookieBehavior: CacheCookieBehavior.none()
347
- * defaultTtl: Duration.days(0)
348
- * maxTtl: Duration.days(365)
349
- * minTtl: Duration.days(0)
359
+ * queryStringBehavior: CacheQueryStringBehavior.all(),
360
+ * headerBehavior: CacheHeaderBehavior.none(),
361
+ * cookieBehavior: CacheCookieBehavior.none(),
362
+ * defaultTtl: Duration.days(0),
363
+ * maxTtl: Duration.days(365),
364
+ * minTtl: Duration.days(0),
350
365
  * })
351
366
  * ```
352
367
  */
@@ -414,6 +414,7 @@ function handler(event) {
414
414
  function createS3Origin(props) {
415
415
  const s3Origin = new S3Origin(bucket, {
416
416
  originPath: "/" + (props.originPath ?? ""),
417
+ ...(cdk?.s3Origin ?? {}),
417
418
  });
418
419
  const assets = createS3OriginAssets(props.copy);
419
420
  const s3deployCR = createS3OriginDeployment(props.copy, assets);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.35.0",
4
+ "version": "2.35.1",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
@@ -120,7 +120,7 @@
120
120
  "@types/ws": "^8.5.3",
121
121
  "@types/yargs": "^17.0.13",
122
122
  "archiver": "^5.3.1",
123
- "astro-sst": "2.35.0",
123
+ "astro-sst": "2.35.1",
124
124
  "async": "^3.2.4",
125
125
  "tsx": "^3.12.1",
126
126
  "typescript": "^5.2.2",