@hono/node-server
Advanced tools
| export { } | ||
| export { } |
| export { } | ||
| export { } |
@@ -25,2 +25,2 @@ import { IncomingMessage } from 'node:http'; | ||
| export { GlobalRequest, IncomingMessageWithWrapBodyStream, Request, RequestError, abortControllerKey, getAbortController, newRequest, toRequestError, wrapBodyStream }; | ||
| export { GlobalRequest, type IncomingMessageWithWrapBodyStream, Request, RequestError, abortControllerKey, getAbortController, newRequest, toRequestError, wrapBodyStream }; |
@@ -25,2 +25,2 @@ import { IncomingMessage } from 'node:http'; | ||
| export { GlobalRequest, IncomingMessageWithWrapBodyStream, Request, RequestError, abortControllerKey, getAbortController, newRequest, toRequestError, wrapBodyStream }; | ||
| export { GlobalRequest, type IncomingMessageWithWrapBodyStream, Request, RequestError, abortControllerKey, getAbortController, newRequest, toRequestError, wrapBodyStream }; |
@@ -26,2 +26,2 @@ import { OutgoingHttpHeaders } from 'node:http'; | ||
| export { GlobalResponse, InternalCache, Response, cacheKey }; | ||
| export { GlobalResponse, type InternalCache, Response, cacheKey }; |
@@ -26,2 +26,2 @@ import { OutgoingHttpHeaders } from 'node:http'; | ||
| export { GlobalResponse, InternalCache, Response, cacheKey }; | ||
| export { GlobalResponse, type InternalCache, Response, cacheKey }; |
@@ -17,2 +17,2 @@ import { Env, Context, MiddlewareHandler } from 'hono'; | ||
| export { ServeStaticOptions, serveStatic }; | ||
| export { type ServeStaticOptions, serveStatic }; |
@@ -17,2 +17,2 @@ import { Env, Context, MiddlewareHandler } from 'hono'; | ||
| export { ServeStaticOptions, serveStatic }; | ||
| export { type ServeStaticOptions, serveStatic }; |
@@ -58,3 +58,3 @@ "use strict"; | ||
| try { | ||
| stats = (0, import_node_fs.lstatSync)(path); | ||
| stats = (0, import_node_fs.statSync)(path); | ||
| } catch { | ||
@@ -61,0 +61,0 @@ } |
| // src/serve-static.ts | ||
| import { getMimeType } from "hono/utils/mime"; | ||
| import { createReadStream, lstatSync, existsSync } from "fs"; | ||
| import { createReadStream, statSync, existsSync } from "fs"; | ||
| import { join } from "path"; | ||
@@ -34,3 +34,3 @@ var COMPRESSIBLE_CONTENT_TYPE_REGEX = /^\s*(?:text\/[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i; | ||
| try { | ||
| stats = lstatSync(path); | ||
| stats = statSync(path); | ||
| } catch { | ||
@@ -37,0 +37,0 @@ } |
+3
-3
@@ -1,3 +0,3 @@ | ||
| import { IncomingMessage, ServerResponse, Server, ServerOptions as ServerOptions$1, createServer } from 'node:http'; | ||
| import { Http2ServerRequest, Http2ServerResponse, Http2Server, Http2SecureServer, ServerOptions as ServerOptions$3, createServer as createServer$2, SecureServerOptions, createSecureServer } from 'node:http2'; | ||
| import { IncomingMessage, ServerResponse, ServerOptions as ServerOptions$1, createServer, Server } from 'node:http'; | ||
| import { Http2ServerRequest, Http2ServerResponse, ServerOptions as ServerOptions$3, createServer as createServer$2, SecureServerOptions, createSecureServer, Http2Server, Http2SecureServer } from 'node:http2'; | ||
| import { ServerOptions as ServerOptions$2, createServer as createServer$1 } from 'node:https'; | ||
@@ -44,2 +44,2 @@ | ||
| export { CustomErrorHandler, FetchCallback, Http2Bindings, HttpBindings, NextHandlerOption, Options, ServerOptions, ServerType }; | ||
| export type { CustomErrorHandler, FetchCallback, Http2Bindings, HttpBindings, NextHandlerOption, Options, ServerOptions, ServerType }; |
+3
-3
@@ -1,3 +0,3 @@ | ||
| import { IncomingMessage, ServerResponse, Server, ServerOptions as ServerOptions$1, createServer } from 'node:http'; | ||
| import { Http2ServerRequest, Http2ServerResponse, Http2Server, Http2SecureServer, ServerOptions as ServerOptions$3, createServer as createServer$2, SecureServerOptions, createSecureServer } from 'node:http2'; | ||
| import { IncomingMessage, ServerResponse, ServerOptions as ServerOptions$1, createServer, Server } from 'node:http'; | ||
| import { Http2ServerRequest, Http2ServerResponse, ServerOptions as ServerOptions$3, createServer as createServer$2, SecureServerOptions, createSecureServer, Http2Server, Http2SecureServer } from 'node:http2'; | ||
| import { ServerOptions as ServerOptions$2, createServer as createServer$1 } from 'node:https'; | ||
@@ -44,2 +44,2 @@ | ||
| export { CustomErrorHandler, FetchCallback, Http2Bindings, HttpBindings, NextHandlerOption, Options, ServerOptions, ServerType }; | ||
| export type { CustomErrorHandler, FetchCallback, Http2Bindings, HttpBindings, NextHandlerOption, Options, ServerOptions, ServerType }; |
+2
-2
@@ -5,6 +5,6 @@ import { OutgoingHttpHeaders } from 'node:http'; | ||
| declare function readWithoutBlocking(readPromise: Promise<ReadableStreamReadResult<Uint8Array>>): Promise<ReadableStreamReadResult<Uint8Array> | undefined>; | ||
| declare function writeFromReadableStreamDefaultReader(reader: ReadableStreamDefaultReader<Uint8Array>, writable: Writable, currentReadPromise?: Promise<ReadableStreamReadResult<Uint8Array>> | undefined): Promise<void>; | ||
| declare function writeFromReadableStream(stream: ReadableStream<Uint8Array>, writable: Writable): Promise<void> | undefined; | ||
| declare function writeFromReadableStreamDefaultReader(reader: ReadableStreamDefaultReader<Uint8Array>, writable: Writable, currentReadPromise?: Promise<ReadableStreamReadResult<Uint8Array>> | undefined): Promise<undefined>; | ||
| declare function writeFromReadableStream(stream: ReadableStream<Uint8Array>, writable: Writable): Promise<undefined> | undefined; | ||
| declare const buildOutgoingHttpHeaders: (headers: Headers | HeadersInit | null | undefined) => OutgoingHttpHeaders; | ||
| export { buildOutgoingHttpHeaders, readWithoutBlocking, writeFromReadableStream, writeFromReadableStreamDefaultReader }; |
+2
-2
@@ -5,6 +5,6 @@ import { OutgoingHttpHeaders } from 'node:http'; | ||
| declare function readWithoutBlocking(readPromise: Promise<ReadableStreamReadResult<Uint8Array>>): Promise<ReadableStreamReadResult<Uint8Array> | undefined>; | ||
| declare function writeFromReadableStreamDefaultReader(reader: ReadableStreamDefaultReader<Uint8Array>, writable: Writable, currentReadPromise?: Promise<ReadableStreamReadResult<Uint8Array>> | undefined): Promise<void>; | ||
| declare function writeFromReadableStream(stream: ReadableStream<Uint8Array>, writable: Writable): Promise<void> | undefined; | ||
| declare function writeFromReadableStreamDefaultReader(reader: ReadableStreamDefaultReader<Uint8Array>, writable: Writable, currentReadPromise?: Promise<ReadableStreamReadResult<Uint8Array>> | undefined): Promise<undefined>; | ||
| declare function writeFromReadableStream(stream: ReadableStream<Uint8Array>, writable: Writable): Promise<undefined> | undefined; | ||
| declare const buildOutgoingHttpHeaders: (headers: Headers | HeadersInit | null | undefined) => OutgoingHttpHeaders; | ||
| export { buildOutgoingHttpHeaders, readWithoutBlocking, writeFromReadableStream, writeFromReadableStreamDefaultReader }; |
+1
-1
| { | ||
| "name": "@hono/node-server", | ||
| "version": "1.19.6", | ||
| "version": "1.19.7", | ||
| "description": "Node.js Adapter for Hono", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
205241
0.03%