From 6982f6028d08977858f471b417f655734f0e31a9 Mon Sep 17 00:00:00 2001
From: geekgeekrun-maintainer
<166113191+geekgeekrun-maintainer@users.noreply.github.com>
Date: Sat, 17 May 2025 17:38:40 +0800
Subject: [PATCH 1/3] Update README.md
---
README.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/README.md b/README.md
index f2a72dc..095f216 100644
--- a/README.md
+++ b/README.md
@@ -166,3 +166,11 @@ Boss不明原因已读不回?简历就是投不出去?
更多功能还在开发中~
祝你求职成功,事业顺利,事事顺心
+
+## Star 数据 感谢支持
+
+
+
+
+
+
From b57e646147dc3f1e47b25c83ff42423bb30334aa Mon Sep 17 00:00:00 2001
From: geekgeekrun
Date: Wed, 21 May 2025 02:17:27 +0800
Subject: [PATCH 2/3] move runMode from env to args. remove support of cli
mode.
---
.../geek-auto-start-chat-with-boss/index.mjs | 1 -
.../index.mjs | 7 +--
.../utils.mjs | 9 +---
.../sqlite-plugin/src/utils/module-loader.ts | 4 --
.../index.ts | 10 ++---
.../flow/OPEN_SETTING_WINDOW/ipc/index.ts | 43 ++++++++++---------
packages/ui/src/main/index.ts | 7 ++-
7 files changed, 36 insertions(+), 45 deletions(-)
diff --git a/packages/geek-auto-start-chat-with-boss/index.mjs b/packages/geek-auto-start-chat-with-boss/index.mjs
index 675b939..3a6256f 100644
--- a/packages/geek-auto-start-chat-with-boss/index.mjs
+++ b/packages/geek-auto-start-chat-with-boss/index.mjs
@@ -46,7 +46,6 @@ industryFilterExemption.forEach(item => {
ensureConfigFileExist()
ensureStorageFileExist()
-const isRunFromUi = Boolean(process.env.MAIN_BOSSGEEKGO_UI_RUN_MODE)
const isUiDev = process.env.NODE_ENV === 'development'
export const autoStartChatEventBus = new EventEmitter()
diff --git a/packages/launch-bosszhipin-login-page-with-preload-extension/index.mjs b/packages/launch-bosszhipin-login-page-with-preload-extension/index.mjs
index cecd3cd..2d67930 100644
--- a/packages/launch-bosszhipin-login-page-with-preload-extension/index.mjs
+++ b/packages/launch-bosszhipin-login-page-with-preload-extension/index.mjs
@@ -17,7 +17,6 @@ import {
runtimeFolderPath,
ensureEditThisCookie,
editThisCookieExtensionPath,
- isRunFromUi,
} from './utils.mjs'
import { EventEmitter } from 'node:events'
@@ -56,10 +55,8 @@ export async function main() {
page.once('close', async () => {
browser.close()
- if (isRunFromUi) {
- const electron = await import('electron')
- electron.app.quit()
- }
+ const electron = await import('electron')
+ electron.app.quit()
})
const { dispose: disposeNavigationLock } = await blockNavigation(page, (req) => !req.url().startsWith('https://www.zhipin.com'))
diff --git a/packages/launch-bosszhipin-login-page-with-preload-extension/utils.mjs b/packages/launch-bosszhipin-login-page-with-preload-extension/utils.mjs
index da1f6f8..aa66d5d 100644
--- a/packages/launch-bosszhipin-login-page-with-preload-extension/utils.mjs
+++ b/packages/launch-bosszhipin-login-page-with-preload-extension/utils.mjs
@@ -4,7 +4,6 @@ import os from 'node:os'
import extractZip from 'extract-zip'
import packageJson from './package.json' assert {type: 'json'}
-export const isRunFromUi = Boolean(process.env.MAIN_BOSSGEEKGO_UI_RUN_MODE)
const isUiDev = process.env.NODE_ENV === 'development'
export const runtimeFolderPath = path.join(os.homedir(), '.geekgeekrun')
@@ -28,12 +27,8 @@ async function getEditThisCookieZipPath () {
if (editThisCookieZipPath) {
return editThisCookieZipPath
}
- if (isRunFromUi) {
- const { app } = await import('electron')
- editThisCookieZipPath = path.join(app.getAppPath(), './node_modules', packageJson.name, 'extensions', 'EditThisCookie.zip')
- } else {
- editThisCookieZipPath = path.join(__dirname, 'extensions', 'EditThisCookie.zip')
- }
+ const { app } = await import('electron')
+ editThisCookieZipPath = path.join(app.getAppPath(), './node_modules', packageJson.name, 'extensions', 'EditThisCookie.zip')
return editThisCookieZipPath
}
diff --git a/packages/sqlite-plugin/src/utils/module-loader.ts b/packages/sqlite-plugin/src/utils/module-loader.ts
index 43a8b05..ff7ea5d 100644
--- a/packages/sqlite-plugin/src/utils/module-loader.ts
+++ b/packages/sqlite-plugin/src/utils/module-loader.ts
@@ -1,7 +1,3 @@
-import * as path from 'node:path';
-const isRunFromUi = Boolean(process.env.MAIN_BOSSGEEKGO_UI_RUN_MODE)
-const isUiDev = process.env.NODE_ENV === 'development'
-
export function requireTypeorm () {
const importResult = require('typeorm')
return importResult
diff --git a/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS_DAEMON/index.ts b/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS_DAEMON/index.ts
index cabd96d..0427f07 100644
--- a/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS_DAEMON/index.ts
+++ b/packages/ui/src/main/flow/GEEK_AUTO_START_CHAT_WITH_BOSS_DAEMON/index.ts
@@ -25,14 +25,10 @@ function runWithDaemon({ runRecordId, runMode, parentProcessPipe }) {
const subProcessOfCore = childProcess.spawn(
process.argv[0],
isUiDev
- ? [...process.argv.slice(1), `--run-record-id=${runRecordId}`]
- : [`--run-record-id=${runRecordId}`],
+ ? [process.argv[1], `--run-record-id=${runRecordId}`, `--mode=${runMode}`]
+ : [`--run-record-id=${runRecordId}`, `--mode=${runMode}`],
{
- stdio: ['inherit', 'inherit', 'inherit', 'pipe', 'ipc'],
- env: {
- ...process.env,
- MAIN_BOSSGEEKGO_UI_RUN_MODE: runMode
- }
+ stdio: ['inherit', 'inherit', 'inherit', 'pipe', 'ipc']
}
)
diff --git a/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts b/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts
index d5c2681..b5b799d 100644
--- a/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts
+++ b/packages/ui/src/main/flow/OPEN_SETTING_WINDOW/ipc/index.ts
@@ -151,12 +151,15 @@ export default function initIpc() {
}
const subProcessEnv = {
...process.env,
- MAIN_BOSSGEEKGO_UI_RUN_MODE: 'geekAutoStartWithBossDaemon',
PUPPETEER_EXECUTABLE_PATH: puppeteerExecutable.executablePath
}
subProcessOfPuppeteer = childProcess.spawn(
process.argv[0],
- [...process.argv.slice(1), '--mode-to-daemon=geekAutoStartWithBossMain'],
+ [
+ ...process.argv.slice(1),
+ `--mode=geekAutoStartWithBossDaemon`,
+ `--mode-to-daemon=geekAutoStartWithBossMain`
+ ],
{
env: subProcessEnv,
stdio: ['inherit', 'inherit', 'inherit', 'pipe', 'ipc']
@@ -205,13 +208,16 @@ export default function initIpc() {
}
const subProcessEnv = {
...process.env,
- MAIN_BOSSGEEKGO_UI_RUN_MODE: 'readNoReplyAutoReminder',
PUPPETEER_EXECUTABLE_PATH: puppeteerExecutable.executablePath
}
- subProcessOfPuppeteer = childProcess.spawn(process.argv[0], process.argv.slice(1), {
- env: subProcessEnv,
- stdio: ['inherit', 'inherit', 'inherit', 'pipe', 'ipc']
- })
+ subProcessOfPuppeteer = childProcess.spawn(
+ process.argv[0],
+ [...process.argv.slice(1), `--mode=readNoReplyAutoReminder`],
+ {
+ env: subProcessEnv,
+ stdio: ['inherit', 'inherit', 'inherit', 'pipe', 'ipc']
+ }
+ )
// console.log(subProcessOfPuppeteer)
return new Promise((resolve, reject) => {
subProcessOfPuppeteer!.stdio[3]!.pipe(JSONStream.parse()).on('data', async (raw) => {
@@ -264,15 +270,10 @@ export default function initIpc() {
if (subProcessOfCheckAndDownloadDependencies) {
return
}
- const subProcessEnv = {
- ...process.env,
- MAIN_BOSSGEEKGO_UI_RUN_MODE: 'checkAndDownloadDependenciesForInit'
- }
subProcessOfCheckAndDownloadDependencies = childProcess.spawn(
process.argv[0],
- process.argv.slice(1),
+ [...process.argv.slice(1), `--mode="checkAndDownloadDependenciesForInit"`],
{
- env: subProcessEnv,
stdio: [null, null, null, 'pipe', 'ipc']
}
)
@@ -334,12 +335,11 @@ export default function initIpc() {
}
const subProcessEnv = {
...process.env,
- MAIN_BOSSGEEKGO_UI_RUN_MODE: 'launchBossZhipinLoginPageWithPreloadExtension',
PUPPETEER_EXECUTABLE_PATH: (await getAnyAvailablePuppeteerExecutable())!.executablePath
}
subProcessOfBossZhipinLoginPageWithPreloadExtension = childProcess.spawn(
process.argv[0],
- process.argv.slice(1),
+ [...process.argv.slice(1), `--mode=launchBossZhipinLoginPageWithPreloadExtension`],
{
env: subProcessEnv,
stdio: [null, null, null, 'pipe', 'ipc']
@@ -415,13 +415,16 @@ export default function initIpc() {
const puppeteerExecutable = await getAnyAvailablePuppeteerExecutable()
const subProcessEnv = {
...process.env,
- MAIN_BOSSGEEKGO_UI_RUN_MODE: 'launchBossSite',
PUPPETEER_EXECUTABLE_PATH: puppeteerExecutable!.executablePath
}
- subProcessOfOpenBossSite = childProcess.spawn(process.argv[0], process.argv.slice(1), {
- env: subProcessEnv,
- stdio: ['inherit', 'inherit', 'inherit', 'pipe']
- })
+ subProcessOfOpenBossSite = childProcess.spawn(
+ process.argv[0],
+ [...process.argv.slice(1), `--mode=launchBossSite`],
+ {
+ env: subProcessEnv,
+ stdio: ['inherit', 'inherit', 'inherit', 'pipe']
+ }
+ )
subProcessOfOpenBossSite.once('exit', () => {
subProcessOfOpenBossSiteDefer = null
})
diff --git a/packages/ui/src/main/index.ts b/packages/ui/src/main/index.ts
index 4d1665d..f41dd58 100644
--- a/packages/ui/src/main/index.ts
+++ b/packages/ui/src/main/index.ts
@@ -1,4 +1,9 @@
-const runMode = process.env.MAIN_BOSSGEEKGO_UI_RUN_MODE
+import minimist from 'minimist'
+const isUiDev = process.env.NODE_ENV === 'development'
+const commandlineArgs = minimist(isUiDev ? process.argv.slice(2) : process.argv.slice(1))
+console.log(commandlineArgs)
+
+const runMode = commandlineArgs['mode'];
;(async () => {
switch (runMode) {
From ce38ecea55dc8ee491e7b67406a57057fe682508 Mon Sep 17 00:00:00 2001
From: geekgeekrun
Date: Wed, 28 May 2025 03:54:22 +0800
Subject: [PATCH 3/3] ui-v0.7.0
---
packages/ui/package.json | 2 +-
packages/ui/src/common/build-info.json | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/packages/ui/package.json b/packages/ui/package.json
index cc90387..caf1eeb 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -1,6 +1,6 @@
{
"name": "geekgeekrun-ui",
- "version": "0.6.1",
+ "version": "0.7.0",
"description": "Boss 炸弹 - 自动开聊Boss,助力每位打工人求职!",
"main": "./out/main/index.js",
"author": "geekgeekrun",
diff --git a/packages/ui/src/common/build-info.json b/packages/ui/src/common/build-info.json
index 32e17dc..29db789 100644
--- a/packages/ui/src/common/build-info.json
+++ b/packages/ui/src/common/build-info.json
@@ -1,7 +1,7 @@
{
- "version": "0.6.1",
- "buildVersion": 12,
- "buildTime": 1746891583817,
- "buildHash": "61c28ae1646c3cea900eae62acdd91b54a677508",
+ "version": "0.7.0",
+ "buildVersion": 13,
+ "buildTime": 1748375662119,
+ "buildHash": "340f8946b9c37e235296f1896d0d23be93cb22f3",
"name": "geekgeekrun-ui"
}
\ No newline at end of file