@snyk/code-client
Advanced tools
Comparing version 4.16.4 to 4.17.0
@@ -22,3 +22,3 @@ "use strict"; | ||
const apiParams = { | ||
...(0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'removedFiles', 'requestId', 'org']), | ||
...(0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'extraHeaders', 'removedFiles', 'requestId', 'org']), | ||
files: chunkedFiles.reduce((d, f) => { | ||
@@ -58,3 +58,11 @@ // deepcode ignore PrototypePollution: FP this is an internal code | ||
emitter_1.emitter.uploadBundleProgress(0, options.files.length); | ||
const apiParams = (0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'bundleHash', 'requestId', 'org']); | ||
const apiParams = (0, lodash_pick_1.default)(options, [ | ||
'baseURL', | ||
'sessionToken', | ||
'source', | ||
'bundleHash', | ||
'requestId', | ||
'org', | ||
'extraHeaders', | ||
]); | ||
const uploadFileChunks = async (bucketFiles) => { | ||
@@ -88,3 +96,3 @@ // Note: we specifically create __new__ isolated bundles here to faster files upload | ||
let { remoteBundle } = options; | ||
const connectionOptions = (0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org']); | ||
const connectionOptions = (0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org', 'extraHeaders']); | ||
while (remoteBundle.missingFiles.length && attempts < (options.maxAttempts || constants_1.MAX_UPLOAD_ATTEMPTS)) { | ||
@@ -109,3 +117,11 @@ const missingFiles = await (0, files_1.resolveBundleFiles)(options.baseDir, remoteBundle.missingFiles); | ||
let remoteBundle = null; | ||
const baseOptions = (0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'baseDir', 'requestId', 'org']); | ||
const baseOptions = (0, lodash_pick_1.default)(options, [ | ||
'baseURL', | ||
'sessionToken', | ||
'source', | ||
'baseDir', | ||
'requestId', | ||
'org', | ||
'extraHeaders', | ||
]); | ||
const bundleFactory = prepareRemoteBundle((0, lodash_omit_1.default)(options, ['baseDir'])); | ||
@@ -193,3 +209,3 @@ for await (const response of bundleFactory) { | ||
const bundleOptions = { | ||
...(0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org']), | ||
...(0, lodash_pick_1.default)(options, ['baseURL', 'sessionToken', 'source', 'requestId', 'org', 'extraHeaders']), | ||
baseDir, | ||
@@ -196,0 +212,0 @@ files: bundleFiles, |
@@ -25,2 +25,5 @@ /// <reference types="node" /> | ||
org?: string; | ||
extraHeaders?: { | ||
[key: string]: string; | ||
}; | ||
} | ||
@@ -27,0 +30,0 @@ type StartSessionResponseDto = { |
@@ -124,2 +124,3 @@ "use strict"; | ||
...(options.org && { 'snyk-org-name': options.org }), | ||
...options.extraHeaders, | ||
}; | ||
@@ -126,0 +127,0 @@ } |
@@ -90,3 +90,3 @@ { | ||
}, | ||
"version": "4.16.4" | ||
"version": "4.17.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
147925
2099