Skip to content

Commit 38faf2a

Browse files
committed
更新 AppPlugin 以合并清单和包,确保对象/应用在根目录可访问,支持旧版清单和新堆栈定义
1 parent fceb462 commit 38faf2a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

packages/runtime/src/app-plugin.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,14 @@ export class AppPlugin implements Plugin {
3838
// Register the app manifest as a service
3939
// ObjectQLPlugin will discover this and call ql.registerApp()
4040
const serviceName = `app.${appId}`;
41-
ctx.registerService(serviceName, this.bundle.manifest || this.bundle);
41+
42+
// Merge manifest with the bundle to ensure objects/apps are accessible at root
43+
// This supports both Legacy Manifests and new Stack Definitions
44+
const servicePayload = this.bundle.manifest
45+
? { ...this.bundle.manifest, ...this.bundle }
46+
: this.bundle;
47+
48+
ctx.registerService(serviceName, servicePayload);
4249
}
4350

4451
async start(ctx: PluginContext) {

0 commit comments

Comments
 (0)