From 3cef47581e6502ed75b7fad29a8939e34cbef2d0 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Tue, 14 Apr 2026 10:08:21 +0000 Subject: [PATCH] fix: resolve CI build and test errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed TypeScript error in plugin-hono-server by using ctx.getService('objectql') instead of accessing private context property - Fixed unused variable errors in runtime package by prefixing unused parameters with underscore - Removed unused _capitalize method from http-dispatcher - All builds now pass successfully - All tests pass (150/150) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com> --- packages/plugins/plugin-hono-server/src/hono-plugin.ts | 4 ++-- packages/runtime/src/http-dispatcher.ts | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) 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.