cdk-nextjs 0.7.13 → 0.7.15

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.
Files changed (37) hide show
  1. package/.jsii +132 -42
  2. package/.jsii.tabl.json +1 -1
  3. package/API.md +56 -0
  4. package/docs/harness-coverage.md +16 -6
  5. package/docs/next-build-output-guide.md +1 -1
  6. package/lib/adapter/adapter.mjs +1 -1
  7. package/lib/generated-structs/OptionalNextjsApiProps.d.ts +6 -0
  8. package/lib/generated-structs/OptionalNextjsApiProps.js +1 -1
  9. package/lib/generated-structs/OptionalNextjsDistributionProps.d.ts +6 -0
  10. package/lib/generated-structs/OptionalNextjsDistributionProps.js +1 -1
  11. package/lib/nextjs-api.d.ts +11 -0
  12. package/lib/nextjs-api.js +63 -9
  13. package/lib/nextjs-api.test.js +127 -1
  14. package/lib/nextjs-build/nextjs-build.js +1 -1
  15. package/lib/nextjs-cache.js +1 -1
  16. package/lib/nextjs-compute/nextjs-containers.js +1 -1
  17. package/lib/nextjs-compute/nextjs-functions.js +1 -1
  18. package/lib/nextjs-distribution.d.ts +21 -0
  19. package/lib/nextjs-distribution.js +69 -4
  20. package/lib/nextjs-distribution.test.js +132 -1
  21. package/lib/nextjs-post-deploy.js +1 -1
  22. package/lib/nextjs-static-assets.js +1 -1
  23. package/lib/root-constructs/nextjs-base-construct.d.ts +7 -0
  24. package/lib/root-constructs/nextjs-base-construct.js +14 -2
  25. package/lib/root-constructs/nextjs-global-containers.js +3 -2
  26. package/lib/root-constructs/nextjs-global-functions.js +3 -2
  27. package/lib/root-constructs/nextjs-regional-containers.js +1 -1
  28. package/lib/root-constructs/nextjs-regional-functions.js +3 -2
  29. package/lib/runtime/core.js +4 -6
  30. package/lib/runtime/http/response.d.ts +0 -6
  31. package/lib/runtime/http/response.js +1 -7
  32. package/lib/runtime/http/sink.js +10 -6
  33. package/lib/runtime/http/sink.test.js +45 -13
  34. package/lib/runtime/lambda.mjs +2 -10
  35. package/lib/runtime/server.mjs +2 -10
  36. package/package.json +1 -1
  37. package/scripts/e2e-harness/README.md +10 -8
