-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor server as plugin with Hono adapter #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
| import { IObjectQL, ObjectQLPlugin, ApiRouteConfig } from '@objectql/types'; | ||
| import { IncomingMessage, ServerResponse, createServer, Server } from 'http'; | ||
| import { createNodeHandler, NodeHandlerOptions } from './adapters/node'; | ||
| import { createRESTHandler, RESTHandlerOptions } from './adapters/rest'; |
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
1 similar comment
|
|
@copilot 我是希望能够作废现有的server的逻辑,直接按照新的方式重购 |
完全移除现有的 server 实现逻辑,按照新的插件方式重构。 - 删除 @objectql/server 中的所有实现文件 - 将 @objectql/server 改为仅从 @objectql/plugin-server 重新导出的兼容层 - 将所有测试移至 @objectql/plugin-server 包 - 更新示例使用新的 @objectql/plugin-server 包 - 所有 129 个测试仍然通过 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
已完成重构!现有的 server 逻辑已完全移除,所有实现都已迁移到新的 @objectql/plugin-server 包。 主要更改:
向后兼容性:现有代码继续工作,因为 Commit: 00c7c22 |
|
@copilot 删除所有的自定义逻辑,统一使用objectstack标准的服务端 |
需要澄清一下:您指的"objectstack标准的服务端"具体是指哪个包或实现? 我看到代码库中有这些 ObjectStack 包:
但我没有找到标准的服务端实现包(如 您是希望:
请告诉我具体应该如何修改,我会立即执行。 |
Server functionality completely migrated to
@objectql/plugin-serverpackage, enabling framework-agnostic HTTP server implementations. The existing@objectql/serverpackage is now a thin compatibility wrapper. Addresses request to refactor server using plugin approach with Hono framework support.Architecture Changes
@objectql/plugin-serverwith complete server implementation includingServerPluginclass implementingObjectQLPlugininterfacecreateHonoAdapter()function for Hono framework integration (edge/serverless deployments)@objectql/serverconverted to thin wrapper that re-exports from@objectql/plugin-serverfor backward compatibility; no implementation code remainsCore Implementation
Server capabilities now pluggable:
Hono integration for modern runtime environments:
Traditional Express integration (via compatibility layer):
Package Structure
Primary Implementation (
packages/plugins/server/):Compatibility Wrapper (
packages/runtime/server/):Migration
All implementation has been moved to
@objectql/plugin-server. The@objectql/serverpackage now serves as a compatibility layer with deprecation notices. Users are encouraged to migrate:Example implementations at
examples/integrations/hono-server/andexamples/integrations/express-server/.Testing
@objectql/plugin-serverand passingOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.