Skip to content

Commit 632de3f

Browse files
authored
refactor(toolkit-lib): remove shared-public and other re-export files (#452)
Related to #418 --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent dc1dfbb commit 632de3f

File tree

94 files changed

+112
-140
lines changed

Some content is hidden

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

94 files changed

+112
-140
lines changed

packages/@aws-cdk/toolkit-lib/lib/actions/bootstrap/private/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type * as cxapi from '@aws-cdk/cx-api';
2-
import { ToolkitError } from '../../../api/shared-public';
2+
import { ToolkitError } from '../../../toolkit/toolkit-error';
33

44
/**
55
* Given a set of "<account>/<region>" strings, construct environments for them

packages/@aws-cdk/toolkit-lib/lib/actions/diff/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { StackSelector } from '../../../lib/api/shared-public';
1+
import type { StackSelector } from '../../api/cloud-assembly';
22

33
export interface CloudFormationDiffOptions {
44
/**

packages/@aws-cdk/toolkit-lib/lib/actions/diff/private/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import type { ResourcesToImport } from '../../../api/resource-import';
1010
import { removeNonImportResources, ResourceMigrator } from '../../../api/resource-import';
1111
import type { IoHelper, SdkProvider } from '../../../api/shared-private';
1212
import { IO, cfnApi } from '../../../api/shared-private';
13-
import { ToolkitError } from '../../../api/shared-public';
14-
import { deserializeStructure, formatErrorMessage } from '../../../private/util';
13+
import { ToolkitError } from '../../../toolkit/toolkit-error';
14+
import { deserializeStructure, formatErrorMessage } from '../../../util';
1515

1616
export function prepareDiff(
1717
ioHelper: IoHelper,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import * as promptly from 'promptly';
88
import { makeCachingProvider } from './provider-caching';
99
import { ProxyAgentProvider } from './proxy-agent';
1010
import type { SdkHttpOptions } from './types';
11+
import { AuthenticationError } from '../../toolkit/toolkit-error';
1112
import { IO, type IoHelper } from '../io/private';
12-
import { AuthenticationError } from '../toolkit-error';
1313

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ 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 '../../toolkit/toolkit-error';
56
import { formatErrorMessage } from '../../util';
67
import { IO, type IoHelper } from '../io/private';
78
import type { PluginHost } from '../plugin';
89
import type { Mode } from '../plugin/mode';
9-
import { AuthenticationError } from '../toolkit-error';
1010

1111
/**
1212
* Cache for credential providers.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ 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 '../../toolkit/toolkit-error';
1516
import { formatErrorMessage } from '../../util';
1617
import { IO, type IoHelper } from '../io/private';
1718
import { PluginHost, Mode } from '../plugin';
18-
import { AuthenticationError } from '../toolkit-error';
1919

2020
export type AssumeRoleAdditionalOptions = Partial<Omit<AssumeRoleCommandInput, 'ExternalId' | 'RoleArn'>>;
2121

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ import { cachedAsync } from './cached';
348348
import type { Account } from './sdk-provider';
349349
import { traceMemberMethods } from './tracing';
350350
import { defaultCliUserAgent } from './user-agent';
351+
import { AuthenticationError } from '../../toolkit/toolkit-error';
351352
import { formatErrorMessage } from '../../util';
352353
import { IO, type IoHelper } from '../io/private';
353-
import { AuthenticationError } from '../toolkit-error';
354354

355355
export interface S3ClientOptions {
356356
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import type * as cxapi from '@aws-cdk/cx-api';
33
import type { BootstrapEnvironmentOptions, BootstrappingParameters } from './bootstrap-props';
44
import { BootstrapStack, bootstrapVersionFromTemplate } from './deploy-bootstrap';
55
import { legacyBootstrapTemplate } from './legacy-template';
6+
import { ToolkitError } from '../../toolkit/toolkit-error';
67
import { bundledPackageRootDir, loadStructuredFile, serializeStructure } from '../../util';
78
import type { SDK, SdkProvider } from '../aws-auth/private';
89
import type { SuccessfulDeployStackResult } from '../deployments';
910
import { IO, type IoHelper } from '../io/private';
1011
import { Mode } from '../plugin';
11-
import { ToolkitError } from '../toolkit-error';
1212
import { DEFAULT_TOOLKIT_STACK_NAME } from '../toolkit-info';
1313

1414
export type BootstrapSource = { source: 'legacy' } | { source: 'default' } | { source: 'custom'; templateFile: string };

packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { StackSelectionStrategy, StackSelector } from './stack-selector';
1+
export { ExpandStackSelection, StackSelectionStrategy, StackSelector } from './stack-selector';
22
export * from './cached-source';
33
export * from './source-builder';
44
export * from './types';

packages/@aws-cdk/toolkit-lib/lib/api/cloud-assembly/private/context-aware-source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { MissingContext } from '@aws-cdk/cloud-assembly-schema';
22
import * as contextproviders from '../../../context-providers';
33
import type { ToolkitServices } from '../../../toolkit/private';
4+
import { ToolkitError } from '../../../toolkit/toolkit-error';
45
import { PROJECT_CONTEXT, type Context } from '../../context';
56
import type { IoHelper } from '../../io/private';
67
import { IO } from '../../io/private';
7-
import { ToolkitError } from '../../shared-public';
88
import type { ICloudAssemblySource, IReadableCloudAssembly } from '../types';
99

1010
export interface ContextAwareCloudAssemblyProps {

0 commit comments

Comments
 (0)