starkbot-cli 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -836,28 +836,25 @@ async function connectCommand(opts = {}) {
|
|
|
836
836
|
}
|
|
837
837
|
} catch (err) {
|
|
838
838
|
spin.fail("Connection failed");
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
} else {
|
|
859
|
-
printError(err.message);
|
|
860
|
-
}
|
|
839
|
+
printWarning("Could not auto-fetch gateway credentials \u2014 you can enter them manually.");
|
|
840
|
+
console.log(dim(` (${err.message})
|
|
841
|
+
`));
|
|
842
|
+
const answers = await inquirer2.prompt([
|
|
843
|
+
{
|
|
844
|
+
type: "input",
|
|
845
|
+
name: "token",
|
|
846
|
+
message: "Gateway token:",
|
|
847
|
+
validate: (v) => v.trim().length > 0 || "Token is required"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
type: "input",
|
|
851
|
+
name: "domain",
|
|
852
|
+
message: "Instance domain (e.g. my-bot.starkbot.cloud):",
|
|
853
|
+
default: creds.instance_domain || void 0,
|
|
854
|
+
validate: (v) => v.trim().length > 0 || "Domain is required"
|
|
855
|
+
}
|
|
856
|
+
]);
|
|
857
|
+
return connectCommand({ token: answers.token.trim(), domain: answers.domain.trim() });
|
|
861
858
|
}
|
|
862
859
|
}
|
|
863
860
|
var init_connect = __esm({
|