Commit Graph

69 Commits

Author SHA1 Message Date
a6a7e74559 feat: Refactor server implementation to support Bun and Node environments
- Introduced `ServerNode` and `BunServer` classes to handle server logic for Node and Bun respectively.
- Updated `App` class to initialize the appropriate server based on the runtime environment.
- Enhanced `parseBody` function to handle request body parsing for both environments.
- Modified WebSocket handling to support Bun's WebSocket upgrade mechanism.
- Improved error handling and response structure across the server implementation.
- Added support for custom middleware in the server's request handling.
- Refactored server base functionality into `ServerBase` for better code organization.
- Updated type definitions to reflect changes in server options and listener handling.
- Added a new demo for testing the server functionality with various request types.
2025-12-20 05:11:51 +08:00
e1a53c01ea chore: update version to 0.0.41 and improve Route class formatting 2025-12-19 17:08:07 +08:00
311bde7c7c chore: update package version and dependencies
- Bump version from 0.0.39 to 0.0.40 in package.json
- Update @kevisual/query from ^0.0.31 to ^0.0.32
- Update @types/node from ^24.10.2 to ^25.0.3
- Update rollup from ^4.53.3 to ^4.53.5
- Update zod from ^4.1.13 to ^4.2.1
- Update send from ^1.2.0 to ^1.2.1

refactor: improve error handling in CustomError class

- Refactor isError method to use type guard for better type checking

fix: change cookie import path in server.ts

- Update cookie import from 'cookie' to './cookie.ts'

feat: implement cookie parsing and stringifying functionality

- Add cookie.ts with functions for parsing and stringifying cookies
- Implement cookie name, value, domain, path, max-age, and other attributes handling
2025-12-19 09:48:21 +08:00
298eecde9b chore: update version to 0.0.39 2025-12-17 14:27:16 +08:00
90ecb8eb93 refactor: enhance RouteOpts and Route class generics for improved type safety
- Updated RouteOpts to accept an additional generic parameter for metadata type.
- Modified Route class to utilize the new generic parameter for metadata.
- Adjusted the run method in QueryRouterServer for consistent type definitions.
- Improved getList method in QueryRouter to allow filtering of routes.
2025-12-17 11:31:52 +08:00
a997dad00b ifx: fix run ERROR 2025-12-09 14:08:42 +08:00
c692061b23 refactor router system and update version
- Simplified Route class by removing validator functionality
- Added AppRouteContext type for better type safety
- Added forward method to RouteContext for response handling
- Replaced queryRoute with run method for consistency
- Improved Server class with proper cleanup methods
- Updated Mini class to extend QueryRouterServer properly
- Removed lodash-es dependency and nanoid random import
- Added deprecation warnings for older methods
- Enhanced route handling and middleware execution

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 12:30:47 +08:00
ef0faf84b1 update dependencies and router functionality
- Update package version to 0.0.34
- Upgrade @kevisual/local-proxy to 0.0.8 and @kevisual/query to 0.0.31
- Update rollup, cookie, selfsigned, and zod dependencies
- Remove unused share property from Route class
- Refactor queryRouter context to use app property
- Improve call method logic to prioritize path + key
- Update queryRoute to use call method
- Enhance HttpChain class with better constructor and parse method

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 10:30:58 +08:00
e00a6c7418 test 2025-12-01 10:54:24 +08:00
d06b384ca4 update 2025-11-18 00:45:21 +08:00
c0ec625f01 route list,当时wait的模式添加默认的 2025-11-14 17:43:07 +08:00
87068cd626 update 2025-10-24 21:15:02 +08:00
ac32ff9d4a udpate 2025-10-24 03:04:06 +08:00
cc74dc6803 update add no path and random path 2025-10-22 17:05:20 +08:00
24166f9899 feat: add Mini 2025-10-15 21:13:37 +08:00
10506503eb update: add listen process 2025-10-15 20:48:20 +08:00
2483205a22 update 2025-10-14 19:17:00 +08:00
cd96b53f6e recorver code 2025-10-14 19:15:18 +08:00
19c4cc2e06 update 2025-10-14 15:17:56 +08:00
27b63e0a2b update 2025-10-14 15:16:41 +08:00
e8794912b6 add introduce 2025-07-26 20:38:49 +08:00
187900ad55 update: fix docs 2025-06-20 16:20:56 +08:00
d2ebb5f488 fix: add app-barowser for browser 2025-06-12 15:02:16 +08:00
324c4e9862 update sign 2025-06-06 19:23:52 +08:00
51305b71c3 fix: cert fix 2025-06-05 19:24:14 +08:00
adaf954ae7 bump: and export src 2025-06-05 00:47:53 +08:00
d2a03fc959 temp 2025-05-25 00:05:20 +08:00
e31b19f931 fix: update 2025-05-18 02:49:45 +08:00
eede990ec8 perf: 优化 2025-05-15 22:32:05 +08:00
51dafe0f9a perf 2025-05-14 21:12:08 +08:00
aeeb205e1e fix: fix types 2025-05-14 21:04:25 +08:00
fc35b531e1 feat: add define tools 2025-05-14 20:18:58 +08:00
6d148e47f1 add parse search value 2025-05-12 04:32:26 +08:00
896f2f5412 fix 2025-04-18 18:27:19 +08:00
afad59e0ab feat: update to 0.0.12 2025-04-18 01:16:06 +08:00
17e515ad32 add deno mod 2025-04-17 23:54:21 +08:00
4c11a44b48 update package 2025-04-03 19:37:21 +08:00
06c3cc4236 router writeHead修改 2025-03-30 00:37:31 +08:00
8823c15aba feat: 更新注释 2025-03-21 12:44:57 +08:00
0e30dfc6ea test path-to-regexp 2025-03-16 23:54:57 +08:00
e8f7f61e09 fix: add json needSerialize 2025-03-06 22:45:11 +08:00
5911f29c8f fix; fix add serialize 2025-03-03 23:20:18 +08:00
ba7e00bd7a router 更新 2025-03-02 16:51:07 +08:00
bac3e5b393 feat: add router 2025-03-02 02:18:45 +08:00
de3187f5f3 temp 2025-02-26 12:33:34 +08:00
1c3e65df8a feat: add metadata and middleware add preivew middleware 2025-02-26 11:26:52 +08:00
986b5687c4 bump: 0.0.6 2025-02-20 23:35:53 +08:00
803687b219 style 2025-02-19 07:03:09 +08:00
871aac104a fix: import fix 2025-01-03 21:23:23 +08:00
50c87043c8 type 定义修改 2024-12-14 08:52:42 +08:00