snyk 1.761.0 → 1.765.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.
Files changed (48) hide show
  1. package/dist/cli/{925.index.js → 293.index.js} +91 -75
  2. package/dist/cli/293.index.js.map +1 -0
  3. package/dist/cli/409.index.js +2 -2
  4. package/dist/cli/409.index.js.map +1 -1
  5. package/dist/cli/64.index.js +41 -38
  6. package/dist/cli/64.index.js.map +1 -1
  7. package/dist/cli/959.index.js +12 -12
  8. package/dist/cli/959.index.js.map +1 -1
  9. package/dist/cli/index.js +33 -49
  10. package/dist/cli/index.js.map +1 -1
  11. package/dist/cli/thirdPartyNotice.json +2 -2
  12. package/dist/lib/ecosystems/types.d.ts +7 -0
  13. package/dist/lib/snyk-test/legacy.d.ts +2 -1
  14. package/dist/lib/spinner.d.ts +3 -4
  15. package/help/commands-docs/_SNYK_COMMAND_OPTIONS.md +4 -1
  16. package/help/commands-man/snyk-auth.1 +3 -3
  17. package/help/commands-man/snyk-code.1 +3 -3
  18. package/help/commands-man/snyk-config.1 +4 -4
  19. package/help/commands-man/snyk-container.1 +4 -4
  20. package/help/commands-man/snyk-help.1 +3 -3
  21. package/help/commands-man/snyk-iac.1 +3 -3
  22. package/help/commands-man/snyk-ignore.1 +5 -5
  23. package/help/commands-man/snyk-monitor.1 +11 -8
  24. package/help/commands-man/snyk-policy.1 +3 -3
  25. package/help/commands-man/snyk-protect.1 +5 -5
  26. package/help/commands-man/snyk-test.1 +11 -8
  27. package/help/commands-man/snyk-wizard.1 +5 -5
  28. package/help/commands-man/snyk-woof.1 +3 -3
  29. package/help/commands-man/snyk.1 +11 -8
  30. package/help/commands-md/snyk-monitor.md +4 -1
  31. package/help/commands-md/snyk-test.md +4 -1
  32. package/help/commands-md/snyk.md +4 -1
  33. package/help/commands-txt/snyk-auth.txt +57 -57
  34. package/help/commands-txt/snyk-code.txt +63 -63
  35. package/help/commands-txt/snyk-config.txt +66 -66
  36. package/help/commands-txt/snyk-container.txt +71 -71
  37. package/help/commands-txt/snyk-help.txt +51 -51
  38. package/help/commands-txt/snyk-iac.txt +97 -97
  39. package/help/commands-txt/snyk-ignore.txt +59 -59
  40. package/help/commands-txt/snyk-monitor.txt +162 -159
  41. package/help/commands-txt/snyk-policy.txt +52 -52
  42. package/help/commands-txt/snyk-protect.txt +52 -52
  43. package/help/commands-txt/snyk-test.txt +162 -159
  44. package/help/commands-txt/snyk-wizard.txt +52 -52
  45. package/help/commands-txt/snyk-woof.txt +52 -52
  46. package/help/commands-txt/snyk.txt +195 -192
  47. package/package.json +2 -2
  48. package/dist/cli/925.index.js.map +0 -1
@@ -1,5 +1,5 @@
1
- exports.id = 925;
2
- exports.ids = [925];
1
+ exports.id = 293;
2
+ exports.ids = [293];
3
3
  exports.modules = {
4
4
 
5
5
  /***/ 61452:
@@ -48,7 +48,7 @@ const options_validator_1 = __webpack_require__(1570);
48
48
  const types_1 = __webpack_require__(94055);
49
49
  const config_1 = __webpack_require__(22541);
50
50
  const detect = __webpack_require__(45318);
51
- const spinner = __webpack_require__(86766);
51
+ const spinner_1 = __webpack_require__(86766);
52
52
  const analytics = __webpack_require__(82744);
53
53
  const api_token_1 = __webpack_require__(95181);
54
54
  const print_deps_1 = __webpack_require__(79792);
@@ -138,7 +138,7 @@ async function monitor(...args0) {
138
138
  (packageManager ? packageManager : analysisType) +
139
139
  ' dependencies for ' +
140
140
  displayPath;
141
- await spinner(analyzingDepsSpinnerLabel);
141
+ await spinner_1.spinner(analyzingDepsSpinnerLabel);
142
142
  // Scan the project dependencies via a plugin
143
143
  debug('getDepsFromPlugin ...');
144
144
  // each plugin will be asked to scan once per path
@@ -147,7 +147,7 @@ async function monitor(...args0) {
147
147
  ...options,
148
148
  path,
149
149
  packageManager,
150
- }), spinner.clear(analyzingDepsSpinnerLabel));
150
+ }), spinner_1.spinner.clear(analyzingDepsSpinnerLabel));
151
151
  analytics.add('pluginName', inspectResult.plugin.name);
