@lvce-editor/rpc-registry 9.30.0 → 9.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,6 @@
1
1
  export declare const dispose: () => Promise<void>, invoke: (method: string, ...params: readonly unknown[]) => Promise<any>, invokeAndTransfer: (method: string, ...params: readonly unknown[]) => Promise<any>, registerMockRpc: (commandMap: Record<string, any>) => import("../DisposableMockRpc/DisposableMockRpc.ts").DisposableMockRpc, set: (rpc: import("@lvce-editor/rpc").Rpc) => void;
2
+ export interface GetMainProcessIdOptions {
3
+ readonly includeElectronData: boolean;
4
+ }
5
+ export declare const getMainProcessId: (options: GetMainProcessIdOptions) => Promise<number>;
6
+ export declare const listProcessesWithMemoryUsage: (rootPid: number, includeElectronData: boolean) => Promise<readonly any[]>;
@@ -1,2 +1,10 @@
1
1
  import * as RpcFactory from "../RpcFactory/RpcFactory.js";
2
2
  export const { dispose, invoke, invokeAndTransfer, registerMockRpc, set } = RpcFactory.create(10_001);
3
+ export const getMainProcessId = async (options) => {
4
+ const result = await invoke('ProcessId.getMainProcessId', options);
5
+ return result;
6
+ };
7
+ export const listProcessesWithMemoryUsage = async (rootPid, includeElectronData) => {
8
+ // @ts-ignore
9
+ return invoke('ListProcessesWithMemoryUsage.listProcessesWithMemoryUsage', rootPid, includeElectronData);
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/rpc-registry",
3
- "version": "9.30.0",
3
+ "version": "9.32.0",
4
4
  "description": "Rpc Registry",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "main": "dist/index.js",
14
14
  "dependencies": {
15
15
  "@lvce-editor/assert": "^1.5.1",
16
- "@lvce-editor/constants": "^5.15.0",
16
+ "@lvce-editor/constants": "^5.17.0",
17
17
  "@lvce-editor/rpc": "^6.4.0"
18
18
  },
19
19
  "exports": "./dist/index.js",