@superhero/http-server 4.2.1 → 4.2.3
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 +2 -2
- package/view.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superhero/http-server",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "HTTP(S) server component supporting both HTTP 1.1 and HTTP 2.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"http server",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"./*/*/*/*/*/*": "./*/*/*/*/*/*.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@superhero/router": "^4.1.
|
|
25
|
+
"@superhero/router": "^4.1.1",
|
|
26
26
|
"@superhero/deep": "^4.1.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
package/view.js
CHANGED
|
@@ -46,10 +46,11 @@ export default class View
|
|
|
46
46
|
headersSent : { get:() => downstream.headersSent }
|
|
47
47
|
})
|
|
48
48
|
|
|
49
|
+
let body = {}
|
|
49
50
|
Object.defineProperties(this,
|
|
50
51
|
{
|
|
51
52
|
// The body property is an object that represents the response body.
|
|
52
|
-
body : { enumerable: true,
|
|
53
|
+
body : { enumerable: true, get: () => body, set: (value) => body = deepmerge(body, value) },
|
|
53
54
|
// The stream property is a transform stream in object mode that by default encodes objects
|
|
54
55
|
// as stringified JSON data records according to HTML5 standard Server-Sent Events (SSE).
|
|
55
56
|
stream : { enumerable: true, configurable: true, get: () => this.#lazyloadStream },
|