mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-08 00:47:15 +08:00
remove cookie file when find cookie invalid for gascwb
This commit is contained in:
@@ -3,7 +3,10 @@ import minimist from 'minimist'
|
|||||||
import { loginWithCookieAssistant } from './login-with-cookie-assistant'
|
import { loginWithCookieAssistant } from './login-with-cookie-assistant'
|
||||||
import { checkCookieListFormat } from '../../common/utils/cookie'
|
import { checkCookieListFormat } from '../../common/utils/cookie'
|
||||||
import { sleep } from '@geekgeekrun/utils/sleep.mjs'
|
import { sleep } from '@geekgeekrun/utils/sleep.mjs'
|
||||||
import { readStorageFile } from '@geekgeekrun/geek-auto-start-chat-with-boss/runtime-file-utils.mjs'
|
import {
|
||||||
|
readStorageFile,
|
||||||
|
writeStorageFile
|
||||||
|
} from '@geekgeekrun/geek-auto-start-chat-with-boss/runtime-file-utils.mjs'
|
||||||
|
|
||||||
const runRecordId = minimist(process.argv.slice(2))['run-record-id'] ?? null
|
const runRecordId = minimist(process.argv.slice(2))['run-record-id'] ?? null
|
||||||
export class CookieInvalidHandlePlugin {
|
export class CookieInvalidHandlePlugin {
|
||||||
@@ -92,6 +95,7 @@ export class CookieInvalidHandlePlugin {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(`close browser failed`, err)
|
console.log(`close browser failed`, err)
|
||||||
}
|
}
|
||||||
|
await writeStorageFile('boss-cookies.json', [])
|
||||||
try {
|
try {
|
||||||
// popup login dialog, then update login status
|
// popup login dialog, then update login status
|
||||||
let app
|
let app
|
||||||
|
|||||||
Reference in New Issue
Block a user