tezx 1.0.39 → 1.0.40

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/cjs/index.js CHANGED
@@ -7,4 +7,4 @@ var server_1 = require("./core/server");
7
7
  Object.defineProperty(exports, "TezX", { enumerable: true, get: function () { return server_1.TezX; } });
8
8
  var params_1 = require("./utils/params");
9
9
  Object.defineProperty(exports, "useParams", { enumerable: true, get: function () { return params_1.useParams; } });
10
- exports.version = "1.0.39";
10
+ exports.version = "1.0.40";
package/core/router.d.ts CHANGED
@@ -3,9 +3,8 @@ import MiddlewareConfigure, { DuplicateMiddlewares, UniqueMiddlewares } from "./
3
3
  import { HTTPMethod } from "./request";
4
4
  export type NextCallback = () => Promise<any>;
5
5
  export type ctx<T extends Record<string, any> = {}> = Context<T> & T;
6
- export type CallbackReturnType = Promise<Response> | Response | string | Record<string, any>;
7
- export type Callback<T extends Record<string, any> = {}> = (ctx: ctx<T>) => CallbackReturnType;
8
- export type Middleware<T extends Record<string, any> = {}> = (ctx: ctx<T>, next: NextCallback) => NextCallback | Promise<NextCallback | Response> | Response | string | Record<string, any>;
6
+ export type Callback<T extends Record<string, any> = {}> = (ctx: ctx<T>) => Promise<Response> | Response | string | Record<string, any> | void;
7
+ export type Middleware<T extends Record<string, any> = {}> = (ctx: ctx<T>, next: NextCallback) => NextCallback | Promise<NextCallback | Response> | Response | string | Record<string, any> | void;
9
8
  export type RouterConfig = {
10
9
  /**
11
10
  * `env` allows you to define environment variables for the router.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Router } from "./core/router";
2
2
  export { TezX } from "./core/server";
3
3
  export { useParams } from "./utils/params";
4
- export let version = "1.0.39";
4
+ export let version = "1.0.40";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tezx",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "TezX is a high-performance, lightweight JavaScript framework designed for speed, scalability, and flexibility. It enables efficient routing, middleware management, and static file serving with minimal configuration. Fully compatible with Node.js, Deno, and Bun.",
5
5
  "main": "cjs/index.js",
6
6
  "module": "index.js",