@testmo/testmo-cli
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -66,2 +66,3 @@ "use strict"; | ||
var resources_1 = require("../core/resources"); | ||
var validation_1 = require("../lib/validation"); | ||
var mime_types_1 = __importDefault(require("mime-types")); | ||
@@ -79,3 +80,3 @@ var fs_1 = __importDefault(require("fs")); | ||
} | ||
if (!validator_1.default.isURL(options.url)) { | ||
if (!(0, validation_1.validateURL)(options.url, { allowLocalhost: true })) { | ||
throw new errors_1.ValidationError('URL is not a valid link'); | ||
@@ -82,0 +83,0 @@ } |
@@ -83,3 +83,6 @@ "use strict"; | ||
!validator_1.default.isEmpty(options.value)) { | ||
if (!validator_1.default.isURL(options.value)) { | ||
if (!validator_1.default.isURL(options.value, { | ||
require_tld: false, | ||
require_protocol: true | ||
})) { | ||
throw new errors_1.ValidationError('URL is not a valid link'); | ||
@@ -86,0 +89,0 @@ } |
@@ -66,2 +66,3 @@ "use strict"; | ||
var resources_1 = require("../core/resources"); | ||
var validation_1 = require("../lib/validation"); | ||
var fs_1 = __importDefault(require("fs")); | ||
@@ -78,3 +79,3 @@ var validator_1 = __importDefault(require("validator")); | ||
} | ||
if (!validator_1.default.isURL(options.url)) { | ||
if (!(0, validation_1.validateURL)(options.url, { allowLocalhost: true })) { | ||
throw new errors_1.ValidationError('URL is not a valid link'); | ||
@@ -81,0 +82,0 @@ } |
@@ -15,2 +15,3 @@ "use strict"; | ||
var errors_1 = require("../lib/errors"); | ||
var validation_1 = require("../lib/validation"); | ||
var Resources = /** @class */ (function () { | ||
@@ -48,3 +49,3 @@ function Resources() { | ||
if (loadedField.type == 'url' && 'value' in loadedField && | ||
!validator_1.default.isURL(loadedField.value)) { | ||
!(0, validation_1.validateURL)(loadedField.value, { allowLocalhost: true })) { | ||
throw new errors_1.ValidationError('Field value is not a valid URL'); | ||
@@ -70,3 +71,3 @@ } | ||
} | ||
if (!validator_1.default.isURL(loadedLink.url)) { | ||
if (!(0, validation_1.validateURL)(loadedLink.url, { allowLocalhost: true })) { | ||
throw new errors_1.ValidationError('Link URL is not a valid URL'); | ||
@@ -96,3 +97,3 @@ } | ||
} | ||
if (!validator_1.default.isURL(loadedArtifact.url)) { | ||
if (!(0, validation_1.validateURL)(loadedArtifact.url, { allowLocalhost: true })) { | ||
throw new errors_1.ValidationError('Artifact URL is not a valid URL'); | ||
@@ -99,0 +100,0 @@ } |
@@ -57,3 +57,3 @@ "use strict"; | ||
var time = Number.parseFloat(value); | ||
if (time == Number.NaN || time < 0) { | ||
if (Number.isNaN(time) || time < 0) { | ||
return; | ||
@@ -78,3 +78,3 @@ } | ||
var intValue = Number.parseInt(value, 10); | ||
if (intValue == Number.NaN) { | ||
if (Number.isNaN(intValue)) { | ||
return; | ||
@@ -81,0 +81,0 @@ } |
{ | ||
"name": "@testmo/testmo-cli", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Testmo command line interface", | ||
@@ -5,0 +5,0 @@ "author": "Testmo GmbH", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
217522
37
4026