Skip to content

Commit

Permalink
Update changelog for releasing beta-4
Browse files Browse the repository at this point in the history
  • Loading branch information
vicancy committed Nov 2, 2021
1 parent 295b8d7 commit 590acbf
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
24 changes: 23 additions & 1 deletion sdk/web-pubsub/web-pubsub-express/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.4 (2021-11-01)

### Features Added

### Breaking Changes

- Move `allowedEndpoints` settings into `WebPubSubEventHandlerOptions`. If not set, the default behavior is allowing all the incoming endpoints.

```js
const handler = new WebPubSubEventHandler("chat", {
handleConnect(req, res) {
// You can set the state for the connection, it lasts throughout the lifetime of the connection
res.setState("calledTime", 1);
res.success();
},
handleUserEvent(req, res) {
var calledTime = req.context.states.calledTime++;
console.log(calledTime);
// You can also set the state here
res.setState("calledTime", calledTime);
res.success();
},
allowedEndpoints: ["https://xxx.webpubsub.azure.com"]
});
```

- Remove `dumpRequest` flag and leverage @azure/logger instead.

### Bugs Fixed

### Other Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import { WebPubSubEventHandler } from "@azure/web-pubsub-express";
import express from "express";

const handler = new WebPubSubEventHandler("chat", ["https://xxx.webpubsub.azure.com"], {
dumpRequest: false,
const handler = new WebPubSubEventHandler("chat", {
handleConnect(req, res) {
console.log(req);
res.success();
Expand All @@ -22,7 +21,8 @@ const handler = new WebPubSubEventHandler("chat", ["https://xxx.webpubsub.azure.
handleUserEvent(req, res) {
console.log(req);
res.success("Hello", "text");
}
},
allowedEndpoints: ["https://xxx.webpubsub.azure.com"]
});

const app = express();
Expand Down
11 changes: 9 additions & 2 deletions sdk/web-pubsub/web-pubsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.4 (2021-11-01)

### Features Added

- Support for DefaultAzureCredential
- Added generateClientToken method to the `HubClient`.
- Added support for reverse proxies, enabling usage of Web Pubsub with Azure API Management.
- Added method to close all connections in a hub `serviceClient.closeAllConnections`,
- Added method to close all connections in a group `groupClient.closeAllConnections`
- Added method to close all connections for a user `serviceClient.closeUserConnections`.

### Breaking Changes

- Renamed method `getAuthenticationToken` to `getClientAccessToken`
- Renamed method `hasUser` to `userExists`
- Renamed method `hasGroup` to `groupExists`
- Renamed method `hasConnection` to `connnectionExists`

### Bugs Fixed

### Other Changes
Expand Down

0 comments on commit 590acbf

Please sign in to comment.