@hono/node-server 1.19.12 → 1.19.14

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/dist/index.js CHANGED
@@ -190,6 +190,17 @@ var requestPrototype = {
190
190
  }
191
191
  });
192
192
  });
193
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
194
+ value: function(depth, options, inspectFn) {
195
+ const props = {
196
+ method: this.method,
197
+ url: this.url,
198
+ headers: this.headers,
199
+ nativeRequest: this[requestCache]
200
+ };
201
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
202
+ }
203
+ });
193
204
  Object.setPrototypeOf(requestPrototype, Request.prototype);
194
205
  var newRequest = (incoming, defaultHostname) => {
195
206
  const req = Object.create(requestPrototype);
@@ -296,6 +307,17 @@ var Response2 = class _Response {
296
307
  }
297
308
  });
298
309
  });
310
+ Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
311
+ value: function(depth, options, inspectFn) {
312
+ const props = {
313
+ status: this.status,
314
+ headers: this.headers,
315
+ ok: this.ok,
316
+ nativeResponse: this[responseCache]
317
+ };
318
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
319
+ }
320
+ });
299
321
  Object.setPrototypeOf(Response2, GlobalResponse);
300
322
  Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
301
323
 
package/dist/index.mjs CHANGED
@@ -151,6 +151,17 @@ var requestPrototype = {
151
151
  }
152
152
  });
153
153
  });
154
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
155
+ value: function(depth, options, inspectFn) {
156
+ const props = {
157
+ method: this.method,
158
+ url: this.url,
159
+ headers: this.headers,
160
+ nativeRequest: this[requestCache]
161
+ };
162
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
163
+ }
164
+ });
154
165
  Object.setPrototypeOf(requestPrototype, Request.prototype);
155
166
  var newRequest = (incoming, defaultHostname) => {
156
167
  const req = Object.create(requestPrototype);
@@ -257,6 +268,17 @@ var Response2 = class _Response {
257
268
  }
258
269
  });
259
270
  });
271
+ Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
272
+ value: function(depth, options, inspectFn) {
273
+ const props = {
274
+ status: this.status,
275
+ headers: this.headers,
276
+ ok: this.ok,
277
+ nativeResponse: this[responseCache]
278
+ };
279
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
280
+ }
281
+ });
260
282
  Object.setPrototypeOf(Response2, GlobalResponse);
261
283
  Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
262
284
 
package/dist/listener.js CHANGED
@@ -182,6 +182,17 @@ var requestPrototype = {
182
182
  }
183
183
  });
184
184
  });
185
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
186
+ value: function(depth, options, inspectFn) {
187
+ const props = {
188
+ method: this.method,
189
+ url: this.url,
190
+ headers: this.headers,
191
+ nativeRequest: this[requestCache]
192
+ };
193
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
194
+ }
195
+ });
185
196
  Object.setPrototypeOf(requestPrototype, Request.prototype);
186
197
  var newRequest = (incoming, defaultHostname) => {
187
198
  const req = Object.create(requestPrototype);
@@ -288,6 +299,17 @@ var Response2 = class _Response {
288
299
  }
289
300
  });
290
301
  });
302
+ Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
303
+ value: function(depth, options, inspectFn) {
304
+ const props = {
305
+ status: this.status,
306
+ headers: this.headers,
307
+ ok: this.ok,
308
+ nativeResponse: this[responseCache]
309
+ };
310
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
311
+ }
312
+ });
291
313
  Object.setPrototypeOf(Response2, GlobalResponse);
292
314
  Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
293
315
 
package/dist/listener.mjs CHANGED
@@ -148,6 +148,17 @@ var requestPrototype = {
148
148
  }
149
149
  });
150
150
  });
151
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
152
+ value: function(depth, options, inspectFn) {
153
+ const props = {
154
+ method: this.method,
155
+ url: this.url,
156
+ headers: this.headers,
157
+ nativeRequest: this[requestCache]
158
+ };
159
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
160
+ }
161
+ });
151
162
  Object.setPrototypeOf(requestPrototype, Request.prototype);
152
163
  var newRequest = (incoming, defaultHostname) => {
153
164
  const req = Object.create(requestPrototype);
@@ -254,6 +265,17 @@ var Response2 = class _Response {
254
265
  }
255
266
  });
256
267
  });
