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.
- package/dist/adapters/bunny.mjs +5 -6
- package/dist/cli.mjs +1 -1
- package/package.json +1 -1
package/dist/adapters/bunny.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
52
|
-
|
|
50
|
+
close() {
|
|
51
|
+
return Promise.resolve();
|
|
53
52
|
}
|
|
54
53
|
};
|
|
55
54
|
export { FastResponse, FastURL, serve };
|
package/dist/cli.mjs
CHANGED