From bf79b1d76a2271926f1c5b861bbc4e915ac8c4a2 Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Fri, 30 Jun 2023 13:32:27 +0100 Subject: [PATCH] prepare for switch over --- packages/@aws-cdk/aws-amplify-alpha/package.json | 1 - packages/@aws-cdk/aws-apigatewayv2-alpha/package.json | 1 - packages/@aws-cdk/aws-apprunner-alpha/package.json | 1 - packages/@aws-cdk/aws-batch-alpha/package.json | 1 - packages/@aws-cdk/aws-cloud9-alpha/package.json | 1 - packages/@aws-cdk/aws-codestar-alpha/package.json | 1 - packages/@aws-cdk/aws-gamelift-alpha/package.json | 1 - packages/@aws-cdk/aws-glue-alpha/package.json | 1 - packages/@aws-cdk/aws-iot-alpha/package.json | 1 - packages/@aws-cdk/aws-iotevents-alpha/package.json | 1 - packages/@aws-cdk/aws-ivs-alpha/package.json | 1 - packages/@aws-cdk/aws-kinesisfirehose-alpha/package.json | 1 - .../aws-kinesisfirehose-destinations-alpha/package.json | 1 - packages/@aws-cdk/aws-location-alpha/package.json | 1 - packages/@aws-cdk/aws-msk-alpha/package.json | 1 - packages/@aws-cdk/aws-neptune-alpha/package.json | 1 - packages/@aws-cdk/aws-redshift-alpha/package.json | 1 - packages/@aws-cdk/aws-route53resolver-alpha/package.json | 1 - packages/@aws-cdk/aws-s3objectlambda-alpha/package.json | 1 - packages/@aws-cdk/aws-sagemaker-alpha/package.json | 1 - packages/@aws-cdk/aws-scheduler-alpha/package.json | 3 +-- .../@aws-cdk/aws-servicecatalogappregistry-alpha/package.json | 1 - packages/@aws-cdk/aws-synthetics-alpha/package.json | 1 - packages/aws-cdk-lib/core/lib/helpers-internal/cfn-parse.ts | 2 +- packages/aws-cdk-lib/package.json | 1 + packages/aws-cdk-lib/scripts/codegen.ts | 1 + packages/aws-cdk-lib/scripts/gen.ts | 2 +- packages/aws-cdk-lib/scripts/submodules/aws-events-targets.ts | 2 +- .../aws-cdk-lib/scripts/submodules/cloudformation-include.ts | 2 +- packages/aws-cdk-lib/scripts/submodules/index.ts | 2 +- scripts/gen.sh | 2 +- 31 files changed, 9 insertions(+), 30 deletions(-) create mode 100644 packages/aws-cdk-lib/scripts/codegen.ts diff --git a/packages/@aws-cdk/aws-amplify-alpha/package.json b/packages/@aws-cdk/aws-amplify-alpha/package.json index 85ec256ca5452..ae1afe411557e 100644 --- a/packages/@aws-cdk/aws-amplify-alpha/package.json +++ b/packages/@aws-cdk/aws-amplify-alpha/package.json @@ -85,7 +85,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-sdk": "^2.1379.0", diff --git a/packages/@aws-cdk/aws-apigatewayv2-alpha/package.json b/packages/@aws-cdk/aws-apigatewayv2-alpha/package.json index 1488cc33f6e33..89b9fe89e2d55 100644 --- a/packages/@aws-cdk/aws-apigatewayv2-alpha/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2-alpha/package.json @@ -88,7 +88,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-cdk-lib": "0.0.0", diff --git a/packages/@aws-cdk/aws-apprunner-alpha/package.json b/packages/@aws-cdk/aws-apprunner-alpha/package.json index 6cae0398f2370..4d769473b9b59 100644 --- a/packages/@aws-cdk/aws-apprunner-alpha/package.json +++ b/packages/@aws-cdk/aws-apprunner-alpha/package.json @@ -85,7 +85,6 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "aws-cdk-lib": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/pkglint": "0.0.0", diff --git a/packages/@aws-cdk/aws-batch-alpha/package.json b/packages/@aws-cdk/aws-batch-alpha/package.json index c6d2d3f68094c..a0e3503aad95a 100644 --- a/packages/@aws-cdk/aws-batch-alpha/package.json +++ b/packages/@aws-cdk/aws-batch-alpha/package.json @@ -83,7 +83,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "jest": "^29.5.0", diff --git a/packages/@aws-cdk/aws-cloud9-alpha/package.json b/packages/@aws-cdk/aws-cloud9-alpha/package.json index 7b275eb132f86..23a1436e06545 100644 --- a/packages/@aws-cdk/aws-cloud9-alpha/package.json +++ b/packages/@aws-cdk/aws-cloud9-alpha/package.json @@ -82,7 +82,6 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", diff --git a/packages/@aws-cdk/aws-codestar-alpha/package.json b/packages/@aws-cdk/aws-codestar-alpha/package.json index a3c4d55161a74..e00066915de12 100644 --- a/packages/@aws-cdk/aws-codestar-alpha/package.json +++ b/packages/@aws-cdk/aws-codestar-alpha/package.json @@ -85,7 +85,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-cdk-lib": "0.0.0", diff --git a/packages/@aws-cdk/aws-gamelift-alpha/package.json b/packages/@aws-cdk/aws-gamelift-alpha/package.json index 7a5107fa9b416..01ccd7927a9ca 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/package.json +++ b/packages/@aws-cdk/aws-gamelift-alpha/package.json @@ -83,7 +83,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "jest": "^29.5.0", diff --git a/packages/@aws-cdk/aws-glue-alpha/package.json b/packages/@aws-cdk/aws-glue-alpha/package.json index 3537e320627a1..a9932a32bf718 100644 --- a/packages/@aws-cdk/aws-glue-alpha/package.json +++ b/packages/@aws-cdk/aws-glue-alpha/package.json @@ -83,7 +83,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "jest": "^29.5.0", diff --git a/packages/@aws-cdk/aws-iot-alpha/package.json b/packages/@aws-cdk/aws-iot-alpha/package.json index 76f8501965d79..4c660212c4519 100644 --- a/packages/@aws-cdk/aws-iot-alpha/package.json +++ b/packages/@aws-cdk/aws-iot-alpha/package.json @@ -83,7 +83,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "jest": "^29.5.0", diff --git a/packages/@aws-cdk/aws-iotevents-alpha/package.json b/packages/@aws-cdk/aws-iotevents-alpha/package.json index 299a8e744fbc9..b114e9d02c003 100644 --- a/packages/@aws-cdk/aws-iotevents-alpha/package.json +++ b/packages/@aws-cdk/aws-iotevents-alpha/package.json @@ -85,7 +85,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "jest": "^29.5.0", diff --git a/packages/@aws-cdk/aws-ivs-alpha/package.json b/packages/@aws-cdk/aws-ivs-alpha/package.json index 2f0a3bea7ed25..a7579ac5d2d8d 100644 --- a/packages/@aws-cdk/aws-ivs-alpha/package.json +++ b/packages/@aws-cdk/aws-ivs-alpha/package.json @@ -91,7 +91,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-cdk-lib": "0.0.0", diff --git a/packages/@aws-cdk/aws-kinesisfirehose-alpha/package.json b/packages/@aws-cdk/aws-kinesisfirehose-alpha/package.json index 7c6f6d1bda050..5915fc9f75fcc 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-alpha/package.json +++ b/packages/@aws-cdk/aws-kinesisfirehose-alpha/package.json @@ -83,7 +83,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-cdk-lib": "0.0.0", diff --git a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/package.json b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/package.json index a73515c85f9c5..57ad3b11ce4ad 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/package.json +++ b/packages/@aws-cdk/aws-kinesisfirehose-destinations-alpha/package.json @@ -77,7 +77,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "jest": "^29.5.0", diff --git a/packages/@aws-cdk/aws-location-alpha/package.json b/packages/@aws-cdk/aws-location-alpha/package.json index 5203c4a386d26..4cc1f14ca4645 100644 --- a/packages/@aws-cdk/aws-location-alpha/package.json +++ b/packages/@aws-cdk/aws-location-alpha/package.json @@ -86,7 +86,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-cdk-lib": "0.0.0", diff --git a/packages/@aws-cdk/aws-msk-alpha/package.json b/packages/@aws-cdk/aws-msk-alpha/package.json index b0591ad53c1af..a9e1fd186b3df 100644 --- a/packages/@aws-cdk/aws-msk-alpha/package.json +++ b/packages/@aws-cdk/aws-msk-alpha/package.json @@ -85,7 +85,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "jest": "^29.5.0", diff --git a/packages/@aws-cdk/aws-neptune-alpha/package.json b/packages/@aws-cdk/aws-neptune-alpha/package.json index 68316c6a9f858..21ab86360e8a0 100644 --- a/packages/@aws-cdk/aws-neptune-alpha/package.json +++ b/packages/@aws-cdk/aws-neptune-alpha/package.json @@ -84,7 +84,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-cdk-lib": "0.0.0", diff --git a/packages/@aws-cdk/aws-redshift-alpha/package.json b/packages/@aws-cdk/aws-redshift-alpha/package.json index 21bf2401b4558..f0c6634ae8f75 100644 --- a/packages/@aws-cdk/aws-redshift-alpha/package.json +++ b/packages/@aws-cdk/aws-redshift-alpha/package.json @@ -83,7 +83,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-sdk": "^2.1379.0", diff --git a/packages/@aws-cdk/aws-route53resolver-alpha/package.json b/packages/@aws-cdk/aws-route53resolver-alpha/package.json index 16cd61b3bb7ec..6e3d60b1120d9 100644 --- a/packages/@aws-cdk/aws-route53resolver-alpha/package.json +++ b/packages/@aws-cdk/aws-route53resolver-alpha/package.json @@ -84,7 +84,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-cdk-lib": "0.0.0", diff --git a/packages/@aws-cdk/aws-s3objectlambda-alpha/package.json b/packages/@aws-cdk/aws-s3objectlambda-alpha/package.json index 8a9eae87b044a..6b43ffdf34422 100644 --- a/packages/@aws-cdk/aws-s3objectlambda-alpha/package.json +++ b/packages/@aws-cdk/aws-s3objectlambda-alpha/package.json @@ -86,7 +86,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "jest": "^29.5.0", diff --git a/packages/@aws-cdk/aws-sagemaker-alpha/package.json b/packages/@aws-cdk/aws-sagemaker-alpha/package.json index 9c5338a44f351..0073daf81f832 100644 --- a/packages/@aws-cdk/aws-sagemaker-alpha/package.json +++ b/packages/@aws-cdk/aws-sagemaker-alpha/package.json @@ -83,7 +83,6 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", diff --git a/packages/@aws-cdk/aws-scheduler-alpha/package.json b/packages/@aws-cdk/aws-scheduler-alpha/package.json index 0dd7f971c0784..098aed842335d 100644 --- a/packages/@aws-cdk/aws-scheduler-alpha/package.json +++ b/packages/@aws-cdk/aws-scheduler-alpha/package.json @@ -83,7 +83,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-cdk-lib": "0.0.0", @@ -116,4 +115,4 @@ "assert/assert-dependency" ] } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/package.json b/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/package.json index 5ef6f92e7c308..83c1a3bc8976c 100644 --- a/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/package.json +++ b/packages/@aws-cdk/aws-servicecatalogappregistry-alpha/package.json @@ -86,7 +86,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@types/jest": "^29.5.1", "aws-cdk-lib": "0.0.0", diff --git a/packages/@aws-cdk/aws-synthetics-alpha/package.json b/packages/@aws-cdk/aws-synthetics-alpha/package.json index 189159aa50f9c..9683ea6fb709a 100644 --- a/packages/@aws-cdk/aws-synthetics-alpha/package.json +++ b/packages/@aws-cdk/aws-synthetics-alpha/package.json @@ -85,7 +85,6 @@ "devDependencies": { "@aws-cdk/cdk-build-tools": "0.0.0", "@aws-cdk/integ-runner": "0.0.0", - "@aws-cdk/cfn2ts": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/integ-tests-alpha": "0.0.0", "@types/jest": "^29.5.1", diff --git a/packages/aws-cdk-lib/core/lib/helpers-internal/cfn-parse.ts b/packages/aws-cdk-lib/core/lib/helpers-internal/cfn-parse.ts index 0b0a4d71be01f..8d6f73fe7dfe6 100644 --- a/packages/aws-cdk-lib/core/lib/helpers-internal/cfn-parse.ts +++ b/packages/aws-cdk-lib/core/lib/helpers-internal/cfn-parse.ts @@ -337,7 +337,7 @@ export interface ParseCfnOptions { * While this file not exported from the module * (to not make it part of the public API), * it is directly referenced in the generated L1 code, - * so any renames of it need to be reflected in cfn2ts/codegen.ts as well. + * so any renames of it need to be reflected in codegen as well. * */ export class CfnParser { diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 93b0c2c1bd805..1d8733cd970b0 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -139,6 +139,7 @@ "@aws-cdk/cfnspec": "0.0.0", "@aws-cdk/pkglint": "0.0.0", "@aws-cdk/custom-resource-handlers": "0.0.0", + "@aws-cdk/spec2cdk": "0.0.0", "@aws-sdk/client-s3": "^3.350.0", "@aws-sdk/credential-providers": "^3.350.0", "@types/aws-lambda": "^8.10.115", diff --git a/packages/aws-cdk-lib/scripts/codegen.ts b/packages/aws-cdk-lib/scripts/codegen.ts new file mode 100644 index 0000000000000..19969bb0b2d7a --- /dev/null +++ b/packages/aws-cdk-lib/scripts/codegen.ts @@ -0,0 +1 @@ +export * from '@aws-cdk/cfn2ts'; diff --git a/packages/aws-cdk-lib/scripts/gen.ts b/packages/aws-cdk-lib/scripts/gen.ts index 9b1355730bdbd..7c56f5189160c 100644 --- a/packages/aws-cdk-lib/scripts/gen.ts +++ b/packages/aws-cdk-lib/scripts/gen.ts @@ -1,6 +1,6 @@ import * as path from 'node:path'; -import { generateAll, ModuleMap } from '@aws-cdk/cfn2ts'; import * as fs from 'fs-extra'; +import { generateAll, ModuleMap } from './codegen'; import submodulesGen from './submodules'; const awsCdkLibDir = path.join(__dirname, '..'); diff --git a/packages/aws-cdk-lib/scripts/submodules/aws-events-targets.ts b/packages/aws-cdk-lib/scripts/submodules/aws-events-targets.ts index 97c44290ae979..018c776c73939 100644 --- a/packages/aws-cdk-lib/scripts/submodules/aws-events-targets.ts +++ b/packages/aws-cdk-lib/scripts/submodules/aws-events-targets.ts @@ -4,9 +4,9 @@ */ import * as fs from 'node:fs'; import * as path from 'node:path'; -import { ModuleMap } from '@aws-cdk/cfn2ts'; import * as sdkMetadata from 'aws-sdk/apis/metadata.json'; import * as packageInfo from 'aws-sdk/package.json'; +import { ModuleMap } from '../codegen'; export default async function awsEventsTargets(_moduleMap: ModuleMap, outPath: string) { fs.writeFileSync( diff --git a/packages/aws-cdk-lib/scripts/submodules/cloudformation-include.ts b/packages/aws-cdk-lib/scripts/submodules/cloudformation-include.ts index 67498d13b52b6..89bd084a97a62 100644 --- a/packages/aws-cdk-lib/scripts/submodules/cloudformation-include.ts +++ b/packages/aws-cdk-lib/scripts/submodules/cloudformation-include.ts @@ -1,7 +1,7 @@ import * as path from 'node:path'; -import { ModuleMap } from '@aws-cdk/cfn2ts'; import * as fs from 'fs-extra'; +import { ModuleMap } from '../codegen'; export default async function cloudformationInclude(moduleMap: ModuleMap, outPath: string) { const classMap: { [cfnType: string]: string } = {}; diff --git a/packages/aws-cdk-lib/scripts/submodules/index.ts b/packages/aws-cdk-lib/scripts/submodules/index.ts index bae4330ab8465..c2d088d9f1c2f 100644 --- a/packages/aws-cdk-lib/scripts/submodules/index.ts +++ b/packages/aws-cdk-lib/scripts/submodules/index.ts @@ -1,9 +1,9 @@ import * as path from 'node:path'; -import { ModuleMap, ModuleMapEntry } from '@aws-cdk/cfn2ts'; import { createLibraryReadme } from '@aws-cdk/pkglint'; import * as fs from 'fs-extra'; import awsEventsTargets from './aws-events-targets'; import cloudformationInclude from './cloudformation-include'; +import { ModuleMap, ModuleMapEntry } from '../codegen'; export default async function submodulesGen(modules: ModuleMap, outPath: string) { for (const submodule of Object.values(modules)) { diff --git a/scripts/gen.sh b/scripts/gen.sh index b317366b9452d..1a6bd48530e51 100755 --- a/scripts/gen.sh +++ b/scripts/gen.sh @@ -14,7 +14,7 @@ fail() { echo "=============================================================================================" echo "building required build tools..." -time npx lerna run --stream build --scope @aws-cdk/cfn2ts --scope @aws-cdk/ubergen --include-dependencies || fail +time npx lerna run --stream build --scope @aws-cdk/cfn2ts --scope @aws-cdk/spec2cdk --include-dependencies || fail echo "=============================================================================================" echo "executing gen..."