diff --git a/packages/plugins/plugin-hono-server/src/hono-plugin.ts b/packages/plugins/plugin-hono-server/src/hono-plugin.ts index fa8a1d467..7fb8e8307 100644 --- a/packages/plugins/plugin-hono-server/src/hono-plugin.ts +++ b/packages/plugins/plugin-hono-server/src/hono-plugin.ts @@ -1,6 +1,6 @@ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license. -import { Plugin, PluginContext, IHttpServer } from '@objectstack/core'; +import { Plugin, PluginContext, IHttpServer, IDataEngine } from '@objectstack/core'; import { RestServerConfig, } from '@objectstack/spec/api'; @@ -282,7 +282,7 @@ export class HonoServerPlugin implements Plugin { ctx.logger.info('Registered discovery endpoints', { prefix }); // Basic CRUD data endpoints — delegate to ObjectQL service directly - const getObjectQL = () => ctx.getKernel().context?.getService('objectql'); + const getObjectQL = () => ctx.getService('objectql'); // Create rawApp.post(`${prefix}/data/:object`, async (c: any) => { diff --git a/packages/runtime/src/http-dispatcher.ts b/packages/runtime/src/http-dispatcher.ts index 4a9dda532..2513dedd6 100644 --- a/packages/runtime/src/http-dispatcher.ts +++ b/packages/runtime/src/http-dispatcher.ts @@ -388,7 +388,7 @@ export class HttpDispatcher { * Standard: /metadata/:type/:name * Fallback for backward compat: /metadata (all objects), /metadata/:objectName (get object) */ - async handleMetadata(path: string, context: HttpProtocolContext, method?: string, body?: any, query?: any): Promise { + async handleMetadata(path: string, _context: HttpProtocolContext, method?: string, body?: any, query?: any): Promise { const parts = path.replace(/^\/+/, '').split('/').filter(Boolean); // GET /metadata/types @@ -591,7 +591,7 @@ export class HttpDispatcher { * Handles Data requests * path: sub-path after /data/ (e.g. "contacts", "contacts/123", "contacts/query") */ - async handleData(path: string, method: string, body: any, query: any, context: HttpProtocolContext): Promise { + async handleData(path: string, method: string, body: any, query: any, _context: HttpProtocolContext): Promise { const parts = path.replace(/^\/+/, '').split('/'); const objectName = parts[0]; @@ -836,7 +836,7 @@ export class HttpDispatcher { * * Uses ObjectQL SchemaRegistry directly (via the 'objectql' service). */ - async handlePackages(path: string, method: string, body: any, query: any, context: HttpProtocolContext): Promise { + async handlePackages(path: string, method: string, body: any, query: any, _context: HttpProtocolContext): Promise { const m = method.toUpperCase(); const parts = path.replace(/^\/+/, '').split('/').filter(Boolean); @@ -1195,10 +1195,6 @@ export class HttpDispatcher { return null; } - private capitalize(s: string) { - return s.charAt(0).toUpperCase() + s.slice(1); - } - /** * Handle AI service routes (/ai/chat, /ai/models, /ai/conversations, etc.) * Resolves the AI service and its built-in route handlers, then dispatches.