mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-06-02 14:10:45 +08:00
import db in ui project
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
"@geekgeekrun/dingtalk-plugin": "workspace:*",
|
||||
"@geekgeekrun/geek-auto-start-chat-with-boss": "workspace:*",
|
||||
"@geekgeekrun/launch-bosszhipin-login-page-with-preload-extension": "workspace:*",
|
||||
"@geekgeekrun/sqlite-plugin": "workspace:*",
|
||||
"@geekgeekrun/utils": "workspace:*",
|
||||
"@puppeteer/browsers": "^2.0.0",
|
||||
"JSONStream": "^1.3.5",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import path from 'node:path'
|
||||
import * as url from 'url'
|
||||
import { sleep } from '@geekgeekrun/utils/sleep.mjs'
|
||||
import childProcess from 'node:child_process'
|
||||
import { AUTO_CHAT_ERROR_EXIT_CODE } from '../../../common/enums/auto-start-chat'
|
||||
|
||||
@@ -8,10 +8,14 @@ import { getAnyAvailablePuppeteerExecutable } from '../CHECK_AND_DOWNLOAD_DEPEND
|
||||
import { sleep } from '@geekgeekrun/utils/sleep.mjs'
|
||||
import { AUTO_CHAT_ERROR_EXIT_CODE } from '../../../common/enums/auto-start-chat'
|
||||
|
||||
import SqlitePluginModule from '@geekgeekrun/sqlite-plugin'
|
||||
const { default: SqlitePlugin } = SqlitePluginModule
|
||||
|
||||
const { groupRobotAccessToken: dingTalkAccessToken } = readConfigFile('dingtalk.json')
|
||||
|
||||
const initPlugins = (hooks) => {
|
||||
new DingtalkPlugin(dingTalkAccessToken).apply(hooks)
|
||||
new SqlitePlugin().apply(hooks)
|
||||
}
|
||||
|
||||
let isParentProcessDisconnect = false
|
||||
@@ -62,8 +66,9 @@ export const runAutoChat = async () => {
|
||||
puppeteerLaunched: new SyncHook(),
|
||||
pageLoaded: new SyncHook(),
|
||||
cookieWillSet: new SyncHook(['cookies']),
|
||||
userInfoResponse: new AsyncSeriesHook(['userInfo']),
|
||||
newChatWillStartup: new AsyncSeriesHook(['positionInfoDetail']),
|
||||
newChatStartup: new SyncHook(['positionInfoDetail']),
|
||||
newChatStartup: new AsyncSeriesHook(['positionInfoDetail']),
|
||||
noPositionFoundForCurrentJob: new SyncHook(),
|
||||
noPositionFoundAfterTraverseAllJob: new SyncHook(),
|
||||
errorEncounter: new SyncHook(['errorInfo'])
|
||||
|
||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -103,6 +103,9 @@ importers:
|
||||
'@geekgeekrun/launch-bosszhipin-login-page-with-preload-extension':
|
||||
specifier: workspace:*
|
||||
version: link:../launch-bosszhipin-login-page-with-preload-extension
|
||||
'@geekgeekrun/sqlite-plugin':
|
||||
specifier: workspace:*
|
||||
version: link:../sqlite-plugin
|
||||
'@geekgeekrun/utils':
|
||||
specifier: workspace:*
|
||||
version: link:../utils
|
||||
|
||||
Reference in New Issue
Block a user