srvx 0.8.3 → 0.8.5

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,6 +1,6 @@
1
1
  //#region package.json
2
2
  var name = "srvx";
3
- var version = "0.8.3";
3
+ var version = "0.8.5";
4
4
  var description = "Universal Server API based on web platform standards. Works seamlessly with Deno, Bun and Node.js.";
5
5
  var homepage = "https://srvx.h3.dev";
6
6
  var repository = "h3js/srvx";
package/dist/cli.mjs CHANGED
@@ -43,6 +43,10 @@ async function main(mainOpts) {
43
43
  const isNode = !isBun && !isDeno;
44
44
  const runtimeArgs = ["--watch"];
45
45
  if (isNode || isDeno) runtimeArgs.push(...[".env", ".env.local"].filter((f) => existsSync(f)).map((f) => `--env-file=${f}`));
46
+ if (isNode) {
47
+ const [major, minor] = process.versions.node.split(".");
48
+ if (major === "22" && +minor >= 6) runtimeArgs.push("--experimental-strip-types");
49
+ }
46
50
  const child = fork(fileURLToPath(import.meta.url), args, { execArgv: [...process.execArgv, ...runtimeArgs].filter(Boolean) });
47
51
  child.on("error", (error) => {
48
52
  console.error("Error in child process:", error);
@@ -115,7 +119,7 @@ async function loadEntry(opts) {
115
119
  ...opts
116
120
  };
117
121
  } catch (error) {
118
- console.error(Colors.red(`${Colors.bold(opts._entry)}`));
122
+ if (error?.code === "ERR_UNKNOWN_FILE_EXTENSION") console.error(Colors.red(`\n\nMake sure you're using Node.js v22.18+ or v24+ for TypeScript support (current version: ${process.versions.node})\n\n`));
119
123
  if (error instanceof Error) Error.captureStackTrace?.(error, serve);
120
124
  throw error;
121
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "srvx",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "Universal Server API based on web platform standards. Works seamlessly with Deno, Bun and Node.js.",
5
5
  "homepage": "https://srvx.h3.dev",
6
6
  "repository": "h3js/srvx",