package/.jsii.tabl.json CHANGED
@@ -1 +1 @@
1
- {"version":"2","toolVersion":"5.9.67","snippets":{"681da166f7b018ef44eaabfc167936ea0fda6ebec95f01d088df13b3881e009c":{"translations":{"python":{"source":"from next import NextConfig\n\n\nnext_config = {\n # ...\n \"adapter_path\": require.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\", require.Resolve(\"cdk-nextjs/adapter\") }\n};export default nextConfig;","version":"1"},"java":{"source":"import next.NextConfig;\n\n\nNextConfig nextConfig = Map.of(\n // ...\n \"adapterPath\", require.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\": require.resolve(jsii.String(\"cdk-nextjs/adapter\")),\n}export default nextConfig;","version":"1"},"$":{"source":"import { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: require.resolve(\"cdk-nextjs/adapter\"),\n};\n\nexport default nextConfig;","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":73}},"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: require.resolve(\"cdk-nextjs/adapter\"),\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,"244":1,"261":1,"262":1,"273":1,"274":1,"276":1,"277":1,"278":1,"304":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"eea5ab7b39f180dffa5b06407a60a4e7ffb8dfbbad2cc192338c61029f245dc5":{"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 )\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 });\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 .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})\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 });\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":94}},"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 });\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":6,"58":1,"80":25,"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":1,"308":1},"fqnsFingerprint":"dddd21a9f363ab837a6e5f55a92a0b66d859a762c270e2d658117e0facae49d1"},"2bbedaf887d0a5ca5cf1bd5b74eb969419424a5c45f9b7e0b591196a72bc19e2":{"translations":{"python":{"source":"overrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}overrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}","version":"2"},"csharp":{"source":"overrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}overrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}","version":"1"},"java":{"source":"overrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}overrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}","version":"1"},"go":{"source":"overrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}overrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}","version":"1"},"$":{"source":"// NextjsGlobalFunctions / NextjsRegionalFunctions\noverrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n},\n\n// NextjsGlobalContainers / NextjsRegionalContainers\noverrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n},","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":149}},"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// NextjsGlobalFunctions / NextjsRegionalFunctions\noverrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}\n\n// NextjsGlobalContainers / NextjsRegionalContainers\noverrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":2,"80":10,"242":8,"245":2,"257":10},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"7075426c8231aee6566866dad3807893ca8a2ccbd238796591aef619eecea120":{"translations":{"python":{"source":"NextjsGlobalFunctions(self, \"Nextjs\",\n build_directory=join(import.meta.dirname, \"..\", \"web\"),\n function_groups=[{\"name\": \"reports\", \"routes\": [\"/dashboard/reports/**\"]}, {\"name\": \"admin\", \"routes\": [\"/admin\", \"/admin/**\", \"/settings\"]}\n ]\n)","version":"2"},"csharp":{"source":"new NextjsGlobalFunctions(this, \"Nextjs\", new Struct {\n BuildDirectory = Join(import.meta.Dirname, \"..\", \"web\"),\n FunctionGroups = new [] { new Struct { Name = \"reports\", Routes = new [] { \"/dashboard/reports/**\" } }, new Struct { Name = \"admin\", Routes = new [] { \"/admin\", \"/admin/**\", \"/settings\" } } }\n});","version":"1"},"java":{"source":"NextjsGlobalFunctions.Builder.create(this, \"Nextjs\")\n .buildDirectory(join(import.meta.getDirname(), \"..\", \"web\"))\n .functionGroups(List.of(Map.of(\"name\", \"reports\", \"routes\", List.of(\"/dashboard/reports/**\")), Map.of(\"name\", \"admin\", \"routes\", List.of(\"/admin\", \"/admin/**\", \"/settings\"))))\n .build();","version":"1"},"go":{"source":"NewNextjsGlobalFunctions(this, jsii.String(\"Nextjs\"), map[string]interface{}{\n\t\"buildDirectory\": join(import.meta.dirname, jsii.String(\"..\"), jsii.String(\"web\")),\n\t\"functionGroups\": []map[string]interface{}{\n\t\tmap[string]interface{}{\n\t\t\t\"name\": jsii.String(\"reports\"),\n\t\t\t\"routes\": []*string{\n\t\t\t\tjsii.String(\"/dashboard/reports/**\"),\n\t\t\t},\n\t\t},\n\t\tmap[string]interface{}{\n\t\t\t\"name\": jsii.String(\"admin\"),\n\t\t\t\"routes\": []*string{\n\t\t\t\tjsii.String(\"/admin\"),\n\t\t\t\tjsii.String(\"/admin/**\"),\n\t\t\t\tjsii.String(\"/settings\"),\n\t\t\t},\n\t\t},\n\t},\n})","version":"1"},"$":{"source":"new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname, \"..\", \"web\"),\n functionGroups: [\n { name: \"reports\", routes: [\"/dashboard/reports/**\"] },\n { name: \"admin\", routes: [\"/admin\", \"/admin/**\", \"/settings\"] },\n ],\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":356}},"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 NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname, \"..\", \"web\"),\n functionGroups: [\n { name: \"reports\", routes: [\"/dashboard/reports/**\"] },\n { name: \"admin\", routes: [\"/admin\", \"/admin/**\", \"/settings\"] },\n ],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":9,"80":10,"110":1,"210":3,"211":3,"212":1,"214":1,"215":1,"237":1,"245":1,"304":6},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"5357d9a89210a324f6bdd5a5f902721a39e74ff7873d8cc0d8ab2c0de83a080f":{"translations":{"python":{"source":"from aws_cdk.aws_cloudfront import FunctionCode, KeyValueStore\n\n\ncredentials = KeyValueStore(self, \"Credentials\")\nNextjsGlobalFunctions(self, \"Nextjs\",\n build_directory=join(import.meta.dirname),\n viewer_request_key_value_store=credentials,\n viewer_request_function_code=FunctionCode.from_inline(\"\"\"\n import cf from \"cloudfront\";\n const kvs = cf.kvs();\n async function viewerRequest(event) {\n const auth = event.request.headers.authorization;\n try {\n if (auth && auth.value === \"Basic \" + (await kvs.get(\"basic-auth\"))) {\n // verified: don't pass the site's credentials on to the origin\n delete event.request.headers.authorization;\n return;\n }\n } catch (e) {\n // no \"basic-auth\" key yet: stay locked\n }\n return {\n statusCode: 401,\n statusDescription: \"Unauthorized\",\n headers: { \"www-authenticate\": { value: 'Basic realm=\"preview\"' } },\n };\n }\n \"\"\")\n)","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.CloudFront;\n\n\nvar credentials = new KeyValueStore(this, \"Credentials\");\nnew NextjsGlobalFunctions(this, \"Nextjs\", new Struct {\n BuildDirectory = Join(import.meta.Dirname),\n ViewerRequestKeyValueStore = credentials,\n ViewerRequestFunctionCode = FunctionCode.FromInline(@\"\n import cf from \"\"cloudfront\"\";\n const kvs = cf.kvs();\n async function viewerRequest(event) {\n const auth = event.request.headers.authorization;\n try {\n if (auth && auth.value === \"\"Basic \"\" + (await kvs.get(\"\"basic-auth\"\"))) {\n // verified: don't pass the site's credentials on to the origin\n delete event.request.headers.authorization;\n return;\n }\n } catch (e) {\n // no \"\"basic-auth\"\" key yet: stay locked\n }\n return {\n statusCode: 401,\n statusDescription: \"\"Unauthorized\"\",\n headers: { \"\"www-authenticate\"\": { value: 'Basic realm=\"\"preview\"\"' } },\n };\n }\n \")\n});","version":"1"},"java":{"source":"import software.amazon.awscdk.services.cloudfront.FunctionCode;\nimport software.amazon.awscdk.services.cloudfront.KeyValueStore;\n\n\nKeyValueStore credentials = new KeyValueStore(this, \"Credentials\");\nNextjsGlobalFunctions.Builder.create(this, \"Nextjs\")\n .buildDirectory(join(import.meta.getDirname()))\n .viewerRequestKeyValueStore(credentials)\n .viewerRequestFunctionCode(FunctionCode.fromInline(\"\\n import cf from \\\"cloudfront\\\";\\n const kvs = cf.kvs();\\n async function viewerRequest(event) {\\n const auth = event.request.headers.authorization;\\n try {\\n if (auth && auth.value === \\\"Basic \\\" + (await kvs.get(\\\"basic-auth\\\"))) {\\n // verified: don't pass the site's credentials on to the origin\\n delete event.request.headers.authorization;\\n return;\\n }\\n } catch (e) {\\n // no \\\"basic-auth\\\" key yet: stay locked\\n }\\n return {\\n statusCode: 401,\\n statusDescription: \\\"Unauthorized\\\",\\n headers: { \\\"www-authenticate\\\": { value: 'Basic realm=\\\"preview\\\"' } },\\n };\\n }\\n \"))\n .build();","version":"1"},"go":{"source":"import \"github.com/aws/aws-cdk-go/awscdk\"\n\n\ncredentials := awscdk.NewKeyValueStore(this, jsii.String(\"Credentials\"))\nNewNextjsGlobalFunctions(this, jsii.String(\"Nextjs\"), map[string]interface{}{\n\t\"buildDirectory\": join(import.meta.dirname),\n\t\"viewerRequestKeyValueStore\": credentials,\n\t\"viewerRequestFunctionCode\": awscdk.FunctionCode_fromInline(jsii.String(`\n\t import cf from \"cloudfront\";\n\t const kvs = cf.kvs();\n\t async function viewerRequest(event) {\n\t const auth = event.request.headers.authorization;\n\t try {\n\t if (auth && auth.value === \"Basic \" + (await kvs.get(\"basic-auth\"))) {\n\t // verified: don't pass the site's credentials on to the origin\n\t delete event.request.headers.authorization;\n\t return;\n\t }\n\t } catch (e) {\n\t // no \"basic-auth\" key yet: stay locked\n\t }\n\t return {\n\t statusCode: 401,\n\t statusDescription: \"Unauthorized\",\n\t headers: { \"www-authenticate\": { value: 'Basic realm=\"preview\"' } },\n\t };\n\t }\n\t `)),\n})","version":"1"},"$":{"source":"import { FunctionCode, KeyValueStore } from \"aws-cdk-lib/aws-cloudfront\";\n\nconst credentials = new KeyValueStore(this, \"Credentials\");\nnew NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n viewerRequestKeyValueStore: credentials,\n viewerRequestFunctionCode: FunctionCode.fromInline(`\n import cf from \"cloudfront\";\n const kvs = cf.kvs();\n async function viewerRequest(event) {\n const auth = event.request.headers.authorization;\n try {\n if (auth && auth.value === \"Basic \" + (await kvs.get(\"basic-auth\"))) {\n // verified: don't pass the site's credentials on to the origin\n delete event.request.headers.authorization;\n return;\n }\n } catch (e) {\n // no \"basic-auth\" key yet: stay locked\n }\n return {\n statusCode: 401,\n statusDescription: \"Unauthorized\",\n headers: { \"www-authenticate\": { value: 'Basic realm=\"preview\"' } },\n };\n }\n `),\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":465}},"didCompile":false,"fqnsReferenced":["aws-cdk-lib.aws_cloudfront.FunctionCode","aws-cdk-lib.aws_cloudfront.FunctionCode#fromInline","aws-cdk-lib.aws_cloudfront.KeyValueStore","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { FunctionCode, KeyValueStore } from \"aws-cdk-lib/aws-cloudfront\";\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 credentials = new KeyValueStore(this, \"Credentials\");\nnew NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n viewerRequestKeyValueStore: credentials,\n viewerRequestFunctionCode: FunctionCode.fromInline(`\n import cf from \"cloudfront\";\n const kvs = cf.kvs();\n async function viewerRequest(event) {\n const auth = event.request.headers.authorization;\n try {\n if (auth && auth.value === \"Basic \" + (await kvs.get(\"basic-auth\"))) {\n // verified: don't pass the site's credentials on to the origin\n delete event.request.headers.authorization;\n return;\n }\n } catch (e) {\n // no \"basic-auth\" key yet: stay locked\n }\n return {\n statusCode: 401,\n statusDescription: \"Unauthorized\",\n headers: { \"www-authenticate\": { value: 'Basic realm=\"preview\"' } },\n };\n }\n `),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":3,"15":1,"80":14,"110":2,"211":1,"212":2,"214":2,"215":2,"237":1,"244":1,"245":1,"261":1,"262":1,"273":1,"274":1,"276":1,"277":2,"304":3,"308":1},"fqnsFingerprint":"181b6e9167f049fb4bdd98d3f07c05e817ab09bd2ca9b16a46ffdea53615effc"},"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":566}},"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"},"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"},"dae30b62e0775e8f2b2bef7b327b1a796cd98bbdfe61c68dc0dd494fa9227f22":{"translations":{"python":{"source":"\"cdk-nextjs-runtime/server.mjs\"","version":"2"},"csharp":{"source":"\"cdk-nextjs-runtime/server.mjs\";","version":"1"},"java":{"source":"\"cdk-nextjs-runtime/server.mjs\";","version":"1"},"go":{"source":"\"cdk-nextjs-runtime/server.mjs\"","version":"1"},"$":{"source":"\"cdk-nextjs-runtime/server.mjs\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"relativePathToEntrypoint"},"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\"cdk-nextjs-runtime/server.mjs\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":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"},"3dd0c05334d9b64fa88aff18c8531b5f57143eb06669d23e554cbbb9e1e781ec":{"translations":{"python":{"source":"\"/api/health\"","version":"2"},"csharp":{"source":"\"/api/health\";","version":"1"},"java":{"source":"\"/api/health\";","version":"1"},"go":{"source":"\"/api/health\"","version":"1"},"$":{"source":"\"/api/health\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsContainersProps","memberName":"healthCheckPath"},"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\"/api/health\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"c07df70c698f45013b7c8ca5923eb078e454c795d1d377050206e34ebd15c388":{"translations":{"python":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"2"},"csharp":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"1"},"java":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"1"},"go":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"1"},"$":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"0"}},"location":{"api":{"api":"type","fqn":"cdk-nextjs.NextjsFunctionGroup"},"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\nfunctionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"9":1,"11":4,"80":8,"210":3,"211":4,"245":1,"257":1,"304":7},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"983f1c7187f2dd1a6ec187c3a9b2791ed614c7db4fd74fba31538d2b749daa47":{"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.NextjsGlobalContainersProps","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"},"0d636c16f20e1dd752150dc7cccabfdf142caf0c61aeb5f01fdc863cc022e058":{"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.NextjsRegionalContainersProps","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"},"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"},"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.67","snippets":{"681da166f7b018ef44eaabfc167936ea0fda6ebec95f01d088df13b3881e009c":{"translations":{"python":{"source":"from next import NextConfig\n\n\nnext_config = {\n # ...\n \"adapter_path\": require.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\", require.Resolve(\"cdk-nextjs/adapter\") }\n};export default nextConfig;","version":"1"},"java":{"source":"import next.NextConfig;\n\n\nNextConfig nextConfig = Map.of(\n // ...\n \"adapterPath\", require.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\": require.resolve(jsii.String(\"cdk-nextjs/adapter\")),\n}export default nextConfig;","version":"1"},"$":{"source":"import { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: require.resolve(\"cdk-nextjs/adapter\"),\n};\n\nexport default nextConfig;","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":73}},"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: require.resolve(\"cdk-nextjs/adapter\"),\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,"244":1,"261":1,"262":1,"273":1,"274":1,"276":1,"277":1,"278":1,"304":1,"308":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"eea5ab7b39f180dffa5b06407a60a4e7ffb8dfbbad2cc192338c61029f245dc5":{"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 )\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 });\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 .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})\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 });\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":94}},"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 });\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":6,"58":1,"80":25,"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":1,"308":1},"fqnsFingerprint":"75548238bdf1222977924058daeac529160eb08c4ce351c4629c446b867b2f61"},"2bbedaf887d0a5ca5cf1bd5b74eb969419424a5c45f9b7e0b591196a72bc19e2":{"translations":{"python":{"source":"overrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}overrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}","version":"2"},"csharp":{"source":"overrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}overrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}","version":"1"},"java":{"source":"overrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}overrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}","version":"1"},"go":{"source":"overrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}overrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}","version":"1"},"$":{"source":"// NextjsGlobalFunctions / NextjsRegionalFunctions\noverrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n},\n\n// NextjsGlobalContainers / NextjsRegionalContainers\noverrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n},","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":149}},"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// NextjsGlobalFunctions / NextjsRegionalFunctions\noverrides: {\n nextjsFunctions: {\n functionProps: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}\n\n// NextjsGlobalContainers / NextjsRegionalContainers\noverrides: {\n nextjsContainers: {\n taskImageOptions: { environment: { CDK_NEXTJS_MEMORY_CACHE_TTL_MS: \"0\" } },\n },\n}\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":2,"80":10,"242":8,"245":2,"257":10},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"7075426c8231aee6566866dad3807893ca8a2ccbd238796591aef619eecea120":{"translations":{"python":{"source":"NextjsGlobalFunctions(self, \"Nextjs\",\n build_directory=join(import.meta.dirname, \"..\", \"web\"),\n function_groups=[{\"name\": \"reports\", \"routes\": [\"/dashboard/reports/**\"]}, {\"name\": \"admin\", \"routes\": [\"/admin\", \"/admin/**\", \"/settings\"]}\n ]\n)","version":"2"},"csharp":{"source":"new NextjsGlobalFunctions(this, \"Nextjs\", new Struct {\n BuildDirectory = Join(import.meta.Dirname, \"..\", \"web\"),\n FunctionGroups = new [] { new Struct { Name = \"reports\", Routes = new [] { \"/dashboard/reports/**\" } }, new Struct { Name = \"admin\", Routes = new [] { \"/admin\", \"/admin/**\", \"/settings\" } } }\n});","version":"1"},"java":{"source":"NextjsGlobalFunctions.Builder.create(this, \"Nextjs\")\n .buildDirectory(join(import.meta.getDirname(), \"..\", \"web\"))\n .functionGroups(List.of(Map.of(\"name\", \"reports\", \"routes\", List.of(\"/dashboard/reports/**\")), Map.of(\"name\", \"admin\", \"routes\", List.of(\"/admin\", \"/admin/**\", \"/settings\"))))\n .build();","version":"1"},"go":{"source":"NewNextjsGlobalFunctions(this, jsii.String(\"Nextjs\"), map[string]interface{}{\n\t\"buildDirectory\": join(import.meta.dirname, jsii.String(\"..\"), jsii.String(\"web\")),\n\t\"functionGroups\": []map[string]interface{}{\n\t\tmap[string]interface{}{\n\t\t\t\"name\": jsii.String(\"reports\"),\n\t\t\t\"routes\": []*string{\n\t\t\t\tjsii.String(\"/dashboard/reports/**\"),\n\t\t\t},\n\t\t},\n\t\tmap[string]interface{}{\n\t\t\t\"name\": jsii.String(\"admin\"),\n\t\t\t\"routes\": []*string{\n\t\t\t\tjsii.String(\"/admin\"),\n\t\t\t\tjsii.String(\"/admin/**\"),\n\t\t\t\tjsii.String(\"/settings\"),\n\t\t\t},\n\t\t},\n\t},\n})","version":"1"},"$":{"source":"new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname, \"..\", \"web\"),\n functionGroups: [\n { name: \"reports\", routes: [\"/dashboard/reports/**\"] },\n { name: \"admin\", routes: [\"/admin\", \"/admin/**\", \"/settings\"] },\n ],\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":356}},"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 NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname, \"..\", \"web\"),\n functionGroups: [\n { name: \"reports\", routes: [\"/dashboard/reports/**\"] },\n { name: \"admin\", routes: [\"/admin\", \"/admin/**\", \"/settings\"] },\n ],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":9,"80":10,"110":1,"210":3,"211":3,"212":1,"214":1,"215":1,"237":1,"245":1,"304":6},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"5357d9a89210a324f6bdd5a5f902721a39e74ff7873d8cc0d8ab2c0de83a080f":{"translations":{"python":{"source":"from aws_cdk.aws_cloudfront import FunctionCode, KeyValueStore\n\n\ncredentials = KeyValueStore(self, \"Credentials\")\nNextjsGlobalFunctions(self, \"Nextjs\",\n build_directory=join(import.meta.dirname),\n viewer_request_key_value_store=credentials,\n viewer_request_function_code=FunctionCode.from_inline(\"\"\"\n import cf from \"cloudfront\";\n const kvs = cf.kvs();\n async function viewerRequest(event) {\n const auth = event.request.headers.authorization;\n try {\n if (auth && auth.value === \"Basic \" + (await kvs.get(\"basic-auth\"))) {\n // verified: don't pass the site's credentials on to the origin\n delete event.request.headers.authorization;\n return;\n }\n } catch (e) {\n // no \"basic-auth\" key yet: stay locked\n }\n return {\n statusCode: 401,\n statusDescription: \"Unauthorized\",\n headers: { \"www-authenticate\": { value: 'Basic realm=\"preview\"' } },\n };\n }\n \"\"\")\n)","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.CloudFront;\n\n\nvar credentials = new KeyValueStore(this, \"Credentials\");\nnew NextjsGlobalFunctions(this, \"Nextjs\", new Struct {\n BuildDirectory = Join(import.meta.Dirname),\n ViewerRequestKeyValueStore = credentials,\n ViewerRequestFunctionCode = FunctionCode.FromInline(@\"\n import cf from \"\"cloudfront\"\";\n const kvs = cf.kvs();\n async function viewerRequest(event) {\n const auth = event.request.headers.authorization;\n try {\n if (auth && auth.value === \"\"Basic \"\" + (await kvs.get(\"\"basic-auth\"\"))) {\n // verified: don't pass the site's credentials on to the origin\n delete event.request.headers.authorization;\n return;\n }\n } catch (e) {\n // no \"\"basic-auth\"\" key yet: stay locked\n }\n return {\n statusCode: 401,\n statusDescription: \"\"Unauthorized\"\",\n headers: { \"\"www-authenticate\"\": { value: 'Basic realm=\"\"preview\"\"' } },\n };\n }\n \")\n});","version":"1"},"java":{"source":"import software.amazon.awscdk.services.cloudfront.FunctionCode;\nimport software.amazon.awscdk.services.cloudfront.KeyValueStore;\n\n\nKeyValueStore credentials = new KeyValueStore(this, \"Credentials\");\nNextjsGlobalFunctions.Builder.create(this, \"Nextjs\")\n .buildDirectory(join(import.meta.getDirname()))\n .viewerRequestKeyValueStore(credentials)\n .viewerRequestFunctionCode(FunctionCode.fromInline(\"\\n import cf from \\\"cloudfront\\\";\\n const kvs = cf.kvs();\\n async function viewerRequest(event) {\\n const auth = event.request.headers.authorization;\\n try {\\n if (auth && auth.value === \\\"Basic \\\" + (await kvs.get(\\\"basic-auth\\\"))) {\\n // verified: don't pass the site's credentials on to the origin\\n delete event.request.headers.authorization;\\n return;\\n }\\n } catch (e) {\\n // no \\\"basic-auth\\\" key yet: stay locked\\n }\\n return {\\n statusCode: 401,\\n statusDescription: \\\"Unauthorized\\\",\\n headers: { \\\"www-authenticate\\\": { value: 'Basic realm=\\\"preview\\\"' } },\\n };\\n }\\n \"))\n .build();","version":"1"},"go":{"source":"import \"github.com/aws/aws-cdk-go/awscdk\"\n\n\ncredentials := awscdk.NewKeyValueStore(this, jsii.String(\"Credentials\"))\nNewNextjsGlobalFunctions(this, jsii.String(\"Nextjs\"), map[string]interface{}{\n\t\"buildDirectory\": join(import.meta.dirname),\n\t\"viewerRequestKeyValueStore\": credentials,\n\t\"viewerRequestFunctionCode\": awscdk.FunctionCode_fromInline(jsii.String(`\n\t import cf from \"cloudfront\";\n\t const kvs = cf.kvs();\n\t async function viewerRequest(event) {\n\t const auth = event.request.headers.authorization;\n\t try {\n\t if (auth && auth.value === \"Basic \" + (await kvs.get(\"basic-auth\"))) {\n\t // verified: don't pass the site's credentials on to the origin\n\t delete event.request.headers.authorization;\n\t return;\n\t }\n\t } catch (e) {\n\t // no \"basic-auth\" key yet: stay locked\n\t }\n\t return {\n\t statusCode: 401,\n\t statusDescription: \"Unauthorized\",\n\t headers: { \"www-authenticate\": { value: 'Basic realm=\"preview\"' } },\n\t };\n\t }\n\t `)),\n})","version":"1"},"$":{"source":"import { FunctionCode, KeyValueStore } from \"aws-cdk-lib/aws-cloudfront\";\n\nconst credentials = new KeyValueStore(this, \"Credentials\");\nnew NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n viewerRequestKeyValueStore: credentials,\n viewerRequestFunctionCode: FunctionCode.fromInline(`\n import cf from \"cloudfront\";\n const kvs = cf.kvs();\n async function viewerRequest(event) {\n const auth = event.request.headers.authorization;\n try {\n if (auth && auth.value === \"Basic \" + (await kvs.get(\"basic-auth\"))) {\n // verified: don't pass the site's credentials on to the origin\n delete event.request.headers.authorization;\n return;\n }\n } catch (e) {\n // no \"basic-auth\" key yet: stay locked\n }\n return {\n statusCode: 401,\n statusDescription: \"Unauthorized\",\n headers: { \"www-authenticate\": { value: 'Basic realm=\"preview\"' } },\n };\n }\n `),\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"cdk-nextjs"},"field":{"field":"markdown","line":465}},"didCompile":false,"fqnsReferenced":["aws-cdk-lib.aws_cloudfront.FunctionCode","aws-cdk-lib.aws_cloudfront.FunctionCode#fromInline","aws-cdk-lib.aws_cloudfront.KeyValueStore","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { FunctionCode, KeyValueStore } from \"aws-cdk-lib/aws-cloudfront\";\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 credentials = new KeyValueStore(this, \"Credentials\");\nnew NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n viewerRequestKeyValueStore: credentials,\n viewerRequestFunctionCode: FunctionCode.fromInline(`\n import cf from \"cloudfront\";\n const kvs = cf.kvs();\n async function viewerRequest(event) {\n const auth = event.request.headers.authorization;\n try {\n if (auth && auth.value === \"Basic \" + (await kvs.get(\"basic-auth\"))) {\n // verified: don't pass the site's credentials on to the origin\n delete event.request.headers.authorization;\n return;\n }\n } catch (e) {\n // no \"basic-auth\" key yet: stay locked\n }\n return {\n statusCode: 401,\n statusDescription: \"Unauthorized\",\n headers: { \"www-authenticate\": { value: 'Basic realm=\"preview\"' } },\n };\n }\n `),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":3,"15":1,"80":14,"110":2,"211":1,"212":2,"214":2,"215":2,"237":1,"244":1,"245":1,"261":1,"262":1,"273":1,"274":1,"276":1,"277":2,"304":3,"308":1},"fqnsFingerprint":"181b6e9167f049fb4bdd98d3f07c05e817ab09bd2ca9b16a46ffdea53615effc"},"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":566}},"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"},"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"},"dae30b62e0775e8f2b2bef7b327b1a796cd98bbdfe61c68dc0dd494fa9227f22":{"translations":{"python":{"source":"\"cdk-nextjs-runtime/server.mjs\"","version":"2"},"csharp":{"source":"\"cdk-nextjs-runtime/server.mjs\";","version":"1"},"java":{"source":"\"cdk-nextjs-runtime/server.mjs\";","version":"1"},"go":{"source":"\"cdk-nextjs-runtime/server.mjs\"","version":"1"},"$":{"source":"\"cdk-nextjs-runtime/server.mjs\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsBuild","memberName":"relativePathToEntrypoint"},"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\"cdk-nextjs-runtime/server.mjs\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":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"},"3dd0c05334d9b64fa88aff18c8531b5f57143eb06669d23e554cbbb9e1e781ec":{"translations":{"python":{"source":"\"/api/health\"","version":"2"},"csharp":{"source":"\"/api/health\";","version":"1"},"java":{"source":"\"/api/health\";","version":"1"},"go":{"source":"\"/api/health\"","version":"1"},"$":{"source":"\"/api/health\"","version":"0"}},"location":{"api":{"api":"member","fqn":"cdk-nextjs.NextjsContainersProps","memberName":"healthCheckPath"},"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\"/api/health\"\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"11":1,"245":1},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"c07df70c698f45013b7c8ca5923eb078e454c795d1d377050206e34ebd15c388":{"translations":{"python":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"2"},"csharp":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"1"},"java":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"1"},"go":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"1"},"$":{"source":"functionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]","version":"0"}},"location":{"api":{"api":"type","fqn":"cdk-nextjs.NextjsFunctionGroup"},"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\nfunctionGroups: [\n { name: \"reports\", routes: [\"/api/reports/**\"] },\n { name: \"admin\", routes: [\"/admin/**\"], overrides: { functionProps: { memorySize: 3008 } } },\n]\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}","syntaxKindCounter":{"9":1,"11":4,"80":8,"210":3,"211":4,"245":1,"257":1,"304":7},"fqnsFingerprint":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},"983f1c7187f2dd1a6ec187c3a9b2791ed614c7db4fd74fba31538d2b749daa47":{"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.NextjsGlobalContainersProps","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"},"0d636c16f20e1dd752150dc7cccabfdf142caf0c61aeb5f01fdc863cc022e058":{"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.NextjsRegionalContainersProps","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"},"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"},"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/API.md CHANGED
@@ -2853,6 +2853,7 @@ const nextjsApiProps: NextjsApiProps = { ... }
2853
2853
  | <code><a href="#cdk-nextjs.NextjsApiProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsApiOverrides">NextjsApiOverrides</a></code> | Override props for every construct. |
