refactor: clean upload pipeline and restore draco delivery
This commit is contained in:
+4
-2
@@ -6,8 +6,10 @@ import type { PushFile, RemoteFile } from './types'
|
||||
|
||||
const LFS_BATCH_SIZE = 100
|
||||
|
||||
type LogDetails = Record<string, string | number | boolean | undefined>
|
||||
|
||||
function isHttpError(err: unknown): err is { status: number } {
|
||||
return typeof err === 'object' && err !== null && 'status' in err && typeof (err as Record<string, unknown>).status === 'number'
|
||||
return isRecord(err) && typeof err.status === 'number'
|
||||
}
|
||||
|
||||
function getOctokit(): Octokit {
|
||||
@@ -51,7 +53,7 @@ function formatElapsed(startedAt: number) {
|
||||
return `${((performance.now() - startedAt) / 1000).toFixed(1)}s`
|
||||
}
|
||||
|
||||
function logInfo(step: string, action: string, startedAt: number, details?: Record<string, unknown>) {
|
||||
function logInfo(step: string, action: string, startedAt: number, details?: LogDetails) {
|
||||
console.info(`[INFO] ${step} -> ${action} | Timer: ${formatElapsed(startedAt)}`, details || '')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user