cdk-nextjs 0.7.10 → 0.7.12

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 (64) hide show
  1. package/.jsii +76 -22
  2. package/.jsii.tabl.json +1 -1
  3. package/API.md +59 -3
  4. package/README.md +2 -2
  5. package/docs/breaking-changes.md +32 -0
  6. package/docs/harness-coverage.md +1 -1
  7. package/docs/next-build-output-guide.md +1 -1
  8. package/docs/nextjs-private-apis.md +128 -0
  9. package/lib/adapter/adapter.mjs +276 -24
  10. package/lib/adapter/build-outputs.d.ts +1 -1
  11. package/lib/adapter/build-outputs.js +29 -13
  12. package/lib/adapter/build-outputs.test.js +35 -7
  13. package/lib/adapter/cache-handler.d.ts +1 -1
  14. package/lib/adapter/cache-handler.js +1 -1
  15. package/lib/adapter/cache-kinds.d.ts +12 -1
  16. package/lib/adapter/cache-kinds.js +16 -4
  17. package/lib/adapter/init-cache.js +7 -7
  18. package/lib/adapter/local-file-cache-handler.d.ts +1 -1
  19. package/lib/adapter/local-file-cache-handler.js +1 -1
  20. package/lib/adapter/memory-cache-handler.d.ts +2 -2
  21. package/lib/adapter/memory-cache-handler.js +1 -1
  22. package/lib/adapter/s3-cache-handler.d.ts +2 -2
  23. package/lib/adapter/s3-cache-handler.js +1 -1
  24. package/lib/adapter/use-cache-common.d.ts +1 -1
  25. package/lib/adapter/use-cache-common.js +1 -1
  26. package/lib/adapter/use-cache-common.test.js +1 -1
  27. package/lib/adapter/use-cache-default-handler.d.ts +1 -1
  28. package/lib/adapter/use-cache-default-handler.js +1 -1
  29. package/lib/adapter/use-cache-handlers.test.js +1 -1
  30. package/lib/adapter/use-cache-remote-handler.d.ts +1 -1
  31. package/lib/adapter/use-cache-remote-handler.js +1 -1
  32. package/lib/cdk-nextjs-version.d.ts +10 -0
  33. package/lib/cdk-nextjs-version.js +15 -0
  34. package/lib/nextjs-api.js +1 -1
  35. package/lib/nextjs-build/nextjs-build.js +7 -6
  36. package/lib/nextjs-build/nextjs-build.test.js +16 -3
  37. package/lib/nextjs-cache.js +1 -1
  38. package/lib/nextjs-compute/nextjs-containers.js +1 -1
  39. package/lib/nextjs-compute/nextjs-functions.js +1 -1
  40. package/lib/nextjs-distribution.js +5 -5
  41. package/lib/nextjs-post-deploy.js +1 -1
  42. package/lib/nextjs-static-assets.d.ts +74 -5
  43. package/lib/nextjs-static-assets.js +276 -41
  44. package/lib/nextjs-static-assets.test.js +286 -1
  45. package/lib/root-constructs/nextjs-base-construct.d.ts +5 -4
  46. package/lib/root-constructs/nextjs-base-construct.js +17 -8
  47. package/lib/root-constructs/nextjs-global-containers.js +1 -1
  48. package/lib/root-constructs/nextjs-global-functions.js +1 -1
  49. package/lib/root-constructs/nextjs-regional-containers.js +1 -1
  50. package/lib/root-constructs/nextjs-regional-functions.js +1 -1
  51. package/lib/runtime/core.test.js +17 -8
  52. package/lib/runtime/dispatch.js +4 -5
  53. package/lib/runtime/image-utils.d.ts +1 -0
  54. package/lib/runtime/image-utils.js +2 -1
  55. package/lib/runtime/image-utils.test.js +17 -1
  56. package/lib/runtime/image.js +47 -33
  57. package/lib/runtime/image.test.js +47 -26
  58. package/lib/runtime/lambda.mjs +281 -37
  59. package/lib/runtime/manifest.d.ts +34 -8
  60. package/lib/runtime/manifest.js +7 -5
  61. package/lib/runtime/server.mjs +281 -37
  62. package/package.json +1 -1
  63. package/scripts/capture-adapter-fixture.mjs +13 -1
  64. package/scripts/zero-config-build.mjs +5 -1
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":62}},"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":83}},"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":"a2dc662816fbab7dd3928842ae3ed7a00e90eb7a633219777a1cade509e4a258"},"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":110}},"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":317}},"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"},"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":551}},"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":62}},"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":83}},"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":"204944eee96487676fa960dc8e8ba3535259949e786112a1d8e3856caea9fffd"},"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":110}},"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":317}},"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"},"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":551}},"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
@@ -2606,8 +2606,11 @@ Any object.
2606
2606
  | --- | --- | --- |
