diff --git a/package-lock.json b/package-lock.json index 1464f15d24..c4067ccc1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.3.42", "dependencies": { "@atlaskit/pragmatic-drag-and-drop": "^1.3.1", - "@comfyorg/comfyui-electron-types": "^0.2.10", + "@comfyorg/comfyui-electron-types": "^0.2.16", "@comfyorg/litegraph": "^0.8.26", "@primevue/themes": "^4.0.5", "@vueuse/core": "^11.0.0", @@ -1916,9 +1916,9 @@ "dev": true }, "node_modules/@comfyorg/comfyui-electron-types": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/@comfyorg/comfyui-electron-types/-/comfyui-electron-types-0.2.10.tgz", - "integrity": "sha512-JwqFeqmJBp6n276Ki+VEkMkO43rFHobdt93AzJYpWC+BXGUuvTyquon/MvblWtJDnTdO0mGWGXztDFe0sXie6A==", + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/@comfyorg/comfyui-electron-types/-/comfyui-electron-types-0.2.16.tgz", + "integrity": "sha512-Hm6NeyMK4sd2V5AyOnvfI+tvCsXr5NBG8wOZlWyyD17ADpbQnpm6qPMWzvm4vCp/YvTR7cUbDGiY0quhofuQGg==", "license": "GPL-3.0-only" }, "node_modules/@comfyorg/litegraph": { diff --git a/package.json b/package.json index 94035cdb60..6b29847936 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ }, "dependencies": { "@atlaskit/pragmatic-drag-and-drop": "^1.3.1", - "@comfyorg/comfyui-electron-types": "^0.2.10", + "@comfyorg/comfyui-electron-types": "^0.2.16", "@comfyorg/litegraph": "^0.8.26", "@primevue/themes": "^4.0.5", "@vueuse/core": "^11.0.0", diff --git a/src/components/install/InstallLocationPicker.vue b/src/components/install/InstallLocationPicker.vue index 2a8402714e..cfc6fcf9a4 100644 --- a/src/components/install/InstallLocationPicker.vue +++ b/src/components/install/InstallLocationPicker.vue @@ -77,8 +77,7 @@ const pathError = defineModel('pathError', { required: true }) const appData = ref('') const appPath = ref('') -// TODO: Implement the actual electron API. -const electron = electronAPI() as any +const electron = electronAPI() // Get system paths on component mount onMounted(async () => { diff --git a/src/components/install/MigrationPicker.vue b/src/components/install/MigrationPicker.vue index 609de6a487..abea9af565 100644 --- a/src/components/install/MigrationPicker.vue +++ b/src/components/install/MigrationPicker.vue @@ -68,38 +68,45 @@ diff --git a/src/views/ServerStartView.vue b/src/views/ServerStartView.vue index 81fac0a720..4cfba95de2 100644 --- a/src/views/ServerStartView.vue +++ b/src/views/ServerStartView.vue @@ -14,9 +14,9 @@ import { ProgressStatus, ProgressMessages } from '@comfyorg/comfyui-electron-types' -import { electronAPI as getElectronAPI } from '@/utils/envUtil' +import { electronAPI } from '@/utils/envUtil' -const electronAPI = getElectronAPI() +const electron = electronAPI() const status = ref(ProgressStatus.INITIAL_STATE) const logs = ref([]) @@ -35,9 +35,9 @@ const fetchLogs = async () => { } onMounted(() => { - electronAPI.sendReady() - electronAPI.onProgressUpdate(updateProgress) - electronAPI.onLogMessage((message: string) => { + electron.sendReady() + electron.onProgressUpdate(updateProgress) + electron.onLogMessage((message: string) => { addLogMessage(message) }) }) diff --git a/vite.config.mts b/vite.config.mts index 0b8fde0b9f..616c5c157e 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -176,6 +176,9 @@ export default defineConfig({ }, optimizeDeps: { - exclude: ['@comfyorg/litegraph'] + exclude: [ + '@comfyorg/litegraph', + '@comfyorg/comfyui-electron-types' + ] } }) as UserConfigExport