-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f2e472
commit 3f64a58
Showing
11 changed files
with
7,602 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.js | ||
!jest.config.js | ||
*.d.ts | ||
node_modules | ||
|
||
# CDK asset staging directory | ||
.cdk.staging | ||
cdk.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.ts | ||
!*.d.ts | ||
|
||
# CDK asset staging directory | ||
.cdk.staging | ||
cdk.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# cdk-lib-cfn-diff-issue-20240112 | ||
Sample AWS CDK Construct Library to test issue around exporting @aws-cdk/cloudformation-diff | ||
# Welcome to your CDK TypeScript Construct Library project | ||
|
||
You should explore the contents of this project. It demonstrates a CDK Construct Library that includes a construct (`CdkLibCfnDiffIssue20240112`) | ||
which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic. | ||
|
||
The construct defines an interface (`CdkLibCfnDiffIssue20240112Props`) to configure the visibility timeout of the queue. | ||
|
||
## Useful commands | ||
|
||
* `npm run build` compile typescript to js | ||
* `npm run watch` watch for changes and compile | ||
* `npm run test` perform the jest unit tests | ||
|
||
## Other | ||
|
||
Check list of `cdk init` options: | ||
``` | ||
cdk init --list | ||
``` | ||
|
||
Create Custom AWS Construct Library: | ||
``` | ||
cdk init lib --language typescript | ||
``` | ||
|
||
## Reproduce issue | ||
``` | ||
npm install | ||
npm run build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
testEnvironment: 'node', | ||
roots: ['<rootDir>/test'], | ||
testMatch: ['**/*.test.ts'], | ||
transform: { | ||
'^.+\\.tsx?$': 'ts-jest' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * as cfndiff from "@aws-cdk/cloudformation-diff" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// import * as cdk from 'aws-cdk-lib'; | ||
import { Construct } from 'constructs'; | ||
// import * as sqs from 'aws-cdk-lib/aws-sqs'; | ||
|
||
export interface CdkLibCfnDiffIssue20240112Props { | ||
// Define construct properties here | ||
} | ||
|
||
export class CdkLibCfnDiffIssue20240112 extends Construct { | ||
|
||
constructor(scope: Construct, id: string, props: CdkLibCfnDiffIssue20240112Props = {}) { | ||
super(scope, id); | ||
|
||
// Define construct contents here | ||
|
||
// example resource | ||
// const queue = new sqs.Queue(this, 'CdkLibCfnDiffIssue20240112Queue', { | ||
// visibilityTimeout: cdk.Duration.seconds(300) | ||
// }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
> cdk-lib-cfn-diff-issue-20240112@0.1.0 build | ||
> tsc | ||
|
||
node_modules/@aws-cdk/cloudformation-diff/lib/diff-template.d.ts(1,32): error TS2307: Cannot find module 'aws-sdk' or its corresponding type declarations. |
Oops, something went wrong.