Skip to content

Commit 4fad379

Browse files
authored
Merge pull request #1002 from objectstack-ai/copilot/add-plugin-setup-auto-load
2 parents 999ea4f + 3bfda2c commit 4fad379

4 files changed

Lines changed: 24 additions & 1 deletion

File tree

packages/plugins/plugin-dev/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@objectstack/plugin-auth": "workspace:^",
2727
"@objectstack/plugin-hono-server": "workspace:^",
2828
"@objectstack/plugin-security": "workspace:^",
29+
"@objectstack/plugin-setup": "workspace:^",
2930
"@objectstack/rest": "workspace:^",
3031
"@objectstack/runtime": "workspace:^",
3132
"@objectstack/service-i18n": "workspace:^"
@@ -49,6 +50,9 @@
4950
"@objectstack/plugin-security": {
5051
"optional": true
5152
},
53+
"@objectstack/plugin-setup": {
54+
"optional": true
55+
},
5256
"@objectstack/rest": {
5357
"optional": true
5458
},
@@ -62,6 +66,7 @@
6266
"@objectstack/plugin-auth": "workspace:*",
6367
"@objectstack/plugin-hono-server": "workspace:*",
6468
"@objectstack/plugin-security": "workspace:*",
69+
"@objectstack/plugin-setup": "workspace:*",
6570
"@objectstack/rest": "workspace:*",
6671
"@objectstack/runtime": "workspace:*",
6772
"@objectstack/service-i18n": "workspace:*",

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 {

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)