2854
2854
  | <code><a href="#cdk-nextjs.NextjsApiProps.property.redeployAfterUpdate">redeployAfterUpdate</a></code> | <code>boolean</code> | Deploy the stage again once each stack update has finished, so it serves the API as it is after the update. |
2855
2855
  | <code><a href="#cdk-nextjs.NextjsApiProps.property.serverFunction">serverFunction</a></code> | <code>aws-cdk-lib.aws_lambda.IFunction</code> | Required if `NextjsRegionalFunctions`. |
2856
+ | <code><a href="#cdk-nextjs.NextjsApiProps.property.serviceWorkerAllowed">serviceWorkerAllowed</a></code> | <code>string</code> | The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a resource for those files whose integration response does. Next.js uses the app's `basePath`, or `/` for none. |
2856
2857
  | <code><a href="#cdk-nextjs.NextjsApiProps.property.staticAssetsKeyPrefix">staticAssetsKeyPrefix</a></code> | <code>string</code> | S3 key prefix the static assets were uploaded under, i.e. `NextjsStaticAssets.keyPrefix`, which namespaces a shared bucket. |
2857
2858
  | <code><a href="#cdk-nextjs.NextjsApiProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | [Future] Required if `NextjsRegionalContainers`. |
2858
2859
 
@@ -2969,6 +2970,19 @@ The Lambda function for server-side rendering
2969
2970
 
