File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ import {
2121 ActionContext ,
2222 LoaderPlugin
2323} from '@objectql/types' ;
24- import type { PluginDefinition } from '@objectstack/spec' ;
25- import { ObjectStackKernel } from '@objectstack/runtime' ;
24+ import { ObjectStackKernel , type RuntimePlugin } from '@objectstack/runtime' ;
2625import { ObjectRepository } from './repository' ;
2726import { ObjectQLPlugin } from './plugin' ;
2827// import { createDriverFromConnection } from './driver'; // REMOVE THIS
@@ -47,8 +46,8 @@ export class ObjectQL implements IObjectQL {
4746 private actions : Record < string , ActionEntry > = { } ;
4847
4948 // ObjectStack Kernel Integration
50- private kernel : ObjectStackKernel ;
51- private kernelPlugins : any [ ] = [ ] ;
49+ private kernel ! : ObjectStackKernel ;
50+ private kernelPlugins : RuntimePlugin [ ] = [ ] ;
5251
5352 // Store config for lazy loading in init()
5453 private config : ObjectQLConfig ;
@@ -78,7 +77,7 @@ export class ObjectQL implements IObjectQL {
7877 }
7978 }
8079
81- use ( plugin : any ) {
80+ use ( plugin : RuntimePlugin ) {
8281 this . kernelPlugins . push ( plugin ) ;
8382 }
8483
Original file line number Diff line number Diff line change 2727 "test" : " jest --passWithNoTests"
2828 },
2929 "dependencies" : {
30- "@objectstack/spec" : " ^0.2.0"
30+ "@objectstack/spec" : " ^0.2.0" ,
31+ "@objectstack/runtime" : " ^0.2.0"
3132 },
3233 "devDependencies" : {
3334 "ts-json-schema-generator" : " ^2.4.0"
Original file line number Diff line number Diff line change 99import { MetadataRegistry } from "./registry" ;
1010import { Driver } from "./driver" ;
1111import { ObjectConfig } from "./object" ;
12- import type { PluginDefinition } from "@objectstack/spec " ;
12+ import type { RuntimePlugin } from "@objectstack/runtime " ;
1313
1414export interface ObjectQLConfig {
1515 registry ?: MetadataRegistry ;
@@ -39,11 +39,10 @@ export interface ObjectQLConfig {
3939 modules ?: string [ ] ;
4040 /**
4141 * List of plugins to load.
42- * Can be:
43- * - An instance of PluginDefinition (from @objectstack/spec)
44- * - A package name string
42+ * Must implement the RuntimePlugin interface from @objectstack/runtime.
43+ * String plugins (package names) are not supported in core.
4544 */
46- plugins ?: ( PluginDefinition | string ) [ ] ;
45+ plugins ?: ( RuntimePlugin | string ) [ ] ;
4746 /**
4847 * List of remote ObjectQL instances to connect to.
4948 * e.g. ["http://user-service:3000", "http://order-service:3000"]
You can’t perform that action at this time.
0 commit comments