Skip to content

Commit

Permalink
fix(eventbridge): use new platform parameter api (#146)
Browse files Browse the repository at this point in the history
Updates to library to use the new api for platform parameters.
  • Loading branch information
hasanaburayyan authored Mar 25, 2024
1 parent a610b97 commit fa129e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eventbridge/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion eventbridge/platform/awscdk/eventbridge.w
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion eventbridge/platform/tfaws/eventbridge.w
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit fa129e9

Please sign in to comment.