diff --git a/eventbridge/package.json b/eventbridge/package.json index 5479abb9..8949205f 100644 --- a/eventbridge/package.json +++ b/eventbridge/package.json @@ -1,7 +1,7 @@ { "name": "@winglibs/eventbridge", "description": "Amazon EventBridge library for Wing", - "version": "0.0.3", + "version": "0.0.4", "repository": { "type": "git", "url": "https://github.com/winglang/winglibs.git", diff --git a/eventbridge/platform/awscdk/eventbridge.w b/eventbridge/platform/awscdk/eventbridge.w index 1e0bbf3b..517a54eb 100644 --- a/eventbridge/platform/awscdk/eventbridge.w +++ b/eventbridge/platform/awscdk/eventbridge.w @@ -12,7 +12,7 @@ pub class Bus impl types.IBus { new(props: types.BusProps) { let app = nodeof(this).app; // TODO: use typed properties when its available - if let eventBridgeName = unsafeCast(app)?.platformParameters?.getParameterValue("eventBridgeName") { + if let eventBridgeName = app.parameters.value("eventBridgeName") { this.eventBridge = cdk.aws_events.EventBus.fromEventBusName(this, "EventBridge", eventBridgeName); } else { this.eventBridge = new cdk.aws_events.EventBus(eventBusName: props.name) as "EventBridge"; diff --git a/eventbridge/platform/tfaws/eventbridge.w b/eventbridge/platform/tfaws/eventbridge.w index d36988b1..f2bcdaf0 100644 --- a/eventbridge/platform/tfaws/eventbridge.w +++ b/eventbridge/platform/tfaws/eventbridge.w @@ -12,7 +12,7 @@ pub class Bus impl types.IBus { new(props: types.BusProps) { let app = nodeof(this).app; // TODO: use typed properties when its available - if let eventBridgeName = unsafeCast(app)?.platformParameters?.getParameterValue("eventBridgeName") { + if let eventBridgeName = app.parameters.value("eventBridgeName") { let bus = new tfAws.dataAwsCloudwatchEventBus.DataAwsCloudwatchEventBus( name: eventBridgeName, ) as "EventBridge";