@@ -1,2 +0,1 @@ | ||
| import "../_chunks/_utils.mjs"; | ||
| import { r as wrapFetch, t as errorPlugin } from "../_chunks/_plugins.mjs"; | ||
@@ -3,0 +2,0 @@ //#region src/adapters/_aws/utils.ts |
@@ -1,2 +0,1 @@ | ||
| import "../_chunks/_utils.mjs"; | ||
| import { t as FastURL } from "../_chunks/_url.mjs"; | ||
@@ -3,0 +2,0 @@ import { a as resolveTLSOptions, i as resolvePortAndHost, n as fmtURL, r as printListening, t as createWaitUntil } from "../_chunks/_utils2.mjs"; |
@@ -1,2 +0,1 @@ | ||
| import "../_chunks/_utils.mjs"; | ||
| import { r as wrapFetch, t as errorPlugin } from "../_chunks/_plugins.mjs"; | ||
@@ -3,0 +2,0 @@ //#region src/adapters/bunny.ts |
@@ -1,2 +0,1 @@ | ||
| import "../_chunks/_utils.mjs"; | ||
| import { r as wrapFetch, t as errorPlugin } from "../_chunks/_plugins.mjs"; | ||
@@ -3,0 +2,0 @@ //#region src/adapters/cloudflare.ts |
@@ -1,2 +0,1 @@ | ||
| import "../_chunks/_utils.mjs"; | ||
| import { t as FastURL } from "../_chunks/_url.mjs"; | ||
@@ -3,0 +2,0 @@ import { a as resolveTLSOptions, i as resolvePortAndHost, n as fmtURL, r as printListening, t as createWaitUntil } from "../_chunks/_utils2.mjs"; |
@@ -1,2 +0,1 @@ | ||
| import "../_chunks/_utils.mjs"; | ||
| import { t as createWaitUntil } from "../_chunks/_utils2.mjs"; | ||
@@ -3,0 +2,0 @@ import { r as wrapFetch, t as errorPlugin } from "../_chunks/_plugins.mjs"; |
@@ -1,2 +0,1 @@ | ||
| import "../_chunks/_utils.mjs"; | ||
| import { n as lazyInherit, t as FastURL } from "../_chunks/_url.mjs"; | ||
@@ -759,2 +758,3 @@ import { a as resolveTLSOptions, i as resolvePortAndHost, n as fmtURL, r as printListening, t as createWaitUntil } from "../_chunks/_utils2.mjs"; | ||
| #listeningPromise; | ||
| #listenError; | ||
| #wait; | ||
@@ -813,12 +813,26 @@ constructor(options) { | ||
| this.node.server = server; | ||
| if (!options.manual) this.serve(); | ||
| if (!options.manual) this.serve().catch(() => {}); | ||
| } | ||
| serve() { | ||
| if (this.#listeningPromise) return Promise.resolve(this.#listeningPromise).then(() => this); | ||
| this.#listeningPromise = new Promise((resolve) => { | ||
| this.node.server.listen(this.serveOptions, () => { | ||
| if (this.#listeningPromise) return this.#listeningPromise.then(() => this); | ||
| const server = this.node?.server; | ||
| if (!server) return Promise.reject(/* @__PURE__ */ new Error("Server not initialized")); | ||
| this.#listenError = void 0; | ||
| this.#listeningPromise = new Promise((resolve, reject) => { | ||
| const onError = (error) => { | ||
| server.off("listening", onListening); | ||
| this.#listenError = error; | ||
| this.#listeningPromise = void 0; | ||
| reject(error); | ||
| }; | ||
| const onListening = () => { | ||
| server.off("error", onError); | ||
| printListening(this.options, this.url); | ||
| resolve(); | ||
| }); | ||
| }; | ||
| server.once("error", onError); | ||
| server.once("listening", onListening); | ||
| server.listen(this.serveOptions); | ||
| }); | ||
| return this.#listeningPromise.then(() => this); | ||
| } | ||
@@ -831,2 +845,3 @@ get url() { | ||
| ready() { | ||
| if (this.#listenError) return Promise.reject(this.#listenError); | ||
| return Promise.resolve(this.#listeningPromise).then(() => this); | ||
@@ -833,0 +848,0 @@ } |
@@ -1,2 +0,1 @@ | ||
| import "../_chunks/_utils.mjs"; | ||
| import { r as wrapFetch, t as errorPlugin } from "../_chunks/_plugins.mjs"; | ||
@@ -3,0 +2,0 @@ //#region src/adapters/service-worker.ts |
+1
-1
@@ -187,3 +187,3 @@ import { a as green, c as url, i as gray, l as yellow, n as bold, o as magenta, r as cyan, s as red } from "./_chunks/_utils.mjs"; | ||
| name: "srvx", | ||
| version: "0.11.13", | ||
| version: "0.11.14", | ||
| description: "Universal Server." | ||
@@ -190,0 +190,0 @@ }; |
+12
-12
| { | ||
| "name": "srvx", | ||
| "version": "0.11.13", | ||
| "version": "0.11.14", | ||
| "description": "Universal Server.", | ||
@@ -62,4 +62,4 @@ "homepage": "https://srvx.h3.dev", | ||
| "devDependencies": { | ||
| "@cloudflare/workers-types": "^4.20260317.1", | ||
| "@hono/node-server": "^2.0.0-rc.1", | ||
| "@cloudflare/workers-types": "^4.20260401.1", | ||
| "@hono/node-server": "^1.19.12", | ||
| "@mitata/counters": "^0.0.8", | ||
@@ -74,4 +74,4 @@ "@mjackson/node-fetch-server": "^0.7.0", | ||
| "@types/serviceworker": "^0.0.194", | ||
| "@typescript/native-preview": "^7.0.0-dev.20260323.1", | ||
| "@vitest/coverage-v8": "^4.1.1", | ||
| "@typescript/native-preview": "^7.0.0-dev.20260401.1", | ||
| "@vitest/coverage-v8": "^4.1.2", | ||
| "@whatwg-node/server": "^0.10.18", | ||
@@ -87,11 +87,11 @@ "automd": "^0.4.3", | ||
| "mitata": "^1.0.34", | ||
| "node-forge": "^1.3.3", | ||
| "node-forge": "^1.4.0", | ||
| "obuild": "^0.4.32", | ||
| "oxfmt": "^0.41.0", | ||
| "oxlint": "^1.56.0", | ||
| "srvx-release": "npm:srvx@^0.11.12", | ||
| "oxfmt": "^0.43.0", | ||
| "oxlint": "^1.58.0", | ||
| "srvx-release": "npm:srvx@^0.11.13", | ||
| "tslib": "^2.8.1", | ||
| "typescript": "^6.0.2", | ||
| "undici": "^7.24.5", | ||
| "vitest": "^4.1.1" | ||
| "undici": "^7.24.7", | ||
| "vitest": "^4.1.2" | ||
| }, | ||
@@ -104,3 +104,3 @@ "resolutions": { | ||
| }, | ||
| "packageManager": "pnpm@10.32.1" | ||
| "packageManager": "pnpm@10.33.0" | ||
| } |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
116950
0.28%2591
0.31%