(custom-resource-handlers): */generated.ts
file imports do not support alpha modules
#28788
Labels
@aws-cdk/custom-resources
Related to AWS CDK Custom Resources
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Describe the bug
When a module has a dependency on
custom-resource-handlers
we will use an script to airlift the necessary files into the package to be released alongside that module.For the
*/generated.ts
files, the import pathsaws-cdk/packages/@aws-cdk/custom-resource-handlers/lib/custom-resources-framework/modules.ts
Lines 45 to 53 in 45b8398
aws-cdk-lib
and therefore can't be supported for alpha modules.For now when airlifting
custom-resource-handlers
into alpha modules, we can only airlift theindex.js
file and a*/generated.ts
files must be added tocustom-resources-framework/config.ts
asComponentType.NO_OP
(i.e.aws-cdk/packages/@aws-cdk/custom-resource-handlers/lib/custom-resources-framework/config.ts
Lines 226 to 230 in 45b8398
Expected Behavior
The import paths in the
*/generated.ts
files should work when they're airlifted into an alpha module.Current Behavior
The import does not because the import path assumes that the current module is located within
aws-cdk-lib
.Reproduction Steps
Add
to the
aws-redshift-alpha
airlift script and runyarn package
Possible Solution
Update the import paths in https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/custom-resource-handlers/lib/custom-resources-framework/modules.ts so that it can be used for alpha modules.
Additional Information/Context
No response
CDK CLI Version
2.121.1
Framework Version
No response
Node.js Version
21.1.0
OS
14.2.1
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: