@@ -112,7 +112,7 @@ export const serveCommand = new Command('serve')
112112 try {
113113 console . log ( chalk . dim ( ` Auto-injecting ObjectQL Engine...` ) ) ;
114114 const { ObjectQLPlugin } = await import ( '@objectstack/objectql' ) ;
115- kernel . use ( new ObjectQLPlugin ( ) ) ;
115+ await kernel . use ( new ObjectQLPlugin ( ) ) ;
116116 console . log ( chalk . green ( ` ✓ Registered ObjectQL Plugin (auto-detected)` ) ) ;
117117 } catch ( e : any ) {
118118 console . warn ( chalk . yellow ( ` ⚠ Could not auto-load ObjectQL: ${ e . message } ` ) ) ;
@@ -126,7 +126,7 @@ export const serveCommand = new Command('serve')
126126 console . log ( chalk . dim ( ` Auto-injecting Memory Driver (Dev Mode)...` ) ) ;
127127 const { DriverPlugin } = await import ( '@objectstack/runtime' ) ;
128128 const { InMemoryDriver } = await import ( '@objectstack/driver-memory' ) ;
129- kernel . use ( new DriverPlugin ( new InMemoryDriver ( ) ) ) ;
129+ await kernel . use ( new DriverPlugin ( new InMemoryDriver ( ) ) ) ;
130130 console . log ( chalk . green ( ` ✓ Registered Memory Driver (auto-detected)` ) ) ;
131131 } catch ( e : any ) {
132132 // Silent fail - maybe they don't want a driver or don't have the package
@@ -138,7 +138,7 @@ export const serveCommand = new Command('serve')
138138 if ( config . objects || config . manifest || config . apps ) {
139139 try {
140140 const { AppPlugin } = await import ( '@objectstack/runtime' ) ;
141- kernel . use ( new AppPlugin ( config ) ) ;
141+ await kernel . use ( new AppPlugin ( config ) ) ;
142142 console . log ( chalk . green ( ` ✓ Registered App Plugin (auto-detected)` ) ) ;
143143 } catch ( e : any ) {
144144 console . warn ( chalk . yellow ( ` ⚠ Could not auto-load AppPlugin: ${ e . message } ` ) ) ;
@@ -166,7 +166,7 @@ export const serveCommand = new Command('serve')
166166 }
167167 }
168168
169- kernel . use ( pluginToLoad ) ;
169+ await kernel . use ( pluginToLoad ) ;
170170 const pluginName = plugin . name || plugin . constructor ?. name || 'unnamed' ;
171171 console . log ( chalk . green ( ` ✓ Registered plugin: ${ pluginName } ` ) ) ;
172172 } catch ( e : any ) {
@@ -180,7 +180,7 @@ export const serveCommand = new Command('serve')
180180 try {
181181 const { HonoServerPlugin } = await import ( '@objectstack/plugin-hono-server' ) ;
182182 const serverPlugin = new HonoServerPlugin ( { port } ) ;
183- kernel . use ( serverPlugin ) ;
183+ await kernel . use ( serverPlugin ) ;
184184 console . log ( chalk . green ( ` ✓ Registered HTTP server plugin (port: ${ port } )` ) ) ;
185185 } catch ( e : any ) {
186186 console . warn ( chalk . yellow ( ` ⚠ HTTP server plugin not available: ${ e . message } ` ) ) ;
0 commit comments