2607
2607
  | <code><a href="#cdk-nextjs.NextjsStaticAssets.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
2608
2608
  | <code><a href="#cdk-nextjs.NextjsStaticAssets.property.keyPrefix">keyPrefix</a></code> | <code>string</code> | S3 key prefix the assets are actually uploaded under, normalized to a bare path segment (empty when they live at the bucket root). |
2609
+ | <code><a href="#cdk-nextjs.NextjsStaticAssets.property.publicDeployment">publicDeployment</a></code> | <code>aws-cdk-lib.aws_s3_deployment.BucketDeployment</code> | Uploads `public/`, separately from `staticDeployment` because its files keep their names when they change and so can't be `immutable`. |
2610
+ | <code><a href="#cdk-nextjs.NextjsStaticAssets.property.serviceWorkerDeployment">serviceWorkerDeployment</a></code> | <code>aws-cdk-lib.aws_s3_deployment.BucketDeployment</code> | Uploads `.next/static/service-worker` with `Cache-Control: public, max-age=0, must-revalidate`, as Next.js serves it: a service worker keeps its URL across builds, so it can't be `immutable`. Absent if the build has no service worker. |
2611
+ | <code><a href="#cdk-nextjs.NextjsStaticAssets.property.staticDeployment">staticDeployment</a></code> | <code>aws-cdk-lib.aws_s3_deployment.BucketDeployment</code> | Uploads `.next/static` to `_next/static/` with `Cache-Control: public, max-age=31536000, immutable`, except for `service-worker/` (see `serviceWorkerDeployment`). Absent if the build has no `.next/static`. |
2609
2612
  | <code><a href="#cdk-nextjs.NextjsStaticAssets.property.bucket">bucket</a></code> | <code>aws-cdk-lib.aws_s3.IBucket</code> | *No description.* |
2610
- | <code><a href="#cdk-nextjs.NextjsStaticAssets.property.deployment">deployment</a></code> | <code>aws-cdk-lib.aws_s3_deployment.BucketDeployment</code> | *No description.* |
2613
+ | <code><a href="#cdk-nextjs.NextjsStaticAssets.property.deployment">deployment</a></code> | <code>aws-cdk-lib.aws_s3_deployment.BucketDeployment</code> | The first of `staticDeployment`, `serviceWorkerDeployment` and `publicDeployment` the build has files for. |
2611
2614
 
2612
2615
  ---
2613
2616
 
@@ -2643,6 +2646,45 @@ bytes were uploaded.
2643
2646
 
2644
2647
  ---
2645
2648
 
