cdk-nextjs 0.5.2 → 0.5.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 +80 -6
- package/.jsii.tabl.json +1 -1
- package/CLAUDE.md +76 -0
- package/assets/lambdas/post-deploy/post-deploy.lambda/index.js +5 -1
- package/lib/adapter/adapter.mjs +5 -1
- package/lib/adapter/cache-handler.js +24 -21
- package/lib/adapter/cache-handler.mjs +15748 -17466
- package/lib/adapter/cache-handler.test.js +5 -2
- package/lib/adapter/local-file-cache-handler.js +6 -2
- package/lib/adapter/memory-cache-handler.js +63 -4
- package/lib/adapter/s3-cache-handler.js +10 -3
- package/lib/lambdas/post-deploy/post-deploy-function.js +36 -3
- package/lib/lambdas/post-deploy/post-deploy.lambda.js +5 -2
- package/lib/lambdas/post-deploy/prune-cache-bucket.js +5 -2
- package/lib/lambdas/post-deploy/prune-revalidation-table.js +5 -2
- package/lib/lambdas/post-deploy/prune-s3.js +5 -2
- package/lib/nextjs-api.js +10 -4
- package/lib/nextjs-build/nextjs-build.js +41 -5
- package/lib/nextjs-build/patch-fetch.js +1 -5
- package/lib/nextjs-build/patch-fetch.test.d.ts +1 -0
- package/lib/nextjs-build/patch-fetch.test.js +168 -0
- package/lib/nextjs-cache.js +7 -4
- package/lib/nextjs-compute/nextjs-containers.js +7 -4
- package/lib/nextjs-compute/nextjs-functions.js +5 -4
- package/lib/nextjs-distribution.js +34 -26
- package/lib/nextjs-post-deploy.js +5 -4
- package/lib/nextjs-static-assets.js +6 -4
- package/lib/root-constructs/nextjs-base-construct.js +9 -4
- package/lib/root-constructs/nextjs-global-containers.js +6 -4
- package/lib/root-constructs/nextjs-global-functions.js +6 -4
- package/lib/root-constructs/nextjs-regional-containers.js +5 -4
- package/lib/root-constructs/nextjs-regional-functions.js +6 -4
- package/package.json +21 -23
package/.jsii
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
]
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"aws-cdk-lib": "^2.261.0",
|
|
12
12
|
"constructs": "^10.5.1"
|
|
13
13
|
},
|
|
14
14
|
"dependencyClosure": {
|
|
@@ -525,6 +525,19 @@
|
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
},
|
|
528
|
+
"aws-cdk-lib.aws_awsexternalanthropic": {
|
|
529
|
+
"targets": {
|
|
530
|
+
"dotnet": {
|
|
531
|
+
"namespace": "Amazon.CDK.AWS.AWSExternalAnthropic"
|
|
532
|
+
},
|
|
533
|
+
"java": {
|
|
534
|
+
"package": "software.amazon.awscdk.services.awsexternalanthropic"
|
|
535
|
+
},
|
|
536
|
+
"python": {
|
|
537
|
+
"module": "aws_cdk.aws_awsexternalanthropic"
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
528
541
|
"aws-cdk-lib.aws_b2bi": {
|
|
529
542
|
"targets": {
|
|
530
543
|
"dotnet": {
|
|
@@ -3275,6 +3288,19 @@
|
|
|
3275
3288
|
}
|
|
3276
3289
|
}
|
|
3277
3290
|
},
|
|
3291
|
+
"aws-cdk-lib.aws_resiliencehubv2": {
|
|
3292
|
+
"targets": {
|
|
3293
|
+
"dotnet": {
|
|
3294
|
+
"namespace": "Amazon.CDK.AWS.ResilienceHubV2"
|
|
3295
|
+
},
|
|
3296
|
+
"java": {
|
|
3297
|
+
"package": "software.amazon.awscdk.services.resiliencehubv2"
|
|
3298
|
+
},
|
|
3299
|
+
"python": {
|
|
3300
|
+
"module": "aws_cdk.aws_resiliencehubv2"
|
|
3301
|
+
}
|
|
3302
|
+
}
|
|
3303
|
+
},
|
|
3278
3304
|
"aws-cdk-lib.aws_resourceexplorer2": {
|
|
3279
3305
|
"targets": {
|
|
3280
3306
|
"dotnet": {
|
|
@@ -4702,6 +4728,22 @@
|
|
|
4702
4728
|
}
|
|
4703
4729
|
}
|
|
4704
4730
|
},
|
|
4731
|
+
"aws-cdk-lib.interfaces.aws_awsexternalanthropic": {
|
|
4732
|
+
"targets": {
|
|
4733
|
+
"dotnet": {
|
|
4734
|
+
"namespace": "Amazon.CDK.Interfaces.AWSExternalAnthropic"
|
|
4735
|
+
},
|
|
4736
|
+
"go": {
|
|
4737
|
+
"packageName": "interfacesawsawsexternalanthropic"
|
|
4738
|
+
},
|
|
4739
|
+
"java": {
|
|
4740
|
+
"package": "software.amazon.awscdk.interfaces.awsexternalanthropic"
|
|
4741
|
+
},
|
|
4742
|
+
"python": {
|
|
4743
|
+
"module": "aws_cdk.interfaces.aws_awsexternalanthropic"
|
|
4744
|
+
}
|
|
4745
|
+
}
|
|
4746
|
+
},
|
|
4705
4747
|
"aws-cdk-lib.interfaces.aws_b2bi": {
|
|
4706
4748
|
"targets": {
|
|
4707
4749
|
"dotnet": {
|
|
@@ -4766,6 +4808,22 @@
|
|
|
4766
4808
|
}
|
|
4767
4809
|
}
|
|
4768
4810
|
},
|
|
4811
|
+
"aws-cdk-lib.interfaces.aws_bcm": {
|
|
4812
|
+
"targets": {
|
|
4813
|
+
"dotnet": {
|
|
4814
|
+
"namespace": "Amazon.CDK.Interfaces.BCM"
|
|
4815
|
+
},
|
|
4816
|
+
"go": {
|
|
4817
|
+
"packageName": "interfacesawsbcm"
|
|
4818
|
+
},
|
|
4819
|
+
"java": {
|
|
4820
|
+
"package": "software.amazon.awscdk.interfaces.bcm"
|
|
4821
|
+
},
|
|
4822
|
+
"python": {
|
|
4823
|
+
"module": "aws_cdk.interfaces.aws_bcm"
|
|
4824
|
+
}
|
|
4825
|
+
}
|
|
4826
|
+
},
|
|
4769
4827
|
"aws-cdk-lib.interfaces.aws_bcmdataexports": {
|
|
4770
4828
|
"targets": {
|
|
4771
4829
|
"dotnet": {
|
|
@@ -7822,6 +7880,22 @@
|
|
|
7822
7880
|
}
|
|
7823
7881
|
}
|
|
7824
7882
|
},
|
|
7883
|
+
"aws-cdk-lib.interfaces.aws_resiliencehubv2": {
|
|
7884
|
+
"targets": {
|
|
7885
|
+
"dotnet": {
|
|
7886
|
+
"namespace": "Amazon.CDK.Interfaces.ResilienceHubV2"
|
|
7887
|
+
},
|
|
7888
|
+
"go": {
|
|
7889
|
+
"packageName": "interfacesawsresiliencehubv2"
|
|
7890
|
+
},
|
|
7891
|
+
"java": {
|
|
7892
|
+
"package": "software.amazon.awscdk.interfaces.resiliencehubv2"
|
|
7893
|
+
},
|
|
7894
|
+
"python": {
|
|
7895
|
+
"module": "aws_cdk.interfaces.aws_resiliencehubv2"
|
|
7896
|
+
}
|
|
7897
|
+
}
|
|
7898
|
+
},
|
|
7825
7899
|
"aws-cdk-lib.interfaces.aws_resourceexplorer2": {
|
|
7826
7900
|
"targets": {
|
|
7827
7901
|
"dotnet": {
|
|
@@ -8937,7 +9011,7 @@
|
|
|
8937
9011
|
"stability": "stable"
|
|
8938
9012
|
},
|
|
8939
9013
|
"homepage": "https://github.com/cdklabs/cdk-nextjs.git",
|
|
8940
|
-
"jsiiVersion": "
|
|
9014
|
+
"jsiiVersion": "6.0.4 (build 308d98d)",
|
|
8941
9015
|
"keywords": [
|
|
8942
9016
|
"aws",
|
|
8943
9017
|
"aws-cdk",
|
|
@@ -8953,7 +9027,7 @@
|
|
|
8953
9027
|
"hasDefaultInterfaces": true
|
|
8954
9028
|
}
|
|
8955
9029
|
},
|
|
8956
|
-
"tscRootDir": "src"
|
|
9030
|
+
"tscRootDir": "/home/runner/work/cdk-nextjs/cdk-nextjs/src"
|
|
8957
9031
|
},
|
|
8958
9032
|
"name": "cdk-nextjs",
|
|
8959
9033
|
"readme": {
|
|
@@ -9294,7 +9368,7 @@
|
|
|
9294
9368
|
},
|
|
9295
9369
|
"locationInModule": {
|
|
9296
9370
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9297
|
-
"line":
|
|
9371
|
+
"line": 161
|
|
9298
9372
|
},
|
|
9299
9373
|
"name": "computeBaseProps",
|
|
9300
9374
|
"protected": true,
|
|
@@ -19479,6 +19553,6 @@
|
|
|
19479
19553
|
"symbolId": "src/nextjs-build/nextjs-build:PublicDirEntry"
|
|
19480
19554
|
}
|
|
19481
19555
|
},
|
|
19482
|
-
"version": "0.5.
|
|
19483
|
-
"fingerprint": "
|
|
19556
|
+
"version": "0.5.4",
|
|
19557
|
+
"fingerprint": "u5s9QaLHVLyyXi2Rp0hOJKaioIsabrptBmy/3UoFbOU="
|
|
19484
19558
|
}
|
package/.jsii.tabl.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2","toolVersion":"5.9.48","snippets":{"4e2896734468b985525afbd29693cab61108bdfb0e909e1b89fa635d76e14eae":{"translations":{"python":{"source":"from next import NextConfig\n\n\nnext_config = {\n # ...\n \"adapter_path\": import.meta.resolve(\"cdk-nextjs/adapter\")\n}export default nextConfig;","version":"2"},"csharp":{"source":"using Next;\n\n\nvar nextConfig = new Dictionary<string, object> {\n // ...\n { \"adapterPath\", import.meta.Resolve(\"cdk-nextjs/adapter\") }\n};export default nextConfig;","version":"1"},"java":{"source":"import next.NextConfig;\n\n\nNextConfig nextConfig = Map.of(\n // ...\n \"adapterPath\", import.meta.resolve(\"cdk-nextjs/adapter\"));export default nextConfig;","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/next\"\n\n\nnextConfig := map[string]interface{}{\n\t// ...\n\t\"adapterPath\": import.meta.resolve(jsii.String(\"cdk-nextjs/adapter\")),\n}export default nextConfig;","version":"1"},"$":{"source":"import { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: import.meta.resolve(\"cdk-nextjs/adapter\"), // for ESM\n // adapterPath: require.resolve(\"cdk-nextjs/adapter\"), // for CJS\n};\n\nexport default nextConfig;","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":51}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { NextConfig } from \"next\";\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: import.meta.resolve(\"cdk-nextjs/adapter\"), // for ESM\n // adapterPath: require.resolve(\"cdk-nextjs/adapter\"), // for CJS\n};\n\nexport default nextConfig;\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":2,"80":7,"184":1,"211":1,"212":1,"214":1,"237":1,"244":1,"261":1,"262":1,"273":1,"274":1,"276":1,"277":1,"278":1,"304":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"29f119aec1e5478a318ae318279508e9b76b5c834a9be35edf466c62e5077306":{"translations":{"python":{"source":"from aws_cdk import App, Stack, StackProps\nfrom constructs import Construct\nfrom cdk_nextjs import NextjsGlobalFunctions\nfrom node:path import join\n\n\nclass WebStack(Stack):\n def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, notificationArns=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None, propertyInjectors=None):\n super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, notificationArns=notificationArns, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation, propertyInjectors=propertyInjectors)\n NextjsGlobalFunctions(self, \"Nextjs\",\n build_directory=join(import.meta.dirname),\n health_check_path=\"/api/health\"\n )\n\napp = App()\n\nWebStack(app, \"web-stack\")","version":"2"},"csharp":{"source":"using Amazon.CDK;\nusing Constructs;\nusing Cdk.Nextjs;\nusing Node.Path;\n\nclass WebStack : Stack\n{\n public WebStack(Construct scope, string id, StackProps? props=null) : base(scope, id, props)\n {\n new NextjsGlobalFunctions(this, \"Nextjs\", new NextjsGlobalFunctionsProps {\n BuildDirectory = Join(import.meta.Dirname),\n HealthCheckPath = \"/api/health\"\n });\n }\n}\n\nvar app = new App();\n\nnew WebStack(app, \"web-stack\");","version":"1"},"java":{"source":"import software.amazon.awscdk.App;\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.constructs.Construct;\nimport cdk.nextjs.NextjsGlobalFunctions;\nimport node.path.join.*;\n\n\npublic class WebStack extends Stack {\n public WebStack(Construct scope, String id) {\n this(scope, id, null);\n }\n\n public WebStack(Construct scope, String id, StackProps props) {\n super(scope, id, props);\n NextjsGlobalFunctions.Builder.create(this, \"Nextjs\")\n .buildDirectory(join(import.meta.getDirname()))\n .healthCheckPath(\"/api/health\")\n .build();\n }\n}\n\nApp app = new App();\n\nnew WebStack(app, \"web-stack\");","version":"1"},"go":{"source":"import \"github.com/aws/aws-cdk-go/awscdk\"\nimport \"github.com/aws/constructs-go/constructs\"\nimport \"github.com/aws-samples/dummy/cdknextjs\"\nimport \"github.com/aws-samples/dummy/nodepath\"\n\n\ntype webStack struct {\n\tStack\n}\n\nfunc newWebStack(scope Construct, id *string, props StackProps) *webStack {\n\tthis := &webStack{}\n\tnewStack_Override(this, scope, id, props)\n\tcdknextjs.NewNextjsGlobalFunctions(this, jsii.String(\"Nextjs\"), &NextjsGlobalFunctionsProps{\n\t\tBuildDirectory: *nodepath.Join(import.meta.dirname),\n\t\tHealthCheckPath: jsii.String(\"/api/health\"),\n\t})\n\treturn this\n}\n\napp := awscdk.NewApp()\n\nNewWebStack(app, jsii.String(\"web-stack\"))","version":"1"},"$":{"source":"import { App, Stack, StackProps } from \"aws-cdk-lib\";\nimport { Construct } from \"constructs\";\nimport { NextjsGlobalFunctions } from \"cdk-nextjs\";\nimport { join } from \"node:path\";\n\nclass WebStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n healthCheckPath: \"/api/health\",\n });\n }\n}\n\nconst app = new App();\n\nnew WebStack(app, \"web-stack\");","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":72}},"didCompile":false,"fqnsReferenced":["aws-cdk-lib.App","aws-cdk-lib.Stack","aws-cdk-lib.StackProps","cdk-nextjs.NextjsGlobalFunctions","cdk-nextjs.NextjsGlobalFunctionsProps","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { App, Stack, StackProps } from \"aws-cdk-lib\";\nimport { Construct } from \"constructs\";\nimport { NextjsGlobalFunctions } from \"cdk-nextjs\";\nimport { join } from \"node:path\";\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nclass WebStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n healthCheckPath: \"/api/health\",\n });\n }\n}\n\nconst app = new App();\n\nnew WebStack(app, \"web-stack\");\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":7,"58":1,"80":26,"108":1,"110":1,"154":1,"170":3,"177":1,"184":2,"211":1,"212":1,"214":2,"215":3,"234":1,"237":1,"242":1,"244":1,"245":3,"261":1,"262":1,"264":1,"273":4,"274":4,"276":4,"277":6,"299":1,"304":2,"308":1},"fqnsFingerprint":"d8549da0cd6eb3706b468f3b6eb6df00b1723f26575e00842e87819cc8f49b70"},"d1f22faa68ac77f64682156b6d2791c788b48db8661c81875c6d7d608da8e8c8":{"translations":{"python":{"source":"nextjs = NextjsRegionalContainers(self, \"Nextjs\",\n # ...\n alb=shared_alb,\n ecs_cluster=shared_cluster\n)\nnextjs.nextjs_containers.remove_auto_created_listener()","version":"2"},"csharp":{"source":"var nextjs = new NextjsRegionalContainers(this, \"Nextjs\", new Struct {\n // ...\n Alb = sharedAlb,\n EcsCluster = sharedCluster\n});\nnextjs.NextjsContainers.RemoveAutoCreatedListener();","version":"1"},"java":{"source":"Object nextjs = NextjsRegionalContainers.Builder.create(this, \"Nextjs\")\n // ...\n .alb(sharedAlb)\n .ecsCluster(sharedCluster)\n .build();\nnextjs.nextjsContainers.removeAutoCreatedListener();","version":"1"},"go":{"source":"nextjs := NewNextjsRegionalContainers(this, jsii.String(\"Nextjs\"), map[string]interface{}{\n\t// ...\n\t\"alb\": sharedAlb,\n\t\"ecsCluster\": sharedCluster,\n})\nnextjs.nextjsContainers.removeAutoCreatedListener()","version":"1"},"$":{"source":"const nextjs = new NextjsRegionalContainers(this, \"Nextjs\", {\n // ...\n alb: sharedAlb,\n ecsCluster: sharedCluster,\n});\nnextjs.nextjsContainers.removeAutoCreatedListener();","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":290}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst nextjs = new NextjsRegionalContainers(this, \"Nextjs\", {\n // ...\n alb: sharedAlb,\n ecsCluster: sharedCluster,\n});\nnextjs.nextjsContainers.removeAutoCreatedListener();\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":9,"110":1,"211":1,"212":2,"214":1,"215":1,"244":1,"245":1,"261":1,"262":1,"304":2},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"eebd1de809f293785090f12b543c097e97d49dda8190f1af2cdea4bba3f0ff19":{"translations":{"python":{"source":"join(import.meta.dirname, \"..\", \"web\")or\"/path/to/nextjs/app\"","version":"2"},"csharp":{"source":"Join(import.meta.Dirname, \"..\", \"web\");or;\"/path/to/nextjs/app\";","version":"1"},"java":{"source":"join(import.meta.getDirname(), \"..\", \"web\");or;\"/path/to/nextjs/app\";","version":"1"},"go":{"source":"join(import.meta.dirname, jsii.String(\"..\"), jsii.String(\"web\"))or\"/path/to/nextjs/app\"","version":"1"},"$":{"source":"join(import.meta.dirname, \"..\", \"web\") or \"/path/to/nextjs/app\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBaseProps","memberName":"buildDirectory"},"field":{"field":"example"}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\njoin(import.meta.dirname, \"..\", \"web\") or \"/path/to/nextjs/app\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":3,"80":4,"212":1,"214":1,"237":1,"245":3},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"a7b9d2f8587b8d5b579035aaa8e7a16f3fc2ab9bc33261b18c6274f5c63a18a5":{"translations":{"python":{"source":"# api/health/route.ts\nfrom next.server import NextResponse\n\n\ndef GET(self):\n return NextResponse.json(\"\")","version":"2"},"csharp":{"source":"// api/health/route.ts\nusing Next.Server;\n\n\npublic void GET()\n{\n return NextResponse.Json(\"\");\n}","version":"1"},"java":{"source":"// api/health/route.ts\nimport next.server.NextResponse;\n\n\npublic void GET() {\n return NextResponse.json(\"\");\n}","version":"1"},"go":{"source":"// api/health/route.ts\nimport \"github.com/aws-samples/dummy/next/server\"\n\n\nfunc GET() {\n\treturn nextserver.NextResponse_Json(jsii.String(\"\"))\n}","version":"1"},"$":{"source":"// api/health/route.ts\nimport { NextResponse } from \"next/server\";\n\nexport function GET() {\n return NextResponse.json(\"\");\n}","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBaseProps","memberName":"healthCheckPath"},"field":{"field":"example"}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\n// api/health/route.ts\nimport { NextResponse } from \"next/server\";\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nexport function GET() {\n return NextResponse.json(\"\");\n}\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":2,"80":4,"95":1,"212":1,"214":1,"242":1,"254":1,"263":1,"273":1,"274":1,"276":1,"277":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"1cbb888be6a3669675e797a75a9f52fb0a6a159d237defd0f8435ac3d4d3ebb4":{"translations":{"python":{"source":"\"/my-base-path\"","version":"2"},"csharp":{"source":"\"/my-base-path\";","version":"1"},"java":{"source":"\"/my-base-path\";","version":"1"},"go":{"source":"\"/my-base-path\"","version":"1"},"$":{"source":"\"/my-base-path\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBaseProps","memberName":"basePath"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/my-base-path\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"f905a28200f10c594d3eb92a4d1493c9f86e5e51f0a7ab26cb2174f8ad7f5e50":{"translations":{"python":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"2"},"csharp":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\";","version":"1"},"java":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\";","version":"1"},"go":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"1"},"$":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"initCacheDir"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"2a436a09ffe5a1e0afff87dc56af97f78eaacdf9234591d3b5e0355b0a2f6ab6":{"translations":{"python":{"source":"\"/Users/john/myapp/public\"","version":"2"},"csharp":{"source":"\"/Users/john/myapp/public\";","version":"1"},"java":{"source":"\"/Users/john/myapp/public\";","version":"1"},"go":{"source":"\"/Users/john/myapp/public\"","version":"1"},"$":{"source":"\"/Users/john/myapp/public\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"publicDirEntries"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/Users/john/myapp/public\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"eb4fd1c904ebd2230509f4b8d9fe8f13e8f95c0fb55ca31da9b3a6d7666f4e68":{"translations":{"python":{"source":"\"./packages/ui/server.js\"(monorepo)","version":"2"},"csharp":{"source":"\"./packages/ui/server.js\"(monorepo);","version":"1"},"java":{"source":"\"./packages/ui/server.js\"(monorepo);","version":"1"},"go":{"source":"\"./packages/ui/server.js\"(monorepo)","version":"1"},"$":{"source":"\"./packages/ui/server.js\" (monorepo)","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"relativePathToEntrypoint"},"field":{"field":"example"}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"./packages/ui/server.js\" (monorepo)\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":1,"214":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"186f22f1a60359d2b2bd35fe7e2a4f5e43201b583be96c160ac9bc2c6f0a1e95":{"translations":{"python":{"source":"\"./apps/web\"for monorepo apps","version":"2"},"csharp":{"source":"\"./apps/web\";for monorepo apps","version":"1"},"java":{"source":"\"./apps/web\";for monorepo apps","version":"1"},"go":{"source":"\"./apps/web\"for monorepo apps","version":"1"},"$":{"source":"\"./apps/web\" for monorepo apps","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"relativePathToPackage"},"field":{"field":"example"}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"./apps/web\" for monorepo apps\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":4,"245":2,"249":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"d68554f1f764c619c525f6b65f384648a5aace63035f4a7b863ebde1914d3df2":{"translations":{"python":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"2"},"csharp":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\";","version":"1"},"java":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\";","version":"1"},"go":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"1"},"$":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsCacheProps","memberName":"initCacheDir"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"5fc189c24759b4e5e2cea45070d7fd9cf597aebbd5a3bdbc0a2c727e76671e1b":{"translations":{"python":{"source":"\"/my-base-path\"","version":"2"},"csharp":{"source":"\"/my-base-path\";","version":"1"},"java":{"source":"\"/my-base-path\";","version":"1"},"go":{"source":"\"/my-base-path\"","version":"1"},"$":{"source":"\"/my-base-path\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsStaticAssetsProps","memberName":"basePath"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/my-base-path\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"cd644042f0973329e2dccbf56e94f70ca3e8f314957ab500562b37d8a25b6f2a":{"translations":{"python":{"source":"# use the provider framework from aws-cdk/custom-resources:\nprovider = customresources.Provider(self, \"ResourceProvider\",\n on_event_handler=on_event_handler,\n is_complete_handler=is_complete_handler\n)\n\nCustomResource(self, \"MyResource\",\n service_token=provider.service_token\n)","version":"2"},"csharp":{"source":"// use the provider framework from aws-cdk/custom-resources:\nvar provider = new customresources.Provider(this, \"ResourceProvider\", new Struct {\n OnEventHandler = onEventHandler,\n IsCompleteHandler = isCompleteHandler\n});\n\nnew CustomResource(this, \"MyResource\", new Struct {\n ServiceToken = provider.ServiceToken\n});","version":"1"},"java":{"source":"// use the provider framework from aws-cdk/custom-resources:\nObject provider = Provider.Builder.create(this, \"ResourceProvider\")\n .onEventHandler(onEventHandler)\n .isCompleteHandler(isCompleteHandler)\n .build();\n\nCustomResource.Builder.create(this, \"MyResource\")\n .serviceToken(provider.getServiceToken())\n .build();","version":"1"},"go":{"source":"// use the provider framework from aws-cdk/custom-resources:\nprovider := customresources.NewProvider(this, jsii.String(\"ResourceProvider\"), map[string]interface{}{\n\t\"onEventHandler\": onEventHandler,\n\t\"isCompleteHandler\": isCompleteHandler,\n})\n\nNewCustomResource(this, jsii.String(\"MyResource\"), map[string]interface{}{\n\t\"serviceToken\": provider.serviceToken,\n})","version":"1"},"$":{"source":"// use the provider framework from aws-cdk/custom-resources:\nconst provider = new customresources.Provider(this, 'ResourceProvider', {\n onEventHandler,\n isCompleteHandler, // optional\n});\n\nnew CustomResource(this, 'MyResource', {\n serviceToken: provider.serviceToken,\n});","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalCustomResourceProps","memberName":"serviceToken"},"field":{"field":"markdown","line":11}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n// use the provider framework from aws-cdk/custom-resources:\nconst provider = new customresources.Provider(this, 'ResourceProvider', {\n onEventHandler,\n isCompleteHandler, // optional\n});\n\nnew CustomResource(this, 'MyResource', {\n serviceToken: provider.serviceToken,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":2,"80":9,"110":2,"211":2,"212":2,"215":2,"244":1,"245":1,"261":1,"262":1,"304":1,"305":2},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"5442213b3596082847e8f52535f015070c171ef269b2fc2cc70080da1248abd3":{"translations":{"python":{"source":"# invoke an AWS Lambda function when a lifecycle event occurs:\nCustomResource(self, \"MyResource\",\n service_token=my_function.function_arn\n)","version":"2"},"csharp":{"source":"// invoke an AWS Lambda function when a lifecycle event occurs:\n// invoke an AWS Lambda function when a lifecycle event occurs:\nnew CustomResource(this, \"MyResource\", new Struct {\n ServiceToken = myFunction.FunctionArn\n});","version":"1"},"java":{"source":"// invoke an AWS Lambda function when a lifecycle event occurs:\n// invoke an AWS Lambda function when a lifecycle event occurs:\nCustomResource.Builder.create(this, \"MyResource\")\n .serviceToken(myFunction.getFunctionArn())\n .build();","version":"1"},"go":{"source":"// invoke an AWS Lambda function when a lifecycle event occurs:\n// invoke an AWS Lambda function when a lifecycle event occurs:\nNewCustomResource(this, jsii.String(\"MyResource\"), map[string]interface{}{\n\t\"serviceToken\": myFunction.functionArn,\n})","version":"1"},"$":{"source":"// invoke an AWS Lambda function when a lifecycle event occurs:\nnew CustomResource(this, 'MyResource', {\n serviceToken: myFunction.functionArn,\n});","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalCustomResourceProps","memberName":"serviceToken"},"field":{"field":"markdown","line":26}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n// invoke an AWS Lambda function when a lifecycle event occurs:\nnew CustomResource(this, 'MyResource', {\n serviceToken: myFunction.functionArn,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":4,"110":1,"211":1,"212":1,"215":1,"245":1,"304":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"1aa088d0fe1a5c8b611ee12b98f8ddddf680e78e92b8bfbc004d7f1d81e0db05":{"translations":{"python":{"source":"# publish lifecycle events to an SNS topic:\nCustomResource(self, \"MyResource\",\n service_token=my_topic.topic_arn\n)","version":"2"},"csharp":{"source":"// publish lifecycle events to an SNS topic:\n// publish lifecycle events to an SNS topic:\nnew CustomResource(this, \"MyResource\", new Struct {\n ServiceToken = myTopic.TopicArn\n});","version":"1"},"java":{"source":"// publish lifecycle events to an SNS topic:\n// publish lifecycle events to an SNS topic:\nCustomResource.Builder.create(this, \"MyResource\")\n .serviceToken(myTopic.getTopicArn())\n .build();","version":"1"},"go":{"source":"// publish lifecycle events to an SNS topic:\n// publish lifecycle events to an SNS topic:\nNewCustomResource(this, jsii.String(\"MyResource\"), map[string]interface{}{\n\t\"serviceToken\": myTopic.topicArn,\n})","version":"1"},"$":{"source":"// publish lifecycle events to an SNS topic:\nnew CustomResource(this, 'MyResource', {\n serviceToken: myTopic.topicArn,\n});","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalCustomResourceProps","memberName":"serviceToken"},"field":{"field":"markdown","line":36}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n// publish lifecycle events to an SNS topic:\nnew CustomResource(this, 'MyResource', {\n serviceToken: myTopic.topicArn,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":4,"110":1,"211":1,"212":1,"215":1,"245":1,"304":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"416cd627e7165af9844b0610f2556618f7e4e17c479a2b5cb37749b400206b42":{"translations":{"python":{"source":"import aws_cdk.aws_logs as logs\n\n# my_log_group: logs.LogGroup\n\nmy_log_group.log_group_name","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Logs;\n\nLogGroup myLogGroup;\n\nmyLogGroup.LogGroupName;","version":"1"},"java":{"source":"import software.amazon.awscdk.services.logs.*;\n\nLogGroup myLogGroup;\n\nmyLogGroup.getLogGroupName();","version":"1"},"go":{"source":"import logs \"github.com/aws/aws-cdk-go/awscdk\"\n\nvar myLogGroup LogGroup\n\nmyLogGroup.logGroupName","version":"1"},"$":{"source":"import * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\nmyLogGroup.logGroupName;","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalDockerImageFunctionProps","memberName":"logRetention"},"field":{"field":"markdown","line":12}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\nmyLogGroup.logGroupName;\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":6,"138":1,"167":1,"184":1,"212":1,"244":1,"245":1,"261":1,"262":1,"273":1,"274":1,"275":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"8649823826e479c4a10bdb07d7c9d4248a9e1f7d74b0ad412728a606cb14b9e0":{"translations":{"python":{"source":"import aws_cdk.aws_logs as logs\n\n# my_log_group: logs.LogGroup\n\nmy_log_group.log_group_name","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Logs;\n\nLogGroup myLogGroup;\n\nmyLogGroup.LogGroupName;","version":"1"},"java":{"source":"import software.amazon.awscdk.services.logs.*;\n\nLogGroup myLogGroup;\n\nmyLogGroup.getLogGroupName();","version":"1"},"go":{"source":"import logs \"github.com/aws/aws-cdk-go/awscdk\"\n\nvar myLogGroup LogGroup\n\nmyLogGroup.logGroupName","version":"1"},"$":{"source":"import * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\nmyLogGroup.logGroupName;","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalEdgeFunctionProps","memberName":"logRetention"},"field":{"field":"markdown","line":12}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\nmyLogGroup.logGroupName;\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":6,"138":1,"167":1,"184":1,"212":1,"244":1,"245":1,"261":1,"262":1,"273":1,"274":1,"275":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"7a3ea40a322406557f6dd54b49201abcd4b96cf7ddf4d4049324acbe8f6aaa67":{"translations":{"python":{"source":"import aws_cdk.aws_logs as logs\n\n# my_log_group: logs.LogGroup\n\nmy_log_group.log_group_name","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Logs;\n\nLogGroup myLogGroup;\n\nmyLogGroup.LogGroupName;","version":"1"},"java":{"source":"import software.amazon.awscdk.services.logs.*;\n\nLogGroup myLogGroup;\n\nmyLogGroup.getLogGroupName();","version":"1"},"go":{"source":"import logs \"github.com/aws/aws-cdk-go/awscdk\"\n\nvar myLogGroup LogGroup\n\nmyLogGroup.logGroupName","version":"1"},"$":{"source":"import * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\nmyLogGroup.logGroupName;","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalFunctionProps","memberName":"logRetention"},"field":{"field":"markdown","line":12}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\nmyLogGroup.logGroupName;\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":6,"138":1,"167":1,"184":1,"212":1,"244":1,"245":1,"261":1,"262":1,"273":1,"274":1,"275":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"24dbf2206251fc4c3783340dbeecc425f704203d1ed3601b7afe676188f4677a":{"translations":{"python":{"source":"ec2.Vpc(self, \"VPC\",\n subnet_configuration=[{\n \"cidr_mask\": 24,\n \"name\": \"ingress\",\n \"subnet_type\": ec2.SubnetType.PUBLIC\n }, {\n \"cidr_mask\": 24,\n \"name\": \"application\",\n \"subnet_type\": ec2.SubnetType.PRIVATE_WITH_EGRESS\n }, {\n \"cidr_mask\": 28,\n \"name\": \"rds\",\n \"subnet_type\": ec2.SubnetType.PRIVATE_ISOLATED\n }\n ]\n)","version":"2"},"csharp":{"source":"new ec2.Vpc(this, \"VPC\", new Struct {\n SubnetConfiguration = new [] { new Struct {\n CidrMask = 24,\n Name = \"ingress\",\n SubnetType = ec2.SubnetType.PUBLIC\n }, new Struct {\n CidrMask = 24,\n Name = \"application\",\n SubnetType = ec2.SubnetType.PRIVATE_WITH_EGRESS\n }, new Struct {\n CidrMask = 28,\n Name = \"rds\",\n SubnetType = ec2.SubnetType.PRIVATE_ISOLATED\n } }\n});","version":"1"},"java":{"source":"Vpc.Builder.create(this, \"VPC\")\n .subnetConfiguration(List.of(Map.of(\n \"cidrMask\", 24,\n \"name\", \"ingress\",\n \"subnetType\", ec2.getSubnetType().getPUBLIC()), Map.of(\n \"cidrMask\", 24,\n \"name\", \"application\",\n \"subnetType\", ec2.getSubnetType().getPRIVATE_WITH_EGRESS()), Map.of(\n \"cidrMask\", 28,\n \"name\", \"rds\",\n \"subnetType\", ec2.getSubnetType().getPRIVATE_ISOLATED())))\n .build();","version":"1"},"go":{"source":"ec2.NewVpc(this, jsii.String(\"VPC\"), map[string][]map[string]interface{}{\n\t\"subnetConfiguration\": []map[string]interface{}{\n\t\tmap[string]interface{}{\n\t\t\t\"cidrMask\": jsii.Number(24),\n\t\t\t\"name\": jsii.String(\"ingress\"),\n\t\t\t\"subnetType\": ec2.SubnetType_PUBLIC,\n\t\t},\n\t\tmap[string]interface{}{\n\t\t\t\"cidrMask\": jsii.Number(24),\n\t\t\t\"name\": jsii.String(\"application\"),\n\t\t\t\"subnetType\": ec2.SubnetType_PRIVATE_WITH_EGRESS,\n\t\t},\n\t\tmap[string]interface{}{\n\t\t\t\"cidrMask\": jsii.Number(28),\n\t\t\t\"name\": jsii.String(\"rds\"),\n\t\t\t\"subnetType\": ec2.SubnetType_PRIVATE_ISOLATED,\n\t\t},\n\t},\n})","version":"1"},"$":{"source":"new ec2.Vpc(this, 'VPC', {\n subnetConfiguration: [\n {\n cidrMask: 24,\n name: 'ingress',\n subnetType: ec2.SubnetType.PUBLIC,\n },\n {\n cidrMask: 24,\n name: 'application',\n subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,\n },\n {\n cidrMask: 28,\n name: 'rds',\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n }\n ]\n});","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalVpcProps","memberName":"subnetConfiguration"},"field":{"field":"markdown","line":7}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew ec2.Vpc(this, 'VPC', {\n subnetConfiguration: [\n {\n cidrMask: 24,\n name: 'ingress',\n subnetType: ec2.SubnetType.PUBLIC,\n },\n {\n cidrMask: 24,\n name: 'application',\n subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,\n },\n {\n cidrMask: 28,\n name: 'rds',\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n }\n ]\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"9":3,"11":4,"80":21,"110":1,"210":1,"211":4,"212":7,"215":1,"245":1,"304":10},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}}}
|
|
1
|
+
{"version":"2","toolVersion":"5.9.54","snippets":{"4e2896734468b985525afbd29693cab61108bdfb0e909e1b89fa635d76e14eae":{"translations":{"python":{"source":"from next import NextConfig\n\n\nnext_config = {\n # ...\n \"adapter_path\": import.meta.resolve(\"cdk-nextjs/adapter\")\n}export default nextConfig;","version":"2"},"csharp":{"source":"using Next;\n\n\nvar nextConfig = new Dictionary<string, object> {\n // ...\n { \"adapterPath\", import.meta.Resolve(\"cdk-nextjs/adapter\") }\n};export default nextConfig;","version":"1"},"java":{"source":"import next.NextConfig;\n\n\nNextConfig nextConfig = Map.of(\n // ...\n \"adapterPath\", import.meta.resolve(\"cdk-nextjs/adapter\"));export default nextConfig;","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/next\"\n\n\nnextConfig := map[string]interface{}{\n\t// ...\n\t\"adapterPath\": import.meta.resolve(jsii.String(\"cdk-nextjs/adapter\")),\n}export default nextConfig;","version":"1"},"$":{"source":"import { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: import.meta.resolve(\"cdk-nextjs/adapter\"), // for ESM\n // adapterPath: require.resolve(\"cdk-nextjs/adapter\"), // for CJS\n};\n\nexport default nextConfig;","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":51}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { NextConfig } from \"next\";\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: import.meta.resolve(\"cdk-nextjs/adapter\"), // for ESM\n // adapterPath: require.resolve(\"cdk-nextjs/adapter\"), // for CJS\n};\n\nexport default nextConfig;\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":2,"80":7,"184":1,"211":1,"212":1,"214":1,"237":1,"244":1,"261":1,"262":1,"273":1,"274":1,"276":1,"277":1,"278":1,"304":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"29f119aec1e5478a318ae318279508e9b76b5c834a9be35edf466c62e5077306":{"translations":{"python":{"source":"from aws_cdk import App, Stack, StackProps\nfrom constructs import Construct\nfrom cdk_nextjs import NextjsGlobalFunctions\nfrom node:path import join\n\n\nclass WebStack(Stack):\n def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, notificationArns=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None, propertyInjectors=None):\n super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, notificationArns=notificationArns, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation, propertyInjectors=propertyInjectors)\n NextjsGlobalFunctions(self, \"Nextjs\",\n build_directory=join(import.meta.dirname),\n health_check_path=\"/api/health\"\n )\n\napp = App()\n\nWebStack(app, \"web-stack\")","version":"2"},"csharp":{"source":"using Amazon.CDK;\nusing Constructs;\nusing Cdk.Nextjs;\nusing Node.Path;\n\nclass WebStack : Stack\n{\n public WebStack(Construct scope, string id, StackProps? props=null) : base(scope, id, props)\n {\n new NextjsGlobalFunctions(this, \"Nextjs\", new NextjsGlobalFunctionsProps {\n BuildDirectory = Join(import.meta.Dirname),\n HealthCheckPath = \"/api/health\"\n });\n }\n}\n\nvar app = new App();\n\nnew WebStack(app, \"web-stack\");","version":"1"},"java":{"source":"import software.amazon.awscdk.App;\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.constructs.Construct;\nimport cdk.nextjs.NextjsGlobalFunctions;\nimport node.path.join.*;\n\n\npublic class WebStack extends Stack {\n public WebStack(Construct scope, String id) {\n this(scope, id, null);\n }\n\n public WebStack(Construct scope, String id, StackProps props) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", new NextjsGlobalFunctionsProps()\n .buildDirectory(join(import.meta.getDirname()))\n .healthCheckPath(\"/api/health\")\n );\n }\n}\n\nApp app = new App();\n\nnew WebStack(app, \"web-stack\");","version":"1"},"go":{"source":"import \"github.com/aws/aws-cdk-go/awscdk\"\nimport \"github.com/aws/constructs-go/constructs\"\nimport \"github.com/aws-samples/dummy/cdknextjs\"\nimport \"github.com/aws-samples/dummy/nodepath\"\n\n\ntype webStack struct {\n\tStack\n}\n\nfunc newWebStack(scope Construct, id *string, props StackProps) *webStack {\n\tthis := &webStack{}\n\tnewStack_Override(this, scope, id, props)\n\tcdknextjs.NewNextjsGlobalFunctions(this, jsii.String(\"Nextjs\"), &NextjsGlobalFunctionsProps{\n\t\tbuildDirectory: *nodepath.Join(import.meta.dirname),\n\t\thealthCheckPath: jsii.String(\"/api/health\"),\n\t})\n\treturn this\n}\n\napp := awscdk.NewApp()\n\nNewWebStack(app, jsii.String(\"web-stack\"))","version":"1"},"$":{"source":"import { App, Stack, StackProps } from \"aws-cdk-lib\";\nimport { Construct } from \"constructs\";\nimport { NextjsGlobalFunctions } from \"cdk-nextjs\";\nimport { join } from \"node:path\";\n\nclass WebStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n healthCheckPath: \"/api/health\",\n });\n }\n}\n\nconst app = new App();\n\nnew WebStack(app, \"web-stack\");","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":72}},"didCompile":false,"fqnsReferenced":["aws-cdk-lib.App","aws-cdk-lib.Stack","aws-cdk-lib.StackProps","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { App, Stack, StackProps } from \"aws-cdk-lib\";\nimport { Construct } from \"constructs\";\nimport { NextjsGlobalFunctions } from \"cdk-nextjs\";\nimport { join } from \"node:path\";\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nclass WebStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n healthCheckPath: \"/api/health\",\n });\n }\n}\n\nconst app = new App();\n\nnew WebStack(app, \"web-stack\");\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":7,"58":1,"80":26,"108":1,"110":1,"154":1,"170":3,"177":1,"184":2,"211":1,"212":1,"214":2,"215":3,"234":1,"237":1,"242":1,"244":1,"245":3,"261":1,"262":1,"264":1,"273":4,"274":4,"276":4,"277":6,"299":1,"304":2,"308":1},"fqnsFingerprint":"145b4405ac9ff91eca67e9621fe0343c2cba98d9cba615a2c0eb0088dc3bf5f5"},"d1f22faa68ac77f64682156b6d2791c788b48db8661c81875c6d7d608da8e8c8":{"translations":{"python":{"source":"nextjs = NextjsRegionalContainers(self, \"Nextjs\",\n # ...\n alb=shared_alb,\n ecs_cluster=shared_cluster\n)\nnextjs.nextjs_containers.remove_auto_created_listener()","version":"2"},"csharp":{"source":"var nextjs = new NextjsRegionalContainers(this, \"Nextjs\", new Struct {\n // ...\n Alb = sharedAlb,\n EcsCluster = sharedCluster\n});\nnextjs.NextjsContainers.RemoveAutoCreatedListener();","version":"1"},"java":{"source":"Object nextjs = NextjsRegionalContainers.Builder.create(this, \"Nextjs\")\n // ...\n .alb(sharedAlb)\n .ecsCluster(sharedCluster)\n .build();\nnextjs.nextjsContainers.removeAutoCreatedListener();","version":"1"},"go":{"source":"nextjs := NewNextjsRegionalContainers(this, jsii.String(\"Nextjs\"), map[string]interface{}{\n\t// ...\n\t\"alb\": sharedAlb,\n\t\"ecsCluster\": sharedCluster,\n})\nnextjs.nextjsContainers.removeAutoCreatedListener()","version":"1"},"$":{"source":"const nextjs = new NextjsRegionalContainers(this, \"Nextjs\", {\n // ...\n alb: sharedAlb,\n ecsCluster: sharedCluster,\n});\nnextjs.nextjsContainers.removeAutoCreatedListener();","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":290}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst nextjs = new NextjsRegionalContainers(this, \"Nextjs\", {\n // ...\n alb: sharedAlb,\n ecsCluster: sharedCluster,\n});\nnextjs.nextjsContainers.removeAutoCreatedListener();\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":9,"110":1,"211":1,"212":2,"214":1,"215":1,"244":1,"245":1,"261":1,"262":1,"304":2},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"eebd1de809f293785090f12b543c097e97d49dda8190f1af2cdea4bba3f0ff19":{"translations":{"python":{"source":"join(import.meta.dirname, \"..\", \"web\")or\"/path/to/nextjs/app\"","version":"2"},"csharp":{"source":"Join(import.meta.Dirname, \"..\", \"web\");or;\"/path/to/nextjs/app\";","version":"1"},"java":{"source":"join(import.meta.getDirname(), \"..\", \"web\");or;\"/path/to/nextjs/app\";","version":"1"},"go":{"source":"join(import.meta.dirname, jsii.String(\"..\"), jsii.String(\"web\"))or\"/path/to/nextjs/app\"","version":"1"},"$":{"source":"join(import.meta.dirname, \"..\", \"web\") or \"/path/to/nextjs/app\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBaseProps","memberName":"buildDirectory"},"field":{"field":"example"}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\njoin(import.meta.dirname, \"..\", \"web\") or \"/path/to/nextjs/app\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":3,"80":4,"212":1,"214":1,"237":1,"245":3},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"a7b9d2f8587b8d5b579035aaa8e7a16f3fc2ab9bc33261b18c6274f5c63a18a5":{"translations":{"python":{"source":"# api/health/route.ts\nfrom next.server import NextResponse\n\n\ndef GET(self):\n return NextResponse.json(\"\")","version":"2"},"csharp":{"source":"// api/health/route.ts\nusing Next.Server;\n\n\npublic void GET()\n{\n return NextResponse.Json(\"\");\n}","version":"1"},"java":{"source":"// api/health/route.ts\nimport next.server.NextResponse;\n\n\npublic void GET() {\n return NextResponse.json(\"\");\n}","version":"1"},"go":{"source":"// api/health/route.ts\nimport \"github.com/aws-samples/dummy/next/server\"\n\n\nfunc GET() {\n\treturn nextserver.NextResponse_Json(jsii.String(\"\"))\n}","version":"1"},"$":{"source":"// api/health/route.ts\nimport { NextResponse } from \"next/server\";\n\nexport function GET() {\n return NextResponse.json(\"\");\n}","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBaseProps","memberName":"healthCheckPath"},"field":{"field":"example"}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\n// api/health/route.ts\nimport { NextResponse } from \"next/server\";\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nexport function GET() {\n return NextResponse.json(\"\");\n}\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":2,"80":4,"95":1,"212":1,"214":1,"242":1,"254":1,"263":1,"273":1,"274":1,"276":1,"277":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"1cbb888be6a3669675e797a75a9f52fb0a6a159d237defd0f8435ac3d4d3ebb4":{"translations":{"python":{"source":"\"/my-base-path\"","version":"2"},"csharp":{"source":"\"/my-base-path\";","version":"1"},"java":{"source":"\"/my-base-path\";","version":"1"},"go":{"source":"\"/my-base-path\"","version":"1"},"$":{"source":"\"/my-base-path\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBaseProps","memberName":"basePath"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/my-base-path\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"f905a28200f10c594d3eb92a4d1493c9f86e5e51f0a7ab26cb2174f8ad7f5e50":{"translations":{"python":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"2"},"csharp":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\";","version":"1"},"java":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\";","version":"1"},"go":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"1"},"$":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"initCacheDir"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"2a436a09ffe5a1e0afff87dc56af97f78eaacdf9234591d3b5e0355b0a2f6ab6":{"translations":{"python":{"source":"\"/Users/john/myapp/public\"","version":"2"},"csharp":{"source":"\"/Users/john/myapp/public\";","version":"1"},"java":{"source":"\"/Users/john/myapp/public\";","version":"1"},"go":{"source":"\"/Users/john/myapp/public\"","version":"1"},"$":{"source":"\"/Users/john/myapp/public\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"publicDirEntries"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/Users/john/myapp/public\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"eb4fd1c904ebd2230509f4b8d9fe8f13e8f95c0fb55ca31da9b3a6d7666f4e68":{"translations":{"python":{"source":"\"./packages/ui/server.js\"(monorepo)","version":"2"},"csharp":{"source":"\"./packages/ui/server.js\"(monorepo);","version":"1"},"java":{"source":"\"./packages/ui/server.js\"(monorepo);","version":"1"},"go":{"source":"\"./packages/ui/server.js\"(monorepo)","version":"1"},"$":{"source":"\"./packages/ui/server.js\" (monorepo)","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"relativePathToEntrypoint"},"field":{"field":"example"}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"./packages/ui/server.js\" (monorepo)\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":1,"214":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"186f22f1a60359d2b2bd35fe7e2a4f5e43201b583be96c160ac9bc2c6f0a1e95":{"translations":{"python":{"source":"\"./apps/web\"for monorepo apps","version":"2"},"csharp":{"source":"\"./apps/web\";for monorepo apps","version":"1"},"java":{"source":"\"./apps/web\";for monorepo apps","version":"1"},"go":{"source":"\"./apps/web\"for monorepo apps","version":"1"},"$":{"source":"\"./apps/web\" for monorepo apps","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"relativePathToPackage"},"field":{"field":"example"}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"./apps/web\" for monorepo apps\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":4,"245":2,"249":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"d68554f1f764c619c525f6b65f384648a5aace63035f4a7b863ebde1914d3df2":{"translations":{"python":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"2"},"csharp":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\";","version":"1"},"java":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\";","version":"1"},"go":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"1"},"$":{"source":"\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsCacheProps","memberName":"initCacheDir"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/Users/john/myapp/.next/cdk-nextjs-init-cache\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"5fc189c24759b4e5e2cea45070d7fd9cf597aebbd5a3bdbc0a2c727e76671e1b":{"translations":{"python":{"source":"\"/my-base-path\"","version":"2"},"csharp":{"source":"\"/my-base-path\";","version":"1"},"java":{"source":"\"/my-base-path\";","version":"1"},"go":{"source":"\"/my-base-path\"","version":"1"},"$":{"source":"\"/my-base-path\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsStaticAssetsProps","memberName":"basePath"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\"/my-base-path\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"cd644042f0973329e2dccbf56e94f70ca3e8f314957ab500562b37d8a25b6f2a":{"translations":{"python":{"source":"# use the provider framework from aws-cdk/custom-resources:\nprovider = customresources.Provider(self, \"ResourceProvider\",\n on_event_handler=on_event_handler,\n is_complete_handler=is_complete_handler\n)\n\nCustomResource(self, \"MyResource\",\n service_token=provider.service_token\n)","version":"2"},"csharp":{"source":"// use the provider framework from aws-cdk/custom-resources:\nvar provider = new customresources.Provider(this, \"ResourceProvider\", new Struct {\n OnEventHandler = onEventHandler,\n IsCompleteHandler = isCompleteHandler\n});\n\nnew CustomResource(this, \"MyResource\", new Struct {\n ServiceToken = provider.ServiceToken\n});","version":"1"},"java":{"source":"// use the provider framework from aws-cdk/custom-resources:\nObject provider = Provider.Builder.create(this, \"ResourceProvider\")\n .onEventHandler(onEventHandler)\n .isCompleteHandler(isCompleteHandler)\n .build();\n\nCustomResource.Builder.create(this, \"MyResource\")\n .serviceToken(provider.getServiceToken())\n .build();","version":"1"},"go":{"source":"// use the provider framework from aws-cdk/custom-resources:\nprovider := customresources.NewProvider(this, jsii.String(\"ResourceProvider\"), map[string]interface{}{\n\t\"onEventHandler\": onEventHandler,\n\t\"isCompleteHandler\": isCompleteHandler,\n})\n\nNewCustomResource(this, jsii.String(\"MyResource\"), map[string]interface{}{\n\t\"serviceToken\": provider.serviceToken,\n})","version":"1"},"$":{"source":"// use the provider framework from aws-cdk/custom-resources:\nconst provider = new customresources.Provider(this, 'ResourceProvider', {\n onEventHandler,\n isCompleteHandler, // optional\n});\n\nnew CustomResource(this, 'MyResource', {\n serviceToken: provider.serviceToken,\n});","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalCustomResourceProps","memberName":"serviceToken"},"field":{"field":"markdown","line":11}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n// use the provider framework from aws-cdk/custom-resources:\nconst provider = new customresources.Provider(this, 'ResourceProvider', {\n onEventHandler,\n isCompleteHandler, // optional\n});\n\nnew CustomResource(this, 'MyResource', {\n serviceToken: provider.serviceToken,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":2,"80":9,"110":2,"211":2,"212":2,"215":2,"244":1,"245":1,"261":1,"262":1,"304":1,"305":2},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"5442213b3596082847e8f52535f015070c171ef269b2fc2cc70080da1248abd3":{"translations":{"python":{"source":"# invoke an AWS Lambda function when a lifecycle event occurs:\nCustomResource(self, \"MyResource\",\n service_token=my_function.function_arn\n)","version":"2"},"csharp":{"source":"// invoke an AWS Lambda function when a lifecycle event occurs:\n// invoke an AWS Lambda function when a lifecycle event occurs:\nnew CustomResource(this, \"MyResource\", new Struct {\n ServiceToken = myFunction.FunctionArn\n});","version":"1"},"java":{"source":"// invoke an AWS Lambda function when a lifecycle event occurs:\n// invoke an AWS Lambda function when a lifecycle event occurs:\nCustomResource.Builder.create(this, \"MyResource\")\n .serviceToken(myFunction.getFunctionArn())\n .build();","version":"1"},"go":{"source":"// invoke an AWS Lambda function when a lifecycle event occurs:\n// invoke an AWS Lambda function when a lifecycle event occurs:\nNewCustomResource(this, jsii.String(\"MyResource\"), map[string]interface{}{\n\t\"serviceToken\": myFunction.functionArn,\n})","version":"1"},"$":{"source":"// invoke an AWS Lambda function when a lifecycle event occurs:\nnew CustomResource(this, 'MyResource', {\n serviceToken: myFunction.functionArn,\n});","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalCustomResourceProps","memberName":"serviceToken"},"field":{"field":"markdown","line":26}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n// invoke an AWS Lambda function when a lifecycle event occurs:\nnew CustomResource(this, 'MyResource', {\n serviceToken: myFunction.functionArn,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":4,"110":1,"211":1,"212":1,"215":1,"245":1,"304":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"1aa088d0fe1a5c8b611ee12b98f8ddddf680e78e92b8bfbc004d7f1d81e0db05":{"translations":{"python":{"source":"# publish lifecycle events to an SNS topic:\nCustomResource(self, \"MyResource\",\n service_token=my_topic.topic_arn\n)","version":"2"},"csharp":{"source":"// publish lifecycle events to an SNS topic:\n// publish lifecycle events to an SNS topic:\nnew CustomResource(this, \"MyResource\", new Struct {\n ServiceToken = myTopic.TopicArn\n});","version":"1"},"java":{"source":"// publish lifecycle events to an SNS topic:\n// publish lifecycle events to an SNS topic:\nCustomResource.Builder.create(this, \"MyResource\")\n .serviceToken(myTopic.getTopicArn())\n .build();","version":"1"},"go":{"source":"// publish lifecycle events to an SNS topic:\n// publish lifecycle events to an SNS topic:\nNewCustomResource(this, jsii.String(\"MyResource\"), map[string]interface{}{\n\t\"serviceToken\": myTopic.topicArn,\n})","version":"1"},"$":{"source":"// publish lifecycle events to an SNS topic:\nnew CustomResource(this, 'MyResource', {\n serviceToken: myTopic.topicArn,\n});","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalCustomResourceProps","memberName":"serviceToken"},"field":{"field":"markdown","line":36}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n// publish lifecycle events to an SNS topic:\nnew CustomResource(this, 'MyResource', {\n serviceToken: myTopic.topicArn,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":4,"110":1,"211":1,"212":1,"215":1,"245":1,"304":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"416cd627e7165af9844b0610f2556618f7e4e17c479a2b5cb37749b400206b42":{"translations":{"python":{"source":"import aws_cdk.aws_logs as logs\n\n# my_log_group: logs.LogGroup\n\nmy_log_group.log_group_name","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Logs;\n\nLogGroup myLogGroup;\n\nmyLogGroup.LogGroupName;","version":"1"},"java":{"source":"import software.amazon.awscdk.services.logs.*;\n\nLogGroup myLogGroup;\n\nmyLogGroup.getLogGroupName();","version":"1"},"go":{"source":"import logs \"github.com/aws/aws-cdk-go/awscdk\"\n\nvar myLogGroup LogGroup\n\nmyLogGroup.logGroupName","version":"1"},"$":{"source":"import * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\nmyLogGroup.logGroupName;","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalDockerImageFunctionProps","memberName":"logRetention"},"field":{"field":"markdown","line":12}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\nmyLogGroup.logGroupName;\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":6,"138":1,"167":1,"184":1,"212":1,"244":1,"245":1,"261":1,"262":1,"273":1,"274":1,"275":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"8649823826e479c4a10bdb07d7c9d4248a9e1f7d74b0ad412728a606cb14b9e0":{"translations":{"python":{"source":"import aws_cdk.aws_logs as logs\n\n# my_log_group: logs.LogGroup\n\nmy_log_group.log_group_name","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Logs;\n\nLogGroup myLogGroup;\n\nmyLogGroup.LogGroupName;","version":"1"},"java":{"source":"import software.amazon.awscdk.services.logs.*;\n\nLogGroup myLogGroup;\n\nmyLogGroup.getLogGroupName();","version":"1"},"go":{"source":"import logs \"github.com/aws/aws-cdk-go/awscdk\"\n\nvar myLogGroup LogGroup\n\nmyLogGroup.logGroupName","version":"1"},"$":{"source":"import * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\nmyLogGroup.logGroupName;","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalEdgeFunctionProps","memberName":"logRetention"},"field":{"field":"markdown","line":12}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\nmyLogGroup.logGroupName;\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":6,"138":1,"167":1,"184":1,"212":1,"244":1,"245":1,"261":1,"262":1,"273":1,"274":1,"275":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"7a3ea40a322406557f6dd54b49201abcd4b96cf7ddf4d4049324acbe8f6aaa67":{"translations":{"python":{"source":"import aws_cdk.aws_logs as logs\n\n# my_log_group: logs.LogGroup\n\nmy_log_group.log_group_name","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Logs;\n\nLogGroup myLogGroup;\n\nmyLogGroup.LogGroupName;","version":"1"},"java":{"source":"import software.amazon.awscdk.services.logs.*;\n\nLogGroup myLogGroup;\n\nmyLogGroup.getLogGroupName();","version":"1"},"go":{"source":"import logs \"github.com/aws/aws-cdk-go/awscdk\"\n\nvar myLogGroup LogGroup\n\nmyLogGroup.logGroupName","version":"1"},"$":{"source":"import * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\nmyLogGroup.logGroupName;","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalFunctionProps","memberName":"logRetention"},"field":{"field":"markdown","line":12}},"didCompile":true,"fqnsReferenced":[],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport * as logs from 'aws-cdk-lib/aws-logs';\n\ndeclare const myLogGroup: logs.LogGroup;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\nmyLogGroup.logGroupName;\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"80":6,"138":1,"167":1,"184":1,"212":1,"244":1,"245":1,"261":1,"262":1,"273":1,"274":1,"275":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"24dbf2206251fc4c3783340dbeecc425f704203d1ed3601b7afe676188f4677a":{"translations":{"python":{"source":"ec2.Vpc(self, \"VPC\",\n subnet_configuration=[{\n \"cidr_mask\": 24,\n \"name\": \"ingress\",\n \"subnet_type\": ec2.SubnetType.PUBLIC\n }, {\n \"cidr_mask\": 24,\n \"name\": \"application\",\n \"subnet_type\": ec2.SubnetType.PRIVATE_WITH_EGRESS\n }, {\n \"cidr_mask\": 28,\n \"name\": \"rds\",\n \"subnet_type\": ec2.SubnetType.PRIVATE_ISOLATED\n }\n ]\n)","version":"2"},"csharp":{"source":"new ec2.Vpc(this, \"VPC\", new Struct {\n SubnetConfiguration = new [] { new Struct {\n CidrMask = 24,\n Name = \"ingress\",\n SubnetType = ec2.SubnetType.PUBLIC\n }, new Struct {\n CidrMask = 24,\n Name = \"application\",\n SubnetType = ec2.SubnetType.PRIVATE_WITH_EGRESS\n }, new Struct {\n CidrMask = 28,\n Name = \"rds\",\n SubnetType = ec2.SubnetType.PRIVATE_ISOLATED\n } }\n});","version":"1"},"java":{"source":"Vpc.Builder.create(this, \"VPC\")\n .subnetConfiguration(List.of(Map.of(\n \"cidrMask\", 24,\n \"name\", \"ingress\",\n \"subnetType\", ec2.getSubnetType().getPUBLIC()), Map.of(\n \"cidrMask\", 24,\n \"name\", \"application\",\n \"subnetType\", ec2.getSubnetType().getPRIVATE_WITH_EGRESS()), Map.of(\n \"cidrMask\", 28,\n \"name\", \"rds\",\n \"subnetType\", ec2.getSubnetType().getPRIVATE_ISOLATED())))\n .build();","version":"1"},"go":{"source":"ec2.NewVpc(this, jsii.String(\"VPC\"), map[string][]map[string]interface{}{\n\t\"subnetConfiguration\": []map[string]interface{}{\n\t\tmap[string]interface{}{\n\t\t\t\"cidrMask\": jsii.Number(24),\n\t\t\t\"name\": jsii.String(\"ingress\"),\n\t\t\t\"subnetType\": ec2.SubnetType_PUBLIC,\n\t\t},\n\t\tmap[string]interface{}{\n\t\t\t\"cidrMask\": jsii.Number(24),\n\t\t\t\"name\": jsii.String(\"application\"),\n\t\t\t\"subnetType\": ec2.SubnetType_PRIVATE_WITH_EGRESS,\n\t\t},\n\t\tmap[string]interface{}{\n\t\t\t\"cidrMask\": jsii.Number(28),\n\t\t\t\"name\": jsii.String(\"rds\"),\n\t\t\t\"subnetType\": ec2.SubnetType_PRIVATE_ISOLATED,\n\t\t},\n\t},\n})","version":"1"},"$":{"source":"new ec2.Vpc(this, 'VPC', {\n subnetConfiguration: [\n {\n cidrMask: 24,\n name: 'ingress',\n subnetType: ec2.SubnetType.PUBLIC,\n },\n {\n cidrMask: 24,\n name: 'application',\n subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,\n },\n {\n cidrMask: 28,\n name: 'rds',\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n }\n ]\n});","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.OptionalVpcProps","memberName":"subnetConfiguration"},"field":{"field":"markdown","line":7}},"didCompile":false,"fqnsReferenced":[],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew ec2.Vpc(this, 'VPC', {\n subnetConfiguration: [\n {\n cidrMask: 24,\n name: 'ingress',\n subnetType: ec2.SubnetType.PUBLIC,\n },\n {\n cidrMask: 24,\n name: 'application',\n subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,\n },\n {\n cidrMask: 28,\n name: 'rds',\n subnetType: ec2.SubnetType.PRIVATE_ISOLATED,\n }\n ]\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"9":3,"11":4,"80":21,"110":1,"210":1,"211":4,"212":7,"215":1,"245":1,"304":10},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}}}
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
cdk-nextjs is a JSII-compatible AWS CDK construct library that deploys Next.js apps on AWS. It publishes to npm as `cdk-nextjs` and is managed by [projen](https://projen.io/) via `.projenrc.ts`.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Full build (compile + lint + test + bundle + package)
|
|
13
|
+
pnpm build
|
|
14
|
+
|
|
15
|
+
# Compile JSII (must run before `pnpm build` when generated-structs change)
|
|
16
|
+
pnpm compile
|
|
17
|
+
|
|
18
|
+
# Run all tests
|
|
19
|
+
pnpm test
|
|
20
|
+
|
|
21
|
+
# Run a single test file
|
|
22
|
+
pnpm jest src/adapter/cache-handler.test.ts
|
|
23
|
+
pnpm jest src/nextjs-cache.test.ts
|
|
24
|
+
|
|
25
|
+
# Lint
|
|
26
|
+
pnpm eslint
|
|
27
|
+
|
|
28
|
+
# Bundle adapter/lambdas (esbuild)
|
|
29
|
+
pnpm bundle
|
|
30
|
+
|
|
31
|
+
# Regenerate projen-managed files after editing .projenrc.ts
|
|
32
|
+
pnpm projen
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Important**: After modifying `.projenrc.ts`, run `pnpm projen` to regenerate managed files. Do not hand-edit projen-managed files (they have a header comment indicating this).
|
|
36
|
+
|
|
37
|
+
## Build Order Quirk
|
|
38
|
+
|
|
39
|
+
The project uses `@mrgrain/jsii-struct-builder` to generate "Optional" versions of structs (in `src/generated-structs/`). This tool reads the `.jsii` assembly, which means you must run `pnpm compile` before `pnpm build` when struct definitions change. CI workflows are patched in `.projenrc.ts` to insert this compile step.
|
|
40
|
+
|
|
41
|
+
## Architecture
|
|
42
|
+
|
|
43
|
+
### Root Constructs (user-facing entry points)
|
|
44
|
+
`src/root-constructs/` — the four deployment patterns users choose from:
|
|
45
|
+
- **NextjsGlobalFunctions** — CloudFront + Lambda
|
|
46
|
+
- **NextjsGlobalContainers** — CloudFront + Fargate
|
|
47
|
+
- **NextjsRegionalContainers** — ALB + Fargate (no CloudFront, GovCloud compatible)
|
|
48
|
+
- **NextjsRegionalFunctions** — Lambda Function URLs (no CloudFront, GovCloud compatible)
|
|
49
|
+
|
|
50
|
+
Each root construct composes lower-level constructs (NextjsBuild, NextjsFunctions/NextjsContainers, NextjsDistribution, NextjsCache, NextjsStaticAssets, NextjsPostDeploy).
|
|
51
|
+
|
|
52
|
+
### Runtime Code (bundled with esbuild, not compiled by JSII)
|
|
53
|
+
- `src/adapter/adapter.mts` — Next.js adapter (ESM, runs in Lambda/Fargate at request time)
|
|
54
|
+
- `src/adapter/cache-handler.ts` — Next.js cache handler orchestrating S3 + DynamoDB + memory cache
|
|
55
|
+
- `src/nextjs-build/patch-fetch.js` — injected into Next.js build to patch fetch behavior
|
|
56
|
+
|
|
57
|
+
These are bundled to `lib/adapter/*.mjs` and `lib/nextjs-build/patch-fetch.js`. They use devDependencies at build time (AWS SDK, etc.) that are available at runtime in Lambda/Fargate.
|
|
58
|
+
|
|
59
|
+
### Generated Structs
|
|
60
|
+
`src/generated-structs/` — auto-generated by projen via `@mrgrain/jsii-struct-builder`. These create "all optional" versions of CDK/construct props for the `overrides` pattern. Do not hand-edit.
|
|
61
|
+
|
|
62
|
+
### Lambdas
|
|
63
|
+
`src/lambdas/post-deploy/` — custom resource Lambda for post-deployment tasks (CloudFront invalidation, cache seeding).
|
|
64
|
+
|
|
65
|
+
### Test Files
|
|
66
|
+
Tests live alongside source (`src/**/*.test.ts`) for adapter/cache code. CDK construct snapshot/assertion tests would go in `test/`.
|
|
67
|
+
|
|
68
|
+
## Key Conventions
|
|
69
|
+
|
|
70
|
+
- **JSII constraints**: Source in `src/` must be JSII-compatible TypeScript (no mapped types like `Partial<T>`, no enums re-export, etc.). Runtime-only code (adapter, cache-handler) is bundled separately and exempt.
|
|
71
|
+
- **Overrides pattern**: Every construct exposes an `overrides` prop that passes raw CDK props through, allowing users to customize underlying resources.
|
|
72
|
+
- **Conventional commits**: PRs require semantic title prefixes: `feat`, `fix`, `chore`, `refactor`, `perf`, `docs`, `style`, `test`, `build`, `ci`.
|
|
73
|
+
- **Releasable commits**: Only `feat`, `fix`, `chore`, `refactor`, `perf` trigger a release.
|
|
74
|
+
- **Package manager**: pnpm (v10). Use `pnpm dlx projen <task>` or the package.json script shortcuts.
|
|
75
|
+
- **Node version**: 24 (Lambda runtime target).
|
|
76
|
+
- **ESLint**: import ordering is enforced (builtin → external, alphabetical). Prettier is integrated.
|
|
@@ -6,7 +6,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
|
|
9
|
+
try {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
} catch (e) {
|
|
12
|
+
throw mod = 0, e;
|
|
13
|
+
}
|
|
10
14
|
};
|
|
11
15
|
var __export = (target, all) => {
|
|
12
16
|
for (var name in all)
|
package/lib/adapter/adapter.mjs
CHANGED
|
@@ -12,7 +12,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
12
12
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
13
|
});
|
|
14
14
|
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
|
|
15
|
+
try {
|
|
16
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
throw mod = 0, e;
|
|
19
|
+
}
|
|
16
20
|
};
|
|
17
21
|
var __copyProps = (to, from, except, desc) => {
|
|
18
22
|
if (from && typeof from === "object" || typeof from === "function") {
|