@whatwg-node/server
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -206,3 +206,3 @@ 'use strict'; | ||
} | ||
function handleRequestWithWaitUntil(request, ctx, ...rest) { | ||
function handleRequestWithWaitUntil(request, ctx = {}, ...rest) { | ||
var _a; | ||
@@ -230,6 +230,7 @@ if ('process' in globalThis && ((_a = process.versions) === null || _a === void 0 ? void 0 : _a['bun']) != null) { | ||
} | ||
return response$; | ||
} | ||
return handleRequest(request, ctx); | ||
} | ||
function genericRequestHandler(input, ctx = {}, ...rest) { | ||
function genericRequestHandler(input, ctx, ...rest) { | ||
// If it is a Node request | ||
@@ -254,5 +255,5 @@ if (isReadable(input) && ctx != null && isServerResponse(ctx)) { | ||
if (typeof input === 'string' || input instanceof URL) { | ||
return handleRequestWithWaitUntil(new RequestCtor(input, init), Object.assign({}, ...ctx)); | ||
return handleRequestWithWaitUntil(new RequestCtor(input, init), ...ctx); | ||
} | ||
return handleRequestWithWaitUntil(input, Object.assign({}, init, ...ctx)); | ||
return handleRequestWithWaitUntil(input, init, ...ctx); | ||
} | ||
@@ -259,0 +260,0 @@ const adapterObj = { |
{ | ||
"name": "@whatwg-node/server", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "Fetch API compliant HTTP Server adapter", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -206,5 +206,4 @@ # WHATWG Node Generic Server Adapter | ||
const server = Bun.serve(yoga) | ||
console.info( | ||
`Server is running on ${server.hostname}`, | ||
) | ||
console.info(`Server is running on ${server.hostname}`) | ||
``` | ||
@@ -211,0 +210,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
665
38177
305