sst 2.24.27 → 2.25.0
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
|
/**
|
package/constructs/SsrSite.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Construct } from "constructs";
|
|
2
2
|
import { Bucket, BucketProps, IBucket } from "aws-cdk-lib/aws-s3";
|
|
3
|
-
import { FunctionProps } from "aws-cdk-lib/aws-lambda";
|
|
3
|
+
import { FunctionProps as CdkFunctionProps } from "aws-cdk-lib/aws-lambda";
|
|
4
4
|
import { ICachePolicy, IResponseHeadersPolicy, BehaviorOptions, CachePolicy, Function as CfFunction, FunctionEventType as CfFunctionEventType } from "aws-cdk-lib/aws-cloudfront";
|
|
5
5
|
import { Distribution, DistributionDomainProps } from "./Distribution.js";
|
|
6
6
|
import { SSTConstruct } from "./Construct.js";
|
|
7
|
-
import { NodeJSProps } from "./Function.js";
|
|
7
|
+
import { NodeJSProps, FunctionProps } from "./Function.js";
|
|
8
8
|
import { SsrFunction } from "./SsrFunction.js";
|
|
9
9
|
import { EdgeFunction } from "./EdgeFunction.js";
|
|
10
10
|
import { BaseSiteFileOptions, BaseSiteReplaceProps, BaseSiteCdkDistributionProps } from "./BaseSite.js";
|
|
@@ -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
|
-
* @
|
|
194
|
-
*
|
|
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
|
/**
|
|
@@ -199,7 +213,7 @@ export interface SsrSiteProps {
|
|
|
199
213
|
* from the server rendering Lambda.
|
|
200
214
|
*/
|
|
201
215
|
responseHeadersPolicy?: IResponseHeadersPolicy;
|
|
202
|
-
server?: Pick<
|
|
216
|
+
server?: Pick<CdkFunctionProps, "vpc" | "vpcSubnets" | "securityGroups" | "allowAllOutbound" | "allowPublicSubnet" | "architecture" | "logRetention"> & Pick<FunctionProps, "copyFiles">;
|
|
203
217
|
};
|
|
204
218
|
/**
|
|
205
219
|
* Pass in a list of file options to customize cache control and content type specific files.
|
package/constructs/StaticSite.js
CHANGED
|
@@ -310,7 +310,7 @@ interface ImportMeta {
|
|
|
310
310
|
const uploader = new Function(this, "S3Uploader", {
|
|
311
311
|
code: Code.fromAsset(path.join(__dirname, "../support/base-site-custom-resource")),
|
|
312
312
|
layers: [cliLayer],
|
|
313
|
-
runtime: Runtime.
|
|
313
|
+
runtime: Runtime.PYTHON_3_11,
|
|
314
314
|
handler: "s3-upload.handler",
|
|
315
315
|
timeout: Duration.minutes(15),
|
|
316
316
|
memorySize: 1024,
|
|
@@ -321,7 +321,7 @@ interface ImportMeta {
|
|
|
321
321
|
const handler = new Function(this, "S3Handler", {
|
|
322
322
|
code: Code.fromAsset(path.join(__dirname, "../support/base-site-custom-resource")),
|
|
323
323
|
layers: [cliLayer],
|
|
324
|
-
runtime: Runtime.
|
|
324
|
+
runtime: Runtime.PYTHON_3_11,
|
|
325
325
|
handler: "s3-handler.handler",
|
|
326
326
|
timeout: Duration.minutes(15),
|
|
327
327
|
memorySize: 1024,
|
|
@@ -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
|
-
|
|
69
|
-
|
|
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:
|
|
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.
|
|
4
|
+
"version": "2.25.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sst": "cli/sst.js"
|
|
7
7
|
},
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://sst.dev",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aws-cdk/aws-apigatewayv2-alpha": "^2.
|
|
29
|
-
"@aws-cdk/aws-apigatewayv2-authorizers-alpha": "^2.
|
|
30
|
-
"@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.
|
|
31
|
-
"@aws-cdk/cloud-assembly-schema": "2.
|
|
32
|
-
"@aws-cdk/cloudformation-diff": "2.
|
|
33
|
-
"@aws-cdk/cx-api": "2.
|
|
28
|
+
"@aws-cdk/aws-apigatewayv2-alpha": "^2.95.1-alpha.0",
|
|
29
|
+
"@aws-cdk/aws-apigatewayv2-authorizers-alpha": "^2.95.1-alpha.0",
|
|
30
|
+
"@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.95.1-alpha.0",
|
|
31
|
+
"@aws-cdk/cloud-assembly-schema": "2.95.1",
|
|
32
|
+
"@aws-cdk/cloudformation-diff": "2.95.1",
|
|
33
|
+
"@aws-cdk/cx-api": "2.95.1",
|
|
34
34
|
"@aws-crypto/sha256-js": "^5.0.0",
|
|
35
35
|
"@aws-sdk/client-cloudformation": "^3.279.0",
|
|
36
36
|
"@aws-sdk/client-ecs": "^3.279.0",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"@smithy/signature-v4": "^2.0.4",
|
|
56
56
|
"@trpc/server": "9.16.0",
|
|
57
57
|
"adm-zip": "^0.5.10",
|
|
58
|
-
"aws-cdk-lib": "2.
|
|
58
|
+
"aws-cdk-lib": "2.95.1",
|
|
59
59
|
"aws-iot-device-sdk": "^2.2.12",
|
|
60
60
|
"aws-sdk": "^2.1326.0",
|
|
61
61
|
"builtin-modules": "3.2.0",
|
|
62
|
-
"cdk-assets": "2.
|
|
62
|
+
"cdk-assets": "2.95.1",
|
|
63
63
|
"chalk": "^5.2.0",
|
|
64
64
|
"chokidar": "^3.5.3",
|
|
65
65
|
"ci-info": "^3.7.0",
|