Skip to content

Commit

Permalink
fix: take peer on ^2.50.0 or AWS CDK (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
sam authored Dec 21, 2022
1 parent 345c909 commit fe850bb
Show file tree
Hide file tree
Showing 7 changed files with 4,659 additions and 8,684 deletions.
6 changes: 3 additions & 3 deletions apps/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
"start-my-workflow": "eventual start my-service my-workflow --input '{\"name\": \"world\"}' --tail"
},
"dependencies": {
"aws-cdk-lib": "^2.51.1",
"@eventual/aws-cdk": "workspace:^",
"aws-cdk-lib": "2.50.0",
"constructs": "^10.1.154"
},
"devDependencies": {
"@eventual/aws-cdk": "workspace:^",
"@eventual/cli": "workspace:^",
"@types/jest": "^29",
"@types/node": "^16",
"aws-cdk": "2.51.1",
"aws-cdk": "2.50.0",
"esbuild": "^0.15.14",
"jest": "^29",
"test-app-runtime": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions apps/tests/aws-runtime-cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"cdk": "cdk"
},
"dependencies": {
"aws-cdk-lib": "2.51.1",
"aws-cdk-lib": "2.50.0",
"constructs": "10.1.154"
},
"devDependencies": {
"@eventual/aws-cdk": "workspace:^",
"@eventual/cli": "workspace:^",
"@types/jest": "^29",
"@types/node": "^16",
"aws-cdk": "2.51.1",
"aws-cdk": "2.50.0",
"esbuild": "^0.15.14",
"jest": "^29",
"tests-runtime": "workspace:^",
Expand Down
6 changes: 3 additions & 3 deletions examples/lambda-test-runner/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"start-my-workflow": "eventual start my-service my-workflow --input '{\"name\": \"world\"}' --tail"
},
"dependencies": {
"aws-cdk-lib": "^2.51.1",
"@eventual/aws-cdk": "workspace:^",
"aws-cdk-lib": "2.50.0",
"constructs": "^10.1.154"
},
"devDependencies": {
"@eventual/aws-cdk": "workspace:^",
"@eventual/cli": "workspace:^",
"@types/jest": "^29",
"@types/node": "^16",
"aws-cdk": "2.51.1",
"aws-cdk": "2.50.0",
"esbuild": "^0.15.14",
"jest": "^29",
"example-test-runner-runtime": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions examples/stock-bot/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"start-my-workflow": "eventual start my-service my-workflow --input '{\"name\": \"world\"}' --tail"
},
"dependencies": {
"aws-cdk-lib": "^2.51.1",
"aws-cdk-lib": "^2.50.0",
"constructs": "^10.1.154"
},
"devDependencies": {
"@eventual/aws-cdk": "workspace:^",
"@eventual/cli": "workspace:^",
"@types/jest": "^29",
"@types/node": "^16",
"aws-cdk": "2.51.1",
"aws-cdk": "2.50.0",
"esbuild": "^0.15.14",
"jest": "^29",
"example-stock-bot-runtime": "workspace:^",
Expand Down
13 changes: 8 additions & 5 deletions packages/@eventual/aws-cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@
"test": "jest --passWithNoTests"
},
"dependencies": {
"@aws-cdk/aws-apigatewayv2-authorizers-alpha": "2.51.1-alpha.0",
"@eventual/aws-runtime": "workspace:^",
"@eventual/compiler": "workspace:^",
"@eventual/core": "workspace:^"
},
"peerDependencies": {
"@aws-cdk/aws-apigatewayv2-alpha": "^2.50.0-alpha.0",
"@aws-cdk/aws-apigatewayv2-authorizers-alpha": "^2.50.0-alpha.0",
"@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.50.0-alpha.0",
"aws-cdk-lib": "^2.50.0",
"constructs": "^10.0.0",
"esbuild": "^0.15.13"
},
"devDependencies": {
"@aws-cdk/aws-apigatewayv2-alpha": "2.51.1-alpha.0",
"@aws-cdk/aws-apigatewayv2-integrations-alpha": "2.51.1-alpha.0",
"@aws-cdk/aws-apigatewayv2-alpha": "2.50.0-alpha.0",
"@aws-cdk/aws-apigatewayv2-authorizers-alpha": "2.50.0-alpha.0",
"@aws-cdk/aws-apigatewayv2-integrations-alpha": "2.50.0-alpha.0",
"@aws-sdk/client-lambda": "^3.213.0",
"@types/aws-lambda": "8.10.108",
"@types/jest": "^29",
"@types/node": "^16",
"aws-cdk": "2.51.1",
"aws-cdk-lib": "2.51.1",
"aws-cdk-lib": "2.50.0",
"aws-cdk": "2.50.0",
"constructs": "10.1.154",
"esbuild": "^0.15.14",
"jest": "^29",
Expand Down
23 changes: 19 additions & 4 deletions packages/@eventual/aws-cdk/src/scheduler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ENV_NAMES } from "@eventual/aws-runtime";
import { ArnFormat, Stack } from "aws-cdk-lib";
import { ArnFormat, CfnResource, Resource, Stack } from "aws-cdk-lib";
import {
IGrantable,
IRole,
Expand All @@ -10,7 +10,6 @@ import {
import { Function } from "aws-cdk-lib/aws-lambda";
import { SqsEventSource } from "aws-cdk-lib/aws-lambda-event-sources";
import { NodejsFunction } from "aws-cdk-lib/aws-lambda-nodejs";
import { CfnScheduleGroup } from "aws-cdk-lib/aws-scheduler";
import { IQueue, Queue } from "aws-cdk-lib/aws-sqs";
import { Construct } from "constructs";
import path from "path";
Expand Down Expand Up @@ -57,7 +56,7 @@ export class Scheduler extends Construct implements IScheduler, IGrantable {
/**
* A group in which all of the workflow schedules are created under.
*/
public readonly schedulerGroup: CfnScheduleGroup;
public readonly schedulerGroup: ScheduleGroup;
/**
* The lambda function which executes timed requests on the timerQueue.
*/
Expand All @@ -78,7 +77,7 @@ export class Scheduler extends Construct implements IScheduler, IGrantable {

constructor(scope: Construct, id: string, private props: SchedulerProps) {
super(scope, id);
this.schedulerGroup = new CfnScheduleGroup(this, "ScheduleGroup");
this.schedulerGroup = new ScheduleGroup(this, "ScheduleGroup");

this.schedulerRole = new Role(this, "SchedulerRole", {
assumedBy: new ServicePrincipal("scheduler.amazonaws.com", {
Expand Down Expand Up @@ -189,3 +188,19 @@ export class Scheduler extends Construct implements IScheduler, IGrantable {
this.grantDeleteSchedule(this.forwarder);
}
}

class ScheduleGroup extends Resource {
readonly resource: CfnResource;
constructor(scope: Construct, id: string) {
super(scope, id);

this.resource = new CfnResource(this, "Resource", {
type: "AWS::Scheduler::ScheduleGroup",
properties: {},
});
}

public get ref() {
return this.resource.ref;
}
}
Loading

0 comments on commit fe850bb

Please sign in to comment.