feat(installer): update error message

This commit is contained in:
hirzidevs
2024-09-11 22:11:38 +07:00
parent 84e2d0e9d4
commit d915724831
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -38,13 +38,13 @@ module.exports = function Installer() {
let isValid = true;
if (index === 1 && !isValidURL(answer)) {
console.log(cliColor.redBright("Invalid URL. Please enter a valid URL."));
console.log(cliColor.redBright('❌ Invalid Panel URL. Please enter a valid URL. Example Correct URL: "https://panel.example.com"'));
isValid = false;
} else if (index === 2 && !/^(plcn_|ptlc_|peli_|ptla_)/.test(answer)) {
console.log(cliColor.redBright("Invalid API key. It must start with 'plcn_' or 'ptlc_'."));
console.log(cliColor.redBright("Invalid Panel API key. It must start with 'plcn_' or 'ptlc_'."));
isValid = false;
} else if (index === 4 && !/^\d+$/.test(answer)) {
console.log(cliColor.redBright("Invalid Channel ID. It must be a number."));
console.log(cliColor.redBright("Invalid Channel ID. It must be a number."));
isValid = false;
}
+1 -1
View File
@@ -23,4 +23,4 @@
"engines": {
"node": ">=18"
}
}
}