2649
+ ##### `publicDeployment`<sup>Optional</sup> <a name="publicDeployment" id="cdk-nextjs.NextjsStaticAssets.property.publicDeployment"></a>
2650
+
2651
+ ```typescript
2652
+ public readonly publicDeployment: BucketDeployment;
2653
+ ```
2654
+
2655
+ - *Type:* aws-cdk-lib.aws_s3_deployment.BucketDeployment
2656
+
2657
+ Uploads `public/`, separately from `staticDeployment` because its files keep their names when they change and so can't be `immutable`.
2658
+
2659
+ Absent if
2660
+ the build has no `public` directory.
2661
+
2662
+ ---
2663
+
2664
+ ##### `serviceWorkerDeployment`<sup>Optional</sup> <a name="serviceWorkerDeployment" id="cdk-nextjs.NextjsStaticAssets.property.serviceWorkerDeployment"></a>
2665
+
2666
+ ```typescript
2667
+ public readonly serviceWorkerDeployment: BucketDeployment;
2668
+ ```
2669
+
2670
+ - *Type:* aws-cdk-lib.aws_s3_deployment.BucketDeployment
2671
+
2672
+ Uploads `.next/static/service-worker` with `Cache-Control: public, max-age=0, must-revalidate`, as Next.js serves it: a service worker keeps its URL across builds, so it can't be `immutable`. Absent if the build has no service worker.
2673
+
2674
+ ---
2675
+
2676
+ ##### `staticDeployment`<sup>Optional</sup> <a name="staticDeployment" id="cdk-nextjs.NextjsStaticAssets.property.staticDeployment"></a>
2677
+
2678
+ ```typescript
2679
+ public readonly staticDeployment: BucketDeployment;
2680
+ ```
2681
+
2682
+ - *Type:* aws-cdk-lib.aws_s3_deployment.BucketDeployment
2683
+
2684
+ Uploads `.next/static` to `_next/static/` with `Cache-Control: public, max-age=31536000, immutable`, except for `service-worker/` (see `serviceWorkerDeployment`). Absent if the build has no `.next/static`.
2685
+
2686
+ ---
2687
+
2646
2688
  ##### `bucket`<sup>Required</sup> <a name="bucket" id="cdk-nextjs.NextjsStaticAssets.property.bucket"></a>
2647
2689
 
2648
2690
  ```typescript
@@ -2653,7 +2695,11 @@ public readonly bucket: IBucket;
2653
2695
 
2654
2696
  ---
2655
2697
 
2656
- ##### `deployment`<sup>Required</sup> <a name="deployment" id="cdk-nextjs.NextjsStaticAssets.property.deployment"></a>
2698
+ ##### ~~`deployment`~~<sup>Required</sup> <a name="deployment" id="cdk-nextjs.NextjsStaticAssets.property.deployment"></a>
2699
+
2700
+ - *Deprecated:* The assets are uploaded by up to three deployments, and this
2701
+ is only one of them: a dependency on it doesn't wait for the others. Use
2702
+ `staticDeployment`, `serviceWorkerDeployment` and `publicDeployment`.
2657
2703
 
2658
2704
  ```typescript
2659
2705
  public readonly deployment: BucketDeployment;
@@ -2661,6 +2707,8 @@ public readonly deployment: BucketDeployment;
2661
2707
 
2662
2708
  - *Type:* aws-cdk-lib.aws_s3_deployment.BucketDeployment
2663
2709
 
2710
+ The first of `staticDeployment`, `serviceWorkerDeployment` and `publicDeployment` the build has files for.
2711
+
2664
2712
  ---
2665
2713
 
2666
2714
 
@@ -6974,7 +7022,7 @@ const nextjsStaticAssetsOverrides: NextjsStaticAssetsOverrides = { ... }
6974
7022
 
6975
7023
  | **Name** | **Type** | **Description** |
6976
7024
  | --- | --- | --- |
6977
- | <code><a href="#cdk-nextjs.NextjsStaticAssetsOverrides.property.bucketDeploymentProps">bucketDeploymentProps</a></code> | <code>aws-cdk-lib.aws_s3_deployment.BucketDeploymentProps</code> | *No description.* |
7025
+ | <code><a href="#cdk-nextjs.NextjsStaticAssetsOverrides.property.bucketDeploymentProps">bucketDeploymentProps</a></code> | <code>aws-cdk-lib.aws_s3_deployment.BucketDeploymentProps</code> | Applied to every upload (`public/`, `_next/static/` and `_next/static/service-worker/`), except that the two `_next/static` uploads always keep the `Cache-Control` Next.js sends for them. So a `cacheControl` here sets the header for `public/` files only, while anything else, such as a `distribution` to invalidate, applies to each upload in turn. |
6978
7026
  | <code><a href="#cdk-nextjs.NextjsStaticAssetsOverrides.property.bucketProps">bucketProps</a></code> | <code>aws-cdk-lib.aws_s3.BucketProps</code> | *No description.* |
