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 } } /**