Skip to content

Commit

Permalink
fix(websockets): add url to wing console (#116)
Browse files Browse the repository at this point in the history
Hide the inner implementation and add a `url` field to wing console inspector.
  • Loading branch information
eladb authored Mar 12, 2024
1 parent 4d4fdc8 commit 29485bb
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 33 deletions.
9 changes: 9 additions & 0 deletions websockets/lib.w
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bring util;
bring cloud;
bring ui;
bring "./commons/api.w" as api;
bring "./platform/awscdk.w" as awscdk;
bring "./platform/tf-aws.w" as tfaws;
Expand Down Expand Up @@ -27,6 +28,14 @@ pub class WebSocket impl api.IWebSocket {
} else {
throw "unsupported target {target}";
}

let inner = nodeof(this.inner);
inner.hidden = true;

new ui.Field("url", inflight () => {
return this.url;
});

new cloud.Endpoint(this.url);
}

Expand Down
Loading

0 comments on commit 29485bb

Please sign in to comment.