sst 2.39.7 → 2.39.8
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/constructs/AstroSite.d.ts +3 -1
- package/constructs/NextjsSite.d.ts +3 -1
- package/constructs/NextjsSite.js +3 -1
- package/constructs/RemixSite.d.ts +3 -1
- package/constructs/SolidStartSite.d.ts +3 -1
- package/constructs/SsrSite.d.ts +7 -2
- package/constructs/SsrSite.js +5 -1
- package/constructs/SvelteKitSite.d.ts +3 -1
- package/package.json +2 -2
|
@@ -60,7 +60,9 @@ export declare class AstroSite extends SsrSite {
|
|
|
60
60
|
edgeFunction?: string | undefined;
|
|
61
61
|
}[];
|
|
62
62
|
errorResponses?: import("aws-cdk-lib/aws-cloudfront").ErrorResponse[] | undefined;
|
|
63
|
-
|
|
63
|
+
serverCachePolicy?: {
|
|
64
|
+
allowedHeaders?: string[] | undefined;
|
|
65
|
+
} | undefined;
|
|
64
66
|
buildId?: string | undefined;
|
|
65
67
|
warmerConfig?: {
|
|
66
68
|
function: string;
|
|
@@ -217,7 +217,9 @@ export declare class NextjsSite extends SsrSite {
|
|
|
217
217
|
edgeFunction?: "edgeServer" | undefined;
|
|
218
218
|
}[];
|
|
219
219
|
errorResponses?: import("aws-cdk-lib/aws-cloudfront").ErrorResponse[] | undefined;
|
|
220
|
-
|
|
220
|
+
serverCachePolicy?: {
|
|
221
|
+
allowedHeaders?: string[] | undefined;
|
|
222
|
+
} | undefined;
|
|
221
223
|
buildId?: string | undefined;
|
|
222
224
|
warmerConfig?: {
|
|
223
225
|
function: string;
|
package/constructs/NextjsSite.js
CHANGED
|
@@ -233,7 +233,9 @@ export class NextjsSite extends SsrSite {
|
|
|
233
233
|
origin: "s3",
|
|
234
234
|
})),
|
|
235
235
|
],
|
|
236
|
-
|
|
236
|
+
serverCachePolicy: {
|
|
237
|
+
allowedHeaders: DEFAULT_CACHE_POLICY_ALLOWED_HEADERS,
|
|
238
|
+
},
|
|
237
239
|
buildId: this.getBuildId(),
|
|
238
240
|
warmerConfig: {
|
|
239
241
|
function: path.join(sitePath, ".open-next", "warmer-function"),
|
|
@@ -86,7 +86,9 @@ export declare class RemixSite extends SsrSite {
|
|
|
86
86
|
edgeFunction?: "edgeServer" | undefined;
|
|
87
87
|
}[];
|
|
88
88
|
errorResponses?: import("aws-cdk-lib/aws-cloudfront").ErrorResponse[] | undefined;
|
|
89
|
-
|
|
89
|
+
serverCachePolicy?: {
|
|
90
|
+
allowedHeaders?: string[] | undefined;
|
|
91
|
+
} | undefined;
|
|
90
92
|
buildId?: string | undefined;
|
|
91
93
|
warmerConfig?: {
|
|
92
94
|
function: string;
|
|
@@ -68,7 +68,9 @@ export declare class SolidStartSite extends SsrSite {
|
|
|
68
68
|
edgeFunction?: "edgeServer" | undefined;
|
|
69
69
|
}[];
|
|
70
70
|
errorResponses?: import("aws-cdk-lib/aws-cloudfront").ErrorResponse[] | undefined;
|
|
71
|
-
|
|
71
|
+
serverCachePolicy?: {
|
|
72
|
+
allowedHeaders?: string[] | undefined;
|
|
73
|
+
} | undefined;
|
|
72
74
|
buildId?: string | undefined;
|
|
73
75
|
warmerConfig?: {
|
|
74
76
|
function: string;
|
package/constructs/SsrSite.d.ts
CHANGED
|
@@ -391,6 +391,7 @@ export interface SsrSiteProps {
|
|
|
391
391
|
*/
|
|
392
392
|
viewerProtocolPolicy?: ViewerProtocolPolicy;
|
|
393
393
|
server?: Pick<CdkFunctionProps, "layers" | "vpc" | "vpcSubnets" | "securityGroups" | "allowAllOutbound" | "allowPublicSubnet" | "architecture" | "logRetention"> & Pick<FunctionProps, "copyFiles">;
|
|
394
|
+
transform?: (args: Plan) => void;
|
|
394
395
|
};
|
|
395
396
|
}
|
|
396
397
|
type SsrSiteInvalidationNormalizedProps = Exclude<SsrSiteProps["invalidation"], undefined>;
|
|
@@ -488,7 +489,9 @@ export declare abstract class SsrSite extends Construct implements SSTConstruct
|
|
|
488
489
|
edgeFunction?: keyof EdgeFunctions;
|
|
489
490
|
}[];
|
|
490
491
|
errorResponses?: ErrorResponse[];
|
|
491
|
-
|
|
492
|
+
serverCachePolicy?: {
|
|
493
|
+
allowedHeaders?: string[];
|
|
494
|
+
};
|
|
492
495
|
buildId?: string;
|
|
493
496
|
warmerConfig?: {
|
|
494
497
|
function: string;
|
|
@@ -508,7 +511,9 @@ export declare abstract class SsrSite extends Construct implements SSTConstruct
|
|
|
508
511
|
edgeFunction?: keyof EdgeFunctions;
|
|
509
512
|
}[];
|
|
510
513
|
errorResponses?: ErrorResponse[] | undefined;
|
|
511
|
-
|
|
514
|
+
serverCachePolicy?: {
|
|
515
|
+
allowedHeaders?: string[] | undefined;
|
|
516
|
+
} | undefined;
|
|
512
517
|
buildId?: string | undefined;
|
|
513
518
|
warmerConfig?: {
|
|
514
519
|
function: string;
|
package/constructs/SsrSite.js
CHANGED
|
@@ -95,6 +95,7 @@ export class SsrSite extends Construct {
|
|
|
95
95
|
// Build app
|
|
96
96
|
buildApp();
|
|
97
97
|
const plan = this.plan(bucket);
|
|
98
|
+
transformPlan();
|
|
98
99
|
validateTimeout();
|
|
99
100
|
// Create CloudFront
|
|
100
101
|
const cfFunctions = createCloudFrontFunctions();
|
|
@@ -186,6 +187,9 @@ export class SsrSite extends Construct {
|
|
|
186
187
|
...cdk?.bucket,
|
|
187
188
|
});
|
|
188
189
|
}
|
|
190
|
+
function transformPlan() {
|
|
191
|
+
cdk?.transform?.(plan);
|
|
192
|
+
}
|
|
189
193
|
function createServerFunctionForDev() {
|
|
190
194
|
const role = new Role(self, "ServerFunctionRole", {
|
|
191
195
|
assumedBy: new CompositePrincipal(new AccountPrincipal(app.account), new ServicePrincipal("lambda.amazonaws.com")),
|
|
@@ -632,7 +636,7 @@ function handler(event) {
|
|
|
632
636
|
return singletonUrlSigner;
|
|
633
637
|
}
|
|
634
638
|
function useServerBehaviorCachePolicy() {
|
|
635
|
-
const allowedHeaders = plan.
|
|
639
|
+
const allowedHeaders = plan.serverCachePolicy?.allowedHeaders ?? [];
|
|
636
640
|
singletonCachePolicy =
|
|
637
641
|
singletonCachePolicy ??
|
|
638
642
|
new CachePolicy(self, "ServerCache", SsrSite.buildDefaultServerCachePolicyProps(allowedHeaders));
|
|
@@ -99,7 +99,9 @@ export declare class SvelteKitSite extends SsrSite {
|
|
|
99
99
|
edgeFunction?: "edgeServer" | undefined;
|
|
100
100
|
}[];
|
|
101
101
|
errorResponses?: import("aws-cdk-lib/aws-cloudfront").ErrorResponse[] | undefined;
|
|
102
|
-
|
|
102
|
+
serverCachePolicy?: {
|
|
103
|
+
allowedHeaders?: string[] | undefined;
|
|
104
|
+
} | undefined;
|
|
103
105
|
buildId?: string | undefined;
|
|
104
106
|
warmerConfig?: {
|
|
105
107
|
function: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sideEffects": false,
|
|
3
3
|
"name": "sst",
|
|
4
|
-
"version": "2.39.
|
|
4
|
+
"version": "2.39.8",
|
|
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.39.
|
|
123
|
+
"astro-sst": "2.39.8",
|
|
124
124
|
"async": "^3.2.4",
|
|
125
125
|
"tsx": "^3.12.1",
|
|
126
126
|
"typescript": "^5.2.2",
|