sst 2.35.1 → 2.36.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.
@@ -21,10 +21,10 @@ export interface NextjsSiteProps extends Omit<SsrSiteProps, "nodejs"> {
21
21
  * How the logs are stored in CloudWatch
22
22
  * - "combined" - Logs from all routes are stored in the same log group.
23
23
  * - "per-route" - Logs from each route are stored in a separate log group.
24
- * @default "combined"
24
+ * @default "per-route"
25
25
  * @example
26
26
  * ```js
27
- * logging: "per-route",
27
+ * logging: "combined",
28
28
  * ```
29
29
  */
30
30
  logging?: "combined" | "per-route";
@@ -134,7 +134,7 @@ export declare class NextjsSite extends SsrSite {
134
134
  private appPathsManifest?;
135
135
  private pagesManifest?;
136
136
  private prerenderManifest?;
137
- constructor(scope: Construct, id: string, props?: NextjsSiteProps);
137
+ constructor(scope: Construct, id: string, rawProps?: NextjsSiteProps);
138
138
  static buildDefaultServerCachePolicyProps(): CachePolicyProps;
139
139
  protected plan(bucket: Bucket): {
140
140
  cloudFrontFunctions?: {
@@ -205,10 +205,10 @@ export declare class NextjsSite extends SsrSite {
205
205
  * How the logs are stored in CloudWatch
206
206
  * - "combined" - Logs from all routes are stored in the same log group.
207
207
  * - "per-route" - Logs from each route are stored in a separate log group.
208
- * @default "combined"
208
+ * @default "per-route"
209
209
  * @example
210
210
  * ```js
211
- * logging: "per-route",
211
+ * logging: "combined",
212
212
  * ```
213
213
  */
214
214
  environment?: Record<string, string> | undefined;
@@ -312,10 +312,10 @@ export declare class NextjsSite extends SsrSite {
312
312
  * How the logs are stored in CloudWatch
313
313
  * - "combined" - Logs from all routes are stored in the same log group.
314
314
  * - "per-route" - Logs from each route are stored in a separate log group.
315
- * @default "combined"
315
+ * @default "per-route"
316
316
  * @example
317
317
  * ```js
318
- * logging: "per-route",
318
+ * logging: "combined",
319
319
  * ```
320
320
  */
321
321
  environment?: Record<string, string> | undefined;
@@ -20,7 +20,7 @@ import { useFunctions } from "./Function.js";
20
20
  import { useDeferredTasks } from "./deferred_task.js";
21
21
  import { Logger } from "../logger.js";
22
22
  const LAYER_VERSION = "2";
23
- const DEFAULT_OPEN_NEXT_VERSION = "2.3.0";
23
+ const DEFAULT_OPEN_NEXT_VERSION = "2.3.1";
24
24
  const DEFAULT_CACHE_POLICY_ALLOWED_HEADERS = [
25
25
  "accept",
26
26
  "rsc",
@@ -46,21 +46,28 @@ export class NextjsSite extends SsrSite {
46
46
  appPathsManifest;
47
47
  pagesManifest;
48
48
  prerenderManifest;
49
- constructor(scope, id, props) {
50
- const streaming = props?.experimental?.streaming ?? false;
51
- const disableDynamoDBCache = props?.experimental?.disableDynamoDBCache ?? false;
52
- const disableIncrementalCache = props?.experimental?.disableIncrementalCache ?? false;
49
+ constructor(scope, id, rawProps) {
50
+ const props = {
51
+ logging: rawProps?.logging ?? "per-route",
52
+ experimental: {
53
+ streaming: rawProps?.experimental?.streaming ?? false,
54
+ disableDynamoDBCache: rawProps?.experimental?.disableDynamoDBCache ?? false,
55
+ disableIncrementalCache: rawProps?.experimental?.disableIncrementalCache ?? false,
56
+ ...rawProps?.experimental,
57
+ },
58
+ ...rawProps,
59
+ };
53
60
  super(scope, id, {
54
61
  buildCommand: [
55
62
  "npx",
56
63
  "--yes",
57
64
  `open-next@${props?.openNextVersion ?? DEFAULT_OPEN_NEXT_VERSION}`,
58
65
  "build",
59
- ...(streaming ? ["--streaming"] : []),
60
- ...(disableDynamoDBCache
66
+ ...(props.experimental.streaming ? ["--streaming"] : []),
67
+ ...(props.experimental.disableDynamoDBCache
61
68
  ? ["--dangerously-disable-dynamodb-cache"]
62
69
  : []),
63
- ...(disableIncrementalCache
70
+ ...(props.experimental.disableIncrementalCache
64
71
  ? ["--dangerously-disable-incremental-cache"]
65
72
  : []),
66
73
  ].join(" "),
@@ -70,9 +77,9 @@ export class NextjsSite extends SsrSite {
70
77
  this.disableDefaultLogging();
71
78
  this.uploadSourcemaps();
72
79
  }
73
- if (!disableIncrementalCache) {
80
+ if (!props.experimental.disableIncrementalCache) {
74
81
  this.createRevalidationQueue();
75
- if (!disableDynamoDBCache) {
82
+ if (!props.experimental.disableDynamoDBCache) {
76
83
  this.createRevalidationTable();
77
84
  }
78
85
  }
@@ -564,8 +571,6 @@ export class NextjsSite extends SsrSite {
564
571
  this.props.logging === "per-route");
565
572
  }
566
573
  disableDefaultLogging() {
567
- // Note: keep default logs enabled
568
- return;
569
574
  const stack = Stack.of(this);
570
575
  const server = this.serverFunction;
571
576
  const policy = new Policy(this, "DisableLoggingPolicy", {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.35.1",
4
+ "version": "2.36.0",
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.1",
123
+ "astro-sst": "2.36.0",
124
124
  "async": "^3.2.4",
125
125
  "tsx": "^3.12.1",
126
126
  "typescript": "^5.2.2",