mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-05-11 18:09:50 +08:00
refactor json parser to json5
This commit is contained in:
@@ -9,10 +9,11 @@ import {
|
||||
import fs from 'node:fs'
|
||||
import { get__dirname } from '@bossgeekgo/utils/legacy-path.mjs';
|
||||
import path from 'node:path';
|
||||
import JSON5 from 'json5'
|
||||
|
||||
puppeteer.use(StealthPlugin())
|
||||
|
||||
const { cookies: bossCookies } = JSON.parse(
|
||||
const { cookies: bossCookies } = JSON5.parse(
|
||||
fs.readFileSync(
|
||||
path.join(
|
||||
get__dirname(),
|
||||
@@ -21,7 +22,7 @@ const { cookies: bossCookies } = JSON.parse(
|
||||
)
|
||||
)
|
||||
|
||||
const targetCompanyList = JSON.parse(
|
||||
const targetCompanyList = JSON5.parse(
|
||||
fs.readFileSync(
|
||||
path.join(
|
||||
get__dirname(),
|
||||
|
||||
@@ -7,8 +7,9 @@ import {
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { get__dirname } from '@bossgeekgo/utils/legacy-path.mjs';
|
||||
import JSON5 from 'json5'
|
||||
|
||||
const { groupRobotAccessToken: dingTalkAccessToken } = JSON.parse(
|
||||
const { groupRobotAccessToken: dingTalkAccessToken } = JSON5.parse(
|
||||
fs.readFileSync(
|
||||
path.join(
|
||||
get__dirname(),
|
||||
|
||||
Reference in New Issue
Block a user