Skip to content

Commit

Permalink
Merge branch 'main' into eventbridge-optional-props
Browse files Browse the repository at this point in the history
  • Loading branch information
eladcon authored Mar 25, 2024
2 parents 5b2393d + fa129e9 commit 6468468
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions dynamodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ table.setStreamConsumer(inflight (record) => {
// Put and query.
test "put and query" {
table.put(
item: {
Item: {
id: "1",
body: "hello",
},
);
let response = table.query(
keyConditionExpression: "id = :id",
expressionAttributeValues: {":id": "1"},
KeyConditionExpression: "id = :id",
ExpressionAttributeValues: {":id": "1"},
);
assert(response.count == 1);
assert(response.items.at(0).get("id").asStr() == "1");
assert(response.items.at(0).get("body").asStr() == "hello");
assert(response.Count == 1);
assert(response.Items.at(0).get("id").asStr() == "1");
assert(response.Items.at(0).get("body").asStr() == "hello");
}
```

Expand Down
2 changes: 1 addition & 1 deletion dynamodb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@winglibs/dynamodb",
"version": "0.0.3",
"version": "0.0.4",
"description": "DynamoDB library for Wing",
"author": {
"name": "Cristian Pallarés",
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 ?? "eventbridge-{this.node.addr.substring(0, 8)}") 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 6468468

Please sign in to comment.