()
| 21 | import { isMacOS, isWindows, PLATFORM } from "@/util/platformutil"; |
| 22 | |
| 23 | export function makeWaveEnvImpl(): WaveEnv { |
| 24 | return { |
| 25 | isMock: false, |
| 26 | electron: (window as any).api, |
| 27 | rpc: RpcApi, |
| 28 | getSettingsKeyAtom, |
| 29 | platform: PLATFORM, |
| 30 | isDev, |
| 31 | isWindows, |
| 32 | isMacOS, |
| 33 | atoms, |
| 34 | createBlock, |
| 35 | services: AllServiceImpls, |
| 36 | callBackendService: WOS.callBackendService, |
| 37 | showContextMenu: (menu: ContextMenuItem[], e: React.MouseEvent) => { |
| 38 | ContextMenuModel.getInstance().showContextMenu(menu, e); |
| 39 | }, |
| 40 | getConnStatusAtom, |
| 41 | getLocalHostDisplayNameAtom, |
| 42 | wos: { |
| 43 | getWaveObjectAtom: WOS.getWaveObjectAtom, |
| 44 | getWaveObjectLoadingAtom: WOS.getWaveObjectLoadingAtom, |
| 45 | isWaveObjectNullAtom: WOS.isWaveObjectNullAtom, |
| 46 | useWaveObjectValue: WOS.useWaveObjectValue, |
| 47 | }, |
| 48 | getBlockMetaKeyAtom, |
| 49 | getTabMetaKeyAtom, |
| 50 | getConfigBackgroundAtom, |
| 51 | getConnConfigKeyAtom, |
| 52 | |
| 53 | mockSetWaveObj: <T extends WaveObj>(_oref: string, _obj: T) => { |
| 54 | throw new Error("mockSetWaveObj is only available in the preview server"); |
| 55 | }, |
| 56 | mockModels: new Map<any, any>(), |
| 57 | }; |
| 58 | } |
no test coverage detected