@@ -9,7 +9,7 @@ import { ObjectQLPlugin } from '@objectstack/objectql';
99import { InMemoryDriver } from '@objectstack/driver-memory' ;
1010import { HonoServerPlugin } from '@objectstack/plugin-hono-server' ;
1111import { AuthPlugin } from '@objectstack/plugin-auth' ;
12- import { SetupPlugin , SETUP_APP_DEFAULTS } from '@objectstack/plugin-setup' ;
12+ import { SetupPlugin } from '@objectstack/plugin-setup' ;
1313import { ConsolePlugin } from '@object-ui/console' ;
1414import { createMemoryI18n } from '@objectstack/core' ;
1515import { mergeViewsIntoObjects } from '@object-ui/core' ;
@@ -58,20 +58,20 @@ class MemoryI18nPlugin {
5858export default {
5959 plugins : [
6060 new MemoryI18nPlugin ( ) ,
61+ // SetupPlugin first: registers setupNav during init for contributing plugins,
62+ // and registers the merged Setup app during start before ObjectQL scans.
63+ new SetupPlugin ( ) ,
6164 new ObjectQLPlugin ( ) ,
6265 new DriverPlugin ( new InMemoryDriver ( ) ) ,
6366 // Each example stack loaded as an independent AppPlugin
6467 new AppPlugin ( prepareConfig ( crmConfig ) ) ,
6568 new AppPlugin ( prepareConfig ( todoConfig ) ) ,
6669 new AppPlugin ( prepareConfig ( kitchenSinkConfig ) ) ,
67- // Setup App registered via AppPlugin so ObjectQLPlugin discovers it.
68- // SetupPlugin also registers setupNav service for future navigation contributions.
69- new AppPlugin ( { apps : [ SETUP_APP_DEFAULTS ] , manifest : { id : 'setup' , name : 'setup' } } ) ,
70+ // AuthPlugin after ObjectQL (needs 'data' service) and after SetupPlugin (uses setupNav)
7071 new AuthPlugin ( {
7172 secret : process . env . AUTH_SECRET || 'objectui-dev-secret' ,
7273 baseUrl : 'http://localhost:3000' ,
7374 } ) ,
74- new SetupPlugin ( ) ,
7575 new HonoServerPlugin ( { port : 3000 } ) ,
7676 new ConsolePlugin ( ) ,
7777 ] ,
0 commit comments