@atlassian/wrm-troubleshooting
Version:
A tool that can help you with troubleshooting the configuration of webpack and Atlassian P2 project.
21 lines • 842 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateOptions = void 0;
const valid_url_1 = __importDefault(require("valid-url"));
const types_1 = require("./types");
const validateOptions = async (options) => {
const { applicationUrl } = options;
if (applicationUrl) {
const isValid = Boolean(valid_url_1.default.isWebUri(applicationUrl));
if (!isValid) {
const error = new Error('Provided application URL is not valid.');
return (0, types_1.getFailedResult)(error);
}
}
return (0, types_1.getPassedResult)();
};
exports.validateOptions = validateOptions;
//# sourceMappingURL=validateOptions.js.map