auditjs
Version:
Audit dependencies to identify known vulnerabilities and maintenance problems
25 lines (24 loc) • 1.04 kB
TypeScript
import { Coordinates } from '../Types/Coordinates';
import { OssIndexServerResultJSON } from '../Types/OssIndexServerResult';
export declare class OssIndexRequestService {
readonly user?: string | undefined;
readonly password?: string | undefined;
readonly cacheLocation: string;
private baseURL;
constructor(user?: string | undefined, password?: string | undefined, cacheLocation?: string, baseURL?: string);
private checkStatus;
private getHeaders;
private getResultsFromOSSIndex;
private chunkData;
private combineResponseChunks;
private combineCacheAndResponses;
private insertResponsesIntoCache;
private checkIfResultsAreInCache;
/**
* Posts to OSS Index {@link COMPONENT_REPORT_ENDPOINT}, returns Promise of json object of response
* @param data - {@link Coordinates} Array
* @returns a {@link Promise} of all Responses
*/
callOSSIndexOrGetFromCache(data: Coordinates[], format?: string): Promise<Array<OssIndexServerResultJSON>>;
private getBasicAuth;
}