UNPKG

snyk-gradle-plugin

Version:
25 lines 988 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.coordsToString = exports.parseCoordinate = void 0; function parseCoordinate(coordinate) { if (!coordinate) return {}; const [name, version] = coordinate.split('@'); const [groupId, artifactId, type, classifier] = name === null || name === void 0 ? void 0 : name.split(':'); return { groupId: groupId || undefined, artifactId: artifactId || undefined, version: version || undefined, type: type || undefined, classifier: classifier || undefined, }; } exports.parseCoordinate = parseCoordinate; function coordsToString(coords) { let name = `${coords.groupId || 'unknown'}:${coords.artifactId || 'unknown'}:${coords.type || 'jar'}`; if (coords.classifier) name += `:${coords.classifier}`; return `${name}@${coords.version || 'unknown'}`; } exports.coordsToString = coordsToString; //# sourceMappingURL=coordinate.js.map