Skip to content

Commit 3cef475

Browse files
fix: resolve CI build and test errors
- Fixed TypeScript error in plugin-hono-server by using ctx.getService<IDataEngine>('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 <noreply@anthropic.com> Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
1 parent 68c0f18 commit 3cef475

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

packages/plugins/plugin-hono-server/src/hono-plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
22

3-
import { Plugin, PluginContext, IHttpServer } from '@objectstack/core';
3+
import { Plugin, PluginContext, IHttpServer, IDataEngine } from '@objectstack/core';
44
import {
55
RestServerConfig,
66
} from '@objectstack/spec/api';
@@ -282,7 +282,7 @@ export class HonoServerPlugin implements Plugin {
282282
ctx.logger.info('Registered discovery endpoints', { prefix });
283283

284284
// Basic CRUD data endpoints — delegate to ObjectQL service directly
285-
const getObjectQL = () => ctx.getKernel().context?.getService('objectql');
285+
const getObjectQL = () => ctx.getService<IDataEngine>('objectql');
286286

287287
// Create
288288
rawApp.post(`${prefix}/data/:object`, async (c: any) => {

packages/runtime/src/http-dispatcher.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ export class HttpDispatcher {
388388
* Standard: /metadata/:type/:name
389389
* Fallback for backward compat: /metadata (all objects), /metadata/:objectName (get object)
390390
*/
391-
async handleMetadata(path: string, context: HttpProtocolContext, method?: string, body?: any, query?: any): Promise<HttpDispatcherResult> {
391+
async handleMetadata(path: string, _context: HttpProtocolContext, method?: string, body?: any, query?: any): Promise<HttpDispatcherResult> {
392392
const parts = path.replace(/^\/+/, '').split('/').filter(Boolean);
393393

394394
// GET /metadata/types
@@ -591,7 +591,7 @@ export class HttpDispatcher {
591591
* Handles Data requests
592592
* path: sub-path after /data/ (e.g. "contacts", "contacts/123", "contacts/query")
593593
*/
594-
async handleData(path: string, method: string, body: any, query: any, context: HttpProtocolContext): Promise<HttpDispatcherResult> {
594+
async handleData(path: string, method: string, body: any, query: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult> {
595595
const parts = path.replace(/^\/+/, '').split('/');
596596
const objectName = parts[0];
597597

@@ -836,7 +836,7 @@ export class HttpDispatcher {
836836
*
837837
* Uses ObjectQL SchemaRegistry directly (via the 'objectql' service).
838838
*/
839-
async handlePackages(path: string, method: string, body: any, query: any, context: HttpProtocolContext): Promise<HttpDispatcherResult> {
839+
async handlePackages(path: string, method: string, body: any, query: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult> {
840840
const m = method.toUpperCase();
841841
const parts = path.replace(/^\/+/, '').split('/').filter(Boolean);
842842

@@ -1195,10 +1195,6 @@ export class HttpDispatcher {
11951195
return null;
11961196
}
11971197

1198-
private capitalize(s: string) {
1199-
return s.charAt(0).toUpperCase() + s.slice(1);
1200-
}
1201-
12021198
/**
12031199
* Handle AI service routes (/ai/chat, /ai/models, /ai/conversations, etc.)
12041200
* Resolves the AI service and its built-in route handlers, then dispatches.

0 commit comments

Comments
 (0)