Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hono/node-server

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hono/node-server - npm Package Compare versions

Comparing version 1.11.2 to 1.11.3

10

dist/index.js

@@ -86,2 +86,12 @@ "use strict";

};
if (method === "TRACE") {
init.method = "GET";
const req = new Request(url, init);
Object.defineProperty(req, "method", {
get() {
return "TRACE";
}
});
return req;
}
if (!(method === "GET" || method === "HEAD")) {

@@ -88,0 +98,0 @@ init.body = import_node_stream.Readable.toWeb(incoming);

@@ -80,2 +80,12 @@ "use strict";

};
if (method === "TRACE") {
init.method = "GET";
const req = new Request(url, init);
Object.defineProperty(req, "method", {
get() {
return "TRACE";
}
});
return req;
}
if (!(method === "GET" || method === "HEAD")) {

@@ -82,0 +92,0 @@ init.body = import_node_stream.Readable.toWeb(incoming);

@@ -73,2 +73,12 @@ "use strict";

};
if (method === "TRACE") {
init.method = "GET";
const req = new Request(url, init);
Object.defineProperty(req, "method", {
get() {
return "TRACE";
}
});
return req;
}
if (!(method === "GET" || method === "HEAD")) {

@@ -75,0 +85,0 @@ init.body = import_node_stream.Readable.toWeb(incoming);

2

dist/serve-static.d.ts

@@ -5,3 +5,3 @@ import { Context, MiddlewareHandler } from 'hono';

/**
* Root path, relative to current working directory. (absolute paths are not supported)
* Root path, relative to current working directory from which the app was started. Absolute paths are not supported.
*/

@@ -8,0 +8,0 @@ root?: string;

@@ -82,2 +82,12 @@ "use strict";

};
if (method === "TRACE") {
init.method = "GET";
const req = new Request(url, init);
Object.defineProperty(req, "method", {
get() {
return "TRACE";
}
});
return req;
}
if (!(method === "GET" || method === "HEAD")) {

@@ -84,0 +94,0 @@ init.body = import_node_stream.Readable.toWeb(incoming);

@@ -80,2 +80,12 @@ "use strict";

};
if (method === "TRACE") {
init.method = "GET";
const req = new Request(url, init);
Object.defineProperty(req, "method", {
get() {
return "TRACE";
}
});
return req;
}
if (!(method === "GET" || method === "HEAD")) {

@@ -82,0 +92,0 @@ init.body = import_node_stream.Readable.toWeb(incoming);

{
"name": "@hono/node-server",
"version": "1.11.2",
"version": "1.11.3",
"description": "Node.js Adapter for Hono",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -158,4 +158,25 @@ # Node.js Adapter for Hono

Note that `root` must be _relative_ to the current working directory - absolute paths are not supported.
Note that `root` must be _relative_ to the current working directory from which the app was started. Absolute paths are not supported.
This can cause confusion when running your application locally.
Imagine your project structure is:
```
my-hono-project/
src/
index.ts
static/
index.html
```
Typically, you would run your app from the project's root directory (`my-hono-project`),
so you would need the following code to serve the `static` folder:
```ts
app.use('/static/*', serveStatic({ root: './static' }))
```
Notice that `root` here is not relative to `src/index.ts`, rather to `my-hono-project`.
### Options

@@ -162,0 +183,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc