diff --git a/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer.ts b/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer-executable.ts similarity index 95% rename from packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer.ts rename to packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer-executable.ts index c278e0f..acf52b1 100644 --- a/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer.ts +++ b/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer-executable.ts @@ -51,7 +51,7 @@ export const checkPuppeteerExecutable = async () => { } } -const checkAndDownloadPuppeteer = async ( +const checkAndDownloadPuppeteerExecutable = async ( options: { downloadProgressCallback?: (downloadedBytes: number, totalBytes: number) => void confirmContinuePromise?: Promise @@ -88,4 +88,4 @@ const checkAndDownloadPuppeteer = async ( return installedBrowser } -export default checkAndDownloadPuppeteer +export default checkAndDownloadPuppeteerExecutable diff --git a/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/index.ts b/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/index.ts index 390391a..89c5a17 100644 --- a/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/index.ts +++ b/packages/ui/src/main/flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/index.ts @@ -1,5 +1,5 @@ import { app } from 'electron' -import checkAndDownloadPuppeteer from './check-and-download-puppeteer' +import checkAndDownloadPuppeteerExecutable from './check-and-download-puppeteer-executable' import * as net from 'net' import { pipeWriteRegardlessError } from '../utils/pipe' @@ -27,7 +27,7 @@ export const checkAndDownloadDependenciesForInit = async () => { try { let timeoutTimer = 0 await new Promise((resolve, reject) => { - checkAndDownloadPuppeteer({ + checkAndDownloadPuppeteerExecutable({ downloadProgressCallback(downloadedBytes: number, totalBytes: number) { clearTimeout(timeoutTimer) if (downloadedBytes !== totalBytes) { diff --git a/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS.ts b/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS.ts index 05b70c8..409c93d 100644 --- a/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS.ts +++ b/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS.ts @@ -5,7 +5,7 @@ import { readConfigFile } from '@geekgeekrun/geek-auto-start-chat-with-boss/runt import * as net from 'net' import { checkPuppeteerExecutable, -} from './CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer' +} from './CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer-executable' import { pipeWriteRegardlessError } from './utils/pipe' const { groupRobotAccessToken: dingTalkAccessToken } = readConfigFile('dingtalk.json') diff --git a/packages/ui/src/main/window/mainWindow.ts b/packages/ui/src/main/window/mainWindow.ts index 3c12609..da47326 100644 --- a/packages/ui/src/main/window/mainWindow.ts +++ b/packages/ui/src/main/window/mainWindow.ts @@ -12,7 +12,7 @@ import { ChildProcess } from 'child_process' import { checkPuppeteerExecutable, getExpectPuppeteerExecutablePath -} from '../flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer' +} from '../flow/CHECK_AND_DOWNLOAD_DEPENDENCIES/check-and-download-puppeteer-executable' import * as JSONStream from 'JSONStream' import { DOWNLOAD_ERROR_EXIT_CODE } from '../flow/CHECK_AND_DOWNLOAD_DEPENDENCIES' let mainWindow: BrowserWindow = null