Skip to content

Commit

Permalink
BREAKING CHANGE: Move and rename packages to @aws-cdk/* scope
Browse files Browse the repository at this point in the history
This change does a big rename of the CDK library packages into the '@aws-cdk/' scope.

The toolkit itself is renamed to 'aws-cdk', so that customers can do 'npm install -g aws-cdk'.

Move pkglint, pkgtools, cfn2ts to 'tools/' directory in the pacakge.
  • Loading branch information
rix0rrr authored Jun 12, 2018
1 parent d946e0e commit 2f3b1ab
Show file tree
Hide file tree
Showing 544 changed files with 2,084 additions and 2,063 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ To vend another language for the CDK (given there's jsii support for it):
3. Edit [bundle-beta.sh](./bundle-beta.sh) and add CDK and jsii artifacts for
your language under `repo/xxx`
4. Add a **cdk init** template for your language (see
[packages/aws-cdk-toolkit/lib/init-templates](packages/aws-cdk-toolkit/lib/init-templates)).
[packages/aws-cdk/lib/init-templates](packages/aws-cdk/lib/init-templates)).
5. Edit [getting-started.rst](packages/aws-cdk-docs/src/getting-started.rst) and
make there there's a getting started sections and examples for the new
language.
12 changes: 6 additions & 6 deletions examples/advanced-usage/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as cdk from 'aws-cdk';
import { PolicyStatement, ServicePrincipal } from 'aws-cdk';
import { WindowsImage, WindowsVersion } from 'aws-cdk-ec2';
import { Role } from 'aws-cdk-iam';
import { cloudformation, ec2, sns, sqs } from 'aws-cdk-resources';
import { Bucket } from 'aws-cdk-s3';
import * as cdk from '@aws-cdk/core';
import { PolicyStatement, ServicePrincipal } from '@aws-cdk/core';
import { WindowsImage, WindowsVersion } from '@aws-cdk/ec2';
import { Role } from '@aws-cdk/iam';
import { cloudformation, ec2, sns, sqs } from '@aws-cdk/resources';
import { Bucket } from '@aws-cdk/s3';

/**
* This stack demonstrates the use of the IAM policy library shipped with the CDK.
Expand Down
8 changes: 4 additions & 4 deletions examples/bucket-import-export/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { App, Construct, PolicyStatement, Stack } from "aws-cdk";
import { User } from "aws-cdk-iam";
import { Bucket, BucketRef, BucketRefProps } from "aws-cdk-s3";
import { App, Construct, PolicyStatement, Stack } from "@aws-cdk/core";
import { User } from "@aws-cdk/iam";
import { Bucket, BucketRef, BucketRefProps } from "@aws-cdk/s3";

// Define a stack with an S3 bucket and export it using `bucket.export()`.
// bucket.export returns a `BucketRef` object which can later be used in
Expand Down Expand Up @@ -65,4 +65,4 @@ new Consumer(app, 'consume', {
userBucketRef: producer.myBucketRef
});

process.stdout.write(app.run());
process.stdout.write(app.run());
4 changes: 2 additions & 2 deletions examples/chat-app/CognitoChatRoomPool.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Construct } from 'aws-cdk';
import { cognito } from 'aws-cdk-resources';
import { Construct } from '@aws-cdk/core';
import { cognito } from '@aws-cdk/resources';

export class CognitoChatRoomPool extends Construct {
constructor(parent: Construct, name: string) {
Expand Down
4 changes: 2 additions & 2 deletions examples/chat-app/DynamodbPostsTable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Construct } from 'aws-cdk';
import * as dynamodb from 'aws-cdk-dynamodb';
import { Construct } from '@aws-cdk/core';
import * as dynamodb from '@aws-cdk/dynamodb';

export class DynamoPostsTable extends Construct {
constructor(parent: Construct, name: string) {
Expand Down
8 changes: 4 additions & 4 deletions examples/chat-app/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { App, Construct, Stack, StackProps } from 'aws-cdk';
import { Lambda, LambdaRuntime, LambdaS3Code } from 'aws-cdk-lambda';
import { BucketName, BucketRef } from '../../packages/aws-cdk-s3/lib/bucket';
import { App, Construct, Stack, StackProps } from '@aws-cdk/core';
import { Lambda, LambdaRuntime, LambdaS3Code } from '@aws-cdk/lambda';
import { BucketName, BucketRef } from '@aws-cdk/s3';
import { CognitoChatRoomPool } from './CognitoChatRoomPool';
import { DynamoPostsTable } from './DynamodbPostsTable';

Expand Down Expand Up @@ -92,4 +92,4 @@ const app = new App(process.argv);
// (apps can host many stacks, for example, one for each region)
new MyStack(app, 'ChatAppStack', { env: { region: 'us-west-2' } });

process.stdout.write(app.run());
process.stdout.write(app.run());
6 changes: 3 additions & 3 deletions examples/cloudformation/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { App, Stack } from 'aws-cdk';
import { sqs } from 'aws-cdk-resources';
import { App, Stack } from '@aws-cdk/core';
import { sqs } from '@aws-cdk/resources';

class CloudFormationExample extends Stack {
constructor(parent: App) {
Expand All @@ -15,4 +15,4 @@ const app = new App(process.argv);

new CloudFormationExample(app);

process.stdout.write(app.run());
process.stdout.write(app.run());
6 changes: 3 additions & 3 deletions examples/ec2/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { App, Stack, StackProps } from 'aws-cdk';
import { App, Stack, StackProps } from '@aws-cdk/core';
import {
AmazonLinuxImage, ClassicLoadBalancer, Fleet, InstanceClass, InstanceSize,
InstanceTypePair, VpcNetwork, VpcNetworkRefProps } from 'aws-cdk-ec2';
InstanceTypePair, VpcNetwork, VpcNetworkRefProps } from '@aws-cdk/ec2';

class AppWithVpc extends Stack {
constructor(parent: App, name: string, props?: StackProps) {
Expand Down Expand Up @@ -69,4 +69,4 @@ const infra = new CommonInfrastructure(app, 'infra');
new AppWithVpc(app, 'app-with-vpc');
new MyApp(app, 'my-app', { infra });

process.stdout.write(app.run());
process.stdout.write(app.run());
4 changes: 2 additions & 2 deletions examples/hello-cdk/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { App, Stack, StackProps } from 'aws-cdk';
import { KeyAttributeType, Table } from 'aws-cdk-dynamodb';
import { App, Stack, StackProps } from '@aws-cdk/core';
import { KeyAttributeType, Table } from '@aws-cdk/dynamodb';

class HelloCDK extends Stack {
constructor(parent: App, name: string, props?: StackProps) {
Expand Down
8 changes: 4 additions & 4 deletions examples/neptune-demo/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { App, Stack, StackProps } from 'aws-cdk';
import { AnyIPv4, InstanceClass, InstanceSize, InstanceTypePair, VpcNetwork } from 'aws-cdk-ec2';
import { NeptuneDatabase } from 'aws-cdk-neptune';
import { Password, Username } from 'aws-cdk-rds';
import { App, Stack, StackProps } from '@aws-cdk/core';
import { AnyIPv4, InstanceClass, InstanceSize, InstanceTypePair, VpcNetwork } from '@aws-cdk/ec2';
import { NeptuneDatabase } from '@aws-cdk/neptune';
import { Password, Username } from '@aws-cdk/rds';

class NeptuneDemoStack extends Stack {
constructor(parent: App, name: string, props?: StackProps) {
Expand Down
26 changes: 13 additions & 13 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
},
"license": "Apache-2.0",
"devDependencies": {
"aws-cdk-toolkit": "^0.6.0",
"aws-cdk": "^0.6.0",
"pkglint": "^0.6.0"
},
"dependencies": {
"aws-cdk": "^0.6.0",
"aws-cdk-dynamodb": "^0.6.0",
"aws-cdk-ec2": "^0.6.0",
"aws-cdk-iam": "^0.6.0",
"aws-cdk-lambda": "^0.6.0",
"aws-cdk-neptune": "^0.6.0",
"aws-cdk-rds": "^0.6.0",
"aws-cdk-resources": "^0.6.0",
"aws-cdk-rtv": "^0.6.0",
"aws-cdk-s3": "^0.6.0",
"aws-cdk-sns": "^0.6.0",
"aws-cdk-sqs": "^0.6.0"
"@aws-cdk/core": "^0.6.0",
"@aws-cdk/dynamodb": "^0.6.0",
"@aws-cdk/ec2": "^0.6.0",
"@aws-cdk/iam": "^0.6.0",
"@aws-cdk/lambda": "^0.6.0",
"@aws-cdk/neptune": "^0.6.0",
"@aws-cdk/rds": "^0.6.0",
"@aws-cdk/resources": "^0.6.0",
"@aws-cdk/rtv": "^0.6.0",
"@aws-cdk/s3": "^0.6.0",
"@aws-cdk/sns": "^0.6.0",
"@aws-cdk/sqs": "^0.6.0"
},
"repository": {
"url": "git://github.com/awslabs/aws-cdk",
Expand Down
10 changes: 5 additions & 5 deletions examples/sns-sqs/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { App, PolicyDocument, PolicyStatement, Stack } from "aws-cdk";
import { sns, sqs } from 'aws-cdk-resources';
import { Topic } from 'aws-cdk-sns';
import { Queue } from 'aws-cdk-sqs';
import { App, PolicyDocument, PolicyStatement, Stack } from "@aws-cdk/core";
import { sns, sqs } from '@aws-cdk/resources';
import { Topic } from '@aws-cdk/sns';
import { Queue } from '@aws-cdk/sqs';

class ACL extends Stack {
constructor(parent: App, name: string) {
Expand Down Expand Up @@ -46,4 +46,4 @@ class CFN extends Stack {
const app = new App(process.argv);
new ACL(app, 'acl');
new CFN(app, 'cfn');
process.stdout.write(app.run());
process.stdout.write(app.run());
2 changes: 2 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"lerna": "2.5.1",
"packages": [
"packages/*",
"packages/@aws-cdk/*",
"tools/*",
"examples"
],
"rejectCycles": "true",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Arn, Construct, Output } from "aws-cdk";
import { Arn, Construct, Output } from "@aws-cdk/core";

/**
* Represents the ARN of a certificate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Construct } from 'aws-cdk';
import { certificatemanager } from 'aws-cdk-resources';
import { Construct } from '@aws-cdk/core';
import { certificatemanager } from '@aws-cdk/resources';
import { CertificateArn, CertificateRef } from './certificate-ref';
import { apexDomain } from './util';

Expand Down Expand Up @@ -81,4 +81,4 @@ export class Certificate extends CertificateRef {
}
}

}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "aws-cdk-acm",
"name": "@aws-cdk/acm",
"version": "0.6.0",
"description": "CDK Constructs for AWS ACM",
"main": "lib/index.js",
Expand Down Expand Up @@ -35,14 +35,14 @@
},
"license": "Apache-2.0",
"devDependencies": {
"aws-cdk-assert": "^0.6.0",
"aws-cdk-toolkit": "^0.6.0",
"@aws-cdk/assert": "^0.6.0",
"aws-cdk": "^0.6.0",
"aws-sdk": "^2.135.0",
"pkglint": "^0.6.0"
},
"dependencies": {
"aws-cdk": "^0.6.0",
"aws-cdk-iam": "^0.6.0",
"aws-cdk-resources": "^0.6.0"
"@aws-cdk/core": "^0.6.0",
"@aws-cdk/iam": "^0.6.0",
"@aws-cdk/resources": "^0.6.0"
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Stack } from 'aws-cdk';
import { expect, haveResource } from 'aws-cdk-assert';
import { expect, haveResource } from '@aws-cdk/assert';
import { Stack } from '@aws-cdk/core';
import { Test } from 'nodeunit';
import { Certificate, CertificateRef } from '../lib';

Expand Down Expand Up @@ -53,4 +53,4 @@ export = {

test.done();
}
};
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node
import 'source-map-support/register';

import { App } from 'aws-cdk';
import { App } from '@aws-cdk/core';
import * as path from 'path';

// tslint:disable-next-line:no-var-requires
Expand Down Expand Up @@ -83,4 +83,4 @@ function parseApplet(applet: string) {
}

return { moduleName, className };
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "aws-cdk-applet-js",
"name": "@aws-cdk/applet-js",
"version": "0.6.0",
"description": "Javascript CDK applet host program",
"main": "bin/cdk-applet-js.js",
Expand All @@ -24,7 +24,7 @@
"pkglint": "^0.6.0"
},
"dependencies": {
"aws-cdk": "^0.6.0",
"@aws-cdk/core": "^0.6.0",
"source-map-support": "^0.5.6",
"yamljs": "^0.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App, Parameter, Stack, StackProps } from 'aws-cdk';
import { App, Parameter, Stack, StackProps } from '@aws-cdk/core';

export interface TestAppletProps extends StackProps {
prop1: string
Expand Down Expand Up @@ -29,4 +29,4 @@ export class Applet extends Stack {

this.templateOptions.description = props.desc;
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ Add the following to your `package.json`':
},
...
devDependencies: {
"aws-cdk-assert": "*",
"aws-cdk-toolkit": "*"
"@aws-cdk/assert": "*",
"aws-cdk": "*"
}
}
```
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
// Verify that all integration tests still match their expected output
import { diffTemplate, formatDifferences } from 'aws-cdk-cloudformation-diff';
import { diffTemplate, formatDifferences } from '@aws-cdk/cloudformation-diff';
import { IntegrationTests, STATIC_TEST_CONTEXT } from '../lib/integ-helpers';

// tslint:disable:no-console
Expand Down Expand Up @@ -39,4 +39,4 @@ async function main() {
main().catch(e => {
console.error(e);
process.exit(1);
});
});
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { diffTemplate, formatDifferences, ResourceImpact, TemplateDiff } from 'aws-cdk-cloudformation-diff';
import { diffTemplate, formatDifferences, ResourceImpact, TemplateDiff } from '@aws-cdk/cloudformation-diff';
import { Assertion } from '../assertion';
import { StackInspector } from '../inspector';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Stack } from 'aws-cdk';
import * as api from 'aws-cdk-cx-api';
import { Stack } from '@aws-cdk/core';
import * as api from '@aws-cdk/cx-api';
import { StackInspector } from './inspector';

export function expect(stack: api.SynthesizedStack | Stack): StackInspector {
Expand All @@ -10,4 +10,4 @@ export function expect(stack: api.SynthesizedStack | Stack): StackInspector {
} : stack;

return new StackInspector(sstack);
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as api from 'aws-cdk-cx-api';
import * as api from '@aws-cdk/cx-api';
import { Assertion } from './assertion';
import { not } from './assertion';
import { MatchStyle, matchTemplate } from './assertions/match-template';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "aws-cdk-assert",
"name": "@aws-cdk/assert",
"version": "0.6.0",
"description": "An assertion library for use with CDK Apps",
"main": "lib/index.js",
Expand All @@ -24,9 +24,9 @@
"pkglint": "^0.6.0"
},
"dependencies": {
"aws-cdk": "^0.6.0",
"aws-cdk-cloudformation-diff": "^0.6.0",
"aws-cdk-cx-api": "^0.6.0",
"@aws-cdk/core": "^0.6.0",
"@aws-cdk/cloudformation-diff": "^0.6.0",
"@aws-cdk/cx-api": "^0.6.0",
"source-map-support": "^0.5.6"
},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'source-map-support/register';

import * as cdk from 'aws-cdk';
import * as cx from 'aws-cdk-cx-api';
import * as cdk from '@aws-cdk/core';
import * as cx from '@aws-cdk/cx-api';
import { Test } from 'nodeunit';

import { Stack } from 'aws-cdk';
import { Stack } from '@aws-cdk/core';
import { countResources, exist, expect, haveType, MatchStyle, matchTemplate } from '../lib/index';

passingExample('expect <stack> at <some path> to have <some type>', () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ResourceClass, resourceImplementationFor } from 'aws-cdk-resources';
import { ResourceClass, resourceImplementationFor } from '@aws-cdk/resources';
import * as types from './types';
import { diffKeyedEntities } from './util';

Expand Down
Loading

0 comments on commit 2f3b1ab

Please sign in to comment.