No JSDoc comment in source yet.
API
@Component()
export class PluginModulesService implements PluginModules {
@Use() private readonly config!: Config;
@Use() private readonly hmr!: Hmr;
@Use() private readonly reassembly!: Reassembly;
@Use() private readonly projectConfig!: ProjectConfigStore;
@Use() private readonly db!: Db;
@Use() private readonly library!: PluginLibrary;
@Use() private readonly ledger!: PluginModuleRequests;
@Use() private readonly preinstalls!: PluginModulePreinstalls;
@Use() private readonly projects!: Projects;
@Use() private readonly members!: Members;
@Use() private readonly users!: Users;
@Use() private readonly channels!: Channels;
@Use() private readonly log!: Log;
@Use() private readonly clock!: Clock;
setup();
async status(projectId: string, viewer: ModuleActor): Promise<PluginModuleStatus[]>;
async ensure(projectId: string, plugins: readonly string[], actor: ModuleActor | null, ask: "install" | "explicit", agentId?: string): Promise<PluginModuleAction[]>;
async preinstall(projectId: string): Promise<void>;
async askForPackage(projectId: string, pkg: string, actor: ModuleActor, agentId: string | null): Promise<PluginModuleAction[]>;
async requests(): Promise<PluginModuleRequestsResponse>;
async decide(pkg: string, decision: "enable" | "decline", admin: ModuleActor): Promise<PluginModuleRequestsResponse>;
}Dependencies & Wiring
Extracted from class decorators@Userequires (14)
config: Config · hmr: Hmr · reassembly: Reassembly · projectConfig: ProjectConfigStore · db: Db · library: PluginLibrary · ledger: PluginModuleRequests · preinstalls: PluginModulePreinstalls · projects: Projects · members: Members · users: Users · channels: Channels · log: Log · clock: ClockMethods (7)
setup
setup()status
async status(projectId: string, viewer: ModuleActor): Promise<PluginModuleStatus[]>@paramprojectId
string@paramviewer
ModuleActor@returns
Promise<PluginModuleStatus[]>ensure
async ensure(projectId: string, plugins: readonly string[], actor: ModuleActor | null, ask: "install" | "explicit", agentId?: string): Promise<PluginModuleAction[]>@paramprojectId
string@paramplugins
readonly string[]@paramactor
ModuleActor | null@paramask
"install" | "explicit"@paramagentId?
string@returns
Promise<PluginModuleAction[]>preinstall
async preinstall(projectId: string): Promise<void>@paramprojectId
string@returns
Promise<void>askForPackage
async askForPackage(projectId: string, pkg: string, actor: ModuleActor, agentId: string | null): Promise<PluginModuleAction[]>@paramprojectId
string@parampkg
string@paramactor
ModuleActor@paramagentId
string | null@returns
Promise<PluginModuleAction[]>requests
async requests(): Promise<PluginModuleRequestsResponse>@returns
Promise<PluginModuleRequestsResponse>decide
async decide(pkg: string, decision: "enable" | "decline", admin: ModuleActor): Promise<PluginModuleRequestsResponse>@parampkg
string@paramdecision
"enable" | "decline"@paramadmin
ModuleActor@returns
Promise<PluginModuleRequestsResponse>