@snyk/code-client
Advanced tools
Comparing version 3.1.3 to 3.1.4
@@ -16,2 +16,3 @@ "use strict"; | ||
const analysis_result_interface_1 = require("./interfaces/analysis-result.interface"); | ||
const utils_1 = require("./lib/utils"); | ||
const sleep = (duration) => new Promise(resolve => setTimeout(resolve, duration)); | ||
@@ -92,3 +93,3 @@ async function pollAnalysis({ baseURL, sessionToken, includeLint, severity, bundleId, oAuthToken, username, limitToFiles, source, }) { | ||
if (baseDir) { | ||
return Object.fromEntries(Object.entries(files).map(([path, positions]) => { | ||
return utils_1.fromEntries(Object.entries(files).map(([path, positions]) => { | ||
const filePath = files_1.resolveBundleFilePath(baseDir, path); | ||
@@ -102,3 +103,3 @@ return [filePath, positions]; | ||
const entries = Object.entries(suggestions); | ||
return Object.fromEntries(entries.map(([i, s]) => { | ||
return utils_1.fromEntries(entries.map(([i, s]) => { | ||
return [`${parseInt(i, 10) + suggestionIndex + 1}`, s]; | ||
@@ -113,3 +114,3 @@ })); | ||
const suggestions = { ...bundle.analysisResults.suggestions, ...newSuggestions }; | ||
const newFiles = Object.fromEntries(Object.entries(analysisData.analysisResults.files).map(([fn, s]) => { | ||
const newFiles = utils_1.fromEntries(Object.entries(analysisData.analysisResults.files).map(([fn, s]) => { | ||
return [fn, moveSuggestionIndexes(suggestionIndex, s)]; | ||
@@ -116,0 +117,0 @@ })); |
@@ -13,2 +13,3 @@ "use strict"; | ||
const emitter_1 = __importDefault(require("./emitter")); | ||
const utils_1 = require("./lib/utils"); | ||
async function* prepareRemoteBundle(baseURL, sessionToken, files, removedFiles = [], existingBundleId = null, maxPayload = constants_1.MAX_PAYLOAD, source) { | ||
@@ -20,3 +21,3 @@ let response; | ||
for (const [i, chunkedFiles] of fileChunks.entries()) { | ||
const paramFiles = Object.fromEntries(chunkedFiles.map(d => [d.bundlePath, d.hash])); | ||
const paramFiles = utils_1.fromEntries(chunkedFiles.map(d => [d.bundlePath, d.hash])); | ||
if (bundleId === null) { | ||
@@ -23,0 +24,0 @@ // eslint-disable-next-line no-await-in-loop |
@@ -74,3 +74,3 @@ { | ||
}, | ||
"version": "3.1.3" | ||
"version": "3.1.4" | ||
} |
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
139566
49
2042