Skip to content

Commit 174c2e7

Browse files
authored
refactor(cli): re-organize files (#265)
Hopefully the final big code re-org in the CLI before we move code into the shared package. This move focuses on moving top-level files into `commands` and `cli` respectively, to indicate they will stay within the CLI package. Also removes the `toolkit/error.ts` re-export, which causes many of the import changes. Includes a non-consequential bug fix, to the init command and how it's finding the new `.init-version.json` and `.recommended-feature-flags.json` files. This was incorrect before and would happened to work because `init.ts` was in the same directory as `index.ts`. However because the code is bundled, we need to address the `init-templates` (and the new files) from the project root location. This is already done for the templates themselves, but was missed for `.init-version.json` and `.recommended-feature-flags.json`. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent 4635d02 commit 174c2e7

File tree

108 files changed

+237
-233
lines changed

Some content is hidden

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

108 files changed

+237
-233
lines changed

.projenrc.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,8 @@ const cli = configureProject(
821821
'<rootDir>/lib/user-input.ts',
822822
'<rootDir>/lib/convert-to-user-input.ts',
823823
],
824-
testEnvironment: './test/jest-bufferedconsole.ts',
825-
setupFilesAfterEnv: ['<rootDir>/test/jest-setup-after-env.ts'],
824+
testEnvironment: './test/_helpers/jest-bufferedconsole.ts',
825+
setupFilesAfterEnv: ['<rootDir>/test/_helpers/jest-setup-after-env.ts'],
826826
},
827827
}),
828828

packages/@aws-cdk/toolkit-lib/lib/api/aws-cdk.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ export { guessExecutable } from '../../../../aws-cdk/lib/api/cxapp/exec';
3030

3131
// @todo Should not use! investigate how to replace
3232
export { versionNumber } from '../../../../aws-cdk/lib/cli/version';
33-
export { CliIoHost } from '../../../../aws-cdk/lib/toolkit/cli-io-host';
33+
export { CliIoHost } from '../../../../aws-cdk/lib/cli/io-host';

packages/@aws-cdk/user-input-gen/test/user-input-gen.test.ts

