/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import Application from '../application'; import type { AppDiscoveryAdapter, AppProcessAdapter, AppStatus, GetAppOptions } from './types'; import type { AppSupervisor } from './index'; /** Minimal single-process adapter only for booting the main application. */ export declare class MainOnlyAdapter implements AppDiscoveryAdapter, AppProcessAdapter { protected readonly supervisor: AppSupervisor; readonly name: string; apps: Record; status: AppStatus; appErrors: Record; constructor(supervisor: AppSupervisor); getApp(appName: string, options?: GetAppOptions): Promise>; bootstrapApp(appName: string): Promise; addApp(app: Application): Application; getApps(): Application[]; hasApp(appName: string): boolean; startApp(appName: string): Promise; stopApp(appName: string): Promise; removeApp(appName: string): Promise; upgradeApp(appName: string): Promise; removeAllApps(): Promise; setAppStatus(appName: string, status: AppStatus, options?: {}): void; getAppStatus(appName: string, defaultStatus?: AppStatus): AppStatus; hasAppError(appName: string): boolean; setAppError(appName: string, error: Error): void; clearAppError(appName: string): void; setAppLastSeenAt(): void; getAppLastSeenAt(appName: string): any; }