2970
2971
  ---
2971
2972
 
2973
+ ##### `serviceWorkerAllowed`<sup>Optional</sup> <a name="serviceWorkerAllowed" id="cdk-nextjs.NextjsApiProps.property.serviceWorkerAllowed"></a>
2974
+
2975
+ ```typescript
2976
+ public readonly serviceWorkerAllowed: string;
2977
+ ```
2978
+
2979
+ - *Type:* string
2980
+ - *Default:* no resource; the build has no service worker
2981
+
2982
+ The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a resource for those files whose integration response does. Next.js uses the app's `basePath`, or `/` for none.
2983
+
2984
+ ---
2985
+
2972
2986
  ##### `staticAssetsKeyPrefix`<sup>Optional</sup> <a name="staticAssetsKeyPrefix" id="cdk-nextjs.NextjsApiProps.property.staticAssetsKeyPrefix"></a>
2973
2987
 
2974
2988
  ```typescript
@@ -4432,6 +4446,7 @@ const nextjsDistributionProps: NextjsDistributionProps = { ... }
4432
4446
  | <code><a href="#cdk-nextjs.NextjsDistributionProps.property.loadBalancer">loadBalancer</a></code> | <code>aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer</code> | Required if `NextjsType.GLOBAL_CONTAINERS` or `NextjsType.REGIONAL_CONTAINERS`. |
4433
4447
  | <code><a href="#cdk-nextjs.NextjsDistributionProps.property.maxCacheBehaviors">maxCacheBehaviors</a></code> | <code>number</code> | The most cache behaviors the distribution may have, the default one included. |
4434
4448
  | <code><a href="#cdk-nextjs.NextjsDistributionProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsDistributionOverrides">NextjsDistributionOverrides</a></code> | Override props for every construct. |
4449
+ | <code><a href="#cdk-nextjs.NextjsDistributionProps.property.serviceWorkerAllowed">serviceWorkerAllowed</a></code> | <code>string</code> | The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a behavior for those files whose response headers policy does. Next.js uses the app's `basePath`, or `/` for none. |
4435
4450
  | <code><a href="#cdk-nextjs.NextjsDistributionProps.property.viewerRequestFunctionCode">viewerRequestFunctionCode</a></code> | <code>aws-cdk-lib.aws_cloudfront.FunctionCode</code> | CloudFront Function code run first on every viewer request, on every behavior cdk-nextjs adds, static assets included — HTTP Basic auth on a pre-launch site, geo-gating. |
4436
4451
  | <code><a href="#cdk-nextjs.NextjsDistributionProps.property.viewerRequestKeyValueStore">viewerRequestKeyValueStore</a></code> | <code>aws-cdk-lib.aws_cloudfront.IKeyValueStore</code> | A CloudFront KeyValueStore associated with every viewer-request function {@link viewerRequestFunctionCode} is copied into (up to three, one per kind of behavior), so values it reads — Basic auth credentials, an allowlist — live outside the CloudFormation template and change without a deploy. |
4437
4452
 
@@ -4622,6 +4637,19 @@ Override props for every construct.
4622
4637
 
4623
4638
  ---
4624
4639
 
4640
+ ##### `serviceWorkerAllowed`<sup>Optional</sup> <a name="serviceWorkerAllowed" id="cdk-nextjs.NextjsDistributionProps.property.serviceWorkerAllowed"></a>
4641
+
4642
+ ```typescript
4643
+ public readonly serviceWorkerAllowed: string;
4644
+ ```
4645
+
4646
+ - *Type:* string
4647
+ - *Default:* no behavior; the build has no service worker
4648
+
4649
+ The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a behavior for those files whose response headers policy does. Next.js uses the app's `basePath`, or `/` for none.
4650
+
4651
+ ---
4652
+
4625
4653
  ##### `viewerRequestFunctionCode`<sup>Optional</sup> <a name="viewerRequestFunctionCode" id="cdk-nextjs.NextjsDistributionProps.property.viewerRequestFunctionCode"></a>
4626
4654
 
4627
4655
  ```typescript
