Skip to content

Commit 509f871

Browse files
Copilothotlong
andauthored
feat(plugin-dev): auto-load plugin-setup as step 3c in DevPlugin
Agent-Logs-Url: https://github.com/objectstack-ai/spec/sessions/14933292-730e-4ad2-ab22-6533cf20ec23 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 438f66d commit 509f871

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

packages/plugins/plugin-dev/src/dev-plugin.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ describe('DevPlugin', () => {
7575
objectql: false,
7676
driver: false,
7777
auth: false,
78+
setup: false,
7879
security: false,
7980
server: false,
8081
rest: false,
@@ -225,6 +226,7 @@ describe('DevPlugin', () => {
225226
objectql: false,
226227
driver: false,
227228
auth: false,
229+
setup: false,
228230
server: false,
229231
rest: false,
230232
dispatcher: false,

packages/plugins/plugin-dev/src/dev-plugin.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export interface DevPluginOptions {
339339
* Override which services to enable. By default all core services are enabled.
340340
* Set a service name to `false` to skip it.
341341
*
342-
* Available services: 'objectql', 'driver', 'auth', 'server', 'rest',
342+
* Available services: 'objectql', 'driver', 'auth', 'setup', 'server', 'rest',
343343
* 'dispatcher', 'security', plus any of the 17 CoreServiceName values
344344
* (e.g. 'cache', 'queue', 'job', 'ui', 'automation', 'workflow', …).
345345
*/
@@ -405,6 +405,7 @@ export interface DevPluginOptions {
405405
* | ObjectQL | `@objectstack/objectql` | Data engine (query, CRUD, hooks) |
406406
* | Driver | `@objectstack/driver-memory` | In-memory database (no DB install) |
407407
* | Auth | `@objectstack/plugin-auth` | Authentication with dev credentials |
408+
* | Setup | `@objectstack/plugin-setup` | Platform Setup App (admin UI navigation) |
408409
* | Security | `@objectstack/plugin-security` | RBAC, RLS, field-level masking |
409410
* | HTTP Server | `@objectstack/plugin-hono-server` | HTTP server on configured port |
410411
* | REST API | `@objectstack/rest` | Auto-generated CRUD + metadata endpoints |
@@ -530,6 +531,18 @@ export class DevPlugin implements Plugin {
530531
}
531532
}
532533

534+
// 3c. Setup Plugin — platform Setup App with area-based navigation
535+
if (enabled('setup')) {
536+
try {
537+
const { SetupPlugin } = await import('@objectstack/plugin-setup') as any;
538+
const setupPlugin = new SetupPlugin();
539+
this.childPlugins.push(setupPlugin);
540+
ctx.logger.info(' ✔ Setup plugin enabled (platform Setup App)');
541+
} catch {
542+
ctx.logger.debug(' ℹ @objectstack/plugin-setup not installed — skipping Setup App');
543+
}
544+
}
545+
533546
// 4. Auth Plugin
534547
if (enabled('auth')) {
535548
try {

0 commit comments

Comments
 (0)