@jaypie/constructs 1.2.23 → 1.2.25

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.
@@ -26,12 +26,6 @@ export interface JaypieNextjsProps {
26
26
  * This overrides any domainName configuration.
27
27
  */
28
28
  domainProps?: false;
29
- /**
30
- * DynamoDB tables to grant read/write access to the Next.js server function.
31
- * Each table is granted read/write access and if exactly one table is provided,
32
- * the DYNAMODB_TABLE_NAME environment variable is set to the table name.
33
- */
34
- tables?: dynamodb.ITable[];
35
29
  /**
36
30
  * Environment variables for the Next.js application.
37
31
  *
@@ -56,6 +50,17 @@ export interface JaypieNextjsProps {
56
50
  * (reuses existing secrets within the same scope)
57
51
  */
58
52
  secrets?: SecretsArrayItem[];
53
+ /**
54
+ * Enable response streaming for the Next.js server function.
55
+ * When true, enables Lambda response streaming for faster TTFB.
56
+ */
57
+ streaming?: boolean;
58
+ /**
59
+ * DynamoDB tables to grant read/write access to the Next.js server function.
60
+ * Each table is granted read/write access and if exactly one table is provided,
61
+ * the DYNAMODB_TABLE_NAME environment variable is set to the table name.
62
+ */
63
+ tables?: dynamodb.ITable[];
59
64
  }
60
65
  export declare class JaypieNextJs extends Construct {
61
66
  private readonly _nextjs;
package/dist/esm/index.js CHANGED
@@ -3248,6 +3248,7 @@ class JaypieNextJs extends Construct {
3248
3248
  }),
3249
3249
  },
3250
3250
  }),
3251
+ ...(props?.streaming && { streaming: true }),
3251
3252
  environment: {
3252
3253
  ...jaypieLambdaEnv(),
3253
3254
  ...environment,
@@ -3269,11 +3270,13 @@ class JaypieNextJs extends Construct {
3269
3270
  nextjsImage: {
3270
3271
  functionProps: {
3271
3272
  paramsAndSecrets,
3273
+ timeout: Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER),
3272
3274
  },
3273
3275
  },
3274
3276
  nextjsServer: {
3275
3277
  functionProps: {
3276
3278
  paramsAndSecrets,
3279
+ timeout: Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER),
3277
3280
  },
3278
3281
  },
3279
3282
  },