From 9e1ca22395a518ec7064ef4ddda4f2c9884e5e0e 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() ?? ''}`, + }); + } } }