{"name":"srvx","version":"0.12.5","license":"MIT","_id":"srvx@0.12.5","maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"homepage":"https://srvx.h3.dev","bugs":{"url":"https://github.com/h3js/srvx/issues"},"bin":{"srvx":"bin/srvx.mjs"},"dist":{"shasum":"917280d1d52b7f9e841e3252f733935a7522e0f6","tarball":"http://registry-npm.ywwl.com/srvx/download/srvx-0.12.5.tgz","fileCount":43,"integrity":"sha512-IuvtDNQg5EIwv3c6dleyau7u8hCyGQ7D6+V/QM799Aud07z0wCUcurKLTRfyG33C8oUY+UWcVBFkfHMcbtmRLA==","signatures":[{"sig":"MEYCIQDrbEzl/fpTYtMEoDNUhx8W8zHxaftMIF/WFwUpkEMl/QIhAPlMiiKLDY6yBaWnvzb2/QCMUzjNr+7wPbLx37BVUkgg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQC0nT4qVm2N2Lpo7Rat7LcLKFsVBPuEXNg62p2t+pVC+QIgQTRm9BLN+VPAt6HQzxOr5FNA+WZsvZPFIyhH9t6ZXEc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":174957,"size":49177,"noattachment":false,"key":"/srvx/-/srvx-0.12.5.tgz"},"type":"module","types":"./dist/types.d.mts","engines":{"node":">=20.16.0"},"exports":{".":{"bun":"./dist/adapters/bun.mjs","deno":"./dist/adapters/deno.mjs","node":"./dist/adapters/node.mjs","types":"./dist/types.d.mts","browser":"./dist/adapters/service-worker.mjs","default":"./dist/adapters/generic.mjs","workerd":"./dist/adapters/cloudflare.mjs"},"./bun":"./dist/adapters/bun.mjs","./cli":"./dist/cli.mjs","./log":"./dist/log.mjs","./deno":"./dist/adapters/deno.mjs","./mtls":"./dist/mtls.mjs","./node":"./dist/adapters/node.mjs","./bunny":"./dist/adapters/bunny.mjs","./loader":"./dist/loader.mjs","./static":"./dist/static.mjs","./generic":"./dist/adapters/generic.mjs","./tracing":"./dist/tracing.mjs","./aws-lambda":"./dist/adapters/aws-lambda.mjs","./body-limit":"./dist/body-limit.mjs","./cloudflare":"./dist/adapters/cloudflare.mjs","./service-worker":"./dist/adapters/service-worker.mjs"},"scripts":{"dev":"vitest dev","lint":"oxlint . && oxfmt --check .","srvx":"./bin/srvx.mjs","test":"pnpm lint && pnpm typecheck && vitest run --coverage","build":"obuild","vitest":"vitest","prepack":"pnpm build","release":"pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags","lint:fix":"automd && oxlint . --fix && oxfmt .","typecheck":"tsc --noEmit --skipLibCheck","bench:node":"node test/bench-node/_run.mjs","play:mkcert":"openssl req -x509 -newkey rsa:2048 -nodes -keyout server.key -out server.crt -days 365 -subj /CN=srvx.local","bench:url:bun":"bun run ./test/url.bench.ts","bench:url:deno":"deno run -A ./test/url.bench.ts","bench:url:node":"pnpm --expose-gc --allow-natives-syntax node ./test/url.bench.ts","test:node-compat:bun":"bun vitest test/node.test.ts","test:node-compat:deno":"deno run vitest test/node.test","test:node-adapters:bun":"bun vitest test/node-adapters.test.ts","test:node-adapters:deno":"deno run vitest test/node-adapters.test"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"repository":{"url":"git+https://github.com/h3js/srvx.git","type":"git"},"_npmVersion":"11.16.0","description":"Universal Server.","directories":{},"resolutions":{"srvx":"link:."},"sideEffects":false,"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"packageManager":"pnpm@11.11.0","devDependencies":{"execa":"^9.6.1","mdbox":"^0.1.1","oxfmt":">=0.58.0","tslib":"^2.8.1","automd":"^0.4.3","mitata":"^1.0.34","obuild":"^0.4.38","oxlint":"^1.73.0","undici":"8.4.0","vitest":"^4.1.10","express":"^5.2.1","fastify":"^5.10.0","@types/bun":"^1.3.14","node-forge":"^1.4.0","typescript":"^7.0.2","@types/deno":"^2.7.0","@types/node":"^26.1.1","changelogen":"^0.6.2","srvx-release":"npm:srvx@^0.11.21","@types/express":"^5.0.6","get-port-please":"^3.2.0","@mitata/counters":"^0.0.8","@hono/node-server":"^2.0.10","@types/aws-lambda":"^8.10.162","@types/node-forge":"^1.3.14","eslint-config-unjs":"^0.6.2","@vitest/coverage-v8":"^4.1.10","@whatwg-node/server":"^0.11.0","@types/serviceworker":"^0.0.199","@cloudflare/workers-types":"^5","@mjackson/node-fetch-server":"^0.7.0"},"_npmOperationalInternal":{"tmp":"tmp/srvx_0.12.5_1785395874998_0.04046785717804391","host":"s3://npm-registry-packages-npm-production"},"readme":"# λ srvx\n\n<!-- automd:badges color=yellow packagephobia -->\n\n[![npm version](https://img.shields.io/npm/v/srvx?color=yellow)](https://npmjs.com/package/srvx)\n[![npm downloads](https://img.shields.io/npm/dm/srvx?color=yellow)](https://npm.chart.dev/srvx)\n[![install size](https://badgen.net/packagephobia/install/srvx?color=yellow)](https://packagephobia.com/result?p=srvx)\n\n<!-- /automd -->\n\nUniversal Server based on web standards. Works with [Deno](https://deno.com/), [Bun](https://bun.sh/) and [Node.js](https://nodejs.org/en).\n\n- ✅ Zero dependency\n- ✅ Full featured CLI with watcher, error handler, serve static and logger\n- ✅ Seamless runtime integration with same API ([handler](https://srvx.h3.dev/guide/handler) and [instance](https://srvx.h3.dev/guide/server)).\n- ✅ [Node.js compatibility](https://srvx.h3.dev/guide/node) with a [**close to native performance**](https://github.com/h3js/srvx/tree/main/test/bench-node).\n- ✅ Zero overhead [Deno](https://deno.com/) and [Bun](https://bun.sh/) support.\n\n## Quick start\n\n```js\nexport default {\n  fetch(req: Request) {\n    return Response.json({ hello: \"world!\" });\n  },\n};\n```\n\nThen, run the server using your favorite runtime:\n\n```bash\n# Node.js\n$ npx srvx       # npm\n$ pnpx srvx      # pnpm\n$ yarn dlx srvx  # yarn\n\n# Deno\n$ deno -A npm:srvx\n\n# Bun\n$ bunx --bun srvx\n```\n\nYou can also use `srvx fetch` to directly call your server handler without starting a server:\n\n```bash\n$ npx srvx fetch /api/users\n```\n\nSee [CLI documentation](https://srvx.h3.dev/guide/cli) for more options.\n\n👉 **Visit the 📖 [Documentation](https://srvx.h3.dev/) to learn more.**\n\n## Contribution\n\n- Clone this repository\n- Install the latest LTS version of [Node.js](https://nodejs.org/en/)\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- **Prepare stub mode using `pnpm build --stub`**\n- Run interactive tests using `pnpm dev`\n\n## License\n\n<!-- automd:contributors author=pi0 license=MIT -->\n\nPublished under the [MIT](https://github.com/h3js/srvx/blob/main/LICENSE) license.\nMade by [@pi0](https://github.com/pi0) and [community](https://github.com/h3js/srvx/graphs/contributors) 💛\n<br><br>\n<a href=\"https://github.com/h3js/srvx/graphs/contributors\">\n<img src=\"https://contrib.rocks/image?repo=h3js/srvx\" />\n</a>\n\n<!-- /automd -->\n\n<!-- automd:with-automd -->\n\n---\n\n_🤖 auto updated with [automd](https://automd.unjs.io)_\n\n<!-- /automd -->\n","publish_time":1785395875086,"_cnpm_publish_time":1785395875086,"dist-tags":{"latest":"1.0.8"}}