Skip to content

Commit

Permalink
Flatten the 'cloudformation' directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
skinny85 committed Mar 13, 2019
1 parent b9e1193 commit 21a2034
Show file tree
Hide file tree
Showing 43 changed files with 81 additions and 81 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cdk/lib/cfn-concat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -154,4 +154,4 @@ export abstract class CfnRefElement extends CfnElement {
}
}

import { findTokens } from "../resolve";
import { findTokens } from "./resolve";
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Construct } from '../construct';
import { CfnRefElement } from './cfn-element';
import { Construct } from './construct';
import { Fn } from './fn';

export interface CfnMappingProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Construct } from '../construct';
import { CfnElement } from './cfn-element';
import { Construct } from './construct';

export interface CfnOutputProps {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cdk/lib/construct.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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';
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Construct } from '../construct';
import { CfnElement } from './cfn-element';
import { Construct } from './construct';

export interface IncludeProps {
/**
Expand Down
40 changes: 20 additions & 20 deletions packages/@aws-cdk/cdk/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { makeUniqueId } from '../uniqueid';
import { CfnElement } from './cfn-element';
import { makeUniqueId } from './uniqueid';

const PATH_SEP = '/';

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ResolveContext, Token } from "../token";
import { ResolveContext, Token } from "./token";

/**
* A Token that represents a CloudFormation reference to another resource
Expand Down Expand Up @@ -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";
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cdk/lib/tag-aspect.ts
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cdk/lib/tag-manager.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Test } from 'nodeunit';
import cdk = require('../../lib');
import cdk = require('../lib');

export = {
'chain conditions'(test: Test) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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<void>): (test: nodeunit.Test) => void {
return async (test: nodeunit.Test) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cdk/test/test.tag-manager.ts
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cdk/test/test.tokens.ts
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 21a2034

Please sign in to comment.