File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 "@objectstack/driver-memory" : " workspace:^" ,
4545 "@objectstack/objectql" : " workspace:^" ,
4646 "@objectstack/plugin-hono-server" : " workspace:*" ,
47+ "@objectstack/plugin-setup" : " workspace:*" ,
4748 "@objectstack/rest" : " workspace:*" ,
4849 "@objectstack/runtime" : " workspace:^" ,
4950 "@objectstack/service-ai" : " workspace:*" ,
Original file line number Diff line number Diff line change @@ -263,6 +263,22 @@ export default class Serve extends Command {
263263 }
264264 }
265265
266+ // 5. Auto-register SetupPlugin BEFORE config plugins so that other
267+ // plugins (e.g. AuthPlugin) can call setupNav.contribute() during init.
268+ const hasSetupPlugin = plugins . some (
269+ ( p : any ) => p . name === 'com.objectstack.setup' || p . constructor ?. name === 'SetupPlugin'
270+ ) ;
271+ if ( ! hasSetupPlugin ) {
272+ try {
273+ const setupPkg = '@objectstack/plugin-setup' ;
274+ const { SetupPlugin } = await import ( /* webpackIgnore: true */ setupPkg ) ;
275+ await kernel . use ( new SetupPlugin ( ) ) ;
276+ trackPlugin ( 'Setup' ) ;
277+ } catch {
278+ // @objectstack /plugin-setup not installed — setup app unavailable
279+ }
280+ }
281+
266282 if ( plugins . length > 0 ) {
267283 for ( const plugin of plugins ) {
268284 try {
Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ export class SchemaRegistry {
550550 if ( type === 'object' || type === 'objects' ) {
551551 return this . getAllObjects ( packageId ) as unknown as T [ ] ;
552552 }
553-
553+
554554 const items = Array . from ( this . metadata . get ( type ) ?. values ( ) || [ ] ) as T [ ] ;
555555 if ( packageId ) {
556556 return items . filter ( ( item : any ) => item . _packageId === packageId ) ;
You can’t perform that action at this time.
0 commit comments