@snyk/code-client
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -12,4 +12,4 @@ import { AnalysisSeverity, IGitBundle, IFileBundle, IBundleResult } from './interfaces/analysis-result.interface'; | ||
}): Promise<IBundleResult>; | ||
export declare function analyzeFolders(baseURL: string | undefined, sessionToken: string | undefined, includeLint: boolean | undefined, severity: AnalysisSeverity | undefined, paths: string[], symlinksEnabled?: boolean, maxPayload?: number, defaultFileIgnores?: string[]): Promise<IFileBundle>; | ||
export declare function analyzeFolders(baseURL: string | undefined, sessionToken: string | undefined, includeLint: boolean | undefined, severity: AnalysisSeverity | undefined, paths: string[], symlinksEnabled?: boolean, maxPayload?: number, defaultFileIgnores?: string[], sarif?: boolean): Promise<IFileBundle>; | ||
export declare function extendAnalysis(bundle: IFileBundle, filePaths: string[], maxPayload?: number): Promise<IFileBundle | null>; | ||
export declare function analyzeGit(baseURL: string | undefined, sessionToken: string | undefined, includeLint: boolean | undefined, severity: AnalysisSeverity | undefined, gitUri: string, sarif?: boolean, oAuthToken?: string, username?: string): Promise<IGitBundle>; |
@@ -126,3 +126,3 @@ "use strict"; | ||
} | ||
async function analyzeFolders(baseURL = constants_1.defaultBaseURL, sessionToken = '', includeLint = false, severity = analysis_result_interface_1.AnalysisSeverity.info, paths, symlinksEnabled = false, maxPayload = constants_1.MAX_PAYLOAD, defaultFileIgnores = constants_1.IGNORES_DEFAULT) { | ||
async function analyzeFolders(baseURL = constants_1.defaultBaseURL, sessionToken = '', includeLint = false, severity = analysis_result_interface_1.AnalysisSeverity.info, paths, symlinksEnabled = false, maxPayload = constants_1.MAX_PAYLOAD, defaultFileIgnores = constants_1.IGNORES_DEFAULT, sarif = false) { | ||
// Get supported filters and test baseURL for correctness and availability | ||
@@ -181,4 +181,3 @@ emitter_1.default.supportedFilesLoaded(null); | ||
} | ||
// Create bundle instance to handle extensions | ||
return { | ||
const result = { | ||
baseURL, | ||
@@ -195,2 +194,6 @@ sessionToken, | ||
}; | ||
if (sarif && analysisData.analysisResults) { | ||
result.sarifResults = sarif_converter_1.default(analysisData.analysisResults); | ||
} | ||
return result; | ||
} | ||
@@ -197,0 +200,0 @@ exports.analyzeFolders = analyzeFolders; |
@@ -116,3 +116,3 @@ "use strict"; | ||
suggestion.fingerprints.forEach(fingerprinting => { | ||
result.fingerprints[fingerprinting.version] = fingerprinting.fingerprint; | ||
result.fingerprints[`${fingerprinting.version}`] = fingerprinting.fingerprint; | ||
}); | ||
@@ -119,0 +119,0 @@ } |
@@ -67,3 +67,3 @@ { | ||
}, | ||
"version": "2.2.0" | ||
"version": "2.3.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130566
1851