Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/plugins/plugin-dev/package.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,6 +26,7 @@
"@objectstack/plugin-auth": "workspace:^",
"@objectstack/plugin-hono-server": "workspace:^",
"@objectstack/plugin-security": "workspace:^",
"@objectstack/plugin-setup": "workspace:^",
"@objectstack/rest": "workspace:^",
"@objectstack/runtime": "workspace:^",
"@objectstack/service-i18n": "workspace:^"
Expand All@@ -49,6 +50,9 @@
"@objectstack/plugin-security": {
"optional": true
},
"@objectstack/plugin-setup": {
"optional": true
},
"@objectstack/rest": {
"optional": true
},
Expand All@@ -62,6 +66,7 @@
"@objectstack/plugin-auth": "workspace:*",
"@objectstack/plugin-hono-server": "workspace:*",
"@objectstack/plugin-security": "workspace:*",
"@objectstack/plugin-setup": "workspace:*",
"@objectstack/rest": "workspace:*",
"@objectstack/runtime": "workspace:*",
"@objectstack/service-i18n": "workspace:*",
Expand Down
2 changes: 2 additions & 0 deletions packages/plugins/plugin-dev/src/dev-plugin.test.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,6 +75,7 @@ describe('DevPlugin', () => {
objectql: false,
driver: false,
auth: false,
setup: false,
security: false,
server: false,
rest: false,
Expand DownExpand Up@@ -225,6 +226,7 @@ describe('DevPlugin', () => {
objectql: false,
driver: false,
auth: false,
setup: false,
server: false,
rest: false,
dispatcher: false,
Expand Down
15 changes: 14 additions & 1 deletion packages/plugins/plugin-dev/src/dev-plugin.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -339,7 +339,7 @@ export interface DevPluginOptions {
* Override which services to enable. By default all core services are enabled.
* Set a service name to `false` to skip it.
*
* Available services: 'objectql', 'driver', 'auth', 'server', 'rest',
* Available services: 'objectql', 'driver', 'auth', 'setup', 'server', 'rest',
* 'dispatcher', 'security', plus any of the 17 CoreServiceName values
* (e.g. 'cache', 'queue', 'job', 'ui', 'automation', 'workflow', …).
*/
Expand DownExpand Up@@ -405,6 +405,7 @@ export interface DevPluginOptions {
* | ObjectQL | `@objectstack/objectql` | Data engine (query, CRUD, hooks) |
* | Driver | `@objectstack/driver-memory` | In-memory database (no DB install) |
* | Auth | `@objectstack/plugin-auth` | Authentication with dev credentials |
* | Setup | `@objectstack/plugin-setup` | Platform Setup App (admin UI navigation) |
Comment on lines 407 to +408

CopilotAIMar 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSDoc "Core services (real implementations)" table lists Auth before Setup, but in init() the Setup plugin is loaded before Auth (step 3c before step 4). Please reorder the rows (or clarify ordering) so the documentation matches the actual plugin initialization order.

Suggested change
*|Auth|`@objectstack/plugin-auth`|Authenticationwithdevcredentials|
*|Setup|`@objectstack/plugin-setup`|PlatformSetupApp(adminUInavigation)|
*|Setup|`@objectstack/plugin-setup`|PlatformSetupApp(adminUInavigation)|
*|Auth|`@objectstack/plugin-auth`|Authenticationwithdevcredentials|

Copilot uses AI. Check for mistakes.
* | Security | `@objectstack/plugin-security` | RBAC, RLS, field-level masking |
* | HTTP Server | `@objectstack/plugin-hono-server` | HTTP server on configured port |
* | REST API | `@objectstack/rest` | Auto-generated CRUD + metadata endpoints |
Expand DownExpand Up@@ -530,6 +531,18 @@ export class DevPlugin implements Plugin {
}
}

// 3c. Setup Plugin — platform Setup App with area-based navigation
if (enabled('setup')) {
try {
const { SetupPlugin } = await import('@objectstack/plugin-setup') as any;
const setupPlugin = new SetupPlugin();
this.childPlugins.push(setupPlugin);
ctx.logger.info(' ✔ Setup plugin enabled (platform Setup App)');
} catch {
ctx.logger.debug(' ℹ @objectstack/plugin-setup not installed — skipping Setup App');

CopilotAIMar 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New behavior (auto-loading @objectstack/plugin-setup) isn’t covered by tests: current fixtures explicitly disable setup, so the suite never asserts that enabling Setup results in setupNav being registered / SetupPlugin being initialized. Please add a test that runs DevPlugin.init() with setup enabled and asserts ctx.registerService was called for setupNav (and ideally that it happens before Auth/Security init if those are mocked).

Suggested change
ctx.logger.debug(' ℹ @objectstack/plugin-setup not installed — skipping Setup App');
ctx.logger.debug(' ℹ @objectstack/plugin-setup not installed — skipping Setup App');
// Provide a minimal in-memory setupNav service so tests and dev environments
// can still rely on its presence when setup is enabled, even if the plugin
// package is not installed.
if(typeofctx.registerService==='function'){
constsetupNavService={
// Returns an empty navigation tree by default; real navigation is provided
// by @objectstack/plugin-setup when available.
asyncgetNavTree(){
return[];
},
};
ctx.registerService('setupNav',setupNavServiceasany);
}

Copilot uses AI. Check for mistakes.
}
}

// 4. Auth Plugin
if (enabled('auth')) {
try {
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading