No JSDoc comment in source yet.
API
@Component({
name: "PluginModulesServiceImpl",
key: "@prismshadow/penguin-server#PluginModulesService",
})
export class PluginModulesService implements PluginModules {
@Use() private readonly config!: PluginProcessConfig;
@Use() private readonly hmr!: PluginHmr;
@Use() private readonly reassembly!: PluginReassembly;
@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!: PluginChannels;
@Use() private readonly log!: PluginLog;
@Use() private readonly clock!: PluginClock;
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: PluginProcessConfig · hmr: PluginHmr · reassembly: PluginReassembly · projectConfig: ProjectConfigStore · db: Db · library: PluginLibrary · ledger: PluginModuleRequests · preinstalls: PluginModulePreinstalls · projects: Projects · members: Members · users: Users · channels: PluginChannels · log: PluginLog · clock: PluginClockMethods (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>