Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/plugins/plugin-hono-server/src/hono-plugin.ts
Original file line number Diff line number Diff line change
@@ -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';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import IHttpServer.
import {
RestServerConfig,
} from '@objectstack/spec/api';
Expand Down Expand Up @@ -282,7 +282,7 @@
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<IDataEngine>('objectql');

// Create
rawApp.post(`${prefix}/data/:object`, async (c: any) => {
Expand Down
10 changes: 3 additions & 7 deletions packages/runtime/src/http-dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<HttpDispatcherResult> {
async handleMetadata(path: string, _context: HttpProtocolContext, method?: string, body?: any, query?: any): Promise<HttpDispatcherResult> {
const parts = path.replace(/^\/+/, '').split('/').filter(Boolean);

// GET /metadata/types
Expand Down Expand Up @@ -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<HttpDispatcherResult> {
async handleData(path: string, method: string, body: any, query: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult> {
const parts = path.replace(/^\/+/, '').split('/');
const objectName = parts[0];

Expand Down Expand Up @@ -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<HttpDispatcherResult> {
async handlePackages(path: string, method: string, body: any, query: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult> {
const m = method.toUpperCase();
const parts = path.replace(/^\/+/, '').split('/').filter(Boolean);

Expand Down Expand Up @@ -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.
Expand Down
Loading