Skip to main content

LightReport

Hierarchy

Index

Constructors

constructor

  • new LightReport(__namedParameters: LightReportOptions): LightReport
  • Parameters

    • __namedParameters: LightReportOptions

    Returns LightReport

Properties

cacheHits

cacheHits: Set<LocatorHash> = ...

cacheMisses

cacheMisses: Set<LocatorHash> = ...

Methods

createStreamReporter

  • createStreamReporter(prefix?: null | string): PassThrough
  • Parameters

    • prefix: null | string = null

    Returns PassThrough

exitCode

  • exitCode(): 0 | 1
  • Returns 0 | 1

finalize

  • finalize(): Promise<void>
  • Returns Promise<void>

getRecommendedLength

  • getRecommendedLength(): number
  • Returns number

hasErrors

  • hasErrors(): boolean
  • Returns boolean

reportCacheHit

  • reportCacheHit(locator: Locator): void
  • Parameters

    Returns void

reportCacheMiss

  • reportCacheMiss(locator: Locator): void
  • Parameters

    Returns void

reportError

  • Parameters

    Returns void

reportErrorOnce

  • reportErrorOnce(name: MessageName, text: string, opts?: { key?: any; reportExtra?: (report: Report) => void }): void
  • Parameters

    • name: MessageName
    • text: string
    • optionalopts: { key?: any; reportExtra?: (report: Report) => void }

    Returns void

reportExceptionOnce

  • Parameters

    Returns void

reportFold

  • reportFold(title: string, text: string): void
  • Parameters

    • title: string
    • text: string

    Returns void

reportInfo

  • reportInfo(name: null | MessageName, text: string): void
  • Parameters

    Returns void

reportInfoOnce

  • reportInfoOnce(name: MessageName, text: string, opts?: { key?: any; reportExtra?: (report: Report) => void }): void
  • Parameters

    • name: MessageName
    • text: string
    • optionalopts: { key?: any; reportExtra?: (report: Report) => void }

    Returns void

reportJson

  • reportJson(data: any): void
  • Parameters

    • data: any

    Returns void

reportProgress

  • reportProgress(progress: AsyncIterable<{ progress: number; title?: string }>): { stop: () => void }
  • Parameters

    • progress: AsyncIterable<{ progress: number; title?: string }>

    Returns { stop: () => void }

    • stop: () => void
        • (): void
        • Returns void

reportSeparator

  • reportSeparator(): void
  • Returns void

reportWarning

  • Parameters

    Returns void

reportWarningOnce

  • reportWarningOnce(name: MessageName, text: string, opts?: { key?: any; reportExtra?: (report: Report) => void }): void
  • Parameters

    • name: MessageName
    • text: string
    • optionalopts: { key?: any; reportExtra?: (report: Report) => void }

    Returns void

startProgressPromise

  • startProgressPromise<T, P>(progressIt: P, cb: (progressIt: P) => Promise<T>): Promise<T>
  • Type parameters

    • T
    • P: ProgressIterable

    Parameters

    • progressIt: P
    • cb: (progressIt: P) => Promise<T>

    Returns Promise<T>

startProgressSync

  • startProgressSync<T, P>(progressIt: P, cb: (progressIt: P) => T): T
  • Type parameters

    • T
    • P: ProgressIterable

    Parameters

    • progressIt: P
    • cb: (progressIt: P) => T

    Returns T

startSectionPromise

  • startSectionPromise<T>(opts: SectionOptions, cb: () => Promise<T>): Promise<T>
  • Type parameters

    • T

    Parameters

    • opts: SectionOptions
    • cb: () => Promise<T>

    Returns Promise<T>

startSectionSync

  • startSectionSync<T>(opts: SectionOptions, cb: () => T): T
  • Type parameters

    • T

    Parameters

    • opts: SectionOptions
    • cb: () => T

    Returns T

startTimerPromise

  • startTimerPromise<T>(what: string, opts: TimerOptions, cb: () => Promise<T>): Promise<T>
  • startTimerPromise<T>(what: string, cb: () => Promise<T>): Promise<T>
  • Type parameters

    • T

    Parameters

    • what: string
    • opts: TimerOptions
    • cb: () => Promise<T>

    Returns Promise<T>

startTimerSync

  • startTimerSync<T>(what: string, opts: TimerOptions, cb: () => T): T
  • startTimerSync<T>(what: string, cb: () => T): T
  • Type parameters

    • T

    Parameters

    • what: string
    • opts: TimerOptions
    • cb: () => T

    Returns T

staticprogressViaCounter

  • progressViaCounter(max: number): { hasProgress: boolean; hasTitle: boolean; set: (n: number) => void; tick: (n?: number) => void; [asyncIterator]: any }
  • Parameters

    • max: number

    Returns { hasProgress: boolean; hasTitle: boolean; set: (n: number) => void; tick: (n?: number) => void; [asyncIterator]: any }

    • hasProgress: boolean
    • hasTitle: boolean
    • set: (n: number) => void
        • (n: number): void
        • Parameters

          • n: number

          Returns void

    • tick: (n?: number) => void
        • (n?: number): void
        • Parameters

          • n: number = 0

          Returns void

    • [asyncIterator]: function
      • [asyncIterator](): AsyncGenerator<{ progress: number }, void, unknown>

      • Returns AsyncGenerator<{ progress: number }, void, unknown>

staticprogressViaTitle

  • progressViaTitle(): { hasProgress: boolean; hasTitle: boolean; setTitle: (title: string) => void; [asyncIterator]: any }
  • Returns { hasProgress: boolean; hasTitle: boolean; setTitle: (title: string) => void; [asyncIterator]: any }

    • hasProgress: boolean
    • hasTitle: boolean
    • setTitle: (title: string) => void
        • (title: string): void
        • Parameters

          • title: string

          Returns void

    • [asyncIterator]: function
      • [asyncIterator](): AsyncGenerator<{ title: undefined | string }, never, unknown>

      • Returns AsyncGenerator<{ title: undefined | string }, never, unknown>

staticstart