sst 2.24.27 → 2.24.28

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.
@@ -25,6 +25,34 @@ export interface NextjsSiteProps extends Omit<SsrSiteProps, "nodejs"> {
25
25
  warm?: number;
26
26
  cdk?: SsrSiteProps["cdk"] & {
27
27
  revalidation?: Pick<FunctionProps, "vpc" | "vpcSubnets">;
28
+ /**
29
+ * Override the CloudFront cache policy properties for responses from the
30
+ * server rendering Lambda.
31
+ *
32
+ * @default
33
+ * By default, the cache policy is configured to cache all responses from
34
+ * the server rendering Lambda based on the query-key only. If you're using
35
+ * cookie or header based authentication, you'll need to override the
36
+ * cache policy to cache based on those values as well.
37
+ *
38
+ * ```js
39
+ * serverCachePolicy: new CachePolicy(this, "ServerCache", {
40
+ * queryStringBehavior: CacheQueryStringBehavior.all()
41
+ * headerBehavior: CacheHeaderBehavior.allowList(
42
+ * "accept",
43
+ * "rsc",
44
+ * "next-router-prefetch",
45
+ * "next-router-state-tree",
46
+ * "next-url",
47
+ * ),
48
+ * cookieBehavior: CacheCookieBehavior.none()
49
+ * defaultTtl: Duration.days(0)
50
+ * maxTtl: Duration.days(365)
51
+ * minTtl: Duration.days(0)
52
+ * })
53
+ * ```
54
+ */
55
+ serverCachePolicy?: NonNullable<SsrSiteProps["cdk"]>["serverCachePolicy"];
28
56
  };
29
57
  }
30
58
  /**
@@ -190,8 +190,22 @@ export interface SsrSiteProps {
190
190
  * Override the CloudFront cache policy properties for responses from the
191
191
  * server rendering Lambda.
192
192
  *
193
- * @note The default cache policy that is used in the abscene of this property
194
- * is one that performs no caching of the server response.
193
+ * @default
194
+ * By default, the cache policy is configured to cache all responses from
195
+ * the server rendering Lambda based on the query-key only. If you're using
196
+ * cookie or header based authentication, you'll need to override the
197
+ * cache policy to cache based on those values as well.
198
+ *
199
+ * ```js
200
+ * serverCachePolicy: new CachePolicy(this, "ServerCache", {
201
+ * queryStringBehavior: CacheQueryStringBehavior.all()
202
+ * headerBehavior: CacheHeaderBehavior.none()
203
+ * cookieBehavior: CacheCookieBehavior.none()
204
+ * defaultTtl: Duration.days(0)
205
+ * maxTtl: Duration.days(365)
206
+ * minTtl: Duration.days(0)
207
+ * })
208
+ * ```
195
209
  */
196
210
  serverCachePolicy?: ICachePolicy;
197
211
  /**
@@ -2,6 +2,7 @@ import { Construct } from "constructs";
2
2
  import { Api, ApiProps } from "../Api.js";
3
3
  import { FunctionDefinition } from "../Function.js";
4
4
  import { SSTConstruct } from "../Construct.js";
5
+ import { Secret } from "../Secret.js";
5
6
  import { FunctionBindingProps } from "../util/functionBinding.js";
6
7
  export interface AuthProps {
7
8
  /**
@@ -65,8 +66,8 @@ export declare class Auth extends Construct implements SSTConstruct {
65
66
  readonly id: string;
66
67
  private readonly authenticator;
67
68
  private api;
68
- private publicKey;
69
- private privateKey;
69
+ publicKey: Secret;
70
+ privateKey: Secret;
70
71
  constructor(scope: Construct, id: string, props: AuthProps);
71
72
  get url(): string;
72
73
  /** @internal */
@@ -66,12 +66,6 @@ export declare function createSessionBuilder<SessionTypes extends Record<string,
66
66
  type: "public";
67
67
  properties: {};
68
68
  };
69
- $type: { [type in keyof SessionTypes]: {
70
- type: type;
71
- properties: SessionTypes[type];
72
- }; }[keyof SessionTypes] | {
73
- type: "public";
74
- properties: {};
75
- };
69
+ $type: SessionTypes;
76
70
  };
77
71
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.24.27",
4
+ "version": "2.24.28",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },