Compare commits

...

7 Commits

Author SHA1 Message Date
bebb14b63d chore: bump version to 1.0.4 2024-07-21 14:30:40 +08:00
2adf56d062 fix(gachaDetail): reset countMio when get S-Rank 2024-07-21 14:26:14 +08:00
ee94ae36cd chore: bump version to 1.0.3 2024-07-21 13:33:58 +08:00
e575e46238 fix(getData): update API host for OS servers 2024-07-21 13:33:04 +08:00
3fac233471 fix(getData): game path for test not removed 2024-07-21 13:26:29 +08:00
d99af2cc26 chore: bump version to v1.0.2 2024-07-20 19:25:15 +08:00
681e664e32 feat: check url from cache
1. NEVER MODIFY THE `yarn.lock` YOU GET. YOU NEVER KNOW WHAT IT CRASHES
2. FUCK REGEX
2024-07-20 19:24:01 +08:00
4 changed files with 1822 additions and 1668 deletions

View File

@ -1,6 +1,6 @@
{
"name": "zzz-signal-search-export",
"version": "1.0.1",
"version": "1.0.4",
"main": "./dist/electron/main/main.js",
"author": "earthjasonlin <https://git.loliquq.cn/earthjasonlin>",
"homepage": "https://github.com/earthjasonlin/zzz-signal-search-export",

View File

@ -139,7 +139,19 @@ const readLog = async () => {
const promises = logPaths.map(async logpath => {
const logText = await fs.readFile(logpath, 'utf8')
const url = logText.match(/https:\/\/.*?\/info/g)
if (url) {
return getLatestUrl(url)
}
const gamePathMch = logText.match(/([A-Z]:\/.*?\/)(?=ZenlessZoneZero_Data)/i)
if (gamePathMch) {
const[cacheText, cacheFile] = await getCacheText(gamePathMch[0]+"/ZenlessZoneZero_Data")
const urlMch = cacheText.match(/https.+?authkey=.+?end_id=/g)
if (urlMch) {
cacheFolder = cacheFile.replace(/Cache_Data[/\\]data_2$/, '')
return getLatestUrl(urlMch)
}
}
})
const result = await Promise.all(promises)
for (let url of result) {
@ -281,8 +293,8 @@ const fixAuthkey = (url) => {
const getQuerystring = (url) => {
const text = i18n.log
const { searchParams, host } = new URL(fixAuthkey(url))
if (host.includes('webstatic-sea') || host.includes('hkrpg-api-os') || host.includes('api-os-takumi') || host.includes('hoyoverse.com')) {
apiDomain = 'https://api-os-takumi.mihoyo.com'
if (host.includes('webstatic-sea') || host.includes('hoyoverse.com')) {
apiDomain = 'https://public-operation-nap-sg.hoyoverse.com'
} else {
apiDomain = 'https://public-operation-nap.mihoyo.com'
}

View File

@ -54,7 +54,7 @@ const gachaDetail = (data) => {
detail.ssrPos.push([name, index + 1 - lastSSR, time, key])
lastSSR = index + 1
detail.count4++
detail.countMio++
detail.countMio = 0
if (isWeapon(type)) {
detail.count4w++
itemCount(detail.weapon4, name)

3468
yarn.lock

File diff suppressed because it is too large Load Diff