@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;
@@ -3282,6 +3282,7 @@ class JaypieNextJs extends constructs.Construct {
3282
3282
  }),
3283
3283
  },
3284
3284
  }),
3285
+ ...(props?.streaming && { streaming: true }),
3285
3286
  environment: {
3286
3287
  ...jaypieLambdaEnv(),
3287
3288
  ...environment,
@@ -3303,11 +3304,13 @@ class JaypieNextJs extends constructs.Construct {
3303
3304
  nextjsImage: {
3304
3305
  functionProps: {
3305
3306
  paramsAndSecrets,
3307
+ timeout: cdk.Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER),
3306
3308
  },
3307
3309
  },
3308
3310
  nextjsServer: {
3309
3311
  functionProps: {
3310
3312
  paramsAndSecrets,
3313
+ timeout: cdk.Duration.seconds(CDK$2.DURATION.LAMBDA_WORKER),
3311
3314
  },
3312
3315
  },
3313
3316
  },