Skip to content

Commit

Permalink
Revert changes external to packages/aws-cdk-dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiroc committed Jul 28, 2018
1 parent ff5f8f3 commit 4f39f48
Show file tree
Hide file tree
Showing 32 changed files with 1,058 additions and 1,058 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@

A new cross-stack programming model is introduced to support CloudWatch Events.
Event sources implement `onXxx` methods for various events that can emitted by
that source and event targets implement `IEventRuleTargetProps`, so they can be
that source and event targets implement `IEventRuleTarget`, so they can be
polymorphically added to rules.

```ts
Expand Down
32 changes: 16 additions & 16 deletions packages/@aws-cdk/applet-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/@aws-cdk/assert/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions packages/@aws-cdk/aws-cloudfront/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions packages/@aws-cdk/aws-cloudtrail/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codebuild/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ new BuildProject(this, 'MyProject', {

### Using BuildProject as an event target

The `BuildProject` construct implements the `IEventRuleTargetProps` interface. This means that it can be
The `BuildProject` construct implements the `IEventRuleTarget` interface. This means that it can be
used as a target for event rules:

```ts
Expand Down
12 changes: 6 additions & 6 deletions packages/@aws-cdk/aws-codebuild/lib/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface BuildProjectRefProps {
* (or one defined in a different CDK Stack),
* use the {@link import} method.
*/
export abstract class BuildProjectRef extends cdk.Construct implements events.IEventRuleTargetProps {
export abstract class BuildProjectRef extends cdk.Construct implements events.IEventRuleTarget {
/**
* Import a Project defined either outside the CDK,
* or in a different CDK Stack
Expand Down Expand Up @@ -97,7 +97,7 @@ export abstract class BuildProjectRef extends cdk.Construct implements events.IE
*
* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html
*/
public onStateChange(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onStateChange(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = new events.EventRule(this, name, options);
rule.addTarget(target);
rule.addEventPattern({
Expand All @@ -118,7 +118,7 @@ export abstract class BuildProjectRef extends cdk.Construct implements events.IE
*
* @see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-build-notifications.html
*/
public onPhaseChange(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onPhaseChange(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = new events.EventRule(this, name, options);
rule.addTarget(target);
rule.addEventPattern({
Expand All @@ -136,7 +136,7 @@ export abstract class BuildProjectRef extends cdk.Construct implements events.IE
/**
* Defines an event rule which triggers when a build starts.
*/
public onBuildStarted(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onBuildStarted(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onStateChange(name, target, options);
rule.addEventPattern({
detail: {
Expand All @@ -149,7 +149,7 @@ export abstract class BuildProjectRef extends cdk.Construct implements events.IE
/**
* Defines an event rule which triggers when a build fails.
*/
public onBuildFailed(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onBuildFailed(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onStateChange(name, target, options);
rule.addEventPattern({
detail: {
Expand All @@ -162,7 +162,7 @@ export abstract class BuildProjectRef extends cdk.Construct implements events.IE
/**
* Defines an event rule which triggers when a build completes successfully.
*/
public onBuildSucceeded(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onBuildSucceeded(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onStateChange(name, target, options);
rule.addEventPattern({
detail: {
Expand Down
12 changes: 6 additions & 6 deletions packages/@aws-cdk/aws-codebuild/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions packages/@aws-cdk/aws-codecommit/lib/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export abstract class RepositoryRef extends cdk.Construct {
* Defines a CloudWatch event rule which triggers for repository events. Use
* `rule.addEventPattern(pattern)` to specify a filter.
*/
public onEvent(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onEvent(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = new events.EventRule(this, name, options);
rule.addEventPattern({
source: [ 'aws.codecommit' ],
Expand All @@ -71,7 +71,7 @@ export abstract class RepositoryRef extends cdk.Construct {
* Defines a CloudWatch event rule which triggers when a "CodeCommit
* Repository State Change" event occurs.
*/
public onStateChange(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onStateChange(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onEvent(name, target, options);
rule.addEventPattern({
detailType: [ 'CodeCommit Repository State Change' ],
Expand All @@ -83,7 +83,7 @@ export abstract class RepositoryRef extends cdk.Construct {
* Defines a CloudWatch event rule which triggers when a reference is
* created (i.e. a new brach/tag is created) to the repository.
*/
public onReferenceCreated(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onReferenceCreated(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onStateChange(name, target, options);
rule.addEventPattern({ detail: { event: [ 'referenceCreated' ] } });
return rule;
Expand All @@ -93,7 +93,7 @@ export abstract class RepositoryRef extends cdk.Construct {
* Defines a CloudWatch event rule which triggers when a reference is
* updated (i.e. a commit is pushed to an existig branch) from the repository.
*/
public onReferenceUpdated(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onReferenceUpdated(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onStateChange(name, target, options);
rule.addEventPattern({ detail: { event: [ 'referenceUpdated' ] } });
return rule;
Expand All @@ -103,7 +103,7 @@ export abstract class RepositoryRef extends cdk.Construct {
* Defines a CloudWatch event rule which triggers when a reference is
* delete (i.e. a branch/tag is deleted) from the repository.
*/
public onReferenceDeleted(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onReferenceDeleted(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onStateChange(name, target, options);
rule.addEventPattern({ detail: { event: [ 'referenceDeleted' ] } });
return rule;
Expand All @@ -112,7 +112,7 @@ export abstract class RepositoryRef extends cdk.Construct {
/**
* Defines a CloudWatch event rule which triggers when a pull request state is changed.
*/
public onPullRequestStateChange(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onPullRequestStateChange(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onEvent(name, target, options);
rule.addEventPattern({ detailType: [ 'CodeCommit Pull Request State Change' ] });
return rule;
Expand All @@ -121,7 +121,7 @@ export abstract class RepositoryRef extends cdk.Construct {
/**
* Defines a CloudWatch event rule which triggers when a comment is made on a pull request.
*/
public onCommentOnPullRequest(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onCommentOnPullRequest(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onEvent(name, target, options);
rule.addEventPattern({ detailType: [ 'CodeCommit Comment on Pull Request' ] });
return rule;
Expand All @@ -130,7 +130,7 @@ export abstract class RepositoryRef extends cdk.Construct {
/**
* Defines a CloudWatch event rule which triggers when a comment is made on a commit.
*/
public onCommentOnCommit(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onCommentOnCommit(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = this.onEvent(name, target, options);
rule.addEventPattern({ detailType: [ 'CodeCommit Comment on Commit' ] });
return rule;
Expand All @@ -141,7 +141,7 @@ export abstract class RepositoryRef extends cdk.Construct {
* @param target The target of the event
* @param branch The branch to monitor. Defaults to all branches.
*/
public onCommit(name: string, target?: events.IEventRuleTargetProps, branch?: string) {
public onCommit(name: string, target?: events.IEventRuleTarget, branch?: string) {
const rule = this.onReferenceUpdated(name, target);
if (branch) {
rule.addEventPattern({ detail: { referenceName: [ branch ] }});
Expand Down
12 changes: 6 additions & 6 deletions packages/@aws-cdk/aws-codecommit/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codepipeline/lib/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export abstract class Action extends cdk.Construct {
};
}

public onStateChange(name: string, target?: events.IEventRuleTargetProps, options?: events.EventRuleProps) {
public onStateChange(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps) {
const rule = new events.EventRule(this.stage.pipeline, name, options);
rule.addTarget(target);
rule.addEventPattern({
Expand Down
Loading

0 comments on commit 4f39f48

Please sign in to comment.