tezx 1.0.13 → 1.0.14

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
@@ -47,7 +47,8 @@ Create a simple TezX server:
47
47
  import { nodeAdapter, TezX } from "tezx";
48
48
  import { logger } from "tezx/middleware";
49
49
 
50
- const app = new TezX({ logger });
50
+ const app = new TezX();
51
+ app.use(logger())
51
52
 
52
53
  app.static("/", "./static");
53
54
 
@@ -96,7 +97,7 @@ Enhance your application with middleware:
96
97
 
97
98
  ```javascript
98
99
  app.use((ctx, next) => {
99
- console.log(`Incoming request: ${ctx.request.url}`);
100
+ console.log(`Incoming request: ${ctx.req.url}`);
100
101
  return next();
101
102
  });
102
103
  ```
@@ -152,7 +153,11 @@ Add the following scripts to **`package.json`**:
152
153
 
153
154
  ```json
154
155
  "scripts": {
155
- "build": "npx pkgroll --clean-dist",
156
+ "clean": "rm -rf dist",
157
+ "build:cjs": "tsc --module CommonJS --outDir dist/cjs --removeComments",
158
+ "build:esm": "tsc --module ESNext --outDir dist/mjs --removeComments",
159
+ "build:dts": "tsc --module ESNext --outDir dist/types --declaration --emitDeclarationOnly",
160
+ "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:dts",
156
161
  "start": "node dist/index.js",
157
162
  "nodemon": "nodemon src/index.ts",
158
163
  "dev": "tsx watch src/index.ts"
package/dist/cjs/index.js CHANGED
@@ -22,4 +22,4 @@ var server_1 = require("./server");
22
22
  Object.defineProperty(exports, "TezX", { enumerable: true, get: function () { return server_1.TezX; } });
23
23
  var params_1 = require("./utils/params");
24
24
  Object.defineProperty(exports, "useParams", { enumerable: true, get: function () { return params_1.useParams; } });
25
- exports.version = "1.0.7";
25
+ exports.version = "1.0.14";
package/dist/index.js CHANGED
@@ -2,4 +2,4 @@ export * from "./adapter";
2
2
  export { Router } from "./router";
3
3
  export { TezX } from "./server";
4
4
  export { useParams } from "./utils/params";
5
- export let version = "1.0.7";
5
+ export let version = "1.0.14";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tezx",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "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.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/index.js",