@@ -10563,6 +10591,7 @@ const optionalNextjsApiProps: OptionalNextjsApiProps = { ... }
10563
10591
  | <code><a href="#cdk-nextjs.OptionalNextjsApiProps.property.publicDirEntries">publicDirEntries</a></code> | <code><a href="#cdk-nextjs.PublicDirEntry">PublicDirEntry</a>[]</code> | Path to directory of Next.js app's public directory. Used to add resources to API Gateway REST API for public directory to go directly to S3. |
10564
10592
  | <code><a href="#cdk-nextjs.OptionalNextjsApiProps.property.redeployAfterUpdate">redeployAfterUpdate</a></code> | <code>boolean</code> | Deploy the stage again once each stack update has finished, so it serves the API as it is after the update. |
10565
10593
  | <code><a href="#cdk-nextjs.OptionalNextjsApiProps.property.serverFunction">serverFunction</a></code> | <code>aws-cdk-lib.aws_lambda.IFunction</code> | Required if `NextjsRegionalFunctions`. |
10594
+ | <code><a href="#cdk-nextjs.OptionalNextjsApiProps.property.serviceWorkerAllowed">serviceWorkerAllowed</a></code> | <code>string</code> | The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a resource for those files whose integration response does. Next.js uses the app's `basePath`, or `/` for none. |
10566
10595
  | <code><a href="#cdk-nextjs.OptionalNextjsApiProps.property.staticAssetsBucket">staticAssetsBucket</a></code> | <code>aws-cdk-lib.aws_s3.IBucket</code> | The S3 bucket containing static assets. |
10567
10596
  | <code><a href="#cdk-nextjs.OptionalNextjsApiProps.property.staticAssetsKeyPrefix">staticAssetsKeyPrefix</a></code> | <code>string</code> | S3 key prefix the static assets were uploaded under, i.e. `NextjsStaticAssets.keyPrefix`, which namespaces a shared bucket. Independent of `basePath` above: that one is the URL prefix the REST API serves the app at (commonly the API Gateway stage), while this one is where the objects live in the bucket. `_next/static` and public directory requests are mapped to S3 keys directly, so they 404 unless this prefix is applied. |
10568
10597
  | <code><a href="#cdk-nextjs.OptionalNextjsApiProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | [Future] Required if `NextjsRegionalContainers`. |
@@ -10630,6 +10659,19 @@ The Lambda function for server-side rendering
10630
10659
 
10631
10660
  ---
10632
10661
 
10662
+ ##### `serviceWorkerAllowed`<sup>Optional</sup> <a name="serviceWorkerAllowed" id="cdk-nextjs.OptionalNextjsApiProps.property.serviceWorkerAllowed"></a>
10663
+
10664
+ ```typescript
10665
+ public readonly serviceWorkerAllowed: string;
10666
+ ```
10667
+
10668
+ - *Type:* string
10669
+ - *Default:* no resource; the build has no service worker
10670
+
10671
+ The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a resource for those files whose integration response does. Next.js uses the app's `basePath`, or `/` for none.
10672
+
10673
+ ---
10674
+
10633
10675
  ##### `staticAssetsBucket`<sup>Optional</sup> <a name="staticAssetsBucket" id="cdk-nextjs.OptionalNextjsApiProps.property.staticAssetsBucket"></a>
10634
10676
 
10635
10677
  ```typescript
@@ -11031,6 +11073,7 @@ const optionalNextjsDistributionProps: OptionalNextjsDistributionProps = { ... }
11031
11073
  | <code><a href="#cdk-nextjs.OptionalNextjsDistributionProps.property.maxCacheBehaviors">maxCacheBehaviors</a></code> | <code>number</code> | The most cache behaviors the distribution may have, the default one included. |
11032
11074
  | <code><a href="#cdk-nextjs.OptionalNextjsDistributionProps.property.nextjsType">nextjsType</a></code> | <code><a href="#cdk-nextjs.NextjsType">NextjsType</a></code> | *No description.* |
11033
11075
  | <code><a href="#cdk-nextjs.OptionalNextjsDistributionProps.property.publicDirEntries">publicDirEntries</a></code> | <code><a href="#cdk-nextjs.PublicDirEntry">PublicDirEntry</a>[]</code> | Entries (files/directories) within Next.js app's public directory. Used to add static behaviors to distribution. |
11076
+ | <code><a href="#cdk-nextjs.OptionalNextjsDistributionProps.property.serviceWorkerAllowed">serviceWorkerAllowed</a></code> | <code>string</code> | The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a behavior for those files whose response headers policy does. Next.js uses the app's `basePath`, or `/` for none. |
11034
11077
  | <code><a href="#cdk-nextjs.OptionalNextjsDistributionProps.property.viewerRequestFunctionCode">viewerRequestFunctionCode</a></code> | <code>aws-cdk-lib.aws_cloudfront.FunctionCode</code> | CloudFront Function code run first on every viewer request, on every behavior cdk-nextjs adds, static assets included — HTTP Basic auth on a pre-launch site, geo-gating. |
11035
11078
  | <code><a href="#cdk-nextjs.OptionalNextjsDistributionProps.property.viewerRequestKeyValueStore">viewerRequestKeyValueStore</a></code> | <code>aws-cdk-lib.aws_cloudfront.IKeyValueStore</code> | A CloudFront KeyValueStore associated with every viewer-request function {@link viewerRequestFunctionCode} is copied into (up to three, one per kind of behavior), so values it reads — Basic auth credentials, an allowlist — live outside the CloudFormation template and change without a deploy. |
11036
11079
 
@@ -11181,6 +11224,19 @@ Entries (files/directories) within Next.js app's public directory. Used to add s
11181
11224
 
11182
11225
  ---
11183
11226
 
11227
+ ##### `serviceWorkerAllowed`<sup>Optional</sup> <a name="serviceWorkerAllowed" id="cdk-nextjs.OptionalNextjsDistributionProps.property.serviceWorkerAllowed"></a>
11228
+
11229
+ ```typescript
11230
+ public readonly serviceWorkerAllowed: string;
11231
+ ```
11232
+
11233
+ - *Type:* string
11234
+ - *Default:* no behavior; the build has no service worker
11235
+
11236
+ The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a behavior for those files whose response headers policy does. Next.js uses the app's `basePath`, or `/` for none.
11237
+
11238
+ ---
11239
+
11184
11240
  ##### `viewerRequestFunctionCode`<sup>Optional</sup> <a name="viewerRequestFunctionCode" id="cdk-nextjs.OptionalNextjsDistributionProps.property.viewerRequestFunctionCode"></a>
11185
11241
 
11186
11242
  ```typescript
