From 9475886bc8734455d58cc48ee78e9fcef190d27d Mon Sep 17 00:00:00 2001 From: troytt <47798984@qq.com> Date: Mon, 14 Sep 2026 09:30:55 +0000 Subject: [PATCH] =?UTF-8?q?fix(scripts):=20=E4=BF=AE=E5=A4=8D=20publish-pa?= =?UTF-8?q?cks=20=E7=BB=9F=E8=AE=A1=E5=9C=B0=E5=9B=BE=E5=85=B3=E5=8D=A1?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/publish-packs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/publish-packs.ts b/scripts/publish-packs.ts index 13e2279..6e1af39 100644 --- a/scripts/publish-packs.ts +++ b/scripts/publish-packs.ts @@ -72,7 +72,7 @@ function measure(): { files: number; bytes: number; maps: number; indexSha: stri if (!existsSync(indexPath)) { throw new PublishError(`no packs at ${PACKS_DIR} — run: npm run pack:data`) } - const index = JSON.parse(readFileSync(indexPath, 'utf8')) as { entries?: unknown[] } + const index = JSON.parse(readFileSync(indexPath, 'utf8')) as { entries?: unknown[]; levels?: unknown[] } const indexSha = createHash('sha256').update(readFileSync(indexPath)).digest('hex') let files = 0 let bytes = 0 @@ -87,7 +87,7 @@ function measure(): { files: number; bytes: number; maps: number; indexSha: stri } } walk(PACKS_DIR) - return { files, bytes, maps: index.entries?.length ?? 0, indexSha } + return { files, bytes, maps: index.levels?.length ?? index.entries?.length ?? 0, indexSha } } /**