From b930a421b45b9d34be1afd0edabd2662e4e5baa7 Mon Sep 17 00:00:00 2001 From: daydreamer-json Date: Mon, 16 Feb 2026 00:36:31 +0900 Subject: [PATCH] fix: resolve mirror json generation logic issue --- src/cmds/archive.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cmds/archive.ts b/src/cmds/archive.ts index 4995d48..624d2b0 100644 --- a/src/cmds/archive.ts +++ b/src/cmds/archive.ts @@ -164,6 +164,12 @@ async function saveToGHMirror(url: string, name: string | null): Promise { })(); if (!mirrorFileDb.find((e) => e.orig.includes(stringUtils.removeQueryStr(url)))) { await githubUtils.uploadAsset(octoClient, githubAuthCfg, url, name); + if (githubAuthCfg) { + mirrorFileDb.push({ + orig: stringUtils.removeQueryStr(url), + mirror: `https://github.com/${githubAuthCfg.owner}/${githubAuthCfg.repo}/releases/download/${githubAuthCfg.tag}/${name ?? new URL(url).pathname.split('/').pop() ?? ''}`, + }); + } } }