268
+ Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
269
+ value: function(depth, options, inspectFn) {
270
+ const props = {
271
+ status: this.status,
272
+ headers: this.headers,
273
+ ok: this.ok,
274
+ nativeResponse: this[responseCache]
275
+ };
276
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
277
+ }
278
+ });
257
279
  Object.setPrototypeOf(Response2, GlobalResponse);
258
280
  Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
259
281
 
package/dist/request.js CHANGED
@@ -176,6 +176,17 @@ var requestPrototype = {
176
176
  }
177
177
  });
178
178
  });
179
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
180
+ value: function(depth, options, inspectFn) {
181
+ const props = {
182
+ method: this.method,
183
+ url: this.url,
184
+ headers: this.headers,
185
+ nativeRequest: this[requestCache]
186
+ };
187
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
188
+ }
189
+ });
179
190
  Object.setPrototypeOf(requestPrototype, Request.prototype);
180
191
  var newRequest = (incoming, defaultHostname) => {
181
192
  const req = Object.create(requestPrototype);
package/dist/request.mjs CHANGED
@@ -145,6 +145,17 @@ var requestPrototype = {
145
145
  }
146
146
  });
147
147
  });
148
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
149
+ value: function(depth, options, inspectFn) {
150
+ const props = {
151
+ method: this.method,
152
+ url: this.url,
153
+ headers: this.headers,
154
+ nativeRequest: this[requestCache]
155
+ };
156
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
157
+ }
158
+ });
148
159
  Object.setPrototypeOf(requestPrototype, Request.prototype);
149
160
  var newRequest = (incoming, defaultHostname) => {
150
161
  const req = Object.create(requestPrototype);
package/dist/response.js CHANGED
@@ -91,6 +91,17 @@ var Response = class _Response {
91
91
  }
92
92
  });
93
93
  });
94
+ Object.defineProperty(Response.prototype, Symbol.for("nodejs.util.inspect.custom"), {
95
+ value: function(depth, options, inspectFn) {
96
+ const props = {
97
+ status: this.status,
98
+ headers: this.headers,
99
+ ok: this.ok,
100
+ nativeResponse: this[responseCache]
101
+ };
102
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
103
+ }
104
+ });
94
105
  Object.setPrototypeOf(Response, GlobalResponse);
95
106
  Object.setPrototypeOf(Response.prototype, GlobalResponse.prototype);
96
107
  // Annotate the CommonJS export names for ESM import in node:
package/dist/response.mjs CHANGED
@@ -65,6 +65,17 @@ var Response = class _Response {
65
65
  }
66
66
  });
67
67
  });
68
+ Object.defineProperty(Response.prototype, Symbol.for("nodejs.util.inspect.custom"), {
69
+ value: function(depth, options, inspectFn) {
70
+ const props = {
71
+ status: this.status,
72
+ headers: this.headers,
73
+ ok: this.ok,
74
+ nativeResponse: this[responseCache]
75
+ };
76
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
77
+ }
78
+ });
68
79
  Object.setPrototypeOf(Response, GlobalResponse);
69
80
  Object.setPrototypeOf(Response.prototype, GlobalResponse.prototype);
70
81
  export {
@@ -100,7 +100,7 @@ var serveStatic = (options = { root: "" }) => {
100
100
  } else {
101
101
  try {
102
102
  filename = tryDecodeURI(c.req.path);
103
- if (/(?:^|[\/\\])\.\.(?:$|[\/\\])/.test(filename)) {
103
+ if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}/.test(filename)) {
104
104
  throw new Error();
105
105
  }
106
106
  } catch {
@@ -76,7 +76,7 @@ var serveStatic = (options = { root: "" }) => {
76
76
  } else {
77
77
  try {
78
78
  filename = tryDecodeURI(c.req.path);
79
- if (/(?:^|[\/\\])\.\.(?:$|[\/\\])/.test(filename)) {
79
+ if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}/.test(filename)) {
80
80
  throw new Error();
81
81
  }
82
82
  } catch {
package/dist/server.js CHANGED
@@ -186,6 +186,17 @@ var requestPrototype = {
186
186
  }
187
187
  });
188
188
  });
189
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
190
+ value: function(depth, options, inspectFn) {
191
+ const props = {
192
+ method: this.method,
193
+ url: this.url,
194
+ headers: this.headers,
195
+ nativeRequest: this[requestCache]
196
+ };
197
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
198
+ }
199
+ });
189
200
  Object.setPrototypeOf(requestPrototype, Request.prototype);