@@ -39,8 +39,8 @@ verify, which every e2e-harness run does in shard 1).
39
39
  | edge-free (the hard ceiling) | 1009 |
40
40
  | candidates after every screen | **165** |
41
41
  | deployed and screened | 472 |
42
- | in `rules.include` | 421 |
43
- | plus, per-case, in `suites` | 14 |
42
+ | in `rules.include` | 419 |
43
+ | plus, per-case, in `suites` | 16 |
44
44
 
45
45
  16.4 reopened the candidate pool. next.js replaced most `skipDeployment: true`
46
46
  calls with `// @force-gate !deploy` pragmas, and in doing so dropped the deploy
@@ -57,7 +57,7 @@ included files passing on each scheduled run.
57
57
 
58
58
  | Verdict | Files |
59
59
  | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
60
- | pass | 421 whole files, plus the passing cases of the 14 `suites` files |
60
+ | pass | 419 whole files, plus the passing cases of the 16 `suites` files |
61
61
  | fixed | the defects in the table below |
62
62
  | bug | none open |
63
63
  | upstream | 2 — `rewrites-destination-query-array`, `incremental-cache-path-traversal` |
@@ -136,9 +136,10 @@ The list is the manifest's `rules.include`; it is not duplicated here. Notes wor
136
136
  having when one of them goes red:
137
137
 
138
138
  - **Retry passes.** `app-dir/router-autoscroll`, `app-dir/bfcache-regression` and
139
- `app-dir/third-parties` each failed attempt 0 once on their own scroll or embed
140
- assertions, with no cdk-nextjs error, and passed on retry 1. The harness runs
141
- `--retries 1`. Suspect these first if a run goes red for no other reason.
139
+ `app-dir/third-parties` (now in `suites`) each failed attempt 0 once on their
140
+ own scroll or embed assertions, with no cdk-nextjs error, and passed on retry 1.
141
+ The harness runs `--retries 1`. Suspect these first if a run goes red for no
142
+ other reason.
142
143
  - **Slowest file:** `instrumentation-client-hook`, ~677s.
143
144
  - **Weakest coverage:** the three `chrome-devtools-workspace` files assert only
