srvx 0.11.5 → 0.11.6

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.
@@ -1,4 +1,3 @@
1
- import { t as createWaitUntil } from "../_chunks/_utils2.mjs";
2
1
  import { r as wrapFetch, t as errorPlugin } from "../_chunks/_plugins.mjs";
3
2
  const FastURL = URL;
4
3
  const FastResponse = Response;
@@ -10,7 +9,7 @@ var BunnyServer = class {
10
9
  options;
11
10
  fetch;
12
11
  _started = false;
13
- #wait;
12
+ waitUntil;
14
13
  constructor(options) {
15
14
  this.options = {
16
15
  ...options,
@@ -19,14 +18,14 @@ var BunnyServer = class {
19
18
  for (const plugin of options.plugins || []) plugin(this);
20
19
  errorPlugin(this);
21
20
  const fetchHandler = wrapFetch(this);
22
- this.#wait = createWaitUntil();
21
+ const waitUntil = this.waitUntil = (p) => Bunny.unstable?.waitUntil?.(p);
23
22
  this.fetch = (request) => {
24
23
  Object.defineProperties(request, {
25
- waitUntil: { value: this.#wait?.waitUntil },
26
24
  runtime: {
27
25
  enumerable: true,
28
26
  value: { name: "bunny" }
29
27
  },
28
+ waitUntil: { value: waitUntil },
30
29
  ip: {
31
30
  enumerable: true,
32
31
  get() {
@@ -48,8 +47,8 @@ var BunnyServer = class {
48
47
  ready() {
49
48
  return Promise.resolve(this);
50
49
  }
51
- async close() {
52
- await this.#wait?.wait();
50
+ close() {
51
+ return Promise.resolve();
53
52
  }
54
53
  };
55
54
  export { FastResponse, FastURL, serve };
package/dist/cli.mjs CHANGED
@@ -174,7 +174,7 @@ function getResponseFormat(res) {
174
174
  }
175
175
  const srvxMeta = {
176
176
  name: "srvx",
177
- version: "0.11.5",
177
+ version: "0.11.6",
178
178
  description: "Universal Server."
179
179
  };
180
180
  function usage(mainOpts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "srvx",
3
- "version": "0.11.5",
3
+ "version": "0.11.6",
4
4
  "description": "Universal Server.",
5
5
  "homepage": "https://srvx.h3.dev",
6
6
  "license": "MIT",