@kevisual/router 0.0.21 → 0.0.22

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@kevisual/router",
4
- "version": "0.0.21",
4
+ "version": "0.0.22",
5
5
  "description": "",
6
6
  "type": "module",
7
7
  "main": "./dist/router.js",
@@ -21,19 +21,19 @@
21
21
  "author": "abearxiong",
22
22
  "license": "MIT",
23
23
  "devDependencies": {
24
- "@kevisual/query": "^0.0.18",
24
+ "@kevisual/query": "^0.0.25",
25
25
  "@rollup/plugin-alias": "^5.1.1",
26
26
  "@rollup/plugin-commonjs": "^28.0.3",
27
27
  "@rollup/plugin-node-resolve": "^16.0.1",
28
28
  "@rollup/plugin-typescript": "^12.1.2",
29
29
  "@types/lodash-es": "^4.17.12",
30
- "@types/node": "^22.15.18",
30
+ "@types/node": "^22.15.29",
31
31
  "@types/ws": "^8.18.1",
32
32
  "@types/xml2js": "^0.4.14",
33
33
  "cookie": "^1.0.2",
34
34
  "lodash-es": "^4.17.21",
35
35
  "nanoid": "^5.1.5",
36
- "rollup": "^4.40.2",
36
+ "rollup": "^4.41.1",
37
37
  "rollup-plugin-dts": "^6.2.1",
38
38
  "ts-loader": "^9.5.2",
39
39
  "ts-node": "^10.9.2",
@@ -41,7 +41,7 @@
41
41
  "typescript": "^5.8.3",
42
42
  "ws": "npm:@kevisual/ws",
43
43
  "xml2js": "^0.6.2",
44
- "zod": "^3.24.4"
44
+ "zod": "^3.25.51"
45
45
  },
46
46
  "repository": {
47
47
  "type": "git",
@@ -89,6 +89,10 @@
89
89
  "import": "./mod.ts",
90
90
  "require": "./mod.ts",
91
91
  "types": "./mod.d.ts"
92
+ },
93
+ "./src/*": {
94
+ "import": "./src/*",
95
+ "require": "./src/*"
92
96
  }
93
97
  }
94
98
  }
package/readme.md CHANGED
@@ -1,23 +1,15 @@
1
1
  # router
2
2
 
3
- ```
3
+ ```ts
4
4
  import { App } from '@kevisual/router';
5
5
 
6
6
  const app = new App();
7
7
  app.listen(4002);
8
8
 
9
- new app.Route('demo', '01')
10
- .define(async (ctx) => {
11
- ctx.body = '01';
12
- return ctx;
13
- })
14
- .addTo(app);
15
-
16
9
  app
17
10
  .route({path:'demo', key: '02})
18
11
  .define(async (ctx) => {
19
12
  ctx.body = '02';
20
- return ctx;
21
13
  })
22
14
  .addTo(app);
23
15
 
@@ -25,7 +17,6 @@ app
25
17
  .route('demo', '03')
26
18
  .define(async (ctx) => {
27
19
  ctx.body = '03';
28
- return ctx;
29
20
  })
30
21
  .addTo(app);
31
22
  ```