@whatwg-node/server 0.6.0 → 0.6.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/index.js +0 -7
- package/index.mjs +0 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -43,12 +43,6 @@ function buildFullUrl(nodeRequest) {
|
|
|
43
43
|
const endpoint = nodeRequest.originalUrl || nodeRequest.url || '/graphql';
|
|
44
44
|
return `${protocol}://${hostnameWithPort}${endpoint}`;
|
|
45
45
|
}
|
|
46
|
-
function configureSocket(rawRequest) {
|
|
47
|
-
var _a, _b, _c, _d, _e, _f;
|
|
48
|
-
(_b = (_a = rawRequest === null || rawRequest === void 0 ? void 0 : rawRequest.socket) === null || _a === void 0 ? void 0 : _a.setTimeout) === null || _b === void 0 ? void 0 : _b.call(_a, 0);
|
|
49
|
-
(_d = (_c = rawRequest === null || rawRequest === void 0 ? void 0 : rawRequest.socket) === null || _c === void 0 ? void 0 : _c.setNoDelay) === null || _d === void 0 ? void 0 : _d.call(_c, true);
|
|
50
|
-
(_f = (_e = rawRequest === null || rawRequest === void 0 ? void 0 : rawRequest.socket) === null || _e === void 0 ? void 0 : _e.setKeepAlive) === null || _f === void 0 ? void 0 : _f.call(_e, true);
|
|
51
|
-
}
|
|
52
46
|
function isRequestBody(body) {
|
|
53
47
|
const stringTag = body[Symbol.toStringTag];
|
|
54
48
|
if (typeof body === 'string' ||
|
|
@@ -64,7 +58,6 @@ function isRequestBody(body) {
|
|
|
64
58
|
function normalizeNodeRequest(nodeRequest, RequestCtor) {
|
|
65
59
|
var _a;
|
|
66
60
|
const rawRequest = nodeRequest.raw || nodeRequest.req || nodeRequest;
|
|
67
|
-
configureSocket(rawRequest);
|
|
68
61
|
let fullUrl = buildFullUrl(rawRequest);
|
|
69
62
|
if (nodeRequest.query) {
|
|
70
63
|
const urlObj = new URL(fullUrl);
|
package/index.mjs
CHANGED
|
@@ -40,12 +40,6 @@ function buildFullUrl(nodeRequest) {
|
|
|
40
40
|
const endpoint = nodeRequest.originalUrl || nodeRequest.url || '/graphql';
|
|
41
41
|
return `${protocol}://${hostnameWithPort}${endpoint}`;
|
|
42
42
|
}
|
|
43
|
-
function configureSocket(rawRequest) {
|
|
44
|
-
var _a, _b, _c, _d, _e, _f;
|
|
45
|
-
(_b = (_a = rawRequest === null || rawRequest === void 0 ? void 0 : rawRequest.socket) === null || _a === void 0 ? void 0 : _a.setTimeout) === null || _b === void 0 ? void 0 : _b.call(_a, 0);
|
|
46
|
-
(_d = (_c = rawRequest === null || rawRequest === void 0 ? void 0 : rawRequest.socket) === null || _c === void 0 ? void 0 : _c.setNoDelay) === null || _d === void 0 ? void 0 : _d.call(_c, true);
|
|
47
|
-
(_f = (_e = rawRequest === null || rawRequest === void 0 ? void 0 : rawRequest.socket) === null || _e === void 0 ? void 0 : _e.setKeepAlive) === null || _f === void 0 ? void 0 : _f.call(_e, true);
|
|
48
|
-
}
|
|
49
43
|
function isRequestBody(body) {
|
|
50
44
|
const stringTag = body[Symbol.toStringTag];
|
|
51
45
|
if (typeof body === 'string' ||
|
|
@@ -61,7 +55,6 @@ function isRequestBody(body) {
|
|
|
61
55
|
function normalizeNodeRequest(nodeRequest, RequestCtor) {
|
|
62
56
|
var _a;
|
|
63
57
|
const rawRequest = nodeRequest.raw || nodeRequest.req || nodeRequest;
|
|
64
|
-
configureSocket(rawRequest);
|
|
65
58
|
let fullUrl = buildFullUrl(rawRequest);
|
|
66
59
|
if (nodeRequest.query) {
|
|
67
60
|
const urlObj = new URL(fullUrl);
|