@cdklabs/deploy-time-build 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +90 -3
- package/.jsii.tabl.json +1 -1
- package/lib/container-image-build.js +1 -1
- package/lib/nodejs-build.js +1 -1
- package/lib/soci-index-build.js +1 -1
- package/lib/soci-index-v2-build.js +1 -1
- package/package.json +4 -4
package/.jsii
CHANGED
|
@@ -304,6 +304,19 @@
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
},
|
|
307
|
+
"aws-cdk-lib.aws_appfabric": {
|
|
308
|
+
"targets": {
|
|
309
|
+
"dotnet": {
|
|
310
|
+
"namespace": "Amazon.CDK.AWS.AppFabric"
|
|
311
|
+
},
|
|
312
|
+
"java": {
|
|
313
|
+
"package": "software.amazon.awscdk.services.appfabric"
|
|
314
|
+
},
|
|
315
|
+
"python": {
|
|
316
|
+
"module": "aws_cdk.aws_appfabric"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
},
|
|
307
320
|
"aws-cdk-lib.aws_appflow": {
|
|
308
321
|
"targets": {
|
|
309
322
|
"dotnet": {
|
|
@@ -2599,6 +2612,19 @@
|
|
|
2599
2612
|
}
|
|
2600
2613
|
}
|
|
2601
2614
|
},
|
|
2615
|
+
"aws-cdk-lib.aws_licensemanagerlinuxsubscriptions": {
|
|
2616
|
+
"targets": {
|
|
2617
|
+
"dotnet": {
|
|
2618
|
+
"namespace": "Amazon.CDK.AWS.LicenseManagerLinuxSubscriptions"
|
|
2619
|
+
},
|
|
2620
|
+
"java": {
|
|
2621
|
+
"package": "software.amazon.awscdk.services.licensemanagerlinuxsubscriptions"
|
|
2622
|
+
},
|
|
2623
|
+
"python": {
|
|
2624
|
+
"module": "aws_cdk.aws_licensemanagerlinuxsubscriptions"
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
},
|
|
2602
2628
|
"aws-cdk-lib.aws_lightsail": {
|
|
2603
2629
|
"targets": {
|
|
2604
2630
|
"dotnet": {
|
|
@@ -2976,6 +3002,19 @@
|
|
|
2976
3002
|
}
|
|
2977
3003
|
}
|
|
2978
3004
|
},
|
|
3005
|
+
"aws-cdk-lib.aws_networksecuritymanager": {
|
|
3006
|
+
"targets": {
|
|
3007
|
+
"dotnet": {
|
|
3008
|
+
"namespace": "Amazon.CDK.AWS.NetworkSecurityManager"
|
|
3009
|
+
},
|
|
3010
|
+
"java": {
|
|
3011
|
+
"package": "software.amazon.awscdk.services.networksecuritymanager"
|
|
3012
|
+
},
|
|
3013
|
+
"python": {
|
|
3014
|
+
"module": "aws_cdk.aws_networksecuritymanager"
|
|
3015
|
+
}
|
|
3016
|
+
}
|
|
3017
|
+
},
|
|
2979
3018
|
"aws-cdk-lib.aws_nimblestudio": {
|
|
2980
3019
|
"targets": {
|
|
2981
3020
|
"dotnet": {
|
|
@@ -4787,6 +4826,22 @@
|
|
|
4787
4826
|
}
|
|
4788
4827
|
}
|
|
4789
4828
|
},
|
|
4829
|
+
"aws-cdk-lib.interfaces.aws_appfabric": {
|
|
4830
|
+
"targets": {
|
|
4831
|
+
"dotnet": {
|
|
4832
|
+
"namespace": "Amazon.CDK.Interfaces.AppFabric"
|
|
4833
|
+
},
|
|
4834
|
+
"go": {
|
|
4835
|
+
"packageName": "interfacesawsappfabric"
|
|
4836
|
+
},
|
|
4837
|
+
"java": {
|
|
4838
|
+
"package": "software.amazon.awscdk.interfaces.appfabric"
|
|
4839
|
+
},
|
|
4840
|
+
"python": {
|
|
4841
|
+
"module": "aws_cdk.interfaces.aws_appfabric"
|
|
4842
|
+
}
|
|
4843
|
+
}
|
|
4844
|
+
},
|
|
4790
4845
|
"aws-cdk-lib.interfaces.aws_appflow": {
|
|
4791
4846
|
"targets": {
|
|
4792
4847
|
"dotnet": {
|
|
@@ -7347,6 +7402,22 @@
|
|
|
7347
7402
|
}
|
|
7348
7403
|
}
|
|
7349
7404
|
},
|
|
7405
|
+
"aws-cdk-lib.interfaces.aws_licensemanagerlinuxsubscriptions": {
|
|
7406
|
+
"targets": {
|
|
7407
|
+
"dotnet": {
|
|
7408
|
+
"namespace": "Amazon.CDK.Interfaces.LicenseManagerLinuxSubscriptions"
|
|
7409
|
+
},
|
|
7410
|
+
"go": {
|
|
7411
|
+
"packageName": "interfacesawslicensemanagerlinuxsubscriptions"
|
|
7412
|
+
},
|
|
7413
|
+
"java": {
|
|
7414
|
+
"package": "software.amazon.awscdk.interfaces.licensemanagerlinuxsubscriptions"
|
|
7415
|
+
},
|
|
7416
|
+
"python": {
|
|
7417
|
+
"module": "aws_cdk.interfaces.aws_licensemanagerlinuxsubscriptions"
|
|
7418
|
+
}
|
|
7419
|
+
}
|
|
7420
|
+
},
|
|
7350
7421
|
"aws-cdk-lib.interfaces.aws_lightsail": {
|
|
7351
7422
|
"targets": {
|
|
7352
7423
|
"dotnet": {
|
|
@@ -7795,6 +7866,22 @@
|
|
|
7795
7866
|
}
|
|
7796
7867
|
}
|
|
7797
7868
|
},
|
|
7869
|
+
"aws-cdk-lib.interfaces.aws_networksecuritymanager": {
|
|
7870
|
+
"targets": {
|
|
7871
|
+
"dotnet": {
|
|
7872
|
+
"namespace": "Amazon.CDK.Interfaces.NetworkSecurityManager"
|
|
7873
|
+
},
|
|
7874
|
+
"go": {
|
|
7875
|
+
"packageName": "interfacesawsnetworksecuritymanager"
|
|
7876
|
+
},
|
|
7877
|
+
"java": {
|
|
7878
|
+
"package": "software.amazon.awscdk.interfaces.networksecuritymanager"
|
|
7879
|
+
},
|
|
7880
|
+
"python": {
|
|
7881
|
+
"module": "aws_cdk.interfaces.aws_networksecuritymanager"
|
|
7882
|
+
}
|
|
7883
|
+
}
|
|
7884
|
+
},
|
|
7798
7885
|
"aws-cdk-lib.interfaces.aws_nimblestudio": {
|
|
7799
7886
|
"targets": {
|
|
7800
7887
|
"dotnet": {
|
|
@@ -9694,7 +9781,7 @@
|
|
|
9694
9781
|
"stability": "experimental"
|
|
9695
9782
|
},
|
|
9696
9783
|
"homepage": "https://github.com/cdklabs/deploy-time-build.git",
|
|
9697
|
-
"jsiiVersion": "5.9.
|
|
9784
|
+
"jsiiVersion": "5.9.56 (build 0265a5f)",
|
|
9698
9785
|
"keywords": [
|
|
9699
9786
|
"aws",
|
|
9700
9787
|
"aws-cdk",
|
|
@@ -10951,6 +11038,6 @@
|
|
|
10951
11038
|
"symbolId": "src/soci-index-v2-build:SociIndexV2BuildProps"
|
|
10952
11039
|
}
|
|
10953
11040
|
},
|
|
10954
|
-
"version": "0.1.
|
|
10955
|
-
"fingerprint": "
|
|
11041
|
+
"version": "0.1.14",
|
|
11042
|
+
"fingerprint": "Ha+8HKREPkWIW68vcih1IOo0KsdFPe6/v1BPdv8TDjI="
|
|
10956
11043
|
}
|
package/.jsii.tabl.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2","toolVersion":"5.9.68","snippets":{"d9f55c7a342aaa8f69e89d17efebdcaac996c123391343435db49e0f4ba74e94":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig\nfrom cdklabs.deploy_time_build import NodejsBuild\n\n\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n path=\"example-app\",\n exclude=[\"dist\", \"node_modules\"]\n )\n ],\n destination_bucket=destination_bucket,\n distribution=distribution,\n output_source_directory=\"dist\",\n build_commands=[\"npm ci\", \"npm run build\"],\n build_environment={\n \"VITE_API_ENDPOINT\": api.url\n },\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"using Cdklabs.Deploy.Time.Build;\n\n\nnew NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n Path = \"example-app\",\n Exclude = new [] { \"dist\", \"node_modules\" }\n } },\n DestinationBucket = destinationBucket,\n Distribution = distribution,\n OutputSourceDirectory = \"dist\",\n BuildCommands = new [] { \"npm ci\", \"npm run build\" },\n BuildEnvironment = new Dictionary<string, string> {\n { \"VITE_API_ENDPOINT\", api.Url }\n },\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"import cdklabs.deploy.time.build.NodejsBuild;\n\n\nNodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n .path(\"example-app\")\n .exclude(List.of(\"dist\", \"node_modules\"))\n .build()))\n .destinationBucket(destinationBucket)\n .distribution(distribution)\n .outputSourceDirectory(\"dist\")\n .buildCommands(List.of(\"npm ci\", \"npm run build\"))\n .buildEnvironment(Map.of(\n \"VITE_API_ENDPOINT\", api.getUrl()))\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/cdklabsdeploytimebuild\"\n\n\ncdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\tPath: jsii.String(\"example-app\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t},\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tDistribution: Distribution,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tBuildCommands: []*string{\n\t\tjsii.String(\"npm ci\"),\n\t\tjsii.String(\"npm run build\"),\n\t},\n\tBuildEnvironment: map[string]*string{\n\t\t\"VITE_API_ENDPOINT\": api.url,\n\t},\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"import { NodejsBuild } from '@cdklabs/deploy-time-build';\n\nnew NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n buildCommands: ['npm ci', 'npm run build'],\n buildEnvironment: {\n VITE_API_ENDPOINT: api.url,\n },\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":27}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_cloudfront.IDistribution","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { NodejsBuild } from '@cdklabs/deploy-time-build';\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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\nnew NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n buildCommands: ['npm ci', 'npm run build'],\n buildEnvironment: {\n VITE_API_ENDPOINT: api.url,\n },\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":8,"80":14,"110":1,"210":3,"211":3,"212":1,"215":1,"245":1,"273":1,"274":1,"276":1,"277":1,"304":8,"305":2,"308":1},"fqnsFingerprint":"c103b133a1471df6387c9bc3ec17443ecc0c3fdea08c833ec836068e58e9ed88"},"07be8476822ae024f7f429bdac042e4702b626aecd21849f5ac447be889afb46":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig, AssetConfig\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n # directory containing source code and package.json\n path=\"example-app\",\n exclude=[\"dist\", \"node_modules\"],\n commands=[\"npm install\"]\n ), AssetConfig(\n # directory that is also required for the build\n path=\"module1\"\n )\n ],\n destination_bucket=destination_bucket,\n distribution=distribution,\n output_source_directory=\"dist\",\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"new NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n // directory containing source code and package.json\n Path = \"example-app\",\n Exclude = new [] { \"dist\", \"node_modules\" },\n Commands = new [] { \"npm install\" }\n }, new AssetConfig {\n // directory that is also required for the build\n Path = \"module1\"\n } },\n DestinationBucket = destinationBucket,\n Distribution = distribution,\n OutputSourceDirectory = \"dist\",\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"NodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n // directory containing source code and package.json\n .path(\"example-app\")\n .exclude(List.of(\"dist\", \"node_modules\"))\n .commands(List.of(\"npm install\"))\n .build(), AssetConfig.builder()\n // directory that is also required for the build\n .path(\"module1\")\n .build()))\n .destinationBucket(destinationBucket)\n .distribution(distribution)\n .outputSourceDirectory(\"dist\")\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"cdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\t// directory containing source code and package.json\n\t\t\tPath: jsii.String(\"example-app\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t},\n\t\t\tCommands: []*string{\n\t\t\t\tjsii.String(\"npm install\"),\n\t\t\t},\n\t\t},\n\t\t&AssetConfig{\n\t\t\t// directory that is also required for the build\n\t\t\tPath: jsii.String(\"module1\"),\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tDistribution: Distribution,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"new NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n // directory containing source code and package.json\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n commands: ['npm install'],\n },\n {\n // directory that is also required for the build\n path: 'module1',\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":53}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_cloudfront.IDistribution","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n // directory containing source code and package.json\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n commands: ['npm install'],\n },\n {\n // directory that is also required for the build\n path: 'module1',\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":7,"80":10,"110":1,"210":3,"211":3,"215":1,"245":1,"304":7,"305":2},"fqnsFingerprint":"c103b133a1471df6387c9bc3ec17443ecc0c3fdea08c833ec836068e58e9ed88"},"57c4f1e95406cffad4eca47374a253fcf144b129352834b84fe4ce6ce9e3da1d":{"translations":{"python":{"source":"# some_bucket: s3.IBucket\n# build: NodejsBuild\n\nsome_bucket.grant_read_write(build)","version":"2"},"csharp":{"source":"IBucket someBucket;\nNodejsBuild build;\n\nsomeBucket.GrantReadWrite(build);","version":"1"},"java":{"source":"IBucket someBucket;\nNodejsBuild build;\n\nsomeBucket.grantReadWrite(build);","version":"1"},"go":{"source":"var someBucket IBucket\nvar build NodejsBuild\n\nsomeBucket.GrantReadWrite(build)","version":"1"},"$":{"source":"declare const someBucket: s3.IBucket;\ndeclare const build: NodejsBuild;\nsomeBucket.grantReadWrite(build);","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":94}},"didCompile":true,"fqnsReferenced":["aws-cdk-lib.aws_iam.IGrantable","aws-cdk-lib.aws_s3.IBucket#grantReadWrite"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const someBucket: s3.IBucket;\ndeclare const build: NodejsBuild;\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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\nsomeBucket.grantReadWrite(build);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"80":8,"138":2,"167":1,"184":2,"212":1,"214":1,"244":2,"245":1,"261":2,"262":2,"308":1},"fqnsFingerprint":"c04a359ccd17c4ce38c71752edeca6657c59c603cbac00a70dd89b708aeb3861"},"cd56982b16eadc2c93e7a07a2ce081e37678697c7e9ecfeccf336ffaa75877b0":{"translations":{"python":{"source":"# build: NodejsBuild\n\niam.Grant.add_to_principal(grantee=build, actions=[\"s3:ListBucket\"], resource_arns=[\"*\"])","version":"2"},"csharp":{"source":"NodejsBuild build;\n\nGrant.AddToPrincipal(new GrantOnPrincipalOptions { Grantee = build, Actions = new [] { \"s3:ListBucket\" }, ResourceArns = new [] { \"*\" } });","version":"1"},"java":{"source":"NodejsBuild build;\n\nGrant.addToPrincipal(GrantOnPrincipalOptions.builder().grantee(build).actions(List.of(\"s3:ListBucket\")).resourceArns(List.of(\"*\")).build());","version":"1"},"go":{"source":"var build NodejsBuild\n\niam.Grant_AddToPrincipal(&GrantOnPrincipalOptions{\n\tGrantee: build,\n\tActions: []*string{\n\t\tjsii.String(\"s3:ListBucket\"),\n\t},\n\tResourceArns: []*string{\n\t\tjsii.String(\"*\"),\n\t},\n})","version":"1"},"$":{"source":"declare const build: NodejsBuild;\niam.Grant.addToPrincipal({ grantee: build, actions: ['s3:ListBucket'], resourceArns:['*'] })","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":102}},"didCompile":true,"fqnsReferenced":["aws-cdk-lib.aws_iam.Grant","aws-cdk-lib.aws_iam.Grant#addToPrincipal","aws-cdk-lib.aws_iam.GrantOnPrincipalOptions","aws-cdk-lib.aws_iam.IGrantable"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const build: NodejsBuild;\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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\niam.Grant.addToPrincipal({ grantee: build, actions: ['s3:ListBucket'], resourceArns:['*'] })\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"11":2,"80":9,"138":1,"184":1,"210":2,"211":1,"212":2,"214":1,"244":1,"245":1,"261":1,"262":1,"304":3,"308":1},"fqnsFingerprint":"f0f52e6409e416e29fafa429de473262080fac9c74b9ae991b8e740d74556893"},"2b03b24613205a477e99aa9950814fbcc520436f8b5b7a1f945dcb9b46ac3bd1":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n path=\"example-app\",\n exclude=[\"dist\", \"node_modules\"]\n )\n ],\n destination_bucket=destination_bucket,\n output_source_directory=\"dist\",\n cache=CacheType.S3, # or CacheType.LOCAL\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"new NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n Path = \"example-app\",\n Exclude = new [] { \"dist\", \"node_modules\" }\n } },\n DestinationBucket = destinationBucket,\n OutputSourceDirectory = \"dist\",\n Cache = CacheType.S3, // or CacheType.LOCAL\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"NodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n .path(\"example-app\")\n .exclude(List.of(\"dist\", \"node_modules\"))\n .build()))\n .destinationBucket(destinationBucket)\n .outputSourceDirectory(\"dist\")\n .cache(CacheType.S3) // or CacheType.LOCAL\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"cdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\tPath: jsii.String(\"example-app\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t},\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tCache: *cdklabsdeploytimebuild.CacheType_S3,\n\t // or CacheType.LOCAL\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"new NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n outputSourceDirectory: 'dist',\n cache: CacheType.S3, // or CacheType.LOCAL\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":116}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.CacheType","@cdklabs/deploy-time-build.CacheType#S3","@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n outputSourceDirectory: 'dist',\n cache: CacheType.S3, // or CacheType.LOCAL\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":5,"80":10,"110":1,"210":2,"211":2,"212":1,"215":1,"245":1,"304":6,"305":1},"fqnsFingerprint":"8804781daf90eb1858906524b79e3c64c9b8b7ea40a3945334dbbf98aea3907b"},"3f64194190bc6f179550dcb61561d4131121725fbbc54ca1b640e1770d198230":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n path=\"example-app\",\n exclude=[\"dist\", \"node_modules\"]\n )\n ],\n destination_bucket=destination_bucket,\n output_source_directory=\"dist\",\n compute_type=ComputeType.MEDIUM,\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"new NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n Path = \"example-app\",\n Exclude = new [] { \"dist\", \"node_modules\" }\n } },\n DestinationBucket = destinationBucket,\n OutputSourceDirectory = \"dist\",\n ComputeType = ComputeType.MEDIUM,\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"NodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n .path(\"example-app\")\n .exclude(List.of(\"dist\", \"node_modules\"))\n .build()))\n .destinationBucket(destinationBucket)\n .outputSourceDirectory(\"dist\")\n .computeType(ComputeType.MEDIUM)\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"cdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\tPath: jsii.String(\"example-app\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t},\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tComputeType: *cdklabsdeploytimebuild.ComputeType_MEDIUM,\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"new NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n outputSourceDirectory: 'dist',\n computeType: ComputeType.MEDIUM,\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":139}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_codebuild.ComputeType","aws-cdk-lib.aws_codebuild.ComputeType#MEDIUM","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n outputSourceDirectory: 'dist',\n computeType: ComputeType.MEDIUM,\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":5,"80":10,"110":1,"210":2,"211":2,"212":1,"215":1,"245":1,"304":6,"305":1},"fqnsFingerprint":"d23fb0b45d30cc486000b099ddbf8c30fd83ef3e0cf2e44c5ee0ad907e642295"},"6405e94fc53f320c32937b4718700deb4ca10088fb5d8001d0f3ced4e80b8a97":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n path=\"../frontend\",\n exclude=[\"node_modules\", \"dist\"],\n commands=[\"npm ci\"],\n # Set a fixed string as a asset hash to prevent deploying changes.\n # This can be useful for an environment you use to develop locally.\n asset_hash=\"frontend_asset\"\n )\n ],\n destination_bucket=destination_bucket,\n distribution=distribution,\n output_source_directory=\"dist\",\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"new NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n Path = \"../frontend\",\n Exclude = new [] { \"node_modules\", \"dist\" },\n Commands = new [] { \"npm ci\" },\n // Set a fixed string as a asset hash to prevent deploying changes.\n // This can be useful for an environment you use to develop locally.\n AssetHash = \"frontend_asset\"\n } },\n DestinationBucket = destinationBucket,\n Distribution = distribution,\n OutputSourceDirectory = \"dist\",\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"NodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n .path(\"../frontend\")\n .exclude(List.of(\"node_modules\", \"dist\"))\n .commands(List.of(\"npm ci\"))\n // Set a fixed string as a asset hash to prevent deploying changes.\n // This can be useful for an environment you use to develop locally.\n .assetHash(\"frontend_asset\")\n .build()))\n .destinationBucket(destinationBucket)\n .distribution(distribution)\n .outputSourceDirectory(\"dist\")\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"cdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\tPath: jsii.String(\"../frontend\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t},\n\t\t\tCommands: []*string{\n\t\t\t\tjsii.String(\"npm ci\"),\n\t\t\t},\n\t\t\t// Set a fixed string as a asset hash to prevent deploying changes.\n\t\t\t// This can be useful for an environment you use to develop locally.\n\t\t\tAssetHash: jsii.String(\"frontend_asset\"),\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tDistribution: Distribution,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"new NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: '../frontend',\n exclude: ['node_modules', 'dist'],\n commands: ['npm ci'],\n // Set a fixed string as a asset hash to prevent deploying changes.\n // This can be useful for an environment you use to develop locally.\n assetHash: 'frontend_asset',\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":159}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_cloudfront.IDistribution","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: '../frontend',\n exclude: ['node_modules', 'dist'],\n commands: ['npm ci'],\n // Set a fixed string as a asset hash to prevent deploying changes.\n // This can be useful for an environment you use to develop locally.\n assetHash: 'frontend_asset',\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":7,"80":10,"110":1,"210":3,"211":2,"215":1,"245":1,"304":7,"305":2},"fqnsFingerprint":"c103b133a1471df6387c9bc3ec17443ecc0c3fdea08c833ec836068e58e9ed88"},"d39d7604898e274a032131443e89b8fdb7699b96fd9d7c643a97a5bc5f94740e":{"translations":{"python":{"source":"from aws_cdk.aws_ecs import RuntimePlatform\nfrom cdklabs.deploy_time_build import ContainerImageBuild\n\n\nimage = ContainerImageBuild(self, \"Build\",\n directory=\"example-image\",\n build_args={\"DUMMY_FILE_SIZE_MB\": \"15\"},\n tag=\"my-image-tag\"\n)\nDockerImageFunction(self, \"Function\",\n code=image.to_lambda_docker_image_code()\n)\narm_image = ContainerImageBuild(self, \"BuildArm\",\n directory=\"example-image\",\n platform=Platform.LINUX_ARM64,\n repository=image.repository,\n zstd_compression=True\n)\nFargateTaskDefinition(self, \"TaskDefinition\",\n runtime_platform=RuntimePlatform(cpu_architecture=CpuArchitecture.ARM64)\n).add_container(\"main\",\n image=arm_image.to_ecs_docker_image_code()\n)","version":"2"},"csharp":{"source":"using Cdklabs.Deploy.Time.Build;\n\n\nvar image = new ContainerImageBuild(this, \"Build\", new ContainerImageBuildProps {\n Directory = \"example-image\",\n BuildArgs = new Dictionary<string, string> { { \"DUMMY_FILE_SIZE_MB\", \"15\" } },\n Tag = \"my-image-tag\"\n});\nnew DockerImageFunction(this, \"Function\", new DockerImageFunctionProps {\n Code = image.ToLambdaDockerImageCode()\n});\nvar armImage = new ContainerImageBuild(this, \"BuildArm\", new ContainerImageBuildProps {\n Directory = \"example-image\",\n Platform = Platform.LINUX_ARM64,\n Repository = image.Repository,\n ZstdCompression = true\n});\nnew FargateTaskDefinition(this, \"TaskDefinition\", new FargateTaskDefinitionProps {\n RuntimePlatform = new RuntimePlatform { CpuArchitecture = CpuArchitecture.ARM64 }\n}).AddContainer(\"main\", new ContainerDefinitionOptions {\n Image = armImage.ToEcsDockerImageCode()\n});","version":"1"},"java":{"source":"import cdklabs.deploy.time.build.ContainerImageBuild;\n\n\nContainerImageBuild image = ContainerImageBuild.Builder.create(this, \"Build\")\n .directory(\"example-image\")\n .buildArgs(Map.of(\"DUMMY_FILE_SIZE_MB\", \"15\"))\n .tag(\"my-image-tag\")\n .build();\nDockerImageFunction.Builder.create(this, \"Function\")\n .code(image.toLambdaDockerImageCode())\n .build();\nContainerImageBuild armImage = ContainerImageBuild.Builder.create(this, \"BuildArm\")\n .directory(\"example-image\")\n .platform(Platform.LINUX_ARM64)\n .repository(image.getRepository())\n .zstdCompression(true)\n .build();\nFargateTaskDefinition.Builder.create(this, \"TaskDefinition\")\n .runtimePlatform(RuntimePlatform.builder().cpuArchitecture(CpuArchitecture.ARM64).build())\n .build().addContainer(\"main\", ContainerDefinitionOptions.builder()\n .image(armImage.toEcsDockerImageCode())\n .build());","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/cdklabsdeploytimebuild\"\n\n\nimage := cdklabsdeploytimebuild.NewContainerImageBuild(this, jsii.String(\"Build\"), &ContainerImageBuildProps{\n\tDirectory: jsii.String(\"example-image\"),\n\tBuildArgs: map[string]*string{\n\t\t\"DUMMY_FILE_SIZE_MB\": jsii.String(\"15\"),\n\t},\n\tTag: jsii.String(\"my-image-tag\"),\n})\nawscdk.NewDockerImageFunction(this, jsii.String(\"Function\"), &DockerImageFunctionProps{\n\tCode: image.ToLambdaDockerImageCode(),\n})\narmImage := cdklabsdeploytimebuild.NewContainerImageBuild(this, jsii.String(\"BuildArm\"), &ContainerImageBuildProps{\n\tDirectory: jsii.String(\"example-image\"),\n\tPlatform: awscdk.Platform_LINUX_ARM64(),\n\tRepository: image.Repository,\n\tZstdCompression: jsii.Boolean(true),\n})\nawscdk.NewFargateTaskDefinition(this, jsii.String(\"TaskDefinition\"), &FargateTaskDefinitionProps{\n\tRuntimePlatform: &RuntimePlatform{\n\t\tCpuArchitecture: awscdk.CpuArchitecture_ARM64(),\n\t},\n}).AddContainer(jsii.String(\"main\"), &ContainerDefinitionOptions{\n\tImage: armImage.ToEcsDockerImageCode(),\n})","version":"1"},"$":{"source":"import { ContainerImageBuild } from '@cdklabs/deploy-time-build';\n\nconst image = new ContainerImageBuild(this, 'Build', {\n directory: 'example-image',\n buildArgs: { DUMMY_FILE_SIZE_MB: '15' },\n tag: 'my-image-tag',\n});\nnew DockerImageFunction(this, 'Function', {\n code: image.toLambdaDockerImageCode(),\n});\nconst armImage = new ContainerImageBuild(this, 'BuildArm', {\n directory: 'example-image',\n platform: Platform.LINUX_ARM64,\n repository: image.repository,\n zstdCompression: true,\n});\nnew FargateTaskDefinition(this, 'TaskDefinition', {\n runtimePlatform: { cpuArchitecture: CpuArchitecture.ARM64 }\n}).addContainer('main', {\n image: armImage.toEcsDockerImageCode(),\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":181}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.ContainerImageBuild","@cdklabs/deploy-time-build.ContainerImageBuild#repository","@cdklabs/deploy-time-build.ContainerImageBuild#toEcsDockerImageCode","@cdklabs/deploy-time-build.ContainerImageBuild#toLambdaDockerImageCode","@cdklabs/deploy-time-build.ContainerImageBuildProps","aws-cdk-lib.aws_ecr.IRepository","aws-cdk-lib.aws_ecr_assets.Platform","aws-cdk-lib.aws_ecr_assets.Platform#LINUX_ARM64","aws-cdk-lib.aws_ecs.ContainerDefinitionOptions","aws-cdk-lib.aws_ecs.ContainerImage","aws-cdk-lib.aws_ecs.CpuArchitecture","aws-cdk-lib.aws_ecs.CpuArchitecture#ARM64","aws-cdk-lib.aws_ecs.FargateTaskDefinition","aws-cdk-lib.aws_ecs.FargateTaskDefinitionProps","aws-cdk-lib.aws_ecs.RuntimePlatform","aws-cdk-lib.aws_ecs.TaskDefinition#addContainer","aws-cdk-lib.aws_lambda.DockerImageCode","aws-cdk-lib.aws_lambda.DockerImageFunction","aws-cdk-lib.aws_lambda.DockerImageFunctionProps","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { ContainerImageBuild } from '@cdklabs/deploy-time-build';\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 image = new ContainerImageBuild(this, 'Build', {\n directory: 'example-image',\n buildArgs: { DUMMY_FILE_SIZE_MB: '15' },\n tag: 'my-image-tag',\n});\nnew DockerImageFunction(this, 'Function', {\n code: image.toLambdaDockerImageCode(),\n});\nconst armImage = new ContainerImageBuild(this, 'BuildArm', {\n directory: 'example-image',\n platform: Platform.LINUX_ARM64,\n repository: image.repository,\n zstdCompression: true,\n});\nnew FargateTaskDefinition(this, 'TaskDefinition', {\n runtimePlatform: { cpuArchitecture: CpuArchitecture.ARM64 }\n}).addContainer('main', {\n image: armImage.toEcsDockerImageCode(),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"11":10,"80":30,"110":4,"112":1,"211":7,"212":6,"214":3,"215":4,"244":2,"245":2,"261":2,"262":2,"273":1,"274":1,"276":1,"277":1,"304":12,"308":1},"fqnsFingerprint":"907854e816a7aea78483a10d546d1d76969e608020786f9f7401f4d185b3b6cd"},"0edbf109619b58eea09faf5bb83f6c21aac7ae7cfb5cae9b7bf6f2d9aa25fe5e":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import SociIndexV2Build\n\n\nasset = DockerImageAsset(self, \"Image\", directory=\"example-image\")\nsoci_index = SociIndexV2Build(self, \"SociV2Index\",\n repository=asset.repository,\n input_image_tag=asset.asset_hash,\n output_image_tag=f\"{asset.assetHash}-soci\"\n)\n\n# Use with ECS Fargate\ntask_definition = FargateTaskDefinition(self, \"TaskDefinition\")\ntask_definition.add_container(\"main\",\n image=soci_index.to_ecs_docker_image_code()\n)\n\n# Or create from DockerImageAsset using utility method\nsoci_index_from_asset = SociIndexV2Build.from_docker_image_asset(self, \"SociV2Index2\", asset)","version":"2"},"csharp":{"source":"using Cdklabs.Deploy.Time.Build;\n\n\nvar asset = new DockerImageAsset(this, \"Image\", new DockerImageAssetProps { Directory = \"example-image\" });\nvar sociIndex = new SociIndexV2Build(this, \"SociV2Index\", new SociIndexV2BuildProps {\n Repository = asset.Repository,\n InputImageTag = asset.AssetHash,\n OutputImageTag = $\"{asset.assetHash}-soci\"\n});\n\n// Use with ECS Fargate\nvar taskDefinition = new FargateTaskDefinition(this, \"TaskDefinition\");\ntaskDefinition.AddContainer(\"main\", new ContainerDefinitionOptions {\n Image = sociIndex.ToEcsDockerImageCode()\n});\n\n// Or create from DockerImageAsset using utility method\nvar sociIndexFromAsset = SociIndexV2Build.FromDockerImageAsset(this, \"SociV2Index2\", asset);","version":"1"},"java":{"source":"import cdklabs.deploy.time.build.SociIndexV2Build;\n\n\nDockerImageAsset asset = DockerImageAsset.Builder.create(this, \"Image\").directory(\"example-image\").build();\nSociIndexV2Build sociIndex = SociIndexV2Build.Builder.create(this, \"SociV2Index\")\n .repository(asset.getRepository())\n .inputImageTag(asset.getAssetHash())\n .outputImageTag(String.format(\"%s-soci\", asset.getAssetHash()))\n .build();\n\n// Use with ECS Fargate\nFargateTaskDefinition taskDefinition = new FargateTaskDefinition(this, \"TaskDefinition\");\ntaskDefinition.addContainer(\"main\", ContainerDefinitionOptions.builder()\n .image(sociIndex.toEcsDockerImageCode())\n .build());\n\n// Or create from DockerImageAsset using utility method\nSociIndexV2Build sociIndexFromAsset = SociIndexV2Build.fromDockerImageAsset(this, \"SociV2Index2\", asset);","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/cdklabsdeploytimebuild\"\n\n\nasset := awscdk.NewDockerImageAsset(this, jsii.String(\"Image\"), &DockerImageAssetProps{\n\tDirectory: jsii.String(\"example-image\"),\n})\nsociIndex := cdklabsdeploytimebuild.NewSociIndexV2Build(this, jsii.String(\"SociV2Index\"), &SociIndexV2BuildProps{\n\tRepository: asset.Repository,\n\tInputImageTag: asset.AssetHash,\n\tOutputImageTag: fmt.Sprintf(\"%v-soci\", asset.*AssetHash),\n})\n\n// Use with ECS Fargate\ntaskDefinition := awscdk.NewFargateTaskDefinition(this, jsii.String(\"TaskDefinition\"))\ntaskDefinition.AddContainer(jsii.String(\"main\"), &ContainerDefinitionOptions{\n\tImage: sociIndex.ToEcsDockerImageCode(),\n})\n\n// Or create from DockerImageAsset using utility method\nsociIndexFromAsset := cdklabsdeploytimebuild.SociIndexV2Build_FromDockerImageAsset(this, jsii.String(\"SociV2Index2\"), asset)","version":"1"},"$":{"source":"import { SociIndexV2Build } from '@cdklabs/deploy-time-build';\n\nconst asset = new DockerImageAsset(this, 'Image', { directory: 'example-image' });\nconst sociIndex = new SociIndexV2Build(this, 'SociV2Index', {\n repository: asset.repository,\n inputImageTag: asset.assetHash,\n outputImageTag: `${asset.assetHash}-soci`,\n});\n\n// Use with ECS Fargate\nconst taskDefinition = new FargateTaskDefinition(this, 'TaskDefinition');\ntaskDefinition.addContainer('main', {\n image: sociIndex.toEcsDockerImageCode(),\n});\n\n// Or create from DockerImageAsset using utility method\nconst sociIndexFromAsset = SociIndexV2Build.fromDockerImageAsset(this, 'SociV2Index2', asset);","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":214}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.SociIndexV2Build","@cdklabs/deploy-time-build.SociIndexV2Build#fromDockerImageAsset","@cdklabs/deploy-time-build.SociIndexV2Build#toEcsDockerImageCode","@cdklabs/deploy-time-build.SociIndexV2BuildProps","aws-cdk-lib.aws_ecr.IRepository","aws-cdk-lib.aws_ecr_assets.DockerImageAsset","aws-cdk-lib.aws_ecr_assets.DockerImageAsset#assetHash","aws-cdk-lib.aws_ecr_assets.DockerImageAsset#repository","aws-cdk-lib.aws_ecr_assets.DockerImageAssetProps","aws-cdk-lib.aws_ecs.ContainerDefinitionOptions","aws-cdk-lib.aws_ecs.ContainerImage","aws-cdk-lib.aws_ecs.FargateTaskDefinition","aws-cdk-lib.aws_ecs.TaskDefinition#addContainer","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { SociIndexV2Build } from '@cdklabs/deploy-time-build';\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 asset = new DockerImageAsset(this, 'Image', { directory: 'example-image' });\nconst sociIndex = new SociIndexV2Build(this, 'SociV2Index', {\n repository: asset.repository,\n inputImageTag: asset.assetHash,\n outputImageTag: `${asset.assetHash}-soci`,\n});\n\n// Use with ECS Fargate\nconst taskDefinition = new FargateTaskDefinition(this, 'TaskDefinition');\ntaskDefinition.addContainer('main', {\n image: sociIndex.toEcsDockerImageCode(),\n});\n\n// Or create from DockerImageAsset using utility method\nconst sociIndexFromAsset = SociIndexV2Build.fromDockerImageAsset(this, 'SociV2Index2', asset);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"11":7,"16":1,"18":1,"80":26,"110":4,"211":3,"212":6,"214":3,"215":3,"229":1,"240":1,"244":4,"245":1,"261":4,"262":4,"273":1,"274":1,"276":1,"277":1,"304":5,"308":1},"fqnsFingerprint":"73703700838ff931fcbedae1a86a9f41a7e736df4b664d9e87cf42755bb17ae9"}}}
|
|
1
|
+
{"version":"2","toolVersion":"5.9.71","snippets":{"d9f55c7a342aaa8f69e89d17efebdcaac996c123391343435db49e0f4ba74e94":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig\nfrom cdklabs.deploy_time_build import NodejsBuild\n\n\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n path=\"example-app\",\n exclude=[\"dist\", \"node_modules\"]\n )\n ],\n destination_bucket=destination_bucket,\n distribution=distribution,\n output_source_directory=\"dist\",\n build_commands=[\"npm ci\", \"npm run build\"],\n build_environment={\n \"VITE_API_ENDPOINT\": api.url\n },\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"using Cdklabs.Deploy.Time.Build;\n\n\nnew NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n Path = \"example-app\",\n Exclude = new [] { \"dist\", \"node_modules\" }\n } },\n DestinationBucket = destinationBucket,\n Distribution = distribution,\n OutputSourceDirectory = \"dist\",\n BuildCommands = new [] { \"npm ci\", \"npm run build\" },\n BuildEnvironment = new Dictionary<string, string> {\n { \"VITE_API_ENDPOINT\", api.Url }\n },\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"import cdklabs.deploy.time.build.NodejsBuild;\n\n\nNodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n .path(\"example-app\")\n .exclude(List.of(\"dist\", \"node_modules\"))\n .build()))\n .destinationBucket(destinationBucket)\n .distribution(distribution)\n .outputSourceDirectory(\"dist\")\n .buildCommands(List.of(\"npm ci\", \"npm run build\"))\n .buildEnvironment(Map.of(\n \"VITE_API_ENDPOINT\", api.getUrl()))\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/cdklabsdeploytimebuild\"\n\n\ncdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\tPath: jsii.String(\"example-app\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t},\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tDistribution: Distribution,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tBuildCommands: []*string{\n\t\tjsii.String(\"npm ci\"),\n\t\tjsii.String(\"npm run build\"),\n\t},\n\tBuildEnvironment: map[string]*string{\n\t\t\"VITE_API_ENDPOINT\": api.url,\n\t},\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"import { NodejsBuild } from '@cdklabs/deploy-time-build';\n\nnew NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n buildCommands: ['npm ci', 'npm run build'],\n buildEnvironment: {\n VITE_API_ENDPOINT: api.url,\n },\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":27}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_cloudfront.IDistribution","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { NodejsBuild } from '@cdklabs/deploy-time-build';\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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\nnew NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n buildCommands: ['npm ci', 'npm run build'],\n buildEnvironment: {\n VITE_API_ENDPOINT: api.url,\n },\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":8,"80":14,"110":1,"210":3,"211":3,"212":1,"215":1,"245":1,"273":1,"274":1,"276":1,"277":1,"304":8,"305":2,"308":1},"fqnsFingerprint":"c103b133a1471df6387c9bc3ec17443ecc0c3fdea08c833ec836068e58e9ed88"},"07be8476822ae024f7f429bdac042e4702b626aecd21849f5ac447be889afb46":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig, AssetConfig\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n # directory containing source code and package.json\n path=\"example-app\",\n exclude=[\"dist\", \"node_modules\"],\n commands=[\"npm install\"]\n ), AssetConfig(\n # directory that is also required for the build\n path=\"module1\"\n )\n ],\n destination_bucket=destination_bucket,\n distribution=distribution,\n output_source_directory=\"dist\",\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"new NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n // directory containing source code and package.json\n Path = \"example-app\",\n Exclude = new [] { \"dist\", \"node_modules\" },\n Commands = new [] { \"npm install\" }\n }, new AssetConfig {\n // directory that is also required for the build\n Path = \"module1\"\n } },\n DestinationBucket = destinationBucket,\n Distribution = distribution,\n OutputSourceDirectory = \"dist\",\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"NodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n // directory containing source code and package.json\n .path(\"example-app\")\n .exclude(List.of(\"dist\", \"node_modules\"))\n .commands(List.of(\"npm install\"))\n .build(), AssetConfig.builder()\n // directory that is also required for the build\n .path(\"module1\")\n .build()))\n .destinationBucket(destinationBucket)\n .distribution(distribution)\n .outputSourceDirectory(\"dist\")\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"cdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\t// directory containing source code and package.json\n\t\t\tPath: jsii.String(\"example-app\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t},\n\t\t\tCommands: []*string{\n\t\t\t\tjsii.String(\"npm install\"),\n\t\t\t},\n\t\t},\n\t\t&AssetConfig{\n\t\t\t// directory that is also required for the build\n\t\t\tPath: jsii.String(\"module1\"),\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tDistribution: Distribution,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"new NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n // directory containing source code and package.json\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n commands: ['npm install'],\n },\n {\n // directory that is also required for the build\n path: 'module1',\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":53}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_cloudfront.IDistribution","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n // directory containing source code and package.json\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n commands: ['npm install'],\n },\n {\n // directory that is also required for the build\n path: 'module1',\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":7,"80":10,"110":1,"210":3,"211":3,"215":1,"245":1,"304":7,"305":2},"fqnsFingerprint":"c103b133a1471df6387c9bc3ec17443ecc0c3fdea08c833ec836068e58e9ed88"},"57c4f1e95406cffad4eca47374a253fcf144b129352834b84fe4ce6ce9e3da1d":{"translations":{"python":{"source":"# some_bucket: s3.IBucket\n# build: NodejsBuild\n\nsome_bucket.grant_read_write(build)","version":"2"},"csharp":{"source":"IBucket someBucket;\nNodejsBuild build;\n\nsomeBucket.GrantReadWrite(build);","version":"1"},"java":{"source":"IBucket someBucket;\nNodejsBuild build;\n\nsomeBucket.grantReadWrite(build);","version":"1"},"go":{"source":"var someBucket IBucket\nvar build NodejsBuild\n\nsomeBucket.GrantReadWrite(build)","version":"1"},"$":{"source":"declare const someBucket: s3.IBucket;\ndeclare const build: NodejsBuild;\nsomeBucket.grantReadWrite(build);","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":94}},"didCompile":true,"fqnsReferenced":["aws-cdk-lib.aws_iam.IGrantable","aws-cdk-lib.aws_s3.IBucket#grantReadWrite"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const someBucket: s3.IBucket;\ndeclare const build: NodejsBuild;\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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\nsomeBucket.grantReadWrite(build);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"80":8,"138":2,"167":1,"184":2,"212":1,"214":1,"244":2,"245":1,"261":2,"262":2,"308":1},"fqnsFingerprint":"c04a359ccd17c4ce38c71752edeca6657c59c603cbac00a70dd89b708aeb3861"},"cd56982b16eadc2c93e7a07a2ce081e37678697c7e9ecfeccf336ffaa75877b0":{"translations":{"python":{"source":"# build: NodejsBuild\n\niam.Grant.add_to_principal(grantee=build, actions=[\"s3:ListBucket\"], resource_arns=[\"*\"])","version":"2"},"csharp":{"source":"NodejsBuild build;\n\nGrant.AddToPrincipal(new GrantOnPrincipalOptions { Grantee = build, Actions = new [] { \"s3:ListBucket\" }, ResourceArns = new [] { \"*\" } });","version":"1"},"java":{"source":"NodejsBuild build;\n\nGrant.addToPrincipal(GrantOnPrincipalOptions.builder().grantee(build).actions(List.of(\"s3:ListBucket\")).resourceArns(List.of(\"*\")).build());","version":"1"},"go":{"source":"var build NodejsBuild\n\niam.Grant_AddToPrincipal(&GrantOnPrincipalOptions{\n\tGrantee: build,\n\tActions: []*string{\n\t\tjsii.String(\"s3:ListBucket\"),\n\t},\n\tResourceArns: []*string{\n\t\tjsii.String(\"*\"),\n\t},\n})","version":"1"},"$":{"source":"declare const build: NodejsBuild;\niam.Grant.addToPrincipal({ grantee: build, actions: ['s3:ListBucket'], resourceArns:['*'] })","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":102}},"didCompile":true,"fqnsReferenced":["aws-cdk-lib.aws_iam.Grant","aws-cdk-lib.aws_iam.Grant#addToPrincipal","aws-cdk-lib.aws_iam.GrantOnPrincipalOptions","aws-cdk-lib.aws_iam.IGrantable"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const build: NodejsBuild;\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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\niam.Grant.addToPrincipal({ grantee: build, actions: ['s3:ListBucket'], resourceArns:['*'] })\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"11":2,"80":9,"138":1,"184":1,"210":2,"211":1,"212":2,"214":1,"244":1,"245":1,"261":1,"262":1,"304":3,"308":1},"fqnsFingerprint":"f0f52e6409e416e29fafa429de473262080fac9c74b9ae991b8e740d74556893"},"2b03b24613205a477e99aa9950814fbcc520436f8b5b7a1f945dcb9b46ac3bd1":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n path=\"example-app\",\n exclude=[\"dist\", \"node_modules\"]\n )\n ],\n destination_bucket=destination_bucket,\n output_source_directory=\"dist\",\n cache=CacheType.S3, # or CacheType.LOCAL\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"new NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n Path = \"example-app\",\n Exclude = new [] { \"dist\", \"node_modules\" }\n } },\n DestinationBucket = destinationBucket,\n OutputSourceDirectory = \"dist\",\n Cache = CacheType.S3, // or CacheType.LOCAL\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"NodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n .path(\"example-app\")\n .exclude(List.of(\"dist\", \"node_modules\"))\n .build()))\n .destinationBucket(destinationBucket)\n .outputSourceDirectory(\"dist\")\n .cache(CacheType.S3) // or CacheType.LOCAL\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"cdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\tPath: jsii.String(\"example-app\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t},\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tCache: *cdklabsdeploytimebuild.CacheType_S3,\n\t // or CacheType.LOCAL\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"new NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n outputSourceDirectory: 'dist',\n cache: CacheType.S3, // or CacheType.LOCAL\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":116}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.CacheType","@cdklabs/deploy-time-build.CacheType#S3","@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n outputSourceDirectory: 'dist',\n cache: CacheType.S3, // or CacheType.LOCAL\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":5,"80":10,"110":1,"210":2,"211":2,"212":1,"215":1,"245":1,"304":6,"305":1},"fqnsFingerprint":"8804781daf90eb1858906524b79e3c64c9b8b7ea40a3945334dbbf98aea3907b"},"3f64194190bc6f179550dcb61561d4131121725fbbc54ca1b640e1770d198230":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n path=\"example-app\",\n exclude=[\"dist\", \"node_modules\"]\n )\n ],\n destination_bucket=destination_bucket,\n output_source_directory=\"dist\",\n compute_type=ComputeType.MEDIUM,\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"new NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n Path = \"example-app\",\n Exclude = new [] { \"dist\", \"node_modules\" }\n } },\n DestinationBucket = destinationBucket,\n OutputSourceDirectory = \"dist\",\n ComputeType = ComputeType.MEDIUM,\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"NodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n .path(\"example-app\")\n .exclude(List.of(\"dist\", \"node_modules\"))\n .build()))\n .destinationBucket(destinationBucket)\n .outputSourceDirectory(\"dist\")\n .computeType(ComputeType.MEDIUM)\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"cdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\tPath: jsii.String(\"example-app\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t},\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tComputeType: *cdklabsdeploytimebuild.ComputeType_MEDIUM,\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"new NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n outputSourceDirectory: 'dist',\n computeType: ComputeType.MEDIUM,\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":139}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_codebuild.ComputeType","aws-cdk-lib.aws_codebuild.ComputeType#MEDIUM","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: 'example-app',\n exclude: ['dist', 'node_modules'],\n },\n ],\n destinationBucket,\n outputSourceDirectory: 'dist',\n computeType: ComputeType.MEDIUM,\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":5,"80":10,"110":1,"210":2,"211":2,"212":1,"215":1,"245":1,"304":6,"305":1},"fqnsFingerprint":"d23fb0b45d30cc486000b099ddbf8c30fd83ef3e0cf2e44c5ee0ad907e642295"},"6405e94fc53f320c32937b4718700deb4ca10088fb5d8001d0f3ced4e80b8a97":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import AssetConfig\nNodejsBuild(self, \"ExampleBuild\",\n assets=[AssetConfig(\n path=\"../frontend\",\n exclude=[\"node_modules\", \"dist\"],\n commands=[\"npm ci\"],\n # Set a fixed string as a asset hash to prevent deploying changes.\n # This can be useful for an environment you use to develop locally.\n asset_hash=\"frontend_asset\"\n )\n ],\n destination_bucket=destination_bucket,\n distribution=distribution,\n output_source_directory=\"dist\",\n nodejs_version=24\n)","version":"2"},"csharp":{"source":"new NodejsBuild(this, \"ExampleBuild\", new NodejsBuildProps {\n Assets = new [] { new AssetConfig {\n Path = \"../frontend\",\n Exclude = new [] { \"node_modules\", \"dist\" },\n Commands = new [] { \"npm ci\" },\n // Set a fixed string as a asset hash to prevent deploying changes.\n // This can be useful for an environment you use to develop locally.\n AssetHash = \"frontend_asset\"\n } },\n DestinationBucket = destinationBucket,\n Distribution = distribution,\n OutputSourceDirectory = \"dist\",\n NodejsVersion = 24\n});","version":"1"},"java":{"source":"NodejsBuild.Builder.create(this, \"ExampleBuild\")\n .assets(List.of(AssetConfig.builder()\n .path(\"../frontend\")\n .exclude(List.of(\"node_modules\", \"dist\"))\n .commands(List.of(\"npm ci\"))\n // Set a fixed string as a asset hash to prevent deploying changes.\n // This can be useful for an environment you use to develop locally.\n .assetHash(\"frontend_asset\")\n .build()))\n .destinationBucket(destinationBucket)\n .distribution(distribution)\n .outputSourceDirectory(\"dist\")\n .nodejsVersion(24)\n .build();","version":"1"},"go":{"source":"cdklabsdeploytimebuild.NewNodejsBuild(this, jsii.String(\"ExampleBuild\"), &NodejsBuildProps{\n\tAssets: []AssetConfig{\n\t\t&AssetConfig{\n\t\t\tPath: jsii.String(\"../frontend\"),\n\t\t\tExclude: []*string{\n\t\t\t\tjsii.String(\"node_modules\"),\n\t\t\t\tjsii.String(\"dist\"),\n\t\t\t},\n\t\t\tCommands: []*string{\n\t\t\t\tjsii.String(\"npm ci\"),\n\t\t\t},\n\t\t\t// Set a fixed string as a asset hash to prevent deploying changes.\n\t\t\t// This can be useful for an environment you use to develop locally.\n\t\t\tAssetHash: jsii.String(\"frontend_asset\"),\n\t\t},\n\t},\n\tDestinationBucket: DestinationBucket,\n\tDistribution: Distribution,\n\tOutputSourceDirectory: jsii.String(\"dist\"),\n\tNodejsVersion: jsii.Number(24),\n})","version":"1"},"$":{"source":"new NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: '../frontend',\n exclude: ['node_modules', 'dist'],\n commands: ['npm ci'],\n // Set a fixed string as a asset hash to prevent deploying changes.\n // This can be useful for an environment you use to develop locally.\n assetHash: 'frontend_asset',\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n nodejsVersion: 24,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":159}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.NodejsBuild","@cdklabs/deploy-time-build.NodejsBuildProps","aws-cdk-lib.aws_cloudfront.IDistribution","aws-cdk-lib.aws_s3.IBucket","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport {\n Stack,\n} from 'aws-cdk-lib';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport { NodejsBuild, CacheType, ComputeType } from '@cdklabs/deploy-time-build';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 NodejsBuild(this, 'ExampleBuild', {\n assets: [\n {\n path: '../frontend',\n exclude: ['node_modules', 'dist'],\n commands: ['npm ci'],\n // Set a fixed string as a asset hash to prevent deploying changes.\n // This can be useful for an environment you use to develop locally.\n assetHash: 'frontend_asset',\n },\n ],\n destinationBucket,\n distribution,\n outputSourceDirectory: 'dist',\n nodejsVersion: 24,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"9":1,"11":7,"80":10,"110":1,"210":3,"211":2,"215":1,"245":1,"304":7,"305":2},"fqnsFingerprint":"c103b133a1471df6387c9bc3ec17443ecc0c3fdea08c833ec836068e58e9ed88"},"d39d7604898e274a032131443e89b8fdb7699b96fd9d7c643a97a5bc5f94740e":{"translations":{"python":{"source":"from aws_cdk.aws_ecs import RuntimePlatform\nfrom cdklabs.deploy_time_build import ContainerImageBuild\n\n\nimage = ContainerImageBuild(self, \"Build\",\n directory=\"example-image\",\n build_args={\"DUMMY_FILE_SIZE_MB\": \"15\"},\n tag=\"my-image-tag\"\n)\nDockerImageFunction(self, \"Function\",\n code=image.to_lambda_docker_image_code()\n)\narm_image = ContainerImageBuild(self, \"BuildArm\",\n directory=\"example-image\",\n platform=Platform.LINUX_ARM64,\n repository=image.repository,\n zstd_compression=True\n)\nFargateTaskDefinition(self, \"TaskDefinition\",\n runtime_platform=RuntimePlatform(cpu_architecture=CpuArchitecture.ARM64)\n).add_container(\"main\",\n image=arm_image.to_ecs_docker_image_code()\n)","version":"2"},"csharp":{"source":"using Cdklabs.Deploy.Time.Build;\n\n\nvar image = new ContainerImageBuild(this, \"Build\", new ContainerImageBuildProps {\n Directory = \"example-image\",\n BuildArgs = new Dictionary<string, string> { { \"DUMMY_FILE_SIZE_MB\", \"15\" } },\n Tag = \"my-image-tag\"\n});\nnew DockerImageFunction(this, \"Function\", new DockerImageFunctionProps {\n Code = image.ToLambdaDockerImageCode()\n});\nvar armImage = new ContainerImageBuild(this, \"BuildArm\", new ContainerImageBuildProps {\n Directory = \"example-image\",\n Platform = Platform.LINUX_ARM64,\n Repository = image.Repository,\n ZstdCompression = true\n});\nnew FargateTaskDefinition(this, \"TaskDefinition\", new FargateTaskDefinitionProps {\n RuntimePlatform = new RuntimePlatform { CpuArchitecture = CpuArchitecture.ARM64 }\n}).AddContainer(\"main\", new ContainerDefinitionOptions {\n Image = armImage.ToEcsDockerImageCode()\n});","version":"1"},"java":{"source":"import cdklabs.deploy.time.build.ContainerImageBuild;\n\n\nContainerImageBuild image = ContainerImageBuild.Builder.create(this, \"Build\")\n .directory(\"example-image\")\n .buildArgs(Map.of(\"DUMMY_FILE_SIZE_MB\", \"15\"))\n .tag(\"my-image-tag\")\n .build();\nDockerImageFunction.Builder.create(this, \"Function\")\n .code(image.toLambdaDockerImageCode())\n .build();\nContainerImageBuild armImage = ContainerImageBuild.Builder.create(this, \"BuildArm\")\n .directory(\"example-image\")\n .platform(Platform.LINUX_ARM64)\n .repository(image.getRepository())\n .zstdCompression(true)\n .build();\nFargateTaskDefinition.Builder.create(this, \"TaskDefinition\")\n .runtimePlatform(RuntimePlatform.builder().cpuArchitecture(CpuArchitecture.ARM64).build())\n .build().addContainer(\"main\", ContainerDefinitionOptions.builder()\n .image(armImage.toEcsDockerImageCode())\n .build());","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/cdklabsdeploytimebuild\"\n\n\nimage := cdklabsdeploytimebuild.NewContainerImageBuild(this, jsii.String(\"Build\"), &ContainerImageBuildProps{\n\tDirectory: jsii.String(\"example-image\"),\n\tBuildArgs: map[string]*string{\n\t\t\"DUMMY_FILE_SIZE_MB\": jsii.String(\"15\"),\n\t},\n\tTag: jsii.String(\"my-image-tag\"),\n})\nawscdk.NewDockerImageFunction(this, jsii.String(\"Function\"), &DockerImageFunctionProps{\n\tCode: image.ToLambdaDockerImageCode(),\n})\narmImage := cdklabsdeploytimebuild.NewContainerImageBuild(this, jsii.String(\"BuildArm\"), &ContainerImageBuildProps{\n\tDirectory: jsii.String(\"example-image\"),\n\tPlatform: awscdk.Platform_LINUX_ARM64(),\n\tRepository: image.Repository,\n\tZstdCompression: jsii.Boolean(true),\n})\nawscdk.NewFargateTaskDefinition(this, jsii.String(\"TaskDefinition\"), &FargateTaskDefinitionProps{\n\tRuntimePlatform: &RuntimePlatform{\n\t\tCpuArchitecture: awscdk.CpuArchitecture_ARM64(),\n\t},\n}).AddContainer(jsii.String(\"main\"), &ContainerDefinitionOptions{\n\tImage: armImage.ToEcsDockerImageCode(),\n})","version":"1"},"$":{"source":"import { ContainerImageBuild } from '@cdklabs/deploy-time-build';\n\nconst image = new ContainerImageBuild(this, 'Build', {\n directory: 'example-image',\n buildArgs: { DUMMY_FILE_SIZE_MB: '15' },\n tag: 'my-image-tag',\n});\nnew DockerImageFunction(this, 'Function', {\n code: image.toLambdaDockerImageCode(),\n});\nconst armImage = new ContainerImageBuild(this, 'BuildArm', {\n directory: 'example-image',\n platform: Platform.LINUX_ARM64,\n repository: image.repository,\n zstdCompression: true,\n});\nnew FargateTaskDefinition(this, 'TaskDefinition', {\n runtimePlatform: { cpuArchitecture: CpuArchitecture.ARM64 }\n}).addContainer('main', {\n image: armImage.toEcsDockerImageCode(),\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":181}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.ContainerImageBuild","@cdklabs/deploy-time-build.ContainerImageBuild#repository","@cdklabs/deploy-time-build.ContainerImageBuild#toEcsDockerImageCode","@cdklabs/deploy-time-build.ContainerImageBuild#toLambdaDockerImageCode","@cdklabs/deploy-time-build.ContainerImageBuildProps","aws-cdk-lib.aws_ecr.IRepository","aws-cdk-lib.aws_ecr_assets.Platform","aws-cdk-lib.aws_ecr_assets.Platform#LINUX_ARM64","aws-cdk-lib.aws_ecs.ContainerDefinitionOptions","aws-cdk-lib.aws_ecs.ContainerImage","aws-cdk-lib.aws_ecs.CpuArchitecture","aws-cdk-lib.aws_ecs.CpuArchitecture#ARM64","aws-cdk-lib.aws_ecs.FargateTaskDefinition","aws-cdk-lib.aws_ecs.FargateTaskDefinitionProps","aws-cdk-lib.aws_ecs.RuntimePlatform","aws-cdk-lib.aws_ecs.TaskDefinition#addContainer","aws-cdk-lib.aws_lambda.DockerImageCode","aws-cdk-lib.aws_lambda.DockerImageFunction","aws-cdk-lib.aws_lambda.DockerImageFunctionProps","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { ContainerImageBuild } from '@cdklabs/deploy-time-build';\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 image = new ContainerImageBuild(this, 'Build', {\n directory: 'example-image',\n buildArgs: { DUMMY_FILE_SIZE_MB: '15' },\n tag: 'my-image-tag',\n});\nnew DockerImageFunction(this, 'Function', {\n code: image.toLambdaDockerImageCode(),\n});\nconst armImage = new ContainerImageBuild(this, 'BuildArm', {\n directory: 'example-image',\n platform: Platform.LINUX_ARM64,\n repository: image.repository,\n zstdCompression: true,\n});\nnew FargateTaskDefinition(this, 'TaskDefinition', {\n runtimePlatform: { cpuArchitecture: CpuArchitecture.ARM64 }\n}).addContainer('main', {\n image: armImage.toEcsDockerImageCode(),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"11":10,"80":30,"110":4,"112":1,"211":7,"212":6,"214":3,"215":4,"244":2,"245":2,"261":2,"262":2,"273":1,"274":1,"276":1,"277":1,"304":12,"308":1},"fqnsFingerprint":"907854e816a7aea78483a10d546d1d76969e608020786f9f7401f4d185b3b6cd"},"0edbf109619b58eea09faf5bb83f6c21aac7ae7cfb5cae9b7bf6f2d9aa25fe5e":{"translations":{"python":{"source":"from cdklabs.deploy_time_build import SociIndexV2Build\n\n\nasset = DockerImageAsset(self, \"Image\", directory=\"example-image\")\nsoci_index = SociIndexV2Build(self, \"SociV2Index\",\n repository=asset.repository,\n input_image_tag=asset.asset_hash,\n output_image_tag=f\"{asset.assetHash}-soci\"\n)\n\n# Use with ECS Fargate\ntask_definition = FargateTaskDefinition(self, \"TaskDefinition\")\ntask_definition.add_container(\"main\",\n image=soci_index.to_ecs_docker_image_code()\n)\n\n# Or create from DockerImageAsset using utility method\nsoci_index_from_asset = SociIndexV2Build.from_docker_image_asset(self, \"SociV2Index2\", asset)","version":"2"},"csharp":{"source":"using Cdklabs.Deploy.Time.Build;\n\n\nvar asset = new DockerImageAsset(this, \"Image\", new DockerImageAssetProps { Directory = \"example-image\" });\nvar sociIndex = new SociIndexV2Build(this, \"SociV2Index\", new SociIndexV2BuildProps {\n Repository = asset.Repository,\n InputImageTag = asset.AssetHash,\n OutputImageTag = $\"{asset.assetHash}-soci\"\n});\n\n// Use with ECS Fargate\nvar taskDefinition = new FargateTaskDefinition(this, \"TaskDefinition\");\ntaskDefinition.AddContainer(\"main\", new ContainerDefinitionOptions {\n Image = sociIndex.ToEcsDockerImageCode()\n});\n\n// Or create from DockerImageAsset using utility method\nvar sociIndexFromAsset = SociIndexV2Build.FromDockerImageAsset(this, \"SociV2Index2\", asset);","version":"1"},"java":{"source":"import cdklabs.deploy.time.build.SociIndexV2Build;\n\n\nDockerImageAsset asset = DockerImageAsset.Builder.create(this, \"Image\").directory(\"example-image\").build();\nSociIndexV2Build sociIndex = SociIndexV2Build.Builder.create(this, \"SociV2Index\")\n .repository(asset.getRepository())\n .inputImageTag(asset.getAssetHash())\n .outputImageTag(String.format(\"%s-soci\", asset.getAssetHash()))\n .build();\n\n// Use with ECS Fargate\nFargateTaskDefinition taskDefinition = new FargateTaskDefinition(this, \"TaskDefinition\");\ntaskDefinition.addContainer(\"main\", ContainerDefinitionOptions.builder()\n .image(sociIndex.toEcsDockerImageCode())\n .build());\n\n// Or create from DockerImageAsset using utility method\nSociIndexV2Build sociIndexFromAsset = SociIndexV2Build.fromDockerImageAsset(this, \"SociV2Index2\", asset);","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/cdklabsdeploytimebuild\"\n\n\nasset := awscdk.NewDockerImageAsset(this, jsii.String(\"Image\"), &DockerImageAssetProps{\n\tDirectory: jsii.String(\"example-image\"),\n})\nsociIndex := cdklabsdeploytimebuild.NewSociIndexV2Build(this, jsii.String(\"SociV2Index\"), &SociIndexV2BuildProps{\n\tRepository: asset.Repository,\n\tInputImageTag: asset.AssetHash,\n\tOutputImageTag: fmt.Sprintf(\"%v-soci\", asset.*AssetHash),\n})\n\n// Use with ECS Fargate\ntaskDefinition := awscdk.NewFargateTaskDefinition(this, jsii.String(\"TaskDefinition\"))\ntaskDefinition.AddContainer(jsii.String(\"main\"), &ContainerDefinitionOptions{\n\tImage: sociIndex.ToEcsDockerImageCode(),\n})\n\n// Or create from DockerImageAsset using utility method\nsociIndexFromAsset := cdklabsdeploytimebuild.SociIndexV2Build_FromDockerImageAsset(this, jsii.String(\"SociV2Index2\"), asset)","version":"1"},"$":{"source":"import { SociIndexV2Build } from '@cdklabs/deploy-time-build';\n\nconst asset = new DockerImageAsset(this, 'Image', { directory: 'example-image' });\nconst sociIndex = new SociIndexV2Build(this, 'SociV2Index', {\n repository: asset.repository,\n inputImageTag: asset.assetHash,\n outputImageTag: `${asset.assetHash}-soci`,\n});\n\n// Use with ECS Fargate\nconst taskDefinition = new FargateTaskDefinition(this, 'TaskDefinition');\ntaskDefinition.addContainer('main', {\n image: sociIndex.toEcsDockerImageCode(),\n});\n\n// Or create from DockerImageAsset using utility method\nconst sociIndexFromAsset = SociIndexV2Build.fromDockerImageAsset(this, 'SociV2Index2', asset);","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@cdklabs/deploy-time-build"},"field":{"field":"markdown","line":214}},"didCompile":true,"fqnsReferenced":["@cdklabs/deploy-time-build.SociIndexV2Build","@cdklabs/deploy-time-build.SociIndexV2Build#fromDockerImageAsset","@cdklabs/deploy-time-build.SociIndexV2Build#toEcsDockerImageCode","@cdklabs/deploy-time-build.SociIndexV2BuildProps","aws-cdk-lib.aws_ecr.IRepository","aws-cdk-lib.aws_ecr_assets.DockerImageAsset","aws-cdk-lib.aws_ecr_assets.DockerImageAsset#assetHash","aws-cdk-lib.aws_ecr_assets.DockerImageAsset#repository","aws-cdk-lib.aws_ecr_assets.DockerImageAssetProps","aws-cdk-lib.aws_ecs.ContainerDefinitionOptions","aws-cdk-lib.aws_ecs.ContainerImage","aws-cdk-lib.aws_ecs.FargateTaskDefinition","aws-cdk-lib.aws_ecs.TaskDefinition#addContainer","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { SociIndexV2Build } from '@cdklabs/deploy-time-build';\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';\nimport { Platform, DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';\nimport { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';\nimport { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';\nimport * as apigateway from 'aws-cdk-lib/aws-apigateway';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as cloudfront from 'aws-cdk-lib/aws-cloudfront';\nimport * as iam from 'aws-cdk-lib/aws-iam';\n\ndeclare const api: apigateway.RestApi;\ndeclare const destinationBucket: s3.IBucket;\ndeclare const distribution: cloudfront.IDistribution;\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 asset = new DockerImageAsset(this, 'Image', { directory: 'example-image' });\nconst sociIndex = new SociIndexV2Build(this, 'SociV2Index', {\n repository: asset.repository,\n inputImageTag: asset.assetHash,\n outputImageTag: `${asset.assetHash}-soci`,\n});\n\n// Use with ECS Fargate\nconst taskDefinition = new FargateTaskDefinition(this, 'TaskDefinition');\ntaskDefinition.addContainer('main', {\n image: sociIndex.toEcsDockerImageCode(),\n});\n\n// Or create from DockerImageAsset using utility method\nconst sociIndexFromAsset = SociIndexV2Build.fromDockerImageAsset(this, 'SociV2Index2', asset);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"11":7,"16":1,"18":1,"80":26,"110":4,"211":3,"212":6,"214":3,"215":3,"229":1,"240":1,"244":4,"245":1,"261":4,"262":4,"273":1,"274":1,"276":1,"277":1,"304":5,"308":1},"fqnsFingerprint":"73703700838ff931fcbedae1a86a9f41a7e736df4b664d9e87cf42755bb17ae9"}}}
|
|
@@ -18,7 +18,7 @@ const singleton_project_1 = require("./singleton-project");
|
|
|
18
18
|
*/
|
|
19
19
|
class ContainerImageBuild extends constructs_1.Construct {
|
|
20
20
|
props;
|
|
21
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdklabs/deploy-time-build.ContainerImageBuild", version: "0.1.
|
|
21
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdklabs/deploy-time-build.ContainerImageBuild", version: "0.1.14" };
|
|
22
22
|
grantPrincipal;
|
|
23
23
|
repository;
|
|
24
24
|
imageTag;
|
package/lib/nodejs-build.js
CHANGED
|
@@ -33,7 +33,7 @@ var CacheType;
|
|
|
33
33
|
* Build Node.js app and optionally publish the artifact to an S3 bucket.
|
|
34
34
|
*/
|
|
35
35
|
class NodejsBuild extends constructs_1.Construct {
|
|
36
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdklabs/deploy-time-build.NodejsBuild", version: "0.1.
|
|
36
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdklabs/deploy-time-build.NodejsBuild", version: "0.1.14" };
|
|
37
37
|
grantPrincipal;
|
|
38
38
|
constructor(scope, id, props) {
|
|
39
39
|
super(scope, id);
|
package/lib/soci-index-build.js
CHANGED
|
@@ -18,7 +18,7 @@ const singleton_project_1 = require("./singleton-project");
|
|
|
18
18
|
* See [this article](https://aws.amazon.com/blogs/containers/improving-amazon-ecs-deployment-consistency-with-soci-index-manifest-v2/) for more details.
|
|
19
19
|
*/
|
|
20
20
|
class SociIndexBuild extends constructs_1.Construct {
|
|
21
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdklabs/deploy-time-build.SociIndexBuild", version: "0.1.
|
|
21
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdklabs/deploy-time-build.SociIndexBuild", version: "0.1.14" };
|
|
22
22
|
/**
|
|
23
23
|
* A utility method to create a SociIndexBuild construct from a DockerImageAsset instance.
|
|
24
24
|
*/
|
|
@@ -16,7 +16,7 @@ const singleton_project_1 = require("./singleton-project");
|
|
|
16
16
|
* Please read the following document for more details: https://docs.aws.amazon.com/AmazonECS/latest/userguide/container-considerations.html
|
|
17
17
|
*/
|
|
18
18
|
class SociIndexV2Build extends constructs_1.Construct {
|
|
19
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdklabs/deploy-time-build.SociIndexV2Build", version: "0.1.
|
|
19
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdklabs/deploy-time-build.SociIndexV2Build", version: "0.1.14" };
|
|
20
20
|
/**
|
|
21
21
|
* A utility method to create a SociIndexBuild construct from a DockerImageAsset instance.
|
|
22
22
|
*/
|
package/package.json
CHANGED
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"jest": "^29",
|
|
60
60
|
"jest-junit": "^17",
|
|
61
61
|
"jsii": "~5.9.0",
|
|
62
|
-
"jsii-diff": "^1.
|
|
62
|
+
"jsii-diff": "^1.142.0",
|
|
63
63
|
"jsii-docgen": "^10.5.0",
|
|
64
|
-
"jsii-pacmak": "^1.
|
|
65
|
-
"jsii-rosetta": "~5.9.
|
|
64
|
+
"jsii-pacmak": "^1.142.0",
|
|
65
|
+
"jsii-rosetta": "~5.9.71",
|
|
66
66
|
"projen": "^0.103.27",
|
|
67
67
|
"ts-jest": "^29",
|
|
68
68
|
"ts-node": "^10.9.2",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"publishConfig": {
|
|
96
96
|
"access": "public"
|
|
97
97
|
},
|
|
98
|
-
"version": "0.1.
|
|
98
|
+
"version": "0.1.14",
|
|
99
99
|
"jest": {
|
|
100
100
|
"coverageProvider": "v8",
|
|
101
101
|
"testMatch": [
|