diff --git a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts index 6935353d77ef6..cd5e56ff6640f 100644 --- a/packages/aws-cdk-lib/aws-codebuild/lib/project.ts +++ b/packages/aws-cdk-lib/aws-codebuild/lib/project.ts @@ -8,6 +8,11 @@ import { CodePipelineArtifacts } from './codepipeline-artifacts'; import { IFileSystemLocation } from './file-location'; import { NoArtifacts } from './no-artifacts'; import { NoSource } from './no-source'; +import { runScriptLinuxBuildSpec, S3_BUCKET_ENV, S3_KEY_ENV } from './private/run-script-linux-build-spec'; +import { LoggingOptions } from './project-logs'; +import { renderReportGroupArn } from './report-group-utils'; +import { ISource } from './source'; +import { CODEPIPELINE_SOURCE_ARTIFACTS_TYPE, NO_SOURCE_TYPE } from './source-types'; import * as cloudwatch from '../../aws-cloudwatch'; import * as notifications from '../../aws-codestarnotifications'; import * as ec2 from '../../aws-ec2'; @@ -19,11 +24,6 @@ import * as kms from '../../aws-kms'; import * as s3 from '../../aws-s3'; import * as secretsmanager from '../../aws-secretsmanager'; import { ArnFormat, Aws, Duration, IResource, Lazy, Names, PhysicalName, Reference, Resource, SecretValue, Stack, Token, TokenComparison, Tokenization } from '../../core'; -import { runScriptLinuxBuildSpec, S3_BUCKET_ENV, S3_KEY_ENV } from './private/run-script-linux-build-spec'; -import { LoggingOptions } from './project-logs'; -import { renderReportGroupArn } from './report-group-utils'; -import { ISource } from './source'; -import { CODEPIPELINE_SOURCE_ARTIFACTS_TYPE, NO_SOURCE_TYPE } from './source-types'; const VPC_POLICY_SYM = Symbol.for('@aws-cdk/aws-codebuild.roleVpcPolicy'); diff --git a/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts b/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts index 64d4011e87889..7ba6d6bf320d7 100644 --- a/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts +++ b/packages/aws-cdk-lib/aws-ecs/lib/container-image.ts @@ -1,8 +1,9 @@ -import * as ecr from '../../aws-ecr'; -import { DockerImageAsset, TarballImageAsset } from '../../aws-ecr-assets'; +/* eslint-disable import/order */ import { Construct } from 'constructs'; import { ContainerDefinition } from './container-definition'; import { CfnTaskDefinition } from './ecs.generated'; +import * as ecr from '../../aws-ecr'; +import { DockerImageAsset, TarballImageAsset } from '../../aws-ecr-assets'; /** * Constructs for types of container images @@ -94,7 +95,7 @@ export interface ContainerImageConfig { readonly repositoryCredentials?: CfnTaskDefinition.RepositoryCredentialsProperty; } +// These imports have to be at the end to prevent circular imports import { AssetImage, AssetImageProps } from './images/asset-image'; import { EcrImage } from './images/ecr'; -import { RepositoryImage, RepositoryImageProps } from './images/repository'; - +import { RepositoryImage, RepositoryImageProps } from './images/repository'; \ No newline at end of file diff --git a/packages/aws-cdk-lib/core/lib/cfn-element.ts b/packages/aws-cdk-lib/core/lib/cfn-element.ts index 4780ec17dd9a2..142efb19c04b9 100644 --- a/packages/aws-cdk-lib/core/lib/cfn-element.ts +++ b/packages/aws-cdk-lib/core/lib/cfn-element.ts @@ -1,8 +1,9 @@ -import * as cxschema from '../../cloud-assembly-schema'; -import * as cxapi from '../../cx-api'; +/* eslint-disable import/order */ import { Construct, Node } from 'constructs'; import { debugModeEnabled } from './debug'; import { Lazy } from './lazy'; +import * as cxschema from '../../cloud-assembly-schema'; +import * as cxapi from '../../cx-api'; const CFN_ELEMENT_SYMBOL = Symbol.for('@aws-cdk/core.CfnElement'); @@ -203,7 +204,8 @@ function notTooLong(x: string) { return x.slice(0, 47) + '...' + x.slice(-47); } + +// These imports have to be at the end to prevent circular imports import { CfnReference } from './private/cfn-reference'; import { Stack } from './stack'; import { Token } from './token'; - diff --git a/packages/aws-cdk-lib/core/lib/stack.ts b/packages/aws-cdk-lib/core/lib/stack.ts index b6b153113e009..cb25807207a07 100644 --- a/packages/aws-cdk-lib/core/lib/stack.ts +++ b/packages/aws-cdk-lib/core/lib/stack.ts @@ -1,7 +1,5 @@ import * as fs from 'fs'; import * as path from 'path'; -import * as cxschema from '../../cloud-assembly-schema'; -import * as cxapi from '../../cx-api'; import { IConstruct, Construct, Node } from 'constructs'; import * as minimatch from 'minimatch'; import { Annotations } from './annotations'; @@ -21,6 +19,8 @@ import { CLOUDFORMATION_TOKEN_RESOLVER, CloudFormationLang } from './private/clo import { LogicalIDs } from './private/logical-id'; import { resolve } from './private/resolve'; import { makeUniqueId } from './private/uniqueid'; +import * as cxschema from '../../cloud-assembly-schema'; +import * as cxapi from '../../cx-api'; const STACK_SYMBOL = Symbol.for('@aws-cdk/core.Stack'); const MY_STACK_CACHE = Symbol.for('@aws-cdk/core.Stack.myStack');