cdk-nextjs 0.0.2 → 0.0.4
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/.jsii +81 -58
- package/API.md +45 -31
- package/assets/lambdas/assets-deployment/assets-deployment.lambda/index.js +10 -8
- package/assets/lambdas/sign-fn-url/sign-fn-url.lambda/index.js +12 -4
- package/lib/generated-structs/{OptionalS3OriginProps.d.ts → OptionalS3OriginBucketWithOACProps.d.ts} +11 -5
- package/lib/generated-structs/{OptionalS3OriginProps.js → OptionalS3OriginBucketWithOACProps.js} +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lambdas/assets-deployment/assets-deployment.lambda.js +9 -8
- package/lib/lambdas/assets-deployment/fs-to-s3.js +2 -2
- package/lib/nextjs-assets-deployment.js +1 -1
- package/lib/nextjs-build/cache-handler.cjs +315 -306
- package/lib/nextjs-build/nextjs-build.js +1 -1
- package/lib/nextjs-compute/nextjs-containers.js +1 -1
- package/lib/nextjs-compute/nextjs-functions.js +1 -1
- package/lib/nextjs-distribution.d.ts +2 -15
- package/lib/nextjs-distribution.js +37 -72
- package/lib/nextjs-file-system.js +1 -1
- package/lib/nextjs-invalidation.js +1 -1
- package/lib/nextjs-revalidation.js +1 -1
- package/lib/nextjs-static-assets.js +1 -1
- package/lib/nextjs-vpc.js +1 -1
- package/lib/root-constructs/nextjs-global-containers.js +1 -1
- package/lib/root-constructs/nextjs-global-functions.js +1 -1
- package/lib/root-constructs/nextjs-regional-containers.js +1 -1
- package/package.json +8 -8
package/.jsii
CHANGED
|
@@ -3860,7 +3860,7 @@
|
|
|
3860
3860
|
"stability": "stable"
|
|
3861
3861
|
},
|
|
3862
3862
|
"homepage": "https://github.com/cdklabs/cdk-nextjs.git",
|
|
3863
|
-
"jsiiVersion": "5.5.
|
|
3863
|
+
"jsiiVersion": "5.5.9 (build 9ca058c)",
|
|
3864
3864
|
"keywords": [
|
|
3865
3865
|
"aws",
|
|
3866
3866
|
"aws-cdk",
|
|
@@ -5322,7 +5322,7 @@
|
|
|
5322
5322
|
},
|
|
5323
5323
|
"locationInModule": {
|
|
5324
5324
|
"filename": "src/nextjs-distribution.ts",
|
|
5325
|
-
"line":
|
|
5325
|
+
"line": 131
|
|
5326
5326
|
},
|
|
5327
5327
|
"parameters": [
|
|
5328
5328
|
{
|
|
@@ -5348,7 +5348,7 @@
|
|
|
5348
5348
|
"kind": "class",
|
|
5349
5349
|
"locationInModule": {
|
|
5350
5350
|
"filename": "src/nextjs-distribution.ts",
|
|
5351
|
-
"line":
|
|
5351
|
+
"line": 94
|
|
5352
5352
|
},
|
|
5353
5353
|
"name": "NextjsDistribution",
|
|
5354
5354
|
"properties": [
|
|
@@ -5358,7 +5358,7 @@
|
|
|
5358
5358
|
},
|
|
5359
5359
|
"locationInModule": {
|
|
5360
5360
|
"filename": "src/nextjs-distribution.ts",
|
|
5361
|
-
"line":
|
|
5361
|
+
"line": 95
|
|
5362
5362
|
},
|
|
5363
5363
|
"name": "distribution",
|
|
5364
5364
|
"type": {
|
|
@@ -5378,7 +5378,7 @@
|
|
|
5378
5378
|
"kind": "interface",
|
|
5379
5379
|
"locationInModule": {
|
|
5380
5380
|
"filename": "src/nextjs-distribution.ts",
|
|
5381
|
-
"line":
|
|
5381
|
+
"line": 47
|
|
5382
5382
|
},
|
|
5383
5383
|
"name": "NextjsDistributionOverrides",
|
|
5384
5384
|
"properties": [
|
|
@@ -5390,7 +5390,7 @@
|
|
|
5390
5390
|
"immutable": true,
|
|
5391
5391
|
"locationInModule": {
|
|
5392
5392
|
"filename": "src/nextjs-distribution.ts",
|
|
5393
|
-
"line":
|
|
5393
|
+
"line": 49
|
|
5394
5394
|
},
|
|
5395
5395
|
"name": "distributionProps",
|
|
5396
5396
|
"optional": true,
|
|
@@ -5406,7 +5406,7 @@
|
|
|
5406
5406
|
"immutable": true,
|
|
5407
5407
|
"locationInModule": {
|
|
5408
5408
|
"filename": "src/nextjs-distribution.ts",
|
|
5409
|
-
"line":
|
|
5409
|
+
"line": 53
|
|
5410
5410
|
},
|
|
5411
5411
|
"name": "dynamicBehaviorOptions",
|
|
5412
5412
|
"optional": true,
|
|
@@ -5422,7 +5422,7 @@
|
|
|
5422
5422
|
"immutable": true,
|
|
5423
5423
|
"locationInModule": {
|
|
5424
5424
|
"filename": "src/nextjs-distribution.ts",
|
|
5425
|
-
"line":
|
|
5425
|
+
"line": 54
|
|
5426
5426
|
},
|
|
5427
5427
|
"name": "dynamicCachePolicyProps",
|
|
5428
5428
|
"optional": true,
|
|
@@ -5438,7 +5438,7 @@
|
|
|
5438
5438
|
"immutable": true,
|
|
5439
5439
|
"locationInModule": {
|
|
5440
5440
|
"filename": "src/nextjs-distribution.ts",
|
|
5441
|
-
"line":
|
|
5441
|
+
"line": 56
|
|
5442
5442
|
},
|
|
5443
5443
|
"name": "dynamicHttpOriginProps",
|
|
5444
5444
|
"optional": true,
|
|
@@ -5454,7 +5454,7 @@
|
|
|
5454
5454
|
"immutable": true,
|
|
5455
5455
|
"locationInModule": {
|
|
5456
5456
|
"filename": "src/nextjs-distribution.ts",
|
|
5457
|
-
"line":
|
|
5457
|
+
"line": 55
|
|
5458
5458
|
},
|
|
5459
5459
|
"name": "dynamicResponseHeadersPolicyProps",
|
|
5460
5460
|
"optional": true,
|
|
@@ -5470,7 +5470,7 @@
|
|
|
5470
5470
|
"immutable": true,
|
|
5471
5471
|
"locationInModule": {
|
|
5472
5472
|
"filename": "src/nextjs-distribution.ts",
|
|
5473
|
-
"line":
|
|
5473
|
+
"line": 48
|
|
5474
5474
|
},
|
|
5475
5475
|
"name": "edgeFunctionProps",
|
|
5476
5476
|
"optional": true,
|
|
@@ -5486,7 +5486,7 @@
|
|
|
5486
5486
|
"immutable": true,
|
|
5487
5487
|
"locationInModule": {
|
|
5488
5488
|
"filename": "src/nextjs-distribution.ts",
|
|
5489
|
-
"line":
|
|
5489
|
+
"line": 50
|
|
5490
5490
|
},
|
|
5491
5491
|
"name": "imageBehaviorOptions",
|
|
5492
5492
|
"optional": true,
|
|
@@ -5502,7 +5502,7 @@
|
|
|
5502
5502
|
"immutable": true,
|
|
5503
5503
|
"locationInModule": {
|
|
5504
5504
|
"filename": "src/nextjs-distribution.ts",
|
|
5505
|
-
"line":
|
|
5505
|
+
"line": 51
|
|
5506
5506
|
},
|
|
5507
5507
|
"name": "imageCachePolicyProps",
|
|
5508
5508
|
"optional": true,
|
|
@@ -5518,7 +5518,7 @@
|
|
|
5518
5518
|
"immutable": true,
|
|
5519
5519
|
"locationInModule": {
|
|
5520
5520
|
"filename": "src/nextjs-distribution.ts",
|
|
5521
|
-
"line":
|
|
5521
|
+
"line": 52
|
|
5522
5522
|
},
|
|
5523
5523
|
"name": "imageResponseHeadersPolicyProps",
|
|
5524
5524
|
"optional": true,
|
|
@@ -5534,12 +5534,12 @@
|
|
|
5534
5534
|
"immutable": true,
|
|
5535
5535
|
"locationInModule": {
|
|
5536
5536
|
"filename": "src/nextjs-distribution.ts",
|
|
5537
|
-
"line":
|
|
5537
|
+
"line": 59
|
|
5538
5538
|
},
|
|
5539
|
-
"name": "
|
|
5539
|
+
"name": "s3BucketOriginProps",
|
|
5540
5540
|
"optional": true,
|
|
5541
5541
|
"type": {
|
|
5542
|
-
"fqn": "cdk-nextjs.
|
|
5542
|
+
"fqn": "cdk-nextjs.OptionalS3OriginBucketWithOACProps"
|
|
5543
5543
|
}
|
|
5544
5544
|
},
|
|
5545
5545
|
{
|
|
@@ -5550,7 +5550,7 @@
|
|
|
5550
5550
|
"immutable": true,
|
|
5551
5551
|
"locationInModule": {
|
|
5552
5552
|
"filename": "src/nextjs-distribution.ts",
|
|
5553
|
-
"line":
|
|
5553
|
+
"line": 57
|
|
5554
5554
|
},
|
|
5555
5555
|
"name": "staticBehaviorOptions",
|
|
5556
5556
|
"optional": true,
|
|
@@ -5566,7 +5566,7 @@
|
|
|
5566
5566
|
"immutable": true,
|
|
5567
5567
|
"locationInModule": {
|
|
5568
5568
|
"filename": "src/nextjs-distribution.ts",
|
|
5569
|
-
"line":
|
|
5569
|
+
"line": 58
|
|
5570
5570
|
},
|
|
5571
5571
|
"name": "staticResponseHeadersPolicyProps",
|
|
5572
5572
|
"optional": true,
|
|
@@ -5587,7 +5587,7 @@
|
|
|
5587
5587
|
"kind": "interface",
|
|
5588
5588
|
"locationInModule": {
|
|
5589
5589
|
"filename": "src/nextjs-distribution.ts",
|
|
5590
|
-
"line":
|
|
5590
|
+
"line": 62
|
|
5591
5591
|
},
|
|
5592
5592
|
"name": "NextjsDistributionProps",
|
|
5593
5593
|
"properties": [
|
|
@@ -5601,7 +5601,7 @@
|
|
|
5601
5601
|
"immutable": true,
|
|
5602
5602
|
"locationInModule": {
|
|
5603
5603
|
"filename": "src/nextjs-distribution.ts",
|
|
5604
|
-
"line":
|
|
5604
|
+
"line": 67
|
|
5605
5605
|
},
|
|
5606
5606
|
"name": "assetsBucket",
|
|
5607
5607
|
"type": {
|
|
@@ -5617,7 +5617,7 @@
|
|
|
5617
5617
|
"immutable": true,
|
|
5618
5618
|
"locationInModule": {
|
|
5619
5619
|
"filename": "src/nextjs-distribution.ts",
|
|
5620
|
-
"line":
|
|
5620
|
+
"line": 77
|
|
5621
5621
|
},
|
|
5622
5622
|
"name": "dynamicUrl",
|
|
5623
5623
|
"type": {
|
|
@@ -5632,7 +5632,7 @@
|
|
|
5632
5632
|
"immutable": true,
|
|
5633
5633
|
"locationInModule": {
|
|
5634
5634
|
"filename": "src/nextjs-distribution.ts",
|
|
5635
|
-
"line":
|
|
5635
|
+
"line": 82
|
|
5636
5636
|
},
|
|
5637
5637
|
"name": "nextjsType",
|
|
5638
5638
|
"type": {
|
|
@@ -5648,7 +5648,7 @@
|
|
|
5648
5648
|
"immutable": true,
|
|
5649
5649
|
"locationInModule": {
|
|
5650
5650
|
"filename": "src/nextjs-distribution.ts",
|
|
5651
|
-
"line":
|
|
5651
|
+
"line": 91
|
|
5652
5652
|
},
|
|
5653
5653
|
"name": "publicDirEntries",
|
|
5654
5654
|
"type": {
|
|
@@ -5668,7 +5668,7 @@
|
|
|
5668
5668
|
"immutable": true,
|
|
5669
5669
|
"locationInModule": {
|
|
5670
5670
|
"filename": "src/nextjs-distribution.ts",
|
|
5671
|
-
"line":
|
|
5671
|
+
"line": 68
|
|
5672
5672
|
},
|
|
5673
5673
|
"name": "basePath",
|
|
5674
5674
|
"optional": true,
|
|
@@ -5685,7 +5685,7 @@
|
|
|
5685
5685
|
"immutable": true,
|
|
5686
5686
|
"locationInModule": {
|
|
5687
5687
|
"filename": "src/nextjs-distribution.ts",
|
|
5688
|
-
"line":
|
|
5688
|
+
"line": 72
|
|
5689
5689
|
},
|
|
5690
5690
|
"name": "certificate",
|
|
5691
5691
|
"optional": true,
|
|
@@ -5701,7 +5701,7 @@
|
|
|
5701
5701
|
"immutable": true,
|
|
5702
5702
|
"locationInModule": {
|
|
5703
5703
|
"filename": "src/nextjs-distribution.ts",
|
|
5704
|
-
"line":
|
|
5704
|
+
"line": 73
|
|
5705
5705
|
},
|
|
5706
5706
|
"name": "distribution",
|
|
5707
5707
|
"optional": true,
|
|
@@ -5718,7 +5718,7 @@
|
|
|
5718
5718
|
"immutable": true,
|
|
5719
5719
|
"locationInModule": {
|
|
5720
5720
|
"filename": "src/nextjs-distribution.ts",
|
|
5721
|
-
"line":
|
|
5721
|
+
"line": 81
|
|
5722
5722
|
},
|
|
5723
5723
|
"name": "functionArn",
|
|
5724
5724
|
"optional": true,
|
|
@@ -5735,7 +5735,7 @@
|
|
|
5735
5735
|
"immutable": true,
|
|
5736
5736
|
"locationInModule": {
|
|
5737
5737
|
"filename": "src/nextjs-distribution.ts",
|
|
5738
|
-
"line":
|
|
5738
|
+
"line": 86
|
|
5739
5739
|
},
|
|
5740
5740
|
"name": "overrides",
|
|
5741
5741
|
"optional": true,
|
|
@@ -13092,20 +13092,20 @@
|
|
|
13092
13092
|
],
|
|
13093
13093
|
"symbolId": "src/generated-structs/OptionalNextjsVpcProps:OptionalNextjsVpcProps"
|
|
13094
13094
|
},
|
|
13095
|
-
"cdk-nextjs.
|
|
13095
|
+
"cdk-nextjs.OptionalS3OriginBucketWithOACProps": {
|
|
13096
13096
|
"assembly": "cdk-nextjs",
|
|
13097
13097
|
"datatype": true,
|
|
13098
13098
|
"docs": {
|
|
13099
13099
|
"stability": "stable",
|
|
13100
|
-
"summary": "
|
|
13100
|
+
"summary": "OptionalS3OriginBucketWithOACProps."
|
|
13101
13101
|
},
|
|
13102
|
-
"fqn": "cdk-nextjs.
|
|
13102
|
+
"fqn": "cdk-nextjs.OptionalS3OriginBucketWithOACProps",
|
|
13103
13103
|
"kind": "interface",
|
|
13104
13104
|
"locationInModule": {
|
|
13105
|
-
"filename": "src/generated-structs/
|
|
13105
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13106
13106
|
"line": 7
|
|
13107
13107
|
},
|
|
13108
|
-
"name": "
|
|
13108
|
+
"name": "OptionalS3OriginBucketWithOACProps",
|
|
13109
13109
|
"properties": [
|
|
13110
13110
|
{
|
|
13111
13111
|
"abstract": true,
|
|
@@ -13117,8 +13117,8 @@
|
|
|
13117
13117
|
},
|
|
13118
13118
|
"immutable": true,
|
|
13119
13119
|
"locationInModule": {
|
|
13120
|
-
"filename": "src/generated-structs/
|
|
13121
|
-
"line":
|
|
13120
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13121
|
+
"line": 71
|
|
13122
13122
|
},
|
|
13123
13123
|
"name": "connectionAttempts",
|
|
13124
13124
|
"optional": true,
|
|
@@ -13136,8 +13136,8 @@
|
|
|
13136
13136
|
},
|
|
13137
13137
|
"immutable": true,
|
|
13138
13138
|
"locationInModule": {
|
|
13139
|
-
"filename": "src/generated-structs/
|
|
13140
|
-
"line":
|
|
13139
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13140
|
+
"line": 64
|
|
13141
13141
|
},
|
|
13142
13142
|
"name": "connectionTimeout",
|
|
13143
13143
|
"optional": true,
|
|
@@ -13154,8 +13154,8 @@
|
|
|
13154
13154
|
},
|
|
13155
13155
|
"immutable": true,
|
|
13156
13156
|
"locationInModule": {
|
|
13157
|
-
"filename": "src/generated-structs/
|
|
13158
|
-
"line":
|
|
13157
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13158
|
+
"line": 57
|
|
13159
13159
|
},
|
|
13160
13160
|
"name": "customHeaders",
|
|
13161
13161
|
"optional": true,
|
|
@@ -13168,6 +13168,24 @@
|
|
|
13168
13168
|
}
|
|
13169
13169
|
}
|
|
13170
13170
|
},
|
|
13171
|
+
{
|
|
13172
|
+
"abstract": true,
|
|
13173
|
+
"docs": {
|
|
13174
|
+
"default": "- an Origin Access Control will be created.",
|
|
13175
|
+
"stability": "stable",
|
|
13176
|
+
"summary": "An optional Origin Access Control."
|
|
13177
|
+
},
|
|
13178
|
+
"immutable": true,
|
|
13179
|
+
"locationInModule": {
|
|
13180
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13181
|
+
"line": 19
|
|
13182
|
+
},
|
|
13183
|
+
"name": "originAccessControl",
|
|
13184
|
+
"optional": true,
|
|
13185
|
+
"type": {
|
|
13186
|
+
"fqn": "aws-cdk-lib.aws_cloudfront.IOriginAccessControl"
|
|
13187
|
+
}
|
|
13188
|
+
},
|
|
13171
13189
|
{
|
|
13172
13190
|
"abstract": true,
|
|
13173
13191
|
"docs": {
|
|
@@ -13177,8 +13195,8 @@
|
|
|
13177
13195
|
},
|
|
13178
13196
|
"immutable": true,
|
|
13179
13197
|
"locationInModule": {
|
|
13180
|
-
"filename": "src/generated-structs/
|
|
13181
|
-
"line":
|
|
13198
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13199
|
+
"line": 51
|
|
13182
13200
|
},
|
|
13183
13201
|
"name": "originAccessControlId",
|
|
13184
13202
|
"optional": true,
|
|
@@ -13189,19 +13207,24 @@
|
|
|
13189
13207
|
{
|
|
13190
13208
|
"abstract": true,
|
|
13191
13209
|
"docs": {
|
|
13192
|
-
"default": "
|
|
13210
|
+
"default": "[AccessLevel.READ]",
|
|
13193
13211
|
"stability": "stable",
|
|
13194
|
-
"summary": "
|
|
13212
|
+
"summary": "The level of permissions granted in the bucket policy and key policy (if applicable) to the CloudFront distribution."
|
|
13195
13213
|
},
|
|
13196
13214
|
"immutable": true,
|
|
13197
13215
|
"locationInModule": {
|
|
13198
|
-
"filename": "src/generated-structs/
|
|
13216
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13199
13217
|
"line": 13
|
|
13200
13218
|
},
|
|
13201
|
-
"name": "
|
|
13219
|
+
"name": "originAccessLevels",
|
|
13202
13220
|
"optional": true,
|
|
13203
13221
|
"type": {
|
|
13204
|
-
"
|
|
13222
|
+
"collection": {
|
|
13223
|
+
"elementtype": {
|
|
13224
|
+
"fqn": "aws-cdk-lib.aws_cloudfront.AccessLevel"
|
|
13225
|
+
},
|
|
13226
|
+
"kind": "array"
|
|
13227
|
+
}
|
|
13205
13228
|
}
|
|
13206
13229
|
},
|
|
13207
13230
|
{
|
|
@@ -13214,8 +13237,8 @@
|
|
|
13214
13237
|
},
|
|
13215
13238
|
"immutable": true,
|
|
13216
13239
|
"locationInModule": {
|
|
13217
|
-
"filename": "src/generated-structs/
|
|
13218
|
-
"line":
|
|
13240
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13241
|
+
"line": 45
|
|
13219
13242
|
},
|
|
13220
13243
|
"name": "originId",
|
|
13221
13244
|
"optional": true,
|
|
@@ -13233,8 +13256,8 @@
|
|
|
13233
13256
|
},
|
|
13234
13257
|
"immutable": true,
|
|
13235
13258
|
"locationInModule": {
|
|
13236
|
-
"filename": "src/generated-structs/
|
|
13237
|
-
"line":
|
|
13259
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13260
|
+
"line": 26
|
|
13238
13261
|
},
|
|
13239
13262
|
"name": "originPath",
|
|
13240
13263
|
"optional": true,
|
|
@@ -13251,8 +13274,8 @@
|
|
|
13251
13274
|
},
|
|
13252
13275
|
"immutable": true,
|
|
13253
13276
|
"locationInModule": {
|
|
13254
|
-
"filename": "src/generated-structs/
|
|
13255
|
-
"line":
|
|
13277
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13278
|
+
"line": 38
|
|
13256
13279
|
},
|
|
13257
13280
|
"name": "originShieldEnabled",
|
|
13258
13281
|
"optional": true,
|
|
@@ -13269,8 +13292,8 @@
|
|
|
13269
13292
|
},
|
|
13270
13293
|
"immutable": true,
|
|
13271
13294
|
"locationInModule": {
|
|
13272
|
-
"filename": "src/generated-structs/
|
|
13273
|
-
"line":
|
|
13295
|
+
"filename": "src/generated-structs/OptionalS3OriginBucketWithOACProps.ts",
|
|
13296
|
+
"line": 32
|
|
13274
13297
|
},
|
|
13275
13298
|
"name": "originShieldRegion",
|
|
13276
13299
|
"optional": true,
|
|
@@ -13279,7 +13302,7 @@
|
|
|
13279
13302
|
}
|
|
13280
13303
|
}
|
|
13281
13304
|
],
|
|
13282
|
-
"symbolId": "src/generated-structs/
|
|
13305
|
+
"symbolId": "src/generated-structs/OptionalS3OriginBucketWithOACProps:OptionalS3OriginBucketWithOACProps"
|
|
13283
13306
|
},
|
|
13284
13307
|
"cdk-nextjs.OptionalVpcProps": {
|
|
13285
13308
|
"assembly": "cdk-nextjs",
|
|
@@ -13806,6 +13829,6 @@
|
|
|
13806
13829
|
"symbolId": "src/nextjs-build/nextjs-build:PublicDirEntry"
|
|
13807
13830
|
}
|
|
13808
13831
|
},
|
|
13809
|
-
"version": "0.0.
|
|
13810
|
-
"fingerprint": "
|
|
13832
|
+
"version": "0.0.4",
|
|
13833
|
+
"fingerprint": "AuYooua5jD2M5T/jR2+Are4ip7VXdUuvg7xXTUW/lH0="
|
|
13811
13834
|
}
|
package/API.md
CHANGED
|
@@ -2810,7 +2810,7 @@ const nextjsDistributionOverrides: NextjsDistributionOverrides = { ... }
|
|
|
2810
2810
|
| <code><a href="#cdk-nextjs.NextjsDistributionOverrides.property.imageBehaviorOptions">imageBehaviorOptions</a></code> | <code>aws-cdk-lib.aws_cloudfront.AddBehaviorOptions</code> | *No description.* |
|
|
2811
2811
|
| <code><a href="#cdk-nextjs.NextjsDistributionOverrides.property.imageCachePolicyProps">imageCachePolicyProps</a></code> | <code>aws-cdk-lib.aws_cloudfront.CachePolicyProps</code> | *No description.* |
|
|
2812
2812
|
| <code><a href="#cdk-nextjs.NextjsDistributionOverrides.property.imageResponseHeadersPolicyProps">imageResponseHeadersPolicyProps</a></code> | <code>aws-cdk-lib.aws_cloudfront.ResponseHeadersPolicyProps</code> | *No description.* |
|
|
2813
|
-
| <code><a href="#cdk-nextjs.NextjsDistributionOverrides.property.
|
|
2813
|
+
| <code><a href="#cdk-nextjs.NextjsDistributionOverrides.property.s3BucketOriginProps">s3BucketOriginProps</a></code> | <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps">OptionalS3OriginBucketWithOACProps</a></code> | *No description.* |
|
|
2814
2814
|
| <code><a href="#cdk-nextjs.NextjsDistributionOverrides.property.staticBehaviorOptions">staticBehaviorOptions</a></code> | <code>aws-cdk-lib.aws_cloudfront.AddBehaviorOptions</code> | *No description.* |
|
|
2815
2815
|
| <code><a href="#cdk-nextjs.NextjsDistributionOverrides.property.staticResponseHeadersPolicyProps">staticResponseHeadersPolicyProps</a></code> | <code>aws-cdk-lib.aws_cloudfront.ResponseHeadersPolicyProps</code> | *No description.* |
|
|
2816
2816
|
|
|
@@ -2906,13 +2906,13 @@ public readonly imageResponseHeadersPolicyProps: ResponseHeadersPolicyProps;
|
|
|
2906
2906
|
|
|
2907
2907
|
---
|
|
2908
2908
|
|
|
2909
|
-
##### `
|
|
2909
|
+
##### `s3BucketOriginProps`<sup>Optional</sup> <a name="s3BucketOriginProps" id="cdk-nextjs.NextjsDistributionOverrides.property.s3BucketOriginProps"></a>
|
|
2910
2910
|
|
|
2911
2911
|
```typescript
|
|
2912
|
-
public readonly
|
|
2912
|
+
public readonly s3BucketOriginProps: OptionalS3OriginBucketWithOACProps;
|
|
2913
2913
|
```
|
|
2914
2914
|
|
|
2915
|
-
- *Type:* <a href="#cdk-nextjs.
|
|
2915
|
+
- *Type:* <a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps">OptionalS3OriginBucketWithOACProps</a>
|
|
2916
2916
|
|
|
2917
2917
|
---
|
|
2918
2918
|
|
|
@@ -9046,35 +9046,36 @@ Bring your own VPC.
|
|
|
9046
9046
|
|
|
9047
9047
|
---
|
|
9048
9048
|
|
|
9049
|
-
###
|
|
9049
|
+
### OptionalS3OriginBucketWithOACProps <a name="OptionalS3OriginBucketWithOACProps" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps"></a>
|
|
9050
9050
|
|
|
9051
|
-
|
|
9051
|
+
OptionalS3OriginBucketWithOACProps.
|
|
9052
9052
|
|
|
9053
|
-
#### Initializer <a name="Initializer" id="cdk-nextjs.
|
|
9053
|
+
#### Initializer <a name="Initializer" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.Initializer"></a>
|
|
9054
9054
|
|
|
9055
9055
|
```typescript
|
|
9056
|
-
import {
|
|
9056
|
+
import { OptionalS3OriginBucketWithOACProps } from 'cdk-nextjs'
|
|
9057
9057
|
|
|
9058
|
-
const
|
|
9058
|
+
const optionalS3OriginBucketWithOACProps: OptionalS3OriginBucketWithOACProps = { ... }
|
|
9059
9059
|
```
|
|
9060
9060
|
|
|
9061
9061
|
#### Properties <a name="Properties" id="Properties"></a>
|
|
9062
9062
|
|
|
9063
9063
|
| **Name** | **Type** | **Description** |
|
|
9064
9064
|
| --- | --- | --- |
|
|
9065
|
-
| <code><a href="#cdk-nextjs.
|
|
9066
|
-
| <code><a href="#cdk-nextjs.
|
|
9067
|
-
| <code><a href="#cdk-nextjs.
|
|
9068
|
-
| <code><a href="#cdk-nextjs.
|
|
9069
|
-
| <code><a href="#cdk-nextjs.
|
|
9070
|
-
| <code><a href="#cdk-nextjs.
|
|
9071
|
-
| <code><a href="#cdk-nextjs.
|
|
9072
|
-
| <code><a href="#cdk-nextjs.
|
|
9073
|
-
| <code><a href="#cdk-nextjs.
|
|
9065
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.connectionAttempts">connectionAttempts</a></code> | <code>number</code> | The number of times that CloudFront attempts to connect to the origin; |
|
|
9066
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.connectionTimeout">connectionTimeout</a></code> | <code>aws-cdk-lib.Duration</code> | The number of seconds that CloudFront waits when trying to establish a connection to the origin. |
|
|
9067
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.customHeaders">customHeaders</a></code> | <code>{[ key: string ]: string}</code> | A list of HTTP header names and values that CloudFront adds to requests it sends to the origin. |
|
|
9068
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originAccessControl">originAccessControl</a></code> | <code>aws-cdk-lib.aws_cloudfront.IOriginAccessControl</code> | An optional Origin Access Control. |
|
|
9069
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originAccessControlId">originAccessControlId</a></code> | <code>string</code> | The unique identifier of an origin access control for this origin. |
|
|
9070
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originAccessLevels">originAccessLevels</a></code> | <code>aws-cdk-lib.aws_cloudfront.AccessLevel[]</code> | The level of permissions granted in the bucket policy and key policy (if applicable) to the CloudFront distribution. |
|
|
9071
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originId">originId</a></code> | <code>string</code> | A unique identifier for the origin. |
|
|
9072
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originPath">originPath</a></code> | <code>string</code> | An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. |
|
|
9073
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originShieldEnabled">originShieldEnabled</a></code> | <code>boolean</code> | Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false. |
|
|
9074
|
+
| <code><a href="#cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originShieldRegion">originShieldRegion</a></code> | <code>string</code> | When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance. |
|
|
9074
9075
|
|
|
9075
9076
|
---
|
|
9076
9077
|
|
|
9077
|
-
##### `connectionAttempts`<sup>Optional</sup> <a name="connectionAttempts" id="cdk-nextjs.
|
|
9078
|
+
##### `connectionAttempts`<sup>Optional</sup> <a name="connectionAttempts" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.connectionAttempts"></a>
|
|
9078
9079
|
|
|
9079
9080
|
```typescript
|
|
9080
9081
|
public readonly connectionAttempts: number;
|
|
@@ -9089,7 +9090,7 @@ valid values are 1, 2, or 3 attempts.
|
|
|
9089
9090
|
|
|
9090
9091
|
---
|
|
9091
9092
|
|
|
9092
|
-
##### `connectionTimeout`<sup>Optional</sup> <a name="connectionTimeout" id="cdk-nextjs.
|
|
9093
|
+
##### `connectionTimeout`<sup>Optional</sup> <a name="connectionTimeout" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.connectionTimeout"></a>
|
|
9093
9094
|
|
|
9094
9095
|
```typescript
|
|
9095
9096
|
public readonly connectionTimeout: Duration;
|
|
@@ -9104,7 +9105,7 @@ Valid values are 1-10 seconds, inclusive.
|
|
|
9104
9105
|
|
|
9105
9106
|
---
|
|
9106
9107
|
|
|
9107
|
-
##### `customHeaders`<sup>Optional</sup> <a name="customHeaders" id="cdk-nextjs.
|
|
9108
|
+
##### `customHeaders`<sup>Optional</sup> <a name="customHeaders" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.customHeaders"></a>
|
|
9108
9109
|
|
|
9109
9110
|
```typescript
|
|
9110
9111
|
public readonly customHeaders: {[ key: string ]: string};
|
|
@@ -9117,7 +9118,20 @@ A list of HTTP header names and values that CloudFront adds to requests it sends
|
|
|
9117
9118
|
|
|
9118
9119
|
---
|
|
9119
9120
|
|
|
9120
|
-
##### `
|
|
9121
|
+
##### `originAccessControl`<sup>Optional</sup> <a name="originAccessControl" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originAccessControl"></a>
|
|
9122
|
+
|
|
9123
|
+
```typescript
|
|
9124
|
+
public readonly originAccessControl: IOriginAccessControl;
|
|
9125
|
+
```
|
|
9126
|
+
|
|
9127
|
+
- *Type:* aws-cdk-lib.aws_cloudfront.IOriginAccessControl
|
|
9128
|
+
- *Default:* an Origin Access Control will be created.
|
|
9129
|
+
|
|
9130
|
+
An optional Origin Access Control.
|
|
9131
|
+
|
|
9132
|
+
---
|
|
9133
|
+
|
|
9134
|
+
##### `originAccessControlId`<sup>Optional</sup> <a name="originAccessControlId" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originAccessControlId"></a>
|
|
9121
9135
|
|
|
9122
9136
|
```typescript
|
|
9123
9137
|
public readonly originAccessControlId: string;
|
|
@@ -9130,20 +9144,20 @@ The unique identifier of an origin access control for this origin.
|
|
|
9130
9144
|
|
|
9131
9145
|
---
|
|
9132
9146
|
|
|
9133
|
-
##### `
|
|
9147
|
+
##### `originAccessLevels`<sup>Optional</sup> <a name="originAccessLevels" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originAccessLevels"></a>
|
|
9134
9148
|
|
|
9135
9149
|
```typescript
|
|
9136
|
-
public readonly
|
|
9150
|
+
public readonly originAccessLevels: AccessLevel[];
|
|
9137
9151
|
```
|
|
9138
9152
|
|
|
9139
|
-
- *Type:* aws-cdk-lib.aws_cloudfront.
|
|
9140
|
-
- *Default:*
|
|
9153
|
+
- *Type:* aws-cdk-lib.aws_cloudfront.AccessLevel[]
|
|
9154
|
+
- *Default:* [AccessLevel.READ]
|
|
9141
9155
|
|
|
9142
|
-
|
|
9156
|
+
The level of permissions granted in the bucket policy and key policy (if applicable) to the CloudFront distribution.
|
|
9143
9157
|
|
|
9144
9158
|
---
|
|
9145
9159
|
|
|
9146
|
-
##### `originId`<sup>Optional</sup> <a name="originId" id="cdk-nextjs.
|
|
9160
|
+
##### `originId`<sup>Optional</sup> <a name="originId" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originId"></a>
|
|
9147
9161
|
|
|
9148
9162
|
```typescript
|
|
9149
9163
|
public readonly originId: string;
|
|
@@ -9158,7 +9172,7 @@ This value must be unique within the distribution.
|
|
|
9158
9172
|
|
|
9159
9173
|
---
|
|
9160
9174
|
|
|
9161
|
-
##### `originPath`<sup>Optional</sup> <a name="originPath" id="cdk-nextjs.
|
|
9175
|
+
##### `originPath`<sup>Optional</sup> <a name="originPath" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originPath"></a>
|
|
9162
9176
|
|
|
9163
9177
|
```typescript
|
|
9164
9178
|
public readonly originPath: string;
|
|
@@ -9173,7 +9187,7 @@ Must begin, but not end, with '/' (e.g., '/production/images').
|
|
|
9173
9187
|
|
|
9174
9188
|
---
|
|
9175
9189
|
|
|
9176
|
-
##### `originShieldEnabled`<sup>Optional</sup> <a name="originShieldEnabled" id="cdk-nextjs.
|
|
9190
|
+
##### `originShieldEnabled`<sup>Optional</sup> <a name="originShieldEnabled" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originShieldEnabled"></a>
|
|
9177
9191
|
|
|
9178
9192
|
```typescript
|
|
9179
9193
|
public readonly originShieldEnabled: boolean;
|
|
@@ -9186,7 +9200,7 @@ Origin Shield is enabled by setting originShieldRegion to a valid region, after
|
|
|
9186
9200
|
|
|
9187
9201
|
---
|
|
9188
9202
|
|
|
9189
|
-
##### `originShieldRegion`<sup>Optional</sup> <a name="originShieldRegion" id="cdk-nextjs.
|
|
9203
|
+
##### `originShieldRegion`<sup>Optional</sup> <a name="originShieldRegion" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps.property.originShieldRegion"></a>
|
|
9190
9204
|
|
|
9191
9205
|
```typescript
|
|
9192
9206
|
public readonly originShieldRegion: string;
|
|
@@ -8744,7 +8744,9 @@ async function fsToS3(props) {
|
|
|
8744
8744
|
);
|
|
8745
8745
|
debug({ putObjectInputs });
|
|
8746
8746
|
await Promise.all(
|
|
8747
|
-
putObjectInputs.map(
|
|
8747
|
+
putObjectInputs.map(
|
|
8748
|
+
(input) => new import_lib_storage.Upload({ client: s3, params: input }).done()
|
|
8749
|
+
)
|
|
8748
8750
|
);
|
|
8749
8751
|
}
|
|
8750
8752
|
}
|
|
@@ -8787,14 +8789,14 @@ var handler = async (event, context) => {
|
|
|
8787
8789
|
}
|
|
8788
8790
|
} catch (err) {
|
|
8789
8791
|
console.error(err);
|
|
8790
|
-
|
|
8792
|
+
} finally {
|
|
8793
|
+
await cfnResponse({
|
|
8794
|
+
event,
|
|
8795
|
+
context,
|
|
8796
|
+
responseStatus,
|
|
8797
|
+
responseData: { previewModeId }
|
|
8798
|
+
});
|
|
8791
8799
|
}
|
|
8792
|
-
await cfnResponse({
|
|
8793
|
-
event,
|
|
8794
|
-
context,
|
|
8795
|
-
responseStatus,
|
|
8796
|
-
responseData: { previewModeId }
|
|
8797
|
-
});
|
|
8798
8800
|
};
|
|
8799
8801
|
function initImageCache(imageCachePath) {
|
|
8800
8802
|
if (imageCachePath && !(0, import_fs.existsSync)(imageCachePath)) {
|