@newspapper/core
    Preparing search index...

    Interface RefreshOptions

    interface RefreshOptions {
        sourceId?: string;
        onProgress?: (e: ScrapeProgressEvent) => void;
        userAgent?: string;
        requestTimeoutMs?: number;
        retentionDays?: number;
        keepPerSource?: number;
        signal?: AbortSignal;
        deps?: SafeFetchDeps;
        now?: () => Date;
    }
    Index
    sourceId?: string

    Refresh just this source (if it exists and is enabled). Default: every enabled source.

    onProgress?: (e: ScrapeProgressEvent) => void
    userAgent?: string
    requestTimeoutMs?: number
    retentionDays?: number

    Purge window. Default READER_RETENTION_DAYS, else 30.

    keepPerSource?: number

    Items each source keeps past the window. Default 50.

    signal?: AbortSignal

    Stops the run: no further source starts, in-flight fetches abort, and nothing aborted is recorded as a source error.

    deps?: SafeFetchDeps

    Injected fetch and DNS, for tests.

    now?: () => Date

    Injected clock, for tests.