You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Enhanced ObjectQL implementation that wraps ObjectStackKernel
40
+
* to provide the plugin architecture while maintaining backward compatibility.
41
+
*
42
+
* This class acts as a compatibility layer, proxying operations to the kernel
43
+
* while preserving the existing API surface.
44
+
*/
34
45
exportclassObjectQLimplementsIObjectQL{
35
46
publicmetadata: MetadataRegistry;
36
47
privatedatasources: Record<string,Driver>={};
@@ -39,6 +50,10 @@ export class ObjectQL implements IObjectQL {
39
50
privateactions: Record<string,ActionEntry>={};
40
51
privatepluginsList: PluginDefinition[]=[];
41
52
53
+
// ObjectStack Kernel Integration
54
+
privatekernel: ObjectStackKernel;
55
+
privatekernelPlugins: any[]=[];
56
+
42
57
// Store config for lazy loading in init()
43
58
privateconfig: ObjectQLConfig;
44
59
@@ -52,6 +67,13 @@ export class ObjectQL implements IObjectQL {
52
67
thrownewError("Connection strings are not supported in core directly. Use @objectql/platform-node's createDriverFromConnection or pass a driver instance to 'datasources'.");
53
68
}
54
69
70
+
// Initialize ObjectStackKernel with plugins
71
+
// The kernel will be used for lifecycle management and plugin orchestration
72
+
this.kernelPlugins=[];
73
+
74
+
// Add the ObjectQL plugin to provide enhanced features
75
+
this.kernelPlugins.push(newObjectQLPlugin());
76
+
55
77
// Initialize Plugin List (but don't setup yet)
56
78
if(config.plugins){
57
79
for(constpluginofconfig.plugins){
@@ -62,9 +84,14 @@ export class ObjectQL implements IObjectQL {
62
84
}
63
85
}
64
86
}
87
+
88
+
// Create the kernel instance
89
+
// Note: The kernel expects plugins in its constructor
0 commit comments