tezx 4.0.9 → 4.0.11

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/README.md CHANGED
@@ -46,14 +46,6 @@ app.use(logger());
46
46
  // Static files
47
47
  app.static(serveStatic("/", "./static"));
48
48
 
49
- // Route
50
- app.get("/", (ctx) =>
51
- ctx.html(`
52
- <h1>Welcome to TezX</h1>
53
- <p>High-performance JavaScript framework optimized for Bun.</p>
54
- `)
55
- );
56
-
57
49
  // Server
58
50
  const port = Number(process.env.PORT) || 3001;
59
51
 
@@ -111,7 +103,6 @@ http://localhost:3001/assets/your-file.ext
111
103
  ## 🧭 Routing
112
104
 
113
105
  ```ts
114
- app.get("/about", (ctx) => ctx.html("<h1>About TezX</h1>"));
115
106
 
116
107
  app.post("/contact", async (ctx) => {
117
108
  const body = await ctx.json();
package/cjs/index.js CHANGED
@@ -5,7 +5,7 @@ const router_js_1 = require("./core/router.js");
5
5
  Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return router_js_1.Router; } });
6
6
  const server_js_1 = require("./core/server.js");
7
7
  Object.defineProperty(exports, "TezX", { enumerable: true, get: function () { return server_js_1.TezX; } });
8
- exports.version = "4.0.9";
8
+ exports.version = "4.0.11";
9
9
  exports.default = {
10
10
  Router: router_js_1.Router,
11
11
  TezX: server_js_1.TezX,
package/core/context.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ExtractParamsFromPath, HttpBaseResponse, ResHeaderKey, ResponseInit, WebSocketEvent } from "../types/index.js";
1
+ import { ExtractParamsFromPath, HttpBaseResponse, ResHeaderKey, ResponseInit } from "../types/index.js";
2
2
  import { ContentType } from "../utils/mimeTypes.js";
3
3
  import { TezXRequest } from "./request.js";
4
4
  export declare class Context<TPath extends string = any> {
@@ -49,7 +49,7 @@ export declare class Context<TPath extends string = any> {
49
49
  * @type {string}
50
50
  */
51
51
  readonly method: string;
52
- constructor(req: Request, pathname: string, method: string, server: Bun.Server<WebSocketEvent>);
52
+ constructor(req: Request, pathname: string, method: string, server: any);
53
53
  /**
54
54
  * Access the response headers.
55
55
  *
@@ -243,5 +243,5 @@ export declare class Context<TPath extends string = any> {
243
243
  * @public
244
244
  * @returns {Bun.Server} The active Bun server instance.
245
245
  */
246
- get server(): Bun.Server<WebSocketEvent>;
246
+ get server(): any;
247
247
  }
package/core/router.d.ts CHANGED
@@ -120,11 +120,6 @@ export declare class Router<T extends Record<string, any> = {}> {
120
120
  options<U extends Record<string, any> = {}, Path extends string = any>(path: Path, callback: Callback<T & U, Path>): this;
121
121
  options<U extends Record<string, any> = {}, Path extends string = any>(path: Path, middleware: Middleware<T & U, Path>, callback: Callback<T & U, Path>): this;
122
122
  options<U extends Record<string, any> = {}, Path extends string = any>(path: Path, middlewares: Middleware<T & U, Path>[], callback: Callback<T & U, Path>): this;
123
- /**
124
- * Registers a HEAD route (returns headers only)
125
- * @param path - URL path pattern
126
- * @param args - Handler callback or middleware(s) + handler
127
- */
128
123
  /**
129
124
  * Register a route that responds to all HTTP methods.
130
125
  *
package/core/server.d.ts CHANGED
@@ -69,5 +69,5 @@ export declare class TezX<T extends Record<string, any> = {}> extends Router<T>
69
69
  * fetch: (req) => app.serve(req, server),
70
70
  * });
71
71
  */
72
- serve(req: Request, server: Bun.Server<any>): Promise<Response>;
72
+ serve(req: Request, server: any): Promise<Response>;
73
73
  }
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Router } from "./core/router.js";
2
2
  import { TezX } from "./core/server.js";
3
3
  export { Router, TezX };
4
- export let version = "4.0.9";
4
+ export let version = "4.0.11";
5
5
  export default {
6
6
  Router,
7
7
  TezX,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tezx",
3
- "version": "4.0.9",
3
+ "version": "4.0.11",
4
4
  "description": "TezX is a modern, ultra-lightweight, and high-performance JavaScript framework built specifically for Bun. It provides a minimal yet powerful API, seamless environment management, and a high-concurrency HTTP engine for building fast, scalable web applications.",
5
5
  "type": "module",
6
6
  "main": "cjs/index.js",
@@ -104,4 +104,4 @@
104
104
  ],
105
105
  "author": "SRAKIB17",
106
106
  "license": "MIT"
107
- }
107
+ }