6979
7027
 
6980
7028
  ---
@@ -6987,6 +7035,14 @@ public readonly bucketDeploymentProps: BucketDeploymentProps;
6987
7035
 
6988
7036
  - *Type:* aws-cdk-lib.aws_s3_deployment.BucketDeploymentProps
6989
7037
 
7038
+ Applied to every upload (`public/`, `_next/static/` and `_next/static/service-worker/`), except that the two `_next/static` uploads always keep the `Cache-Control` Next.js sends for them. So a `cacheControl` here sets the header for `public/` files only, while anything else, such as a `distribution` to invalidate, applies to each upload in turn.
7039
+
7040
+ `sources` and `destinationBucket`, which the type requires, are ignored:
7041
+ the uploads are always the build's assets, to the bucket CloudFront and
7042
+ API Gateway read from (pass `bucket` to bring your own). `prune: true` and
7043
+ `retainOnDelete: false` are rejected, since each would break the other
7044
+ uploads.
7045
+
6990
7046
  ---
6991
7047
 
6992
7048
  ##### `bucketProps`<sup>Optional</sup> <a name="bucketProps" id="cdk-nextjs.NextjsStaticAssetsOverrides.property.bucketProps"></a>
package/README.md CHANGED
@@ -519,7 +519,7 @@ The simplest path to deploy Next.js is on [Vercel](https://vercel.com/) - the Pl
519
519
 
520
520
  ## Design Principles
521
521
 
522
- - Integrate through Next.js's official interfaces. Build on the [Deployment Adapter](https://nextjs.org/docs/app/guides/deployment-adapters) API and [`@next/routing`](https://www.npmjs.com/package/@next/routing) rather than Next.js internals, so new Next.js versions rarely break this construct.
522
+ - Integrate through Next.js's official interfaces. Build on the [Deployment Adapter](https://nextjs.org/docs/app/guides/deployment-adapters) API and [`@next/routing`](https://www.npmjs.com/package/@next/routing) rather than Next.js internals, so new Next.js versions rarely break this construct. Where no public interface exists yet, the dependency is listed in [Next.js private APIs](docs/nextjs-private-apis.md).
523
523
  - Security first.
524
524
  - One architecture does not fit all.
525
525
  - Enable customization everywhere.
@@ -542,7 +542,7 @@ cdk-nextjs supports importing existing AWS resources instead of creating new one
542
542
  ### Resource Isolation
543
543
 
544
544
  - **Cache bucket and DynamoDB table** must be dedicated to one deployment. Sharing either between deployments (branches, stages, apps) is not supported: each deploy's post-deploy step prunes every cache object and revalidation entry that isn't from its own current build, so deploying one branch wipes the others' caches. Buckets and tables are cheap, so give each deployment its own, or leave `cacheBucket`/`revalidationTable` unset and let cdk-nextjs create them (they are removed with the stack).
545
- - **Static assets bucket** can be shared, but only between deployments with different `basePath`s, which become their S3 key prefixes. Pruning only looks at `<basePath>/_next/`, so it never touches another prefix. Two deployments under the same prefix (for example two subdomain previews both at the root) overwrite each other's `public/` files and prune each other's `_next/` assets once they are past the prune TTL (30 days by default), so give those their own buckets. `NextjsGlobalFunctions` and `NextjsGlobalContainers` read the `basePath` out of your Next.js build and use it as the S3 key prefix, since CloudFront serves assets from S3 by request path and the two can't differ. Set the `basePath` prop only if you want to be explicit about it; a value that disagrees with your app's fails at synth.
545
+ - **Static assets bucket** can be shared, but only between deployments with different `basePath`s, which become their S3 key prefixes. Pruning only looks at `<basePath>/_next/`, so it never touches another prefix. Two deployments under the same prefix (for example two subdomain previews both at the root) overwrite each other's `public/` files and prune each other's `_next/` assets once they are past the prune TTL (30 days by default), so give those their own buckets. `NextjsGlobalFunctions` and `NextjsGlobalContainers` read the `basePath` out of your Next.js build and use it as the S3 key prefix, since CloudFront serves assets from S3 by request path and the two can't differ. Set the `basePath` prop only if you want to be explicit about it; a value that disagrees with your app's fails at synth. Each deployment also adds an ownership tag per static asset upload (1 to 3, by whether the build has `public/` files and service workers) to a bucket created in your CDK app; an imported bucket gets none. S3 allows 50 tags per bucket, so such a bucket holds at least 16 deployments.
546
546
 
547
547
  ### Shared ALB and `removeAutoCreatedListener()`
548
548
 
@@ -1,5 +1,37 @@
1
1
  # Breaking Changes
2
2
 
3
+ ## 0.7.12
4
+
5
+ ### Static assets are uploaded by one deployment per `Cache-Control`
6
+
7
+ `NextjsStaticAssets` now uploads `_next/static/` with
8
+ `public, max-age=31536000, immutable` and `_next/static/service-worker/` with
9
+ `public, max-age=0, must-revalidate`, the headers Next.js sends for them, and
10
+ `public/` separately. Before, a single `BucketDeployment` uploaded everything
11
+ with no `Cache-Control`. Nothing changes unless you set
12
+ `overrides.nextjsStaticAssets.bucketDeploymentProps` or read
13
+ `NextjsStaticAssets.deployment`:
14
+
15
+ - **`prune: true` and `retainOnDelete: false` fail synth.** Each override now
16
+ reaches every upload. `prune: true` would make each one delete the files the
17
+ others uploaded. With `retainOnDelete: false`, a change of key prefix makes
18
+ each upload delete the old prefix while the others are writing theirs.
19
+ **Migration:** drop both. Old assets are already pruned after deploy by
20
+ `NextjsPostDeploy`, once they are past its TTL (`overrides.nextjsPostDeploy`).
21
+ - **`sources` and `destinationBucket` are ignored.** CDK's type requires them,
22
+ but either one replaced the build's assets, or sent them to a bucket
23
+ CloudFront and API Gateway don't read from. **Migration:** pass your bucket
24
+ as `staticAssetsBucket` instead, and add your own `BucketDeployment` for
25
+ extra files.
26
+ - **`cacheControl` applies to `public/` files only.** The `_next/static` uploads
27
+ always keep Next.js's headers.
28
+ - **`NextjsStaticAssets.deployment` is deprecated.** It is now the
29
+ `_next/static` upload alone (or the first upload the build has), so a
30
+ dependency on it no longer waits for `public/`. **Migration:** depend on
31
+ `staticDeployment`, `serviceWorkerDeployment` and `publicDeployment`, each
32
+ present only when the build has files for it. `NextjsPostDeploy` already
33
+ waits for all of them.
34
+
3
35
  ## 0.7.0
4
36
 
5
37
  ### Requests are served through the adapter runtime, not `next start`
@@ -145,7 +145,7 @@ having when one of them goes red:
145
145
  production). Real, but thin.
146
146
  - **Collapsed families:** `app-dir/next-config-ts/*` (21 files) and
147
147
  `app-dir/next-config-ts-native-mts/*` (18) — each a distinct `next build` whose
148
- resolved config the adapter reads back out of `required-server-files.json`; and
148
+ resolved config the adapter copies out of the build's `ctx.config`; and
149
149
  `app-dir/scss/*` (29 files), which on our side all test one thing: the emitted
150
150
  stylesheet reaching the browser from S3. The only Sass coverage in the project.
151
151
  - **`handle-non-hoisted-swc-helpers`** is the one fixture pinning
@@ -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.
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.
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