144
145
  `status: 404` in deploy mode (the dev-only endpoint must not be reachable in
@@ -178,6 +179,15 @@ verdict below.
178
179
  | `app-dir/metadata-streaming-parallel-routes` | 4 / 6 | 2 `should only bundle the selected metadata resolution implementation` — no signal (`@gate !deploy` inversion) |
179
180
  | `app-dir/segment-cache/metadata` | 2 / 3 | `requests only the head when the page segments are cached` — no signal (`@gate !deploy` inversion) |
180
181
  | `app-dir/segment-cache/cached-navigations` | 19 / 20 | `caches a fully static on-demand param for repeated navigations` — unsupported (`next start` serving) |
182
+ | `third-parties` (+ `app-dir/third-parties/basic`) | 3 / 4 each | `renders GTM` — no signal (counts Google's live `dataLayer` events) |
183
+
184
+ Both `third-parties` files' `renders GTM` expects `window.dataLayer` to hold
185
+ exactly the entry the page pushes. Around 2026-10-08 googletagmanager.com started
186
+ answering the fixtures' `GTM-XYZ` with a 200 instead of a 404, so Google's script
187
+ runs and adds its own events; the length came back 3 on every NextjsType, both
188
+ attempts, in the 2026-10-13 scheduled run. Upstream rewrote both cases to look for
189
+ its own entries after v16.4.0 (vercel/next.js#99896). Drop the entries once the
190
+ pin includes that change.
181
191
 
182
192
  The `next-form` case submits right after the page loads and waits for the loading
183
193
  state the router prefetched; where the prefetch has not landed, `#loading` never
@@ -42,7 +42,7 @@ We could ship this off to Lambda/Fargate and call it a day, but then we wouldn't
42
42
 
43
43
  ## S3
44
44
 
45
- .next/static is simply copied to S3 and then CloudFront is configured to forward requests with paths match `\_next/static` or any paths in `public` folder to S3. `NextjsStaticAssets` is responsible for this. We also add S3 User Metadata with `BUILD_ID` to track which static files are apart of which deployment so we can prune later. The two trees are uploaded by separate `BucketDeployment`s so that `_next/static` objects get `Cache-Control: public, max-age=31536000, immutable`, the header Next.js itself sends for them (a third gives `_next/static/service-worker` the `public, max-age=0, must-revalidate` Next.js sends for a service worker, which keeps its URL across builds): CloudFront and API Gateway serve them straight from S3, so the object's metadata is the only `Cache-Control` a browser gets. `public` files keep their names when they change, so they get no header unless `overrides.nextjsStaticAssets.bucketDeploymentProps.cacheControl` sets one.
45
+ .next/static is simply copied to S3 and then CloudFront is configured to forward requests with paths match `\_next/static` or any paths in `public` folder to S3. `NextjsStaticAssets` is responsible for this. We also add S3 User Metadata with `BUILD_ID` to track which static files are apart of which deployment so we can prune later. The two trees are uploaded by separate `BucketDeployment`s so that `_next/static` objects get `Cache-Control: public, max-age=31536000, immutable`, the header Next.js itself sends for them (a third gives `_next/static/service-worker` the `public, max-age=0, must-revalidate` Next.js sends for a service worker, which keeps its URL across builds): CloudFront and API Gateway serve them straight from S3, so the object's metadata is the only `Cache-Control` a browser gets. S3 can't send the `Service-Worker-Allowed` header Next.js adds for a service worker (the app's `basePath`, or `/`), which lets it register at a scope above its own directory, so a build with service workers gets a `_next/static/service-worker/*` cache behavior (CloudFront, one more against the behavior quota) or resource (API Gateway) that sends it. `public` files keep their names when they change, so they get no header unless `overrides.nextjsStaticAssets.bucketDeploymentProps.cacheControl` sets one.
46
46
 
47
47
  Note, with `NextjsRegionalContainers`, we unfortunately cannot configure ALB to forward static requests directly to S3 because the host header dictates which bucket you can route requests to and it's not reliable to manually name buckets based on your domain. Therefore, static assets are copied into the container image to be served in ECS Fargate.
48
48
 
@@ -951,7 +951,7 @@ var require_package = __commonJS({
951
951
  publishConfig: {
952
952
  access: "public"
953
953
  },
954
- version: "0.7.13",
954
+ version: "0.7.15",
955
955
  packageManager: "pnpm@10.32.1",
956
956
  jest: {
957
957
  coverageProvider: "v8",
@@ -20,6 +20,12 @@ export interface OptionalNextjsApiProps {
20
20
  * @stability stable
21
21
  */
22
22
  readonly staticAssetsKeyPrefix?: string;
23
+ /**
24
+ * The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a resource for those files whose integration response does. Next.js uses the app's `basePath`, or `/` for none.
25
+ * @default - no resource; the build has no service worker
26
+ * @stability stable
27
+ */
28
+ readonly serviceWorkerAllowed?: string;
23
29
  /**
24
30
  * Required if `NextjsRegionalFunctions`.
25
31
  * The Lambda function for server-side rendering
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3B0aW9uYWxOZXh0anNBcGlQcm9wcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nZW5lcmF0ZWQtc3RydWN0cy9PcHRpb25hbE5leHRqc0FwaVByb3BzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvLyB+fiBHZW5lcmF0ZWQgYnkgcHJvamVuLiBUbyBtb2RpZnksIGVkaXQgLnByb2plbnJjLnRzIGFuZCBydW4gXCJwbnBtIGRseCBwcm9qZW5cIi5cbmltcG9ydCB0eXBlIHsgYXdzX2VjMiwgYXdzX2xhbWJkYSwgYXdzX3MzIH0gZnJvbSAnYXdzLWNkay1saWInO1xuaW1wb3J0IHR5cGUgeyBQdWJsaWNEaXJFbnRyeSB9IGZyb20gJy4uLyc7XG5cbi8qKlxuICogT3B0aW9uYWxOZXh0anNBcGlQcm9wc1xuICovXG5leHBvcnQgaW50ZXJmYWNlIE9wdGlvbmFsTmV4dGpzQXBpUHJvcHMge1xuICAvKipcbiAgICogW0Z1dHVyZV0gUmVxdWlyZWQgaWYgYE5leHRqc1JlZ2lvbmFsQ29udGFpbmVyc2AuXG4gICAqIFZQQyB0byBjcmVhdGUgVlBDIExpbmsgYW5kIEVDUyBTZXJ2aWNlIERpc2NvdmVyeVxuICAgKiBAc3RhYmlsaXR5IHN0YWJsZVxuICAgKi9cbiAgcmVhZG9ubHkgdnBjPzogYXdzX2VjMi5JVnBjO1xuICAvKipcbiAgICogUzMga2V5IHByZWZpeCB0aGUgc3RhdGljIGFzc2V0cyB3ZXJlIHVwbG9hZGVkIHVuZGVyLCBpLmUuIGBOZXh0anNTdGF0aWNBc3NldHMua2V5UHJlZml4YCwgd2hpY2ggbmFtZXNwYWNlcyBhIHNoYXJlZCBidWNrZXQuXG4gICAqIEluZGVwZW5kZW50IG9mIGBiYXNlUGF0aGAgYWJvdmU6IHRoYXQgb25lIGlzIHRoZSBVUkwgcHJlZml4IHRoZSBSRVNUIEFQSVxuICAgKiBzZXJ2ZXMgdGhlIGFwcCBhdCAoY29tbW9ubHkgdGhlIEFQSSBHYXRld2F5IHN0YWdlKSwgd2hpbGUgdGhpcyBvbmUgaXMgd2hlcmVcbiAgICogdGhlIG9iamVjdHMgbGl2ZSBpbiB0aGUgYnVja2V0LiBgX25leHQvc3RhdGljYCBhbmQgcHVibGljIGRpcmVjdG9yeVxuICAgKiByZXF1ZXN0cyBhcmUgbWFwcGVkIHRvIFMzIGtleXMgZGlyZWN0bHksIHNvIHRoZXkgNDA0IHVubGVzcyB0aGlzIHByZWZpeCBpc1xuICAgKiBhcHBsaWVkLlxuICAgKiBAc3RhYmlsaXR5IHN0YWJsZVxuICAgKi9cbiAgcmVhZG9ubHkgc3RhdGljQXNzZXRzS2V5UHJlZml4Pzogc3RyaW5nO1xuICAvKipcbiAgICogUmVxdWlyZWQgaWYgYE5leHRqc1JlZ2lvbmFsRnVuY3Rpb25zYC5cbiAgICogVGhlIExhbWJkYSBmdW5jdGlvbiBmb3Igc2VydmVyLXNpZGUgcmVuZGVyaW5nXG4gICAqIEBzdGFiaWxpdHkgc3RhYmxlXG4gICAqL1xuICByZWFkb25seSBzZXJ2ZXJGdW5jdGlvbj86IGF3c19sYW1iZGEuSUZ1bmN0aW9uO1xuICAvKipcbiAgICogRGVwbG95IHRoZSBzdGFnZSBhZ2FpbiBvbmNlIGVhY2ggc3RhY2sgdXBkYXRlIGhhcyBmaW5pc2hlZCwgc28gaXQgc2VydmVzIHRoZSBBUEkgYXMgaXQgaXMgYWZ0ZXIgdGhlIHVwZGF0ZS5cbiAgICogQ2xvdWRGb3JtYXRpb24gc25hcHNob3RzIHRoZSBBUEkgaW50byBhIG5ldyBkZXBsb3ltZW50IHdoaWxlIHJlc291cmNlc1xuICAgKiByZW1vdmVkIGZyb20gdGhlIHRlbXBsYXRlIHN0aWxsIGV4aXN0IOKAlCBpdCBkZWxldGVzIHRoZW0gb25seSBkdXJpbmdcbiAgICogY2xlYW51cCDigJQgc28gdGhlIHN0YWdlIGtlZXBzIHNlcnZpbmcgdGhlbS4gQWZ0ZXIgcmVtb3ZpbmcgYSBmdW5jdGlvblxuICAgKiBncm91cCwgaXRzIHJvdXRlcyB0aGVuIHBvaW50IGF0IGEgZGVsZXRlZCBMYW1iZGEgYW5kIGFuc3dlciA1MDAgdW50aWwgdGhlXG4gICAqIG5leHQgZGVwbG95bWVudC4gQW4gRXZlbnRCcmlkZ2UgcnVsZSBvbiB0aGlzIHN0YWNrJ3MgYFVQREFURV9DT01QTEVURWBcbiAgICogKGFuZCBgVVBEQVRFX1JPTExCQUNLX0NPTVBMRVRFYCkgaW52b2tlcyBhIHNtYWxsIGZ1bmN0aW9uIHRoYXQgZGVwbG95cyB0aGVcbiAgICogc3RhZ2UgZnJvbSB0aGUgbGl2ZSBBUEkgYW5kIGRlbGV0ZXMgdGhlIGRlcGxveW1lbnRzIGl0cyBlYXJsaWVyIHJ1bnMgbWFkZS5cbiAgICpcbiAgICogSWdub3JlZCB3aGVuIGBvdmVycmlkZXMucmVzdEFwaVByb3BzLmRlcGxveWAgaXMgYGZhbHNlYDogdGhlcmUgaXMgbm8gc3RhZ2UuXG4gICAqIEBkZWZhdWx0IHRydWVcbiAgICogQHN0YWJpbGl0eSBzdGFibGVcbiAgICovXG4gIHJlYWRvbmx5IHJlZGVwbG95QWZ0ZXJVcGRhdGU/OiBib29sZWFuO1xuICAvKipcbiAgICogT3B0aW9uYWwgYmFzZSBwYXRoIGZvciB0aGUgYXBwbGljYXRpb24uXG4gICAqIEBzdGFiaWxpdHkgc3RhYmxlXG4gICAqL1xuICByZWFkb25seSBiYXNlUGF0aD86IHN0cmluZztcbiAgLyoqXG4gICAqIFRoZSBTMyBidWNrZXQgY29udGFpbmluZyBzdGF0aWMgYXNzZXRzLlxuICAgKiBAc3RhYmlsaXR5IHN0YWJsZVxuICAgKi9cbiAgcmVhZG9ubHkgc3RhdGljQXNzZXRzQnVja2V0PzogYXdzX3MzLklCdWNrZXQ7XG4gIC8qKlxuICAgKiBQYXRoIHRvIGRpcmVjdG9yeSBvZiBOZXh0LmpzIGFwcCdzIHB1YmxpYyBkaXJlY3RvcnkuIFVzZWQgdG8gYWRkIHJlc291cmNlcyB0byBBUEkgR2F0ZXdheSBSRVNUIEFQSSBmb3IgcHVibGljIGRpcmVjdG9yeSB0byBnbyBkaXJlY3RseSB0byBTMy5cbiAgICogQHN0YWJpbGl0eSBzdGFibGVcbiAgICovXG4gIHJlYWRvbmx5IHB1YmxpY0RpckVudHJpZXM/OiBBcnJheTxQdWJsaWNEaXJFbnRyeT47XG59XG4iXX0=
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3B0aW9uYWxOZXh0anNBcGlQcm9wcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nZW5lcmF0ZWQtc3RydWN0cy9PcHRpb25hbE5leHRqc0FwaVByb3BzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvLyB+fiBHZW5lcmF0ZWQgYnkgcHJvamVuLiBUbyBtb2RpZnksIGVkaXQgLnByb2plbnJjLnRzIGFuZCBydW4gXCJwbnBtIGRseCBwcm9qZW5cIi5cbmltcG9ydCB0eXBlIHsgYXdzX2VjMiwgYXdzX2xhbWJkYSwgYXdzX3MzIH0gZnJvbSAnYXdzLWNkay1saWInO1xuaW1wb3J0IHR5cGUgeyBQdWJsaWNEaXJFbnRyeSB9IGZyb20gJy4uLyc7XG5cbi8qKlxuICogT3B0aW9uYWxOZXh0anNBcGlQcm9wc1xuICovXG5leHBvcnQgaW50ZXJmYWNlIE9wdGlvbmFsTmV4dGpzQXBpUHJvcHMge1xuICAvKipcbiAgICogW0Z1dHVyZV0gUmVxdWlyZWQgaWYgYE5leHRqc1JlZ2lvbmFsQ29udGFpbmVyc2AuXG4gICAqIFZQQyB0byBjcmVhdGUgVlBDIExpbmsgYW5kIEVDUyBTZXJ2aWNlIERpc2NvdmVyeVxuICAgKiBAc3RhYmlsaXR5IHN0YWJsZVxuICAgKi9cbiAgcmVhZG9ubHkgdnBjPzogYXdzX2VjMi5JVnBjO1xuICAvKipcbiAgICogUzMga2V5IHByZWZpeCB0aGUgc3RhdGljIGFzc2V0cyB3ZXJlIHVwbG9hZGVkIHVuZGVyLCBpLmUuIGBOZXh0anNTdGF0aWNBc3NldHMua2V5UHJlZml4YCwgd2hpY2ggbmFtZXNwYWNlcyBhIHNoYXJlZCBidWNrZXQuXG4gICAqIEluZGVwZW5kZW50IG9mIGBiYXNlUGF0aGAgYWJvdmU6IHRoYXQgb25lIGlzIHRoZSBVUkwgcHJlZml4IHRoZSBSRVNUIEFQSVxuICAgKiBzZXJ2ZXMgdGhlIGFwcCBhdCAoY29tbW9ubHkgdGhlIEFQSSBHYXRld2F5IHN0YWdlKSwgd2hpbGUgdGhpcyBvbmUgaXMgd2hlcmVcbiAgICogdGhlIG9iamVjdHMgbGl2ZSBpbiB0aGUgYnVja2V0LiBgX25leHQvc3RhdGljYCBhbmQgcHVibGljIGRpcmVjdG9yeVxuICAgKiByZXF1ZXN0cyBhcmUgbWFwcGVkIHRvIFMzIGtleXMgZGlyZWN0bHksIHNvIHRoZXkgNDA0IHVubGVzcyB0aGlzIHByZWZpeCBpc1xuICAgKiBhcHBsaWVkLlxuICAgKiBAc3RhYmlsaXR5IHN0YWJsZVxuICAgKi9cbiAgcmVhZG9ubHkgc3RhdGljQXNzZXRzS2V5UHJlZml4Pzogc3RyaW5nO1xuICAvKipcbiAgICogVGhlIGBTZXJ2aWNlLVdvcmtlci1BbGxvd2VkYCBoZWFkZXIgZm9yIGBfbmV4dC9zdGF0aWMvc2VydmljZS13b3JrZXIvKmAsIHdoaWNoIE5leHQuanMgc2VuZHMgc28gYSBjb21waWxlZCBzZXJ2aWNlIHdvcmtlciBjYW4gcmVnaXN0ZXIgYXQgYSBzY29wZSB3aWRlciB0aGFuIGl0cyBvd24gZGlyZWN0b3J5LCBzdWNoIGFzIGAvYC4gUzMgY2FuJ3Qgc2VuZCBhbiBhcmJpdHJhcnkgaGVhZGVyLCBzbyBzZXR0aW5nIHRoaXMgYWRkcyBhIHJlc291cmNlIGZvciB0aG9zZSBmaWxlcyB3aG9zZSBpbnRlZ3JhdGlvbiByZXNwb25zZSBkb2VzLiBOZXh0LmpzIHVzZXMgdGhlIGFwcCdzIGBiYXNlUGF0aGAsIG9yIGAvYCBmb3Igbm9uZS5cbiAgICogQGRlZmF1bHQgLSBubyByZXNvdXJjZTsgdGhlIGJ1aWxkIGhhcyBubyBzZXJ2aWNlIHdvcmtlclxuICAgKiBAc3RhYmlsaXR5IHN0YWJsZVxuICAgKi9cbiAgcmVhZG9ubHkgc2VydmljZVdvcmtlckFsbG93ZWQ/OiBzdHJpbmc7XG4gIC8qKlxuICAgKiBSZXF1aXJlZCBpZiBgTmV4dGpzUmVnaW9uYWxGdW5jdGlvbnNgLlxuICAgKiBUaGUgTGFtYmRhIGZ1bmN0aW9uIGZvciBzZXJ2ZXItc2lkZSByZW5kZXJpbmdcbiAgICogQHN0YWJpbGl0eSBzdGFibGVcbiAgICovXG4gIHJlYWRvbmx5IHNlcnZlckZ1bmN0aW9uPzogYXdzX2xhbWJkYS5JRnVuY3Rpb247XG4gIC8qKlxuICAgKiBEZXBsb3kgdGhlIHN0YWdlIGFnYWluIG9uY2UgZWFjaCBzdGFjayB1cGRhdGUgaGFzIGZpbmlzaGVkLCBzbyBpdCBzZXJ2ZXMgdGhlIEFQSSBhcyBpdCBpcyBhZnRlciB0aGUgdXBkYXRlLlxuICAgKiBDbG91ZEZvcm1hdGlvbiBzbmFwc2hvdHMgdGhlIEFQSSBpbnRvIGEgbmV3IGRlcGxveW1lbnQgd2hpbGUgcmVzb3VyY2VzXG4gICAqIHJlbW92ZWQgZnJvbSB0aGUgdGVtcGxhdGUgc3RpbGwgZXhpc3Qg4oCUIGl0IGRlbGV0ZXMgdGhlbSBvbmx5IGR1cmluZ1xuICAgKiBjbGVhbnVwIOKAlCBzbyB0aGUgc3RhZ2Uga2VlcHMgc2VydmluZyB0aGVtLiBBZnRlciByZW1vdmluZyBhIGZ1bmN0aW9uXG4gICAqIGdyb3VwLCBpdHMgcm91dGVzIHRoZW4gcG9pbnQgYXQgYSBkZWxldGVkIExhbWJkYSBhbmQgYW5zd2VyIDUwMCB1bnRpbCB0aGVcbiAgICogbmV4dCBkZXBsb3ltZW50LiBBbiBFdmVudEJyaWRnZSBydWxlIG9uIHRoaXMgc3RhY2sncyBgVVBEQVRFX0NPTVBMRVRFYFxuICAgKiAoYW5kIGBVUERBVEVfUk9MTEJBQ0tfQ09NUExFVEVgKSBpbnZva2VzIGEgc21hbGwgZnVuY3Rpb24gdGhhdCBkZXBsb3lzIHRoZVxuICAgKiBzdGFnZSBmcm9tIHRoZSBsaXZlIEFQSSBhbmQgZGVsZXRlcyB0aGUgZGVwbG95bWVudHMgaXRzIGVhcmxpZXIgcnVucyBtYWRlLlxuICAgKlxuICAgKiBJZ25vcmVkIHdoZW4gYG92ZXJyaWRlcy5yZXN0QXBpUHJvcHMuZGVwbG95YCBpcyBgZmFsc2VgOiB0aGVyZSBpcyBubyBzdGFnZS5cbiAgICogQGRlZmF1bHQgdHJ1ZVxuICAgKiBAc3RhYmlsaXR5IHN0YWJsZVxuICAgKi9cbiAgcmVhZG9ubHkgcmVkZXBsb3lBZnRlclVwZGF0ZT86IGJvb2xlYW47XG4gIC8qKlxuICAgKiBPcHRpb25hbCBiYXNlIHBhdGggZm9yIHRoZSBhcHBsaWNhdGlvbi5cbiAgICogQHN0YWJpbGl0eSBzdGFibGVcbiAgICovXG4gIHJlYWRvbmx5IGJhc2VQYXRoPzogc3RyaW5nO1xuICAvKipcbiAgICogVGhlIFMzIGJ1Y2tldCBjb250YWluaW5nIHN0YXRpYyBhc3NldHMuXG4gICAqIEBzdGFiaWxpdHkgc3RhYmxlXG4gICAqL1xuICByZWFkb25seSBzdGF0aWNBc3NldHNCdWNrZXQ/OiBhd3NfczMuSUJ1Y2tldDtcbiAgLyoqXG4gICAqIFBhdGggdG8gZGlyZWN0b3J5IG9mIE5leHQuanMgYXBwJ3MgcHVibGljIGRpcmVjdG9yeS4gVXNlZCB0byBhZGQgcmVzb3VyY2VzIHRvIEFQSSBHYXRld2F5IFJFU1QgQVBJIGZvciBwdWJsaWMgZGlyZWN0b3J5IHRvIGdvIGRpcmVjdGx5IHRvIFMzLlxuICAgKiBAc3RhYmlsaXR5IHN0YWJsZVxuICAgKi9cbiAgcmVhZG9ubHkgcHVibGljRGlyRW50cmllcz86IEFycmF5PFB1YmxpY0RpckVudHJ5Pjtcbn1cbiJdfQ==
@@ -25,6 +25,12 @@ export interface OptionalNextjsDistributionProps {
25
25
  * @stability stable
26
26
  */
27
27
  readonly viewerRequestFunctionCode?: aws_cloudfront.FunctionCode;
28
+ /**
29
+ * The `Service-Worker-Allowed` header for `_next/static/service-worker/*`, which Next.js sends so a compiled service worker can register at a scope wider than its own directory, such as `/`. S3 can't send an arbitrary header, so setting this adds a behavior for those files whose response headers policy does. Next.js uses the app's `basePath`, or `/` for none.
30
+ * @default - no behavior; the build has no service worker
31
+ * @stability stable
32
+ */
33
+ readonly serviceWorkerAllowed?: string;
28
34
  /**
29
35
  * The most cache behaviors the distribution may have, the default one included.
30
36
  * cdk-nextjs counts what it adds against this at synth, so running