tezx 2.0.7-beta → 2.0.8

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  **TezX** is a cutting-edge, high-performance, and lightweight JavaScript framework designed for speed, scalability, and flexibility. Built with modern web development needs in mind, TezX enables efficient routing, middleware management, and static file serving with minimal configuration. It is fully compatible with **Node.js, Deno, and Bun**, making it a truly cross-environment framework.
4
4
 
5
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/tezxjs/TezX)
6
+
5
7
  ---
6
8
 
7
9
  ## 🚀 Key Features
@@ -230,6 +230,9 @@ class Router extends MiddlewareConfigure_js_1.default {
230
230
  }
231
231
  #addRoute(method, path, callback, middlewares) {
232
232
  let finalMiddleware = middlewares;
233
+ if (!config_js_1.GlobalConfig.allowDuplicateMw) {
234
+ finalMiddleware = new Set(middlewares);
235
+ }
233
236
  if (path instanceof RegExp) {
234
237
  let regex = (0, regexRouter_js_1.addBaseToRegex)(this.basePath, path);
235
238
  let regexPath = `regex://${regex?.source}`;
@@ -254,9 +257,6 @@ class Router extends MiddlewareConfigure_js_1.default {
254
257
  });
255
258
  }
256
259
  const parts = (0, url_js_1.sanitizePathSplit)(this.basePath, path);
257
- if (!config_js_1.GlobalConfig.allowDuplicateMw) {
258
- finalMiddleware = new Set(middlewares);
259
- }
260
260
  let p = parts.join("/");
261
261
  if (url_js_1.wildcardOrOptionalParamRegex.test(`/${p}`)) {
262
262
  let strPath = `string://${p}`;
package/cjs/index.js CHANGED
@@ -10,7 +10,7 @@ var router_js_2 = require("./core/router.js");
10
10
  Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return router_js_2.Router; } });
11
11
  var server_js_2 = require("./core/server.js");
12
12
  Object.defineProperty(exports, "TezX", { enumerable: true, get: function () { return server_js_2.TezX; } });
13
- exports.version = "2.0.7-beta";
13
+ exports.version = "2.0.8";
14
14
  exports.default = {
15
15
  Router: router_js_1.Router,
16
16
  regexMatchRoute: regexRouter_js_1.regexMatchRoute, compileRegexRoute: regexRouter_js_1.compileRegexRoute,
package/core/router.js CHANGED
@@ -193,6 +193,9 @@ export class Router extends MiddlewareConfigure {
193
193
  }
194
194
  #addRoute(method, path, callback, middlewares) {
195
195
  let finalMiddleware = middlewares;
196
+ if (!GlobalConfig.allowDuplicateMw) {
197
+ finalMiddleware = new Set(middlewares);
198
+ }
196
199
  if (path instanceof RegExp) {
197
200
  let regex = addBaseToRegex(this.basePath, path);
198
201
  let regexPath = `regex://${regex?.source}`;
@@ -217,9 +220,6 @@ export class Router extends MiddlewareConfigure {
217
220
  });
218
221
  }
219
222
  const parts = sanitizePathSplit(this.basePath, path);
220
- if (!GlobalConfig.allowDuplicateMw) {
221
- finalMiddleware = new Set(middlewares);
222
- }
223
223
  let p = parts.join("/");
224
224
  if (wildcardOrOptionalParamRegex.test(`/${p}`)) {
225
225
  let strPath = `string://${p}`;
package/index.js CHANGED
@@ -4,7 +4,7 @@ import { regexMatchRoute, compileRegexRoute } from "./utils/regexRouter.js";
4
4
  export { Router } from "./core/router.js";
5
5
  export { TezX } from "./core/server.js";
6
6
  export { regexMatchRoute, compileRegexRoute };
7
- export let version = "2.0.7-beta";
7
+ export let version = "2.0.8";
8
8
  export default {
9
9
  Router,
10
10
  regexMatchRoute, compileRegexRoute,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tezx",
3
- "version": "2.0.7-beta",
3
+ "version": "2.0.8",
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",