@trustify-da/trustify-da-javascript-client 0.2.4-ea.2eeeeba → 0.2.4-ea.96817e4
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/package.json
CHANGED
|
@@ -38,9 +38,8 @@
|
|
|
38
38
|
"lint": "eslint src test --ext js",
|
|
39
39
|
"lint:fix": "eslint src test --ext js --fix",
|
|
40
40
|
"test": "c8 npm run tests",
|
|
41
|
-
"tests": "mocha --config .mocharc.json --grep \"
|
|
41
|
+
"tests": "mocha --config .mocharc.json --grep \".*analysis module.*\" --invert",
|
|
42
42
|
"tests:rep": "mocha --reporter-option maxDiffSize=0 --reporter json > unit-tests-result.json",
|
|
43
|
-
"integration-tests": "mocha --grep \"Integration Tests\"",
|
|
44
43
|
"precompile": "rm -rf dist",
|
|
45
44
|
"compile": "tsc -p tsconfig.json"
|
|
46
45
|
},
|
|
@@ -79,7 +79,7 @@ export default class Base_Java {
|
|
|
79
79
|
* @returns {PackageURL} The parsed packageURL
|
|
80
80
|
*/
|
|
81
81
|
parseDep(line) {
|
|
82
|
-
let match = line.match(this.DEP_REGEX);
|
|
82
|
+
let match = line.split(':').map(part => part ? part.match(this.DEP_REGEX)[0] : '');
|
|
83
83
|
if (!match) {
|
|
84
84
|
throw new Error(`Unable generate SBOM from dependency tree. Line: ${line} cannot be parsed into a PackageURL`);
|
|
85
85
|
}
|
|
@@ -94,6 +94,9 @@ export default class Base_Java {
|
|
|
94
94
|
if (override) {
|
|
95
95
|
version = override[1];
|
|
96
96
|
}
|
|
97
|
+
if (match[0].trim() === '') {
|
|
98
|
+
throw new Error(`Artifact coordinates should have a non-empty group ID: ${line}`);
|
|
99
|
+
}
|
|
97
100
|
return this.toPurl(match[0], match[1], version);
|
|
98
101
|
}
|
|
99
102
|
/**
|
|
@@ -192,7 +192,7 @@ export default class Java_gradle extends Base_java {
|
|
|
192
192
|
#extractProperties(manifestPath, opts) {
|
|
193
193
|
let properties = {};
|
|
194
194
|
let propertiesContent = this.#getProperties(manifestPath, opts);
|
|
195
|
-
let regExpMatchArray = propertiesContent.match(/([
|
|
195
|
+
let regExpMatchArray = propertiesContent.match(/([^\n:]+):[\t ]*(.*)/g);
|
|
196
196
|
for (let i = 0; i < regExpMatchArray.length - 1; i++) {
|
|
197
197
|
let parts = regExpMatchArray[i].split(":");
|
|
198
198
|
properties[parts[0].trim()] = parts[1].trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trustify-da/trustify-da-javascript-client",
|
|
3
|
-
"version": "0.2.4-ea.
|
|
3
|
+
"version": "0.2.4-ea.96817e4",
|
|
4
4
|
"description": "Code-Ready Dependency Analytics JavaScript API.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/guacsec/trustify-da-javascript-client#README.md",
|
|
@@ -38,9 +38,8 @@
|
|
|
38
38
|
"lint": "eslint src test --ext js",
|
|
39
39
|
"lint:fix": "eslint src test --ext js --fix",
|
|
40
40
|
"test": "c8 npm run tests",
|
|
41
|
-
"tests": "mocha --config .mocharc.json --grep \"
|
|
41
|
+
"tests": "mocha --config .mocharc.json --grep \".*analysis module.*\" --invert",
|
|
42
42
|
"tests:rep": "mocha --reporter-option maxDiffSize=0 --reporter json > unit-tests-result.json",
|
|
43
|
-
"integration-tests": "mocha --grep \"Integration Tests\"",
|
|
44
43
|
"precompile": "rm -rf dist",
|
|
45
44
|
"compile": "tsc -p tsconfig.json"
|
|
46
45
|
},
|