Commit Graph

57 Commits

Author SHA1 Message Date
7975863af3 chore: update version to 0.0.47 and enhance WebSocket handling in server implementation 2025-12-21 03:26:15 +08:00
90ef73a97b chore: update version to 0.0.43 and enhance request/response types for Bun server 2025-12-20 23:22:32 +08:00
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
d06b384ca4 update 2025-11-18 00:45:21 +08:00
c0ec625f01 route list,当时wait的模式添加默认的 2025-11-14 17:43:07 +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
10506503eb update: add listen process 2025-10-15 20:48:20 +08:00
2483205a22 update 2025-10-14 19:17:00 +08:00
19c4cc2e06 update 2025-10-14 15:17:56 +08:00
27b63e0a2b update 2025-10-14 15:16:41 +08:00
187900ad55 update: fix docs 2025-06-20 16:20:56 +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
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
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
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
871aac104a fix: import fix 2025-01-03 21:23:23 +08:00
50c87043c8 type 定义修改 2024-12-14 08:52:42 +08:00
dc2f282f4b feat: 更新cookie模块和添加res和req在app的请求当中 2024-12-11 14:28:46 +08:00
c99d03550e fix: add http2 2024-11-27 18:49:55 +08:00
e0c7d40a9c add queryRoute for only return code data message 2024-11-26 19:25:43 +08:00
7f369b7b07 fix: 更新router报错 2024-11-17 16:43:24 +08:00
2393dfe273 fix: remove default res 2024-11-16 23:16:41 +08:00
5e38740c7b feat: add simple router 2024-11-16 23:10:54 +08:00
926c0a09cd feat: 更新sign的模块 2024-11-16 12:34:08 +08:00
780d744a16 feat: 设置默认的context 2024-11-12 11:19:11 +08:00
303c579e92 router添加 throw 2024-11-10 19:03:56 +08:00
df737e5f27 feat: 修改打包方式 2024-11-02 22:23:06 +08:00
c462dc31f8 feat: browser router add custom error 2024-11-01 00:23:21 +08:00