Last change
on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
3 | exports.PluginLicensePolicy = void 0;
|
---|
4 | var PluginLicensePolicy = /** @class */ (function () {
|
---|
5 | function PluginLicensePolicy(licenseTester, unacceptableLicenseTester, unacceptableLicenseHandler, missingLicenseTextHandler) {
|
---|
6 | this.licenseTester = licenseTester;
|
---|
7 | this.unacceptableLicenseTester = unacceptableLicenseTester;
|
---|
8 | this.unacceptableLicenseHandler = unacceptableLicenseHandler;
|
---|
9 | this.missingLicenseTextHandler = missingLicenseTextHandler;
|
---|
10 | }
|
---|
11 | PluginLicensePolicy.prototype.isLicenseWrittenFor = function (licenseType) {
|
---|
12 | return this.licenseTester.test(licenseType);
|
---|
13 | };
|
---|
14 | PluginLicensePolicy.prototype.isLicenseUnacceptableFor = function (licenseType) {
|
---|
15 | return this.unacceptableLicenseTester.test(licenseType);
|
---|
16 | };
|
---|
17 | PluginLicensePolicy.prototype.handleUnacceptableLicense = function (packageName, licenseType) {
|
---|
18 | this.unacceptableLicenseHandler(packageName, licenseType);
|
---|
19 | };
|
---|
20 | PluginLicensePolicy.prototype.handleMissingLicenseText = function (packageName, licenseType) {
|
---|
21 | this.missingLicenseTextHandler(packageName, licenseType);
|
---|
22 | };
|
---|
23 | return PluginLicensePolicy;
|
---|
24 | }());
|
---|
25 | exports.PluginLicensePolicy = PluginLicensePolicy;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.