From 21a2034200dcedaf63872be013742812226e0adb Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Wed, 13 Mar 2019 16:11:43 -0700 Subject: [PATCH] Flatten the 'cloudformation' directory. --- .../cdk/lib/{cloudformation => }/arn.ts | 4 +- packages/@aws-cdk/cdk/lib/cfn-concat.ts | 2 +- .../lib/{cloudformation => }/cfn-condition.ts | 4 +- .../lib/{cloudformation => }/cfn-element.ts | 8 ++-- .../lib/{cloudformation => }/cfn-mapping.ts | 2 +- .../lib/{cloudformation => }/cfn-output.ts | 2 +- .../lib/{cloudformation => }/cfn-parameter.ts | 4 +- .../lib/{cloudformation => }/cfn-resource.ts | 6 +-- .../cdk/lib/{cloudformation => }/cfn-rule.ts | 4 +- .../cloudformation-json.ts | 6 +-- packages/@aws-cdk/cdk/lib/construct.ts | 4 +- .../{cloudformation => }/dynamic-reference.ts | 4 +- .../cdk/lib/{cloudformation => }/fn.ts | 6 +-- .../cdk/lib/{cloudformation => }/include.ts | 2 +- packages/@aws-cdk/cdk/lib/index.ts | 40 +++++++++---------- .../lib/{cloudformation => }/instrinsics.ts | 2 +- .../lib/{cloudformation => }/logical-id.ts | 2 +- .../cdk/lib/{cloudformation => }/pseudo.ts | 4 +- .../cdk/lib/{cloudformation => }/reference.ts | 4 +- .../{cloudformation => }/removal-policy.ts | 0 .../{cloudformation => }/resource-policy.ts | 0 .../cdk/lib/{cloudformation => }/secret.ts | 4 +- .../cdk/lib/{cloudformation => }/stack.ts | 8 ++-- packages/@aws-cdk/cdk/lib/tag-aspect.ts | 2 +- packages/@aws-cdk/cdk/lib/tag-manager.ts | 4 +- .../cdk/lib/{cloudformation => }/tag.ts | 0 .../test/{cloudformation => }/evaluate-cfn.ts | 2 +- .../cdk/test/{cloudformation => }/test.arn.ts | 2 +- .../test.cloudformation-json.ts | 2 +- .../{cloudformation => }/test.condition.ts | 2 +- .../test.dynamic-reference.ts | 2 +- .../cdk/test/{cloudformation => }/test.fn.ts | 2 +- .../test/{cloudformation => }/test.include.ts | 2 +- .../{cloudformation => }/test.logical-id.ts | 2 +- .../{cloudformation => }/test.mappings.ts | 2 +- .../test/{cloudformation => }/test.output.ts | 2 +- .../{cloudformation => }/test.parameter.ts | 2 +- .../{cloudformation => }/test.resource.ts | 2 +- .../test/{cloudformation => }/test.rule.ts | 2 +- .../test/{cloudformation => }/test.secret.ts | 2 +- .../test/{cloudformation => }/test.stack.ts | 2 +- .../@aws-cdk/cdk/test/test.tag-manager.ts | 2 +- packages/@aws-cdk/cdk/test/test.tokens.ts | 2 +- 43 files changed, 81 insertions(+), 81 deletions(-) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/arn.ts (99%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/cfn-condition.ts (97%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/cfn-element.ts (95%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/cfn-mapping.ts (96%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/cfn-output.ts (99%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/cfn-parameter.ts (98%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/cfn-resource.ts (99%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/cfn-rule.ts (97%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/cloudformation-json.ts (96%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/dynamic-reference.ts (96%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/fn.ts (99%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/include.ts (96%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/instrinsics.ts (97%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/logical-id.ts (99%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/pseudo.ts (97%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/reference.ts (97%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/removal-policy.ts (100%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/resource-policy.ts (100%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/secret.ts (97%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/stack.ts (99%) rename packages/@aws-cdk/cdk/lib/{cloudformation => }/tag.ts (100%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/evaluate-cfn.ts (95%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.arn.ts (99%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.cloudformation-json.ts (98%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.condition.ts (98%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.dynamic-reference.ts (97%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.fn.ts (98%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.include.ts (99%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.logical-id.ts (99%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.mappings.ts (96%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.output.ts (97%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.parameter.ts (99%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.resource.ts (99%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.rule.ts (94%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.secret.ts (96%) rename packages/@aws-cdk/cdk/test/{cloudformation => }/test.stack.ts (99%) diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/arn.ts b/packages/@aws-cdk/cdk/lib/arn.ts similarity index 99% rename from packages/@aws-cdk/cdk/lib/cloudformation/arn.ts rename to packages/@aws-cdk/cdk/lib/arn.ts index 92c88a12f9989..6386155371753 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/arn.ts +++ b/packages/@aws-cdk/cdk/lib/arn.ts @@ -1,6 +1,6 @@ -import { Fn } from '../cloudformation/fn'; -import { unresolved } from '../unresolved'; +import { Fn } from './fn'; import { Stack } from './stack'; +import { unresolved } from './unresolved'; /** * Creates an ARN from components. diff --git a/packages/@aws-cdk/cdk/lib/cfn-concat.ts b/packages/@aws-cdk/cdk/lib/cfn-concat.ts index 157ca1f4d6348..fd16ed1046710 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-concat.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-concat.ts @@ -19,4 +19,4 @@ export function cloudFormationConcat(left: any | undefined, right: any | undefin return { 'Fn::Join': ['', minimalCloudFormationJoin('', parts)] }; } -import { minimalCloudFormationJoin } from "./cloudformation/instrinsics"; +import { minimalCloudFormationJoin } from "./instrinsics"; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-condition.ts b/packages/@aws-cdk/cdk/lib/cfn-condition.ts similarity index 97% rename from packages/@aws-cdk/cdk/lib/cloudformation/cfn-condition.ts rename to packages/@aws-cdk/cdk/lib/cfn-condition.ts index 2e6cc3e4e8037..4cd6549f7295c 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-condition.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-condition.ts @@ -1,6 +1,6 @@ -import { Construct } from '../construct'; -import { ResolveContext } from '../token'; import { CfnRefElement } from './cfn-element'; +import { Construct } from './construct'; +import { ResolveContext } from './token'; export interface CfnConditionProps { expression?: ICfnConditionExpression; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-element.ts b/packages/@aws-cdk/cdk/lib/cfn-element.ts similarity index 95% rename from packages/@aws-cdk/cdk/lib/cloudformation/cfn-element.ts rename to packages/@aws-cdk/cdk/lib/cfn-element.ts index 8a818b99a91ef..89aba929fbe2a 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-element.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-element.ts @@ -1,5 +1,5 @@ -import { Construct, IConstruct, PATH_SEP } from "../construct"; -import { Token } from '../token'; +import { Construct, IConstruct, PATH_SEP } from "./construct"; +import { Token } from './token'; const LOGICAL_ID_MD = 'aws:cdk:logicalId'; @@ -43,7 +43,7 @@ export abstract class CfnElement extends Construct { constructor(scope: Construct, id: string) { super(scope, id); - this.node.addMetadata(LOGICAL_ID_MD, new (require("../token").Token)(() => this.logicalId), this.constructor); + this.node.addMetadata(LOGICAL_ID_MD, new (require("./token").Token)(() => this.logicalId), this.constructor); this._logicalId = this.node.stack.logicalIds.getLogicalId(this); this.logicalId = new Token(() => this._logicalId).toString(); @@ -154,4 +154,4 @@ export abstract class CfnRefElement extends CfnElement { } } -import { findTokens } from "../resolve"; +import { findTokens } from "./resolve"; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-mapping.ts b/packages/@aws-cdk/cdk/lib/cfn-mapping.ts similarity index 96% rename from packages/@aws-cdk/cdk/lib/cloudformation/cfn-mapping.ts rename to packages/@aws-cdk/cdk/lib/cfn-mapping.ts index 7d7a6cf68c9cf..3897f255582d3 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-mapping.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-mapping.ts @@ -1,5 +1,5 @@ -import { Construct } from '../construct'; import { CfnRefElement } from './cfn-element'; +import { Construct } from './construct'; import { Fn } from './fn'; export interface CfnMappingProps { diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-output.ts b/packages/@aws-cdk/cdk/lib/cfn-output.ts similarity index 99% rename from packages/@aws-cdk/cdk/lib/cloudformation/cfn-output.ts rename to packages/@aws-cdk/cdk/lib/cfn-output.ts index 08edf82c89c14..4432ca7874b92 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-output.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-output.ts @@ -1,5 +1,5 @@ -import { Construct } from '../construct'; import { CfnElement } from './cfn-element'; +import { Construct } from './construct'; export interface CfnOutputProps { /** diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-parameter.ts b/packages/@aws-cdk/cdk/lib/cfn-parameter.ts similarity index 98% rename from packages/@aws-cdk/cdk/lib/cloudformation/cfn-parameter.ts rename to packages/@aws-cdk/cdk/lib/cfn-parameter.ts index 38ba93163582d..f04bca2300039 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-parameter.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-parameter.ts @@ -1,6 +1,6 @@ -import { Construct } from '../construct'; -import { Token } from '../token'; import { CfnRefElement, Ref } from './cfn-element'; +import { Construct } from './construct'; +import { Token } from './token'; export interface CfnParameterProps { /** diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-resource.ts b/packages/@aws-cdk/cdk/lib/cfn-resource.ts similarity index 99% rename from packages/@aws-cdk/cdk/lib/cloudformation/cfn-resource.ts rename to packages/@aws-cdk/cdk/lib/cfn-resource.ts index c4f8e45af0114..68777d8de806d 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-resource.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-resource.ts @@ -1,10 +1,10 @@ import cxapi = require('@aws-cdk/cx-api'); -import { Construct, IConstruct } from '../construct'; -import { TagManager } from '../tag-manager'; -import { capitalizePropertyNames, ignoreEmpty, PostResolveToken } from '../util'; import { CfnCondition } from './cfn-condition'; +import { Construct, IConstruct } from './construct'; import { Reference } from './reference'; import { CreationPolicy, DeletionPolicy, UpdatePolicy } from './resource-policy'; +import { TagManager } from './tag-manager'; +import { capitalizePropertyNames, ignoreEmpty, PostResolveToken } from './util'; // import required to be here, otherwise causes a cycle when running the generated JavaScript // tslint:disable-next-line:ordered-imports import { CfnRefElement } from './cfn-element'; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-rule.ts b/packages/@aws-cdk/cdk/lib/cfn-rule.ts similarity index 97% rename from packages/@aws-cdk/cdk/lib/cloudformation/cfn-rule.ts rename to packages/@aws-cdk/cdk/lib/cfn-rule.ts index 907f57a2abce9..c51a40f6617fa 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cfn-rule.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-rule.ts @@ -1,7 +1,7 @@ -import { Construct } from '../construct'; -import { capitalizePropertyNames } from '../util'; import { ICfnConditionExpression } from './cfn-condition'; import { CfnRefElement } from './cfn-element'; +import { Construct } from './construct'; +import { capitalizePropertyNames } from './util'; /** * A rule can include a RuleCondition property and must include an Assertions property. diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/cloudformation-json.ts b/packages/@aws-cdk/cdk/lib/cloudformation-json.ts similarity index 96% rename from packages/@aws-cdk/cdk/lib/cloudformation/cloudformation-json.ts rename to packages/@aws-cdk/cdk/lib/cloudformation-json.ts index 711d3be2181f1..4f0d79a5d2924 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/cloudformation-json.ts +++ b/packages/@aws-cdk/cdk/lib/cloudformation-json.ts @@ -1,7 +1,7 @@ -import { IConstruct } from "../construct"; -import { resolve } from "../resolve"; -import { Token } from "../token"; +import { IConstruct } from "./construct"; import { isIntrinsic } from "./instrinsics"; +import { resolve } from "./resolve"; +import { Token } from "./token"; /** * Class for JSON routines that are framework-aware diff --git a/packages/@aws-cdk/cdk/lib/construct.ts b/packages/@aws-cdk/cdk/lib/construct.ts index b8585087d6443..3928354a0ef34 100644 --- a/packages/@aws-cdk/cdk/lib/construct.ts +++ b/packages/@aws-cdk/cdk/lib/construct.ts @@ -1,6 +1,6 @@ import cxapi = require('@aws-cdk/cx-api'); import { IAspect } from './aspect'; -import { CloudFormationJSON } from './cloudformation/cloudformation-json'; +import { CloudFormationJSON } from './cloudformation-json'; import { IDependable } from './dependency'; import { resolve } from './resolve'; import { Token } from './token'; @@ -738,4 +738,4 @@ export interface Dependency { } // Import this _after_ everything else to help node work the classes out in the correct order... -import { Stack } from './cloudformation/stack'; +import { Stack } from './stack'; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/dynamic-reference.ts b/packages/@aws-cdk/cdk/lib/dynamic-reference.ts similarity index 96% rename from packages/@aws-cdk/cdk/lib/cloudformation/dynamic-reference.ts rename to packages/@aws-cdk/cdk/lib/dynamic-reference.ts index bbc5b8573ff28..7be363e1f2e33 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/dynamic-reference.ts +++ b/packages/@aws-cdk/cdk/lib/dynamic-reference.ts @@ -1,5 +1,5 @@ -import { Construct } from "../construct"; -import { Token } from "../token"; +import { Construct } from "./construct"; +import { Token } from "./token"; /** * Properties for a Dynamic Reference diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/fn.ts b/packages/@aws-cdk/cdk/lib/fn.ts similarity index 99% rename from packages/@aws-cdk/cdk/lib/cloudformation/fn.ts rename to packages/@aws-cdk/cdk/lib/fn.ts index 877491dd2a351..8d281673cbe47 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/fn.ts +++ b/packages/@aws-cdk/cdk/lib/fn.ts @@ -1,8 +1,8 @@ -import { resolve } from '../resolve'; -import { ResolveContext, Token } from '../token'; -import { unresolved } from '../unresolved'; import { ICfnConditionExpression } from './cfn-condition'; import { minimalCloudFormationJoin } from './instrinsics'; +import { resolve } from './resolve'; +import { ResolveContext, Token } from './token'; +import { unresolved } from './unresolved'; // tslint:disable:max-line-length diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/include.ts b/packages/@aws-cdk/cdk/lib/include.ts similarity index 96% rename from packages/@aws-cdk/cdk/lib/cloudformation/include.ts rename to packages/@aws-cdk/cdk/lib/include.ts index a2fe0346f4675..1ae1fbe030c0f 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/include.ts +++ b/packages/@aws-cdk/cdk/lib/include.ts @@ -1,5 +1,5 @@ -import { Construct } from '../construct'; import { CfnElement } from './cfn-element'; +import { Construct } from './construct'; export interface IncludeProps { /** diff --git a/packages/@aws-cdk/cdk/lib/index.ts b/packages/@aws-cdk/cdk/lib/index.ts index 8eae746e92331..c525bbed59809 100644 --- a/packages/@aws-cdk/cdk/lib/index.ts +++ b/packages/@aws-cdk/cdk/lib/index.ts @@ -7,26 +7,26 @@ export * from './unresolved'; export * from './tag-manager'; export * from './dependency'; -export * from './cloudformation/cloudformation-json'; -export * from './cloudformation/reference'; -export * from './cloudformation/cfn-condition'; -export * from './cloudformation/fn'; -export * from './cloudformation/include'; -export * from './cloudformation/logical-id'; -export * from './cloudformation/cfn-mapping'; -export * from './cloudformation/cfn-output'; -export * from './cloudformation/cfn-parameter'; -export * from './cloudformation/pseudo'; -export * from './cloudformation/cfn-resource'; -export * from './cloudformation/resource-policy'; -export * from './cloudformation/cfn-rule'; -export * from './cloudformation/stack'; -export * from './cloudformation/cfn-element'; -export * from './cloudformation/dynamic-reference'; -export * from './cloudformation/tag'; -export * from './cloudformation/removal-policy'; -export * from './cloudformation/arn'; -export * from './cloudformation/secret'; +export * from './cloudformation-json'; +export * from './reference'; +export * from './cfn-condition'; +export * from './fn'; +export * from './include'; +export * from './logical-id'; +export * from './cfn-mapping'; +export * from './cfn-output'; +export * from './cfn-parameter'; +export * from './pseudo'; +export * from './cfn-resource'; +export * from './resource-policy'; +export * from './cfn-rule'; +export * from './stack'; +export * from './cfn-element'; +export * from './dynamic-reference'; +export * from './tag'; +export * from './removal-policy'; +export * from './arn'; +export * from './secret'; export * from './app'; export * from './context'; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/instrinsics.ts b/packages/@aws-cdk/cdk/lib/instrinsics.ts similarity index 97% rename from packages/@aws-cdk/cdk/lib/cloudformation/instrinsics.ts rename to packages/@aws-cdk/cdk/lib/instrinsics.ts index 5adf61fcc7a01..99cd5ca73ae82 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/instrinsics.ts +++ b/packages/@aws-cdk/cdk/lib/instrinsics.ts @@ -55,4 +55,4 @@ export function canEvaluateToList(x: any) { return isIntrinsic(x) && ['Ref', 'Fn::GetAtt', 'Fn::GetAZs', 'Fn::Split', 'Fn::FindInMap', 'Fn::ImportValue'].includes(Object.keys(x)[0]); } -import { unresolved } from "../unresolved"; +import { unresolved } from "./unresolved"; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/logical-id.ts b/packages/@aws-cdk/cdk/lib/logical-id.ts similarity index 99% rename from packages/@aws-cdk/cdk/lib/cloudformation/logical-id.ts rename to packages/@aws-cdk/cdk/lib/logical-id.ts index 78f58f4340e03..c8e8405a166cb 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/logical-id.ts +++ b/packages/@aws-cdk/cdk/lib/logical-id.ts @@ -1,5 +1,5 @@ -import { makeUniqueId } from '../uniqueid'; import { CfnElement } from './cfn-element'; +import { makeUniqueId } from './uniqueid'; const PATH_SEP = '/'; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/pseudo.ts b/packages/@aws-cdk/cdk/lib/pseudo.ts similarity index 97% rename from packages/@aws-cdk/cdk/lib/cloudformation/pseudo.ts rename to packages/@aws-cdk/cdk/lib/pseudo.ts index 5d3166c9b7a6b..407aa421eb306 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/pseudo.ts +++ b/packages/@aws-cdk/cdk/lib/pseudo.ts @@ -1,6 +1,6 @@ -import { Construct } from '../construct'; -import { Token } from '../token'; +import { Construct } from './construct'; import { Reference } from './reference'; +import { Token } from './token'; /** * Accessor for pseudo parameters diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/reference.ts b/packages/@aws-cdk/cdk/lib/reference.ts similarity index 97% rename from packages/@aws-cdk/cdk/lib/cloudformation/reference.ts rename to packages/@aws-cdk/cdk/lib/reference.ts index 73db649ae087c..a595ab79746c4 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/reference.ts +++ b/packages/@aws-cdk/cdk/lib/reference.ts @@ -1,4 +1,4 @@ -import { ResolveContext, Token } from "../token"; +import { ResolveContext, Token } from "./token"; /** * A Token that represents a CloudFormation reference to another resource @@ -111,6 +111,6 @@ export class Reference extends Token { } -import { Construct } from "../construct"; import { CfnOutput } from "./cfn-output"; +import { Construct } from "./construct"; import { Stack } from "./stack"; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/removal-policy.ts b/packages/@aws-cdk/cdk/lib/removal-policy.ts similarity index 100% rename from packages/@aws-cdk/cdk/lib/cloudformation/removal-policy.ts rename to packages/@aws-cdk/cdk/lib/removal-policy.ts diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/resource-policy.ts b/packages/@aws-cdk/cdk/lib/resource-policy.ts similarity index 100% rename from packages/@aws-cdk/cdk/lib/cloudformation/resource-policy.ts rename to packages/@aws-cdk/cdk/lib/resource-policy.ts diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/secret.ts b/packages/@aws-cdk/cdk/lib/secret.ts similarity index 97% rename from packages/@aws-cdk/cdk/lib/cloudformation/secret.ts rename to packages/@aws-cdk/cdk/lib/secret.ts index 12fde7821f181..ba28803fe530c 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/secret.ts +++ b/packages/@aws-cdk/cdk/lib/secret.ts @@ -1,6 +1,6 @@ -import { Construct } from '../construct'; -import { Token } from '../token'; import { CfnParameter } from './cfn-parameter'; +import { Construct } from './construct'; +import { Token } from './token'; /** * A token that represents a value that's expected to be a secret, like diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/stack.ts b/packages/@aws-cdk/cdk/lib/stack.ts similarity index 99% rename from packages/@aws-cdk/cdk/lib/cloudformation/stack.ts rename to packages/@aws-cdk/cdk/lib/stack.ts index b7bee1fd0ae60..80b51e7a3083d 100644 --- a/packages/@aws-cdk/cdk/lib/cloudformation/stack.ts +++ b/packages/@aws-cdk/cdk/lib/stack.ts @@ -1,11 +1,11 @@ import cxapi = require('@aws-cdk/cx-api'); -import { App } from '../app'; -import { Construct, IConstruct, PATH_SEP } from '../construct'; -import { Environment } from '../environment'; -import { ISynthesisSession } from '../synthesis'; +import { App } from './app'; import { CfnParameter } from './cfn-parameter'; +import { Construct, IConstruct, PATH_SEP } from './construct'; +import { Environment } from './environment'; import { HashedAddressingScheme, IAddressingScheme, LogicalIDs } from './logical-id'; import { Reference } from './reference'; +import { ISynthesisSession } from './synthesis'; export interface StackProps { /** diff --git a/packages/@aws-cdk/cdk/lib/tag-aspect.ts b/packages/@aws-cdk/cdk/lib/tag-aspect.ts index a78b5df515936..0e4623208170d 100644 --- a/packages/@aws-cdk/cdk/lib/tag-aspect.ts +++ b/packages/@aws-cdk/cdk/lib/tag-aspect.ts @@ -1,5 +1,5 @@ import { IAspect } from './aspect'; -import { CfnResource, ITaggable } from './cloudformation/cfn-resource'; +import { CfnResource, ITaggable } from './cfn-resource'; import { IConstruct } from './construct'; /** diff --git a/packages/@aws-cdk/cdk/lib/tag-manager.ts b/packages/@aws-cdk/cdk/lib/tag-manager.ts index 832cb21aa763a..9a7b24da4ddfc 100644 --- a/packages/@aws-cdk/cdk/lib/tag-manager.ts +++ b/packages/@aws-cdk/cdk/lib/tag-manager.ts @@ -1,5 +1,5 @@ -import { TagType } from './cloudformation/cfn-resource'; -import { CfnTag } from './cloudformation/tag'; +import { TagType } from './cfn-resource'; +import { CfnTag } from './tag'; interface Tag { key: string; diff --git a/packages/@aws-cdk/cdk/lib/cloudformation/tag.ts b/packages/@aws-cdk/cdk/lib/tag.ts similarity index 100% rename from packages/@aws-cdk/cdk/lib/cloudformation/tag.ts rename to packages/@aws-cdk/cdk/lib/tag.ts diff --git a/packages/@aws-cdk/cdk/test/cloudformation/evaluate-cfn.ts b/packages/@aws-cdk/cdk/test/evaluate-cfn.ts similarity index 95% rename from packages/@aws-cdk/cdk/test/cloudformation/evaluate-cfn.ts rename to packages/@aws-cdk/cdk/test/evaluate-cfn.ts index b9a69d1d9ede3..90120ae04ad26 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/evaluate-cfn.ts +++ b/packages/@aws-cdk/cdk/test/evaluate-cfn.ts @@ -3,7 +3,7 @@ * * Note that this function is not production quality, it exists to support tests. */ -import { isNameOfCloudFormationIntrinsic } from '../../lib/cloudformation/instrinsics'; +import { isNameOfCloudFormationIntrinsic } from '../lib/instrinsics'; export function evaluateCFN(object: any, context: {[key: string]: string} = {}): any { const intrinsics: any = { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.arn.ts b/packages/@aws-cdk/cdk/test/test.arn.ts similarity index 99% rename from packages/@aws-cdk/cdk/test/cloudformation/test.arn.ts rename to packages/@aws-cdk/cdk/test/test.arn.ts index 4d559bc360975..8d4d02ef12c22 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.arn.ts +++ b/packages/@aws-cdk/cdk/test/test.arn.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { ArnComponents, CfnOutput, ScopedAws, Stack, Token } from '../../lib'; +import { ArnComponents, CfnOutput, ScopedAws, Stack, Token } from '../lib'; export = { 'create from components with defaults'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.cloudformation-json.ts b/packages/@aws-cdk/cdk/test/test.cloudformation-json.ts similarity index 98% rename from packages/@aws-cdk/cdk/test/cloudformation/test.cloudformation-json.ts rename to packages/@aws-cdk/cdk/test/test.cloudformation-json.ts index 4b46cab85ff2b..1686cd6c5d155 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.cloudformation-json.ts +++ b/packages/@aws-cdk/cdk/test/test.cloudformation-json.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { CloudFormationJSON, Fn, Stack, Token } from '../../lib'; +import { CloudFormationJSON, Fn, Stack, Token } from '../lib'; import { evaluateCFN } from './evaluate-cfn'; export = { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.condition.ts b/packages/@aws-cdk/cdk/test/test.condition.ts similarity index 98% rename from packages/@aws-cdk/cdk/test/cloudformation/test.condition.ts rename to packages/@aws-cdk/cdk/test/test.condition.ts index 48e5363b46ced..546d2d80d93a0 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.condition.ts +++ b/packages/@aws-cdk/cdk/test/test.condition.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import cdk = require('../../lib'); +import cdk = require('../lib'); export = { 'chain conditions'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.dynamic-reference.ts b/packages/@aws-cdk/cdk/test/test.dynamic-reference.ts similarity index 97% rename from packages/@aws-cdk/cdk/test/cloudformation/test.dynamic-reference.ts rename to packages/@aws-cdk/cdk/test/test.dynamic-reference.ts index 81d42604fe881..fa82494a33abe 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.dynamic-reference.ts +++ b/packages/@aws-cdk/cdk/test/test.dynamic-reference.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { DynamicReference, DynamicReferenceService, Stack } from '../../lib'; +import { DynamicReference, DynamicReferenceService, Stack } from '../lib'; export = { 'can create dynamic references with service and key with colons'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.fn.ts b/packages/@aws-cdk/cdk/test/test.fn.ts similarity index 98% rename from packages/@aws-cdk/cdk/test/cloudformation/test.fn.ts rename to packages/@aws-cdk/cdk/test/test.fn.ts index adb82677c5248..0c323e23a5f9d 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.fn.ts +++ b/packages/@aws-cdk/cdk/test/test.fn.ts @@ -1,7 +1,7 @@ import fc = require('fast-check'); import _ = require('lodash'); import nodeunit = require('nodeunit'); -import { Fn, Stack, Token } from '../../lib'; +import { Fn, Stack, Token } from '../lib'; function asyncTest(cb: (test: nodeunit.Test) => Promise): (test: nodeunit.Test) => void { return async (test: nodeunit.Test) => { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.include.ts b/packages/@aws-cdk/cdk/test/test.include.ts similarity index 99% rename from packages/@aws-cdk/cdk/test/cloudformation/test.include.ts rename to packages/@aws-cdk/cdk/test/test.include.ts index f42134c19a513..6e80bc19abb97 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.include.ts +++ b/packages/@aws-cdk/cdk/test/test.include.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { CfnOutput, CfnParameter, CfnResource, Include, Stack } from '../../lib'; +import { CfnOutput, CfnParameter, CfnResource, Include, Stack } from '../lib'; export = { 'the Include construct can be used to embed an existing template as-is into a stack'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.logical-id.ts b/packages/@aws-cdk/cdk/test/test.logical-id.ts similarity index 99% rename from packages/@aws-cdk/cdk/test/cloudformation/test.logical-id.ts rename to packages/@aws-cdk/cdk/test/test.logical-id.ts index 254a49049a5ac..c237670430dba 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.logical-id.ts +++ b/packages/@aws-cdk/cdk/test/test.logical-id.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { CfnResource, Construct, HashedAddressingScheme, IAddressingScheme, Ref, Stack } from '../../lib'; +import { CfnResource, Construct, HashedAddressingScheme, IAddressingScheme, Ref, Stack } from '../lib'; /** * These tests are executed once (for specific ID schemes) diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.mappings.ts b/packages/@aws-cdk/cdk/test/test.mappings.ts similarity index 96% rename from packages/@aws-cdk/cdk/test/cloudformation/test.mappings.ts rename to packages/@aws-cdk/cdk/test/test.mappings.ts index a42cf47224885..9c619b03240d2 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.mappings.ts +++ b/packages/@aws-cdk/cdk/test/test.mappings.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { CfnMapping, CfnResource, Stack } from '../../lib'; +import { CfnMapping, CfnResource, Stack } from '../lib'; export = { 'mappings can be added as another type of entity, and mapping.findInMap can be used to get a token'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.output.ts b/packages/@aws-cdk/cdk/test/test.output.ts similarity index 97% rename from packages/@aws-cdk/cdk/test/cloudformation/test.output.ts rename to packages/@aws-cdk/cdk/test/test.output.ts index 919bd0848223b..b0b0549777e65 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.output.ts +++ b/packages/@aws-cdk/cdk/test/test.output.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { CfnOutput, CfnResource, Ref, Stack } from '../../lib'; +import { CfnOutput, CfnResource, Ref, Stack } from '../lib'; export = { 'outputs can be added to the stack'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.parameter.ts b/packages/@aws-cdk/cdk/test/test.parameter.ts similarity index 99% rename from packages/@aws-cdk/cdk/test/cloudformation/test.parameter.ts rename to packages/@aws-cdk/cdk/test/test.parameter.ts index ac9e870fd2db2..a9773291f2862 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.parameter.ts +++ b/packages/@aws-cdk/cdk/test/test.parameter.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { CfnParameter, CfnResource, Construct, Stack } from '../../lib'; +import { CfnParameter, CfnResource, Construct, Stack } from '../lib'; export = { 'parameters can be used and referenced using param.ref'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.resource.ts b/packages/@aws-cdk/cdk/test/test.resource.ts similarity index 99% rename from packages/@aws-cdk/cdk/test/cloudformation/test.resource.ts rename to packages/@aws-cdk/cdk/test/test.resource.ts index 897aba9b7d188..5ee4f6f92872f 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.resource.ts +++ b/packages/@aws-cdk/cdk/test/test.resource.ts @@ -2,7 +2,7 @@ import cxapi = require('@aws-cdk/cx-api'); import { Test } from 'nodeunit'; import { App, applyRemovalPolicy, CfnCondition, CfnResource, Construct, DeletionPolicy, Fn, HashedAddressingScheme, - RemovalPolicy, Root, Stack } from '../../lib'; + RemovalPolicy, Root, Stack } from '../lib'; export = { 'all resources derive from Resource, which derives from Entity'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.rule.ts b/packages/@aws-cdk/cdk/test/test.rule.ts similarity index 94% rename from packages/@aws-cdk/cdk/test/cloudformation/test.rule.ts rename to packages/@aws-cdk/cdk/test/test.rule.ts index 9d2cd5e20dcb7..93fd6dc0b06ac 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.rule.ts +++ b/packages/@aws-cdk/cdk/test/test.rule.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { CfnRule, Fn, Stack } from '../../lib'; +import { CfnRule, Fn, Stack } from '../lib'; export = { 'Rule can be used to create rules'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.secret.ts b/packages/@aws-cdk/cdk/test/test.secret.ts similarity index 96% rename from packages/@aws-cdk/cdk/test/cloudformation/test.secret.ts rename to packages/@aws-cdk/cdk/test/test.secret.ts index 37b4dbd2bc805..6a4eb23ae3fff 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.secret.ts +++ b/packages/@aws-cdk/cdk/test/test.secret.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { Secret, SecretParameter, Stack } from '../../lib'; +import { Secret, SecretParameter, Stack } from '../lib'; export = { 'Secret is merely a token'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/cloudformation/test.stack.ts b/packages/@aws-cdk/cdk/test/test.stack.ts similarity index 99% rename from packages/@aws-cdk/cdk/test/cloudformation/test.stack.ts rename to packages/@aws-cdk/cdk/test/test.stack.ts index f09564da5fa97..ee507750abb7c 100644 --- a/packages/@aws-cdk/cdk/test/cloudformation/test.stack.ts +++ b/packages/@aws-cdk/cdk/test/test.stack.ts @@ -1,6 +1,6 @@ import cxapi = require('@aws-cdk/cx-api'); import { Test } from 'nodeunit'; -import { App, CfnCondition, CfnOutput, CfnParameter, CfnResource, Construct, Include, ScopedAws, Stack, Token } from '../../lib'; +import { App, CfnCondition, CfnOutput, CfnParameter, CfnResource, Construct, Include, ScopedAws, Stack, Token } from '../lib'; export = { 'a stack can be serialized into a CloudFormation template, initially it\'s empty'(test: Test) { diff --git a/packages/@aws-cdk/cdk/test/test.tag-manager.ts b/packages/@aws-cdk/cdk/test/test.tag-manager.ts index 1f092c9f08b80..dd9b1cb86e51e 100644 --- a/packages/@aws-cdk/cdk/test/test.tag-manager.ts +++ b/packages/@aws-cdk/cdk/test/test.tag-manager.ts @@ -1,5 +1,5 @@ import { Test } from 'nodeunit'; -import { TagType } from '../lib/cloudformation/cfn-resource'; +import { TagType } from '../lib/cfn-resource'; import { TagManager } from '../lib/tag-manager'; export = { diff --git a/packages/@aws-cdk/cdk/test/test.tokens.ts b/packages/@aws-cdk/cdk/test/test.tokens.ts index 437e36f7f2bfc..568f6bbfeec36 100644 --- a/packages/@aws-cdk/cdk/test/test.tokens.ts +++ b/packages/@aws-cdk/cdk/test/test.tokens.ts @@ -1,6 +1,6 @@ import { Test } from 'nodeunit'; import { Fn, Root, Token, unresolved } from '../lib'; -import { evaluateCFN } from './cloudformation/evaluate-cfn'; +import { evaluateCFN } from './evaluate-cfn'; export = { 'resolve a plain old object should just return the object'(test: Test) {