snyk-nuget-plugin 1.23.4 → 1.23.5

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.
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvalidFolderFormatError = void 0;
4
+ class InvalidFolderFormatError extends Error {
5
+ constructor(...args) {
6
+ super(...args);
7
+ this.code = 422;
8
+ this.name = 'InvalidFolderFormat';
9
+ Error.captureStackTrace(this, InvalidFolderFormatError);
10
+ }
11
+ }
12
+ exports.InvalidFolderFormatError = InvalidFolderFormatError;
13
+ //# sourceMappingURL=invalid-folder-format-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalid-folder-format-error.js","sourceRoot":"","sources":["../../lib/errors/invalid-folder-format-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,wBAAyB,SAAQ,KAAK;IAIjD,YAAmB,GAAG,IAAI;QACxB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QAJV,SAAI,GAAG,GAAG,CAAC;QACX,SAAI,GAAG,qBAAqB,CAAC;QAIlC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;IAC1D,CAAC;CACF;AARD,4DAQC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fromPackagesConfigEntry = exports.fromFolderName = exports.cloneShallow = void 0;
4
4
  const debugModule = require("debug");
5
+ const invalid_folder_format_error_1 = require("../errors/invalid-folder-format-error");
5
6
  const debug = debugModule('snyk');
6
7
  function cloneShallow(dep) {
7
8
  // clone, without the dependencies
@@ -13,7 +14,12 @@ function cloneShallow(dep) {
13
14
  }
14
15
  exports.cloneShallow = cloneShallow;
15
16
  function extractFromDotVersionNotation(expression) {
16
- const versionRef = /(?=\S+)(?=\.{1})((\.\d+)+((-?\w+\.?\d*)|(\+?[0-9a-f]{5,40}))?)/.exec(expression)[0];
17
+ const regexParseResult = /(?=\S+)(?=\.{1})((\.\d+)+((-?\w+\.?\d*)|(\+?[0-9a-f]{5,40}))?)/.exec(expression);
18
+ if (regexParseResult == null) {
19
+ debug(`Failed to extract version from the folder: ${expression}. This is not supposed to happen and should be reported - the folders should always be in the form of [FolderName].[semantic version]`);
20
+ throw new invalid_folder_format_error_1.InvalidFolderFormatError(`Tried to parse package version from a folder name but failed. I received: ${expression}`);
21
+ }
22
+ const versionRef = regexParseResult[0];
17
23
  const name = expression.split(versionRef)[0];
18
24
  return {
19
25
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"dependency.js","sourceRoot":"","sources":["../../lib/nuget-parser/dependency.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AACrC,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAQlC,SAAgB,YAAY,CAAC,GAAe;IAC1C,kCAAkC;IAClC,OAAO;QACL,YAAY,EAAE,EAAE;QAChB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,OAAO,EAAE,GAAG,CAAC,OAAO;KACrB,CAAC;AACJ,CAAC;AAPD,oCAOC;AAED,SAAS,6BAA6B,CAAC,UAAU;IAC/C,MAAM,UAAU,GAAG,gEAAgE,CAAC,IAAI,CACtF,UAAU,CACV,CAAC,CAAC,CAAC,CAAC;IACN,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,OAAO;QACL,IAAI;QACJ,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;KAC7B,CAAC;AACJ,CAAC;AAED,SAAgB,cAAc,CAAC,UAAU;IACvC,KAAK,CAAC,4BAA4B,GAAG,UAAU,CAAC,CAAC;IACjD,MAAM,IAAI,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IACvD,OAAO;QACL,YAAY,EAAE,EAAE;QAChB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,IAAI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