tezx 4.0.3 → 4.0.4

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
@@ -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.3";
8
+ exports.version = "4.0.4";
9
9
  exports.default = {
10
10
  Router: router_js_1.Router,
11
11
  TezX: server_js_1.TezX,
package/cookie/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Context } from "../core/context.js";
1
+ import { Context } from "../index.js";
2
2
  import { CookieOptions } from "../types/index.js";
3
3
  /**
4
4
  * Get the value of a specific cookie by name from the request context.
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.3";
4
+ export let version = "4.0.4";
5
5
  export default {
6
6
  Router,
7
7
  TezX,
@@ -1,4 +1,4 @@
1
- import { Context } from "../core/context.js";
1
+ import { Context } from "../index.js";
2
2
  import { HttpBaseResponse, Middleware } from "../types/index.js";
3
3
  /**
4
4
  * Options for Basic Authentication middleware.
@@ -1,4 +1,4 @@
1
- import { Context } from "../core/context.js";
1
+ import { Context } from "../index.js";
2
2
  import { HttpBaseResponse, Middleware } from "../types/index.js";
3
3
  /**
4
4
  * Options for Bearer Authentication middleware.
@@ -1,4 +1,4 @@
1
- import { Context } from "../core/context.js";
1
+ import { Context } from "../index.js";
2
2
  import { HttpBaseResponse, Middleware } from "../types/index.js";
3
3
  export interface CacheRule {
4
4
  /** 🎯 Condition to determine if this rule applies */
@@ -1,4 +1,4 @@
1
- import { Context } from "../core/context.js";
1
+ import { Context } from "../index.js";
2
2
  import { Middleware } from "../types/index.js";
3
3
  export type XSSProtectionOptions = {
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tezx",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
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",
package/types/index.d.ts CHANGED
@@ -115,7 +115,7 @@ export interface CookieOptions {
115
115
  /** Controls cross-site request behavior. One of "Strict", "Lax", or "None". */
116
116
  sameSite?: "Strict" | "Lax" | "None";
117
117
  }
118
- import { Context } from "../core/context.js";
118
+ import { BaseContext, Context } from "../index.js";
119
119
  import { RequestHeader, ResponseHeader } from "./headers.js";
120
120
  /**
121
121
  * Options to customize static file serving behavior.
@@ -236,7 +236,7 @@ export type HttpBaseResponse = Response | Promise<Response>;
236
236
  * @template T - Custom environment or app-level data.
237
237
  * @template Path - Type of the route path (optional).
238
238
  */
239
- export type Ctx<T extends Record<string, any> = {}, Path extends string = any> = Context<Path> & T & {
239
+ export type Ctx<T extends Record<string, any> = {}, Path extends string = any> = BaseContext<Path> & T & {
240
240
  [key: string]: any;
241
241
  /**
242
242
  * Response body, can be string, Buffer, stream, etc. like context propagation.
@@ -1,4 +1,4 @@
1
- import { Context } from "../core/context.js";
1
+ import { Context } from "../index.js";
2
2
  import { HttpBaseResponse, ResponseHeaders } from "../types/index.js";
3
3
  export declare let notFoundResponse: (ctx: Context) => HttpBaseResponse;
4
4
  export declare function mergeHeaders(existing?: Headers, init?: ResponseHeaders): Headers;