152
152
  // We send results from "all-sub-projects" scanning as different Monitor objects
153
153
  // multi result will become default, so start migrating code to always work with it
@@ -170,7 +170,7 @@ async function monitor(...args0) {
170
170
  });
171
171
  }
172
172
  const postingMonitorSpinnerLabel = 'Posting monitor snapshot for ' + displayPath + ' ...';
173
- await spinner(postingMonitorSpinnerLabel);
173
+ await spinner_1.spinner(postingMonitorSpinnerLabel);
174
174
  // Post the project dependencies to the Registry
175
175
  for (const projectDeps of perProjectResult.scannedProjects) {
176
176
  try {
@@ -193,7 +193,7 @@ async function monitor(...args0) {
193
193
  const targetFileRelativePath = projectDeps.plugin.targetFile ||
194
194
  (tFile && pathUtil.join(pathUtil.resolve(path), tFile)) ||
195
195
  '';
196
- const res = await promiseOrCleanup(monitor_1.monitor(path, generateMonitorMeta(options, extractedPackageManager), projectDeps, options, projectDeps.plugin, targetFileRelativePath, contributors, generateProjectAttributes(options), generateTags(options)), spinner.clear(postingMonitorSpinnerLabel));
196
+ const res = await promiseOrCleanup(monitor_1.monitor(path, generateMonitorMeta(options, extractedPackageManager), projectDeps, options, projectDeps.plugin, targetFileRelativePath, contributors, generateProjectAttributes(options), generateTags(options)), spinner_1.spinner.clear(postingMonitorSpinnerLabel));
197
197
  res.path = path;
198
198
  const monOutput = formatters_1.formatMonitorOutput(extractedPackageManager, res, options, projectName, await get_extra_project_count_1.getExtraProjectCount(path, options, inspectResult));
199
199
  // push a good result
@@ -211,7 +211,7 @@ async function monitor(...args0) {
211
211
  results.push({ ok: false, data: err, path });
212
212
  }
213
213
  finally {
214
- spinner.clearAll();
214
+ spinner_1.spinner.clearAll();
215
215
  }
216
216
  }
217
217
  // Part 2: process the output from the Registry
@@ -584,7 +584,7 @@ const chalk_1 = __webpack_require__(32589);
584
584
  const config_1 = __webpack_require__(22541);
585
585
  const is_ci_1 = __webpack_require__(10090);
586
586
  const promise_1 = __webpack_require__(90430);
587
- const spinner = __webpack_require__(86766);
587
+ const spinner_1 = __webpack_require__(86766);
588
588
  const plugins_1 = __webpack_require__(78053);
589
589
  const formatters_1 = __webpack_require__(81329);
590
590
  const get_extra_project_count_1 = __webpack_require__(34355);
@@ -601,7 +601,7 @@ async function monitorEcosystem(ecosystem, paths, options) {
601
601
  const scanResultsByPath = {};
602
602
  for (const path of paths) {
603
603
  try {
604
- await spinner(`Analyzing dependencies in ${path}`);
604
+ await spinner_1.spinner(`Analyzing dependencies in ${path}`);
605
605
  options.path = path;
606
606
  const pluginResponse = await plugin.scan(options);
607
607
  scanResultsByPath[path] = pluginResponse.scanResults;
@@ -618,7 +618,7 @@ async function monitorEcosystem(ecosystem, paths, options) {
618
618
  throw error;
619
619
  }
620
620
  finally {
621
- spinner.clearAll();
621
+ spinner_1.spinner.clearAll();
622
622
  }
623
623
  }
624
624
  const [monitorResults, errors] = await selectAndExecuteMonitorStrategy(ecosystem, scanResultsByPath, options);
@@ -653,7 +653,7 @@ async function monitorDependencies(scans, options) {
653
653
  const results = [];
654
654
  const errors = [];
655
655
  for (const [path, scanResults] of Object.entries(scans)) {
656
- await spinner(`Monitoring dependencies in ${path}`);
656
+ await spinner_1.spinner(`Monitoring dependencies in ${path}`);
657
657
  for (const scanResult of scanResults) {
658
658
  const monitorDependenciesRequest = await generateMonitorDependenciesRequest(scanResult, options);
659
659
  const configOrg = config_1.default.org ? decodeURIComponent(config_1.default.org) : undefined;
@@ -692,7 +692,7 @@ async function monitorDependencies(scans, options) {
692
692
  });
693
693
  }
694
694
  }
695
- spinner.clearAll();
695
+ spinner_1.spinner.clearAll();
696
696
  }
697
697
  return [results, errors];
698
698
  }
@@ -827,7 +827,7 @@ exports.findAndLoadPolicyForScanResult = findAndLoadPolicyForScanResult;
827
827
 
828
828
  Object.defineProperty(exports, "__esModule", ({ value: true }));
829
829
  exports.resolveAndMonitorFacts = void 0;
830
- const spinner = __webpack_require__(86766);
830
+ const spinner_1 = __webpack_require__(86766);
831
831
  const polling_monitor_1 = __webpack_require__(59354);
832
832
  const plugin_analytics_1 = __webpack_require__(33077);
833
833
  const errors_1 = __webpack_require__(55191);
@@ -836,7 +836,7 @@ async function resolveAndMonitorFacts(scans, options) {
836
836
  const results = [];
837
837
  const errors = [];
838
838
  for (const [path, scanResults] of Object.entries(scans)) {
839
- await spinner(`Resolving and Monitoring fileSignatures in ${path}`);
839
+ await spinner_1.spinner(`Resolving and Monitoring fileSignatures in ${path}`);
840
840
  for (const scanResult of scanResults) {
841
841
  try {
842
842
  const res = await polling_monitor_1.requestMonitorPollingToken(options, true, scanResult);
@@ -868,7 +868,7 @@ async function resolveAndMonitorFacts(scans, options) {
868
868
  });
869
869
  }
870
870
  }
871
- spinner.clearAll();
871
+ spinner_1.spinner.clearAll();
872
872
  }
873
873
  return [results, errors];
874
874
  }
@@ -884,14 +884,14 @@ exports.resolveAndMonitorFacts = resolveAndMonitorFacts;
884
884
 
885
885
  Object.defineProperty(exports, "__esModule", ({ value: true }));
886
886
  exports.resolveAndTestFacts = void 0;
887
- const spinner = __webpack_require__(86766);
887
+ const spinner_1 = __webpack_require__(86766);
888
888
  const polling_test_1 = __webpack_require__(77584);
889
889
  const plugin_analytics_1 = __webpack_require__(33077);
890
890
  async function resolveAndTestFacts(ecosystem, scans, options) {
891
891
  const results = [];
892
892
  const errors = [];
893
893
  for (const [path, scanResults] of Object.entries(scans)) {
894
- await spinner(`Resolving and Testing fileSignatures in ${path}`);
894
+ await spinner_1.spinner(`Resolving and Testing fileSignatures in ${path}`);
895
895
  for (const scanResult of scanResults) {
896
896
  try {
897
897
  const res = await polling_test_1.requestTestPollingToken(options, true, scanResult);
@@ -906,6 +906,7 @@ async function resolveAndTestFacts(ecosystem, scans, options) {
906
906
  issuesData: response === null || response === void 0 ? void 0 : response.issuesData,
907
907
  depGraphData: response === null || response === void 0 ? void 0 : response.depGraphData,
908
908
  depsFilePaths: response === null || response === void 0 ? void 0 : response.depsFilePaths,
909
+ fileSignaturesDetails: response === null || response === void 0 ? void 0 : response.fileSignaturesDetails,
909
910
  });
910
911
  }
911
912
  catch (error) {
@@ -919,7 +920,7 @@ async function resolveAndTestFacts(ecosystem, scans, options) {
919
920
  }
920
921
  }
921
922
  }
922
- spinner.clearAll();
923
+ spinner_1.spinner.clearAll();
923
924
  return [results, errors];
924
925
  }
925
926
  exports.resolveAndTestFacts = resolveAndTestFacts;
@@ -938,7 +939,7 @@ const config_1 = __webpack_require__(22541);
938
939
  const is_ci_1 = __webpack_require__(10090);
939
940
  const promise_1 = __webpack_require__(90430);
940
941
  const types_1 = __webpack_require__(55246);
941
- const spinner = __webpack_require__(86766);
942
+ const spinner_1 = __webpack_require__(86766);
942
943
  const plugins_1 = __webpack_require__(78053);
943
944
  const common_1 = __webpack_require__(53110);
944
945
  const api_token_1 = __webpack_require__(95181);
@@ -953,12 +954,12 @@ async function testEcosystem(ecosystem, paths, options) {
953
954
  }
954
955
  const scanResultsByPath = {};
955
956
  for (const path of paths) {
956
- await spinner(`Scanning dependencies in ${path}`);
957
+ await spinner_1.spinner(`Scanning dependencies in ${path}`);
957
958
  options.path = path;
958
959
  const pluginResponse = await plugin.scan(options);
959
960
  scanResultsByPath[path] = pluginResponse.scanResults;
960
961
  }
961
- spinner.clearAll();
962
+ spinner_1.spinner.clearAll();
962
963
  const [testResults, errors] = await selectAndExecuteTestStrategy(ecosystem, scanResultsByPath, options);
963
964
  const stringifiedData = JSON.stringify(testResults, null, 2);
964
965
  if (options.json) {
@@ -981,7 +982,7 @@ async function testDependencies(scans, options) {
981
982
  const results = [];
982
983
  const errors = [];
983
984
  for (const [path, scanResults] of Object.entries(scans)) {
984
- await spinner(`Testing dependencies in ${path}`);
985
+ await spinner_1.spinner(`Testing dependencies in ${path}`);
985
986
  for (const scanResult of scanResults) {
986
987
  const payload = {
987
988
  method: 'POST',
@@ -1012,7 +1013,7 @@ async function testDependencies(scans, options) {
1012
1013
  }
1013
1014
  }
1014
1015
  }
1015
- spinner.clearAll();
1016
+ spinner_1.spinner.clearAll();
1016
1017
  return [results, errors];
1017
1018
  }
1018
1019
 
@@ -1949,25 +1950,32 @@ function extractReportingDescriptor(results) {
1949
1950
  }
1950
1951
  exports.extractReportingDescriptor = extractReportingDescriptor;
1951
1952
  function mapIacTestResponseToSarifResults(issues) {
1952
- return issues.map(({ targetPath, issue }) => ({
1953
- ruleId: issue.id,
1954
- message: {
1955
- text: `This line contains a potential ${issue.severity} severity misconfiguration affecting the ${issue.subType}`,
1956
- },
1957
- locations: [
1958
- {
1959
- physicalLocation: {
1960
- artifactLocation: {
1961
- uri: targetPath,
1962
- uriBaseId: PROJECT_ROOT_KEY,
1963
- },
1964
- region: {
1965
- startLine: issue.lineNumber,
1953
+ return issues.map(({ targetPath, issue }) => {
1954
+ const hasLineNumber = issue.lineNumber && issue.lineNumber >= 0;
1955
+ return {
1956
+ ruleId: issue.id,
1957
+ message: {
1958
+ text: `This line contains a potential ${issue.severity} severity misconfiguration affecting the ${issue.subType}`,
1959
+ },
1960
+ locations: [
1961
+ {
1962
+ physicalLocation: {
1963
+ artifactLocation: {
1964
+ uri: targetPath,
1965
+ uriBaseId: PROJECT_ROOT_KEY,
1966
+ },
1967
+ // We exclude the `region` key when the line number is missing or -1.
1968
+ // https://docs.oasis-open.org/sarif/sarif/v2.0/csprd02/sarif-v2.0-csprd02.html#_Toc10127873
1969
+ ...(hasLineNumber && {
1970
+ region: {
1971
+ startLine: issue.lineNumber,
1972
+ },
1973
+ }),
1966
1974
  },
1967
1975
  },
1968
- },
1969
- ],
1970
- }));
1976
+ ],
1977
+ };
1978
+ });
1971
1979
  }
1972
1980
  exports.mapIacTestResponseToSarifResults = mapIacTestResponseToSarifResults;
1973
1981
 
@@ -4251,7 +4259,7 @@ exports.parse = void 0;
4251
4259
  const baseDebug = __webpack_require__(15158);
4252
4260
  const debug = baseDebug('snyk-test');
4253
4261
  const path = __webpack_require__(85622);
4254
- const spinner = __webpack_require__(86766);
4262
+ const spinner_1 = __webpack_require__(86766);
4255
4263
  const analytics = __webpack_require__(82744);
4256
4264
  const fs = __webpack_require__(35747);
4257
4265
  const lockFileParser = __webpack_require__(423);
@@ -4281,12 +4289,12 @@ async function parse(root, targetFile, options) {
4281
4289
  const resolveModuleSpinnerLabel = `Analyzing npm dependencies for ${lockFileFullPath}`;
4282
4290
  debug(resolveModuleSpinnerLabel);
4283
4291
  try {
4284
- await spinner(resolveModuleSpinnerLabel);
4292
+ await spinner_1.spinner(resolveModuleSpinnerLabel);
4285
4293
  const strictOutOfSync = options.strictOutOfSync !== false;
4286
4294
  return lockFileParser.buildDepTreeFromFiles(root, manifestFileFullPath, lockFileFullPath, options.dev, strictOutOfSync);
4287
4295
  }
4288
4296
  finally {
4289
- await spinner.clear(resolveModuleSpinnerLabel)();
4297
+ await spinner_1.spinner.clear(resolveModuleSpinnerLabel)();
4290
4298
  }
4291
4299
  }
4292
4300
  exports.parse = parse;
@@ -4306,7 +4314,7 @@ const fs = __webpack_require__(35747);
4306
4314
  const resolveNodeDeps = __webpack_require__(40068);
4307
4315
  const baseDebug = __webpack_require__(15158);
4308
4316
  const isEmpty = __webpack_require__(99245);
4309
- const spinner = __webpack_require__(86766);
4317
+ const spinner_1 = __webpack_require__(86766);
4310
4318
  const analytics = __webpack_require__(82744);
4311
4319
  const get_file_contents_1 = __webpack_require__(84210);
4312
4320
  const debug = baseDebug('snyk-nodejs-plugin');
@@ -4355,12 +4363,12 @@ async function parse(root, targetFile, options) {
4355
4363
  const resolveModuleSpinnerLabel = 'Analyzing npm dependencies for ' +
4356
4364
  path.dirname(path.resolve(root, targetFile));
4357
4365
  try {
4358
- await spinner.clear(resolveModuleSpinnerLabel)();
4359
- await spinner(resolveModuleSpinnerLabel);
4366
+ await spinner_1.spinner.clear(resolveModuleSpinnerLabel)();
4367
+ await spinner_1.spinner(resolveModuleSpinnerLabel);
4360
4368
  return resolveNodeDeps(root, Object.assign({}, options, { noFromArrays: true }));
4361
4369
  }
4362
4370
  finally {
4363
- await spinner.clear(resolveModuleSpinnerLabel)();
4371
+ await spinner_1.spinner.clear(resolveModuleSpinnerLabel)();
4364
4372
  }
4365
4373
  }
4366
4374
  exports.parse = parse;
@@ -4689,16 +4697,16 @@ const code_client_1 = __webpack_require__(95951);
4689
4697
  const legacy_1 = __webpack_require__(34013);
4690
4698
  const api_token_1 = __webpack_require__(95181);
4691
4699
  const config_1 = __webpack_require__(22541);
4692
- const spinner = __webpack_require__(86766);
4700
+ const spinner_1 = __webpack_require__(86766);
4693
4701
  const utils_1 = __webpack_require__(33113);
4694
4702
  const unsupported_feature_snyk_code_error_1 = __webpack_require__(90551);
4695
4703
  const proxy_from_env_1 = __webpack_require__(21394);
4696
4704
  const global_agent_1 = __webpack_require__(97959);
4697
4705
  async function getCodeAnalysisAndParseResults(root, options) {
4698
- await spinner.clearAll();
4706
+ await spinner_1.spinner.clearAll();
4699
4707
  utils_1.analysisProgressUpdate();
4700
4708
  const codeAnalysis = await getCodeAnalysis(root, options);
4701
- spinner.clearAll();
4709
+ spinner_1.spinner.clearAll();
4702
4710
  return parseSecurityResults(codeAnalysis);
4703
4711
  }
4704
4712
  exports.getCodeAnalysisAndParseResults = getCodeAnalysisAndParseResults;
@@ -5082,15 +5090,15 @@ Object.defineProperty(exports, "analysisProgressUpdate", ({ enumerable: true, ge
5082
5090
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5083
5091
  exports.analysisProgressUpdate = void 0;
5084
5092
  const code_client_1 = __webpack_require__(95951);
5085
- const spinner = __webpack_require__(86766);
5093
+ const spinner_1 = __webpack_require__(86766);
5086
5094
  function analysisProgressUpdate() {
5087
5095
  let currentMessage = '';
5088
5096
  const showSpinner = (message) => {
5089
5097
  if (currentMessage === message)
5090
5098
  return;
5091
- spinner.clear(currentMessage)();
5099
+ spinner_1.spinner.clear(currentMessage)();
5092
5100
  currentMessage = message;
5093
- return spinner(message);
5101
+ return spinner_1.spinner(message);
5094
5102
  };
5095
5103
  code_client_1.emitter.on('supportedFilesLoaded', () => showSpinner(`Supported extensions loaded`));
5096
5104
  code_client_1.emitter.on('scanFilesProgress', (processed) => showSpinner(`Scanning files: ${Math.round(processed / 100)}00`));
@@ -5281,6 +5289,7 @@ const promise_1 = __webpack_require__(90430);
5281
5289
  const common_1 = __webpack_require__(53110);
5282
5290
  const api_token_1 = __webpack_require__(95181);
5283
5291
  const common_2 = __webpack_require__(74434);
5292
+ const monitor_1 = __webpack_require__(3708);
5284
5293
  async function requestMonitorPollingToken(options, isAsync, scanResult) {
5285
5294
  if ((scanResult === null || scanResult === void 0 ? void 0 : scanResult.target) && scanResult.target['remoteUrl'] === '') {
5286
5295
  scanResult.target['remoteUrl'] = scanResult.name;
@@ -5317,6 +5326,8 @@ async function pollingMonitorWithTokenUntilDone(token, isAsync, options, pollInt
5317
5326
  isAsync,
5318
5327
  resolutionMeta,
5319
5328
  method: 'cli',
5329
+ tags: monitor_1.generateTags(options),
5330
+ attributes: monitor_1.generateProjectAttributes(options),
5320
5331
  projectName: (resolutionMeta === null || resolutionMeta === void 0 ? void 0 : resolutionMeta.name) || options['project-name'] || config_1.default.PROJECT_NAME,
5321
5332
  },
5322
5333
  };
@@ -5376,8 +5387,14 @@ async function pollingTestWithTokenUntilDone(token, type, options, pollInterval,
5376
5387
  };
5377
5388
  const response = await promise_1.makeRequest(payload);
5378
5389
  if (response.result) {
5379
- const { issues, issuesData, depGraphData, depsFilePaths } = response.result;
5380
- return { issues, issuesData, depGraphData, depsFilePaths };
5390
+ const { issues, issuesData, depGraphData, depsFilePaths, fileSignaturesDetails, } = response.result;
5391
+ return {
5392
+ issues,
5393
+ issuesData,
5394
+ depGraphData,
5395
+ depsFilePaths,
5396
+ fileSignaturesDetails,
5397
+ };
5381
5398
  }
5382
5399
  await common_2.delayNextStep(attemptsCount, maxAttempts, pollInterval);
5383
5400
  return await pollingTestWithTokenUntilDone(token, type, options, pollInterval, attemptsCount, maxAttempts);
@@ -5736,7 +5753,7 @@ const config_1 = __webpack_require__(22541);
5736
5753
  const is_ci_1 = __webpack_require__(10090);
5737
5754
  const ecosystems_1 = __webpack_require__(5168);
5738
5755
  const common_1 = __webpack_require__(53110);
5739
- const spinner = __webpack_require__(86766);
5756
+ const spinner_1 = __webpack_require__(86766);
5740
5757
  const policy_1 = __webpack_require__(4669);
5741
5758
  const api_token_1 = __webpack_require__(95181);
5742
5759
  const errors_1 = __webpack_require__(55191);
@@ -5756,9 +5773,9 @@ async function assembleEcosystemPayloads(ecosystem, options) {
5756
5773
  analysisTypeText +
5757
5774
  (path.relative('.', path.join(options.path, options.file || '')) ||
5758
5775
  path.relative('..', '.') + ' project dir');
5759
- spinner.clear(spinnerLbl)();
5776
+ spinner_1.spinner.clear(spinnerLbl)();
5760
5777
  if (!options.quiet) {
5761
- await spinner(spinnerLbl);
5778
+ await spinner_1.spinner(spinnerLbl);
5762
5779
  }
5763
5780
  try {
5764
5781
  const plugin = ecosystems_1.getPlugin(ecosystem);
@@ -5801,7 +5818,7 @@ async function assembleEcosystemPayloads(ecosystem, options) {
5801
5818
  throw error;
5802
5819
  }
5803
5820
  finally {
5804
- spinner.clear(spinnerLbl)();
5821
+ spinner_1.spinner.clear(spinnerLbl)();
5805
5822
  }
5806
5823
  }
5807
5824
  exports.assembleEcosystemPayloads = assembleEcosystemPayloads;
@@ -6119,7 +6136,7 @@ const api_token_1 = __webpack_require__(95181);
6119
6136
  const ecosystems_1 = __webpack_require__(5168);
6120
6137
  const assemble_payloads_1 = __webpack_require__(38080);
6121
6138
  const request_1 = __webpack_require__(52050);
6122
- const spinner = __webpack_require__(86766);
6139
+ const spinner_1 = __webpack_require__(86766);
6123
6140
  const debug = debugModule('snyk:run-test');
6124
6141
  const ANALYTICS_PAYLOAD_MAX_LENGTH = 1024;
6125
6142
  function prepareResponseForParsing(payload, response, options) {
@@ -6227,9 +6244,9 @@ async function sendAndParseResults(payloads, spinnerLbl, root, options) {
6227
6244
  const maxConcurrent = 25;
6228
6245
  const queue = new Queue(maxConcurrent);
6229
6246
  const iacResults = [];
6230
- await spinner.clear(spinnerLbl)();
6247
+ await spinner_1.spinner.clear(spinnerLbl)();
6231
6248
  if (!options.quiet) {
6232
- await spinner(spinnerLbl);
6249
+ await spinner_1.spinner(spinnerLbl);
6233
6250
  }
6234
6251
  for (const payload of payloads) {
6235
6252
  iacResults.push(queue.add(async () => {
@@ -6244,9 +6261,9 @@ async function sendAndParseResults(payloads, spinnerLbl, root, options) {
6244
6261
  }
6245
6262
  const results = [];
6246
6263
  for (const payload of payloads) {
6247
- await spinner.clear(spinnerLbl)();
6264
+ await spinner_1.spinner.clear(spinnerLbl)();
6248
6265
  if (!options.quiet) {
6249
- await spinner(spinnerLbl);
6266
+ await spinner_1.spinner(spinnerLbl);
6250
6267
  }
6251
6268
  /** sendTestPayload() deletes the request.body from the payload once completed. */
6252
6269
  const payloadCopy = Object.assign({}, payload);
@@ -6254,7 +6271,7 @@ async function sendAndParseResults(payloads, spinnerLbl, root, options) {
6254
6271
  const { depGraph, payloadPolicy, pkgManager, targetFile, projectName, foundProjectCount, displayTargetFile, dockerfilePackages, platform, scanResult, } = prepareResponseForParsing(payloadCopy, res, options);
6255
6272
  const ecosystem = ecosystems_1.getEcosystem(options);
6256
6273
  if (ecosystem && options['print-deps']) {
6257
- await spinner.clear(spinnerLbl)();
6274
+ await spinner_1.spinner.clear(spinnerLbl)();
6258
6275
  await print_deps_1.maybePrintDepGraph(options, depGraph);
6259
6276
  }
6260
6277
  const legacyRes = convertIssuesToAffectedPkgs(res);
@@ -6305,7 +6322,7 @@ async function runTest(projectType, root, options) {
6305
6322
  `Failed to test ${projectType} project`, error.code);
6306
6323
  }
6307
6324
  finally {
6308
- spinner.clear(spinnerLbl)();
6325
+ spinner_1.spinner.clear(spinnerLbl)();
6309
6326
  }
6310
6327
  }
6311
6328
  exports.runTest = runTest;
@@ -6448,9 +6465,9 @@ async function assembleLocalPayloads(root, options) {
6448
6465
  path.relative('..', '.') + ' project dir');
6449
6466
  try {
6450
6467
  const payloads = [];
6451
- await spinner.clear(spinnerLbl)();
6468
+ await spinner_1.spinner.clear(spinnerLbl)();
6452
6469
  if (!options.quiet) {
6453
- await spinner(spinnerLbl);
6470
+ await spinner_1.spinner(spinnerLbl);
6454
6471
  }
6455
6472
  if (options.iac) {
6456
6473
  return run_iac_test_1.assembleIacLocalPayloads(root, options);
@@ -6458,7 +6475,7 @@ async function assembleLocalPayloads(root, options) {
6458
6475
  const deps = await get_deps_from_plugin_1.getDepsFromPlugin(root, options);
6459
6476
  const failedResults = deps.failedResults;
6460
6477
  if (failedResults === null || failedResults === void 0 ? void 0 : failedResults.length) {
6461
- await spinner.clear(spinnerLbl)();
6478
+ await spinner_1.spinner.clear(spinnerLbl)();
6462
6479
  if (!options.json && !options.quiet) {
6463
6480
  console.warn(chalk_1.default.bold.red(`${theme_1.icon.ISSUE} ${failedResults.length}/${failedResults.length +
6464
6481
  deps.scannedProjects
@@ -6500,11 +6517,11 @@ async function assembleLocalPayloads(root, options) {
6500
6517
  : scannedProject.depTree;
6501
6518
  if (options['print-deps']) {
6502
6519
  if (scannedProject.depGraph) {
6503
- await spinner.clear(spinnerLbl)();
6520
+ await spinner_1.spinner.clear(spinnerLbl)();
6504
6521
  print_deps_1.maybePrintDepGraph(options, pkg);
6505
6522
  }
6506
6523
  else {
6507
- await spinner.clear(spinnerLbl)();
6524
+ await spinner_1.spinner.clear(spinnerLbl)();
6508
6525
  print_deps_1.maybePrintDepTree(options, pkg);
6509
6526
  }
6510
6527
  }
@@ -6650,7 +6667,7 @@ async function assembleLocalPayloads(root, options) {
6650
6667
  return payloads;
6651
6668
  }
6652
6669
  finally {
6653
- await spinner.clear(spinnerLbl)();
6670
+ await spinner_1.spinner.clear(spinnerLbl)();
6654
6671
  }
6655
6672
  }
6656
6673
  // Payload to send to the Registry for scanning a remote package.
@@ -6762,7 +6779,6 @@ Object.defineProperty(snyk, 'api', {
6762
6779
 
6763
6780
  snyk.test = __webpack_require__(53378);
6764
6781
  snyk.policy = __webpack_require__(70535);
6765
- snyk.isRequired = true; // changed to false when loaded via cli
6766
6782
 
6767
6783
  // this is the user config, and not the internal config
6768
6784
  snyk.config = __webpack_require__(28137).config;
@@ -6933,4 +6949,4 @@ function validateProjectType(options, projectType) {
6933
6949
 
6934
6950
  };
6935
6951
  ;
6936
- //# sourceMappingURL=925.index.js.map
6952
+ //# sourceMappingURL=293.index.js.map