+8
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ describe('render', () => {
3333
commands: {
3434
deploy: {
3535
description: 'Deploy a stack',
36+
aliases: ['ship-it'],
3637
options: {
3738
all: {
3839
type: 'boolean',
3940
desc: 'Deploy all stacks',
41+
alias: 'A',
4042
default: false,
4143
},
4244
},
@@ -70,6 +72,8 @@ describe('render', () => {
7072
7173
/**
7274
* Deploy a stack
75+
*
76+
* aliases: ship-it
7377
*/
7478
readonly deploy?: DeployOptions;
7579
}
@@ -119,12 +123,16 @@ describe('render', () => {
119123
/**
120124
* Deploy a stack
121125
*
126+
* aliases: ship-it
127+
*
122128
* @struct
123129
*/
124130
export interface DeployOptions {
125131
/**
126132
* Deploy all stacks
127133
*
134+
* aliases: A
135+
*
128136
* @default - false
129137
*/
130138
readonly all?: boolean;

packages/@aws-cdk/user-input-gen/test/yargs-gen.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ describe('render', () => {
7878
commands: {
7979
test: {
8080
description: 'the action under test',
81+
aliases: ['spec'],
8182
options: {
8283
one: {
8384
type: 'boolean',
@@ -104,7 +105,7 @@ describe('render', () => {
104105
return yargs
105106
.env('CDK')
106107
.usage('Usage: cdk -a <cdk-app> COMMAND')
107-
.command('test', 'the action under test', (yargs: Argv) =>
108+
.command(['test', 'spec'], 'the action under test', (yargs: Argv) =>
108109
yargs
109110
.option('one', {
110111
default: undefined,

packages/aws-cdk/jest.config.json

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

packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { ProxyAgent } from 'proxy-agent';
88
import { makeCachingProvider } from './provider-caching';
99
import type { SdkHttpOptions } from './sdk-provider';
1010
import { readIfPossible } from './util';
11+
import { AuthenticationError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
1112
import { debug } from '../../logging';
12-
import { AuthenticationError } from '../../toolkit/error';
1313

1414
const DEFAULT_CONNECTION_TIMEOUT = 10000;
1515
const DEFAULT_TIMEOUT = 300000;

packages/aws-cdk/lib/api/aws-auth/credential-plugins.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { inspect } from 'util';
22
import type { CredentialProviderSource, ForReading, ForWriting, PluginProviderResult, SDKv2CompatibleCredentials, SDKv3CompatibleCredentialProvider, SDKv3CompatibleCredentials } from '@aws-cdk/cli-plugin-contract';
33
import type { AwsCredentialIdentity, AwsCredentialIdentityProvider } from '@smithy/types';
44
import { credentialsAboutToExpire, makeCachingProvider } from './provider-caching';
5+
import { AuthenticationError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
56
import { debug, warning } from '../../logging';
6-
import { AuthenticationError } from '../../toolkit/error';
77
import { formatErrorMessage } from '../../util';
88
import type { Mode } from '../plugin/mode';
99
import { PluginHost } from '../plugin/plugin';

packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { CredentialPlugins } from './credential-plugins';
1212
import { makeCachingProvider } from './provider-caching';
1313
import { SDK } from './sdk';
1414
import { callTrace, traceMemberMethods } from './tracing';
15+
import { AuthenticationError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
1516
import { debug, warning } from '../../logging';
16-
import { AuthenticationError } from '../../toolkit/error';
1717
import { formatErrorMessage } from '../../util';
1818
import { Mode } from '../plugin/mode';
1919

packages/aws-cdk/lib/api/aws-auth/sdk.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ import { cachedAsync } from './cached';
346346
import type { Account } from './sdk-provider';
347347
import { traceMemberMethods } from './tracing';
348348
import { defaultCliUserAgent } from './user-agent';
349+
import { AuthenticationError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
349350
import { debug } from '../../logging';
350-
import { AuthenticationError } from '../../toolkit/error';
351351
import { formatErrorMessage } from '../../util';
352352

353353
export interface S3ClientOptions {

packages/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import type * as cxapi from '@aws-cdk/cx-api';
44
import type { BootstrapEnvironmentOptions, BootstrappingParameters } from './bootstrap-props';
55
import { BootstrapStack, bootstrapVersionFromTemplate } from './deploy-bootstrap';
66
import { legacyBootstrapTemplate } from './legacy-template';
7+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
78
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
89
import { warn } from '../../cli/messages';
9-
import { ToolkitError } from '../../toolkit/error';
1010
import { bundledPackageRootDir, loadStructuredFile, serializeStructure } from '../../util';
1111
import type { SDK, SdkProvider } from '../aws-auth';
1212
import type { SuccessfulDeployStackResult } from '../deployments';

packages/aws-cdk/lib/api/context.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Settings } from './settings';
2-
import { ToolkitError } from '../toolkit/error';
2+
import { ToolkitError } from '../../../@aws-cdk/tmp-toolkit-helpers/src/api';
33

44
export { TRANSIENT_CONTEXT_KEY } from './settings';
55
export const PROJECT_CONTEXT = 'cdk.context.json';

packages/aws-cdk/lib/api/cxapp/cloud-assembly.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { type StackDetails } from '@aws-cdk/tmp-toolkit-helpers';
44
import * as chalk from 'chalk';
55
import { minimatch } from 'minimatch';
66
import * as semver from 'semver';
7+
import { AssemblyError, ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
78
import { info } from '../../logging';
8-
import { AssemblyError, ToolkitError } from '../../toolkit/error';
99
import { flatten } from '../../util';
1010

1111
export enum DefaultSelection {

packages/aws-cdk/lib/api/cxapp/cloud-executable.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type * as cxapi from '@aws-cdk/cx-api';
22
import { CloudAssembly } from './cloud-assembly';
3+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
34
import type { Configuration } from '../../cli/user-configuration';
45
import * as contextproviders from '../../context-providers';
56
import { debug } from '../../logging';
6-
import { ToolkitError } from '../../toolkit/error';
77
import type { SdkProvider } from '../aws-auth';
88

99
/**

packages/aws-cdk/lib/api/cxapp/environments.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type * as cxapi from '@aws-cdk/cx-api';
22
import { minimatch } from 'minimatch';
33
import type { StackCollection } from './cloud-assembly';
4-
import { ToolkitError } from '../../toolkit/error';
4+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
55
import type { SdkProvider } from '../aws-auth';
66

77
export function looksLikeGlob(environment: string) {

packages/aws-cdk/lib/api/cxapp/exec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema';
55
import * as cxapi from '@aws-cdk/cx-api';
66
import * as fs from 'fs-extra';
77
import * as semver from 'semver';
8+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
89
import type { Configuration } from '../../cli/user-configuration';
910
import { PROJECT_CONFIG, USER_DEFAULTS } from '../../cli/user-configuration';
1011
import { versionNumber } from '../../cli/version';
1112
import { debug, warning } from '../../logging';
12-
import { ToolkitError } from '../../toolkit/error';
1313
import { loadTree, some } from '../../tree';
1414
import { splitBySize } from '../../util';
1515
import type { SdkProvider } from '../aws-auth';

packages/aws-cdk/lib/api/deployments/asset-publishing.ts

+17-24
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ import {
1515
AssetPublishing,
1616
} from 'cdk-assets';
1717
import type { SDK } from '..';
18-
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
19-
import { formatMessage } from '../../cli/messages';
20-
import type { IoMessageLevel } from '../../toolkit/cli-io-host';
21-
import { ToolkitError } from '../../toolkit/error';
18+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
19+
import type { IoMessageMaker, IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
20+
import { IO } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
2221
import type { SdkProvider } from '../aws-auth';
2322
import { Mode } from '../plugin';
2423

@@ -169,17 +168,17 @@ export class PublishingAws implements IAws {
169168
}
170169
}
171170

172-
export const EVENT_TO_LEVEL: Record<EventType, IoMessageLevel | false> = {
173-
build: 'debug',
174-
cached: 'debug',
175-
check: 'debug',
176-
debug: 'debug',
177-
fail: 'error',
178-
found: 'debug',
179-
start: 'info',
180-
success: 'info',
181-
upload: 'debug',
182-
shell_open: 'debug',
171+
const EVENT_TO_MSG_MAKER: Record<EventType, IoMessageMaker<any> | false> = {
172+
build: IO.DEFAULT_TOOLKIT_DEBUG,
173+
cached: IO.DEFAULT_TOOLKIT_DEBUG,
174+
check: IO.DEFAULT_TOOLKIT_DEBUG,
175+
debug: IO.DEFAULT_TOOLKIT_DEBUG,
176+
fail: IO.DEFAULT_TOOLKIT_ERROR,
177+
found: IO.DEFAULT_TOOLKIT_DEBUG,
178+
start: IO.DEFAULT_TOOLKIT_INFO,
179+
success: IO.DEFAULT_TOOLKIT_INFO,
180+
upload: IO.DEFAULT_TOOLKIT_DEBUG,
181+
shell_open: IO.DEFAULT_TOOLKIT_DEBUG,
183182
shell_stderr: false,
184183
shell_stdout: false,
185184
shell_close: false,
@@ -195,15 +194,9 @@ export abstract class BasePublishProgressListener implements IPublishProgressLis
195194
protected abstract getMessage(type: EventType, event: IPublishProgress): string;
196195

197196
public onPublishEvent(type: EventType, event: IPublishProgress): void {
198-
const level = EVENT_TO_LEVEL[type];
199-
if (level) {
200-
void this.ioHelper.notify(
201-
formatMessage({
202-
level,
203-
message: this.getMessage(type, event),
204-
data: undefined,
205-
}),
206-
);
197+
const maker = EVENT_TO_MSG_MAKER[type];
198+
if (maker) {
199+
void this.ioHelper.notify(maker.msg(this.getMessage(type, event)));
207200
}
208201
}
209202
}

packages/aws-cdk/lib/api/deployments/assets.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema';
44
import * as cxapi from '@aws-cdk/cx-api';
55
import * as chalk from 'chalk';
66
import type { AssetManifestBuilder } from './asset-manifest-builder';
7+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
78
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
89
import { debug } from '../../cli/messages';
9-
import { ToolkitError } from '../../toolkit/error';
1010
import type { EnvironmentResources } from '../environment';
1111
import type { ToolkitInfo } from '../toolkit-info';
1212

packages/aws-cdk/lib/api/deployments/checks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
12
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
23
import { debug } from '../../cli/messages';
3-
import { ToolkitError } from '../../toolkit/error';
44
import type { SDK } from '../aws-auth';
55

66
export async function determineAllowCrossAccountAssetPublishing(

packages/aws-cdk/lib/api/deployments/cloudformation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import type { FileManifestEntry } from 'cdk-assets';
1414
import { AssetManifest } from 'cdk-assets';
1515
import { AssetManifestBuilder } from './asset-manifest-builder';
1616
import type { Deployments } from './deployments';
17+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
1718
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
1819
import { debug } from '../../cli/messages';
19-
import { ToolkitError } from '../../toolkit/error';
2020
import { formatErrorMessage, deserializeStructure } from '../../util';
2121
import type { ICloudFormationClient, SdkProvider } from '../aws-auth';
2222
import { StackStatus } from '../stack-events';

packages/aws-cdk/lib/api/deployments/deploy-stack.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import {
3030
import type { ChangeSetDeploymentMethod, DeploymentMethod } from './deployment-method';
3131
import type { DeployStackResult, SuccessfulDeployStackResult } from './deployment-result';
3232
import { tryHotswapDeployment } from './hotswap-deployments';
33+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
3334
import { IO, type IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
34-
import { ToolkitError } from '../../toolkit/error';
3535
import { formatErrorMessage } from '../../util';
3636
import type { SDK, SdkProvider, ICloudFormationClient } from '../aws-auth';
3737
import type { EnvironmentResources } from '../environment';

packages/aws-cdk/lib/api/deployments/deployment-result.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ToolkitError } from '../../toolkit/error';
1+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
22

33
export type DeployStackResult =
44
| SuccessfulDeployStackResult

packages/aws-cdk/lib/api/deployments/deployments.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import {
2626
loadCurrentTemplateWithNestedStacks,
2727
type RootTemplateWithNestedStacks,
2828
} from './nested-stack-helpers';
29+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
2930
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
3031
import { debug, warn } from '../../cli/messages';
31-
import { ToolkitError } from '../../toolkit/error';
3232
import { formatErrorMessage } from '../../util';
3333
import type { SdkProvider } from '../aws-auth/sdk-provider';
3434
import { type EnvironmentResources, EnvironmentAccess } from '../environment';

packages/aws-cdk/lib/api/deployments/hotswap-deployments.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { SDK, SdkProvider } from '../aws-auth';
1111
import type { CloudFormationStack } from './cloudformation';
1212
import type { NestedStackTemplates } from './nested-stack-helpers';
1313
import { loadCurrentTemplateWithNestedStacks } from './nested-stack-helpers';
14-
import { ToolkitError } from '../../toolkit/error';
14+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
1515
import { formatErrorMessage } from '../../util';
1616
import { EvaluateCloudFormationTemplate } from '../evaluate-cloudformation-template';
1717
import { isHotswappableAppSyncChange } from '../hotswap/appsync-mapping-templates';

packages/aws-cdk/lib/api/environment/environment-access.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type * as cxapi from '@aws-cdk/cx-api';
22
import type { SDK } from '../aws-auth';
33
import type { EnvironmentResources } from './environment-resources';
44
import { EnvironmentResourcesRegistry } from './environment-resources';
5+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
56
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
67
import { warn } from '../../cli/messages';
7-
import { ToolkitError } from '../../toolkit/error';
88
import { formatErrorMessage } from '../../util';
99
import type { CredentialsOptions, SdkForEnvironment, SdkProvider } from '../aws-auth/sdk-provider';
1010
import { Mode } from '../plugin/mode';

packages/aws-cdk/lib/api/environment/environment-resources.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Environment } from '@aws-cdk/cx-api';
2+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
23
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
34
import { debug, warn } from '../../cli/messages';
45
import { Notices } from '../../notices';
5-
import { ToolkitError } from '../../toolkit/error';
66
import { formatErrorMessage } from '../../util';
77
import type { SDK } from '../aws-auth';
88
import { type EcrRepositoryInfo, ToolkitInfo } from '../toolkit-info';

packages/aws-cdk/lib/api/evaluate-cloudformation-template.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type { CloudFormationStackArtifact } from '@aws-cdk/cx-api';
22
import type { Export, ListExportsCommandOutput, StackResourceSummary } from '@aws-sdk/client-cloudformation';
33
import type { SDK } from './aws-auth';
44
import type { NestedStackTemplates } from './deployments';
5+
import { ToolkitError } from '../../../@aws-cdk/tmp-toolkit-helpers/src/api';
56
import { resourceMetadata } from '../../../@aws-cdk/tmp-toolkit-helpers/src/api/resource-metadata/resource-metadata';
67
import type { ResourceMetadata } from '../../../@aws-cdk/tmp-toolkit-helpers/src/api/resource-metadata/resource-metadata';
7-
import { ToolkitError } from '../toolkit/error';
88

99
export interface ListStackResources {
1010
listStackResources(): Promise<StackResourceSummary[]>;

packages/aws-cdk/lib/api/garbage-collection/garbage-collector.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import type { IECRClient, IS3Client, SDK, SdkProvider } from '../aws-auth';
77
import { DEFAULT_TOOLKIT_STACK_NAME, ToolkitInfo } from '../toolkit-info';
88
import { ProgressPrinter } from './progress-printer';
99
import { ActiveAssetCache, BackgroundStackRefresh, refreshStacks } from './stack-refresh';
10+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
1011
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
1112
import { debug, info } from '../../cli/messages';
12-
import { ToolkitError } from '../../toolkit/error';
1313
import { Mode } from '../plugin/mode';
1414

1515
// Must use a require() otherwise esbuild complains

packages/aws-cdk/lib/api/garbage-collection/progress-printer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as chalk from 'chalk';
22
import type { GcAsset as GCAsset } from './garbage-collector';
3+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
34
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
45
import { info } from '../../cli/messages';
5-
import { ToolkitError } from '../../toolkit/error';
66

77
export class ProgressPrinter {
88
private ioHelper: IoHelper;

packages/aws-cdk/lib/api/garbage-collection/stack-refresh.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ParameterDeclaration } from '@aws-sdk/client-cloudformation';
2+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
23
import type { IoHelper } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/private';
34
import { debug } from '../../cli/messages';
4-
import { ToolkitError } from '../../toolkit/error';
55
import type { ICloudFormationClient } from '../aws-auth';
66

77
export class ActiveAssetCache {

packages/aws-cdk/lib/api/hotswap/appsync-mapping-templates.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
type HotswapChange,
77
classifyChanges,
88
} from './common';
9+
import { ToolkitError } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api';
910
import type { ResourceChange } from '../../../../@aws-cdk/tmp-toolkit-helpers/src/api/io/payloads/hotswap';
10-
import { ToolkitError } from '../../toolkit/error';
1111
import { lowerCaseFirstCharacter, transformObjectKeys } from '../../util';
1212
import type { SDK } from '../aws-auth';
1313

0 commit comments

Comments
 (0)