sst 2.30.1 → 2.30.2

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.
@@ -5,6 +5,15 @@ import { Size } from "./util/size.js";
5
5
  import { Bucket } from "aws-cdk-lib/aws-s3";
6
6
  import { CachePolicyProps } from "aws-cdk-lib/aws-cloudfront";
7
7
  export interface NextjsSiteProps extends Omit<SsrSiteProps, "nodejs"> {
8
+ /**
9
+ * OpenNext version for building the Next.js site.
10
+ * @default Latest OpenNext version
11
+ * @example
12
+ * ```js
13
+ * openNextVersion: "2.2.4",
14
+ * ```
15
+ */
16
+ openNextVersion?: string;
8
17
  imageOptimization?: {
9
18
  /**
10
19
  * The amount of memory in MB allocated for image optimization function.
@@ -100,7 +109,6 @@ type NextjsSiteNormalizedProps = NextjsSiteProps & SsrSiteNormalizedProps;
100
109
  */
101
110
  export declare class NextjsSite extends SsrSite {
102
111
  props: NextjsSiteNormalizedProps;
103
- private buildId?;
104
112
  constructor(scope: Construct, id: string, props?: NextjsSiteProps);
105
113
  static buildDefaultServerCachePolicyProps(): CachePolicyProps;
106
114
  protected plan(bucket: Bucket): {
@@ -12,6 +12,7 @@ import { toCdkSize } from "./util/size.js";
12
12
  import { PolicyStatement } from "aws-cdk-lib/aws-iam";
13
13
  import { RetentionDays } from "aws-cdk-lib/aws-logs";
14
14
  import { VisibleError } from "../error.js";
15
+ const DEFAULT_OPEN_NEXT_VERSION = "2.2.4";
15
16
  const DEFAULT_CACHE_POLICY_ALLOWED_HEADERS = [
16
17
  "accept",
17
18
  "rsc",
@@ -31,7 +32,6 @@ const DEFAULT_CACHE_POLICY_ALLOWED_HEADERS = [
31
32
  * ```
32
33
  */
33
34
  export class NextjsSite extends SsrSite {
34
- buildId;
35
35
  constructor(scope, id, props) {
36
36
  const { streaming, disableDynamoDBCache, disableIncrementalCache } = {
37
37
  streaming: false,
@@ -41,7 +41,10 @@ export class NextjsSite extends SsrSite {
41
41
  };
42
42
  super(scope, id, {
43
43
  buildCommand: [
44
- "npx --yes open-next@2.2.3 build",
44
+ "npx",
45
+ "--yes",
46
+ `open-next@${props?.openNextVersion ?? DEFAULT_OPEN_NEXT_VERSION}`,
47
+ "build",
45
48
  ...(streaming ? ["--streaming"] : []),
46
49
  ...(disableDynamoDBCache
47
50
  ? ["--dangerously-disable-dynamodb-cache"]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.30.1",
4
+ "version": "2.30.2",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
@@ -119,7 +119,7 @@
119
119
  "@types/ws": "^8.5.3",
120
120
  "@types/yargs": "^17.0.13",
121
121
  "archiver": "^5.3.1",
122
- "astro-sst": "2.30.1",
122
+ "astro-sst": "2.30.2",
123
123
  "tsx": "^3.12.1",
124
124
  "typescript": "^5.2.2",
125
125
  "vitest": "^0.33.0"