Skip to content

Commit 5bf7624

Browse files
authored
refactor(toolkit): move aws-auth and plugin to shared package (#327)
This intentionally only moves the source, and not the tests. Tests will be moved later to keep the diff size managable. Code is still tested as the tests are still running from `aws-cdk` package. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent b52b4c4 commit 5bf7624

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+365
-76
lines changed

.projenrc.ts

+39-4
Original file line numberDiff line numberDiff line change
@@ -676,16 +676,54 @@ const tmpToolkitHelpers = configureProject(
676676
devDeps: [
677677
'@types/archiver',
678678
'@types/semver',
679+
'aws-sdk-client-mock',
680+
'aws-sdk-client-mock-jest',
679681
'fast-check',
682+
'nock',
683+
'@smithy/util-stream',
684+
'xml-js',
680685
],
681686
deps: [
682687
cloudAssemblySchema.name,
683688
cloudFormationDiff,
684689
cxApi,
690+
`@aws-sdk/client-appsync@${CLI_SDK_V3_RANGE}`,
691+
`@aws-sdk/client-cloudcontrol@${CLI_SDK_V3_RANGE}`,
685692
`@aws-sdk/client-cloudformation@${CLI_SDK_V3_RANGE}`,
693+
`@aws-sdk/client-cloudwatch-logs@${CLI_SDK_V3_RANGE}`,
694+
`@aws-sdk/client-codebuild@${CLI_SDK_V3_RANGE}`,
695+
`@aws-sdk/client-ec2@${CLI_SDK_V3_RANGE}`,
696+
`@aws-sdk/client-ecr@${CLI_SDK_V3_RANGE}`,
697+
`@aws-sdk/client-ecs@${CLI_SDK_V3_RANGE}`,
698+
`@aws-sdk/client-elastic-load-balancing-v2@${CLI_SDK_V3_RANGE}`,
699+
`@aws-sdk/client-iam@${CLI_SDK_V3_RANGE}`,
700+
`@aws-sdk/client-kms@${CLI_SDK_V3_RANGE}`,
701+
`@aws-sdk/client-lambda@${CLI_SDK_V3_RANGE}`,
702+
`@aws-sdk/client-route-53@${CLI_SDK_V3_RANGE}`,
703+
`@aws-sdk/client-s3@${CLI_SDK_V3_RANGE}`,
704+
`@aws-sdk/client-secrets-manager@${CLI_SDK_V3_RANGE}`,
705+
`@aws-sdk/client-sfn@${CLI_SDK_V3_RANGE}`,
706+
`@aws-sdk/client-ssm@${CLI_SDK_V3_RANGE}`,
707+
`@aws-sdk/client-sts@${CLI_SDK_V3_RANGE}`,
708+
`@aws-sdk/credential-providers@${CLI_SDK_V3_RANGE}`,
709+
`@aws-sdk/lib-storage@${CLI_SDK_V3_RANGE}`,
710+
`@aws-sdk/ec2-metadata-service@${CLI_SDK_V3_RANGE}`,
711+
'@smithy/middleware-endpoint',
712+
'@smithy/node-http-handler',
713+
'@smithy/property-provider',
714+
'@smithy/shared-ini-file-loader',
715+
'@smithy/types',
716+
'@smithy/util-retry',
717+
'@smithy/util-waiter',
718+
cdkAssets,
686719
'archiver',
687720
'chalk@4',
721+
'fs-extra@^9',
688722
'glob',
723+
'minimatch',
724+
'p-limit@^3',
725+
'promptly', // @todo remove this should only be in CLI
726+
'proxy-agent', // @todo remove this should only be in CLI
689727
'semver',
690728
'uuid',
691729
'wrap-ansi@^7', // Last non-ESM version
@@ -870,9 +908,6 @@ const cli = configureProject(
870908
// We have many tests here that commonly time out
871909
testTimeout: 60_000,
872910
coveragePathIgnorePatterns: [
873-
// Mostly wrappers around the SDK, which get mocked in unit tests
874-
'<rootDir>/lib/api/aws-auth/sdk.ts',
875-
876911
// Files generated by cli-args-gen
877912
'<rootDir>/lib/cli/parse-command-line-arguments.ts',
878913
'<rootDir>/lib/cli/user-input.ts',
@@ -1187,7 +1222,7 @@ const toolkitLib = configureProject(
11871222
tmpToolkitHelpers,
11881223
'aws-cdk-lib',
11891224
'aws-sdk-client-mock',
1190-
'dts-bundle-generator',
1225+
'dts-bundle-generator@9.3.1', // use this specific version because newer versions are much slower. This is a temporary arrangement we hope to remove soon anyway.
11911226
'esbuild',
11921227
'typedoc',
11931228
],

packages/@aws-cdk/tmp-toolkit-helpers/.projen/deps.json

+174
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/tmp-toolkit-helpers/.projen/tasks.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/tmp-toolkit-helpers/package.json

+39-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)