mirror of
https://github.com/koush/scrypted.git
synced 2026-04-27 02:11:08 +01:00
server: basic auth. object stats.
This commit is contained in:
@@ -67,9 +67,14 @@ export class PluginComponent {
|
||||
async getPluginInfo(pluginId: string) {
|
||||
const plugin = await this.scrypted.datastore.tryGet(Plugin, pluginId);
|
||||
const host = this.scrypted.plugins[pluginId];
|
||||
let rpcObjects = 0;
|
||||
if (host.peer) {
|
||||
rpcObjects = host.peer.localProxied.size + Object.keys(host.peer.remoteWeakProxies).length;
|
||||
}
|
||||
return {
|
||||
pid: host?.worker?.process.pid,
|
||||
stats: host?.stats,
|
||||
rpcObjects,
|
||||
packageJson: plugin.packageJson,
|
||||
id: this.scrypted.findPluginDevice(pluginId),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user