File tree Expand file tree Collapse file tree
packages/foundation/core/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { ValidatorPlugin } from '@objectql/plugin-validator';
1111import { GraphQLPlugin } from '@objectql/protocol-graphql' ;
1212import { ODataV4Plugin } from '@objectql/protocol-odata-v4' ;
1313import { HonoServerPlugin } from '@objectstack/plugin-hono-server' ;
14+ import { ObjectQLPlugin } from '@objectql/core' ;
1415import * as fs from 'fs' ;
1516import * as path from 'path' ;
1617import * as yaml from 'js-yaml' ;
@@ -49,6 +50,10 @@ export default {
4950 plugins : [
5051 new HonoServerPlugin ( {
5152 } ) ,
53+ new ObjectQLPlugin ( {
54+ enableRepository : true ,
55+ enableQueryService : true
56+ } ) ,
5257 new ObjectQLSecurityPlugin ( {
5358 enableAudit : false
5459 } ) ,
Original file line number Diff line number Diff line change 2424 "@changesets/cli" : " ^2.29.8" ,
2525 "@eslint/js" : " ^9.39.2" ,
2626 "@objectql/cli" : " workspace:*" ,
27+ "@objectql/core" : " workspace:*" ,
2728 "@objectql/example-enterprise-erp" : " workspace:*" ,
2829 "@objectql/example-project-tracker" : " workspace:*" ,
2930 "@objectql/plugin-security" : " workspace:*" ,
Original file line number Diff line number Diff line change @@ -181,6 +181,26 @@ export class ObjectQLPlugin implements RuntimePlugin {
181181 console . log ( `[${ this . name } ] Starting plugin...` ) ;
182182 // Additional startup logic can be added here
183183 }
184+
185+ // --- Adapter for @objectstack/core compatibility ---
186+ async init ( kernel : any ) : Promise < void > {
187+ // The new core passes the kernel instance directly
188+ // We wrap it to match the old RuntimeContext interface
189+ const ctx = {
190+ engine : kernel ,
191+ getKernel : ( ) => kernel
192+ } ;
193+ return this . install ( ctx ) ;
194+ }
195+
196+ async start ( kernel : any ) : Promise < void > {
197+ const ctx = {
198+ engine : kernel ,
199+ getKernel : ( ) => kernel
200+ } ;
201+ return this . onStart ( ctx ) ;
202+ }
203+ // ---------------------------------------------------
184204
185205 /**
186206 * Register the Repository pattern
You can’t perform that action at this time.
0 commit comments