@azure/web-pubsub-express 1.0.3-alpha.20220420.2 → 1.0.3-alpha.20220520.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/CHANGELOG.md +0 -86
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/web-pubsub-express",
|
|
3
|
-
"version": "1.0.3-alpha.
|
|
3
|
+
"version": "1.0.3-alpha.20220520.1",
|
|
4
4
|
"description": "Azure Web PubSub CloudEvents handlers",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"chai": "^4.2.0",
|
|
74
74
|
"cross-env": "^7.0.2",
|
|
75
75
|
"dotenv": "^8.2.0",
|
|
76
|
-
"eslint": "^
|
|
76
|
+
"eslint": "^8.0.0",
|
|
77
77
|
"esm": "^3.2.18",
|
|
78
78
|
"express": "^4.16.3",
|
|
79
79
|
"karma": "^6.2.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"mocha-junit-reporter": "^2.0.0",
|
|
94
94
|
"nyc": "^15.0.0",
|
|
95
95
|
"prettier": "^2.5.1",
|
|
96
|
-
"puppeteer": "^
|
|
96
|
+
"puppeteer": "^14.0.0",
|
|
97
97
|
"rimraf": "^3.0.0",
|
|
98
98
|
"sinon": "^9.0.2",
|
|
99
99
|
"source-map-support": "^0.5.9",
|
package/CHANGELOG.md
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# Release History
|
|
2
|
-
|
|
3
|
-
## 1.0.3 (Unreleased)
|
|
4
|
-
|
|
5
|
-
### Features Added
|
|
6
|
-
|
|
7
|
-
### Breaking Changes
|
|
8
|
-
|
|
9
|
-
### Bugs Fixed
|
|
10
|
-
|
|
11
|
-
### Other Changes
|
|
12
|
-
|
|
13
|
-
## 1.0.2 (2022-01-30)
|
|
14
|
-
|
|
15
|
-
### Bugs Fixed
|
|
16
|
-
|
|
17
|
-
- Fix the issue that `UserEventRequest` failed to process request with content-type `application/octet-stream` correctly into `dataType` `binary`
|
|
18
|
-
|
|
19
|
-
### Other Changes
|
|
20
|
-
|
|
21
|
-
- Remove `cloudevents` package dependency
|
|
22
|
-
|
|
23
|
-
## 1.0.1 (2022-01-11)
|
|
24
|
-
|
|
25
|
-
### Bugs Fixed
|
|
26
|
-
|
|
27
|
-
- Fix the `data` definition for `UserEventRequest` when `dataType` is `json`. When `dataType` is `json`, `data` is the JSON parsed result from request body, so the type of `data` depends on the user scenario.
|
|
28
|
-
- Fix the CloudEvents parsing issue that now `data` also can be `boolean` or `number`.
|
|
29
|
-
|
|
30
|
-
## 1.0.0 (2021-11-11)
|
|
31
|
-
|
|
32
|
-
No changes.
|
|
33
|
-
|
|
34
|
-
## 1.0.0-beta.4 (2021-11-09)
|
|
35
|
-
|
|
36
|
-
### Breaking Changes
|
|
37
|
-
|
|
38
|
-
- Move `allowedEndpoints` settings into `WebPubSubEventHandlerOptions`. If not set, the default behavior is allowing all the incoming endpoints.
|
|
39
|
-
|
|
40
|
-
```js
|
|
41
|
-
const handler = new WebPubSubEventHandler("chat", {
|
|
42
|
-
handleConnect(req, res) {
|
|
43
|
-
// You can set the state for the connection, it lasts throughout the lifetime of the connection
|
|
44
|
-
res.setState("calledTime", 1);
|
|
45
|
-
res.success();
|
|
46
|
-
},
|
|
47
|
-
handleUserEvent(req, res) {
|
|
48
|
-
var calledTime = req.context.states.calledTime++;
|
|
49
|
-
console.log(calledTime);
|
|
50
|
-
// You can also set the state here
|
|
51
|
-
res.setState("calledTime", calledTime);
|
|
52
|
-
res.success();
|
|
53
|
-
},
|
|
54
|
-
allowedEndpoints: ["https://xxx.webpubsub.azure.com"]
|
|
55
|
-
});
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
- Remove `dumpRequest` flag and leverage @azure/logger instead.
|
|
59
|
-
|
|
60
|
-
## 1.0.0-beta.3 (2021-07-30)
|
|
61
|
-
|
|
62
|
-
- Support reading and setting connection states, sample usage:
|
|
63
|
-
```js
|
|
64
|
-
const handler = new WebPubSubEventHandler("chat", ["https://xxx.webpubsub.azure.com"], {
|
|
65
|
-
handleConnect(req, res) {
|
|
66
|
-
// You can set the state for the connection, it lasts throughout the lifetime of the connection
|
|
67
|
-
res.setState("calledTime", 1);
|
|
68
|
-
res.success();
|
|
69
|
-
},
|
|
70
|
-
handleUserEvent(req, res) {
|
|
71
|
-
var calledTime = req.context.states.calledTime++;
|
|
72
|
-
console.log(calledTime);
|
|
73
|
-
// You can also set the state here
|
|
74
|
-
res.setState("calledTime", calledTime);
|
|
75
|
-
res.success();
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## 1.0.0-beta.2 (2021-07-20)
|
|
81
|
-
|
|
82
|
-
- Removed unnecessary dependencies.
|
|
83
|
-
|
|
84
|
-
## 1.0.0-beta.1 (2021-04-23)
|
|
85
|
-
|
|
86
|
-
This is the first release of the @azure/web-pubsub-express package.
|