@whatwg-node/server 0.1.1 → 0.1.2
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/index.js +2 -0
- package/index.mjs +2 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -102,6 +102,8 @@ function normalizeNodeRequest(nodeRequest, RequestCtor) {
|
|
|
102
102
|
switch (prop) {
|
|
103
103
|
case 'json':
|
|
104
104
|
return async () => maybeParsedBody;
|
|
105
|
+
case 'text':
|
|
106
|
+
return async () => JSON.stringify(maybeParsedBody);
|
|
105
107
|
default:
|
|
106
108
|
return Reflect.get(target, prop, receiver);
|
|
107
109
|
}
|
package/index.mjs
CHANGED
|
@@ -98,6 +98,8 @@ function normalizeNodeRequest(nodeRequest, RequestCtor) {
|
|
|
98
98
|
switch (prop) {
|
|
99
99
|
case 'json':
|
|
100
100
|
return async () => maybeParsedBody;
|
|
101
|
+
case 'text':
|
|
102
|
+
return async () => JSON.stringify(maybeParsedBody);
|
|
101
103
|
default:
|
|
102
104
|
return Reflect.get(target, prop, receiver);
|
|
103
105
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatwg-node/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Fetch API compliant HTTP Server adapter",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@types/node": "^18.0.6"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@whatwg-node/fetch": "^0.
|
|
10
|
+
"@whatwg-node/fetch": "^0.3.0",
|
|
11
11
|
"tslib": "^2.3.1"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|