diff --git a/docs/classes/Generator.md b/docs/classes/Generator.md index 11d5d54..720449f 100644 --- a/docs/classes/Generator.md +++ b/docs/classes/Generator.md @@ -16,6 +16,7 @@ ### Properties +- [handlerRole](Generator.md#handlerrole) - [node](Generator.md#node) ### Accessors @@ -53,6 +54,18 @@ BucketDeployment.constructor ## Properties +### handlerRole + +• `Readonly` **handlerRole**: `IRole` + +Execution role of the Lambda function behind the custom CloudFormation resource of type `Custom::CDKBucketDeployment`. + +#### Inherited from + +BucketDeployment.handlerRole + +___ + ### node • `Readonly` **node**: `Node` diff --git a/docs/interfaces/GeneratorProps.md b/docs/interfaces/GeneratorProps.md index 21c3042..0f95ff1 100644 --- a/docs/interfaces/GeneratorProps.md +++ b/docs/interfaces/GeneratorProps.md @@ -30,9 +30,11 @@ - [fileName](GeneratorProps.md#filename) - [fileType](GeneratorProps.md#filetype) - [include](GeneratorProps.md#include) +- [logGroup](GeneratorProps.md#loggroup) - [logRetention](GeneratorProps.md#logretention) - [memoryLimit](GeneratorProps.md#memorylimit) - [metadata](GeneratorProps.md#metadata) +- [outputObjectKeys](GeneratorProps.md#outputobjectkeys) - [prune](GeneratorProps.md#prune) - [retainOnDelete](GeneratorProps.md#retainondelete) - [role](GeneratorProps.md#role) @@ -205,9 +207,12 @@ ___ • `Optional` `Readonly` **destinationKeyPrefix**: `string` -Key prefix in the destination bucket. +Key prefix in the destination bucket. Must be <=104 characters -Must be <=104 characters +If it's set with prune: true, it will only prune files with the prefix. + +We recommend to always configure the `destinationKeyPrefix` property. This will prevent the deployment +from accidentally deleting data that wasn't uploaded by it. **`Default`** @@ -383,12 +388,36 @@ Omit.include ___ +### logGroup + +• `Optional` `Readonly` **logGroup**: `ILogGroup` + +The Log Group used for logging of events emitted by the custom resource's lambda function. + +Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. +If you are deploying to another type of region, please check regional availability first. + +**`Default`** + +```ts +- a default log group created by AWS Lambda +``` + +#### Inherited from + +Omit.logGroup + +___ + ### logRetention • `Optional` `Readonly` **logRetention**: `RetentionDays` The number of days that the lambda function's log events are kept in CloudWatch Logs. +This is a legacy API and we strongly recommend you migrate to `logGroup` if you can. +`logGroup` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it. + **`Default`** ```ts @@ -449,10 +478,34 @@ Omit.metadata ___ +### outputObjectKeys + +• `Optional` `Readonly` **outputObjectKeys**: `boolean` + +If set to false, the custom resource will not send back the SourceObjectKeys. +This is useful when you are facing the error `Response object is too long` + +See https://github.com/aws/aws-cdk/issues/28579 + +**`Default`** + +```ts +true +``` + +#### Inherited from + +Omit.outputObjectKeys + +___ + ### prune • `Optional` `Readonly` **prune**: `boolean` +By default, files in the destination bucket that don't exist in the source will be deleted +when the BucketDeployment resource is created or updated. + If this is set to false, files in the destination bucket that do not exist in the asset, will NOT be deleted during deployment (create/update). diff --git a/package.json b/package.json index d30bf4f..b0d72e4 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@typescript-eslint/eslint-plugin": "^8", "@typescript-eslint/parser": "^8", "ajv": "8.12.0", - "aws-cdk-lib": "2.95.1", + "aws-cdk-lib": "2.177.0", "commit-and-tag-version": "^12", "constructs": "10.2.70", "esbuild": "^0.19.2", @@ -60,7 +60,7 @@ }, "peerDependencies": { "ajv": "^8.12.0", - "aws-cdk-lib": "^2.95.1", + "aws-cdk-lib": "^2.178.1", "constructs": "^10.2.70" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9289072..587f8fe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,8 +28,8 @@ importers: specifier: 8.12.0 version: 8.12.0 aws-cdk-lib: - specifier: 2.95.1 - version: 2.95.1(constructs@10.2.70) + specifier: 2.177.0 + version: 2.177.0(constructs@10.2.70) commit-and-tag-version: specifier: ^12 version: 12.5.0 @@ -94,14 +94,20 @@ packages: '@asamuzakjp/css-color@2.8.3': resolution: {integrity: sha512-GIc76d9UI1hCvOATjZPyHFmE5qhRccp3/zGfMPapK3jBi+yocEzp6BBB0UnfRYP9NP4FANqUZYb0hnfs3TM3hw==} - '@aws-cdk/asset-awscli-v1@2.2.202': - resolution: {integrity: sha512-JqlF0D4+EVugnG5dAsNZMqhu3HW7ehOXm5SDMxMbXNDMdsF0pxtQKNHRl52z1U9igsHmaFpUgSGjbhAJ+0JONg==} + '@aws-cdk/asset-awscli-v1@2.2.223': + resolution: {integrity: sha512-a4eJHrzW0moUQR8wty2m0u93iabpQS3/8NviK6luaqYJ3Vog5LvSVJ4fGSGJD8B/7yQ7MlQWZ/DvFVFJz7nU4Q==} - '@aws-cdk/asset-kubectl-v20@2.1.2': - resolution: {integrity: sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==} + '@aws-cdk/asset-kubectl-v20@2.1.4': + resolution: {integrity: sha512-Ps2MkmjYgMyflagqQ4dgTElc7Vwpqj8spw8dQVFiSeaaMPsuDSNsPax3/HjuDuwqsmLdaCZc6umlxYLpL0kYDA==} - '@aws-cdk/asset-node-proxy-agent-v6@2.0.3': - resolution: {integrity: sha512-twhuEG+JPOYCYPx/xy5uH2+VUsIEhPTzDY0F1KuB+ocjWWB/KEDiOVL19nHvbPCB6fhWnkykXEMJ4HHcKvjtvg==} + '@aws-cdk/asset-node-proxy-agent-v6@2.1.0': + resolution: {integrity: sha512-7bY3J8GCVxLupn/kNmpPc5VJz8grx+4RKfnnJiO1LG+uxkZfANZG3RMHhE+qQxxwkyQ9/MfPtTpf748UhR425A==} + + '@aws-cdk/cloud-assembly-schema@39.2.20': + resolution: {integrity: sha512-RI7S8jphGA8mak154ElnEJQPNTTV4PZmA7jgqnBBHQGyOPJIXxtACubNQ5m4YgjpkK3UJHsWT+/cOAfM/Au/Wg==} + bundledDependencies: + - jsonschema + - semver '@aws-crypto/ie11-detection@3.0.0': resolution: {integrity: sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==} @@ -1152,8 +1158,8 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} - aws-cdk-lib@2.95.1: - resolution: {integrity: sha512-FQlnW3+c1j2W7hmu+QMSiWnBgbW1Lhn1ZpBQ6cwYZa97rII1zlEyTowAfzQk6szPIzUhJv5xK03nWZtvCvpAWw==} + aws-cdk-lib@2.177.0: + resolution: {integrity: sha512-nTnHAwjZaPJ5gfJjtzE/MyK6q0a66nWthoJl7l8srucRb+I30dczhbbXor6QCdVpJaTRAEliMOMq23aglsAQbg==} engines: {node: '>= 14.15.0'} peerDependencies: constructs: ^10.0.0 @@ -1168,6 +1174,7 @@ packages: - semver - table - yaml + - mime-types babel-jest@27.5.1: resolution: {integrity: sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==} @@ -1310,7 +1317,7 @@ packages: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} concat-map@0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} concat-stream@2.0.0: resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} @@ -1888,6 +1895,7 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} @@ -2018,6 +2026,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -2861,6 +2870,7 @@ packages: rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rrweb-cssom@0.7.1: @@ -3473,11 +3483,13 @@ snapshots: '@csstools/css-tokenizer': 3.0.3 lru-cache: 10.4.3 - '@aws-cdk/asset-awscli-v1@2.2.202': {} + '@aws-cdk/asset-awscli-v1@2.2.223': {} + + '@aws-cdk/asset-kubectl-v20@2.1.4': {} - '@aws-cdk/asset-kubectl-v20@2.1.2': {} + '@aws-cdk/asset-node-proxy-agent-v6@2.1.0': {} - '@aws-cdk/asset-node-proxy-agent-v6@2.0.3': {} + '@aws-cdk/cloud-assembly-schema@39.2.20': {} '@aws-crypto/ie11-detection@3.0.0': dependencies: @@ -5044,11 +5056,12 @@ snapshots: dependencies: possible-typed-array-names: 1.0.0 - aws-cdk-lib@2.95.1(constructs@10.2.70): + aws-cdk-lib@2.177.0(constructs@10.2.70): dependencies: - '@aws-cdk/asset-awscli-v1': 2.2.202 - '@aws-cdk/asset-kubectl-v20': 2.1.2 - '@aws-cdk/asset-node-proxy-agent-v6': 2.0.3 + '@aws-cdk/asset-awscli-v1': 2.2.223 + '@aws-cdk/asset-kubectl-v20': 2.1.4 + '@aws-cdk/asset-node-proxy-agent-v6': 2.1.0 + '@aws-cdk/cloud-assembly-schema': 39.2.20 constructs: 10.2.70 babel-jest@27.5.1(@babel/core@7.24.5):