UNPKG

auditjs

Version:

Audit dependencies to identify known vulnerabilities and maintenance problems

65 lines 2.25 kB
"use strict"; /* * Copyright 2019-Present Sonatype Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.IqServerResult = void 0; class IqServerResult { constructor(result) { this.component = new Component(result.component); this.matchState = result.matchState; this.catalogDate = result.catalogDate; this.licenseData = new LicenseData(result.licenseData); this.securityData = new SecurityData(result.securityData); this.policyData = new PolicyData(result.policyData); } toAuditLog() { return `${this.component.packageUrl} - ${this.component.hash}`; } } exports.IqServerResult = IqServerResult; class Component { constructor(component) { this.packageUrl = component.packageUrl; this.hash = component.hash; this.componentIdentifier = new ComponentIdentifier(component.componentIdentifier); this.proprietary = component.proprietary; } } class ComponentIdentifier { constructor(componentIdentifier) { this.format = componentIdentifier.format; this.coordinates = componentIdentifier.coordinates; } } class LicenseData { constructor(licenseData) { this.declaredLicenses = licenseData.declaredLicenses; this.observedLicenses = licenseData.observedLicenses; this.overriddenLicenses = licenseData.overriddenLicenses; this.status = licenseData.status; } } class SecurityData { constructor(securityData) { this.securityData = securityData; } } class PolicyData { constructor(policyData) { this.policyData = policyData; } } //# sourceMappingURL=IqServerResult.js.map