srvx 0.8.12 → 0.8.13

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.
@@ -20,7 +20,9 @@ type URLInit = {
20
20
  * - Changes to `searchParams` will be discarded as we don't track them.
21
21
  */
22
22
  declare const FastURL: {
23
- new (url: string | URLInit): URL;
23
+ new (url: string | URLInit): URL & {
24
+ _url: URL;
25
+ };
24
26
  };
25
27
  //#endregion
26
28
  export { FastURL as FastURL$2 };
@@ -1,5 +1,5 @@
1
1
  import { BunFetchHandler, Server, ServerOptions } from "../_chunks/types-hx5EhU1U.mjs";
2
- import { FastURL$2 as FastURL } from "../_chunks/_url-BQeTFJZ1.mjs";
2
+ import { FastURL$2 as FastURL } from "../_chunks/_url-D-jAQyRZ.mjs";
3
3
  import * as bun from "bun";
4
4
 
5
5
  //#region src/adapters/bun.d.ts
@@ -1,5 +1,5 @@
1
1
  import { DenoFetchHandler, Server, ServerOptions } from "../_chunks/types-hx5EhU1U.mjs";
2
- import { FastURL$2 as FastURL } from "../_chunks/_url-BQeTFJZ1.mjs";
2
+ import { FastURL$2 as FastURL } from "../_chunks/_url-D-jAQyRZ.mjs";
3
3
 
4
4
  //#region src/adapters/deno.d.ts
5
5
  declare const FastResponse: typeof globalThis.Response;
@@ -1,5 +1,5 @@
1
1
  import { FetchHandler, NodeHttpHandler, NodeServerRequest, NodeServerResponse, Server, ServerOptions, ServerRequest } from "../_chunks/types-hx5EhU1U.mjs";
2
- import { FastURL$2 as FastURL } from "../_chunks/_url-BQeTFJZ1.mjs";
2
+ import { FastURL$2 as FastURL } from "../_chunks/_url-D-jAQyRZ.mjs";
3
3
  import NodeHttp from "node:http";
4
4
  import { Readable } from "node:stream";
5
5
 
@@ -69,6 +69,7 @@ function streamBody(stream, nodeRes) {
69
69
  //#endregion
70
70
  //#region src/adapters/_node/url.ts
71
71
  var NodeRequestURL = class extends FastURL {
72
+ #req;
72
73
  constructor({ req }) {
73
74
  const path = req.url || "/";
74
75
  if (path[0] === "/") {
@@ -84,6 +85,14 @@ var NodeRequestURL = class extends FastURL {
84
85
  search
85
86
  });
86
87
  } else super(path);
88
+ this.#req = req;
89
+ }
90
+ get pathname() {
91
+ return super.pathname;
92
+ }
93
+ set pathname(value) {
94
+ this._url.pathname = value;
95
+ this.#req.url = this._url.pathname + this._url.search;
87
96
  }
88
97
  };
89
98
 
package/dist/cli.mjs CHANGED
@@ -233,7 +233,7 @@ async function interceptListen(cb) {
233
233
  };
234
234
  }
235
235
  async function version() {
236
- const version$1 = "0.8.12";
236
+ const version$1 = "0.8.13";
237
237
  return `srvx ${version$1}\n${runtime()}`;
238
238
  }
239
239
  function runtime() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "srvx",
3
- "version": "0.8.12",
3
+ "version": "0.8.13",
4
4
  "description": "Universal Server API based on web platform standards. Works seamlessly with Deno, Bun and Node.js.",
5
5
  "homepage": "https://srvx.h3.dev",
6
6
  "repository": "h3js/srvx",