@lvce-editor/rpc-registry 3.9.0 → 3.10.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.
package/dist/index.d.ts CHANGED
@@ -620,6 +620,7 @@ export interface LazyRpc {
620
620
  }
621
621
  export declare const createLazyRpc: (rpcId: number) => LazyRpc;
622
622
  export declare const getIpcType: (argv: readonly string[]) => number;
623
+ declare const registerMockRpc$5: (rpcId: number, commandMap: Record<string, any>) => MockRpc;
623
624
  declare const set$17: (id: number, rpc: Rpc) => void;
624
625
  export declare const get: (id: number) => Rpc;
625
626
  declare const remove$2: (id: number) => void;
@@ -701,6 +702,7 @@ export {
701
702
  SearchProcess,
702
703
  SharedProcess,
703
704
  SyntaxHighlightingWorker,
705
+ registerMockRpc$5 as registerMockRpc,
704
706
  remove$2 as remove,
705
707
  set$17 as set,
706
708
  };
@@ -19,4 +19,5 @@ export * as SharedProcess from "../SharedProcess/SharedProcess.js";
19
19
  export * as SyntaxHighlightingWorker from "../SyntaxHighlightingWorker/SyntaxHighlightingWorker.js";
20
20
  export * from "../CreateLazyRpc/CreateLazyRpc.js";
21
21
  export * from "../GetIpcType/GetIpcType.js";
22
+ export * from "../RegisterMockRpc/RegisterMockRpc.js";
22
23
  export * from "../RpcRegistry/RpcRegistry.js";
@@ -0,0 +1,7 @@
1
+ import { createMockRpc } from '@lvce-editor/rpc';
2
+ import { set } from "../RpcRegistry/RpcRegistry.js";
3
+ export const registerMockRpc = (rpcId, commandMap) => {
4
+ const mockRpc = createMockRpc({ commandMap });
5
+ set(rpcId, mockRpc);
6
+ return mockRpc;
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/rpc-registry",
3
- "version": "3.9.0",
3
+ "version": "3.10.0",
4
4
  "description": "Rpc Registry",
5
5
  "license": "MIT",
6
6
  "author": "Lvce Editor",