190
201
  var newRequest = (incoming, defaultHostname) => {
191
202
  const req = Object.create(requestPrototype);
@@ -292,6 +303,17 @@ var Response2 = class _Response {
292
303
  }
293
304
  });
294
305
  });
306
+ Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
307
+ value: function(depth, options, inspectFn) {
308
+ const props = {
309
+ status: this.status,
310
+ headers: this.headers,
311
+ ok: this.ok,
312
+ nativeResponse: this[responseCache]
313
+ };
314
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
315
+ }
316
+ });
295
317
  Object.setPrototypeOf(Response2, GlobalResponse);
296
318
  Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
297
319
 
package/dist/server.mjs CHANGED
@@ -151,6 +151,17 @@ var requestPrototype = {
151
151
  }
152
152
  });
153
153
  });
154
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
155
+ value: function(depth, options, inspectFn) {
156
+ const props = {
157
+ method: this.method,
158
+ url: this.url,
159
+ headers: this.headers,
160
+ nativeRequest: this[requestCache]
161
+ };
162
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
163
+ }
164
+ });
154
165
  Object.setPrototypeOf(requestPrototype, Request.prototype);
155
166
  var newRequest = (incoming, defaultHostname) => {
156
167
  const req = Object.create(requestPrototype);
@@ -257,6 +268,17 @@ var Response2 = class _Response {
257
268
  }
258
269
  });
259
270
  });
271
+ Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
272
+ value: function(depth, options, inspectFn) {
273
+ const props = {
274
+ status: this.status,
275
+ headers: this.headers,
276
+ ok: this.ok,
277
+ nativeResponse: this[responseCache]
278
+ };
279
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
280
+ }
281
+ });
260
282
  Object.setPrototypeOf(Response2, GlobalResponse);
261
283
  Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
262
284
 
package/dist/vercel.js CHANGED
@@ -184,6 +184,17 @@ var requestPrototype = {
184
184
  }
185
185
  });
186
186
  });
187
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
188
+ value: function(depth, options, inspectFn) {
189
+ const props = {
190
+ method: this.method,
191
+ url: this.url,
192
+ headers: this.headers,
193
+ nativeRequest: this[requestCache]
194
+ };
195
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
196
+ }
197
+ });
187
198
  Object.setPrototypeOf(requestPrototype, Request.prototype);
188
199
  var newRequest = (incoming, defaultHostname) => {
189
200
  const req = Object.create(requestPrototype);
@@ -290,6 +301,17 @@ var Response2 = class _Response {
290
301
  }
291
302
  });
292
303
  });
304
+ Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
305
+ value: function(depth, options, inspectFn) {
306
+ const props = {
307
+ status: this.status,
308
+ headers: this.headers,
309
+ ok: this.ok,
310
+ nativeResponse: this[responseCache]
311
+ };
312
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
313
+ }
314
+ });
293
315
  Object.setPrototypeOf(Response2, GlobalResponse);
294
316
  Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
295
317
 
package/dist/vercel.mjs CHANGED
@@ -148,6 +148,17 @@ var requestPrototype = {
148
148
  }
149
149
  });
150
150
  });
151
+ Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
152
+ value: function(depth, options, inspectFn) {
153
+ const props = {
154
+ method: this.method,
155
+ url: this.url,
156
+ headers: this.headers,
157
+ nativeRequest: this[requestCache]
158
+ };
159
+ return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
160
+ }
161
+ });
151
162
  Object.setPrototypeOf(requestPrototype, Request.prototype);
152
163
  var newRequest = (incoming, defaultHostname) => {
153
164
  const req = Object.create(requestPrototype);
@@ -254,6 +265,17 @@ var Response2 = class _Response {
254
265
  }
255
266
  });
256
267
  });
268
+ Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
269
+ value: function(depth, options, inspectFn) {
270
+ const props = {
271
+ status: this.status,
272
+ headers: this.headers,
273
+ ok: this.ok,
274
+ nativeResponse: this[responseCache]
275
+ };
276
+ return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
277
+ }
278
+ });
257
279
  Object.setPrototypeOf(Response2, GlobalResponse);
258
280
  Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
259
281
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hono/node-server",
3
- "version": "1.19.12",
3
+ "version": "1.19.14",
4
4
  "description": "Node.js Adapter for Hono",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",