snyk 1.887.0 → 1.888.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/315.index.js +10 -11
- package/dist/cli/315.index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/315.index.js
CHANGED
|
@@ -5629,7 +5629,7 @@ async function analyzeFolders(options) {
|
|
|
5629
5629
|
...options.connection,
|
|
5630
5630
|
...options.analysisOptions,
|
|
5631
5631
|
shard: (0, files_1.calcHash)(fileBundle.baseDir),
|
|
5632
|
-
analysisContext: options.analysisContext,
|
|
5632
|
+
...(options.analysisContext ? { analysisContext: options.analysisContext } : {}),
|
|
5633
5633
|
});
|
|
5634
5634
|
if (analysisResults.type === 'legacy') {
|
|
5635
5635
|
// expand relative file names to absolute ones only for legacy results
|
|
@@ -5913,7 +5913,7 @@ async function getSupportedFiles(baseURL, source, requestId, languages) {
|
|
|
5913
5913
|
const supportedFilesFromApi = resp.value;
|
|
5914
5914
|
//Given supported languages from 'registy'
|
|
5915
5915
|
if (languages) {
|
|
5916
|
-
|
|
5916
|
+
const supportedFiles = {};
|
|
5917
5917
|
supportedFiles.configFiles = supportedFilesFromApi.configFiles;
|
|
5918
5918
|
supportedFiles.extensions = languages;
|
|
5919
5919
|
//For verification only
|
|
@@ -6012,7 +6012,7 @@ class Cache {
|
|
|
6012
6012
|
this.persisted[key] = value;
|
|
6013
6013
|
}
|
|
6014
6014
|
prune() {
|
|
6015
|
-
|
|
6015
|
+
const obj = {};
|
|
6016
6016
|
const keys = Object.keys(this.visited);
|
|
6017
6017
|
// no keys visited for either get or set value
|
|
6018
6018
|
if (keys.length === 0) {
|
|
@@ -6058,11 +6058,10 @@ exports.readJSON = readJSON;
|
|
|
6058
6058
|
"use strict";
|
|
6059
6059
|
|
|
6060
6060
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6061
|
-
exports.DEFAULT_ERROR_MESSAGES = exports.NETWORK_ERRORS = exports.ErrorCodes = exports.DCIGNORE_DRAFTS = exports.IGNORE_FILES_NAMES = exports.IGNORES_DEFAULT = exports.REQUEST_RETRY_DELAY = exports.MAX_RETRY_ATTEMPTS = exports.POLLING_INTERVAL = exports.UPLOAD_CONCURRENCY = exports.MAX_UPLOAD_ATTEMPTS = exports.CACHE_KEY = exports.EXCLUDED_NAMES = exports.DOTSNYK_FILENAME = exports.DCIGNORE_FILENAME = exports.GITIGNORE_FILENAME = exports.GIT_FILENAME = exports.ENCODE_TYPE = exports.HASH_ALGORITHM = exports.
|
|
6061
|
+
exports.DEFAULT_ERROR_MESSAGES = exports.NETWORK_ERRORS = exports.ErrorCodes = exports.DCIGNORE_DRAFTS = exports.IGNORE_FILES_NAMES = exports.IGNORES_DEFAULT = exports.REQUEST_RETRY_DELAY = exports.MAX_RETRY_ATTEMPTS = exports.POLLING_INTERVAL = exports.UPLOAD_CONCURRENCY = exports.MAX_UPLOAD_ATTEMPTS = exports.CACHE_KEY = exports.EXCLUDED_NAMES = exports.DOTSNYK_FILENAME = exports.DCIGNORE_FILENAME = exports.GITIGNORE_FILENAME = exports.GIT_FILENAME = exports.ENCODE_TYPE = exports.HASH_ALGORITHM = exports.MAX_FILE_SIZE = exports.MAX_PAYLOAD = void 0;
|
|
6062
6062
|
const dcignore_1 = __webpack_require__(55086);
|
|
6063
6063
|
exports.MAX_PAYLOAD = 4 * 1024 * 1024;
|
|
6064
|
-
exports.MAX_FILE_SIZE =
|
|
6065
|
-
exports.defaultBaseURL = 'https://api.snyk.deepcode.ai';
|
|
6064
|
+
exports.MAX_FILE_SIZE = 1024 * 1024;
|
|
6066
6065
|
exports.HASH_ALGORITHM = 'sha256';
|
|
6067
6066
|
exports.ENCODE_TYPE = 'hex';
|
|
6068
6067
|
exports.GIT_FILENAME = '.git';
|
|
@@ -6565,7 +6564,7 @@ function* composeFilePayloads(files, bucketSize = constants_1.MAX_PAYLOAD) {
|
|
|
6565
6564
|
let bucketIndex = -1;
|
|
6566
6565
|
const getFileDataPayloadSize = (fileData) => { var _a; return (((_a = fileData.content) === null || _a === void 0 ? void 0 : _a.length) || 0) + fileData.bundlePath.length + fileData.hash.length; };
|
|
6567
6566
|
const isLowerSize = (size, fileData) => size >= getFileDataPayloadSize(fileData);
|
|
6568
|
-
for (
|
|
6567
|
+
for (const fileData of files) {
|
|
6569
6568
|
// This file is empty or too large to send, it should be skipped.
|
|
6570
6569
|
if (!fileData.size || !isLowerSize(bucketSize, fileData))
|
|
6571
6570
|
continue;
|
|
@@ -6727,7 +6726,7 @@ async function createBundle(options) {
|
|
|
6727
6726
|
headers: {
|
|
6728
6727
|
...prepareTokenHeaders(options.sessionToken),
|
|
6729
6728
|
source: options.source,
|
|
6730
|
-
...(options.requestId && { 'snyk-request-id': options.requestId })
|
|
6729
|
+
...(options.requestId && { 'snyk-request-id': options.requestId }),
|
|
6731
6730
|
},
|
|
6732
6731
|
url: `${options.baseURL}/bundle`,
|
|
6733
6732
|
method: 'post',
|
|
@@ -6751,7 +6750,7 @@ async function checkBundle(options) {
|
|
|
6751
6750
|
headers: {
|
|
6752
6751
|
...prepareTokenHeaders(options.sessionToken),
|
|
6753
6752
|
source: options.source,
|
|
6754
|
-
...(options.requestId && { 'snyk-request-id': options.requestId })
|
|
6753
|
+
...(options.requestId && { 'snyk-request-id': options.requestId }),
|
|
6755
6754
|
},
|
|
6756
6755
|
url: `${options.baseURL}/bundle/${options.bundleHash}`,
|
|
6757
6756
|
method: 'get',
|
|
@@ -6774,7 +6773,7 @@ async function extendBundle(options) {
|
|
|
6774
6773
|
headers: {
|
|
6775
6774
|
...prepareTokenHeaders(options.sessionToken),
|
|
6776
6775
|
source: options.source,
|
|
6777
|
-
...(options.requestId && { 'snyk-request-id': options.requestId })
|
|
6776
|
+
...(options.requestId && { 'snyk-request-id': options.requestId }),
|
|
6778
6777
|
},
|
|
6779
6778
|
url: `${options.baseURL}/bundle/${options.bundleHash}`,
|
|
6780
6779
|
method: 'put',
|
|
@@ -6808,7 +6807,7 @@ async function getAnalysis(options) {
|
|
|
6808
6807
|
headers: {
|
|
6809
6808
|
...prepareTokenHeaders(options.sessionToken),
|
|
6810
6809
|
source: options.source,
|
|
6811
|
-
...(options.requestId && { 'snyk-request-id': options.requestId })
|
|
6810
|
+
...(options.requestId && { 'snyk-request-id': options.requestId }),
|
|
6812
6811
|
},
|
|
6813
6812
|
url: `${options.baseURL}/analysis`,
|
|
6814
6813
|
method: 'post',
|