@btc-embedded/cdk-extensions 0.22.9 → 0.22.10
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 +3 -3
- package/CHANGELOG.md +15 -0
- package/README.md +55 -0
- package/assets/cli/catnip.js +105 -104
- package/lib/constructs/EventPipe.js +1 -1
- package/lib/constructs/ExportedService.js +1 -1
- package/lib/constructs/S3Bucket.js +1 -1
- package/lib/constructs/SecureRestApi.js +1 -1
- package/lib/constructs/SecureRestApiV2.js +1 -1
- package/lib/constructs/api-keys/ApiKeyClientAuthorization.js +1 -1
- package/lib/constructs/api-keys/ApiKeyManagement.js +1 -1
- package/lib/constructs/api-keys/ApiKeyPreTokenHandler.js +1 -1
- package/lib/constructs/api-keys/ApiKeyStore.js +1 -1
- package/lib/extensions/ApiGatewayExtension.js +1 -1
- package/lib/extensions/ApplicationContainer.js +1 -1
- package/lib/extensions/ApplicationLoadBalancerExtension.js +1 -1
- package/lib/extensions/ApplicationLoadBalancerExtensionV2.js +1 -1
- package/lib/extensions/CloudMapExtension.js +1 -1
- package/lib/extensions/DeactivatableServiceExtension.js +1 -1
- package/lib/extensions/DeploymentConfigExtension.js +1 -1
- package/lib/extensions/DocumentDbAccessExtension.js +1 -1
- package/lib/extensions/DomainEventMessagingExtension.js +1 -1
- package/lib/extensions/EfsMountExtension.js +1 -1
- package/lib/extensions/ExtraContainerExtension.js +1 -1
- package/lib/extensions/HTTPApiExtension.js +1 -1
- package/lib/extensions/LogExtension.js +1 -1
- package/lib/extensions/ModifyContainerDefinitionExtension.js +1 -1
- package/lib/extensions/ModifyTaskDefinitionExtension.js +1 -1
- package/lib/extensions/OpenIdExtension.js +1 -1
- package/lib/extensions/OpenTelemetryExtension.js +1 -1
- package/lib/extensions/PostgresDbAccessExtension.js +1 -1
- package/lib/extensions/SharedVolumeExtension.js +1 -1
- package/lib/extensions/TcpKeepAliveExtension.js +1 -1
- package/lib/platform/ApiGateway.js +1 -1
- package/lib/platform/ApiGatewayVpcLink.js +2 -2
- package/lib/platform/ApplicationLoadBalancer.js +1 -1
- package/lib/platform/ApplicationLoadBalancerV2.js +2 -2
- package/lib/platform/BTCLogGroup.js +1 -1
- package/lib/platform/CognitoUserPool.js +2 -2
- package/lib/platform/DefaultUserPoolClients.js +1 -1
- package/lib/platform/DocumentDB.js +2 -2
- package/lib/platform/EcsCluster.js +1 -1
- package/lib/platform/EfsFileSystem.js +1 -1
- package/lib/platform/HostedZone.js +1 -1
- package/lib/platform/PrivateDnsNamespace.js +1 -1
- package/lib/platform/ResourceServer.js +1 -1
- package/lib/platform/Vpc.js +1 -1
- package/lib/platform/VpcV2.js +1 -1
- package/lib/stacks/ApplicationStack.js +1 -1
- package/lib/utils/BasePlatformStackResolver.js +1 -1
- package/lib/utils/StackParameter.js +1 -1
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -8497,7 +8497,7 @@
|
|
|
8497
8497
|
},
|
|
8498
8498
|
"name": "@btc-embedded/cdk-extensions",
|
|
8499
8499
|
"readme": {
|
|
8500
|
-
"markdown": "# BTC Embedded CDK Extensions\n\n# @btc-embedded/cdk-extensions\n\nA collection of reusable AWS CDK (Cloud Development Kit) extensions and constructs for building cloud infrastructure with TypeScript.\n\n## Features\n\n- **CDK Constructs**: Includes ready-to-use constructs for API Gateway, Application Load Balancer, Cognito, VPC, DocumentDB, and more.\n- **ECS Service Extensions**: Provides ECS service extensions for advanced container orchestration.\n- **Utilities**: Common utilities and helpers for stack parameters, value imports, and configuration parsing.\n- **Modular Extensions**: Easily extend AWS resources with features like logging, OpenTelemetry, EFS, Cloud Map, and custom containers.\n\n## Installation\n\n```sh\nyarn install @btc-embedded/cdk-extensions\n```\n\n## Usage Example\n\n### Basic Usage\n\n```typescript\nimport { ApiGateway } from \"@btc-embedded/cdk-extensions\";\n\n// Use constructs and extensions in your CDK app\n```\n\n### Using ApplicationStack for Simplified Configuration\n\nFor application-level stacks that reference a base platform stack, use `ApplicationStack` to ensure consistent use of the base platform stack name:\n\n```typescript\nimport { ApplicationStack } from \"@btc-embedded/cdk-extensions\";\n\nexport class MyAppStack extends ApplicationStack {\n constructor(scope: Construct, id: string) {\n super(scope, id, {\n basePlatformStackName: \"my-platform-stack\",\n env: {\n account: \"123456789012\",\n region: \"eu-central-1\",\n },\n });\n\n // Constructs and extensions automatically resolve the platform stack name\n // No need to pass basePlatformStackName repeatedly\n }\n}\n```\n\n### Config-Driven Deployments\n\nUse `createApplicationApp` for configuration-driven deployments:\n\n```typescript\nimport {\n createApplicationApp,\n ApplicationStack,\n} from \"@btc-embedded/cdk-extensions\";\nimport { z } from \"zod\";\n\nconst configSchema = z.object({\n env: z.object({ account: z.string(), region: z.string() }),\n basePlatformStackName: z.string(),\n});\n\ncreateApplicationApp({\n directory: \"./config\",\n schema: configSchema,\n createStack: (scope, config) => new MyAppStack(scope, \"MyApp\", config),\n});\n```\n\n## Documentation\n\n- [API Reference](./API.md)\n\n## License\n\nApache-2.0 © BTC Embedded Systems AG\n"
|
|
8500
|
+
"markdown": "# BTC Embedded CDK Extensions\n\n# @btc-embedded/cdk-extensions\n\nA collection of reusable AWS CDK (Cloud Development Kit) extensions and constructs for building cloud infrastructure with TypeScript.\n\n## Features\n\n- **CDK Constructs**: Includes ready-to-use constructs for API Gateway, Application Load Balancer, Cognito, VPC, DocumentDB, and more.\n- **ECS Service Extensions**: Provides ECS service extensions for advanced container orchestration.\n- **Utilities**: Common utilities and helpers for stack parameters, value imports, and configuration parsing.\n- **Modular Extensions**: Easily extend AWS resources with features like logging, OpenTelemetry, EFS, Cloud Map, and custom containers.\n\n## Installation\n\n```sh\nyarn install @btc-embedded/cdk-extensions\n```\n\n## Usage Example\n\n### Basic Usage\n\n```typescript\nimport { ApiGateway } from \"@btc-embedded/cdk-extensions\";\n\n// Use constructs and extensions in your CDK app\n```\n\n### Using ApplicationStack for Simplified Configuration\n\nFor application-level stacks that reference a base platform stack, use `ApplicationStack` to ensure consistent use of the base platform stack name:\n\n```typescript\nimport { ApplicationStack } from \"@btc-embedded/cdk-extensions\";\n\nexport class MyAppStack extends ApplicationStack {\n constructor(scope: Construct, id: string) {\n super(scope, id, {\n basePlatformStackName: \"my-platform-stack\",\n env: {\n account: \"123456789012\",\n region: \"eu-central-1\",\n },\n });\n\n // Constructs and extensions automatically resolve the platform stack name\n // No need to pass basePlatformStackName repeatedly\n }\n}\n```\n\n### Config-Driven Deployments\n\nUse `createApplicationApp` for configuration-driven deployments:\n\n```typescript\nimport {\n createApplicationApp,\n ApplicationStack,\n} from \"@btc-embedded/cdk-extensions\";\nimport { z } from \"zod\";\n\nconst configSchema = z.object({\n env: z.object({ account: z.string(), region: z.string() }),\n basePlatformStackName: z.string(),\n});\n\ncreateApplicationApp({\n directory: \"./config\",\n schema: configSchema,\n createStack: (scope, config) => new MyAppStack(scope, \"MyApp\", config),\n});\n```\n\n## CLI Commands\n\n### catnip — Cloud Toolkit by the CAT Department\n\nThe `catnip` CLI tool provides commands for cloud infrastructure diagnostics and management.\n\n#### stack-diagnose\n\nDiagnose CloudFormation stack deployment failures.\n\n**Usage:**\n\n```bash\n# Auto-detect and diagnose the last failed stack\ncatnip stack-diagnose\n\n# Diagnose a specific stack\ncatnip stack-diagnose --stack-name my-stack\n\n# Customize log output and task inspection\ncatnip stack-diagnose --stack-name my-stack --tail 200 --tasks 10\n```\n\n**Description:**\n\nThe `stack-diagnose` command provides comprehensive diagnostics for failed CloudFormation stacks. If no stack name is provided, it automatically detects and diagnoses the last failed stack in your AWS account. The command displays:\n\n- **Stack Status**: Current CloudFormation stack status and reason for failure\n- **CloudFormation Events**: Recent stack events showing what failed during deployment\n- **ECS Diagnostics** (if applicable): If the stack contains ECS services, additional diagnostics are performed including:\n - Service event history\n - Recent stopped task logs\n - Container output for troubleshooting\n\n**Options:**\n\n- `--stack-name <name>` — CloudFormation stack name (optional; auto-detects last failed stack if omitted)\n- `--tail <n>` — Number of log lines to show per container (default: 100)\n- `--tasks <n>` — Number of recent stopped tasks to inspect (default: 5)\n- `--region <region>` — AWS region (uses AWS_DEFAULT_REGION / AWS_REGION environment variable if not specified)\n- `--profile <profile>` — AWS named profile for local development\n\n**Examples:**\n\n```bash\n# Quick diagnosis of last failed stack\ncatnip stack-diagnose\n\n# Diagnose specific stack with extended logging\ncatnip stack-diagnose --stack-name prod-api-stack --tail 500 --tasks 10\n\n# Use specific AWS profile and region\ncatnip stack-diagnose --profile my-profile --region eu-central-1\n```\n\n## Documentation\n\n- [API Reference](./API.md)\n\n## License\n\nApache-2.0 © BTC Embedded Systems AG\n"
|
|
8501
8501
|
},
|
|
8502
8502
|
"repository": {
|
|
8503
8503
|
"type": "git",
|
|
@@ -19883,6 +19883,6 @@
|
|
|
19883
19883
|
"symbolId": "src/platform/VpcV2:VpcV2Props"
|
|
19884
19884
|
}
|
|
19885
19885
|
},
|
|
19886
|
-
"version": "0.22.
|
|
19887
|
-
"fingerprint": "
|
|
19886
|
+
"version": "0.22.10",
|
|
19887
|
+
"fingerprint": "cNSrvO0CBWOSa1rarS48PzN42dJ7XEoCqaotzk1jXDc="
|
|
19888
19888
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
## [0.22.9](https://github.com/btc-embedded/cdk-extensions/compare/v0.22.8...v0.22.9) (2026-02-20)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add catnip CLI tool with ecs-diagnose and oidc-token commands ([242e3e3](https://github.com/btc-embedded/cdk-extensions/commit/242e3e3bc70fef200aafa81f0e43a41a30c65ee0))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* enforce no-any and no-type-assertion ESLint rules ([dc60f7d](https://github.com/btc-embedded/cdk-extensions/commit/dc60f7d9fc92c8bd56d4a597442fdae02a7bcd6e))
|
|
13
|
+
* handle old ECS ARN format and validate parseInt inputs ([fd4adce](https://github.com/btc-embedded/cdk-extensions/commit/fd4adce2a6297291388ddd8b52a7873da120acef))
|
|
14
|
+
* resolve @smithy/types version conflict in DynamoDB mock tests ([5cc979d](https://github.com/btc-embedded/cdk-extensions/commit/5cc979d62db4e270e0199abe8a57efeaa43ade21))
|
|
15
|
+
* resolve Cognito token endpoint from full FQDN or domain prefix ([4b9e04e](https://github.com/btc-embedded/cdk-extensions/commit/4b9e04e14f82af902512d61ca486978e2e4f690f))
|
|
16
|
+
|
|
2
17
|
## [0.22.8](https://github.com/btc-embedded/cdk-extensions/compare/v0.22.7...v0.22.8) (2026-02-12)
|
|
3
18
|
|
|
4
19
|
|
package/README.md
CHANGED
|
@@ -73,6 +73,61 @@ createApplicationApp({
|
|
|
73
73
|
});
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
## CLI Commands
|
|
77
|
+
|
|
78
|
+
### catnip — Cloud Toolkit by the CAT Department
|
|
79
|
+
|
|
80
|
+
The `catnip` CLI tool provides commands for cloud infrastructure diagnostics and management.
|
|
81
|
+
|
|
82
|
+
#### stack-diagnose
|
|
83
|
+
|
|
84
|
+
Diagnose CloudFormation stack deployment failures.
|
|
85
|
+
|
|
86
|
+
**Usage:**
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Auto-detect and diagnose the last failed stack
|
|
90
|
+
catnip stack-diagnose
|
|
91
|
+
|
|
92
|
+
# Diagnose a specific stack
|
|
93
|
+
catnip stack-diagnose --stack-name my-stack
|
|
94
|
+
|
|
95
|
+
# Customize log output and task inspection
|
|
96
|
+
catnip stack-diagnose --stack-name my-stack --tail 200 --tasks 10
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Description:**
|
|
100
|
+
|
|
101
|
+
The `stack-diagnose` command provides comprehensive diagnostics for failed CloudFormation stacks. If no stack name is provided, it automatically detects and diagnoses the last failed stack in your AWS account. The command displays:
|
|
102
|
+
|
|
103
|
+
- **Stack Status**: Current CloudFormation stack status and reason for failure
|
|
104
|
+
- **CloudFormation Events**: Recent stack events showing what failed during deployment
|
|
105
|
+
- **ECS Diagnostics** (if applicable): If the stack contains ECS services, additional diagnostics are performed including:
|
|
106
|
+
- Service event history
|
|
107
|
+
- Recent stopped task logs
|
|
108
|
+
- Container output for troubleshooting
|
|
109
|
+
|
|
110
|
+
**Options:**
|
|
111
|
+
|
|
112
|
+
- `--stack-name <name>` — CloudFormation stack name (optional; auto-detects last failed stack if omitted)
|
|
113
|
+
- `--tail <n>` — Number of log lines to show per container (default: 100)
|
|
114
|
+
- `--tasks <n>` — Number of recent stopped tasks to inspect (default: 5)
|
|
115
|
+
- `--region <region>` — AWS region (uses AWS_DEFAULT_REGION / AWS_REGION environment variable if not specified)
|
|
116
|
+
- `--profile <profile>` — AWS named profile for local development
|
|
117
|
+
|
|
118
|
+
**Examples:**
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Quick diagnosis of last failed stack
|
|
122
|
+
catnip stack-diagnose
|
|
123
|
+
|
|
124
|
+
# Diagnose specific stack with extended logging
|
|
125
|
+
catnip stack-diagnose --stack-name prod-api-stack --tail 500 --tasks 10
|
|
126
|
+
|
|
127
|
+
# Use specific AWS profile and region
|
|
128
|
+
catnip stack-diagnose --profile my-profile --region eu-central-1
|
|
129
|
+
```
|
|
130
|
+
|
|
76
131
|
## Documentation
|
|
77
132
|
|
|
78
133
|
- [API Reference](./API.md)
|