Skip to content

Releases: h3js/srvx

v0.11.7

18 Feb 20:38
@pi0 pi0

Choose a tag to compare

compare changes

🚀 Enhancements

  • loader: Access to the whole intercepted srvx instance (bbf4d9d)
  • loader: Allow passing custom node server to inspector (4a817ec)

💅 Refactors

  • cli, loader: Pass underlying server without depending on globals (c0d9520)

v0.11.6

18 Feb 18:07
@pi0 pi0

Choose a tag to compare

compare changes

🚀 Enhancements

  • bunny: Add support for native waitUntil (#186)

❤️ Contributors

v0.11.5

17 Feb 09:15
@pi0 pi0

Choose a tag to compare

compare changes

🚀 Enhancements

  • Expose server.waitUntil (#183)
  • Add bunny adapter (#182)

❤️ Contributors

v0.11.4

11 Feb 10:58
@pi0 pi0

Choose a tag to compare

compare changes

🚀 Enhancements

  • loader: Intercept nested srvx.serve() (#181)

v0.11.3

10 Feb 15:22
@pi0 pi0

Choose a tag to compare

compare changes

🩹 Fixes

  • Avoid process.exit after graceful server close (#179)
  • node: Normalize pipeable bodies in FastResponse when cloning (#177)

❤️ Contributors

v0.11.2

05 Feb 23:15
@pi0 pi0

Choose a tag to compare

compare changes

💅 Refactors

  • tracing: Rename tracing channel h3.fetch to h3.request (#176)

❤️ Contributors

v0.11.1

05 Feb 18:16
@pi0 pi0

Choose a tag to compare

compare changes

🚀 Enhancements

  • cli: Allow overriding meta (0cad0a7)

🩹 Fixes

  • cli: Enable graceful shutdown only for prod (e57ada8)
  • cli: Log versions in main process (674ca46)

💅 Refactors

  • Improve graceful shutdown behavior (54e7074)
  • cli: Improve serve mode (92a06a5)
  • cli: Bundle srvx meta (7420599)

v0.11.0

04 Feb 14:07
@pi0 pi0

Choose a tag to compare

⭐ Highlights

srvx fetch|curl

srvx CLI can now fetch ANY server handler (even express!) without listening on a port.

$ npx srvx curl -v /
image

srvx automatically searches for server entry (server.ts|js) and loads it. If it is a Node.js server, HTTP listener will be automatically mocked and handler will be converted to Web format. Both input and output streams are streamed to and from the console.

You can also fetch any external URL with the new CLI. It will add Accept: text/markdown header by default to allow better content negotiation in CLI, suitable for coding agents. (example: npx srvx curl v3.nitro.build/docs/quick-start)

Tip

Use npx srvx --help or check cli docs for more info.

Improved CLI Behavior

CLI implementation has been rewritten with backwards compatibility.

You can use new srvx serve [--dir] [--entry] syntax to specify server directory and entry.

Programmatic Loader

We have extracted CLI loader functionality to srvx/loader, you can load ANY server entry with same CLI DX and manually .fetch it!

You can also use cliFetch and main from srvx/cli to make a fully customized and branded CLI with same features and DX that srvx has!

AWS Lambda Handler

Srvx now has full support for AWS Lambda Handlers (API Gateway v1 and v2) with optional streaming support.

You can convert a fetchable handler (like H3 or Hono) to AWS Lambda Handler or invoke an AWS Lambda Handler using standard Request and Response (useful for testing).

Check out the docs for more info: https://srvx.h3.dev/guide/aws-lambda

This feature has been backported from Nitro v3 (❤️ thanks to @OskarLebuda).

Changelog

compare all changes

🚀 Enhancements

🩹 Fixes

  • loader: Safer search path for default server entry (8933e6b)
  • loader: Mock server.address() in programmatic mode (c9bb7c6)
  • cli: Enable gracefulShutdown only in production mode (85cce89)
  • cli: Throw error when no static dir and entry exist (eaa99aa)
  • cli: Fixed path to CLI entry (6ad9563)
  • cli: Remove hardcoded srvx command from usage (3b224b8)
  • Add missing runtime types (5bcec0d)

💅 Refactors

  • ⚠️ Rewrite CLI (#175)

❤️ Contributors

v0.10.1

19 Jan 15:37
@pi0 pi0

Choose a tag to compare

compare changes

🚀 Enhancements

  • Support force close with double Control+C (#163)

🩹 Fixes

  • node: Call request abort controller only on close (#161)
  • node: Handle multiple close calls (#164)
  • Handle non-parsable URLs in printListening (#165)

🏡 Chore

  • Swtich to tsgo (#159)

✅ Tests

  • Use vitest for bun (#162)

❤️ Contributors

v0.10.0

30 Dec 13:32
@pi0 pi0

Choose a tag to compare

compare changes

Important

This release updates the Node.js adapter to avoid doing any global patches by default.

As a result, in some use-cases like new Request(req), you might see an error like Cannot read private member #state....

You can explicitly opt-in to previous behavior like this:

import { patchGlobalRequest } from "srvx/node";

// Fix compatibility issues with Node.js Request
patchGlobalRequest();

Please refer to the docs for more info.

🩹 Fixes

  • types: Split HTTP1 and HTTP2 handler types (#154)
  • node: Avoid patching global request by default (#155)

❤️ Contributors